Commit 869c57b7 authored by Sebastian Hörl's avatar Sebastian Hörl
Browse files

add config option for shape file

parent 87065bf1
......@@ -120,10 +120,12 @@ public class RunASTRA2018002 {
// Start set up Amodeus
SharedAVConfigGroup sharedConfig = (SharedAVConfigGroup) config.getModules().get(SharedAVConfigGroup.GROUP_NAME);
File workingDirectory = MultiFileTools.getDefaultWorkingDirectory();
ScenarioOptions scenarioOptions = new ScenarioOptions(workingDirectory, ScenarioOptionsBase.getDefault());
scenarioOptions.setProperty("shapeFile", "/home/shoerl/astra18/gis/sa_virtual_network.shp");
scenarioOptions.setProperty("shapeFile", sharedConfig.getVirtualNetworkShapeFile());
controller.addOverridingModule(new AmodeusModule());
controller.addOverridingModule(new AmodeusDispatcherModule());
......
......@@ -37,6 +37,7 @@ public class SharedAVConfigGroup extends ReflectiveConfigGroup {
private final static String FIXED_TAXI_PRICE_PER_KM = "fixedTaxiPricePerKm";
private final static String POOLING_DISPATCHER = "poolingDispatcher";
private final static String VIRTUAL_NETWORK_SHAPE_FILE = "virtualNetworkShapeFile";
private boolean useSharedAVs = false;
private boolean useCostCalculator = false;
......@@ -70,6 +71,7 @@ public class SharedAVConfigGroup extends ReflectiveConfigGroup {
private double fixedTaxiPricePerKm = Double.NaN;
private String poolingDispatcher = "ASTRASharingDispatcher";
private String virtualNetworkShapeFile = "";
public SharedAVConfigGroup() {
super(GROUP_NAME);
......@@ -314,4 +316,14 @@ public class SharedAVConfigGroup extends ReflectiveConfigGroup {
public void setPoolingDispatcher(String poolingDispatcher) {
this.poolingDispatcher = poolingDispatcher;
}
@StringGetter(VIRTUAL_NETWORK_SHAPE_FILE)
public String getVirtualNetworkShapeFile() {
return virtualNetworkShapeFile;
}
@StringSetter(VIRTUAL_NETWORK_SHAPE_FILE)
public void setVirtualNetworkShapeFile(String virtualNetworkShapeFile) {
this.virtualNetworkShapeFile = virtualNetworkShapeFile;
}
}
Supports Markdown
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