Hi Armonia,
the easiest way to achieve this is probably to use a vTypeDistribution
with equal probabilities for both vTypes and then generate a joined flow
using it:

<vTypeDistribution id="truck">
  <vType id="truck1" accel="0.5" decel="3" sigma="0.5" length="10"
 vehsPerHour="395" guiShape="truck" maxSpeed="25.55" speedFactor="0.7"
 speedDev="0.15"  color="0.3,0.7,1"/>

 <vType id="truck2" accel="0.5" decel="3" sigma="0.5" length="10"
 vehsPerHour="395" guiShape="truck" maxSpeed="25.55" speedFactor="0.7"
 speedDev="0.15"  color="1,0.7,1"/>
</vTypeDistribution>

 <flow id="all" type="truck" route="route0" begin="0" period="3"
 departSpeed="19" number="790"/>

This way you will get equal proportions only in the limit but they
should be randomly mixed.

Best regards
Michael

Am 22.11.2016 um 16:42 schrieb Armo DiBi:
> Hello everybody,
> I have a question for you: I want to simulate different flows on a map.
> I defined 2 flows with a default configuration, e.g.:
> 
> <route id="route0" edges="58736580#1-AddedOnRampEdge 58736580#1
> 58736580#1-AddedOffRampEdge 156559105#1 156559105#2-AddedOnRampEdge
> 156559105#2 156559105#2-AddedOffRampEdge"/>
> 
>  <vType id="truck1" accel="0.5" decel="3" sigma="0.5" length="10"
> vehsPerHour="395" guiShape="truck" maxSpeed="25.55" SpeedFactor="0.7"
> speedDev="0.15"  color="0.3,0.7,1"/>
> 
> <vType id="truck2" accel="0.5" decel="3" sigma="0.5" length="10"
> vehsPerHour="395" guiShape="truck" maxSpeed="25.55" SpeedFactor="0.7"
> speedDev="0.15"  color="1,0.7,1"/>
> 
> <flow id="1" type="truck1" route="route0" begin="0" period="3"
> departSpeed="19" number="395"/>
>   <flow id="2" type="truck2" route="route0" begin="0" period="3"
> departSpeed="19" number="395"/>
> 
> 
> When I run the simulation, at the beginning 1 car per flow is generated,
> then 2 per flows and so on. I actually want the flows to be randomly mixed.
> I tried to change the "following model" parameter of one of the flows, but
> nothing change. Can someone help me?
> 
> Thank you.
> Regards.
> Armonia
> ------------------------------------------------------------------------------
> _______________________________________________
> sumo-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sumo-user
> 


------------------------------------------------------------------------------
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user

Reply via email to