Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/6.x' into 6.x
Browse files Browse the repository at this point in the history
  • Loading branch information
rakow committed Aug 7, 2024
2 parents b28dccd + 342221b commit cff5d44
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/org/matsim/run/OpenBerlinScenario.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ protected void prepareControler(Controler controler) {

controler.addOverridingModule(new TravelTimeBinding());

// AdvancedScoring is specific to matsim-berlin!
if (ConfigUtils.hasModule(controler.getConfig(), AdvancedScoringConfigGroup.class)) {
controler.addOverridingModule(new AdvancedScoringModule());
}
Expand Down
20 changes: 20 additions & 0 deletions src/main/java/org/matsim/run/RunOpenBerlinScenario.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,26 @@ private RunOpenBerlinScenario() {

public static void main(String[] args) {
MATSimApplication.runWithDefaults(OpenBerlinScenario.class, args);

// (I think that this will in the end just do MATSimApplication.run( OpenBerlinScenario.class, args ). kai, aug'24)

// (That "run" will instantiate an instance of OpenBerlinScenario (*), then do some args consistency checking, then call the piccoli execute method. kai, aug'24)

// (The piccoli execute method will essentially call the "call" method of MATSimApplication. kai, aug'24)

// (I think that in this execution path, this.config in that call method will be null. (The ctor of MATSimApplication was called via reflection at (*); I think that it was called without a config argument.)
// This then does:
// * getCustomModules() (which is empty by default but can be overriden)
// * ConfigUtils.loadConfig(...) _without_ passing on the args
// * prepareConfig(...) (which is empty by default but is typically overridden, in this case in OpenBerlinScenario). In our case, this sets the typical scoring params and the typical replanning strategies.
// * next one can override the config from some yaml file provided as a commandline option
// * next args is parsed and set
// * then some standard CL options are detected and set
// * then createScenario(config) is called (which can be overwritten but is not)
// * then prepareScenario(scenario) is called (which can be overwritten but is not)
// * then a standard controler is created from scenario
// * then prepareControler is called which can be overwritten

}

}

0 comments on commit cff5d44

Please sign in to comment.