Skip to content

Commit

Permalink
add some todos
Browse files Browse the repository at this point in the history
  • Loading branch information
simei94 committed Aug 29, 2024
1 parent 1fbd817 commit c47677e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/main/java/org/matsim/run/RunLausitzDrtScenario.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,14 @@
import picocli.CommandLine;

import javax.annotation.Nullable;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import java.util.*;

/**
* Run the Lausitz scenario including a regional DRT service.
* All necessary configs will be made in this class.
*/
public final class RunLausitzDrtScenario extends MATSimApplication {
// TODO: upload correct service area shp file to git
@CommandLine.Option(names = "--drt-shp", description = "Path to shp file for adding drt not network links as an allowed mode.", defaultValue = "./input/shp/lausitz.shp")
private String drtAreaShp;

Expand Down Expand Up @@ -88,8 +87,6 @@ protected Config prepareConfig(Config config) {
DvrpConfigGroup dvrpConfigGroup = ConfigUtils.addOrGetModule(config, DvrpConfigGroup.class);
dvrpConfigGroup.networkModes = Set.of(TransportMode.drt);



MultiModeDrtConfigGroup multiModeDrtConfigGroup = ConfigUtils.addOrGetModule(config, MultiModeDrtConfigGroup.class);

if (multiModeDrtConfigGroup.getModalElements().isEmpty()) {
Expand Down Expand Up @@ -130,7 +127,7 @@ protected Config prepareConfig(Config config) {

SubtourModeChoiceConfigGroup smc = ConfigUtils.addOrGetModule(config, SubtourModeChoiceConfigGroup.class);

if (String.join(",", smc.getModes()).contains(TransportMode.drt)) {
if (!String.join(",", smc.getModes()).contains(TransportMode.drt)) {
String[] modes = Arrays.copyOf(smc.getModes(), smc.getModes().length + 1);
modes[modes.length - 1] = TransportMode.drt;

Expand Down
3 changes: 3 additions & 0 deletions src/test/java/org/matsim/run/RunIntegrationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ void runScenario() {

@Test
void runScenarioIncludingDrt() {

// TODO: add dummy drt person.
// TODO: test smc with drt. THere has to be some person changing to drt before iteration1
Config config = ConfigUtils.loadConfig(String.format("input/v%s/lausitz-v%s-10pct.config.xml", LausitzScenario.VERSION, LausitzScenario.VERSION));
ConfigUtils.addOrGetModule(config, SimWrapperConfigGroup.class).defaultDashboards = SimWrapperConfigGroup.Mode.disabled;

Expand Down

0 comments on commit c47677e

Please sign in to comment.