- java.lang.Object
-
- fr.inria.mochy.core.abstractClass.TransitionAbstract
-
- fr.inria.mochy.core.equalization.EquTransition
-
- Direct Known Subclasses:
EquTransitionStopsLoic
public class EquTransition extends TransitionAbstract
an EquTransition is a point of control which will define the evolution of a token in the next place, it manages the time a token will stay at the previous place
-
-
Field Summary
-
Fields inherited from class fr.inria.mochy.core.abstractClass.TransitionAbstract
clock, lowerBound, max, name, number, upperBound
-
-
Constructor Summary
Constructors Constructor Description EquTransition(int number, String name, float lowerbound, Float upperbound)
instantiate the EquTransition
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addControlPre(EquPlace pre)
add a previous control place to this transitionvoid
addPost(EquPlace post)
add a next place to this transitionvoid
addPre(EquPlace pre)
add a previous place to this transitionboolean
controlAllowsFiring()
true if all places in the list of control places contain at least one tokenArrayList<EquPlace>
getControlPre()
return the list of the previous control places immediately linked to this transitionfloat
getNormalTime()
get the normal time of the transition, the average between the lowerbound and the upperboundArrayList<EquPlace>
getPost()
return the list of the next places immediately linked to this transitionArrayList<EquPlace>
getPre()
return the list of the previous places immediately linked to this transitionint
getWeibullCoef()
get the weibull coefficient of the weibull probability lawboolean
isGaussian()
return true if the clock of this transition follow a gaussian probability lawboolean
isWeibull()
check if this transition follows a weibull probability lawfloat
sample(Sampler s)
samples a value for current transition depending of the probability law (uniform, gaussian, weibull...)void
setGaussian(boolean b)
sets the Gaussian probability law of the transitionvoid
setWeibull(boolean b)
sets the weibul characterisitcs of distribution to true/falsevoid
setWeibullCoef(int coef)
set the weibull coefficient of the weibull probability law-
Methods inherited from class fr.inria.mochy.core.abstractClass.TransitionAbstract
addLinkedEvent, getClock, getLinkedEvents, getLowerBound, getMax, getName, getNumber, getUpperBound, setClock, setClock, setLowerBound, setUpperBound, tokensTimeToFire
-
-
-
-
Method Detail
-
addPre
public void addPre(EquPlace pre)
add a previous place to this transition
-
addControlPre
public void addControlPre(EquPlace pre)
add a previous control place to this transition
-
addPost
public void addPost(EquPlace post)
add a next place to this transition
-
getPre
public ArrayList<EquPlace> getPre()
Description copied from class:TransitionAbstract
return the list of the previous places immediately linked to this transition- Specified by:
getPre
in classTransitionAbstract
-
getPost
public ArrayList<EquPlace> getPost()
Description copied from class:TransitionAbstract
return the list of the next places immediately linked to this transition- Specified by:
getPost
in classTransitionAbstract
-
getControlPre
public ArrayList<EquPlace> getControlPre()
Description copied from class:TransitionAbstract
return the list of the previous control places immediately linked to this transition- Specified by:
getControlPre
in classTransitionAbstract
-
isGaussian
public boolean isGaussian()
return true if the clock of this transition follow a gaussian probability law
-
setGaussian
public void setGaussian(boolean b)
sets the Gaussian probability law of the transition- Parameters:
b
-
-
isWeibull
public boolean isWeibull()
check if this transition follows a weibull probability law
-
getWeibullCoef
public int getWeibullCoef()
get the weibull coefficient of the weibull probability law
-
setWeibullCoef
public void setWeibullCoef(int coef)
set the weibull coefficient of the weibull probability law
-
setWeibull
public void setWeibull(boolean b)
sets the weibul characterisitcs of distribution to true/false- Parameters:
b
-
-
sample
public float sample(Sampler s)
samples a value for current transition depending of the probability law (uniform, gaussian, weibull...)
-
controlAllowsFiring
public boolean controlAllowsFiring()
true if all places in the list of control places contain at least one token- Returns:
-
getNormalTime
public float getNormalTime()
get the normal time of the transition, the average between the lowerbound and the upperbound
-
-