Skip to content

Commit

Permalink
Bump MATSim from 15.0 to 2024.0 (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
marecabo authored Apr 20, 2024
1 parent fdfe40a commit fdc1bcd
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<dependency>
<groupId>org.matsim</groupId>
<artifactId>matsim</artifactId>
<version>15.0</version>
<version>2024.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import org.matsim.api.core.v01.network.Network;
import org.matsim.api.core.v01.network.Node;
import org.matsim.api.core.v01.population.Person;
import org.matsim.core.router.FastAStarEuclideanFactory;
import org.matsim.core.router.speedy.SpeedyALTFactory;
import org.matsim.core.router.util.LeastCostPathCalculator;
import org.matsim.core.router.util.TravelDisutility;
import org.matsim.core.router.util.TravelTime;
Expand Down Expand Up @@ -106,7 +106,8 @@ private void load() {
NetworkTools.cutNetwork(cutNetwork, nodesWithinBuffer);

ShapeRouter r = new ShapeRouter(shape);
pathCalculator = new PathCalculator(new FastAStarEuclideanFactory().createPathCalculator(cutNetwork, r, r));
pathCalculator = new PathCalculator(
new SpeedyALTFactory().createPathCalculator(cutNetwork, r, r));

pathCalculatorsByShape.put(shapeId, pathCalculator);
networksByShape.put(shapeId, cutNetwork);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.matsim.api.core.v01.network.Network;
import org.matsim.api.core.v01.network.Node;
import org.matsim.api.core.v01.population.Person;
import org.matsim.core.router.FastAStarLandmarksFactory;
import org.matsim.core.router.speedy.SpeedyALTFactory;
import org.matsim.core.router.util.LeastCostPathCalculator;
import org.matsim.core.router.util.LeastCostPathCalculatorFactory;
import org.matsim.core.router.util.TravelDisutility;
Expand Down Expand Up @@ -100,7 +100,7 @@ public ScheduleRoutersOsmAttributes(TransitSchedule schedule, Network network, M
*/
private void load() {
log.info("Initiating network and router for transit routes...");
LeastCostPathCalculatorFactory factory = new FastAStarLandmarksFactory(nThreads);
LeastCostPathCalculatorFactory factory = new SpeedyALTFactory();
for (TransitLine transitLine : schedule.getTransitLines().values()) {
for (TransitRoute transitRoute : transitLine.getRoutes().values()) {
String scheduleMode = transitRoute.getTransportMode();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import org.matsim.api.core.v01.network.Network;
import org.matsim.api.core.v01.network.Node;
import org.matsim.api.core.v01.population.Person;
import org.matsim.core.router.FastAStarLandmarksFactory;
import org.matsim.core.router.speedy.SpeedyALTFactory;
import org.matsim.core.router.util.LeastCostPathCalculator;
import org.matsim.core.router.util.LeastCostPathCalculatorFactory;
import org.matsim.core.router.util.TravelDisutility;
Expand Down Expand Up @@ -79,7 +79,7 @@ private void load() {
log.info("==============================================");
log.info("Creating network routers for transit routes...");
log.info("Initiating network and router for transit routes...");
LeastCostPathCalculatorFactory factory = new FastAStarLandmarksFactory(nThreads);
LeastCostPathCalculatorFactory factory = new SpeedyALTFactory();
for(TransitLine transitLine : schedule.getTransitLines().values()) {
for(TransitRoute transitRoute : transitLine.getRoutes().values()) {
String scheduleMode = transitRoute.getTransportMode();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class OsmFileReader extends MatsimXmlParser {
private ParsedRelation currentRelation = null;

public OsmFileReader(OsmData osmData) {
super();
super(ValidationType.DTD_OR_XSD);
this.osmData = osmData;
this.setValidating(false);
}
Expand Down

0 comments on commit fdc1bcd

Please sign in to comment.