Class sdm::ActionVFSawtoothLPSerial
Class List > sdm > ActionVFSawtoothLPSerial
#include <action_sawtooth_lp_serial.hpp>
Inherits the following classes: sdm::ActionVFSawtoothLP
Public Types
Type | Name |
---|---|
typedef ActionVFSawtoothLP::TData | TData |
Public Types inherited from sdm::ActionVFSawtoothLP
Type | Name |
---|---|
typedef double | TData |
Public Functions
Type | Name |
---|---|
ActionVFSawtoothLPSerial () | |
ActionVFSawtoothLPSerial (const std::shared_ptr< SolvableByHSVI > & world, TypeOfResolution current_type_of_resolution, number bigM_value, TypeSawtoothLinearProgram type_of_linear_program) | |
virtual void | createDecentralizedConstraints (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, IloEnv & env, IloRangeArray & con, IloNumVarArray & var, number & index, number t) Set decentralized constraints. |
virtual void | createDecentralizedVariables (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, IloEnv & env, IloNumVarArray & var, number & index, number t) Set decentralized variables. |
virtual void | createSawtoothBigM (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, const std::shared_ptr< JointHistoryInterface > & joint_history, const std::shared_ptr< State > & next_hidden_state, const std::shared_ptr< Observation > & next_observation, const std::shared_ptr< JointHistoryInterface > & next_joint_history, const std::shared_ptr< State > & next_one_step_uncompressed_occupancy_state, double probability, double difference, IloEnv & env, IloRangeArray & con, IloNumVarArray & var, number & index, number t) Create constraints with the Big M formalim. |
virtual void | createSawtoothIloIfThen (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, const std::shared_ptr< JointHistoryInterface > & joint_history, const std::shared_ptr< State > & next_hidden_state, const std::shared_ptr< Observation > & next_observation, const std::shared_ptr< JointHistoryInterface > & next_joint_history, const std::shared_ptr< State > & next_state, double probability, double difference, IloEnv & env, IloModel & model, IloNumVarArray & var, number t) Create the constraints with IloIfThen formalim specialized. |
virtual std::shared_ptr< Action > | getVariableResult (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, const IloCplex & cplex, const IloNumVarArray & var, number t) Get the result of the variable created. |
Public Functions inherited from sdm::ActionVFSawtoothLP
Type | Name |
---|---|
ActionVFSawtoothLP () | |
ActionVFSawtoothLP (const std::shared_ptr< SolvableByHSVI > & world, TypeOfResolution current_type_of_resolution, number bigM_value, TypeSawtoothLinearProgram type_of_linear_program) | |
virtual void | createConstraints (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & occupancy_state, IloEnv & env, IloModel & model, IloRangeArray & con, IloNumVarArray & var, number & index, number t) Create the constraints of the LP. |
virtual void | createObjectiveFunction (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & occupancy_state, IloNumVarArray & var, IloObjective & obj, number t) Create a Objective Constraint of the LP. |
virtual void | createVariables (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & occupancy_state, IloEnv & env, IloNumVarArray & var, number & index, number t) Create the variable which will be used to resolve the LP. |
Pair< std::shared_ptr< State >, double > | evaluate (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state_tmp, const std::shared_ptr< Action > & decision_rule, number t) |
virtual Pair< std::shared_ptr< Action >, double > | selectBestAction (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, number t) Select the best action and the hyperplan at t+1 associated for a state at a precise time. |
Public Functions inherited from sdm::ActionVFBase
Type | Name |
---|---|
ActionVFBase () | |
ActionVFBase (const std::shared_ptr< SolvableByHSVI > & world) | |
virtual Pair< std::shared_ptr< Action >, double > | selectBestAction (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, number t) = 0 Select the best action for a state at a precise time. |
virtual | ~ActionVFBase () |
Public Functions inherited from sdm::ActionVFInterface
Type | Name |
---|---|
virtual Pair< std::shared_ptr< Action >, double > | selectBestAction (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, number t) = 0 Select the best action for a state at a precise time. |
Public Functions inherited from sdm::DecentralizedLP
Type | Name |
---|---|
DecentralizedLP () | |
DecentralizedLP (const std::shared_ptr< SolvableByHSVI > &) | |
virtual void | createDecentralizedConstraints (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, IloEnv & env, IloRangeArray & con, IloNumVarArray & var, number & index, number t) = 0 Set decentralized constraints. |
void | createDecentralizedConstraintsOccupancy (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, IloEnv & env, IloRangeArray & con, IloNumVarArray & var, number & index, number t) |
void | createDecentralizedConstraintsSerial (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, IloEnv & env, IloRangeArray & con, IloNumVarArray & var, number & index, number t) |
virtual void | createDecentralizedVariables (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, IloEnv & env, IloNumVarArray & var, number & index, number t) = 0 Set decentralized variables. |
void | createDecentralizedVariablesOccupancy (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, IloEnv & env, IloNumVarArray & var, number & index, number t) |
void | createDecentralizedVariablesSerial (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, IloEnv & env, IloNumVarArray & var, number & index, number t) |
virtual std::shared_ptr< Action > | getVariableResult (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, const IloCplex & cplex, const IloNumVarArray & var, number t) = 0 Get the result of the variable created. |
std::shared_ptr< Action > | getVariableResultOccupancy (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, const IloCplex & cplex, const IloNumVarArray & var, number t) |
std::shared_ptr< Action > | getVariableResultSerial (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, const IloCplex & cplex, const IloNumVarArray & var, number t) |
Public Functions inherited from sdm::VarNaming
See sdm::VarNaming
Type | Name |
---|---|
number | getNumber (const std::string &) Get the identifier associated with a given name. |
std::string | getVarNameIndividualHistory (const std::shared_ptr< HistoryInterface > & ihistory, const number agent) |
std::string | getVarNameIndividualHistoryDecisionRule (const std::shared_ptr< Action > &, const std::shared_ptr< HistoryInterface > &, const number &) Get the name associated with a pair of action and individual history. |
std::string | getVarNameJointHistoryDecisionRule (const std::shared_ptr< Action > &, const std::shared_ptr< JointHistoryInterface > &) Get the name associated with a pair of action and joint history. |
std::string | getVarNameWeight (number) Get the name of a free variable. |
std::string | getVarNameWeightedStateJointHistory (const std::shared_ptr< State > &, const std::shared_ptr< State > &, const std::shared_ptr< JointHistoryInterface > &) Get the Var Name Weighted State __Joint History object. |
void | setNumber (const std::string &, number) Set pair name identifier for a given variable. |
Public Functions inherited from sdm::LPBase
See sdm::LPBase
Type | Name |
---|---|
LPBase () | |
LPBase (const std::shared_ptr< SolvableByHSVI > &) | |
virtual Pair< std::shared_ptr< Action >, double > | createLP (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & occupancy_state, number t) Main function who is used to create the Linear program. |
~LPBase () |
Public Functions inherited from sdm::LPInterface
See sdm::LPInterface
Type | Name |
---|---|
virtual void | createConstraints (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & occupancy_state, IloEnv & env, IloModel & model, IloRangeArray & con, IloNumVarArray & var, number & index, number t) = 0 Create the constraints of the LP. |
virtual Pair< std::shared_ptr< Action >, double > | createLP (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & occupancy_state, number t) = 0 Main function who is used to create the Linear program. |
virtual void | createObjectiveFunction (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & occupancy_state, IloNumVarArray & var, IloObjective & obj, number t) = 0 Create a Objective Constraint of the LP. |
virtual void | createVariables (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & occupancy_state, IloEnv & env, IloNumVarArray & var, number & index, number t) = 0 Create the variable which will be used to resolve the LP. |
virtual std::shared_ptr< Action > | getVariableResult (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & occupancy_state, const IloCplex & cplex, const IloNumVarArray & var, number t) = 0 Get the result of the variable created. |
Protected Attributes inherited from sdm::ActionVFSawtoothLP
Type | Name |
---|---|
std::unordered_map< Pair< std::shared_ptr< State >, double >, std::unordered_map< std::shared_ptr< HistoryInterface >, std::vector< std::shared_ptr< State > > > > | all_support |
number | bigM_value_ |
TypeOfResolution | current_type_of_resolution_ The type of resolution. |
TypeSawtoothLinearProgram | type_of_linear_program_ = = PLAIN_SAWTOOTH_LINER_PROGRAMMING The type of linear program. |
Protected Attributes inherited from sdm::ActionVFBase
Type | Name |
---|---|
std::shared_ptr< SolvableByHSVI > | world_ |
Protected Attributes inherited from sdm::VarNaming
See sdm::VarNaming
Type | Name |
---|---|
RecursiveMap< std::string, number > | variables mapping from variable names to variable identifiers |
Protected Attributes inherited from sdm::LPBase
See sdm::LPBase
Type | Name |
---|---|
std::shared_ptr< BeliefInterface > | tmp_representation The temporary one-stage value function represention. |
std::shared_ptr< SolvableByHSVI > | world_ |
Protected Functions
Type | Name |
---|---|
virtual void | createInitialConstraints (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, IloEnv & env, IloRangeArray & con, IloNumVarArray & var, number & index, number t) |
virtual std::shared_ptr< Joint< std::shared_ptr< Observation > > > | determineNextJointObservation (const std::shared_ptr< JointHistoryInterface > & joint_history, number t) Get the. |
Protected Functions inherited from sdm::ActionVFSawtoothLP
Type | Name |
---|---|
double | computeDifference (const std::shared_ptr< ValueFunction > & vf, const Pair< std::shared_ptr< State >, double > & state_AND_value, number t) Compute the difference v_kappa - V_kappa i.e. the value of point at t+1 minus the relaxation value of the point at t+1. |
double | computeSawtooth (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, const std::shared_ptr< JointHistoryInterface > & joint_history, const std::shared_ptr< State > & next_hidden_state, const std::shared_ptr< Observation > & next_observation, const std::shared_ptr< JointHistoryInterface > & next_joint_history, double denominator, double difference, number t) |
void | createConstraintsKnowingInformation (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, const std::shared_ptr< JointHistoryInterface > &, const std::shared_ptr< State > & next_hidden_state, const std::shared_ptr< Observation > & next_observation, const std::shared_ptr< JointHistoryInterface > & next_joint_history, const std::shared_ptr< State > & next_state, double denominator, double difference, IloEnv & env, IloModel & model, IloRangeArray & con, IloNumVarArray & var, number & index, number t) |
virtual void | createDecentralizedConstraints (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, IloEnv & env, IloRangeArray & con, IloNumVarArray & var, number & index, number t) Set decentralized constraints. |
virtual void | createDecentralizedVariables (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, IloEnv & env, IloNumVarArray & var, number & index, number t) Set decentralized variables. |
void | createGlobalConstraint (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, IloEnv & env, IloRangeArray & con, IloNumVarArray & var, number & index, number t) |
virtual void | createInitialConstraints (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, IloEnv & env, IloRangeArray & con, IloNumVarArray & var, number & index, number t) |
void | createObjectiveVariable (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, IloEnv & env, IloNumVarArray & var, number & index, number t) Create the objective variable. |
void | createOmegaConstraints (const Pair< std::shared_ptr< State >, double > & state, IloEnv & env, IloRangeArray & con, IloNumVarArray & var, number & index) |
void | createOmegaVariable (IloEnv & env, IloNumVarArray & var, number & index) Create all the Omega Variable i.e. k, (o',x') (x',o') |
virtual void | createSawtoothBigM (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, const std::shared_ptr< JointHistoryInterface > & joint_history, const std::shared_ptr< State > & next_hidden_state, const std::shared_ptr< Observation > & next_observation, const std::shared_ptr< JointHistoryInterface > & next_joint_history, const std::shared_ptr< State > & next_one_step_uncompressed_occupancy_state, double probability, double difference, IloEnv & env, IloRangeArray & con, IloNumVarArray & var, number & index, number t) Create constraints with the Big M formalim. |
virtual void | createSawtoothIloIfThen (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, const std::shared_ptr< JointHistoryInterface > & joint_history, const std::shared_ptr< State > & next_hidden_state, const std::shared_ptr< Observation > & next_observation, const std::shared_ptr< JointHistoryInterface > & next_joint_history, const std::shared_ptr< State > & next_state, double probability, double difference, IloEnv & env, IloModel & model, IloNumVarArray & var, number t) Create the constraints with IloIfThen formalim specialized. |
virtual std::shared_ptr< Joint< std::shared_ptr< Observation > > > | determineNextJointObservation (const std::shared_ptr< JointHistoryInterface > &, number t) Get the. |
virtual double | getQValueRelaxation (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, const std::shared_ptr< JointHistoryInterface > & joint_history, const std::shared_ptr< Action > & action, number t) _Calculate the Q Value Relaxation i.e. {o} a(u |
virtual double | getSawtoothMinimumRatio (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, const std::shared_ptr< JointHistoryInterface > & joint_history, const std::shared_ptr< Action > & action, const std::shared_ptr< State > & next_hidden_state, const std::shared_ptr< Observation > & next_observation, double denominator, number t) Calculate the Ratio of Sawtooth. |
virtual std::shared_ptr< Action > | getVariableResult (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, const IloCplex & cplex, const IloNumVarArray & var, number t) Get the result of the variable created. |
Pair< std::shared_ptr< Action >, double > | selectBestActionFull (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, number t) |
Pair< std::shared_ptr< Action >, double > | selectBestActionRelaxed (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, number t) |
Pair< std::shared_ptr< Action >, double > | selectBestActionRelaxedV2 (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, number t) |
Protected Functions inherited from sdm::DecentralizedLP
Type | Name |
---|---|
void | createDecentralizedConstraintsIndividual (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, IloEnv & env, IloRangeArray & con, IloNumVarArray & var, number & index, number t, number agent_id) _Create the Individual Decentralized Constraints i.e. set constraint {u_i} a_i(u_i |
void | createDecentralizedConstraintsJoint (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, IloEnv & env, IloRangeArray & con, IloNumVarArray & var, number & index, number t) Create the Joint _Decentralized Constraints i.e. set constraint a(u |
void | createDecentralizedControlConstraints (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, IloEnv & env, IloRangeArray & con, IloNumVarArray & var, number & index, number t) _Create the Control Decentralized Constraints i.e. set constraint a(u |
void | createDecentralizedVariablesIndividual (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, IloEnv & env, IloNumVarArray & var, number & index, number t, number agent_id) _Create the Individual Decentralized Variable i.e. Build variables a_i(u_i |
void | createDecentralizedVariablesJoint (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, IloEnv & env, IloNumVarArray & var, number & index, number t) Create the Joint _Decentralized Variable i.e. Build variables a(u |
Pair< std::vector< std::shared_ptr< Item > >, std::vector< std::shared_ptr< Item > > > | getVariableResultIndividual (const std::shared_ptr< ValueFunction > & vf, const std::shared_ptr< State > & state, const IloCplex & cplex, const IloNumVarArray & var, number t, number agent_id) _Get the Individual Variable Result i.e. return the result for the variable a(u |
Public Types Documentation
typedef TData
using sdm::ActionVFSawtoothLPSerial::TData = ActionVFSawtoothLP::TData;
Public Functions Documentation
function ActionVFSawtoothLPSerial [1/2]
sdm::ActionVFSawtoothLPSerial::ActionVFSawtoothLPSerial ()
function ActionVFSawtoothLPSerial [2/2]
sdm::ActionVFSawtoothLPSerial::ActionVFSawtoothLPSerial (
const std::shared_ptr< SolvableByHSVI > & world,
TypeOfResolution current_type_of_resolution,
number bigM_value,
TypeSawtoothLinearProgram type_of_linear_program
)
function createDecentralizedConstraints
virtual void sdm::ActionVFSawtoothLPSerial::createDecentralizedConstraints (
const std::shared_ptr< ValueFunction > & vf,
const std::shared_ptr< State > & state,
IloEnv & env,
IloRangeArray & con,
IloNumVarArray & var,
number & index,
number t
)
Parameters:
const
std::shared_ptr<State>&IloEnv&
IloRangeArray&
IloNumVarArray&
number&
number
: time step
Implements sdm::ActionVFSawtoothLP::createDecentralizedConstraints
function createDecentralizedVariables
virtual void sdm::ActionVFSawtoothLPSerial::createDecentralizedVariables (
const std::shared_ptr< ValueFunction > & vf,
const std::shared_ptr< State > & state,
IloEnv & env,
IloNumVarArray & var,
number & index,
number t
)
Parameters:
const
std::shared_ptr<State>& : current stateconst
IloEnv&const
IloNumVarArray&const
number& : index variablenumber
: time step
Implements sdm::ActionVFSawtoothLP::createDecentralizedVariables
function createSawtoothBigM
virtual void sdm::ActionVFSawtoothLPSerial::createSawtoothBigM (
const std::shared_ptr< ValueFunction > & vf,
const std::shared_ptr< State > & state,
const std::shared_ptr< JointHistoryInterface > & joint_history,
const std::shared_ptr< State > & next_hidden_state,
const std::shared_ptr< Observation > & next_observation,
const std::shared_ptr< JointHistoryInterface > & next_joint_history,
const std::shared_ptr< State > & next_one_step_uncompressed_occupancy_state,
double probability,
double difference,
IloEnv & env,
IloRangeArray & con,
IloNumVarArray & var,
number & index,
number t
)
Parameters:
const
std::shared_ptr<ValueFunction>& vf : Value functionconst
std::shared_ptr<State> & occupancy_state : current stateconst
std::shared_ptr<JointHistoryInterface>& joint_historyconst
std::shared_ptr<State> &next_hidden_stateconst
std::shared_ptr<Observation> &next_observationconst
std::shared_ptr<JointHistoryInterface> &next_joint_historyconst
std::shared_ptr<State> &next_one_step_uncompressed_occupancy_statedouble
probabilitydouble
differenceIloEnv
& : envIloRangeArray
&conIloModel
& : vardouble&
indexnumber
t : Time Step
Implements sdm::ActionVFSawtoothLP::createSawtoothBigM
function createSawtoothIloIfThen
virtual void sdm::ActionVFSawtoothLPSerial::createSawtoothIloIfThen (
const std::shared_ptr< ValueFunction > & vf,
const std::shared_ptr< State > & state,
const std::shared_ptr< JointHistoryInterface > & joint_history,
const std::shared_ptr< State > & next_hidden_state,
const std::shared_ptr< Observation > & next_observation,
const std::shared_ptr< JointHistoryInterface > & next_joint_history,
const std::shared_ptr< State > & next_state,
double probability,
double difference,
IloEnv & env,
IloModel & model,
IloNumVarArray & var,
number t
)
Parameters:
const
std::shared_ptr<ValueFunction>& vf : Value functionconst
std::shared_ptr<State> & occupancy_state : current stateIloEnv
& : envIloModel
& : varIloRangeArray&
: modelIloRangeArray
&conIloNumVarArray
&vardouble&
indexnumber
t : Time Step
Implements sdm::ActionVFSawtoothLP::createSawtoothIloIfThen
function getVariableResult
virtual std::shared_ptr< Action > sdm::ActionVFSawtoothLPSerial::getVariableResult (
const std::shared_ptr< ValueFunction > & vf,
const std::shared_ptr< State > & state,
const IloCplex & cplex,
const IloNumVarArray & var,
number t
)
Parameters:
state
cplex
var
t
Returns:
std::shared_ptr<Action>
Implements sdm::ActionVFSawtoothLP::getVariableResult
Protected Functions Documentation
function createInitialConstraints
virtual void sdm::ActionVFSawtoothLPSerial::createInitialConstraints (
const std::shared_ptr< ValueFunction > & vf,
const std::shared_ptr< State > & state,
IloEnv & env,
IloRangeArray & con,
IloNumVarArray & var,
number & index,
number t
)
Implements sdm::ActionVFSawtoothLP::createInitialConstraints
function determineNextJointObservation
virtual std::shared_ptr< Joint < std::shared_ptr< Observation > > > sdm::ActionVFSawtoothLPSerial::determineNextJointObservation (
const std::shared_ptr< JointHistoryInterface > & joint_history,
number t
)
Parameters:
state
t
Returns:
std::shared_ptr<Joint<std::shared_ptr<Observation>>>
Implements sdm::ActionVFSawtoothLP::determineNextJointObservation
The documentation for this class was generated from the following file src/sdm/utils/value_function/action_vf/action_sawtooth_lp_serial.hpp