data
Class ProbSystemMtbdd

java.lang.Object
  extended by data.ProbSystemMtbdd
All Implemented Interfaces:
ProbSystem, java.io.Serializable

public class ProbSystemMtbdd
extends java.lang.Object
implements ProbSystem, java.io.Serializable

ProbSystem MTBDD

This class represents a probabilistic system constructed using MTBDD data structures. A probabilistic system must respect the following constraints :

Copyright(c) 2005 Université Laval, LSFM research group.

Version:
1.0
Author:
Simon Paquet
See Also:
Serialized Form

Field Summary
 Mtbdd M
          Instance of the MTBDD class that interfaces with CUDD.
 
Constructor Summary
ProbSystemMtbdd(double initialState, IntervalList statesList, int nbAct)
          Initialize a new system from its initial state and its state space.
 
Method Summary
 void addLabelToStates(java.util.HashMap map)
          Ajoute plusieurs étiquettes
 void addLabelToStates(java.lang.String ap, IntervalList l)
          Permet d'ajouter une étiquette à certain états du système.
 void addTransition(Transition t)
          Ajoute la transition ainsi que les associations si la transition n'est pas déja dans le système.
 void addTransition(Transition t, boolean verify)
          Ajoute la transition ainsi que les associations si la transition n'est pas déja dans le système.
 java.util.HashMap computeProbabilities(IntervalList list, java.lang.String act, Variable v, Parser p)
          Cette fonction donne les intervalles et les fonctions de répartition associées pour lesquels il est possible d'arrivé à partir de la list et avec l'action a.
 java.util.ArrayList getActions()
          Pour récupérer toutes les actions possibles.
 java.util.TreeSet getAP()
          Retourne les propositions atomiques
 java.util.ArrayList getEnd()
          Retourne les intervalles d'arrivée
 java.util.ArrayList getExp()
          Retourne la liste des fonctions de repartition.
 double getInitialState()
          Retourne l'état initial.
 Mtbdd getM()
          Retourne l'objet MTBDD
 int getNbAction()
          Retourne le nombre d'action possible dans le système.
 java.util.ArrayList getStart()
          Retourne les intervalles de depart
 IntervalList getStates()
          Retourne l'ensemble des intervalles qui constitue les états du système.
 IntervalList getStatesForLabel(java.lang.String ap)
          Renvoie l'ensemble des états dans lesquels la proposition atomique ap est valide.
 int getTrans()
          Returns a pointer for the MTBDD reference.
 Transition[] getTransitions()
          Retourne toutes les transitions.
 java.util.Vector getTransitionsVector()
          Returns a vactor containing all the transitions of the system.
 void removeLabelFromStates(java.lang.String ap, IntervalList l)
          Enlève des etiquettes
 void removeTransition(Transition t)
          Enleve une transition.
 void setInitialState(double newInitialState)
          Modifies the initial state of the system
 void setStates(IntervalList newStateSpace)
          Sets all the possible states of the system.
 java.lang.String toString()
          Pour l'affichage et pour envoyer dans un fichier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

M

public Mtbdd M
Instance of the MTBDD class that interfaces with CUDD.

Constructor Detail

ProbSystemMtbdd

public ProbSystemMtbdd(double initialState,
                       IntervalList statesList,
                       int nbAct)
Initialize a new system from its initial state and its state space.

Parameters:
initialState - initial state of the system
statesList - the state space
nbAct - the maximum number of actions
Method Detail

getTrans

public int getTrans()
Returns a pointer for the MTBDD reference.

Specified by:
getTrans in interface ProbSystem
Returns:
an integer representing a pointer for CUDD

getM

public Mtbdd getM()
Retourne l'objet MTBDD

Specified by:
getM in interface ProbSystem
Returns:
Mtbdd

getNbAction

public int getNbAction()
Retourne le nombre d'action possible dans le système.

Specified by:
getNbAction in interface ProbSystem
Returns:
the number of actions.

getInitialState

public double getInitialState()
Retourne l'état initial.

Specified by:
getInitialState in interface ProbSystem
Returns:
a real number representing the initial state.

setInitialState

public void setInitialState(double newInitialState)
                     throws java.lang.Exception
Modifies the initial state of the system

Specified by:
setInitialState in interface ProbSystem
Parameters:
newInitialState - the new initial state
Throws:
java.lang.Exception - if the initial state is invalid

getExp

public java.util.ArrayList getExp()
Retourne la liste des fonctions de repartition.

Specified by:
getExp in interface ProbSystem
Returns:
a list containing all the expressions.

getStart

public java.util.ArrayList getStart()
Retourne les intervalles de depart

Specified by:
getStart in interface ProbSystem
Returns:
the X set

getEnd

public java.util.ArrayList getEnd()
Retourne les intervalles d'arrivée

Specified by:
getEnd in interface ProbSystem
Returns:
the Y set

getStates

public IntervalList getStates()
Retourne l'ensemble des intervalles qui constitue les états du système.

Specified by:
getStates in interface ProbSystem
Returns:
a list of intervals representing the system's possible states

setStates

public void setStates(IntervalList newStateSpace)
               throws java.lang.Exception
Sets all the possible states of the system.

Specified by:
setStates in interface ProbSystem
Throws:
java.lang.Exception - should the new state space be invalid

getAP

public java.util.TreeSet getAP()
Retourne les propositions atomiques

Specified by:
getAP in interface ProbSystem
Returns:
a tree set containg all the atomic propositions.

addLabelToStates

public void addLabelToStates(java.util.HashMap map)
                      throws ProbSystemException
Ajoute plusieurs étiquettes

Specified by:
addLabelToStates in interface ProbSystem
Parameters:
map - an association table (states --> label)
Throws:
ProbSystemException - should an invalid association exist

addLabelToStates

public void addLabelToStates(java.lang.String ap,
                             IntervalList l)
                      throws ProbSystemException
Permet d'ajouter une étiquette à certain états du système. S'il y a déja des états d'associés à l'étiquette, la méthode fera l'union des nouveaux états avec ceux déja en association.

Specified by:
addLabelToStates in interface ProbSystem
Parameters:
ap - L'étiquette à ajouter aux états. Doit être un seul mot et doit commencer par une minuscule
l - Les états à être étiquettés. Doit être différent de l'ensemble vide.
Throws:
ProbSystemException - Si la proposition atomique ne commence pas par une minuscule

removeLabelFromStates

public void removeLabelFromStates(java.lang.String ap,
                                  IntervalList l)
Enlève des etiquettes

Specified by:
removeLabelFromStates in interface ProbSystem
Parameters:
ap - the association from which to remove the association
l - the list of intervals to dissociate

getStatesForLabel

public IntervalList getStatesForLabel(java.lang.String ap)
Renvoie l'ensemble des états dans lesquels la proposition atomique ap est valide. Cet ensemble peut être vide si aucun état n'accepte cette étiquette.

Specified by:
getStatesForLabel in interface ProbSystem
Parameters:
ap - the atomic proposition to query
Returns:
a list of intervals associated with the atomic proposition

getActions

public java.util.ArrayList getActions()
Pour récupérer toutes les actions possibles. Aucun ordre n'est à présumé sur la séquence d'action retournée dans le ArrayList. S'il n'y a aucune action, le ArrayList retourné est vide.

Specified by:
getActions in interface ProbSystem
Returns:
a list containing all the actions

addTransition

public void addTransition(Transition t)
                   throws ProbSystemException
Ajoute la transition ainsi que les associations si la transition n'est pas déja dans le système. Sinon, lance une ProbSystemException si la Transition viole l'un de ces critères:

Specified by:
addTransition in interface ProbSystem
Parameters:
t - a valid transition to be added
Throws:
ProbSystemException - Si l'un des critères ci-haut est violé.

addTransition

public void addTransition(Transition t,
                          boolean verify)
                   throws ProbSystemException
Ajoute la transition ainsi que les associations si la transition n'est pas déja dans le système. Sinon, lance une ProbSystemException si la Transition viole l'un de ces critères: Cette version permet d'ajouter la transition sans vérifier l'intégrité du système.

Specified by:
addTransition in interface ProbSystem
Parameters:
t - a valid transition to be added
verify - if the system's integrity should be verified
Throws:
ProbSystemException - Si l'un des critères ci-haut est violé.

removeTransition

public void removeTransition(Transition t)
Enleve une transition.

Specified by:
removeTransition in interface ProbSystem
Parameters:
t - the transition to remove from the system.

getTransitions

public Transition[] getTransitions()
Retourne toutes les transitions.

Specified by:
getTransitions in interface ProbSystem
Returns:
Transition[] a list containing all the transitions of the system.

getTransitionsVector

public java.util.Vector getTransitionsVector()
Description copied from interface: ProbSystem
Returns a vactor containing all the transitions of the system. This method optimizes the transition list construction.

Specified by:
getTransitionsVector in interface ProbSystem
Returns:
a vector containing all the transitions.

toString

public java.lang.String toString()
Pour l'affichage et pour envoyer dans un fichier.

Specified by:
toString in interface ProbSystem
Overrides:
toString in class java.lang.Object
Returns:
a string representing the probabilistic system.

computeProbabilities

public java.util.HashMap computeProbabilities(IntervalList list,
                                              java.lang.String act,
                                              Variable v,
                                              Parser p)
Cette fonction donne les intervalles et les fonctions de répartition associées pour lesquels il est possible d'arrivé à partir de la list et avec l'action a.

Specified by:
computeProbabilities in interface ProbSystem
Parameters:
list - the list of source intervals.
act - the action to apply.
v - the variable which must be computed.
p - a logical parser to analyse the expressions.
Returns:
an association table that links an interval with a repartition function