Skip to content

Commit

Permalink
add absolute path starting from config
Browse files Browse the repository at this point in the history
  • Loading branch information
simei94 committed Aug 8, 2024
1 parent a6d0ef8 commit c395ebc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/java/org/matsim/run/LausitzScenario.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
import playground.vsp.scoring.IncomeDependentUtilityOfMoneyPersonScoringParameters;

import javax.annotation.Nullable;
import java.net.URISyntaxException;
import java.nio.file.Paths;
import java.util.Set;

@CommandLine.Command(header = ":: Open Lausitz Scenario ::", version = LausitzScenario.VERSION, mixinStandardHelpOptions = true)
Expand Down Expand Up @@ -119,7 +121,11 @@ protected Config prepareConfig(Config config) {
ptFareConfigGroup.setPtFareCalculationModel(PtFareConfigGroup.PtFareCalculationModels.fareZoneBased);

DistanceBasedPtFareParams fareParams = ConfigUtils.addOrGetModule(config, DistanceBasedPtFareParams.class);
fareParams.setFareZoneShp("vvo_tarifzone20/vvo_tarifzone20_hoyerswerda_utm32n.shp");
try {
fareParams.setFareZoneShp(Paths.get(config.getContext().toURI()).getParent().toString() + "/vvo_tarifzone20/vvo_tarifzone20_hoyerswerda_utm32n.shp");
} catch (URISyntaxException e) {
throw new RuntimeException(e);
}

// TODO: recreate counts format with car and trucks

Expand Down

0 comments on commit c395ebc

Please sign in to comment.