Class sdm::OccupancyState
Class List > sdm > OccupancyState
An occupancy state refers to the complete knowledge the central planner have access to take decisions. More...
#include <occupancy_state.hpp>
Inherits the following classes: sdm::OccupancyStateInterface, sdm::Belief
Inherited by the following classes: sdm::PrivateOccupancyState, sdm::SerialOccupancyState
Public Types inherited from sdm::MappedVector
Type | Name |
---|---|
typedef typename std::unordered_map< TIndex, T, Hash, KeyEqual >::const_iterator | const_iterator |
typedef typename std::unordered_map< TIndex, T, Hash, KeyEqual >::iterator | iterator |
typedef typename RecursiveMap< TIndex, T >::type | type |
typedef typename RecursiveMap< TIndex, T >::value_list_type | value_list_type |
typedef typename RecursiveMap< TIndex, T >::value_type | value_type |
Public Static Attributes
Type | Name |
---|---|
int | NUM_CREATE |
int | NUM_DESTROY |
unsigned long | PASSAGE_FINALIZE |
unsigned long | PASSAGE_GET_PROBA |
unsigned long | PASSAGE_SET_PROBA |
double | PRECISION |
double | TIME_IN_ADD_PROBA |
double | TIME_IN_COMPRESS |
double | TIME_IN_DOT_OPERATOR |
double | TIME_IN_EQUAL_OPERATOR |
double | TIME_IN_FINALIZE |
double | TIME_IN_GET_PROBA |
double | TIME_IN_HASH |
double | TIME_IN_INFERIOR_OPERATOR |
double | TIME_IN_MINUS_OPERATOR |
double | TIME_IN_SET_PROBA |
RecursiveMap< Joint< std::shared_ptr< HistoryInterface > >, std::shared_ptr< JointHistoryInterface > > | jhistory_map_ Keep relation between list of individual histories and joint histories. |
Public Static Attributes inherited from sdm::Belief
See sdm::Belief
Type | Name |
---|---|
double | PRECISION |
Public Static Attributes inherited from sdm::MappedVector
Type | Name |
---|---|
double | PRECISION |
Public Functions
Type | Name |
---|---|
OccupancyState () | |
OccupancyState (number num_agents) | |
OccupancyState (const OccupancyState & copy) | |
virtual void | addProbability (const std::shared_ptr< State > & joint_history, double proba) |
virtual void | addProbability (const std::shared_ptr< JointHistoryInterface > & joint_history, const std::shared_ptr< BeliefInterface > & belief, double proba) |
bool | areIndividualHistoryLPE (const std::shared_ptr< HistoryInterface > &, const std::shared_ptr< HistoryInterface > &, number) Check probabilistic equivalence. |
virtual std::shared_ptr< OccupancyStateInterface > | compress () Compression for occupancy states based on belief state representation. To be in this representation, the type 'TState' have to be a derivation of the interface BeliefState. |
virtual void | finalize () |
virtual std::shared_ptr< Space > | getActionSpaceAt (number t) |
virtual const std::vector< std::set< std::shared_ptr< HistoryInterface > > > & | getAllIndividualHistories () const Get the set of individual histories that are in the support of the occupancy state (for all agents). |
virtual std::shared_ptr< BeliefInterface > | getBeliefAt (const std::shared_ptr< JointHistoryInterface > & jhistory) const Get the belief corresponding to the given joint historiy. |
virtual const std::set< std::shared_ptr< BeliefInterface > > & | getBeliefs () const Get the set of states that are in the support of the occupancy state for a precise joint historiy. |
virtual std::shared_ptr< JointHistoryInterface > | getCompressedJointHistory (const std::shared_ptr< JointHistoryInterface > &) const Get the Compressed Joint History. |
std::shared_ptr< OccupancyStateInterface > | getCompressedOccupancy () |
virtual std::shared_ptr< OccupancyStateInterface > | getFullyUncompressedOccupancy () Get the fully uncompressed occupancy state. |
virtual std::vector< std::shared_ptr< JointHistoryInterface > > | getIndividualHierarchicalHistoriesOf (number t, number agent) |
virtual std::shared_ptr< JointHistoryInterface > | getIndividualHierarchicalHistory (number t, number agent, std::shared_ptr< JointHistoryInterface > candidate_ihhistory) |
virtual const std::set< std::shared_ptr< HistoryInterface > > & | getIndividualHistories (number ag_id) const Get the set of individual histories that are in the support of the occupancy state (for a given agent). |
virtual const std::set< std::shared_ptr< JointHistoryInterface > > & | getJointHistories () const Get the set of joint histories that are in the support of the occupancy state. |
virtual std::shared_ptr< JointHistoryInterface > | getJointHistory (std::shared_ptr< JointHistoryInterface > candidate_jhistory) |
virtual std::vector< std::shared_ptr< JointHistoryInterface > > | getJointHistoryVector (number t) |
virtual Joint< std::shared_ptr< HistoryInterface > > | getJointLabels (const Joint< std::shared_ptr< HistoryInterface >> &) const Get the list of labels that corresponds to the list of ihistories. |
virtual std::shared_ptr< HistoryInterface > | getLabel (const std::shared_ptr< HistoryInterface > & ihistory, number agent_id) const Get the label that corresponds to the ihistory. |
virtual std::shared_ptr< OccupancyStateInterface > | getOneStepUncompressedOccupancy () Get the one step uncompressed occupancy state. |
const std::shared_ptr< PrivateOccupancyState > & | getPrivateOccupancyState (const number & agent_id, const std::shared_ptr< HistoryInterface > & ihistory) const Get the. |
const Joint< RecursiveMap< std::shared_ptr< HistoryInterface >, std::shared_ptr< PrivateOccupancyState > > > & | getPrivateOccupancyStates () const Get the Private Occupancy States object. |
virtual double | getProbability (const std::shared_ptr< State > & joint_history) const |
virtual double | getProbability (const std::shared_ptr< JointHistoryInterface > & joint_history) const |
virtual double | getProbability (const std::shared_ptr< JointHistoryInterface > & joint_history, const std::shared_ptr< State > & state) const |
virtual double | getProbabilityOverIndividualHistories (number, const std::shared_ptr< HistoryInterface > &) const Get the probability over individual histories and precise agent. |
virtual TypeState | getTypeState () const |
std::shared_ptr< OccupancyState > | getptr () |
virtual size_t | hash () const Get the hash of the state. The hash is used in tabular value functions in order to compare efficiently two states. This function must be reimplemented in inherited classes. |
virtual bool | individualHierarchicalHistoryVectorForIsDone (number t, number agent) |
virtual double | minus (const std::shared_ptr< BeliefInterface > & other) const |
void | normalize () |
virtual double | operator- (const std::shared_ptr< BeliefInterface > & other) const |
double | operator< (const OccupancyState & other) const |
virtual double | operator< (const std::shared_ptr< BeliefInterface > & other) const |
virtual bool | operator== (const std::shared_ptr< State > & other) const Check equality between two states. This function must be implemented in inherited classes. |
bool | operator== (const OccupancyState & other) const |
virtual bool | operator== (const std::shared_ptr< BeliefInterface > & other) const |
virtual double | operator^ (const std::shared_ptr< BeliefInterface > & other) const |
virtual void | prepareIndividualHierarchicalHistoryVectors (number t) |
virtual void | pushToIndividualHierarchicalHistoriesOf (number t, number agent, std::shared_ptr< JointHistoryInterface > & individual_hierarchical_history) |
virtual void | pushToJointHistoryVector (number t, std::shared_ptr< JointHistoryInterface > & individual_hierarchical_history) |
virtual Pair< std::shared_ptr< JointHistoryInterface >, std::shared_ptr< BeliefInterface > > | sampleJointHistoryBelief () |
virtual void | setActionSpaceAt (number t, std::shared_ptr< Space > action_space) |
void | setBeliefAt (const std::shared_ptr< JointHistoryInterface > & jhistory, const std::shared_ptr< BeliefInterface > & belief) Set the belief corresponding to the given joint historiy. |
void | setCompressedOccupancy (const std::shared_ptr< OccupancyStateInterface > & compress_ostate) Set the compressed occupancy state. |
virtual void | setFullyUncompressedOccupancy (const std::shared_ptr< OccupancyStateInterface > &) Set the fully uncompressed occupancy state. |
virtual void | setOneStepUncompressedOccupancy (const std::shared_ptr< OccupancyStateInterface > &) Set the one step uncompressed occupancy state. |
virtual void | setProbability (const std::shared_ptr< State > & joint_history, double proba) |
virtual void | setProbability (const std::shared_ptr< JointHistoryInterface > & joint_history, const std::shared_ptr< BeliefInterface > & belief, double proba) |
void | setup () |
virtual std::string | str () const Get a string describing the current item. |
virtual void | updateJointLabels (const Joint< std::shared_ptr< HistoryInterface >> &, const Joint< std::shared_ptr< HistoryInterface >> &) Update the labels of multiple individual histories. |
void | updateLabel (number, const std::shared_ptr< HistoryInterface > &, const std::shared_ptr< HistoryInterface > &) Update the label of a specific individual history. |
void | updateTime (std::chrono::high_resolution_clock::time_point start_time, std::string information) const |
~OccupancyState () |
Public Functions inherited from sdm::OccupancyStateInterface
See sdm::OccupancyStateInterface
Type | Name |
---|---|
virtual void | addProbability (const std::shared_ptr< State > & pair_history_belief, double proba) = 0 |
virtual void | addProbability (const std::shared_ptr< JointHistoryInterface > & joint_history, const std::shared_ptr< BeliefInterface > & belief, double proba) = 0 |
virtual std::shared_ptr< OccupancyStateInterface > | compress () = 0 Compression for occupancy states based on belief state representation. To be in this representation, the type 'TState' have to be a derivation of the interface BeliefState. |
virtual void | finalize () = 0 |
virtual std::shared_ptr< Space > | getActionSpaceAt (number t) = 0 |
virtual const std::vector< std::set< std::shared_ptr< HistoryInterface > > > & | getAllIndividualHistories () const = 0 Get the set of individual histories that are in the support of the occupancy state (for all agents). |
virtual std::shared_ptr< BeliefInterface > | getBeliefAt (const std::shared_ptr< JointHistoryInterface > & jhistory) const = 0 Get the set of beliefs at a given joint history. |
virtual const std::set< std::shared_ptr< BeliefInterface > > & | getBeliefs () const = 0 Get the set of states that are in the support of the occupancy state for a precise joint historiy. |
virtual std::shared_ptr< JointHistoryInterface > | getCompressedJointHistory (const std::shared_ptr< JointHistoryInterface > &) const = 0 Get the Compressed Joint History. |
virtual std::shared_ptr< OccupancyStateInterface > | getFullyUncompressedOccupancy () = 0 Get the fully uncompressed occupancy state. |
virtual std::vector< std::shared_ptr< JointHistoryInterface > > | getIndividualHierarchicalHistoriesOf (number t, number agent) = 0 |
virtual std::shared_ptr< JointHistoryInterface > | getIndividualHierarchicalHistory (number t, number agent, std::shared_ptr< JointHistoryInterface > candidate_ihhistory) = 0 |
virtual const std::set< std::shared_ptr< HistoryInterface > > & | getIndividualHistories (number ag_id) const = 0 Get the set of individual histories that are in the support of the occupancy state (for a given agent). |
virtual const std::set< std::shared_ptr< JointHistoryInterface > > & | getJointHistories () const = 0 Get the set of joint histories that are in the support of the occupancy state. |
virtual std::shared_ptr< JointHistoryInterface > | getJointHistory (std::shared_ptr< JointHistoryInterface > candidate_jhistory) = 0 |
virtual std::vector< std::shared_ptr< JointHistoryInterface > > | getJointHistoryVector (number t) = 0 |
virtual Joint< std::shared_ptr< HistoryInterface > > | getJointLabels (const Joint< std::shared_ptr< HistoryInterface >> &) const = 0 Get the list of labels that corresponds to the list of ihistories. |
virtual std::shared_ptr< HistoryInterface > | getLabel (const std::shared_ptr< HistoryInterface > & ihistory, number agent_id) const = 0 Get the label that corresponds to the ihistory. |
virtual std::shared_ptr< OccupancyStateInterface > | getOneStepUncompressedOccupancy () = 0 Get the one step uncompressed occupancy state. |
virtual double | getProbability (const std::shared_ptr< State > & joint_history) const = 0 |
virtual double | getProbability (const std::shared_ptr< JointHistoryInterface > & joint_history) const = 0 |
virtual double | getProbability (const std::shared_ptr< JointHistoryInterface > & joint_history, const std::shared_ptr< State > & state) const = 0 |
virtual double | getProbabilityOverIndividualHistories (number, const std::shared_ptr< HistoryInterface > &) const = 0 Get the probability over individual histories and precise agent. |
virtual bool | individualHierarchicalHistoryVectorForIsDone (number t, number agent) = 0 |
virtual double | minus (const std::shared_ptr< BeliefInterface > & other) const = 0 |
virtual double | operator- (const std::shared_ptr< BeliefInterface > & other) const = 0 |
virtual void | prepareIndividualHierarchicalHistoryVectors (number t) = 0 |
virtual void | pushToIndividualHierarchicalHistoriesOf (number t, number agent, std::shared_ptr< JointHistoryInterface > & individual_hierarchical_history) = 0 |
virtual void | pushToJointHistoryVector (number t, std::shared_ptr< JointHistoryInterface > & individual_hierarchical_history) = 0 |
virtual Pair< std::shared_ptr< JointHistoryInterface >, std::shared_ptr< BeliefInterface > > | sampleJointHistoryBelief () = 0 |
virtual void | setActionSpaceAt (number t, std::shared_ptr< Space > action_space) = 0 |
virtual void | setFullyUncompressedOccupancy (const std::shared_ptr< OccupancyStateInterface > &) = 0 Set the fully uncompressed occupancy state. |
virtual void | setOneStepUncompressedOccupancy (const std::shared_ptr< OccupancyStateInterface > &) = 0 Set the one step uncompressed occupancy state. |
virtual void | setProbability (const std::shared_ptr< State > & pair_history_belief, double proba) = 0 |
virtual void | setProbability (const std::shared_ptr< JointHistoryInterface > & joint_history, const std::shared_ptr< BeliefInterface > & belief, double proba) = 0 |
virtual void | updateJointLabels (const Joint< std::shared_ptr< HistoryInterface >> &, const Joint< std::shared_ptr< HistoryInterface >> &) = 0 Update the labels of multiple individual histories. |
Public Functions inherited from sdm::BeliefInterface
Type | Name |
---|---|
virtual void | addProbability (const std::shared_ptr< State > &, double proba) = 0 |
virtual void | finalize () = 0 |
virtual double | getDefaultValue () const = 0 |
virtual double | getProbability (const std::shared_ptr< State > & state) const = 0 |
virtual std::vector< std::shared_ptr< State > > | getStates () const = 0 |
virtual TypeState | getTypeState () const |
virtual std::shared_ptr< VectorInterface< std::shared_ptr< State >, double > > | getVectorInferface () = 0 |
virtual bool | isStateExist (const std::shared_ptr< State > & state_tmp) const = 0 |
virtual double | norm_1 () const = 0 |
virtual void | normalizeBelief (double norm_1) = 0 |
virtual double | operator< (const std::shared_ptr< BeliefInterface > & other) const = 0 |
virtual bool | operator== (const std::shared_ptr< BeliefInterface > & other) const = 0 |
virtual double | operator^ (const std::shared_ptr< BeliefInterface > & other) const = 0 |
virtual std::shared_ptr< State > | sampleState () = 0 |
virtual void | setDefaultValue (double) = 0 |
virtual void | setProbability (const std::shared_ptr< State > & state, double proba) = 0 |
virtual size_t | size () const = 0 |
Public Functions inherited from sdm::State
See sdm::State
Type | Name |
---|---|
virtual TypeState | getTypeState () const |
virtual size_t | hash () const Get the hash of the state. The hash is used in tabular value functions in order to compare efficiently two states. This function must be reimplemented in inherited classes. |
virtual bool | operator== (const std::shared_ptr< State > & other) const Check equality between two states. This function must be implemented in inherited classes. |
virtual std::string | str () const = 0 Get a string describing the current item. |
virtual std::shared_ptr< BeliefInterface > | toBelief () Cast the state into a belief. |
virtual std::shared_ptr< HistoryInterface > | toHistory () Cast the state into a history. |
virtual std::shared_ptr< OccupancyStateInterface > | toOccupancyState () Cast the state into an occupancy state. |
virtual std::shared_ptr< BaseSerialInterface > | toSerial () Cast the state into a serial interface. |
virtual std::shared_ptr< SerialOccupancyInterface > | toSerialOccupancyState () Cast the state into a serial occupancy state. |
virtual | ~State () |
Public Functions inherited from sdm::Observation
See sdm::Observation
Type | Name |
---|---|
virtual std::string | str () const = 0 Get a string describing the current item. |
virtual | ~Observation () |
Public Functions inherited from sdm::Item
See sdm::Item
Type | Name |
---|---|
virtual std::shared_ptr< Item > | getPointer () Get the shared_ptr on current (this) item. |
virtual bool | isBaseItem () |
virtual std::string | str () const = 0 Get a string describing the current item. |
std::shared_ptr< T > | to () |
virtual std::shared_ptr< Action > | toAction () Cast the item into a pointer on action. |
virtual std::shared_ptr< Item > | toItem () Cast the item into a pointer on item. |
virtual std::shared_ptr< Observation > | toObservation () Cast the item into a pointer on observation. |
virtual std::shared_ptr< State > | toState () Cast the item into a pointer on state. |
Public Functions inherited from std::inheritable_enable_shared_from_this
See std::inheritable_enable_shared_from_this
Type | Name |
---|---|
std::shared_ptr< Down > | downcasted_shared_from_this () |
std::shared_ptr< T > | shared_from_this () |
Public Functions inherited from std::MultipleInheritableEnableSharedFromThis
See std::MultipleInheritableEnableSharedFromThis
Type | Name |
---|---|
virtual | ~MultipleInheritableEnableSharedFromThis () |
Public Functions inherited from sdm::Belief
See sdm::Belief
Type | Name |
---|---|
Belief () | |
Belief (std::size_t) | |
Belief (const Belief &) | |
Belief (const MappedVector< std::shared_ptr< State >> &) | |
Belief (const std::vector< std::shared_ptr< State >> & list_states, const std::vector< double > & list_proba) | |
virtual void | addProbability (const std::shared_ptr< State > & state, double proba) |
virtual void | finalize () |
virtual double | getDefaultValue () const |
virtual double | getProbability (const std::shared_ptr< State > & state) const |
virtual std::vector< std::shared_ptr< State > > | getStates () const |
virtual TypeState | getTypeState () const |
virtual std::shared_ptr< VectorInterface< std::shared_ptr< State >, double > > | getVectorInferface () |
virtual size_t | hash () const Get the hash of the state. The hash is used in tabular value functions in order to compare efficiently two states. This function must be reimplemented in inherited classes. |
virtual bool | isStateExist (const std::shared_ptr< State > & state_tmp) const |
virtual double | norm_1 () const |
virtual void | normalizeBelief (double norm_1) |
virtual double | operator< (const std::shared_ptr< BeliefInterface > & other) const |
double | operator< (const Belief & other) const |
bool | operator== (const Belief &) const |
virtual bool | operator== (const std::shared_ptr< State > & other) const Check equality between two states. This function must be implemented in inherited classes. |
virtual bool | operator== (const std::shared_ptr< BeliefInterface > & other) const |
virtual double | operator^ (const std::shared_ptr< BeliefInterface > & other) const |
virtual std::shared_ptr< State > | sampleState () |
void | serialize (Archive & archive, const unsigned int) |
virtual void | setDefaultValue (double) |
virtual void | setProbability (const std::shared_ptr< State > & state, double proba) |
virtual size_t | size () const |
virtual std::string | str () const Get a string describing the current item. |
virtual | ~Belief () |
Public Functions inherited from sdm::BeliefInterface
Type | Name |
---|---|
virtual void | addProbability (const std::shared_ptr< State > &, double proba) = 0 |
virtual void | finalize () = 0 |
virtual double | getDefaultValue () const = 0 |
virtual double | getProbability (const std::shared_ptr< State > & state) const = 0 |
virtual std::vector< std::shared_ptr< State > > | getStates () const = 0 |
virtual TypeState | getTypeState () const |
virtual std::shared_ptr< VectorInterface< std::shared_ptr< State >, double > > | getVectorInferface () = 0 |
virtual bool | isStateExist (const std::shared_ptr< State > & state_tmp) const = 0 |
virtual double | norm_1 () const = 0 |
virtual void | normalizeBelief (double norm_1) = 0 |
virtual double | operator< (const std::shared_ptr< BeliefInterface > & other) const = 0 |
virtual bool | operator== (const std::shared_ptr< BeliefInterface > & other) const = 0 |
virtual double | operator^ (const std::shared_ptr< BeliefInterface > & other) const = 0 |
virtual std::shared_ptr< State > | sampleState () = 0 |
virtual void | setDefaultValue (double) = 0 |
virtual void | setProbability (const std::shared_ptr< State > & state, double proba) = 0 |
virtual size_t | size () const = 0 |
Public Functions inherited from sdm::State
See sdm::State
Type | Name |
---|---|
virtual TypeState | getTypeState () const |
virtual size_t | hash () const Get the hash of the state. The hash is used in tabular value functions in order to compare efficiently two states. This function must be reimplemented in inherited classes. |
virtual bool | operator== (const std::shared_ptr< State > & other) const Check equality between two states. This function must be implemented in inherited classes. |
virtual std::string | str () const = 0 Get a string describing the current item. |
virtual std::shared_ptr< BeliefInterface > | toBelief () Cast the state into a belief. |
virtual std::shared_ptr< HistoryInterface > | toHistory () Cast the state into a history. |
virtual std::shared_ptr< OccupancyStateInterface > | toOccupancyState () Cast the state into an occupancy state. |
virtual std::shared_ptr< BaseSerialInterface > | toSerial () Cast the state into a serial interface. |
virtual std::shared_ptr< SerialOccupancyInterface > | toSerialOccupancyState () Cast the state into a serial occupancy state. |
virtual | ~State () |
Public Functions inherited from sdm::Observation
See sdm::Observation
Type | Name |
---|---|
virtual std::string | str () const = 0 Get a string describing the current item. |
virtual | ~Observation () |
Public Functions inherited from sdm::Item
See sdm::Item
Type | Name |
---|---|
virtual std::shared_ptr< Item > | getPointer () Get the shared_ptr on current (this) item. |
virtual bool | isBaseItem () |
virtual std::string | str () const = 0 Get a string describing the current item. |
std::shared_ptr< T > | to () |
virtual std::shared_ptr< Action > | toAction () Cast the item into a pointer on action. |
virtual std::shared_ptr< Item > | toItem () Cast the item into a pointer on item. |
virtual std::shared_ptr< Observation > | toObservation () Cast the item into a pointer on observation. |
virtual std::shared_ptr< State > | toState () Cast the item into a pointer on state. |
Public Functions inherited from std::inheritable_enable_shared_from_this
See std::inheritable_enable_shared_from_this
Type | Name |
---|---|
std::shared_ptr< Down > | downcasted_shared_from_this () |
std::shared_ptr< T > | shared_from_this () |
Public Functions inherited from std::MultipleInheritableEnableSharedFromThis
See std::MultipleInheritableEnableSharedFromThis
Type | Name |
---|---|
virtual | ~MultipleInheritableEnableSharedFromThis () |
Public Functions inherited from sdm::MappedVector
Type | Name |
---|---|
MappedVector () | |
MappedVector (T default_value) | |
MappedVector (long size, T default_value) | |
MappedVector (const MappedVector &) | |
MappedVector (std::initializer_list< value_list_type >) | |
std::shared_ptr< TOutput > | add (const std::shared_ptr< TOutput > & other, double coef_this=1., double coef_other=1.) const |
virtual void | addValueAt (const TIndex &, const T &) |
virtual TIndex | argmax () |
virtual TIndex | argmin () |
virtual T | at (const TIndex &) const |
T | dot (const MappedVector &) const This method implements a non-commutative dot product : It is worth noticing that sometimes arg1.dot(arg2) != arg2.dot(arg1) |
void | finalize () |
T | getDefault () const |
virtual std::vector< TIndex > | getIndexes () const |
virtual T | getValueAt (const TIndex &) const |
bool | isExist (const TIndex &) const |
bool | is_equal (const MappedVector & other, double precision) const |
virtual T | max () |
virtual T | min () |
T | norm_1 () const |
T | norm_2 () const |
bool | operator!= (const MappedVector &) const |
T | operator* (const MappedVector &) const |
bool | operator< (const MappedVector &) const |
bool | operator== (const MappedVector & other) const |
T | operator^ (const MappedVector &) const This method implements a non-commutative dot product : It is worth noticing that sometimes arg1.dot(arg2) != arg2.dot(arg1) |
void | serialize (Archive & archive, const unsigned int) |
void | setDefault (double default_value) |
virtual void | setValueAt (const TIndex &, const T &) |
void | setupIndexes () |
virtual size_t | size () const |
virtual std::string | str () const |
virtual | ~MappedVector () |
Public Functions inherited from sdm::VectorInterface
Type | Name |
---|---|
virtual void | addValueAt (const I & index, const T & value) = 0 |
virtual I | argmax () = 0 |
virtual I | argmin () = 0 |
virtual T | at (const I & index) const = 0 |
virtual std::vector< I > | getIndexes () const = 0 |
virtual T | getValueAt (const I & index) const = 0 |
virtual T | max () = 0 |
virtual T | min () = 0 |
virtual void | setValueAt (const I & index, const T & value) = 0 |
virtual size_t | size () const = 0 |
virtual std::string | str () const = 0 |
Public Static Functions
Type | Name |
---|---|
void | cleanTIME () |
Public Static Functions inherited from sdm::Belief
See sdm::Belief
Type | Name |
---|---|
std::shared_ptr< State > | getState (const std::shared_ptr< State > &) |
Public Static Functions inherited from sdm::MappedVector
Type | Name |
---|---|
void | setPrecision (double) |
Protected Attributes
Type | Name |
---|---|
std::shared_ptr< std::unordered_map< number, std::shared_ptr< Space > > > | action_space_map |
std::vector< std::set< std::shared_ptr< HistoryInterface > > > | all_list_ihistories_ tuple of private history spaces, one private history space per agent |
std::weak_ptr< OccupancyStateInterface > | compressed_occupancy_state |
std::shared_ptr< OccupancyStateInterface > | fully_uncompressed_occupancy_state Keep in memory the uncompressed occupancy states. |
std::unordered_map< number, std::unordered_map< std::shared_ptr< HistoryInterface >, std::set< std::shared_ptr< JointHistoryInterface > > > > | ihistories_to_jhistory_ |
std::vector< std::shared_ptr< std::unordered_map< number, std::vector< std::shared_ptr< JointHistoryInterface > > > > > | individual_hierarchical_history_vector_map_vector |
std::shared_ptr< std::unordered_map< number, std::vector< std::shared_ptr< JointHistoryInterface > > > > | joint_history_map_vector |
std::set< std::shared_ptr< BeliefInterface > > | list_beliefs_ space of all reachable states, those in the support of the occupancy state : Should not be used since there are to much possible wrt each joint history, belief states whould have been a better choice. |
std::set< std::shared_ptr< JointHistoryInterface > > | list_joint_histories_ space of joint histories |
std::unordered_map< std::shared_ptr< JointHistoryInterface >, std::shared_ptr< BeliefInterface > > | map_joint_history_to_belief_ mapping from joint history to belief |
number | num_agents_ = = 2 the number of agents |
std::shared_ptr< OccupancyStateInterface > | one_step_left_compressed_occupancy_state |
Joint< RecursiveMap< std::shared_ptr< HistoryInterface >, std::shared_ptr< HistoryInterface > > > | private_ihistory_map_ Keep relations between all private ihistories and labels. |
std::unordered_map< number, std::unordered_map< std::shared_ptr< HistoryInterface >, double > > | probability_ihistories probability of a private history space for a precise agent |
Joint< RecursiveMap< std::shared_ptr< HistoryInterface >, std::shared_ptr< PrivateOccupancyState > > > | tuple_of_maps_from_histories_to_private_occupancy_states_ This representation of occupancy states consists of private occupancy states for each agent. |
Joint< RecursiveMap< std::shared_ptr< HistoryInterface >, double > > | weight_of_private_occupancy_state_ |
Protected Attributes inherited from sdm::Belief
See sdm::Belief
Type | Name |
---|---|
DiscreteDistribution< std::shared_ptr< State > > | distribution_ |
Protected Attributes inherited from sdm::MappedVector
Type | Name |
---|---|
bool | bmax = = false |
bool | bmin = = false |
T | default_value_ = = 0.0 |
std::pair< TIndex, T > | pmax |
std::pair< TIndex, T > | pmin |
long | size_ = = -1 |
std::vector< TIndex > | v_indexes = = {} |
Protected Functions
Type | Name |
---|---|
void | setProbabilityOverIndividualHistories () |
void | setupBeliefsAndHistories () |
void | setupIndividualHistories () |
void | setupPrivateOccupancyStates () |
Protected Functions inherited from sdm::MappedVector
Type | Name |
---|---|
const std::pair< TIndex, T > & | getMax () |
const std::pair< TIndex, T > & | getMin () |
Detailed Description
Occupancy states are firstly defined by Dibangoye, Amato, Buffet and Charpillet in Optimally Solving Dec-POMDPs as Continuous-State MDPs (opens new window). An occupancy state is defined as a posterior distribution over states and histories, given a complete information state (i.e. ) .
Public Static Attributes Documentation
variable NUM_CREATE
int sdm::OccupancyState::NUM_CREATE;
variable NUM_DESTROY
int sdm::OccupancyState::NUM_DESTROY;
variable PASSAGE_FINALIZE
unsigned long sdm::OccupancyState::PASSAGE_FINALIZE;
variable PASSAGE_GET_PROBA
unsigned long sdm::OccupancyState::PASSAGE_GET_PROBA;
variable PASSAGE_SET_PROBA
unsigned long sdm::OccupancyState::PASSAGE_SET_PROBA;
variable PRECISION
double sdm::OccupancyState::PRECISION;
variable TIME_IN_ADD_PROBA
double sdm::OccupancyState::TIME_IN_ADD_PROBA;
variable TIME_IN_COMPRESS
double sdm::OccupancyState::TIME_IN_COMPRESS;
variable TIME_IN_DOT_OPERATOR
double sdm::OccupancyState::TIME_IN_DOT_OPERATOR;
variable TIME_IN_EQUAL_OPERATOR
double sdm::OccupancyState::TIME_IN_EQUAL_OPERATOR;
variable TIME_IN_FINALIZE
double sdm::OccupancyState::TIME_IN_FINALIZE;
variable TIME_IN_GET_PROBA
double sdm::OccupancyState::TIME_IN_GET_PROBA;
variable TIME_IN_HASH
double sdm::OccupancyState::TIME_IN_HASH;
variable TIME_IN_INFERIOR_OPERATOR
double sdm::OccupancyState::TIME_IN_INFERIOR_OPERATOR;
variable TIME_IN_MINUS_OPERATOR
double sdm::OccupancyState::TIME_IN_MINUS_OPERATOR;
variable TIME_IN_SET_PROBA
double sdm::OccupancyState::TIME_IN_SET_PROBA;
variable jhistory_map_
RecursiveMap<Joint<std::shared_ptr<HistoryInterface> >, std::shared_ptr<JointHistoryInterface> > sdm::OccupancyState::jhistory_map_;
Public Functions Documentation
function OccupancyState [1/3]
sdm::OccupancyState::OccupancyState ()
function OccupancyState [2/3]
sdm::OccupancyState::OccupancyState (
number num_agents
)
function OccupancyState [3/3]
sdm::OccupancyState::OccupancyState (
const OccupancyState & copy
)
function addProbability [1/2]
virtual void sdm::OccupancyState::addProbability (
const std::shared_ptr< State > & joint_history,
double proba
)
Implements sdm::Belief::addProbability
function addProbability [2/2]
virtual void sdm::OccupancyState::addProbability (
const std::shared_ptr< JointHistoryInterface > & joint_history,
const std::shared_ptr< BeliefInterface > & belief,
double proba
)
Implements sdm::OccupancyStateInterface::addProbability
function areIndividualHistoryLPE
bool sdm::OccupancyState::areIndividualHistoryLPE (
const std::shared_ptr< HistoryInterface > &,
const std::shared_ptr< HistoryInterface > &,
number
)
Returns:
true if histories are equivalent
Returns:
false else
function compress
virtual std::shared_ptr< OccupancyStateInterface > sdm::OccupancyState::compress ()
Returns:
the compressed occupancy state
Implements sdm::OccupancyStateInterface::compress
function finalize
virtual void sdm::OccupancyState::finalize ()
Implements sdm::Belief::finalize
function getActionSpaceAt
virtual std::shared_ptr< Space > sdm::OccupancyState::getActionSpaceAt (
number t
)
Implements sdm::OccupancyStateInterface::getActionSpaceAt
function getAllIndividualHistories
virtual const std::vector< std::set< std::shared_ptr< HistoryInterface > > > & sdm::OccupancyState::getAllIndividualHistories () const
Implements sdm::OccupancyStateInterface::getAllIndividualHistories
function getBeliefAt
virtual std::shared_ptr< BeliefInterface > sdm::OccupancyState::getBeliefAt (
const std::shared_ptr< JointHistoryInterface > & jhistory
) const
Returns:
the belief
Implements sdm::OccupancyStateInterface::getBeliefAt
function getBeliefs
virtual const std::set< std::shared_ptr< BeliefInterface > > & sdm::OccupancyState::getBeliefs () const
Returns:
the possible states
Implements sdm::OccupancyStateInterface::getBeliefs
function getCompressedJointHistory
virtual std::shared_ptr< JointHistoryInterface > sdm::OccupancyState::getCompressedJointHistory (
const std::shared_ptr< JointHistoryInterface > &
) const
Implements sdm::OccupancyStateInterface::getCompressedJointHistory
function getCompressedOccupancy
std::shared_ptr< OccupancyStateInterface > sdm::OccupancyState::getCompressedOccupancy ()
function getFullyUncompressedOccupancy
virtual std::shared_ptr< OccupancyStateInterface > sdm::OccupancyState::getFullyUncompressedOccupancy ()
Implements sdm::OccupancyStateInterface::getFullyUncompressedOccupancy
function getIndividualHierarchicalHistoriesOf
virtual std::vector< std::shared_ptr< JointHistoryInterface > > sdm::OccupancyState::getIndividualHierarchicalHistoriesOf (
number t,
number agent
)
Implements sdm::OccupancyStateInterface::getIndividualHierarchicalHistoriesOf
function getIndividualHierarchicalHistory
virtual std::shared_ptr< JointHistoryInterface > sdm::OccupancyState::getIndividualHierarchicalHistory (
number t,
number agent,
std::shared_ptr< JointHistoryInterface > candidate_ihhistory
)
Implements sdm::OccupancyStateInterface::getIndividualHierarchicalHistory
function getIndividualHistories
virtual const std::set< std::shared_ptr< HistoryInterface > > & sdm::OccupancyState::getIndividualHistories (
number ag_id
) const
Parameters:
number
the agent identifier
Implements sdm::OccupancyStateInterface::getIndividualHistories
function getJointHistories
virtual const std::set< std::shared_ptr< JointHistoryInterface > > & sdm::OccupancyState::getJointHistories () const
Returns:
the possible joint hitories
Implements sdm::OccupancyStateInterface::getJointHistories
function getJointHistory
virtual std::shared_ptr< JointHistoryInterface > sdm::OccupancyState::getJointHistory (
std::shared_ptr< JointHistoryInterface > candidate_jhistory
)
Implements sdm::OccupancyStateInterface::getJointHistory
function getJointHistoryVector
virtual std::vector< std::shared_ptr< JointHistoryInterface > > sdm::OccupancyState::getJointHistoryVector (
number t
)
Implements sdm::OccupancyStateInterface::getJointHistoryVector
function getJointLabels
virtual Joint < std::shared_ptr< HistoryInterface > > sdm::OccupancyState::getJointLabels (
const Joint < std::shared_ptr< HistoryInterface >> &
) const
Implements sdm::OccupancyStateInterface::getJointLabels
function getLabel
virtual std::shared_ptr< HistoryInterface > sdm::OccupancyState::getLabel (
const std::shared_ptr< HistoryInterface > & ihistory,
number agent_id
) const
Implements sdm::OccupancyStateInterface::getLabel
function getOneStepUncompressedOccupancy
virtual std::shared_ptr< OccupancyStateInterface > sdm::OccupancyState::getOneStepUncompressedOccupancy ()
Implements sdm::OccupancyStateInterface::getOneStepUncompressedOccupancy
function getPrivateOccupancyState
const std::shared_ptr< PrivateOccupancyState > & sdm::OccupancyState::getPrivateOccupancyState (
const number & agent_id,
const std::shared_ptr< HistoryInterface > & ihistory
) const
Parameters:
agent_id
ihistory
Returns:
const std::shared_ptr<PrivateOccupancyState>&
function getPrivateOccupancyStates
const Joint < RecursiveMap < std::shared_ptr< HistoryInterface >, std::shared_ptr< PrivateOccupancyState > > > & sdm::OccupancyState::getPrivateOccupancyStates () const
Returns:
const Joint<RecursiveMap<std::shared_ptr<HistoryInterface>, std::shared_ptr<PrivateOccupancyState>>>&
function getProbability [1/3]
virtual double sdm::OccupancyState::getProbability (
const std::shared_ptr< State > & joint_history
) const
Implements sdm::Belief::getProbability
function getProbability [2/3]
virtual double sdm::OccupancyState::getProbability (
const std::shared_ptr< JointHistoryInterface > & joint_history
) const
Implements sdm::OccupancyStateInterface::getProbability
function getProbability [3/3]
virtual double sdm::OccupancyState::getProbability (
const std::shared_ptr< JointHistoryInterface > & joint_history,
const std::shared_ptr< State > & state
) const
Implements sdm::OccupancyStateInterface::getProbability
function getProbabilityOverIndividualHistories
virtual double sdm::OccupancyState::getProbabilityOverIndividualHistories (
number,
const std::shared_ptr< HistoryInterface > &
) const
Parameters:
number
Agent Idtypename
jhistory_type::element_type::ihistory_type : Individual History
Implements sdm::OccupancyStateInterface::getProbabilityOverIndividualHistories
function getTypeState
virtual TypeState sdm::OccupancyState::getTypeState () const
Implements sdm::Belief::getTypeState
function getptr
std::shared_ptr< OccupancyState > sdm::OccupancyState::getptr ()
function hash
virtual size_t sdm::OccupancyState::hash () const
Returns:
size_t the hash code
Implements sdm::Belief::hash
function individualHierarchicalHistoryVectorForIsDone
virtual bool sdm::OccupancyState::individualHierarchicalHistoryVectorForIsDone (
number t,
number agent
)
Implements sdm::OccupancyStateInterface::individualHierarchicalHistoryVectorForIsDone
function minus
virtual double sdm::OccupancyState::minus (
const std::shared_ptr< BeliefInterface > & other
) const
Implements sdm::OccupancyStateInterface::minus
function normalize
void sdm::OccupancyState::normalize ()
function operator-
virtual double sdm::OccupancyState::operator- (
const std::shared_ptr< BeliefInterface > & other
) const
Implements sdm::OccupancyStateInterface::operator-
function operator<
double sdm::OccupancyState::operator< (
const OccupancyState & other
) const
function operator<
virtual double sdm::OccupancyState::operator< (
const std::shared_ptr< BeliefInterface > & other
) const
Implements sdm::Belief::operator<
function operator==
virtual bool sdm::OccupancyState::operator== (
const std::shared_ptr< State > & other
) const
Parameters:
other
the state to be compared to current state
Returns:
true if states are equal
Returns:
false if they are different
Implements sdm::Belief::operator==
function operator==
bool sdm::OccupancyState::operator== (
const OccupancyState & other
) const
function operator==
virtual bool sdm::OccupancyState::operator== (
const std::shared_ptr< BeliefInterface > & other
) const
Implements sdm::Belief::operator==
function operator^
virtual double sdm::OccupancyState::operator^ (
const std::shared_ptr< BeliefInterface > & other
) const
Implements sdm::Belief::operator^
function prepareIndividualHierarchicalHistoryVectors
virtual void sdm::OccupancyState::prepareIndividualHierarchicalHistoryVectors (
number t
)
Implements sdm::OccupancyStateInterface::prepareIndividualHierarchicalHistoryVectors
function pushToIndividualHierarchicalHistoriesOf
virtual void sdm::OccupancyState::pushToIndividualHierarchicalHistoriesOf (
number t,
number agent,
std::shared_ptr< JointHistoryInterface > & individual_hierarchical_history
)
Implements sdm::OccupancyStateInterface::pushToIndividualHierarchicalHistoriesOf
function pushToJointHistoryVector
virtual void sdm::OccupancyState::pushToJointHistoryVector (
number t,
std::shared_ptr< JointHistoryInterface > & individual_hierarchical_history
)
Implements sdm::OccupancyStateInterface::pushToJointHistoryVector
function sampleJointHistoryBelief
virtual Pair < std::shared_ptr< JointHistoryInterface >, std::shared_ptr< BeliefInterface > > sdm::OccupancyState::sampleJointHistoryBelief ()
Implements sdm::OccupancyStateInterface::sampleJointHistoryBelief
function setActionSpaceAt
virtual void sdm::OccupancyState::setActionSpaceAt (
number t,
std::shared_ptr< Space > action_space
)
Implements sdm::OccupancyStateInterface::setActionSpaceAt
function setBeliefAt
void sdm::OccupancyState::setBeliefAt (
const std::shared_ptr< JointHistoryInterface > & jhistory,
const std::shared_ptr< BeliefInterface > & belief
)
Parameters:
jhistory
the joint historybelief
the corresponding belief
function setCompressedOccupancy
void sdm::OccupancyState::setCompressedOccupancy (
const std::shared_ptr< OccupancyStateInterface > & compress_ostate
)
function setFullyUncompressedOccupancy
virtual void sdm::OccupancyState::setFullyUncompressedOccupancy (
const std::shared_ptr< OccupancyStateInterface > &
)
Implements sdm::OccupancyStateInterface::setFullyUncompressedOccupancy
function setOneStepUncompressedOccupancy
virtual void sdm::OccupancyState::setOneStepUncompressedOccupancy (
const std::shared_ptr< OccupancyStateInterface > &
)
Implements sdm::OccupancyStateInterface::setOneStepUncompressedOccupancy
function setProbability [1/2]
virtual void sdm::OccupancyState::setProbability (
const std::shared_ptr< State > & joint_history,
double proba
)
Implements sdm::Belief::setProbability
function setProbability [2/2]
virtual void sdm::OccupancyState::setProbability (
const std::shared_ptr< JointHistoryInterface > & joint_history,
const std::shared_ptr< BeliefInterface > & belief,
double proba
)
Implements sdm::OccupancyStateInterface::setProbability
function setup
void sdm::OccupancyState::setup ()
function str
virtual std::string sdm::OccupancyState::str () const
Returns:
std::string the description of the item
Implements sdm::Belief::str
function updateJointLabels
virtual void sdm::OccupancyState::updateJointLabels (
const Joint < std::shared_ptr< HistoryInterface >> &,
const Joint < std::shared_ptr< HistoryInterface >> &
)
Implements sdm::OccupancyStateInterface::updateJointLabels
function updateLabel
void sdm::OccupancyState::updateLabel (
number,
const std::shared_ptr< HistoryInterface > &,
const std::shared_ptr< HistoryInterface > &
)
function updateTime
void sdm::OccupancyState::updateTime (
std::chrono::high_resolution_clock::time_point start_time,
std::string information
) const
function ~OccupancyState
sdm::OccupancyState::~OccupancyState ()
Public Static Functions Documentation
function cleanTIME
static void sdm::OccupancyState::cleanTIME ()
Protected Attributes Documentation
variable action_space_map
std::shared_ptr<std::unordered_map<number, std::shared_ptr<Space> > > sdm::OccupancyState::action_space_map;
variable all_list_ihistories_
std::vector<std::set<std::shared_ptr<HistoryInterface> > > sdm::OccupancyState::all_list_ihistories_;
variable compressed_occupancy_state
std::weak_ptr<OccupancyStateInterface> sdm::OccupancyState::compressed_occupancy_state;
variable fully_uncompressed_occupancy_state
std::shared_ptr<OccupancyStateInterface> sdm::OccupancyState::fully_uncompressed_occupancy_state;
variable ihistories_to_jhistory_
std::unordered_map<number, std::unordered_map<std::shared_ptr<HistoryInterface>, std::set<std::shared_ptr<JointHistoryInterface> > > > sdm::OccupancyState::ihistories_to_jhistory_;
variable individual_hierarchical_history_vector_map_vector
std::vector<std::shared_ptr<std::unordered_map<number, std::vector<std::shared_ptr<JointHistoryInterface> > > > > sdm::OccupancyState::individual_hierarchical_history_vector_map_vector;
variable joint_history_map_vector
std::shared_ptr<std::unordered_map<number, std::vector<std::shared_ptr<JointHistoryInterface> > > > sdm::OccupancyState::joint_history_map_vector;
variable list_beliefs_
std::set<std::shared_ptr<BeliefInterface> > sdm::OccupancyState::list_beliefs_;
variable list_joint_histories_
std::set<std::shared_ptr<JointHistoryInterface> > sdm::OccupancyState::list_joint_histories_;
variable map_joint_history_to_belief_
std::unordered_map<std::shared_ptr<JointHistoryInterface>, std::shared_ptr<BeliefInterface> > sdm::OccupancyState::map_joint_history_to_belief_;
variable num_agents_
number sdm::OccupancyState::num_agents_;
variable one_step_left_compressed_occupancy_state
std::shared_ptr<OccupancyStateInterface> sdm::OccupancyState::one_step_left_compressed_occupancy_state;
variable private_ihistory_map_
Joint<RecursiveMap<std::shared_ptr<HistoryInterface>, std::shared_ptr<HistoryInterface> > > sdm::OccupancyState::private_ihistory_map_;
variable probability_ihistories
std::unordered_map<number, std::unordered_map<std::shared_ptr<HistoryInterface>, double> > sdm::OccupancyState::probability_ihistories;
variable tuple_of_maps_from_histories_to_private_occupancy_states_
Joint<RecursiveMap<std::shared_ptr<HistoryInterface>, std::shared_ptr<PrivateOccupancyState> > > sdm::OccupancyState::tuple_of_maps_from_histories_to_private_occupancy_states_;
variable weight_of_private_occupancy_state_
Joint<RecursiveMap<std::shared_ptr<HistoryInterface>, double> > sdm::OccupancyState::weight_of_private_occupancy_state_;
Protected Functions Documentation
function setProbabilityOverIndividualHistories
void sdm::OccupancyState::setProbabilityOverIndividualHistories ()
function setupBeliefsAndHistories
void sdm::OccupancyState::setupBeliefsAndHistories ()
function setupIndividualHistories
void sdm::OccupancyState::setupIndividualHistories ()
function setupPrivateOccupancyStates
void sdm::OccupancyState::setupPrivateOccupancyStates ()
The documentation for this class was generated from the following file src/sdm/core/state/occupancy_state.hpp