![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
A class to simulate the Factory problem. More...
#include <agrum/FMDP/simulation/factorySimulator.h>
Public Member Functions | |
Constructors, Destructors. | |
| FactorySimulator () | |
| Default constructor. | |
| ~FactorySimulator () | |
| Default destructor. | |
Variables | |
| const DiscreteVariable * | primeVar (const DiscreteVariable *mainVar) |
| Iteration over the variables of the simulated probleme. | |
| SequenceIteratorSafe< const DiscreteVariable * > | beginVariables () |
| Iteration over the variables of the simulated probleme. | |
| SequenceIteratorSafe< const DiscreteVariable * > | endVariables () |
| Iteration over the variables of the simulated probleme. | |
Actions | |
| const std::string & | actionName (Idx actionId) |
| Iteration over the variables of the simulated probleme. | |
| SequenceIteratorSafe< Idx > | beginActions () |
| Iteration over the variables of the simulated probleme. | |
| SequenceIteratorSafe< Idx > | endActions () |
| Iteration over the variables of the simulated probleme. | |
| INLINE void | setInitialState (const Instantiation &initialState) |
| Sets the intial statefrom which we begun the simulation. | |
| void | setInitialStateRandomly () |
| Sets the intial statefrom which we begun the simulation. | |
| INLINE void | setEndState (const Instantiation &endState) |
| Sets the final states upon which a run is over. | |
| INLINE const Instantiation & | currentState () |
| Sets the intial statefrom which we begun the simulation. | |
Public Attributes | |
| Instantiation | currentState_ |
| Tha state in which the system currently is. | |
| Instantiation | endState_ |
Private Member Functions | |
| void | _goNorth_ () |
| void | _goEast_ () |
| void | _goSouth_ () |
| void | _goWest_ () |
| void | _pickUp_ () |
| void | _putDown_ () |
| void | _fillUp_ () |
Private Attributes | |
| Sequence< const DiscreteVariable * > | _FactoryVars_ |
| Variables data structures. | |
| Bijection< const DiscreteVariable *, const DiscreteVariable * > | _primeMap_ |
| DiscreteVariable * | _xPos_ |
| DiscreteVariable * | _yPos_ |
| DiscreteVariable * | _passengerPos_ |
| DiscreteVariable * | _passengerDest_ |
| DiscreteVariable * | _fuelLevel_ |
| Sequence< Idx > | _FactoryActions_ |
| Actions. | |
| HashTable< Idx, std::string * > | _actionMap_ |
| FactorySimulationAction | _lastAction_ |
| bool | hasReachEnd () |
| Choses a random state as the first test for a run. | |
| double | reward () |
| Choses a random state as the first test for a run. | |
| void | perform (Idx) |
| Choses a random state as the first test for a run. | |
| Instantiation | randomState_ () |
| Choses a random state as the first test for a run. | |
A class to simulate the Factory problem.
Definition at line 99 of file factorySimulator.h.
| gum::FactorySimulator::FactorySimulator | ( | ) |
Default constructor.
| gum::FactorySimulator::~FactorySimulator | ( | ) |
Default destructor.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
inlinevirtual |
Iteration over the variables of the simulated probleme.
Implements gum::AbstractSimulator.
Definition at line 160 of file factorySimulator.h.
References _actionMap_.
|
inlinevirtual |
Iteration over the variables of the simulated probleme.
Implements gum::AbstractSimulator.
Definition at line 163 of file factorySimulator.h.
References _FactoryActions_.
|
inlinevirtual |
Iteration over the variables of the simulated probleme.
Implements gum::AbstractSimulator.
Definition at line 145 of file factorySimulator.h.
References _FactoryVars_.
|
inlineinherited |
Sets the intial statefrom which we begun the simulation.
Definition at line 108 of file abstractSimulator.h.
References currentState_.
|
inlinevirtual |
Iteration over the variables of the simulated probleme.
Implements gum::AbstractSimulator.
Definition at line 165 of file factorySimulator.h.
References _FactoryActions_.
|
inlinevirtual |
Iteration over the variables of the simulated probleme.
Implements gum::AbstractSimulator.
Definition at line 149 of file factorySimulator.h.
References _FactoryVars_.
|
virtual |
Choses a random state as the first test for a run.
Reimplemented from gum::AbstractSimulator.
|
virtual |
Choses a random state as the first test for a run.
Implements gum::AbstractSimulator.
|
inlinevirtual |
Iteration over the variables of the simulated probleme.
Implements gum::AbstractSimulator.
Definition at line 140 of file factorySimulator.h.
References _primeMap_.
|
protectedvirtual |
Choses a random state as the first test for a run.
Reimplemented from gum::AbstractSimulator.
|
virtual |
Choses a random state as the first test for a run.
Implements gum::AbstractSimulator.
|
inlineinherited |
Sets the final states upon which a run is over.
Definition at line 102 of file abstractSimulator.h.
References endState_.
|
inlineinherited |
Sets the intial statefrom which we begun the simulation.
Definition at line 92 of file abstractSimulator.h.
References currentState_.
|
inherited |
Sets the intial statefrom which we begun the simulation.
Definition at line 82 of file abstractSimulator.cpp.
References currentState_, hasReachEnd(), and randomState_().
Definition at line 190 of file factorySimulator.h.
Referenced by actionName().
Actions.
Definition at line 189 of file factorySimulator.h.
Referenced by beginActions(), and endActions().
|
private |
Variables data structures.
Definition at line 180 of file factorySimulator.h.
Referenced by beginVariables(), and endVariables().
|
private |
Definition at line 186 of file factorySimulator.h.
|
private |
Definition at line 192 of file factorySimulator.h.
|
private |
Definition at line 185 of file factorySimulator.h.
|
private |
Definition at line 184 of file factorySimulator.h.
|
private |
Definition at line 181 of file factorySimulator.h.
Referenced by primeVar().
|
private |
Definition at line 182 of file factorySimulator.h.
|
private |
Definition at line 183 of file factorySimulator.h.
|
inherited |
Tha state in which the system currently is.
Definition at line 146 of file abstractSimulator.h.
Referenced by gum::TaxiSimulator::_evalReward_(), gum::TaxiSimulator::_performFillUp_(), gum::TaxiSimulator::_performGoEast_(), gum::TaxiSimulator::_performGoNorth_(), gum::TaxiSimulator::_performGoSouth_(), gum::TaxiSimulator::_performGoWest_(), gum::TaxiSimulator::_performPickUp_(), gum::TaxiSimulator::_performPutDown_(), currentState(), hasReachEnd(), gum::FMDPSimulator::perform(), gum::TaxiSimulator::perform(), gum::FMDPSimulator::reward(), setInitialState(), and setInitialStateRandomly().
|
inherited |
Definition at line 146 of file abstractSimulator.h.
Referenced by hasReachEnd(), and setEndState().