Skip to content

faq 161710116

Billy Charlton edited this page Sep 5, 2018 · 2 revisions

Consultation About the Mixed traffic _TWO

by cui yi on 2018-01-29 14:49:47


hi ,all:

When I simulate the mixed modes including car,pt,bike,walk,taxi,undefined.Here is the config and logfile files.

just like :

  • Error injecting constructor, java.lang.RuntimeException: Object is null; follow stack trace

<config>
     <module name="global">
 		 <param name="randomSeed" value="3467"/>
          <param name="coordinateSystem" value="EPSG:32649"/>
 		 <param name="numberOfThreads" value= "4"/>
     </module>
 <!-- ====================================================================== -->
 	<module name="network">
 		<param name="inputNetworkFile" value="E:/nanning4/network4.xml"/>
 	</module>
 <!-- ====================================================================== -->
 	<module name="plans">
 		<param name="inputPersonAttributesFile" value="null"/>
 		<param name="inputPlansFile" value="E:/nanning4/population0003.xml"/>
 	</module>
 <!-- ====================================================================== -->

 	<module name="controler">
 		<param name="outputDirectory" value="./output-mixed"/>
 		<param name="firstIteration" value="0"/>
 		<param name="lastIteration" value="10"/>
 		<param name="mobsim" value="qsim"/>
 		<param name="eventsFileFormat" value="xml"/>
 		<param name="snapshotFormat" value=""/>
 		<param name="writeSnapshotsInterval" value="10"/>
 	</module>
 <!-- ====================================================================== -->

 	<module name="planscalcroute">

         <param name="networkModes" value="car"/>

         <parameterset type="teleportedModeParameters" >
              <param name="mode" value="bike"/>
 			 <param name="beelineDistanceFactor" value="1.3"/>
 			 <param name="teleportedModeSpeed" value="4.166666666666667"/>
         </parameterset>

         <parameterset type="teleportedModeParameters" >
              <param name="mode" value="walk"/>
 			 <param name="beelineDistanceFactor" value="1.3"/>
 			 <param name="teleportedModeSpeed" value="4.166666666666667"/>
         </parameterset>
         <parameterset type="teleportedModeParameters" >
              <param name="mode" value="pt"/>
 			 <param name="beelineDistanceFactor" value="1.3"/>
 			 <param name="teleportedModeSpeed" value="4.166666666666667"/>
         </parameterset>
         <parameterset type="teleportedModeParameters" >
              <param name="mode" value="taxi"/>
 			 <param name="beelineDistanceFactor" value="1.3"/>
 			 <param name="teleportedModeSpeed" value="4.166666666666667"/>
         </parameterset>
         <parameterset type="teleportedModeParameters" >
              <param name="mode" value="undefined"/>
 			 <param name="beelineDistanceFactor" value="1.3"/>
 			 <param name="teleportedModeSpeed" value="4.166666666666667"/>
         </parameterset>
 	</module>

 <!-- ====================================================================== -->
 	<module name="vehicles" >
 		<param name="vehiclesFile" value="E:/nanning4/vehicles.xml"/> 
 	</module>
 <!-- ====================================================================== -->
 	<module name="qsim">
 		<param name="mainMode" value="car,pt,bike,walk,taxi,undefined"/>
 		<param name="vehiclesSource" value="modeVehicleTypesFromVehiclesData"/>
 		<param name="flowCapacityFactor" value="0.10"/>
 		<param name="storageCapacityFactor" value="0.09"/>
 		<param name="linkDynamics" value="PassingQ"/>
 		<param name="trafficDynamics" value="queue"/>
 		<param name="startTime" value="00:00:00"/>
 		<param name="endTime" value="23:59:59"/>
 		<param name="snapshotperiod"	value = "00:10:00"/>
 	</module>
 <!-- ====================================================================== -->

 	<module name="planCalcScore" >
 	 	  <param name="learningRate" value="0.8"/>
 	 	  <param name="BrainExpBeta" value="2.0"/>
 		  <param name="traveling" value="-6"/>

 		  <param name="lateArrival" value="-18"/>
 		  <param name="performing" value="+6"/>
 		  <param name="waiting" value="-0"/>
           <param name="earlyDeparture" value="-0.0"/>


 		 <parameterset type="modeParams">

 			 <param name="mode" value="car"/>
              <param name="constant" value= "0.0"/>
              <param name="marginalUtilityOfDistance_util_m" value= "0.0"/>
              <param name="marginalUtilityOfTraveling_util_hr" value= "-6.0"/>
              <param name="monetaryDistanceRate" value= "-0.0002"/>
             
			 
 			 <param name="mode" value="pt"/>
              <param name="constant" value= "0.0"/>
              <param name="marginalUtilityOfDistance_util_m" value= "0.0"/>
              <param name="marginalUtilityOfTraveling_util_hr" value= "-6.0"/>
              <param name="monetaryDistanceRate" value= "-0.0002"/>

              <param name="mode" value="bike"/>
              <param name="constant" value= "0.0"/>
              <param name="marginalUtilityOfDistance_util_m" value= "0.0"/>
              <param name="marginalUtilityOfTraveling_util_hr" value= "-6.0"/>
              <param name="monetaryDistanceRate" value= "-0.0002"/>

 			 <param name="mode" value="walk"/>
              <param name="constant" value= "0.0"/>
              <param name="marginalUtilityOfDistance_util_m" value= "0.0"/>
              <param name="marginalUtilityOfTraveling_util_hr" value= "-6.0"/>
              <param name="monetaryDistanceRate" value= "-0.0002"/>

 			 <param name="mode" value="taxi"/>
              <param name="constant" value= "0.0"/>
              <param name="marginalUtilityOfDistance_util_m" value= "0.0"/>
              <param name="marginalUtilityOfTraveling_util_hr" value= "-6.0"/>
              <param name="monetaryDistanceRate" value= "-0.0002"/>

 			 <param name="mode" value="undefined"/>
              <param name="constant" value= "0.0"/>
              <param name="marginalUtilityOfDistance_util_m" value= "0.0"/>
              <param name="marginalUtilityOfTraveling_util_hr" value= "-6.0"/>
              <param name="monetaryDistanceRate" value= "-0.0002"/>
          </parameterset>

         <parameterset type="activityParams">
 		     <param name="activityType"    value="home"/> <!-- home -->
 		     <param name="priority"        value="1"/>
 		     <param name="typicalDuration" value="8:00:00"/>
 		     <param name="minimalDuration" value="undefined"/>
 			 <param name="openingTime"     value=""/>
 		     <param name="latestStartTime" value=""/>
 		     <param name="closingTime"     value=""/>
 			 <param name="earliestEndTime" value=""/>
 		     <param name="scoringThisActivityAtAll"     value=""/>
			
 		     <param name="activityType"    value="work"/> <!-- work -->
 		     <param name="priority"        value="1"/>
 		     <param name="typicalDuration" value="8:00:00"/>
 		     <param name="minimalDuration" value="undefined"/>
 			 <param name="openingTime"     value="07:00:00"/>
 		     <param name="latestStartTime" value="09:00:00"/>
 		     <param name="closingTime"     value="18:00:00"/>
 			 <param name="earliestEndTime" value=""/>
 		     <param name="scoringThisActivityAtAll"     value=""/>
	
 		     <param name="activityType"    value="school"/> <!-- school -->
 		     <param name="priority"        value="1"/>
 		     <param name="typicalDuration" value="6:00:00"/>
 		     <param name="minimalDuration" value="4:00:00"/>
 			 <param name="openingTime"     value="08:00:00"/>
 		     <param name="latestStartTime" value="08:30:00"/>
 		     <param name="closingTime"     value="16:30:00"/>
 			 <param name="earliestEndTime" value="16:00:00"/>
 		     <param name="scoringThisActivityAtAll"     value=""/>

 		     <param name="activityType"    value="hospital"/> <!-- hospital -->
 		     <param name="priority"        value="1"/>
 		     <param name="typicalDuration" value=""/>
 		     <param name="minimalDuration" value=""/>
 			 <param name="openingTime"     value=""/>
 		     <param name="latestStartTime" value=""/>
 		     <param name="closingTime"     value=""/>
 			 <param name="earliestEndTime" value=""/>
 		     <param name="scoringThisActivityAtAll"     value=""/>

 		     <param name="activityType"    value="escort"/> <!-- escort -->
 		     <param name="priority"        value="1"/>
 		     <param name="typicalDuration" value=""/>
 		     <param name="minimalDuration" value="undefined"/>
 			 <param name="openingTime"     value=""/>
 		     <param name="latestStartTime" value=""/>
 		     <param name="closingTime"     value=""/>
 			 <param name="earliestEndTime" value=""/>
 		     <param name="scoringThisActivityAtAll"     value=""/>

 		     <param name="activityType"    value="leisure"/> <!-- leisure -->
 		     <param name="priority"        value="1"/>
 		     <param name="typicalDuration" value=""/>
 		     <param name="minimalDuration" value="undefined"/>
 			 <param name="openingTime"     value=""/>
 		     <param name="latestStartTime" value=""/>
 		     <param name="closingTime"     value=""/>
 			 <param name="earliestEndTime" value=""/>
 		     <param name="scoringThisActivityAtAll"     value=""/>

 		     <param name="activityType"    value="visit"/> <!-- visit -->
 		     <param name="priority"        value="1"/>
 		     <param name="typicalDuration" value=""/>
 		     <param name="minimalDuration" value="undefined"/>
 			 <param name="openingTime"     value=""/>
 		     <param name="latestStartTime" value=""/>
 		     <param name="closingTime"     value=""/>
 			 <param name="earliestEndTime" value=""/>
 		     <param name="scoringThisActivityAtAll"     value=""/>

 		     <param name="activityType"    value="shopping"/> <!-- shopping -->
 		     <param name="priority"        value="1"/>
 		     <param name="typicalDuration" value="1:00:00"/>
 		     <param name="minimalDuration" value="00:30:00"/>
 			 <param name="openingTime"     value=""/>
 		     <param name="latestStartTime" value=""/>
 		     <param name="closingTime"     value=""/>
 			 <param name="earliestEndTime" value=""/>
 		     <param name="scoringThisActivityAtAll"     value=""/>

 		     <param name="activityType"    value="farming"/> <!-- farming -->
 		     <param name="priority"        value="1"/>
 		     <param name="typicalDuration" value=""/>
 		     <param name="minimalDuration" value="undefined"/>
 			 <param name="openingTime"     value=""/>
 		     <param name="latestStartTime" value=""/>
 		     <param name="closingTime"     value=""/>
 			 <param name="earliestEndTime" value=""/>
 		     <param name="scoringThisActivityAtAll"     value=""/>

 		     <param name="activityType"    value="business"/> <!-- business -->
 		     <param name="priority"        value="1"/>
 		     <param name="typicalDuration" value=""/>
 		     <param name="minimalDuration" value="00:30:00"/>
 			 <param name="openingTime"     value="8:00:00"/>
 		     <param name="latestStartTime" value=""/>
 		     <param name="closingTime"     value="18:00:00"/>
 			 <param name="earliestEndTime" value=""/>
 		     <param name="scoringThisActivityAtAll"     value=""/>

 		     <param name="activityType"    value="other"/> <!-- other -->
 		     <param name="priority"        value="1"/>
 		     <param name="typicalDuration" value=""/>
 		     <param name="minimalDuration" value="undefined"/>
 			 <param name="openingTime"     value=""/>
 		     <param name="latestStartTime" value=""/>
 		     <param name="closingTime"     value=""/>
 			 <param name="earliestEndTime" value=""/>
 		     <param name="scoringThisActivityAtAll"     value=""/>
 	    </parameterset>
	
 	</module>
 <!-- ====================================================================== -->
 	<module name="strategy">
 		<param name="maxAgentPlanMemorySize" value="5"/> <!-- 0 means unlimited -->
 		<param name="ModuleProbability_1" value="0.8"/>
 		<param name="Module_1" value="BestScore"/>
 		<param name="ModuleProbability_2" value="0.1"/>
 		<param name="Module_2" value="ReRoute"/>
 		<param name="ModuleProbability_3" value="0.1"/>
 		<param name="Module_3" value="TimeAllocationMutator"/>
 	</module>

 	<module name="travelTimeCalculator" >
 		<param name="analyzedModes" value="car,pt,bike,walk,taxi,undefined"/>
 		<param name="separateModes" value="true"/>
 	</module>
  
 </config>

What is the reason,please?


Comments: 2


Re: Consultation About the Mixed traffic _TWO

by Amit Agarwal on 2018-01-29 15:36:51

Dear Cui yi,

The error seems ambiguous. However, there is at least one problem which is related to network modes. It is already answered in one of previous question (see https://matsim.atlassian.net/wiki/display/CQ/customcontent/154599425).

In general, a mode can have only one router (network router or teleportation router). Network router routes agents on the link whereas teleportation router routes agents between origin and destination depending on given teleportation speed. You are assigning {{"pt,car,taxi,walk,bike,undefined"}} as {{main}} and {{network}} modes. However, in {{planscalcroute}}, network mode is only {{car}} and {{bike, walk, pt, taxi, undefined}} modes are teleported.

I would recommend to start with a simple example (let's say two modes only) by following instructions at https://matsim.atlassian.net/wiki/spaces/MATPUB/pages/84246576/Mixed+traffic. If that works without a problem then proceed to actual complex problem.


Re: Consultation About the Mixed traffic _TWO

by cui yi on 2018-02-24 03:26:09

thank you for your replay ! Your advice is to very useful.The simulation seems to be running. I will check the result latter.

Clone this wiki locally