solverUtils.h
Go to the documentation of this file.
00001 
00007 #ifndef INCsolverUtils_h
00008 #define INCsolverUtils_h
00009 
00010 #include <iostream>
00011 #include <string>
00012 
00013 using namespace std;
00014 
00015 // search strategies
00016 //#include "HSVI.h"
00017 
00018 // problem types
00019 #include "POMDP.h"
00020 //#include "MDPSim.h"
00021 //#include "PomdpSim.h"
00022 
00023 
00024 #include "MObject.h"
00025 using namespace momdp;
00026 
00027 namespace momdp{
00028 
00029         struct EnumEntry {
00030                 const char* key;
00031                 int val;
00032         };
00033 
00034         enum StrategiesEnum {
00035                 S_HSVI,
00036                 S_FSVIHSVI,
00037                 S_PERSEUS,
00038                 S_PBVI,
00039                 S_SARSOP,
00040                 S_GES,
00041                 S_FSVI,
00042                 S_COLLECT,
00043                 S_CA,
00044                 S_BP,
00045                 S_BPS
00046         };
00047 
00048         class SolverParams  : public MObject
00049         {
00050         public:
00051 
00052                 unsigned long memoryLimit; // memory limit in bytes
00053                 bool useLookahead;
00054                 string policyFile;
00055                 string outputFile;
00056                 string problemName;
00057                 string stateMapFile;
00058                 string problemBasenameWithoutPath;
00059                 string problemBasenameWithPath;
00060                 string policyGraphFile;
00061                 string hardcodedProblem;
00062 
00063                 int graphDepth;
00064                 int graphMaxBranch;
00065                 double graphProbThreshold;
00066 
00067                 bool MDPSolution;
00068                 bool QMDPSolution;
00069                 bool FIBSolution;
00070 
00071                 int simLen;
00072                 int simNum;
00073                 int seed;
00074 
00075                 const char* cmdName;
00076                 int strategy;
00077                 int targetTrials;
00078                 //const char *probName;
00079                 double targetPrecision;
00080                 bool useFastParser; // use fast parser to load POMDP ? applicable to RockSample only
00081                 bool doConvertPOMDP; // convert POMDPX to POMDP for initialization, take more memory, but may result in faster initialization
00082                 string outPolicyFileName;
00083                 double interval;
00084                 double timeoutSeconds;
00085                 double delta; // Delta pruning parameter
00086                 double overPruneThreshold;
00087                 double lowerPruneThreshold;
00088                 bool    dynamicDeltaPercentageMode;
00089                 double BP_IMPROVEMENT_CONSTANT;
00090 
00091                 bool dumpData;//added Xan 07-08-2007
00092                 bool dumpPolicyTrace; // added by Yanzhu
00093                 bool dumpPolicyTraceTime;
00094                 bool randomizationBP;
00095 
00096 
00097                 SolverParams(void);
00098                 void setStrategy(const char* strategyName);
00099                 void inferMissingValues(void);
00100 
00101                 static bool parseCommandLineOption(int argc, char **argv, SolverParams& p);
00102         };
00103 
00104         /*
00105         struct SolverObjects {
00106         PointBasedAlgorithm* solver;
00107         Bounds* bounds;
00108         POMDP* problem;
00109         //  SimulationEngine* sim;
00110         };
00111 
00112         void constructSolverObjects(SolverObjects& obj, const SolverParams& p);
00113         */
00114 }; // namespace momdp
00115 
00116 #endif // INCsolverUtils_h
00117 
00118 /***************************************************************************
00119 * REVISION HISTORY:
00120 *
00121 ***************************************************************************/


appl
Author(s): petercai
autogenerated on Tue Jan 7 2014 11:02:29