Skip to content

Commit

Permalink
runclass writes iterations in config
Browse files Browse the repository at this point in the history
  • Loading branch information
tnoud committed Dec 16, 2023
1 parent c5136e4 commit df0b841
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/java/org/matsim/project/RunMatsim.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public static void main(String[] args) throws InterruptedException {
if (cadyts.equals("yesCadyts")) {
runWithCadyts(configPath, outputPath, scalefactor);
} else {
runWithoutCadyts(configPath, outputPath, scalefactor);
runWithoutCadyts(configPath, outputPath, scalefactor, iterations, freetext);
}
}

Expand Down Expand Up @@ -237,9 +237,13 @@ public void install() {
controler.run();
}

private static void runWithoutCadyts(String configPath, String outputPath, int scalefactor) {
private static void runWithoutCadyts(String configPath, String outputPath, int scalefactor, int iterations,
String freetext) {
final Config config = ConfigUtils.loadConfig(configPath, new SwissRailRaptorConfigGroup());

config.controler().setOutputDirectory(outputPath);
config.controler().setLastIteration(iterations);
config.controler().setRunId(freetext);

config.qsim().setNumberOfThreads(8);
config.global().setNumberOfThreads(8);
Expand Down

0 comments on commit df0b841

Please sign in to comment.