Skip to content

Commit

Permalink
Merge branch 'master' into drt-est
Browse files Browse the repository at this point in the history
  • Loading branch information
rakow committed Dec 4, 2023
2 parents 20217bb + a0273f6 commit 43f06df
Showing 1 changed file with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import jakarta.validation.constraints.Positive;
import jakarta.validation.constraints.PositiveOrZero;
import java.util.*;
import java.util.stream.Collectors;

/**
* @author nagel
Expand Down Expand Up @@ -240,25 +241,26 @@ public final Map<String, String> getComments() {
public enum NodeTransition {
emptyBufferAfterBufferRandomDistribution_dontBlockNode,
emptyBufferAfterBufferRandomDistribution_nodeBlockedWhenSingleOutlinkFull,
moveVehByVehRandomDistribution_dontBlockNode,
moveVehByVehRandomDistribution_nodeBlockedWhenSingleOutlinkFull,
moveVehByVehRandomDistribution_dontBlockNode,
moveVehByVehRandomDistribution_nodeBlockedWhenSingleOutlinkFull,
moveVehByVehDeterministicPriorities_nodeBlockedWhenSingleOutlinkFull
/* note: moveVehByVehDeterministicPriorities is not implemented for the case when the node is not blocked
/* note: moveVehByVehDeterministicPriorities is not implemented for the case when the node is not blocked
* as soon as a single outlink is full
* theresa, jun'20
*/
}
private NodeTransition nodeTransitionLogic = NodeTransition.emptyBufferAfterBufferRandomDistribution_dontBlockNode;

// ---

public QSimConfigGroup() {
super(GROUP_NAME);
}

@StringSetter(MAIN_MODE)
private void setMainModes(String value) {
setMainModes(Arrays.asList(value.split(",")));
Set<String> modes = Arrays.stream(value.split(",")).map(String::trim).collect(Collectors.toSet());
setMainModes(modes);
}

@StringSetter(SNAPSHOT_PERIOD)
Expand Down Expand Up @@ -600,7 +602,8 @@ private String getSeepModesAsString() {

@StringSetter(SEEP_MODE)
private void setSeepModes(String value) {
setSeepModes(Arrays.asList(value.split(",")));
Set<String> modes = Arrays.stream(value.split(",")).map(String::trim).collect(Collectors.toSet());
setSeepModes(modes);
}

public Collection<String> getSeepModes() {
Expand Down Expand Up @@ -641,16 +644,16 @@ public boolean setUsingTravelTimeCheckInTeleportation( boolean val ) {
// yyyyyy this should better become a threshold number! kai, aug'16
return this.usingTravelTimeCheckInTeleportation = val ;
}

static final String PCU_THRESHOLD_FOR_FLOW_CAPACITY_EASING = //
"Flow capacity easing is activated for vehicles of size equal or smaller than the specified threshold. "
+ "Introduced to minimise the chances of buses being severely delayed in downsampled scenarios";


public double getPcuThresholdForFlowCapacityEasing() {
return pcuThresholdForFlowCapacityEasing;
}

/**
* @param pcuThresholdForFlowCapacityEasing -- {@value #PCU_THRESHOLD_FOR_FLOW_CAPACITY_EASING}
*/
Expand Down Expand Up @@ -685,5 +688,5 @@ public void setInflowCapacitySetting(InflowCapacitySetting inflowCapacitySetting
// // yyyy do we really need this switch? Quite in general, please try to avoid boolean switches. kai, may'18
// this.creatingVehiclesForAllNetworkModes = creatingVehiclesForAllNetworkModes;
// }

}

0 comments on commit 43f06df

Please sign in to comment.