30 #ifndef GUM_ABSTRACT_FMDP_FACTORY_H 31 #define GUM_ABSTRACT_FMDP_FACTORY_H 36 #include <agrum/tools/graphs/graphElements.h> 37 #include <agrum/tools/variables/discreteVariable.h> 39 #include <agrum/FMDP/fmdp.h> 148 virtual void addModality(
const std::string& name) = 0;
165 virtual void addAction(
const std::string& action) = 0;
180 virtual void addTransition(
const std::string& var,
const MultiDimAdressable* transition) = 0;
200 virtual void addCost(
const MultiDimAdressable* cost) = 0;
224 virtual void addReward(
const MultiDimAdressable* reward) = 0;
261 virtual void addArc(NodeId from, NodeId to, Idx modality) = 0;
264 virtual void setRoot(NodeId rootId) = 0;
virtual void setRoot(NodeId rootId)=0
Set the root of the diagram.
virtual void setOperationModeOn(std::string operationType)=0
Tells the factory that we're in a reward declaration mode where the global reward diagram is an opera...
virtual ~AbstractFMDPFactory()
Destructor.
virtual void startRewardDeclaration()=0
Tells the factory that we're in a cost declaration.
virtual void startVariableDeclaration()=0
Tells the factory that we're in a variable declaration.
virtual NodeId addInternalNode(std::string name_of_var)=0
Insert in diagram a non terminal node.
virtual void addArc(NodeId from, NodeId to, Idx modality)=0
Insert in diagram an arc.
virtual void endTransitionDeclaration()=0
Tells the factory that we're out of a transition declaration.
virtual void variableDescription(const std::string &desc)=0
Tells the factory the current variable's description.
virtual void addModality(const std::string &name)=0
Adds a modality to the current variable.
INLINE void emplace(Args &&... args)
virtual void addReward(const MultiDimAdressable *reward)=0
Tells the factory to add a reward table to the current fmdp.
FMDPfactory_state
The enumeration of states in which the factory can be in.
virtual void startDiscountDeclaration()=0
Tells the factory that we're in a cost declaration.
virtual NodeId addTerminalNode(float value)=0
Insert in diagram a terminal node.
virtual void addDiscount(float discount)=0
Tells the factory to add a cost table to the current fmdp.
virtual void endCostDeclaration()=0
Tells the factory that we're out of a cost declaration.
virtual FMDPfactory_state state() const =0
Returns the current state of the factory.
virtual void addCost(const MultiDimAdressable *cost)=0
Tells the factory to add a cost table to the current fmdp.
virtual void addTransition(const std::string &var, const MultiDimAdressable *transition)=0
Tells the factory to add a transition table to the current fmdp.
virtual const DiscreteVariable * variable(const std::string &name) const =0
Returns a constant reference on a variable given it's name.
virtual void endVariableDeclaration()=0
Tells the factory that we're out of a variable declaration.
virtual void endDiscountDeclaration()=0
Tells the factory that we're out of a cost declaration.
virtual void endActionDeclaration()=0
Tells the factory that we're out of an action declaration.
virtual void variableName(const std::string &name)=0
Tells the factory the current variable's name.
virtual void addCost()=0
Tells the factory to add current decision diagram it has as a cost table.
virtual void startCostDeclaration()=0
Tells the factory that we're in a cost declaration.
A factory class to ease Factored Markov Decision Process construction.
virtual void endRewardDeclaration()=0
Tells the factory that we're out of a cost declaration.
virtual void addAction(const std::string &action)=0
Tells the factory to add an action to the current fmdp.
virtual void addTransition(const std::string &var)=0
Tells the factory to add a transition table to the current fmdp. This transition table will be extrac...
virtual void startActionDeclaration()=0
Tells the factory that we're in an action declaration.
virtual void startTransitionDeclaration()=0
Tells the factory that we're in a transition declaration.
virtual void addReward()=0
Tells the factory to add current decision diagram it has as a reward table.