- java.lang.Object
-
- fr.inria.mochy.core.mochysim.Delay
-
public class Delay extends Object
Used for create temporary delays at specific station for a specific duration
-
-
Constructor Summary
Constructors Constructor Description Delay(float startDate, float endDate, int transitionNb, float delay)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float
getDelay()
get the value of the delayfloat
getEndDate()
get the end date the delay will be effectivefloat
getStartDate()
get the start date the delay will be effectiveint
getTransitionNb()
get the number of the transition on which the delay will be effectiveboolean
isValid()
used in RPN.RPNConfig.manageDelays() to check if the delay is valid depending on the current date and the start/end dates of the delayvoid
setDelay(float delay)
set the value of the delayvoid
setEndDate(float endDate)
set the end date the delay will be effectivevoid
setStartDate(float startDate)
set the start date the delay will be effectivevoid
setTransition(int transitionNb)
set the number of the transition on which the delay will be effectivevoid
setValid(boolean valid)
used in RPN.RPNConfig.manageDelays() to set a delay validity to false or true depending on the current date and the start/end dates of the delay, this prevent from adding the delay multiple times and help to remove it once the current date has overlapped the end date of the delay
-
-
-
Method Detail
-
getStartDate
public float getStartDate()
get the start date the delay will be effective
-
setStartDate
public void setStartDate(float startDate)
set the start date the delay will be effective
-
getEndDate
public float getEndDate()
get the end date the delay will be effective
-
setEndDate
public void setEndDate(float endDate)
set the end date the delay will be effective
-
getTransitionNb
public int getTransitionNb()
get the number of the transition on which the delay will be effective
-
setTransition
public void setTransition(int transitionNb)
set the number of the transition on which the delay will be effective
-
getDelay
public float getDelay()
get the value of the delay
-
setDelay
public void setDelay(float delay)
set the value of the delay
-
isValid
public boolean isValid()
used in RPN.RPNConfig.manageDelays() to check if the delay is valid depending on the current date and the start/end dates of the delay
-
setValid
public void setValid(boolean valid)
used in RPN.RPNConfig.manageDelays() to set a delay validity to false or true depending on the current date and the start/end dates of the delay, this prevent from adding the delay multiple times and help to remove it once the current date has overlapped the end date of the delay
-
-