68 for (
Idx pos = 0; pos < 5; pos++) {
71 _xPos_->addLabel(ss.str());
72 _yPos_->addLabel(ss.str());
103 primeVar->setName((*varIter)->name() +
"'");
134 delete varIter.first();
135 delete varIter.second();
218 if (xCurPos == 4)
return;
219 if (xCurPos == 0 || xCurPos == 2)
220 if (yCurPos == 0 || yCurPos == 1)
return;
222 if (yCurPos == 3 || yCurPos == 4)
return;
242 if (xCurPos == 0)
return;
243 if (xCurPos == 1 || xCurPos == 3)
244 if (yCurPos == 0 || yCurPos == 1)
return;
246 if (yCurPos == 3 || yCurPos == 4)
return;
294 if (passPos ==
TAXI) {
344 if (passPos ==
TAXI) {
377 if (xCurPos ==
HOMEX && yCurPos ==
HOMEY)
return true;
381 if (xCurPos ==
WORKX && yCurPos ==
WORKY)
return true;
389 if (xCurPos ==
CLUBX && yCurPos ==
CLUBY)
return true;
392 case TAXI :
return false;
402 if (xCurPos ==
HOMEX && yCurPos ==
HOMEY)
return true;
406 if (xCurPos ==
WORKX && yCurPos ==
WORKY)
return true;
414 if (xCurPos ==
CLUBX && yCurPos ==
CLUBY)
return true;
417 case TAXI :
return false;
AbstractSimulator()
Default constructor.
virtual Instantiation randomState_()
Choses a random state as the first test for a run.
Instantiation currentState_
Tha state in which the system currently is.
Safe iterators for bijectionIterator.
Base class for discrete random variable.
Class for assigning/browsing values to tuples of discrete variables.
Safe iterators for Sequence.
Sequence< Idx > _taxiActions_
Actions.
bool _isAtDestination_(TaxiSimulationLandmark passDest, TaxiSimulationLandmarkX xCurPos, TaxiSimulationLandmarkY yCurPos)
LabelizedVariable * _yPos_
double reward()
Sets the intial statefrom which we begun the simulation.
Bijection< const DiscreteVariable *, const DiscreteVariable * > _primeMap_
void _performFillUp_()
Iteration over the variables of the simulated probleme.
void _performGoEast_()
Iteration over the variables of the simulated probleme.
SequenceIteratorSafe< const DiscreteVariable * > endVariables()
Iteration over the variables of the simulated probleme.
void _performGoWest_()
Iteration over the variables of the simulated probleme.
LabelizedVariable * _xPos_
TaxiSimulator()
Default constructor.
Sequence< const DiscreteVariable * > _taxiVars_
Variables data structures.
TaxiSimulationAction _lastAction_
LabelizedVariable * _passengerDest_
void _performGoSouth_()
Iteration over the variables of the simulated probleme.
Instantiation randomState_()
Choses a random state as the first test for a run.
const DiscreteVariable * primeVar(const DiscreteVariable *mainVar)
Iteration over the variables of the simulated probleme.
void _performGoNorth_()
Iteration over the variables of the simulated probleme.
LabelizedVariable * _passengerPos_
void _performPickUp_()
Iteration over the variables of the simulated probleme.
LabelizedVariable * _fuelLevel_
HashTable< Idx, std::string * > _actionMap_
bool hasReachEnd()
Choses a random state as the first test for a run.
SequenceIteratorSafe< const DiscreteVariable * > beginVariables()
Iteration over the variables of the simulated probleme.
~TaxiSimulator()
Default destructor.
void _performPutDown_()
Iteration over the variables of the simulated probleme.
bool _isAtMeetPoint_(TaxiSimulationLandmark passpos, TaxiSimulationLandmarkX xCurPos, TaxiSimulationLandmarkY yCurPos)
void perform(Idx)
Iteration over the variables of the simulated probleme.
Size Idx
Type for indexes.
gum is the global namespace for all aGrUM entities
Class for simulating a markov decision process.