Package eu.simuline.relana.model
Class FlatCInstance
- java.lang.Object
-
- eu.simuline.relana.model.FlatCInstance
-
public final class FlatCInstance extends Object
Instance of Component. Created: Thu Apr 14 23:02:05 2005- Version:
- 1.0
- Author:
- Ernst Reissner
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classFlatCInstance.InstDefA container comprising anSInstanceand of one of its minimalDeficiencys.
-
Constructor Summary
Constructors Constructor Description FlatCInstance(Map<List<String>,SInstance> effects)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FlatCInstanceadd(SInstance serv, Deficiency def)Returns theFlatCInstancearising from this one by assuming thatdefoccurs withinserv.SInstancegetEffect(InstanceLocator loc)SInstancegetEffect(List<String> path)(package private) Map<List<String>,SInstance>getEffects()BigDecimalgetProb(List<String> sPath)Returns the probability that the effect specified bysPathis not the empty set.private FlatCInstance.InstDefinstDefic(SInstance serv)Maps the given effect which is given by a formula, onto anFlatCInstance.InstDefconsisting of a variable with probability distribution occuring in the formula and its minimal deficiency.FlatCInstanceremove(SInstance serv, Deficiency def)Returns theFlatCInstancearising from this one by assuming thatdefdoes not occur withinserv.(package private) FlatCInstancesubstitute(SInstance serv, Formula form)Returns theFlatCInstancearising from this one by substitutingservbyformin all effects.StringtoString()
-
-
-
Method Detail
-
getEffect
public SInstance getEffect(InstanceLocator loc)
-
remove
public FlatCInstance remove(SInstance serv, Deficiency def)
Returns theFlatCInstancearising from this one by assuming thatdefdoes not occur withinserv.- Parameters:
serv- aSInstancewith probability distribution.serv.distr != null.def- aDeficiencyminimal within the type ofserv. **** is this unique or not? ****- Returns:
- a
FlatCInstancearising from this one by assuming thatdefdoes not occur withinserv.
-
add
public FlatCInstance add(SInstance serv, Deficiency def)
Returns theFlatCInstancearising from this one by assuming thatdefoccurs withinserv.- Parameters:
serv- aSInstancewith probability distribution.serv.distr != null.def- aDeficiencyminimal within the type ofserv. **** is this unique or not? ****- Returns:
- a
FlatCInstancearising from this one by assuming thatdefoccurs withinserv.
-
substitute
FlatCInstance substitute(SInstance serv, Formula form)
Returns theFlatCInstancearising from this one by substitutingservbyformin all effects.- Parameters:
serv- aSInstance.form- aFormulaof appropriate type. ****- Returns:
- a
FlatCInstancearising from this one by substitutingservbyformin all effects usingSInstance.substitute(eu.simuline.relana.model.SInstance, eu.simuline.relana.expressions.Formula).
-
instDefic
private FlatCInstance.InstDef instDefic(SInstance serv)
Maps the given effect which is given by a formula, onto anFlatCInstance.InstDefconsisting of a variable with probability distribution occuring in the formula and its minimal deficiency. If no such variable exists, the variables within the formula (which are then all associated with formulae) are substituted within the root formula, by their associated formulae.- Parameters:
serv- anSInstancegiven by a formula. **** what if no formula is present? ****- Returns:
- an
InstDefconsisting of a variable occuring in the formula and its minimal deficiency. If this does not exist,nullis returned.
-
getProb
public BigDecimal getProb(List<String> sPath)
Returns the probability that the effect specified bysPathis not the empty set. It is intended to be applied primarily to Boolean effects, i.e. to effects isomorphic to Boolean ones, i.e. to one-point effects. Then this method returns the probability fortrue.- Parameters:
sPath- identifies a effect.- Returns:
- the probability described above as a
BigDecimalvalue.
-
-