Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump MATSim to 2024.0 #201

Merged
merged 3 commits into from
Apr 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading