Permalink
Browse files

corrected plotting of first, 5h, etc vehicle, fixed configurations

  • Loading branch information...
akegermany committed Dec 16, 2016
1 parent 3dcd768 commit 3938e5481befe462ea11f60926f469f9ee502aeb
@@ -7,7 +7,7 @@ cleanmovsim
for ldm in ${startStop}
do
input="startStop_$ldm.xml"
input="startStop_$ldm"
echo "input = $input"
runmovsim -f $input
gnuplot "startStop_$ldm.gpl"
@@ -21,12 +21,12 @@ if (!exists("lang")) lang = "en"
# variables
baseFile = "startStop_".ldm
vehicle = ldm."1"
c0 = 1
c0 = 27
# input files
fundFile = inputPath.baseFile.".fund_".vehicle.".csv"
if (ldm eq "IDM_w_noise") fundFile = inputPath.baseFile.".fund_IDM1.csv"
carFile(n) = sprintf(inputPath.baseFile.".car.route_main.%06d.csv",c0+n)
carFile(n) = sprintf(inputPath.baseFile.".car.route_main.%06d.csv",c0-n)
carLsaFile(n) = sprintf(inputPath.baseFile."LSA.car%d.csv",c0+n)
trajectoriesFile = inputPath.baseFile.".traj.route_main.csv"
@@ -144,7 +144,7 @@ set ytics 10
print "carFile(1)=", carFile(1)," c0=",c0
set out distanceOutput
if(c0 == 1) plot\
plot\
carFile(1) using 1:9 title car(1) with lines linestyle 1,\
carFile(5) using 1:9 title car(5) with lines linestyle 2,\
carFile(10) using 1:9 title car(10) with lines linestyle 3,\
@@ -4,7 +4,8 @@
<VehiclePrototypes write_fund_diagrams="true">
<VehiclePrototypeConfiguration label="ACC1" length="8" maximum_deceleration="9">
<AccelerationModelType>
<ModelParameterACC v0="15" T="1.2" s0="2" s1="0" delta="4" a="1.5" b="1.5" coolness="1" />
<!-- these parameters are used for plotting Fig 11.10 in the book -->
<ModelParameterACC v0="15" T="1.2" s0="2" s1="0" delta="4" a="1.5" b="1.5" coolness="0.99" />
</AccelerationModelType>
<LaneChangeModelType />
</VehiclePrototypeConfiguration>
@@ -30,11 +31,11 @@
</Routes>
<OutputConfiguration>
<FloatingCarOutput n_timestep="5" route="main">
<FloatingCar number="2" />
<FloatingCar number="6" />
<FloatingCar number="11" />
<FloatingCar number="16" />
<FloatingCar number="21" />
<FloatingCar number="7" />
<FloatingCar number="12" />
<FloatingCar number="17" />
<FloatingCar number="22" />
<FloatingCar number="26" /> <!-- most downstram vehicle approaching obstacle -->
</FloatingCarOutput>
<Trajectories dt="1" start_time="0" end_time="120" route="main" />
</OutputConfiguration>
@@ -19,45 +19,12 @@
<LaneChangeModelType />
</VehiclePrototypeConfiguration>
</VehiclePrototypes>
<Scenario network_filename="startStop.xodr" initial_conditions_filename="startStop_initialConditions_BARL.xml">
<Scenario network_filename="startStop.xodr" initial_conditions_filename="startStop_initialConditions_NSM.xml">
<Simulation timestep="1" duration="360" seed="42">
<TrafficComposition>
<VehicleType label="BARL1" fraction="1" />
<VehicleType label="Obstacle" fraction="0" />
</TrafficComposition>
<Road id="1">
<InitialConditions>
<!-- in physical quantities (meter and m/s) -->
<MicroIC position="7.5" speed="0" label="BARL1" />
<MicroIC position="15.0" speed="0" label="BARL1" />
<MicroIC position="22.5" speed="0" label="BARL1" />
<MicroIC position="30.0" speed="0" label="BARL1" />
<MicroIC position="37.5" speed="0" label="BARL1" />
<MicroIC position="45.0" speed="0" label="BARL1" />
<MicroIC position="52.5" speed="0" label="BARL1" />
<MicroIC position="60.0" speed="0" label="BARL1" />
<MicroIC position="67.5" speed="0" label="BARL1" />
<MicroIC position="75.0" speed="0" label="BARL1" />
<MicroIC position="82.5" speed="0" label="BARL1" />
<MicroIC position="90.0" speed="0" label="BARL1" />
<MicroIC position="97.5" speed="0" label="BARL1" />
<MicroIC position="105.0" speed="0" label="BARL1" />
<MicroIC position="112.5" speed="0" label="BARL1" />
<MicroIC position="120.0" speed="0" label="BARL1" />
<MicroIC position="127.5" speed="0" label="BARL1" />
<MicroIC position="135.0" speed="0" label="BARL1" />
<MicroIC position="142.5" speed="0" label="BARL1" />
<MicroIC position="150.0" speed="0" label="BARL1" />
<MicroIC position="157.5" speed="0" label="BARL1" />
<MicroIC position="165.0" speed="0" label="BARL1" />
<MicroIC position="172.5" speed="0" label="BARL1" />
<MicroIC position="180.0" speed="0" label="BARL1" />
<MicroIC position="187.5" speed="0" label="BARL1" />
<MicroIC position="195.0" speed="0" label="BARL1" />
<!-- obstacle shifts floating car numbers -->
<MicroIC position="750" speed="0" label="Obstacle" />
</InitialConditions>
</Road>
</Simulation>
<Routes>
<Route label="main">
@@ -66,12 +33,11 @@
</Routes>
<OutputConfiguration>
<FloatingCarOutput n_timestep="1" route="main">
<!-- FloatingCar 1 is obstacle -->
<FloatingCar number="2" />
<FloatingCar number="6" />
<FloatingCar number="11" />
<FloatingCar number="16" />
<FloatingCar number="21" />
<FloatingCar number="7" />
<FloatingCar number="12" />
<FloatingCar number="17" />
<FloatingCar number="22" />
<FloatingCar number="26" /> <!-- most downstram vehicle approaching obstacle -->
</FloatingCarOutput>
<Trajectories dt="1" route="main" />
</OutputConfiguration>
@@ -31,12 +31,11 @@
</Routes>
<OutputConfiguration>
<FloatingCarOutput n_timestep="5" route="main">
<FloatingCar number="2" />
<FloatingCar number="3" />
<FloatingCar number="6" />
<FloatingCar number="11" />
<FloatingCar number="16" />
<FloatingCar number="21" />
<FloatingCar number="7" />
<FloatingCar number="12" />
<FloatingCar number="17" />
<FloatingCar number="22" />
<FloatingCar number="26" /> <!-- most downstram vehicle approaching obstacle -->
</FloatingCarOutput>
<Trajectories dt="1" route="main" />
</OutputConfiguration>
@@ -32,12 +32,11 @@
<OutputConfiguration>
<!-- output grid absorbs some information in acceleration -->
<FloatingCarOutput n_timestep="5" route="main">
<!-- FloatingCar 1 is obstacle -->
<FloatingCar number="2" />
<FloatingCar number="6" />
<FloatingCar number="11" />
<FloatingCar number="16" />
<FloatingCar number="21" />
<FloatingCar number="7" />
<FloatingCar number="12" />
<FloatingCar number="17" />
<FloatingCar number="22" />
<FloatingCar number="26" /> <!-- most downstram vehicle approaching obstacle -->
</FloatingCarOutput>
<Trajectories dt="1" route="main" />
</OutputConfiguration>
@@ -30,12 +30,11 @@
</Routes>
<OutputConfiguration>
<FloatingCarOutput n_timestep="1" route="main">
<!-- FloatingCar 1 is obstacle -->
<FloatingCar number="2" />
<FloatingCar number="6" />
<FloatingCar number="11" />
<FloatingCar number="16" />
<FloatingCar number="21" />
<FloatingCar number="7" />
<FloatingCar number="12" />
<FloatingCar number="17" />
<FloatingCar number="22" />
<FloatingCar number="26" /> <!-- most downstram vehicle approaching obstacle -->
</FloatingCarOutput>
<Trajectories dt="1" route="main" />
</OutputConfiguration>
@@ -4,7 +4,7 @@
<VehiclePrototypes write_fund_diagrams="true">
<VehiclePrototypeConfiguration label="IDM1" length="8" maximum_deceleration="9">
<AccelerationModelType>
<ModelParameterIDM v0="15" T="1" s0="2" a="1.5" b="1.5" />
<ModelParameterIDM v0="15" T="1" s0="2" delta="4" a="1.0" b="1.5" />
</AccelerationModelType>
</VehiclePrototypeConfiguration>
<VehiclePrototypeConfiguration label="Obstacle" length="8" maximum_deceleration="9">
@@ -28,11 +28,11 @@
</Routes>
<OutputConfiguration>
<FloatingCarOutput n_timestep="5" route="main">
<FloatingCar number="2" />
<FloatingCar number="6" />
<FloatingCar number="11" />
<FloatingCar number="16" />
<FloatingCar number="21" />
<FloatingCar number="7" />
<FloatingCar number="12" />
<FloatingCar number="17" />
<FloatingCar number="22" />
<FloatingCar number="26" />
</FloatingCarOutput>
<Trajectories dt="1" route="main" />
</OutputConfiguration>
@@ -29,11 +29,11 @@
</Routes>
<OutputConfiguration>
<FloatingCarOutput n_timestep="5" route="main">
<FloatingCar number="2" />
<FloatingCar number="6" />
<FloatingCar number="11" />
<FloatingCar number="16" />
<FloatingCar number="21" />
<FloatingCar number="7" />
<FloatingCar number="12" />
<FloatingCar number="17" />
<FloatingCar number="22" />
<FloatingCar number="26" /> <!-- most downstram vehicle approaching obstacle -->
</FloatingCarOutput>
<Trajectories dt="1" route="main" />
</OutputConfiguration>
@@ -31,11 +31,11 @@
</Routes>
<OutputConfiguration>
<FloatingCarOutput n_timestep="5" route="main">
<FloatingCar number="2" />
<FloatingCar number="6" />
<FloatingCar number="11" />
<FloatingCar number="16" />
<FloatingCar number="21" />
<FloatingCar number="7" />
<FloatingCar number="12" />
<FloatingCar number="17" />
<FloatingCar number="22" />
<FloatingCar number="26" /> <!-- most downstram vehicle approaching obstacle -->
</FloatingCarOutput>
<Trajectories dt="1" route="main" />
</OutputConfiguration>
@@ -28,11 +28,11 @@
</Routes>
<OutputConfiguration>
<FloatingCarOutput n_timestep="5" route="main">
<FloatingCar number="2" />
<FloatingCar number="6" />
<FloatingCar number="11" />
<FloatingCar number="16" />
<FloatingCar number="21" />
<FloatingCar number="7" />
<FloatingCar number="12" />
<FloatingCar number="17" />
<FloatingCar number="22" />
<FloatingCar number="26" /> <!-- most downstram vehicle approaching obstacle -->
</FloatingCarOutput>
<Trajectories dt="1" route="main" />
</OutputConfiguration>
@@ -17,45 +17,13 @@
<LaneChangeModelType />
</VehiclePrototypeConfiguration>
</VehiclePrototypes>
<Scenario network_filename="startStop.xodr">
<Scenario network_filename="startStop.xodr" initial_conditions_filename="startStop_initialConditions_KKW.xml">
<!-- depends strongly on randomness resp. seed ! -->
<Simulation timestep="1" duration="360" seed="50">
<TrafficComposition>
<VehicleType label="KKW1" fraction="1" />
<VehicleType label="Obstacle" fraction="0" />
</TrafficComposition>
<Road id="1">
<InitialConditions>
<!-- in physical quantities (meter and m/s) -->
<MicroIC position="10" speed="0" label="KKW1" />
<MicroIC position="20" speed="0" label="KKW1" />
<MicroIC position="30" speed="0" label="KKW1" />
<MicroIC position="40" speed="0" label="KKW1" />
<MicroIC position="50" speed="0" label="KKW1" />
<MicroIC position="60" speed="0" label="KKW1" />
<MicroIC position="70" speed="0" label="KKW1" />
<MicroIC position="80" speed="0" label="KKW1" />
<MicroIC position="90" speed="0" label="KKW1" />
<MicroIC position="100" speed="0" label="KKW1" />
<MicroIC position="110" speed="0" label="KKW1" />
<MicroIC position="120" speed="0" label="KKW1" />
<MicroIC position="130" speed="0" label="KKW1" />
<MicroIC position="140" speed="0" label="KKW1" />
<MicroIC position="150" speed="0" label="KKW1" />
<MicroIC position="160" speed="0" label="KKW1" />
<MicroIC position="170" speed="0" label="KKW1" />
<MicroIC position="180" speed="0" label="KKW1" />
<MicroIC position="190" speed="0" label="KKW1" />
<MicroIC position="200" speed="0" label="KKW1" />
<MicroIC position="210" speed="0" label="KKW1" />
<MicroIC position="220" speed="0" label="KKW1" />
<MicroIC position="230" speed="0" label="KKW1" />
<MicroIC position="240" speed="0" label="KKW1" />
<MicroIC position="250" speed="0" label="KKW1" />
<!-- obstacle shifts floating car numbers -->
<MicroIC position="1000" speed="0" label="Obstacle" />
</InitialConditions>
</Road>
</Simulation>
<Routes>
<Route label="main">
@@ -64,12 +32,11 @@
</Routes>
<OutputConfiguration>
<FloatingCarOutput n_timestep="1" route="main">
<!-- FloatingCar 1 is obstacle -->
<FloatingCar number="2" />
<FloatingCar number="6" />
<FloatingCar number="11" />
<FloatingCar number="16" />
<FloatingCar number="21" />
<FloatingCar number="7" />
<FloatingCar number="12" />
<FloatingCar number="17" />
<FloatingCar number="22" />
<FloatingCar number="26" /> <!-- most downstram vehicle approaching obstacle -->
</FloatingCarOutput>
<Trajectories dt="1" route="main" />
</OutputConfiguration>
@@ -31,12 +31,11 @@
</Routes>
<OutputConfiguration>
<FloatingCarOutput n_timestep="1" route="main">
<!-- FloatingCar 1 is obstacle -->
<FloatingCar number="2" />
<FloatingCar number="6" />
<FloatingCar number="11" />
<FloatingCar number="16" />
<FloatingCar number="21" />
<FloatingCar number="7" />
<FloatingCar number="12" />
<FloatingCar number="17" />
<FloatingCar number="22" />
<FloatingCar number="26" /> <!-- most downstram vehicle approaching obstacle -->
</FloatingCarOutput>
<Trajectories dt="1" route="main" />
</OutputConfiguration>
@@ -30,11 +30,11 @@
</Routes>
<OutputConfiguration>
<FloatingCarOutput n_timestep="5" route="main">
<FloatingCar number="2" />
<FloatingCar number="6" />
<FloatingCar number="11" />
<FloatingCar number="16" />
<FloatingCar number="21" />
<FloatingCar number="7" />
<FloatingCar number="12" />
<FloatingCar number="17" />
<FloatingCar number="22" />
<FloatingCar number="26" /> <!-- most downstram vehicle approaching obstacle -->
</FloatingCarOutput>
<Trajectories dt="1" route="main" />
</OutputConfiguration>
Oops, something went wrong.

0 comments on commit 3938e54

Please sign in to comment.