|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgenerator.data.RandomizedModel
public class RandomizedModel
Randomized Model
Randomized Model is a class that contains the actual parameters from which the model will be generated. All parameters are verified to avoid creation of an impossible system. You can also apply and set templates.System parameters:
X the starting intervals set
Y the ending intervals set
A the possible actions set
T the transitions from x (member of x) to y (member of y) set
P probability of ineffectiveness of an action
Copyright(c) 2005 Université Laval, LSFM research group.
Field Summary | |
---|---|
static java.lang.String |
EXPONENTIAL
Represents an exponential law distribution function |
static java.lang.String |
LOGARITHMIC
Represents a logarithmic law distribution function |
static java.lang.String |
NORMAL
Represents a centered reduced normal law distribution function |
static java.lang.String |
POINT
Represents a uniform law distribution function depending on y only. |
static java.lang.String |
UNIFORM
Represents an uniform distribution function |
Constructor Summary | |
---|---|
RandomizedModel()
Basic constructor ... use the default parameters |
|
RandomizedModel(IntervalNoUnion numberOfIntervals,
IntervalNoUnion numberOfActions,
IntervalNoUnion TvsX,
IntervalNoUnion AvsX,
IntervalNoUnion P)
Initialization constructor ... |
|
RandomizedModel(RandomizedModel modelToCopy)
Copy constructor ... duplicate values from the specified existing randomizedModel. |
Method Summary | |
---|---|
void |
addFunctions(java.lang.String function)
Adds a function type to the list of possible functions type. |
void |
addTemplate(java.lang.String nameOfTemplate,
IntervalNoUnion numberOfIntervals,
IntervalNoUnion numberOfActions,
IntervalNoUnion TvsX,
IntervalNoUnion AvsX,
IntervalNoUnion P)
Add a template to the RandomizeModel. |
void |
addTemplate(java.lang.String nameOfTemplate,
RandomizedModel modelToCopy)
Add a template from a previously created model |
boolean |
canHaveCycle()
Returns true if the system mustn't contain any cycle |
Interval |
estimateNumberOfTransitions()
Estimates the number of transitions contained in the model |
int |
getAA()
Obtains an integer representing the number of actions chosen among the A set from which the transitions will be generated for an interval x |
java.lang.String |
getAFunction()
Fetch a function type among the valid function types list |
int |
getANumberOfActions()
Obtains an integer representing the number of actions to be generated |
int |
getANumberOfIntervals()
Obtains a valid integer represeneting a number of intervals from the number of intervals parameter |
double |
getAP()
Obtains a P probability of action ineffectiveness for an interval x |
int |
getAT()
Obtains an integer representing the number of actions per interval to be generated |
IntervalNoUnion |
getAvsX()
Returns the number of actions for each interval x from X |
IntervalNoUnion |
getNumberOfActions()
Returns the number of actions to generate in the A set |
IntervalNoUnion |
getNumberOfIntervals()
Returns a valid number of intervals to generate |
IntervalNoUnion |
getP()
Returns P |
IntervalNoUnion |
getTvsX()
Returns the number of transitions per interval x from X |
boolean |
isFunctionSelected(java.lang.String function)
Test wether a function type is present in the list or not |
void |
removeFunction(java.lang.String function)
Remove a function type from the function type list |
void |
reset()
Resets the parameters of the RandomizedModel to the default ones. |
void |
resetFunctions()
Enable all possible functions in the RandomizedModel. |
void |
setAvsX(IntervalNoUnion i)
Sets the number of actions per interval |
void |
setNoCycle(boolean noCycle)
Specify if the system should contain cycles |
void |
setNumberOfActions(IntervalNoUnion i)
Sets the number of actions in the A set |
void |
setNumberOfIntervals(IntervalNoUnion i)
Sets the number of intervals to be generated |
void |
setP(IntervalNoUnion i)
Sets P, the probability of ineffectiveness of an action |
void |
setTemplate(java.lang.String nameOfTemplate)
Applies a template to the current model replacing all values |
void |
setTvsX(IntervalNoUnion i)
Sets the number of transitions per interval x in X |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String UNIFORM
public static final java.lang.String NORMAL
public static final java.lang.String EXPONENTIAL
public static final java.lang.String LOGARITHMIC
public static final java.lang.String POINT
Constructor Detail |
---|
public RandomizedModel()
public RandomizedModel(IntervalNoUnion numberOfIntervals, IntervalNoUnion numberOfActions, IntervalNoUnion TvsX, IntervalNoUnion AvsX, IntervalNoUnion P) throws ParameterException
System parameters:
X the starting intervals set
Y the ending intervals set
A the possible actions set
T the transitions from x (member of x) to y (member of y) set
P probability of ineffectiveness of an action
numberOfIntervals
- number of intervals to generate (in X and Y)numberOfActions
- the number of intervals to generateTvsX
- the number of transitions to generate for each x in XAvsX
- the number of actions to choose from A for each x in XP
- the probability of ineffectiveness of an action
ParameterException
- if invalid parameters have been specifiedpublic RandomizedModel(RandomizedModel modelToCopy)
modelToCopy
- the model from which the parameters will be copiedMethod Detail |
---|
public IntervalNoUnion getNumberOfIntervals()
public IntervalNoUnion getNumberOfActions()
public IntervalNoUnion getTvsX()
public IntervalNoUnion getAvsX()
public IntervalNoUnion getP()
public void reset()
public void resetFunctions()
public void addFunctions(java.lang.String function)
function
- Stringpublic void removeFunction(java.lang.String function)
function
- the function type to removepublic java.lang.String getAFunction()
public boolean isFunctionSelected(java.lang.String function)
function
- a function type to test
public void setNumberOfIntervals(IntervalNoUnion i) throws ParameterException
i
- an interval of values possible for the number of intervals to be generated
ParameterException
- should the constraints be violatedverifyConstraints()
public void setTvsX(IntervalNoUnion i) throws ParameterException
i
- the number of transitions per interval
ParameterException
- if the new value violates the constraintsverifyConstraints()
public void setAvsX(IntervalNoUnion i) throws ParameterException
i
- : the number of actions chosen among the A set per interval
ParameterException
- should the constraints be violatedverifyConstraints()
public void setNumberOfActions(IntervalNoUnion i) throws ParameterException
i
- the number of actions in the a set
ParameterException
- should any constraint be violatedverifyConstraints()
public void setP(IntervalNoUnion i) throws ParameterException
i
- the probability of ineffectiveness of an action
ParameterException
- should any constraint be violatedpublic void setNoCycle(boolean noCycle)
noCycle
- determines if the system can have cyclespublic boolean canHaveCycle()
public void addTemplate(java.lang.String nameOfTemplate, IntervalNoUnion numberOfIntervals, IntervalNoUnion numberOfActions, IntervalNoUnion TvsX, IntervalNoUnion AvsX, IntervalNoUnion P) throws ParameterException
nameOfTemplate
- name of the templatenumberOfIntervals
- the number of intervals in the X and Y setsnumberOfActions
- the number of actions in the A setTvsX
- the number of transitions per intervalAvsX
- the number of actions chosen from the A set per intervalP
- the probability of ineffectiveness of an action
ParameterException
- should any of the constraints be violatedverifyConstraints()
public void addTemplate(java.lang.String nameOfTemplate, RandomizedModel modelToCopy)
nameOfTemplate
- a name identifying the templatemodelToCopy
- a previously created modelpublic void setTemplate(java.lang.String nameOfTemplate) throws ParameterException
nameOfTemplate
- the name of the template to load
ParameterException
- if the template with the specified name does not exist
ParameterException
- if the specified model violates constraintsverifyConstraints()
public int getANumberOfIntervals()
public int getANumberOfActions()
public int getAT()
public int getAA()
public double getAP()
public Interval estimateNumberOfTransitions()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |