Skip to content

Commit

Permalink
test: try new travel mode
Browse files Browse the repository at this point in the history
  • Loading branch information
dhixsingh committed Feb 20, 2024
1 parent fdf479d commit 845573e
Show file tree
Hide file tree
Showing 6 changed files with 459 additions and 145 deletions.
90 changes: 90 additions & 0 deletions ees/scenarios/grid/ar-1b-ees-fire.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--===========================================================================
#%L
BDI-ABM Integration Package
%%
Copyright (C) 2014 - 2016 by its authors. See AUTHORS file.
%%
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Lesser Public License for more details.
You should have received a copy of the GNU General Lesser Public
License along with this program. If not, see
<http://www.gnu.org/licenses/lgpl-3.0.html>.
#L%
============================================================================-->

<simulation
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://github.com/agentsoz/bdi-abm-integration"
xsi:schemaLocation="https://github.com/agentsoz/bdi-abm-integration ../xsd/ees.xsd"
version="v2.0">

<!-- global configuration sent to all models -->
<global>
<!-- random seed to be used for all models; set to -1 if not used -->
<opt id="randomSeed">12345</opt>
<!-- coordinate reference system in EPSG format to be used for all models; see http://spatialreference.org -->
<opt id="crs">EPSG:28355</opt>
<!-- simulation start time in HH:MM format -->
<opt id="startHHMM">00:01</opt>
</global>

<!-- model specific configuration -->
<models>

<model id="bdi">
<!-- Jill BDI engine configuration arguments; DO NOT CHANGE IF UNSURE -->
<opt id="jPlanSelectionPolicy">FIRST</opt>
<opt id="jAgents"></opt>
<opt id="jLogLevel">WARN</opt>
<opt id="jLogFile">test/output/io/github/agentsoz/ees/agents/archetype/ArchetypeAgentFireTestNewMode/test/archetype.log</opt>
<opt id="jOutFile">test/output/io/github/agentsoz/ees/agents/archetype/ArchetypeAgentFireTestNewMode/test/archetype.out</opt>
<!--<opt id="jNumThreads">1</opt>-->
<!-- Output file for evacuation metrics -->
<opt id="bdiMetricsFile">test/output/io/github/agentsoz/ees/agents/archetype/ArchetypeAgentFireTestNewMode/test/archetype.metrics.json</opt>
<!-- Time bin size in seconds for collected evacuation metrics -->
<opt id="bdiMetricsFrequencyInSeconds">600</opt>
</model>

<model id="matsim">
<!-- MATSim output directory relative to examples/bushfire directory (will overrule the setting in MATSim config) -->
<opt id="outputDir">test/output/io/github/agentsoz/ees/agents/archetype/ArchetypeAgentFireTestNewMode/test/matsim</opt>
<!-- MATSim XML config XML file relative to examples/bushfire directory -->
<opt id="configXml">scenarios/grid/ar-1b-mat.xml</opt>
<!-- Maximum distance at which the fire can be seen (in metres)-->
<opt id="maxDistanceForFireVisual">1000</opt>
<!-- Maximum distance at which smoke can be seen (in metres)-->
<opt id="maxDistanceForSmokeVisual">0</opt>
<!-- Fire avoidance buffer used for planning routes for regular vehicles (in metres)-->
<opt id="fireAvoidanceBufferForVehicles">2000</opt>
<!-- Fire avoidance buffer used for planning routes for emergency vehicles (in metres)-->
<opt id="fireAvoidanceBufferForEmergencyVehicles">1000</opt>
<!-- Congestion parameters used by vehicles to decide if they are stuck in congestion. See issues
https://github.com/agentsoz/bdi-abm-integration/issues/8 and
https://github.com/agentsoz/bdi-abm-integration/issues/35 -->
<opt id="congestionEvaluationInterval">180</opt>
<opt id="congestionToleranceThreshold">0.33</opt>
<opt id="congestionReactionProbability">0.0</opt> <!-- disable congestion replanning -->
</model>

<model id="phoenix">
<!-- Phoenix start time in HH:MM format; used to calculate absolute values for hour_spot and hour_burnt -->
<opt id="ignitionHHMM">01:00</opt>
<!-- Phoenix grid GeoJSON file -->
<opt id="gridGeoJson">scenarios/grid/gridfire.json</opt>
<!-- Phoenix grid square size (in meteres) -->
<opt id="gridSquareSideInMetres">180</opt>
</model>

</models>

</simulation>
117 changes: 117 additions & 0 deletions ees/scenarios/grid/ar-1b-mat.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<?xml version="1.0" ?>
<!--
#%L
BDI-ABM Integration Package
%%
Copyright (C) 2014 - 2015 by its authors. See AUTHORS file.
%%
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Lesser Public License for more details.
You should have received a copy of the GNU General Lesser Public
License along with this program. If not, see
<http://www.gnu.org/licenses/lgpl-3.0.html>.
#L%
-->

<!DOCTYPE config SYSTEM "http://www.matsim.org/files/dtd/config_v2.dtd">
<config>

<module name="global">
<param name="randomSeed" value="482564" />
<param name="coordinateSystem" value="Atlantis" />
</module>

<module name="network">
<param name="inputNetworkFile" value="gridworld.xml" />
<param name= "timeVariantNetwork" value= "false" />
<!--<param name= "inputChangeEventsFile" value= "scenario_matsim_network_change_events.xml.gz" />-->
</module>

<module name="plans">
<param name="inputPlansFile" value="ar-1b-pop.xml" />
</module>

<module name="controler">
<param name="outputDirectory" value="output" />
<param name="firstIteration" value="0" />
<param name="lastIteration" value="0" />
<param name="mobsim" value="qsim" />
<param name = "snapshotFormat" value="googleearth"/> <!-- enable KML output; also must enable snapshotperiod -->
</module>

<module name="controler">
<param name= "routingAlgorithmType" value="FastAStarLandmarks" />
</module>

<module name="qsim">
<!-- "start/endTime" of MobSim (00:00:00 == take earliest activity time/ run as long as active vehicles exist) -->
<param name="startTime" value="00:00:00" />
<!--<param name="endTime" value="00:59:59" />-->

<param name = "snapshotperiod" value = "00:00:00"/> <!-- 00:00:00 means NO snapshot writing, 00:00:30 means every 30 secs -->

<param name= "flowCapacityFactor" value= "1.0" />
<param name= "storageCapacityFactor" value= "1.0" />

</module>

<module name="planCalcScore">
<param name="learningRate" value="1.0" />
<param name="BrainExpBeta" value="2.0" />

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

<parameterset type="modeParams">
<param name="mode" value="car"/>
<param name="marginalUtilityOfTraveling_util_hr" value="-6.0" />
</parameterset>
<parameterset type="modeParams">
<param name="mode" value="pt"/>
</parameterset>

<parameterset type="activityParams">
<param name="activityType" value="home" /> <!-- home -->
<param name="priority" value="1" />
<param name="typicalDuration" value="12:00:00" />
<param name="minimalDuration" value="08:00:00" />
</parameterset>
<parameterset type="activityParams">
<param name="activityType" value="work" /> <!-- work -->
<param name="priority" value="1" />
<param name="typicalDuration" value="08:00:00" />
<param name="minimalDuration" value="06:00:00" />
<param name="openingTime" value="07:00:00" />
<param name="latestStartTime" value="09:00:00" />
<param name="earliestEndTime" value="" />
<param name="closingTime" value="18:00:00" />
</parameterset>
</parameterset>
</module>

<module name="strategy">
<param name="maxAgentPlanMemorySize" value="5" /> <!-- 0 means unlimited -->

<parameterset type="strategysettings">
<param name="strategyName" value="BestScore"/>
<param name="weight" value="0.9"/>
</parameterset>

<parameterset type="strategysettings">
<param name="strategyName" value="ReRoute"/>
<param name="weight" value="0.1"/>
</parameterset>
</module>

</config>
55 changes: 55 additions & 0 deletions ees/scenarios/grid/ar-1b-pop.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE population SYSTEM "http://www.matsim.org/files/dtd/population_v6.dtd">

<population>

<person id="0">
<attributes>
<attribute name="Age" class="java.lang.String" >80</attribute>
<attribute name="AgentId" class="java.lang.String" >202021028P223</attribute>
<attribute name="Archetype" class="java.lang.String" >Considered.Evacuator</attribute>
<attribute name="Archetypes.Age" class="java.lang.String" >75 years +</attribute>
<attribute name="Archetypes.Household" class="java.lang.String" >Couple without dependents living at home</attribute>
<attribute name="BDIAgentType" class="java.lang.String" >io.github.agentsoz.ees.agents.archetype.ArchetypeAgent</attribute>
<attribute name="EZI_ADD" class="java.lang.String" >17 BUCKLEY STREET HARCOURT 3453</attribute>
<attribute name="EvacLocationPreference" class="java.lang.String" >FarFarAway,5000.0,0000.0</attribute>
<attribute name="Gender" class="java.lang.String" >Male</attribute>
<attribute name="Geographical.Coordinate" class="java.lang.String" >[144.2623, -36.9993]</attribute>
<attribute name="HasDependents" class="java.lang.String" >false</attribute>
<attribute name="HasDependentsAtLocation" class="java.lang.String" ></attribute>
<attribute name="HouseholdId" class="java.lang.String" >202021028H1439</attribute>
<attribute name="Id" class="java.lang.String" >3186</attribute>
<attribute name="ImpactFromFireDangerIndexRating" class="java.lang.String" >0.1</attribute>
<attribute name="ImpactFromImmersionInSmoke" class="java.lang.String" >0.4</attribute>
<attribute name="ImpactFromMessageAdvice" class="java.lang.String" >0.4</attribute>
<attribute name="ImpactFromMessageEmergencyWarning" class="java.lang.String" >0.6</attribute>
<attribute name="ImpactFromMessageEvacuateNow" class="java.lang.String" >0.7</attribute>
<attribute name="ImpactFromMessageRespondersAttending" class="java.lang.String" >0.2</attribute>
<attribute name="ImpactFromMessageWatchAndAct" class="java.lang.String" >0.5</attribute>
<attribute name="ImpactFromSocialMessage" class="java.lang.String" >0.5</attribute>
<attribute name="ImpactFromVisibleEmbers" class="java.lang.String" >0.5</attribute>
<attribute name="ImpactFromVisibleFire" class="java.lang.String" >0.6</attribute>
<attribute name="ImpactFromVisibleResponders" class="java.lang.String" >0.4</attribute>
<attribute name="ImpactFromVisibleSmoke" class="java.lang.String" >0.3</attribute>
<attribute name="InvacLocationPreference" class="java.lang.String" >NotSoFarAway,2500.0,2500.0</attribute>
<attribute name="LagTimeInMinsForFinalResponse" class="java.lang.String" >5.89</attribute>
<attribute name="LagTimeInMinsForInitialResponse" class="java.lang.String" >17.89</attribute>
<attribute name="PrimaryFamilyType" class="java.lang.String" >COUPLE_ONLY</attribute>
<attribute name="ResponseThresholdFinal" class="java.lang.String" >0.38</attribute>
<attribute name="ResponseThresholdInitial" class="java.lang.String" >-0.02</attribute>
<attribute name="SA1_7DIGCODE" class="java.lang.String" >2102819</attribute>
<attribute name="SA2_MAINCODE" class="java.lang.String" >202021028</attribute>
<attribute name="WillGoHomeAfterVisitingDependents" class="java.lang.String" >false</attribute>
<attribute name="WillGoHomeBeforeLeaving" class="java.lang.String" >false</attribute>
<attribute name="WillStay" class="java.lang.String" >false</attribute>
</attributes>
<plan selected="yes">
<activity type="home" x="0000.0" y="0000.0" end_time="01:00:00" />
<leg mode="van" />
<activity type="work" x="5000.0" y="5000.0" end_time="01:10:00" />
<leg mode="van" />
<activity type="home" x="0000.0" y="0000.0" />
</plan>
</person>

</population>
Loading

0 comments on commit 845573e

Please sign in to comment.