Skip to content

Commit

Permalink
build: move to MATSim 2024.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dhixsingh committed May 25, 2024
1 parent d3b1911 commit 9bccca2
Show file tree
Hide file tree
Showing 17 changed files with 80 additions and 75 deletions.
35 changes: 23 additions & 12 deletions ees/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,29 @@
</profile>
</profiles>

<!-- DS 24/05/24: All these repositories are required for finding MATSim dependencies -->
<repositories>
<repository>
<!-- Geotools is not on Maven central -->
<id>osgeo</id>
<name>Geotools repository</name>
<url>https://repo.osgeo.org/repository/release</url>
</repository>
<repository>
<id>matsim</id>
<url>https://repo.matsim.org/repository/matsim</url>
</repository>
<repository>
<id>jogl</id>
<url>https://jogamp.org/deployment/maven/</url>
</repository>
<repository>
<id>topobyte</id>
<url>https://mvn.topobyte.de</url>
</repository>
<repository>
<id>slimjars</id>
<url>https://mvn.slimjars.com</url>
</repository>
</repositories>

<dependencies>
Expand All @@ -98,6 +114,12 @@
<groupId>io.github.agentsoz</groupId>
<artifactId>bdi-matsim</artifactId>
<version>3.0.1-SNAPSHOT</version>
<exclusions>
<exclusion>
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.github.agentsoz</groupId>
Expand Down Expand Up @@ -133,17 +155,6 @@
<version>4.13.1</version>
<!--<scope>test</scope>-->
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>5.1.0</version>
</dependency>
<!-- for easy CSV parsing -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>1.6</version>
</dependency>
<!-- for easy EPSG transforms -->
<dependency>
<groupId>org.geotools</groupId>
Expand Down
12 changes: 6 additions & 6 deletions ees/scenarios/grid/ar-1a-mat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@
<param name="inputPlansFile" value="ar-1a-pop.xml" />
</module>

<module name="controler">
<module name="controller">
<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 name="controller">
<param name= "routingAlgorithmType" value="AStarLandmarks" />
</module>

<module name="qsim">
Expand All @@ -63,9 +63,9 @@

</module>

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

<parameterset type="scoringParameters">
<param name="lateArrival" value="-18" />
Expand Down Expand Up @@ -100,7 +100,7 @@
</parameterset>
</module>

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

<parameterset type="strategysettings">
Expand Down
12 changes: 6 additions & 6 deletions ees/scenarios/grid/ar-2a-mat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@
<param name="inputPlansFile" value="ar-2a-pop.xml" />
</module>

<module name="controler">
<module name="controller">
<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 name="controller">
<param name= "routingAlgorithmType" value="AStarLandmarks" />
</module>

<module name="qsim">
Expand All @@ -63,9 +63,9 @@

</module>

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

<parameterset type="scoringParameters">
<param name="lateArrival" value="-18" />
Expand Down Expand Up @@ -100,7 +100,7 @@
</parameterset>
</module>

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

<parameterset type="strategysettings">
Expand Down
5 changes: 0 additions & 5 deletions ees/scenarios/grid/ar-2a-pop.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@

<population>

<attributes>
<attribute name="coordinateReferenceSystem" class="java.lang.String">Atlantis</attribute>
</attributes>


<!-- ====================================================================== -->

<person id="0">
Expand Down
14 changes: 7 additions & 7 deletions ees/scenarios/grid/ar-congestion-mat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@
<param name="inputPlansFile" value="ar-20a-pop.xml" />
</module>

<module name="controler">
<module name="controller">
<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 name="controller">
<param name= "routingAlgorithmType" value="AStarLandmarks" />
</module>

<module name="qsim">
Expand All @@ -65,17 +65,17 @@
<param name = "numberOfThreads" value="4"/>
</module>

<module name="parallelEventHandling">
<module name="eventsManager">
<param name="estimatedNumberOfEvents" value="null" />
<!-- Null means let matsim decide -->
<param name="numberOfThreads" value="null" />
<!-- each handler will be assigned to a thread if enabled -->
<param name="oneThreadPerHandler" value="false" />
</module>

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

<parameterset type="scoringParameters">
<param name="lateArrival" value="-18" />
Expand Down Expand Up @@ -110,7 +110,7 @@
</parameterset>
</module>

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

<parameterset type="strategysettings">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@
<param name="inputPlansFile" value="matsim_plans.xml" />
</module>

<module name="controler">
<module name="controller">
<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 name="controller">
<param name= "routingAlgorithmType" value="AStarLandmarks" />
</module>

<module name="qsim">
Expand All @@ -68,9 +68,9 @@

</module>

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

<parameterset type="scoringParameters">
<param name="lateArrival" value="-18" />
Expand Down Expand Up @@ -105,7 +105,7 @@
</parameterset>
</module>

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

<parameterset type="strategysettings">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@
<param name="inputPlansFile" value="matsim_plans.xml" />
</module>

<module name="controler">
<module name="controller">
<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 name="controller">
<param name= "routingAlgorithmType" value="AStarLandmarks" />
</module>

<module name="qsim">
Expand All @@ -63,9 +63,9 @@

</module>

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

<parameterset type="scoringParameters">
<param name="lateArrival" value="-18" />
Expand Down Expand Up @@ -100,7 +100,7 @@
</parameterset>
</module>

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

<parameterset type="strategysettings">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@
<param name="inputPlansFile" value="scenario_matsim_plans_reduced.xml" />
</module>

<module name="controler">
<module name="controller">
<param name="outputDirectory" value="scenario_matsim_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 name="controller">
<param name= "routingAlgorithmType" value="AStarLandmarks" />
</module>

<module name="qsim">
Expand All @@ -63,9 +63,9 @@

</module>

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

<parameterset type="scoringParameters">
<param name="lateArrival" value="-18" />
Expand Down Expand Up @@ -100,7 +100,7 @@
</parameterset>
</module>

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

<parameterset type="strategysettings">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@
<param name="inputPlansFile" value="scenario_matsim_plans_10.xml" />
</module>

<module name="controler">
<module name="controller">
<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 name="controller">
<param name= "routingAlgorithmType" value="AStarLandmarks" />
</module>

<module name="qsim">
Expand All @@ -63,9 +63,9 @@

</module>

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

<parameterset type="scoringParameters">
<param name="lateArrival" value="-18" />
Expand Down Expand Up @@ -101,7 +101,7 @@
</module>


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

<parameterset type="strategysettings">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class DisruptionWriter {
}
void write(double time, Id<Link> linkId, Coord coord, double speed ) {
if (writer == null) {
final String filename = config.controler().getOutputDirectory() + "/output_disruptionCoords.txt.gz";
final String filename = config.controller().getOutputDirectory() + "/output_disruptionCoords.txt.gz";
log.warn("writing disruption data to " + filename);
try {
writer = IOUtils.getPrintStream(new File(filename).toURI().toURL());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@
import org.matsim.withinday.utils.EditTrips;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.inject.Inject;
import com.google.inject.Inject;

class EvacAgent implements MobsimDriverAgent, HasPerson, PlanAgent, HasModifiablePlan {

Expand Down
Loading

0 comments on commit 9bccca2

Please sign in to comment.