MultiAgentDecisionProcess
FG_SolverNDP Class Reference

FG_SolverNDP optimizes (maximizes) a factor graph using non-serial dynamic programming. More...

#include <FG_SolverNDP.h>

Inheritance diagram for FG_SolverNDP:
[legend]

Public Member Functions

 FG_SolverNDP (const libDAI::FactorGraph &f, int verbosity=2, size_t nrSolutions=1, double deadlineInSeconds=0)
 (default) Constructor More...
 
double Solve ()
 Copy constructor. More...
 
- Public Member Functions inherited from FG_Solver
 FG_Solver (const libDAI::FactorGraph &f)
 (default) Constructor More...
 
std::list
< libDAI::MADP_util::valConf > & 
GetBestConfigurations ()
 
virtual ~FG_Solver ()
 Destructor. More...
 

Private Attributes

double _m_deadlineInSeconds
 
size_t _m_nrSolutions
 
int _m_verbosity
 

Additional Inherited Members

- Public Types inherited from FG_Solver
enum  FG_Solver_t { FGSt_MaxPlus, FGSt_NDP }
 
- Static Public Member Functions inherited from FG_Solver
static std::string SoftPrint (FG_Solver_t fgs)
 
- Protected Attributes inherited from FG_Solver
std::list
< libDAI::MADP_util::valConf > 
_m_bestConfs
 
const libDAI::FactorGraph * _m_fg
 

Detailed Description

FG_SolverNDP optimizes (maximizes) a factor graph using non-serial dynamic programming.

I.e., the factor graph represents the sum of the factors and we look for the maximizing configuration.

NOTE: NDP is an exact method, but FG_SolverNDP may return an incorrect value. This happens when there are factors to which no variable is connected (in this case, NDP will return the sum of the values for the connected factors)

Constructor & Destructor Documentation

FG_SolverNDP::FG_SolverNDP ( const libDAI::FactorGraph &  f,
int  verbosity = 2,
size_t  nrSolutions = 1,
double  deadlineInSeconds = 0 
)

(default) Constructor

Member Function Documentation

double FG_SolverNDP::Solve ( )
virtual

Copy constructor.

Destructor. Copy assignment operator

Implements FG_Solver.

References FG_Solver::_m_bestConfs, _m_deadlineInSeconds, FG_Solver::_m_fg, _m_nrSolutions, _m_verbosity, BGIP_SolverType::NDP, and PrintTools::SoftPrintVector().

Member Data Documentation

double FG_SolverNDP::_m_deadlineInSeconds
private

Referenced by Solve().

size_t FG_SolverNDP::_m_nrSolutions
private

Referenced by Solve().

int FG_SolverNDP::_m_verbosity
private

Referenced by Solve().