102 newState.
add(**varIter);
111 newState.
chgVal(**varIter, transit.
val(*(this->primeVar(*varIter))));
AbstractSimulator()
Default constructor.
Instantiation currentState_
Tha state in which the system currently is.
Definition of templatized reader of FMDPDat files for Factored Markov Decision Processes.
bool trace() const
accessor to trace function (just write the number of parser line)
Size proceed() override
parse.
FMDPSimulator(const FMDP< double > *fmdp)
Default constructor.
FMDP< double > * _fmdp_
The Factored Markov Decision Process that describes how the system evolves.
SequenceIteratorSafe< const DiscreteVariable * > endVariables() override
Iteration over the variables of the simulated probleme.
virtual double transitionProbability_(const DiscreteVariable *var, const Instantiation &transit, Idx actionId)
SequenceIteratorSafe< const DiscreteVariable * > beginVariables() override
Iteration over the variables of the simulated probleme.
const DiscreteVariable * primeVar(const DiscreteVariable *mainVar) override
Iteration over the variables of the simulated probleme.
void perform(Idx) override
Sets the intial statefrom which we begun the simulation.
const bool _loaded_
Just to know if it should be deleted in the end.
~FMDPSimulator() override
Default destructor.
Class for assigning/browsing values to tuples of discrete variables.
Instantiation & chgVal(const DiscreteVariable &v, Idx newval)
Assign newval to variable v in the Instantiation.
bool end() const
Returns true if the Instantiation reached the end.
void incOut(const Instantiation &i)
Operator increment for the variables not in i.
void add(const DiscreteVariable &v) final
Adds a new variable in the Instantiation.
Idx val(Idx i) const
Returns the current value of the variable at position i.
void setFirstOut(const Instantiation &i)
Assign the first values in the Instantiation for the variables not in i.
Definition of templatized reader of dat files for Factored Markov Decision Process.
Class for simulating a markov decision process.
Size Idx
Type for indexes.
double randomProba()
Returns a random double between 0 and 1 included (i.e.
gum is the global namespace for all aGrUM entities
Contains useful methods for random stuff.