Re: [sumo-user] randomTrips for multiple vTypes

2020-05-25 Thread Jakob Erdmann
The vTypeDistribution approach only works if all the roads in your
simulation can be used by all vClasses in the distribution. Otherwise you
should use multiple randomTrips calls and add the option --vclass.
The option --trip-attributes should work just the way you wrote it.
On a general note: Whenever you try something according to the
documentation and it doesn't work, please describe the way in which you
called the tool and the resulting error.

regards,
Jakob



Am Di., 26. Mai 2020 um 00:50 Uhr schrieb Dayuan Tan :

> Dear Jakob,
>
> Thank you very much for helping!
>
> I tried the second approach you mentioned before I asked. But when I tried
> it, I have following addition xml file.
> 
>  guiShape="passenger" probability="0.9"/>
> 
> 
>
> Could you help to clarify how to set type attribute? I tried
> randomTrips.py --trip-attributes="type=\"typedist1\"" But it doesn't work.
> I think I need a list of parameters which can be put into
> --trip-attributes="" but I didn't find it.
>
> Thank you very much! I appreciate it very much!
>
> Have a good day!
>
> Sincerely,
> Dayuan
>
> **
>
>
>
>
> *Dayuan(Neil) TanUMBC*
>
> On May 25, 2020, at 04:54, Jakob Erdmann  wrote:
>
> If you wish to generated multiple types you either have to
> - run randomTrips multiple times with a different type attribute (you also
> need to set the --prefix option to ensure all vehicles have distinct ids).
> - put the types into a vTypeDistribution and put the distribution id into
> the type attribute
>
> Am Mo., 25. Mai 2020 um 09:18 Uhr schrieb Dayuan Tan :
>
>> Dear Jacob,
>>
>> Thank you very much for your helping!
>>
>> I actually checked the webpage you sent before I asked. It mentions the
>> case with one vType: "
>> /tools/randomTrips.py -n input_net.net.xml --trip-attributes=
>> "type=\"myType\"" --additional-file type.add.xml
>>--edge-permission passenger"
>>
>> I'm wondering what if I have multiple vTypes defined in addition.xml. I
>> tried to change it to "…--trip-attributes="type=\"myType1 myType2
>> myType3 myType3\""  …" but it seems it doesn't work.
>>
>> Thank you very much!
>>
>> Have a good day!
>>
>> Sincerely,
>> Dayuan
>>
>>
>> **
>>
>>
>>
>>
>> *Dayuan(Neil) TanUMBC*
>>
>> On May 24, 2020, at 15:09, Jakob Erdmann  wrote:
>>
>> see
>> https://sumo.dlr.de/docs/Tools/Trip.html#setting_a_vehicle_type_from_an_external_file
>>
>> Am So., 24. Mai 2020 um 05:23 Uhr schrieb Dayuan Tan :
>>
>>> Dear All,
>>>
>>> Could anyone help to explain how to use randomTrips to generate trips
>>> with multiple vehicles types?
>>> On the official website it mentions "randomTrips.py --vehicle-class
>>> bus".
>>> But I have multiple vehicle types defined in my addition.xml file.
>>>
>>> I tried using vehicle type distribution
>>> 
>>>  but
>>> it doesn't work. The output rou.xml still doesn't have type attribute for
>>> vehicles.
>>>
>>> Thank you very much! I appreciate it very much!
>>>
>>> Have a good day!
>>>
>>> Sincerely,
>>> Dayuan
>>>
>>>
>>> **
>>>
>>>
>>>
>>>
>>> *Dayuan(Neil) TanUMBC*
>>>
>>> ___
>>> sumo-user mailing list
>>> sumo-user@eclipse.org
>>> To unsubscribe from this list, visit
>>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>>
>> ___
>> sumo-user mailing list
>> sumo-user@eclipse.org
>> To unsubscribe from this list, visit
>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>
>>
>> ___
>> sumo-user mailing list
>> sumo-user@eclipse.org
>> To unsubscribe from this list, visit
>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>
> ___
> sumo-user mailing list
> sumo-user@eclipse.org
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
>
> ___
> sumo-user mailing list
> sumo-user@eclipse.org
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
___
sumo-user mailing list
sumo-user@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user


Re: [sumo-user] randomTrips for multiple vTypes

2020-05-25 Thread Dayuan Tan
Dear Jakob,

Thank you very much for helping!

I tried the second approach you mentioned before I asked. But when I tried it, 
I have following addition xml file. 





Could you help to clarify how to set type attribute? I tried randomTrips.py 
--trip-attributes="type=\"typedist1\"" But it doesn't work.
I think I need a list of parameters which can be put into --trip-attributes="" 
but I didn't find it.

Thank you very much! I appreciate it very much!

Have a good day!

Sincerely,
Dayuan


Dayuan(Neil) Tan
UMBC



> On May 25, 2020, at 04:54, Jakob Erdmann  wrote:
> 
> If you wish to generated multiple types you either have to 
> - run randomTrips multiple times with a different type attribute (you also 
> need to set the --prefix option to ensure all vehicles have distinct ids).
> - put the types into a vTypeDistribution and put the distribution id into the 
> type attribute
> 
> Am Mo., 25. Mai 2020 um 09:18 Uhr schrieb Dayuan Tan  >:
> Dear Jacob,
> 
> Thank you very much for your helping!
> 
> I actually checked the webpage you sent before I asked. It mentions the case 
> with one vType: "/tools/randomTrips.py -n input_net.net.xml 
> --trip-attributes="type=\"myType\"" --additional-file type.add.xml
>--edge-permission passenger"
> 
> I'm wondering what if I have multiple vTypes defined in addition.xml. I tried 
> to change it to "…--trip-attributes="type=\"myType1 myType2 myType3 
> myType3\""  …" but it seems it doesn't work. 
> 
> Thank you very much!
> 
> Have a good day!
> 
> Sincerely,
> Dayuan
> 
> 
> 
> Dayuan(Neil) Tan
> UMBC
> 
> 
> 
>> On May 24, 2020, at 15:09, Jakob Erdmann > > wrote:
>> 
>> see 
>> https://sumo.dlr.de/docs/Tools/Trip.html#setting_a_vehicle_type_from_an_external_file
>>  
>> 
>> Am So., 24. Mai 2020 um 05:23 Uhr schrieb Dayuan Tan > >:
>> Dear All,
>> 
>> Could anyone help to explain how to use randomTrips to generate trips with 
>> multiple vehicles types?
>> On the official website it mentions "randomTrips.py --vehicle-class bus".
>> But I have multiple vehicle types defined in my addition.xml file. 
>> 
>> I tried using vehicle type distribution 
>> 
>>  but it doesn't work. The output rou.xml still doesn't have type attribute 
>> for vehicles. 
>> 
>> Thank you very much! I appreciate it very much!
>> 
>> Have a good day!
>> 
>> Sincerely,
>> Dayuan
>> 
>> 
>> 
>> Dayuan(Neil) Tan
>> UMBC
>> 
>> 
>> 
>> ___
>> sumo-user mailing list
>> sumo-user@eclipse.org 
>> To unsubscribe from this list, visit 
>> https://www.eclipse.org/mailman/listinfo/sumo-user 
>> 
>> ___
>> sumo-user mailing list
>> sumo-user@eclipse.org 
>> To unsubscribe from this list, visit 
>> https://www.eclipse.org/mailman/listinfo/sumo-user 
>> 
> 
> ___
> sumo-user mailing list
> sumo-user@eclipse.org 
> To unsubscribe from this list, visit 
> https://www.eclipse.org/mailman/listinfo/sumo-user 
> 
> ___
> sumo-user mailing list
> sumo-user@eclipse.org
> To unsubscribe from this list, visit 
> https://www.eclipse.org/mailman/listinfo/sumo-user

___
sumo-user mailing list
sumo-user@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user


Re: [sumo-user] --binomial option

2020-05-25 Thread Jakob Erdmann
use option --binomial 1 --period 2 --flows N

Am Mo., 25. Mai 2020 um 16:35 Uhr schrieb Raheleh Zarei <
raheleh.za...@gmail.com>:

> Yes, I already tried the  --binomial and understand how it works. But
> because I need to create flow instead of trips, I have to use --flow option.
> I need to create files, with a certain number of flows, fromJunction
> toJunction, each with the probability of 0.5.
> The command line I use is
> python myRandomTrips.py -n eichstaett.net.xml -o
> ./Trips$j/RoutingSim$i.rou.xml --random true -b 0 -e 500  --binomial
>  --flow $j --junction-taz true
>
> how should I fix it to have something like this?
>
>  toJunction="2034"/>
>  fromJunction="1232" toJunction="1839"/>
>  fromJunction="1496" toJunction="2294"/>
>  fromJunction="909" toJunction="1232"/>
>  fromJunction="1520" toJunction="2097"/>
>  fromJunction="2160" toJunction="1979"/>
>  fromJunction="1348" toJunction="1438"/>
>  fromJunction="1341" toJunction="785"/>
>  fromJunction="461" toJunction="2284"/>
>  fromJunction="1801" toJunction="2284"/>
>
> On Mon, May 25, 2020 at 10:12 AM Jakob Erdmann 
> wrote:
>
>> This is, because you are setting the option --binomial 2.
>> The whole point of this option is to enable probabilistic departures with
>> a per-second probability > 1. (The probability option needs to be smaller
>> than 1 or you will get deterministic behavior). The probability is divided
>> by the value given to --binomial and the number of flows is increased
>> instead.
>>
>> Am Mo., 25. Mai 2020 um 15:56 Uhr schrieb Raheleh Zarei <
>> raheleh.za...@gmail.com>:
>>
>>> I tried it with different numbers, that also creates two flow for the
>>> same origin-destination pair. e.g. if I put 2 it gives me 4, and if I put 4
>>> it gives me 8 which is 4 pairs. each pair are identical but with a
>>> different id.
>>> >> fromJunction="1951" toJunction="1131"/>
>>> >> fromJunction="1951" toJunction="1131"/>
>>> >> fromJunction="1968" toJunction="1931"/>
>>> >> fromJunction="1968" toJunction="1931"/>
>>> >> fromJunction="2495" toJunction="2496"/>
>>> >> fromJunction="2495" toJunction="2496"/>
>>> >> fromJunction="2141" toJunction="818"/>
>>> >> fromJunction="2141" toJunction="818"/>
>>>
>>> On Mon, May 25, 2020 at 2:18 AM Jakob Erdmann 
>>> wrote:
>>>
 This is due to your use of --flow 1. If you want more
 origin-destination pairs you need to increase the number of flows.

 Am Mo., 25. Mai 2020 um 06:58 Uhr schrieb Raheleh Zarei <
 raheleh.za...@gmail.com>:

> Hello,
>
> When I use  --binomial with rondomTrip.py to create flows, it
> creates two exact same trips as the output.
>
> My command line is:
>  python randomTrips.py -n eichstaett.net.xml -o RoutingSim1.rou.xml
> --random true -b 0 -e 500  --binomial 2 --flow 1 --junction-taz true
>
> and this is the output:
>  fromJunction="1955" toJunction="144"/>
>  fromJunction="1955" toJunction="144"/>
>
> I was wondering why it does that and how can I fix it.
>
> Thanks,
> Raheleh
>
> --
> *RAZ*
> ___
> sumo-user mailing list
> sumo-user@eclipse.org
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
 ___
 sumo-user mailing list
 sumo-user@eclipse.org
 To unsubscribe from this list, visit
 https://www.eclipse.org/mailman/listinfo/sumo-user

>>>
>>>
>>> --
>>> *RAZ*
>>> ___
>>> sumo-user mailing list
>>> sumo-user@eclipse.org
>>> To unsubscribe from this list, visit
>>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>>
>> ___
>> sumo-user mailing list
>> sumo-user@eclipse.org
>> To unsubscribe from this list, visit
>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>
>
>
> --
> *RAZ*
> ___
> sumo-user mailing list
> sumo-user@eclipse.org
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
___
sumo-user mailing list
sumo-user@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user


Re: [sumo-user] --binomial option

2020-05-25 Thread Raheleh Zarei
Yes, I already tried the  --binomial and understand how it works. But
because I need to create flow instead of trips, I have to use --flow option.
I need to create files, with a certain number of flows, fromJunction
toJunction, each with the probability of 0.5.
The command line I use is
python myRandomTrips.py -n eichstaett.net.xml -o
./Trips$j/RoutingSim$i.rou.xml --random true -b 0 -e 500  --binomial
 --flow $j --junction-taz true

how should I fix it to have something like this?












On Mon, May 25, 2020 at 10:12 AM Jakob Erdmann 
wrote:

> This is, because you are setting the option --binomial 2.
> The whole point of this option is to enable probabilistic departures with
> a per-second probability > 1. (The probability option needs to be smaller
> than 1 or you will get deterministic behavior). The probability is divided
> by the value given to --binomial and the number of flows is increased
> instead.
>
> Am Mo., 25. Mai 2020 um 15:56 Uhr schrieb Raheleh Zarei <
> raheleh.za...@gmail.com>:
>
>> I tried it with different numbers, that also creates two flow for the
>> same origin-destination pair. e.g. if I put 2 it gives me 4, and if I put 4
>> it gives me 8 which is 4 pairs. each pair are identical but with a
>> different id.
>> > fromJunction="1951" toJunction="1131"/>
>> > fromJunction="1951" toJunction="1131"/>
>> > fromJunction="1968" toJunction="1931"/>
>> > fromJunction="1968" toJunction="1931"/>
>> > fromJunction="2495" toJunction="2496"/>
>> > fromJunction="2495" toJunction="2496"/>
>> > fromJunction="2141" toJunction="818"/>
>> > fromJunction="2141" toJunction="818"/>
>>
>> On Mon, May 25, 2020 at 2:18 AM Jakob Erdmann 
>> wrote:
>>
>>> This is due to your use of --flow 1. If you want more origin-destination
>>> pairs you need to increase the number of flows.
>>>
>>> Am Mo., 25. Mai 2020 um 06:58 Uhr schrieb Raheleh Zarei <
>>> raheleh.za...@gmail.com>:
>>>
 Hello,

 When I use  --binomial with rondomTrip.py to create flows, it
 creates two exact same trips as the output.

 My command line is:
  python randomTrips.py -n eichstaett.net.xml -o RoutingSim1.rou.xml
 --random true -b 0 -e 500  --binomial 2 --flow 1 --junction-taz true

 and this is the output:
 >>> fromJunction="1955" toJunction="144"/>
 >>> fromJunction="1955" toJunction="144"/>

 I was wondering why it does that and how can I fix it.

 Thanks,
 Raheleh

 --
 *RAZ*
 ___
 sumo-user mailing list
 sumo-user@eclipse.org
 To unsubscribe from this list, visit
 https://www.eclipse.org/mailman/listinfo/sumo-user

>>> ___
>>> sumo-user mailing list
>>> sumo-user@eclipse.org
>>> To unsubscribe from this list, visit
>>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>>
>>
>>
>> --
>> *RAZ*
>> ___
>> sumo-user mailing list
>> sumo-user@eclipse.org
>> To unsubscribe from this list, visit
>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>
> ___
> sumo-user mailing list
> sumo-user@eclipse.org
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>


-- 
*RAZ*
___
sumo-user mailing list
sumo-user@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user


Re: [sumo-user] --binomial option

2020-05-25 Thread Jakob Erdmann
This is, because you are setting the option --binomial 2.
The whole point of this option is to enable probabilistic departures with a
per-second probability > 1. (The probability option needs to be smaller
than 1 or you will get deterministic behavior). The probability is divided
by the value given to --binomial and the number of flows is increased
instead.

Am Mo., 25. Mai 2020 um 15:56 Uhr schrieb Raheleh Zarei <
raheleh.za...@gmail.com>:

> I tried it with different numbers, that also creates two flow for the same
> origin-destination pair. e.g. if I put 2 it gives me 4, and if I put 4 it
> gives me 8 which is 4 pairs. each pair are identical but with a different
> id.
>  fromJunction="1951" toJunction="1131"/>
>  fromJunction="1951" toJunction="1131"/>
>  fromJunction="1968" toJunction="1931"/>
>  fromJunction="1968" toJunction="1931"/>
>  fromJunction="2495" toJunction="2496"/>
>  fromJunction="2495" toJunction="2496"/>
>  fromJunction="2141" toJunction="818"/>
>  fromJunction="2141" toJunction="818"/>
>
> On Mon, May 25, 2020 at 2:18 AM Jakob Erdmann 
> wrote:
>
>> This is due to your use of --flow 1. If you want more origin-destination
>> pairs you need to increase the number of flows.
>>
>> Am Mo., 25. Mai 2020 um 06:58 Uhr schrieb Raheleh Zarei <
>> raheleh.za...@gmail.com>:
>>
>>> Hello,
>>>
>>> When I use  --binomial with rondomTrip.py to create flows, it
>>> creates two exact same trips as the output.
>>>
>>> My command line is:
>>>  python randomTrips.py -n eichstaett.net.xml -o RoutingSim1.rou.xml
>>> --random true -b 0 -e 500  --binomial 2 --flow 1 --junction-taz true
>>>
>>> and this is the output:
>>> >> fromJunction="1955" toJunction="144"/>
>>> >> fromJunction="1955" toJunction="144"/>
>>>
>>> I was wondering why it does that and how can I fix it.
>>>
>>> Thanks,
>>> Raheleh
>>>
>>> --
>>> *RAZ*
>>> ___
>>> sumo-user mailing list
>>> sumo-user@eclipse.org
>>> To unsubscribe from this list, visit
>>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>>
>> ___
>> sumo-user mailing list
>> sumo-user@eclipse.org
>> To unsubscribe from this list, visit
>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>
>
>
> --
> *RAZ*
> ___
> sumo-user mailing list
> sumo-user@eclipse.org
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
___
sumo-user mailing list
sumo-user@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user


Re: [sumo-user] --binomial option

2020-05-25 Thread Raheleh Zarei
I tried it with different numbers, that also creates two flow for the same
origin-destination pair. e.g. if I put 2 it gives me 4, and if I put 4 it
gives me 8 which is 4 pairs. each pair are identical but with a different
id.









On Mon, May 25, 2020 at 2:18 AM Jakob Erdmann  wrote:

> This is due to your use of --flow 1. If you want more origin-destination
> pairs you need to increase the number of flows.
>
> Am Mo., 25. Mai 2020 um 06:58 Uhr schrieb Raheleh Zarei <
> raheleh.za...@gmail.com>:
>
>> Hello,
>>
>> When I use  --binomial with rondomTrip.py to create flows, it
>> creates two exact same trips as the output.
>>
>> My command line is:
>>  python randomTrips.py -n eichstaett.net.xml -o RoutingSim1.rou.xml
>> --random true -b 0 -e 500  --binomial 2 --flow 1 --junction-taz true
>>
>> and this is the output:
>> > fromJunction="1955" toJunction="144"/>
>> > fromJunction="1955" toJunction="144"/>
>>
>> I was wondering why it does that and how can I fix it.
>>
>> Thanks,
>> Raheleh
>>
>> --
>> *RAZ*
>> ___
>> sumo-user mailing list
>> sumo-user@eclipse.org
>> To unsubscribe from this list, visit
>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>
> ___
> sumo-user mailing list
> sumo-user@eclipse.org
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>


-- 
*RAZ*
___
sumo-user mailing list
sumo-user@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user


Re: [sumo-user] TraCI - Change vehicle-class specific speed limit for an edge

2020-05-25 Thread Ellen Grumert
Thank you for your answer!

This is a good suggestion.

Best regards
Ellen

Från: sumo-user-boun...@eclipse.org  För Jakob 
Erdmann
Skickat: den 19 maj 2020 13:25
Till: Sumo project User discussions 
Ämne: Re: [sumo-user] TraCI - Change vehicle-class specific speed limit for an 
edge

This is not supported. However, you could prepare vClass-specific speed limits 
for otherwise-unused vClasses (i.e. vClass="custom1" and "custom2") and change 
the vClass of some vehicles to those classes as needed.

Am Di., 19. Mai 2020 um 12:58 Uhr schrieb Ellen Grumert 
mailto:ellen.grum...@vti.se>>:
Dear sumo-users,

I have a question regarding the specific speed limit for a vehicle class.

Is there a way to change the vehicle-class specific speed 
limit
 of an edge through TraCI?

Best regards
Ellen
___
sumo-user mailing list
sumo-user@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user
___
sumo-user mailing list
sumo-user@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user


Re: [sumo-user] randomTrips for multiple vTypes

2020-05-25 Thread Jakob Erdmann
If you wish to generated multiple types you either have to
- run randomTrips multiple times with a different type attribute (you also
need to set the --prefix option to ensure all vehicles have distinct ids).
- put the types into a vTypeDistribution and put the distribution id into
the type attribute

Am Mo., 25. Mai 2020 um 09:18 Uhr schrieb Dayuan Tan :

> Dear Jacob,
>
> Thank you very much for your helping!
>
> I actually checked the webpage you sent before I asked. It mentions the
> case with one vType: "
> /tools/randomTrips.py -n input_net.net.xml --trip-attributes=
> "type=\"myType\"" --additional-file type.add.xml
>--edge-permission passenger"
>
> I'm wondering what if I have multiple vTypes defined in addition.xml. I
> tried to change it to "…--trip-attributes="type=\"myType1 myType2 myType3
> myType3\""  …" but it seems it doesn't work.
>
> Thank you very much!
>
> Have a good day!
>
> Sincerely,
> Dayuan
>
>
> **
>
>
>
>
> *Dayuan(Neil) TanUMBC*
>
> On May 24, 2020, at 15:09, Jakob Erdmann  wrote:
>
> see
> https://sumo.dlr.de/docs/Tools/Trip.html#setting_a_vehicle_type_from_an_external_file
>
> Am So., 24. Mai 2020 um 05:23 Uhr schrieb Dayuan Tan :
>
>> Dear All,
>>
>> Could anyone help to explain how to use randomTrips to generate trips
>> with multiple vehicles types?
>> On the official website it mentions "randomTrips.py --vehicle-class bus".
>> But I have multiple vehicle types defined in my addition.xml file.
>>
>> I tried using vehicle type distribution
>> 
>>  but
>> it doesn't work. The output rou.xml still doesn't have type attribute for
>> vehicles.
>>
>> Thank you very much! I appreciate it very much!
>>
>> Have a good day!
>>
>> Sincerely,
>> Dayuan
>>
>>
>> **
>>
>>
>>
>>
>> *Dayuan(Neil) TanUMBC*
>>
>> ___
>> sumo-user mailing list
>> sumo-user@eclipse.org
>> To unsubscribe from this list, visit
>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>
> ___
> sumo-user mailing list
> sumo-user@eclipse.org
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
>
> ___
> sumo-user mailing list
> sumo-user@eclipse.org
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
___
sumo-user mailing list
sumo-user@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user


Re: [sumo-user] Generate ticket data while simulating public transit line (route)

2020-05-25 Thread Jakob Erdmann
Yes. The error happened when accessing the vehicle (pointer) of a previous
stage in order to retrieve the vehicle type id of that stage. Instead of
using a potentially stale pointer, the type id is now stored directly.

Am Mo., 25. Mai 2020 um 10:29 Uhr schrieb Tripplanner Mumbai <
tripplanner...@gmail.com>:

> Hi Jackob,
> I want to point out to your comments at github link- "*when calling
> traci.person.getNextStage(personID, nextStageIndex) with a negative index,
> if the vehicle has already left the simulation, traci crashes when trying
> access the vehicle type*".
>
> You may be right that it happened due to the fact the vehicle has left.
> However, the error is due to accessing the previous stage and the
> properties of previous stage (not the vehicle type or ID of the current
> stage).
>
> I am attaching a modified TraCI file for your reference. It raises
> exception on line 66, and a customized error is as follows:
> Error in Previous Stage retrieval, so, skip this personID: 2229
> Interestingly, when I followed the person in persontrip.rou.xml, I found
> the following information.
>
> 
> 
> 
>  busStop="busStop#35"/>
> 
> 
> 
>
> It means that the error occurred when 2229 waiting for his second ride
> (lines="89"), and I am trying to get the previous stage information, his
> first ride (lines="14"), possibly, the corresponding vehicle of his first
> ride has left the simulation. Hence, we are unable to fetch the previous
> stage information.
>
> Roughly, I guess that this situation might arise whenever there is a
> consecutive ride (public transit lines) for a passengers, in his plan.
>
> thanks and regards,
> Dillip Rout
>
>
> On Mon, 25 May 2020 at 12:52, Jakob Erdmann  wrote:
>
>> Thank you for the example files. The issue has been fixed (
>> https://github.com/eclipse/sumo/issues/7060)
>> You can download the updated sumo version* tomorrow* at
>> https://sumo.dlr.de/docs/Downloads.php#sumo_-_latest_development_version
>>
>> regards,
>> Jakob
>>
>> Am Mo., 25. Mai 2020 um 07:50 Uhr schrieb Tripplanner Mumbai <
>> tripplanner...@gmail.com>:
>>
>>> It is not clear from the log files what error it has. The program stops
>>> by stating that "FatalTraCIError: connection closed by SUMO". I am sending
>>> the files as attachment with the following details.
>>>
>>>
>>>- SUMO-version - 1.6.0  and operating system - Ubuntu 18.04 LTS
>>>- screenshot attached
>>>- input files attached
>>>- line 65 in demo.py (attached) creates FatalTraCIError
>>>
>>> Kindly try to resolve it.
>>> thanks and regards,
>>> Dillip Rout
>>>
>>> On Sun, 24 May 2020 at 21:27, Jakob Erdmann 
>>> wrote:
>>>
 Hello,
 the FatalTraCIError can mean one of two things:
 1) Sumo had an error (you will find a reason in the log file if you run
 sumo with option --log)
 2) Sumo encountered a bug and crashed. In that case please send me
 input files for reproducing the issue (
 https://sumo.dlr.de/docs/FAQ.html#how_do_i_report_erroneous_behavior_of_a_sumo_application
 )
 you can send the files directly to me or you can create an issue on
 github and attach the files there.

 regards,
 Jakob

 Am Fr., 22. Mai 2020 um 08:07 Uhr schrieb Tripplanner Mumbai <
 tripplanner...@gmail.com>:

> As per the discussion, I tried to extract the stage information using
> TraCI and combine the log files to generate the ticket data. However, for
> some of the cases, I get fatal errors as follows.
>
> File
> "/home/dhrien/Documents/sumos/Bologna/acosta_persontrips/demo.py", line 
> 86,
> in run  prevStage = traci.person.getStage(peopleIDs[i],-1)
> File "/usr/share/sumo/tools/traci/_person.py", line 192, in getStage
> tc.VAR_STAGE, personID))
> File "/usr/share/sumo/tools/traci/connection.py", line 158, in
> _checkResult result = self._sendExact()
> File "/usr/share/sumo/tools/traci/connection.py", line 101, in
> _sendExact raise FatalTraCIError("connection closed by SUMO")
> FatalTraCIError: connection closed by SUMO
>
> The above error is due the following code segment written inside run
> method of TraCI program.
> currStage = traci.person.getStage(peopleIDs[i])
> if currStage.type == 3: #record only if driving or riding
>
> try:
> prevStage = traci.person.getStage(peopleIDs[i],-1)
> except FatalTraCIError:
> print("Previous Stage Error for
> Person",peopleIDs[i])
> continue
>
> Note that previous stage is retrieved only if a person is boarded into
> a vehicle. Also, l am trying handle the exception but the program stops.
> Further, I do check if previous stage is null (None) and then operate but
> unfortunately nothing works at this moment.
>
> Please suggest.
>

Re: [sumo-user] Generate ticket data while simulating public transit line (route)

2020-05-25 Thread Tripplanner Mumbai
Hi Jackob,
I want to point out to your comments at github link- "*when calling
traci.person.getNextStage(personID, nextStageIndex) with a negative index,
if the vehicle has already left the simulation, traci crashes when trying
access the vehicle type*".

You may be right that it happened due to the fact the vehicle has left.
However, the error is due to accessing the previous stage and the
properties of previous stage (not the vehicle type or ID of the current
stage).

I am attaching a modified TraCI file for your reference. It raises
exception on line 66, and a customized error is as follows:
Error in Previous Stage retrieval, so, skip this personID: 2229
Interestingly, when I followed the person in persontrip.rou.xml, I found
the following information.
   








It means that the error occurred when 2229 waiting for his second ride
(lines="89"), and I am trying to get the previous stage information, his
first ride (lines="14"), possibly, the corresponding vehicle of his first
ride has left the simulation. Hence, we are unable to fetch the previous
stage information.

Roughly, I guess that this situation might arise whenever there is a
consecutive ride (public transit lines) for a passengers, in his plan.

thanks and regards,
Dillip Rout


On Mon, 25 May 2020 at 12:52, Jakob Erdmann  wrote:

> Thank you for the example files. The issue has been fixed (
> https://github.com/eclipse/sumo/issues/7060)
> You can download the updated sumo version* tomorrow* at
> https://sumo.dlr.de/docs/Downloads.php#sumo_-_latest_development_version
>
> regards,
> Jakob
>
> Am Mo., 25. Mai 2020 um 07:50 Uhr schrieb Tripplanner Mumbai <
> tripplanner...@gmail.com>:
>
>> It is not clear from the log files what error it has. The program stops
>> by stating that "FatalTraCIError: connection closed by SUMO". I am sending
>> the files as attachment with the following details.
>>
>>
>>- SUMO-version - 1.6.0  and operating system - Ubuntu 18.04 LTS
>>- screenshot attached
>>- input files attached
>>- line 65 in demo.py (attached) creates FatalTraCIError
>>
>> Kindly try to resolve it.
>> thanks and regards,
>> Dillip Rout
>>
>> On Sun, 24 May 2020 at 21:27, Jakob Erdmann 
>> wrote:
>>
>>> Hello,
>>> the FatalTraCIError can mean one of two things:
>>> 1) Sumo had an error (you will find a reason in the log file if you run
>>> sumo with option --log)
>>> 2) Sumo encountered a bug and crashed. In that case please send me input
>>> files for reproducing the issue (
>>> https://sumo.dlr.de/docs/FAQ.html#how_do_i_report_erroneous_behavior_of_a_sumo_application
>>> )
>>> you can send the files directly to me or you can create an issue on
>>> github and attach the files there.
>>>
>>> regards,
>>> Jakob
>>>
>>> Am Fr., 22. Mai 2020 um 08:07 Uhr schrieb Tripplanner Mumbai <
>>> tripplanner...@gmail.com>:
>>>
 As per the discussion, I tried to extract the stage information using
 TraCI and combine the log files to generate the ticket data. However, for
 some of the cases, I get fatal errors as follows.

 File "/home/dhrien/Documents/sumos/Bologna/acosta_persontrips/demo.py",
 line 86, in run  prevStage = traci.person.getStage(peopleIDs[i],-1)
 File "/usr/share/sumo/tools/traci/_person.py", line 192, in getStage
 tc.VAR_STAGE, personID))
 File "/usr/share/sumo/tools/traci/connection.py", line 158, in
 _checkResult result = self._sendExact()
 File "/usr/share/sumo/tools/traci/connection.py", line 101, in
 _sendExact raise FatalTraCIError("connection closed by SUMO")
 FatalTraCIError: connection closed by SUMO

 The above error is due the following code segment written inside run
 method of TraCI program.
 currStage = traci.person.getStage(peopleIDs[i])
 if currStage.type == 3: #record only if driving or riding

 try:
 prevStage = traci.person.getStage(peopleIDs[i],-1)
 except FatalTraCIError:
 print("Previous Stage Error for
 Person",peopleIDs[i])
 continue

 Note that previous stage is retrieved only if a person is boarded into
 a vehicle. Also, l am trying handle the exception but the program stops.
 Further, I do check if previous stage is null (None) and then operate but
 unfortunately nothing works at this moment.

 Please suggest.

 thanks and regards,
 Dillip Rout

 On Thu, 7 May 2020 at 12:46, Jakob Erdmann 
 wrote:

> Yes. If you need to retrieve data while the simulation is still
> running, you generally need to use traci. If you can wait until the
> simulation is finished you can retrieve the ticket information from the 
> xml
> outputs as well.
>
> Am Do., 7. Mai 2020 um 09:06 Uhr schrieb Tripplanner Mumbai <
> tripplanner...@gmail.com>:
>
>> Hello 

Re: [sumo-user] Generate ticket data while simulating public transit line (route)

2020-05-25 Thread Jakob Erdmann
Thank you for the example files. The issue has been fixed (
https://github.com/eclipse/sumo/issues/7060)
You can download the updated sumo version* tomorrow* at
https://sumo.dlr.de/docs/Downloads.php#sumo_-_latest_development_version

regards,
Jakob

Am Mo., 25. Mai 2020 um 07:50 Uhr schrieb Tripplanner Mumbai <
tripplanner...@gmail.com>:

> It is not clear from the log files what error it has. The program stops by
> stating that "FatalTraCIError: connection closed by SUMO". I am sending the
> files as attachment with the following details.
>
>
>- SUMO-version - 1.6.0  and operating system - Ubuntu 18.04 LTS
>- screenshot attached
>- input files attached
>- line 65 in demo.py (attached) creates FatalTraCIError
>
> Kindly try to resolve it.
> thanks and regards,
> Dillip Rout
>
> On Sun, 24 May 2020 at 21:27, Jakob Erdmann  wrote:
>
>> Hello,
>> the FatalTraCIError can mean one of two things:
>> 1) Sumo had an error (you will find a reason in the log file if you run
>> sumo with option --log)
>> 2) Sumo encountered a bug and crashed. In that case please send me input
>> files for reproducing the issue (
>> https://sumo.dlr.de/docs/FAQ.html#how_do_i_report_erroneous_behavior_of_a_sumo_application
>> )
>> you can send the files directly to me or you can create an issue on
>> github and attach the files there.
>>
>> regards,
>> Jakob
>>
>> Am Fr., 22. Mai 2020 um 08:07 Uhr schrieb Tripplanner Mumbai <
>> tripplanner...@gmail.com>:
>>
>>> As per the discussion, I tried to extract the stage information using
>>> TraCI and combine the log files to generate the ticket data. However, for
>>> some of the cases, I get fatal errors as follows.
>>>
>>> File "/home/dhrien/Documents/sumos/Bologna/acosta_persontrips/demo.py",
>>> line 86, in run  prevStage = traci.person.getStage(peopleIDs[i],-1)
>>> File "/usr/share/sumo/tools/traci/_person.py", line 192, in getStage
>>> tc.VAR_STAGE, personID))
>>> File "/usr/share/sumo/tools/traci/connection.py", line 158, in
>>> _checkResult result = self._sendExact()
>>> File "/usr/share/sumo/tools/traci/connection.py", line 101, in
>>> _sendExact raise FatalTraCIError("connection closed by SUMO")
>>> FatalTraCIError: connection closed by SUMO
>>>
>>> The above error is due the following code segment written inside run
>>> method of TraCI program.
>>> currStage = traci.person.getStage(peopleIDs[i])
>>> if currStage.type == 3: #record only if driving or riding
>>>
>>> try:
>>> prevStage = traci.person.getStage(peopleIDs[i],-1)
>>> except FatalTraCIError:
>>> print("Previous Stage Error for Person",peopleIDs[i])
>>> continue
>>>
>>> Note that previous stage is retrieved only if a person is boarded into a
>>> vehicle. Also, l am trying handle the exception but the program stops.
>>> Further, I do check if previous stage is null (None) and then operate but
>>> unfortunately nothing works at this moment.
>>>
>>> Please suggest.
>>>
>>> thanks and regards,
>>> Dillip Rout
>>>
>>> On Thu, 7 May 2020 at 12:46, Jakob Erdmann 
>>> wrote:
>>>
 Yes. If you need to retrieve data while the simulation is still
 running, you generally need to use traci. If you can wait until the
 simulation is finished you can retrieve the ticket information from the xml
 outputs as well.

 Am Do., 7. Mai 2020 um 09:06 Uhr schrieb Tripplanner Mumbai <
 tripplanner...@gmail.com>:

> Hello Jackob,
> Do you mean that I should retrieve person data using TraCI (links-
> https://sumo.dlr.de/docs/TraCI/Person_Value_Retrieval.html,
> https://sumo.dlr.de/pydoc/traci._person.html#PersonDomain-getStage)?
> Thanks in advance.
>
> On Thu, 7 May 2020 at 12:13, Jakob Erdmann 
> wrote:
>
>> Hello,
>> during the simulation, you can use traci.person.getStage to access
>> past, current and future stage information including the destination
>> busStop of each stage (which is the origin stop for the subsequent 
>> stage).
>> regards,
>> Jakob
>>
>> Am Do., 7. Mai 2020 um 08:36 Uhr schrieb Tripplanner Mumbai <
>> tripplanner...@gmail.com>:
>>
>>> Hello,
>>> I am trying to capture the origin and destination bus stops of each
>>> passenger (or on aggregate for a group) and issue tickets accordingly. I
>>> found that  has information about the line, number of 
>>> passengers
>>> boarded and the source bus stop, as given below.
>>>
>>> >> pos="30.31" parking="0" started="983.00" ended="1080.00" delay="0.00"
>>> initialPersons="18" loadedPersons="3" unloadedPersons="12"
>>> initialContainers="0" loadedContainers="0" unloadedContainers="0"
>>> busStop="busStop#34"/>
>>>
>>> Also, it can be noted that  has information about the
>>> destination stop while riding, as given below.
>>>
>>> 
>>>
>>>  >> busStop="busStop#31"/>

Re: [sumo-user] randomTrips for multiple vTypes

2020-05-25 Thread Dayuan Tan
Dear Jacob,

Thank you very much for your helping!

I actually checked the webpage you sent before I asked. It mentions the case 
with one vType: "/tools/randomTrips.py -n input_net.net.xml 
--trip-attributes="type=\"myType\"" --additional-file type.add.xml
   --edge-permission passenger"

I'm wondering what if I have multiple vTypes defined in addition.xml. I tried 
to change it to "…--trip-attributes="type=\"myType1 myType2 myType3 myType3\""  
…" but it seems it doesn't work. 

Thank you very much!

Have a good day!

Sincerely,
Dayuan



Dayuan(Neil) Tan
UMBC



> On May 24, 2020, at 15:09, Jakob Erdmann  wrote:
> 
> see 
> https://sumo.dlr.de/docs/Tools/Trip.html#setting_a_vehicle_type_from_an_external_file
>  
> 
> Am So., 24. Mai 2020 um 05:23 Uhr schrieb Dayuan Tan  >:
> Dear All,
> 
> Could anyone help to explain how to use randomTrips to generate trips with 
> multiple vehicles types?
> On the official website it mentions "randomTrips.py --vehicle-class bus".
> But I have multiple vehicle types defined in my addition.xml file. 
> 
> I tried using vehicle type distribution 
> 
>  but it doesn't work. The output rou.xml still doesn't have type attribute 
> for vehicles. 
> 
> Thank you very much! I appreciate it very much!
> 
> Have a good day!
> 
> Sincerely,
> Dayuan
> 
> 
> 
> Dayuan(Neil) Tan
> UMBC
> 
> 
> 
> ___
> sumo-user mailing list
> sumo-user@eclipse.org 
> To unsubscribe from this list, visit 
> https://www.eclipse.org/mailman/listinfo/sumo-user 
> 
> ___
> sumo-user mailing list
> sumo-user@eclipse.org
> To unsubscribe from this list, visit 
> https://www.eclipse.org/mailman/listinfo/sumo-user

___
sumo-user mailing list
sumo-user@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user


Re: [sumo-user] polyconvert - color

2020-05-25 Thread Jakob Erdmann
With the latest development version you can use polyconvert option "--color
random"

regards,
Jakob

Am Sa., 23. Mai 2020 um 01:31 Uhr schrieb Sasan Amini :

> I have one shapefile containing more than 300 polygons from a visum
> network.  When I use polyconvert to extract the polygons all of them get
> the same color. Is it possible to randomly generate different colors for
> each polygon?
> ___
> sumo-user mailing list
> sumo-user@eclipse.org
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
___
sumo-user mailing list
sumo-user@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user


Re: [sumo-user] --binomial option

2020-05-25 Thread Jakob Erdmann
This is due to your use of --flow 1. If you want more origin-destination
pairs you need to increase the number of flows.

Am Mo., 25. Mai 2020 um 06:58 Uhr schrieb Raheleh Zarei <
raheleh.za...@gmail.com>:

> Hello,
>
> When I use  --binomial with rondomTrip.py to create flows, it creates two
> exact same trips as the output.
>
> My command line is:
>  python randomTrips.py -n eichstaett.net.xml -o RoutingSim1.rou.xml
> --random true -b 0 -e 500  --binomial 2 --flow 1 --junction-taz true
>
> and this is the output:
>  fromJunction="1955" toJunction="144"/>
>  fromJunction="1955" toJunction="144"/>
>
> I was wondering why it does that and how can I fix it.
>
> Thanks,
> Raheleh
>
> --
> *RAZ*
> ___
> sumo-user mailing list
> sumo-user@eclipse.org
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
___
sumo-user mailing list
sumo-user@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user


Re: [sumo-user] change the traffic lights for specific lane

2020-05-25 Thread Jakob Erdmann
You can use traci.vehicle.getNextTLS() which returns tlsID, index, distance
and state for the upcoming traffic lights.
regards,
Jakob

Am Mo., 25. Mai 2020 um 00:01 Uhr schrieb Weronika :

> Dear all,
>
>
> I am a new sumo user, still on the way of discovering many things. I would
> be grateful if you could help me with one obstacle.
>
>
>
> I would like to change the traffic light for the green in the crossing for
> some vehicle.
>
>
> I know the id of the vehicle, the lane on which it is and I know also the
> id of the traffic light. I can get a state of the traffic light, for
> example, state="GGggGGgg”. Firstly, I would like to know which
> traffic light is now for the vehicle, but I don’t know which part of the
> traffic light state is for this lane where the vehicle is. What is the rule
> for it or how could I check it? I am able to change the phase for the
> traffic light, but I would like to only do it in case that the light for
> the vehicle is red.
>
>
> (I am able to check it in sumo gui for one traffic light, how is it
> working, but I would like my program to work with different types of maps,
> where there are many intersections)
>
>
> I would appreciate any tips about how I could deal with this.
>
> best regards,
>
> Weronika
>
>
>
> ___
> sumo-user mailing list
> sumo-user@eclipse.org
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
___
sumo-user mailing list
sumo-user@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user