Scheduler
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
mdp
tests
stateSpaceTest.h
Go to the documentation of this file.
1
11
#include <stdexcept>
12
#include <memory>
13
14
#include <gtest/gtest.h>
15
#include <
mdp/stateSpace.h
>
16
#include <
mdp/stateSpaceDimension.h
>
17
#include <
mdp/priorityState.h
>
18
#include <
mdp/stateSpaceBuilder.h
>
19
#include <
mdp/domainModel.h
>
20
#include "../state.h"
21
22
class
Prio
:
public
Mdp::PriorityState
23
{
24
public
:
25
std::string
getName
()
override
{
return
""
;};
26
bool
isInState
()
override
{
return
inState
;};
27
bool
inState
{
false
};
28
};
29
30
class
Dimension
:
public
Mdp::StateSpaceDimension
31
{
32
public
:
33
std::string
getName
()
override
{
return
""
;};
34
Mdp::statePosition_t
getPosition
()
override
{
return
position;};
35
Mdp::statePosition_t
position{0};
36
size_t
getNumberOfPositions
()
override
{
return
nbOfPositions;};
37
size_t
nbOfPositions{2};
38
};
39
40
class
TestDomainModel
:
public
Mdp::DomainModel
41
{
42
public
:
43
double
measureReward
()
override
{
return
3.14;};
44
};
45
46
Prio
*
prio1
, *
prio2
;
47
Dimension
*
dim1
, *
dim2
, *
dim3
;
48
49
double
expectedReward
= 3.14;
Dimension::getName
std::string getName() override
returns the name of that dimension
Definition:
stateSpaceTest.h:33
dim2
Dimension * dim2
Definition:
stateSpaceTest.h:47
Dimension::getPosition
Mdp::statePosition_t getPosition() override
gets the position of the state along that dimension
Definition:
stateSpaceTest.h:34
Mdp::DomainModel
Definition:
domainModel.h:18
TestDomainModel
Definition:
stateSpaceTest.h:40
priorityState.h
prio2
Prio * prio2
Definition:
stateSpaceTest.h:46
stateSpaceDimension.h
Dimension
Definition:
stateSpaceTest.h:30
Prio
Definition:
stateSpaceTest.h:22
Prio::isInState
bool isInState() override
Given the information provided by the DomainModel, this function checks if the system is in that stat...
Definition:
stateSpaceTest.h:26
TestDomainModel::measureReward
double measureReward() override
Definition:
stateSpaceTest.h:43
Prio::inState
bool inState
Definition:
stateSpaceTest.h:27
Prio::getName
std::string getName() override
returns the name of that state
Definition:
stateSpaceTest.h:25
Dimension::getNumberOfPositions
size_t getNumberOfPositions() override
returns the number of possible positions along that dimension
Definition:
stateSpaceTest.h:36
prio1
Prio * prio1
Definition:
stateSpaceTest.h:46
expectedReward
double expectedReward
Definition:
stateSpaceTest.h:49
dim3
Dimension * dim3
Definition:
stateSpaceTest.h:47
Mdp::statePosition_t
int statePosition_t
Definition:
stateSpaceDimension.h:19
stateSpace.h
Mdp::PriorityState
a single state of the state space
Definition:
priorityState.h:31
Mdp::StateSpaceDimension
this models a dimension in the state space.
Definition:
stateSpaceDimension.h:29
domainModel.h
stateSpaceBuilder.h
dim1
Dimension * dim1
Definition:
stateSpaceTest.h:47
Generated on Sun Nov 26 2017 17:01:36 for Scheduler by
1.8.11