MultiAgentDecisionProcess
|
BGCG_SolverMaxPlus is a class that performs max plus for BGIPs with agents independence. More...
#include <BGCG_SolverMaxPlus.h>
Public Member Functions | |
BGCG_SolverMaxPlus (const boost::shared_ptr< const BayesianGameCollaborativeGraphical > &bgcg, size_t maxiter=1000, std::string updateType=std::string("PARALL"), int verbosity=2, double damping=0.0, size_t nrSolutions=1, size_t nrRestarts=1) | |
(default) Constructor More... | |
bool | IsExactSolver () const |
Methods should indicated whether they compute exact (optimal) solutions or not. More... | |
void | SetCBGlowerBound (double lb) |
void | SetCBGupperBound (double ub) |
virtual double | Solve () |
The methods that performs the planning. More... | |
Public Member Functions inherited from BGCG_Solver | |
BGCG_Solver (const boost::shared_ptr< const BayesianGameCollaborativeGraphical > &bgcg, size_t nrSolutions=1) | |
(default) Constructor More... | |
boost::shared_ptr< const BayesianGameCollaborativeGraphical > | GetBGCG () const |
BGCG_Solver & | operator= (const BGCG_Solver &o) |
Copy assignment operator. More... | |
virtual | ~BGCG_Solver () |
Copy constructor. More... | |
Public Member Functions inherited from BayesianGameIdenticalPayoffSolver | |
void | AddSolution (const JointPolicyPureVector &jp, double value) |
void | AddSolution (const JointPolicyPureVectorForClusteredBG &jp, double value) |
void | AddSolution (LIndex jpolIndex, double value) |
BayesianGameIdenticalPayoffSolver (const boost::shared_ptr< const BayesianGameIdenticalPayoffInterface > &bg, size_t nrDesiredSolutions=1) | |
(default) Constructor More... | |
double | Evaluate (const JointPolicyPureVector &jpolBG) const |
double | Evaluate (const JointPolicyPureVectorForClusteredBG &jpolBG) const |
boost::shared_ptr< const BayesianGameIdenticalPayoffInterface > | GetBGIPI () const |
double | GetExpectedReward () const |
const boost::shared_ptr < JointPolicy > | GetJointPolicy () const |
const JointPolicyPureVector & | GetJointPolicyPureVector () const |
virtual boost::shared_ptr < JointPolicyDiscretePure > | GetNewJpol () const |
returns a new policy to be used with this BayesianGameIdenticalPayoffSolver More... | |
boost::shared_ptr< JPPVValuePair > | GetNextSolutionJPPV () const |
boost::shared_ptr < PartialJPDPValuePair > | GetNextSolutionPJPDP () const |
size_t | GetNrDesiredSolutions () const |
size_t | GetNrFoundSolutions () const |
Gets the found number of solutions. More... | |
double | GetPayoff () const |
std::ofstream * | GetResultsOFStream () const |
std::ofstream * | GetTimingsOFStream () const |
bool | GetWriteAnyTimeResults () const |
bool | IsEmptyJPPV () const |
bool | IsEmptyPJPDP () const |
void | PopNextSolutionJPPV () |
void | PopNextSolutionPJPDP () |
void | SaveSolution (const std::string &filename) const |
void | SetAnyTimeResults (bool turn_on, std::ofstream *results, std::ofstream *timings) |
Turns Anytime results on and of. More... | |
virtual void | SetDeadline (double deadlineInSeconds) |
To limit the amount of time the solver uses. More... | |
void | SetNrDesiredSolutions (size_t n) |
Gets the desired number of solutions to be returned. More... | |
std::string | SoftPrintSolution () const |
virtual | ~BayesianGameIdenticalPayoffSolver () |
Destructor. More... | |
Public Member Functions inherited from MaxPlusSolverForBGs | |
MaxPlusSolverForBGs (size_t maxiter=1000, std::string updateType=std::string("PARALL"), int verbosity=2, double damping=0.0, size_t nrSolutions=1, size_t nrRestarts=1) | |
(default) Constructor More... | |
Public Member Functions inherited from MaxPlusSolver | |
MaxPlusSolver (size_t maxiter=1000, std::string updateType=std::string("PARALL"), int verbosity=2, double damping=0.0, size_t nrSolutions=1, size_t nrRestarts=1) | |
(default) Constructor More... | |
Static Protected Member Functions | |
static void | Construct_JointType_Factors_CGBG (const boost::shared_ptr< const BayesianGameCollaborativeGraphical > &bgip, const vector< vector< Index > > &var_indices, const vector< libDAI::Var > &vars, vector< libDAI::Factor > &facs, int verbosity) |
Additional Inherited Members | |
Static Public Member Functions inherited from MaxPlusSolverForBGs | |
static void | Construct_AgentTypePair_Variables (const boost::shared_ptr< const BayesianGameIdenticalPayoffInterface > &bgip, vector< vector< Index > > &var_indices, vector< libDAI::Var > &vars, int verbosity) |
static void | Construct_JointType_Factors (const boost::shared_ptr< const BayesianGameIdenticalPayoffInterface > &bgip, const vector< vector< Index > > &var_indices, const vector< libDAI::Var > &vars, vector< libDAI::Factor > &facs, int verbosity) |
Protected Member Functions inherited from BayesianGameIdenticalPayoffSolver | |
virtual void | CheckDeadline (const std::string &errorMessage) const |
Checks whether the deadline has expired. Throws EDeadline. More... | |
virtual void | InitDeadline () |
Should be called at the beginning of Solve(). More... | |
Protected Attributes inherited from BGCG_Solver | |
boost::shared_ptr< const BayesianGameCollaborativeGraphical > | _m_bgcg |
Protected Attributes inherited from MaxPlusSolver | |
double | _m_damping |
stores the damping factor More... | |
size_t | _m_maxiter |
stores the MaxPlus parameter for the max. number of iterations More... | |
size_t | _m_nrRestarts |
stores the number of restarts (for non-deterministic Max-Plus variants) More... | |
size_t | _m_nrSolutions |
stores the (desired) number of solutions More... | |
std::string | _m_updateType |
stores the MaxPlus parameter for the update type More... | |
int | _m_verbosity |
stores the MaxPlus parameter for the verbosity level More... | |
BGCG_SolverMaxPlus is a class that performs max plus for BGIPs with agents independence.
This can also be used to solve BGIPs without agent independence by using the BGCGWrapperForBGIP wrapper. Alternatively, one may want to use BGIP_SolverMaxPlus
BGCG_SolverMaxPlus::BGCG_SolverMaxPlus | ( | const boost::shared_ptr< const BayesianGameCollaborativeGraphical > & | bgcg, |
size_t | maxiter = 1000 , |
||
std::string | updateType = std::string("PARALL") , |
||
int | verbosity = 2 , |
||
double | damping = 0.0 , |
||
size_t | nrSolutions = 1 , |
||
size_t | nrRestarts = 1 |
||
) |
(default) Constructor
|
staticprotected |
References BayesianGameBase::GetNrAgents(), BayesianGameBase::GetNrJointActions(), BayesianGameBase::GetNrJointTypes(), BayesianGameBase::GetProbability(), BayesianGameIdenticalPayoff::GetUtility(), BayesianGameBase::JointToIndividualActionIndices(), BayesianGameBase::JointToIndividualTypeIndices(), and PrintTools::SoftPrintVector().
Referenced by Solve().
|
inlinevirtual |
Methods should indicated whether they compute exact (optimal) solutions or not.
Implements BayesianGameIdenticalPayoffSolver.
|
inlinevirtual |
Implements BayesianGameIdenticalPayoffSolver.
|
inlinevirtual |
Implements BayesianGameIdenticalPayoffSolver.
|
virtual |
The methods that performs the planning.
Returns the expected reward.
Implements BGCG_Solver.
References MaxPlusSolver::_m_damping, MaxPlusSolver::_m_maxiter, MaxPlusSolver::_m_nrRestarts, MaxPlusSolver::_m_nrSolutions, MaxPlusSolver::_m_updateType, MaxPlusSolver::_m_verbosity, BayesianGameIdenticalPayoffSolver::AddSolution(), MaxPlusSolverForBGs::Construct_AgentTypePair_Variables(), Construct_JointType_Factors_CGBG(), BGCG_Solver::GetBGCG(), BayesianGameIdenticalPayoffSolver::GetNewJpol(), BayesianGameIdenticalPayoffSolver::GetResultsOFStream(), BayesianGameIdenticalPayoffSolver::GetTimingsOFStream(), BayesianGameIdenticalPayoffSolver::GetWriteAnyTimeResults(), and BGIP_SolverType::MaxPlus.