MultiAgentDecisionProcess
Release 0.2.1
|
BGIPSolution represents a solution for BayesianGameIdenticalPayoff. More...
#include <BGIPSolution.h>
Public Member Functions | |
void | AddSolution (JointPolicyPureVector &jp, double value) |
Adds a JPPVValuePair to the priority queue that maintains the best _m_nrSolutions solutions. | |
BGIPSolution (const Interface_ProblemToPolicyDiscretePure &pu, size_t nrSolutions=1) | |
(default) Constructor | |
const JointPolicy * | GetJointPolicy () const |
const JointPolicyPureVector & | GetJointPolicyPureVector () const |
JPPVValuePair * | GetNextSolutionJPPV () |
size_t | GetNrDesiredSolutions () const |
size_t | GetNrFoundSolutions () const |
double | GetPayoff () const |
LIndex | GetPolicyIndex () |
bool | IsEmptyJPPV () |
void | Load (std::string filename) |
void | PopNextSolutionJPPV () |
void | Print () const |
void | Save (std::string filename) const |
void | SetPayoff (double payoff) |
void | SetPolicy (const JointPolicyPureVector &jpol) |
void | SetPolicy (LIndex jpolIndex) |
std::string | SoftPrint () const |
~BGIPSolution () | |
Destructor. |
Private Attributes | |
LIndex | _m_jpolIndex |
std::set< Index > | _m_jpolIndices |
size_t | _m_nrSolutions |
This variable gives the number of solutions to return (k). | |
double | _m_payoff |
JointPolicyPureVector * | _m_policy |
const Interface_ProblemToPolicyDiscretePure & | _m_pu |
FixedCapacityPriorityQueue < JPPVValuePair * > | _m_q |
if we want to return the best k solutions, we store them in a priority *queue. |
BGIPSolution represents a solution for BayesianGameIdenticalPayoff.
Definition at line 44 of file BGIPSolution.h.
BGIPSolution::BGIPSolution | ( | const Interface_ProblemToPolicyDiscretePure & | pu, |
size_t | nrSolutions = 1 |
||
) |
(default) Constructor
Definition at line 34 of file BGIPSolution.cpp.
BGIPSolution::~BGIPSolution | ( | ) |
Destructor.
Definition at line 48 of file BGIPSolution.cpp.
References _m_policy, _m_q, FixedCapacityPriorityQueue< T >::empty(), FixedCapacityPriorityQueue< T >::pop(), and FixedCapacityPriorityQueue< T >::top().
void BGIPSolution::AddSolution | ( | JointPolicyPureVector & | jp, |
double | value | ||
) |
Adds a JPPVValuePair to the priority queue that maintains the best _m_nrSolutions solutions.
Any old solutions that are no longer needed are automatically deleted.
Definition at line 122 of file BGIPSolution.cpp.
References _m_jpolIndices, _m_q, JointPolicyPureVector::GetIndex(), JPPVValuePair::GetJPPV(), JointPolicyValuePair::GetValue(), and FixedCapacityPriorityQueue< T >::insert().
|
inline |
Definition at line 81 of file BGIPSolution.h.
References _m_policy.
Referenced by BayesianGameIdenticalPayoffSolver< JointPolicyPureVector >::GetJointPolicy().
|
inline |
Definition at line 82 of file BGIPSolution.h.
References _m_policy.
Referenced by BayesianGameIdenticalPayoffSolver< JointPolicyPureVector >::GetJointPolicyPureVector().
|
inline |
Definition at line 102 of file BGIPSolution.h.
References _m_q, and FixedCapacityPriorityQueue< T >::top().
Referenced by GMAA_kGMAA::ConstructAndValuateNextPolicies().
|
inline |
Definition at line 92 of file BGIPSolution.h.
References _m_nrSolutions.
Referenced by BayesianGameIdenticalPayoffSolver< JointPolicyPureVector >::GetNrDesiredSolutions().
|
inline |
Definition at line 93 of file BGIPSolution.h.
References _m_q, and FixedCapacityPriorityQueue< T >::size().
Referenced by BayesianGameIdenticalPayoffSolver< JointPolicyPureVector >::GetNrFoundSolutions().
|
inline |
Definition at line 76 of file BGIPSolution.h.
References _m_payoff.
Referenced by BayesianGameIdenticalPayoffSolver< JointPolicyPureVector >::GetExpectedReward().
|
inline |
Definition at line 84 of file BGIPSolution.h.
References _m_jpolIndex.
|
inline |
Definition at line 104 of file BGIPSolution.h.
References _m_q, and FixedCapacityPriorityQueue< T >::empty().
Referenced by GMAA_kGMAA::ConstructAndValuateNextPolicies().
void BGIPSolution::Load | ( | std::string | filename | ) |
Definition at line 88 of file BGIPSolution.cpp.
References SetPayoff(), and SetPolicy().
|
inline |
Definition at line 103 of file BGIPSolution.h.
References _m_q, and FixedCapacityPriorityQueue< T >::pop().
Referenced by GMAA_kGMAA::ConstructAndValuateNextPolicies().
|
inline |
Definition at line 89 of file BGIPSolution.h.
References SoftPrint().
void BGIPSolution::Save | ( | std::string | filename | ) | const |
Definition at line 74 of file BGIPSolution.cpp.
References _m_jpolIndex, and _m_payoff.
|
inline |
Definition at line 75 of file BGIPSolution.h.
References _m_payoff.
Referenced by Load(), and BGIP_SolverRandom::Solve().
void BGIPSolution::SetPolicy | ( | const JointPolicyPureVector & | jpol | ) |
Definition at line 59 of file BGIPSolution.cpp.
References _m_policy.
Referenced by Load(), and BGIP_SolverRandom::Solve().
void BGIPSolution::SetPolicy | ( | LIndex | jpolIndex | ) |
Definition at line 66 of file BGIPSolution.cpp.
References _m_jpolIndex, _m_policy, _m_pu, and JointPolicyPureVector::SetIndex().
string BGIPSolution::SoftPrint | ( | void | ) | const |
Definition at line 114 of file BGIPSolution.cpp.
References _m_jpolIndex, and _m_payoff.
Referenced by Print(), and BGIP_SolverAlternatingMaximization< JP >::Solve().
|
private |
Definition at line 50 of file BGIPSolution.h.
Referenced by GetPolicyIndex(), Save(), SetPolicy(), and SoftPrint().
|
private |
Definition at line 63 of file BGIPSolution.h.
Referenced by AddSolution().
|
private |
This variable gives the number of solutions to return (k).
Definition at line 54 of file BGIPSolution.h.
Referenced by GetNrDesiredSolutions().
|
private |
Definition at line 51 of file BGIPSolution.h.
Referenced by GetPayoff(), Save(), SetPayoff(), and SoftPrint().
|
private |
Definition at line 49 of file BGIPSolution.h.
Referenced by GetJointPolicy(), GetJointPolicyPureVector(), SetPolicy(), and ~BGIPSolution().
|
private |
Definition at line 48 of file BGIPSolution.h.
Referenced by SetPolicy().
|
private |
if we want to return the best k solutions, we store them in a priority *queue.
Definition at line 59 of file BGIPSolution.h.
Referenced by AddSolution(), GetNextSolutionJPPV(), GetNrFoundSolutions(), IsEmptyJPPV(), PopNextSolutionJPPV(), and ~BGIPSolution().