To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 7b575d4a authored by Sebastian Hörl's avatar Sebastian Hörl
Browse files

Add command line utility

parent 46c66c6d
......@@ -41,22 +41,26 @@ import ch.ethz.matsim.projects.astra.av.waiting_time.kernel.KernelWaitingTimeCal
import ch.ethz.matsim.projects.astra.av.waiting_time.zonal.ZonalWaitingTimeCalculatorConfigGroup;
import ch.ethz.matsim.projects.astra.config.ASTRAConfigGroup;
import ch.ethz.matsim.projects.astra.mode_choice.ASTRAModeChoiceModule;
import ch.ethz.matsim.projects.astra.run.CommandLineConfigurator;
import ch.ethz.matsim.projects.astra.scoring.ASTRAScoringModule;
import ch.ethz.matsim.projects.astra.traffic.ASTRATrafficModule;
public class RunScenario {
static public void main(String[] args) {
CommandLineConfigurator cmd = new CommandLineConfigurator(args);
ASTRAConfigGroup astraConfig = new ASTRAConfigGroup();
AVPriceCalculationConfigGroup pricingConfig = new AVPriceCalculationConfigGroup();
AVWaitingTimeCalculatorConfigGroup waitingTimeConfig = new AVWaitingTimeCalculatorConfigGroup();
Config config = ConfigUtils.loadConfig(args[0], astraConfig, new DvrpConfigGroup(), pricingConfig,
new AVWaitingTimeCalculatorConfigGroup(), new KernelWaitingTimeCalculatorConfigGroup(),
Config config = ConfigUtils.loadConfig(cmd.getArguments().get(0), astraConfig, new DvrpConfigGroup(),
pricingConfig, new AVWaitingTimeCalculatorConfigGroup(), new KernelWaitingTimeCalculatorConfigGroup(),
new ZonalWaitingTimeCalculatorConfigGroup(), new AVConfigGroup());
cmd.apply(config);
double flowEfficiencyFactor = Double.parseDouble(args[1]);
long numberOfVehicles = Long.parseLong(args[2]);
String shapeFile = args.length > 3 ? args[3] : null;
double flowEfficiencyFactor = Double.parseDouble(cmd.getArguments().get(1));
long numberOfVehicles = Long.parseLong(cmd.getArguments().get(2));
String shapeFile = cmd.getArguments().size() > 3 ? cmd.getArguments().get(3) : null;
astraConfig.setBaseline(true);
pricingConfig.setMode(AVPriceCalculationMode.FIXED);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment