Skip to content

Commit

Permalink
debug changes to scale factors applied in slio and mito to the config…
Browse files Browse the repository at this point in the history
…uration of matsim
  • Loading branch information
cllorca1 committed Mar 22, 2022
1 parent 19c0df5 commit 4b5b73c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
schedule:
- cron: '0 1 * * 1'



jobs:
build:
runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void processRecord(String[] record) {
if(dataSet.getJobs().containsKey(workplace)) {
occupation = (dataSet.getJobs().get(workplace));
} else {
logger.warn("Person " + id + " declared as worker does not have a valid job!");
//logger.warn("Person " + id + " declared as worker does not have a valid job!");
}
break;
case STUDENT:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@

public class ConfigureMatsim {

private final static double SILO_SAMPLING_RATE = Resources.instance.getDouble(Properties.SP_SCALING_FACTOR, 1.0) *
Resources.instance.getDouble(Properties.SCALE_FACTOR_FOR_TRIP_GENERATION, 1.0);

public static Config configureMatsim() {



//String outputDirectory = outputDirectoryRoot + "/" + runId + "/";
//matsimConfig.controler().setRunId(runId);
//matsimConfig.controler().setOutputDirectory(outputDirectory);
Expand Down Expand Up @@ -116,8 +115,11 @@ public static Config configureMatsim() {
config.controler().setWriteEventsInterval(config.controler().getLastIteration());

config.qsim().setStuckTime(10);
config.qsim().setFlowCapFactor(SILO_SAMPLING_RATE * Double.parseDouble(Resources.instance.getString(Properties.TRIP_SCALING_FACTOR)));
config.qsim().setStorageCapFactor(SILO_SAMPLING_RATE * Double.parseDouble(Resources.instance.getString(Properties.TRIP_SCALING_FACTOR)));

double siloSamplingFactor = Resources.instance.getDouble(Properties.SP_SCALING_FACTOR, 1.0) *
Resources.instance.getDouble(Properties.SCALE_FACTOR_FOR_TRIP_GENERATION, 1.0);
config.qsim().setFlowCapFactor(siloSamplingFactor * Double.parseDouble(Resources.instance.getString(Properties.TRIP_SCALING_FACTOR)));
config.qsim().setStorageCapFactor(siloSamplingFactor * Double.parseDouble(Resources.instance.getString(Properties.TRIP_SCALING_FACTOR)));


String[] networkModes = Resources.instance.getArray(Properties.MATSIM_NETWORK_MODES, new String[]{"autoDriver"});
Expand All @@ -135,9 +137,14 @@ public static Config configureMatsim() {
return config;
}



public static void setDemandSpecificConfigSettings(Config config) {
config.qsim().setFlowCapFactor(SILO_SAMPLING_RATE * Double.parseDouble(Resources.instance.getString(Properties.TRIP_SCALING_FACTOR)));
config.qsim().setStorageCapFactor(SILO_SAMPLING_RATE * Double.parseDouble(Resources.instance.getString(Properties.TRIP_SCALING_FACTOR)));

double siloSamplingFactor = Resources.instance.getDouble(Properties.SP_SCALING_FACTOR, 1.0) *
Resources.instance.getDouble(Properties.SCALE_FACTOR_FOR_TRIP_GENERATION, 1.0);
config.qsim().setFlowCapFactor(siloSamplingFactor * Double.parseDouble(Resources.instance.getString(Properties.TRIP_SCALING_FACTOR)));
config.qsim().setStorageCapFactor(siloSamplingFactor * Double.parseDouble(Resources.instance.getString(Properties.TRIP_SCALING_FACTOR)));

PlanCalcScoreConfigGroup.ActivityParams homeActivity = new PlanCalcScoreConfigGroup.ActivityParams("home");
homeActivity.setTypicalDuration(12 * 60 * 60);
Expand Down

0 comments on commit 4b5b73c

Please sign in to comment.