Class EditorSettings
java.lang.Object
it.univr.di.cstnu.gui.EditorSettings
Mutable container of the options that govern how
EditorController runs its checking
commands. Every option that used to be a scattered field or a hard-coded constant in the old
editor (the old JUNG-based one) lives here, and only here.
In particular, the old editor used two different, inconsistent check timeouts: 1800 seconds
(CHECK_TIMEOUT_S, used by most CSTNU-family checks) and 2700 seconds (hard-coded in
oneStepCSTNU). This class exposes a single getCheckTimeoutSeconds(), defaulting
to DEFAULT_CHECK_TIMEOUT_S, used by every command that needs a timeout.
- Author:
- posenato
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault check timeout, in seconds: 1800 (30 minutes). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintbooleanbooleanvoidsetCheckTimeoutSeconds(int checkTimeoutSeconds1) voidsetContingentAlsoAsOrdinary(boolean contingentAlsoAsOrdinary1) voidsetCstnAlgorithm(AbstractCSTN.CheckAlgorithm cstnAlgorithm1) voidsetDcSemantics(AbstractCSTN.DCSemantics dcSemantics1) voidsetPropagateOnlyToZ(boolean propagateOnlyToZ1) voidsetReactionTime(int reactionTime1) voidsetStnAlgorithm(STN.CheckAlgorithm stnAlgorithm1) voidsetStnuAlgorithm(STNU.CheckAlgorithm stnuAlgorithm1)
-
Field Details
-
DEFAULT_CHECK_TIMEOUT_S
public static final int DEFAULT_CHECK_TIMEOUT_SDefault check timeout, in seconds: 1800 (30 minutes).- See Also:
-
-
Constructor Details
-
EditorSettings
public EditorSettings()
-
-
Method Details
-
getStnAlgorithm
- Returns:
- the checking algorithm for STN commands
-
setStnAlgorithm
- Parameters:
stnAlgorithm1- the checking algorithm for STN commands
-
getStnuAlgorithm
- Returns:
- the checking algorithm for STNU commands
-
setStnuAlgorithm
- Parameters:
stnuAlgorithm1- the checking algorithm for STNU commands
-
getCstnAlgorithm
- Returns:
- the checking algorithm for CSTN commands
-
setCstnAlgorithm
- Parameters:
cstnAlgorithm1- the checking algorithm for CSTN commands
-
getDcSemantics
- Returns:
- the dynamic-consistency semantics for CSTN commands
-
setDcSemantics
- Parameters:
dcSemantics1- the dynamic-consistency semantics for CSTN commands
-
getReactionTime
public int getReactionTime()- Returns:
- the reaction time used under ε semantics
-
setReactionTime
public void setReactionTime(int reactionTime1) - Parameters:
reactionTime1- the reaction time used under ε semantics- Throws:
IllegalArgumentException- ifreactionTime1is less than 1
-
isPropagateOnlyToZ
public boolean isPropagateOnlyToZ()- Returns:
- whether dynamic-controllability checks must propagate constraints only towards the zero time-point
-
setPropagateOnlyToZ
public void setPropagateOnlyToZ(boolean propagateOnlyToZ1) - Parameters:
propagateOnlyToZ1- whether dynamic-controllability checks must propagate constraints only towards the zero time-point
-
isContingentAlsoAsOrdinary
public boolean isContingentAlsoAsOrdinary()- Returns:
- whether a contingent link must also be represented as an ordinary constraint
-
setContingentAlsoAsOrdinary
public void setContingentAlsoAsOrdinary(boolean contingentAlsoAsOrdinary1) - Parameters:
contingentAlsoAsOrdinary1- whether a contingent link must also be represented as an ordinary constraint
-
getCheckTimeoutSeconds
public int getCheckTimeoutSeconds()- Returns:
- the check timeout, in seconds
-
setCheckTimeoutSeconds
public void setCheckTimeoutSeconds(int checkTimeoutSeconds1) - Parameters:
checkTimeoutSeconds1- the check timeout, in seconds- Throws:
IllegalArgumentException- ifcheckTimeoutSecondsis not positive
-