DecompParam.h

Go to the documentation of this file.
00001 //===========================================================================//
00002 // This file is part of the DIP Solver Framework.                            //
00003 //                                                                           //
00004 // DIP is distributed under the Eclipse Public License as part of the        //
00005 // COIN-OR repository (http://www.coin-or.org).                              //
00006 //                                                                           //
00007 // Author: Matthew Galati, SAS Institute Inc. (matthew.galati@sas.com)       //
00008 //                                                                           //
00009 // Conceptual Design: Matthew Galati, SAS Institute Inc.                     //
00010 //                    Ted Ralphs, Lehigh University                          //
00011 //                                                                           //
00012 // Copyright (C) 2002-2015, Lehigh University, Matthew Galati, Ted Ralphs    //
00013 // All Rights Reserved.                                                      //
00014 //===========================================================================//
00015 
00016 #ifndef DECOMP_PARAM_INCLUDED
00017 #define DECOMP_PARAM_INCLUDED
00018 
00019 //===========================================================================//
00020 #include "Decomp.h"
00021 #include "UtilMacros.h"
00022 #include "UtilParameters.h"
00023 
00024 //===========================================================================//
00025 #define PARAM_getSetting(xstr, x) x = param.GetSetting(xstr, x, sec)
00026 
00027 //===========================================================================//
00028 class DecompParam {
00029 
00030 
00031    //----------------------------------------------------------------------//
00036    //----------------------------------------------------------------------//
00037 
00038 public:
00039    int    LogLevel;
00040    int    LogDebugLevel;
00041    int    LogLpLevel;
00042    int    LogIpLevel;
00043 
00044 
00045    //=0 never
00046    //=1 only on error
00047    //=2 dump every model
00048 
00049    int    LogDumpModel;
00050 
00056    int    LogObjHistory;
00057 
00058 
00059    int    LimitInitVars;
00060 
00061    int    DebugLevel;//=0 (default), =1 (extra checks on duals, etc)
00062 
00063    double TolZero;
00064    int    LimitTotalCutIters;
00065    int    LimitTotalPriceIters;
00066    int    LimitRoundCutIters;
00067    int    LimitRoundPriceIters;
00068    double LimitTime;
00069 
00074    int    LimitNodes;
00075 
00076    //---
00077    //--- tailing off when average bound over TailoffLength iterations
00078    //--- has changed less than TailoffPercent
00079    //---
00080 
00081    int    TailoffLength;
00082    double TailoffPercent;
00083    double MasterGapLimit;
00084 
00085    //---
00086    //--- Strategy for switching from cutting to pricing
00087    //--- 0 = Default
00088    //--- 1 = Favor column generation
00089    //--- 2 = Favor cut generation
00090 
00091    int PCStrategy;
00092 
00093    int    CompressColumns;
00094    //num iters between compress
00095    int    CompressColumnsIterFreq;
00096    //don't compress unless number of cols increased by this mult
00097    double CompressColumnsSizeMultLimit;
00098    //do not start compression until master gap is within this limit
00099    double CompressColumnsMasterGapStart;
00100    int    CutDC;
00101    int    CutCGL;
00102 
00103    int    CutCglKnapC;
00104    int    CutCglFlowC;
00105    int    CutCglMir;
00106    int    CutCglClique;
00107    int    CutCglOddHole;
00108    int    CutCglGomory;
00109 
00110    int    SubProbUseCutoff;
00111 
00112    double SubProbGapLimitExact;
00113    double SubProbGapLimitInexact;
00114    double SubProbTimeLimitExact;
00115    double SubProbTimeLimitInexact;
00116    // Notice:
00117    // NumConcurrentThreadsSubProb:  available thread number for parallelizing subproblems
00118    // NumThreadsIPSolver:  thread number for solving each IP subproblem
00119    //
00120    int    NumConcurrentThreadsSubProb;
00121    int    NumThreadsIPSolver;
00122 
00123    int    SubProbNumSolLimit;
00124 
00125    //This option only works with Cpx:
00126    // DecompDualSimplex = 0,
00127    // DecompPrimSimplex = 1,
00128    // DecompBarrier     = 2
00129 
00130    int    SubProbSolverStartAlgo;
00131 
00132    //n = 0: do all blocks each time
00133    //n > 0: do all blocks every n iterations
00134 
00135    int    RoundRobinInterval;
00136 
00137    //TODO: named values in parameters?
00138    //NOT working
00139    //0:RoundRobinRotate:    rotate through blocks in order 0...numBlocks-1
00140    //1:RoundRobinMostNegRC: choose the block with most neg reduced cost
00141    //(in last iter)
00142 
00143    int    RoundRobinStrategy;
00144 
00145    //solve master as IP at end of each node (this should only be done
00146    //  if there are more than one blocks)
00147    //TODO: how often? after every pass?
00148 
00149    int    SolveMasterAsIp;         //{0,1}
00150    int    SolveMasterAsIpFreqNode; //solve every n nodes
00151    int    SolveMasterAsIpFreqPass; //solve every n passes (within one node)
00152    double SolveMasterAsIpLimitTime;
00153    double SolveMasterAsIpLimitGap;
00154 
00155    // DecompDualSimplex = 0,
00156    // DecompPrimSimplex = 1,
00157    // DecompBarrier     = 2
00158 
00159    int    SolveMasterUpdateAlgo;
00160 
00161 
00162    //0 = If a user function is defined, it will use the user function.
00163    //    If the user returns an exact solution, it will not run the built-in
00164    //    IP solve (default).
00165    //    If a user function is not defined, it will use the built-in IP solve.
00166    //1 = Use the built-in IP solve, even if there is a user defines a function.
00167    //2 = Calls the user defined function (if exists) and then calls built-in
00168    //    IP solver (use this for debugging).
00169 
00170    int    SolveRelaxAsIp;
00171 
00172    int    InitVarsWithCutDC;
00173    int    InitVarsWithIP;
00174    int    InitVarsWithIPLimitTime;
00175 
00176    //solve compact formulation first before starting PhaseI
00177    //  hopefully identify infeasibiity in tree quicker
00178 
00179    int    InitCompactSolve;
00180 
00181    bool    DualStab;
00182    double DualStabAlpha;
00183    double DualStabAlphaOrig;
00184 
00185    bool    BreakOutPartial; //DISABLED for now
00186 
00187    //when solving using IP solver, algorithm for initial relaxation
00188    //when solving using IP solver, algorithm for subproblems
00189    //  options= dual, primal, barrier
00190    //string IpAlgoStart;
00191    //string IpAlgoSub;
00192 
00193    bool    BranchEnforceInSubProb;
00194    bool    BranchEnforceInMaster;
00195    int    MasterConvexityLessThan; //0='E', 1='L'
00196    double ParallelColsLimit;       //cosine of angle >, then consider parallel
00197 
00208    int    BranchStrongIter;
00209 
00218    /*
00219     * Check user columns for overlap. The default is true, but this
00220     * can be shut off to speed up the setup.
00221     */
00222 
00223    int DebugCheckBlocksColumns;
00224 
00225    /*
00226     * The following parameters are extended from MILPBlock
00227     * applications but changed to MILP domain
00228     *
00229     */
00230 
00231    std::string DataDir;
00232    std::string Instance;
00233    std::string InstanceFormat;
00234 
00235    /*
00236    * The file defining which rows are in which blocks.
00237    */
00238    std::string BlockFile;
00239 
00267    std::string BlockFileFormat;
00268 
00269    std::string PermuteFile;
00270 
00271    std::string InitSolutionFile;
00272 
00273    int UseNames; // col/row names for debugging
00274    int UseSparse; // create all blocks sparsely
00275    int FullModel; // create full model for CPM or direct
00276    double BestKnownLB;
00277    double BestKnownUB;
00278    double ColumnUB; // hack since missing extreme rays
00279    double ColumnLB; //hack since missing extreme rays
00280 
00281    int ObjectiveSense; //1=min, -1=max
00282    // variable indicates whether to use
00283    // multiple cores to compute concurrently
00284 
00285    bool Concurrent;
00286 
00287    // number of block candidates
00288    int NumBlocksCand;
00289 
00290    // time of concurrent CutOffTime to finalize
00291    // the choice of MILP solution method
00292 
00293    double ConcurrentCutOffTime;
00294 
00295 
00296    std::string CurrentWorkingDir;
00297 
00298    bool SubProbParallel;
00299 
00300    int SubProbParallelType;
00301 
00302    int SubProbParallelChunksize;
00303 
00304    int ConcurrentThreadsNum;
00305 
00306    int BlockNumInput;
00307 
00308    bool BlockFileOutput;
00309 
00310    // The tolerance for checking negative reduced cost
00311    // Typically a small number approaching zero
00312    double RedCostEpsilon;
00313 
00314    double PhaseIObjTol;
00315 
00316    bool CheckSpecialStructure;
00317 
00318    int BlockFileOutputFormat;
00319 
00320    bool SolutionOutputToFile;
00321 
00322    std::string SolutionOutputFileName;
00323 
00324    bool WarmStart;
00325 
00331    //-----------------------------------------------------------------------//
00336    //-----------------------------------------------------------------------//
00337 
00338 public:
00339 
00340    void getSettingsImpl(UtilParameters& param,
00341                         const char*      sec) {
00343       PARAM_getSetting("LogLevel",             LogLevel);
00344       PARAM_getSetting("LogDebugLevel",        LogDebugLevel);
00345       PARAM_getSetting("LogLpLevel",           LogLpLevel);
00346       PARAM_getSetting("LogIpLevel",           LogIpLevel);
00347       PARAM_getSetting("LogDumpModel",         LogDumpModel);
00348       PARAM_getSetting("LogObjHistory",        LogObjHistory);
00349       PARAM_getSetting("LimitInitVars",        LimitInitVars);
00350       PARAM_getSetting("DebugLevel",           DebugLevel);
00351       PARAM_getSetting("TolZero",              TolZero);
00352       PARAM_getSetting("LimitTotalCutIters",   LimitTotalCutIters);
00353       PARAM_getSetting("LimitTotalPriceIters", LimitTotalPriceIters);
00354       PARAM_getSetting("LimitRoundCutIters",   LimitRoundCutIters);
00355       PARAM_getSetting("LimitRoundPriceIters", LimitRoundPriceIters);
00356       PARAM_getSetting("LimitTime",            LimitTime);
00357       PARAM_getSetting("LimitNodes",           LimitNodes);
00358       PARAM_getSetting("TailoffLength",        TailoffLength);
00359       PARAM_getSetting("TailoffPercent",       TailoffPercent);
00360       PARAM_getSetting("MasterGapLimit",       MasterGapLimit);
00361       PARAM_getSetting("PCStrategy",           PCStrategy);
00362       PARAM_getSetting("CompressColumns",      CompressColumns);
00363       PARAM_getSetting("CompressColumnsIterFreq",       CompressColumnsIterFreq);
00364       PARAM_getSetting("CompressColumnsSizeMultLimit",  CompressColumnsSizeMultLimit);
00365       PARAM_getSetting("CompressColumnsMasterGapStart",
00366                        CompressColumnsMasterGapStart);
00367       PARAM_getSetting("CutDC",                CutDC);
00368       PARAM_getSetting("CutCGL",               CutCGL);
00369       PARAM_getSetting("CutCglKnapC",          CutCglKnapC);
00370       PARAM_getSetting("CutCglFlowC",          CutCglFlowC);
00371       PARAM_getSetting("CutCglMir",            CutCglMir);
00372       PARAM_getSetting("CutCglClique",         CutCglClique);
00373       PARAM_getSetting("CutCglOddHole",        CutCglOddHole);
00374       PARAM_getSetting("CutCglGomory",         CutCglGomory);
00375       PARAM_getSetting("SubProbUseCutoff",     SubProbUseCutoff);
00376       PARAM_getSetting("SubProbGapLimitExact", SubProbGapLimitExact);
00377       PARAM_getSetting("SubProbGapLimitInexact", SubProbGapLimitInexact);
00378       PARAM_getSetting("SubProbTimeLimitExact",  SubProbTimeLimitExact);
00379       PARAM_getSetting("SubProbTimeLimitInexact", SubProbTimeLimitInexact);
00380       PARAM_getSetting("NumConcurrentThreadsSubProb", NumConcurrentThreadsSubProb);
00381       PARAM_getSetting("NumThreadsIPSolver", NumThreadsIPSolver);
00382       PARAM_getSetting("SubProbNumSolLimit",     SubProbNumSolLimit);
00383       PARAM_getSetting("SubProbSolverStartAlgo", SubProbSolverStartAlgo);
00384       PARAM_getSetting("RoundRobinInterval",   RoundRobinInterval);
00385       PARAM_getSetting("RoundRobinStrategy",   RoundRobinStrategy);
00386       PARAM_getSetting("SolveMasterAsIp",      SolveMasterAsIp);
00387       PARAM_getSetting("SolveMasterAsIpFreqNode", SolveMasterAsIpFreqNode);
00388       PARAM_getSetting("SolveMasterAsIpFreqPass", SolveMasterAsIpFreqPass);
00389       PARAM_getSetting("SolveMasterAsIpLimitTime", SolveMasterAsIpLimitTime);
00390       PARAM_getSetting("SolveMasterAsIpLimitGap",  SolveMasterAsIpLimitGap);
00391       PARAM_getSetting("SolveMasterUpdateAlgo",    SolveMasterUpdateAlgo);
00392       PARAM_getSetting("SolveRelaxAsIp",       SolveRelaxAsIp);
00393       PARAM_getSetting("InitVarsWithCutDC",    InitVarsWithCutDC);
00394       PARAM_getSetting("InitVarsWithIP",       InitVarsWithIP);
00395       PARAM_getSetting("InitVarsWithIPLimitTime", InitVarsWithIPLimitTime);
00396       PARAM_getSetting("InitCompactSolve",     InitCompactSolve);
00397       PARAM_getSetting("DualStab",             DualStab);
00398       PARAM_getSetting("DualStabAlpha",        DualStabAlpha);
00399       PARAM_getSetting("BreakOutPartial",      BreakOutPartial);
00400       PARAM_getSetting("BranchEnforceInSubProb",  BranchEnforceInSubProb);
00401       PARAM_getSetting("BranchEnforceInMaster",   BranchEnforceInMaster);
00402       PARAM_getSetting("MasterConvexityLessThan", MasterConvexityLessThan);
00403       PARAM_getSetting("ParallelColsLimit",       ParallelColsLimit);
00404       PARAM_getSetting("BranchStrongIter",        BranchStrongIter);
00405       PARAM_getSetting("DebugCheckBlocksColumns", DebugCheckBlocksColumns);
00406       DataDir       = param.GetSetting("DataDir",       "",    "MILP");
00407       Instance      = param.GetSetting("Instance",      "",    "MILP");
00408       InstanceFormat = param.GetSetting("InstanceFormat", "",    "MILP");
00409       BlockFile     = param.GetSetting("BlockFile",     "",    "MILP");
00410       PermuteFile   = param.GetSetting("PermuteFile",   "",    "MILP");
00411       BlockFileFormat
00412       = param.GetSetting("BlockFileFormat",    "",    "MILP");
00413       InitSolutionFile
00414       = param.GetSetting("InitSolutionFile",   "",    "MILP");
00415       PARAM_getSetting("LogLevel", LogLevel);
00416       PARAM_getSetting("UseNames", UseNames);
00417       PARAM_getSetting("UseSparse", UseSparse);
00418       PARAM_getSetting("FullModel", FullModel);
00419       PARAM_getSetting("BestKnownLB", BestKnownLB);
00420       PARAM_getSetting("BestKnownUB", BestKnownUB);
00421       PARAM_getSetting("ColumnUB", ColumnUB);
00422       PARAM_getSetting("ColumnLB", ColumnLB);
00423       PARAM_getSetting("ObjectiveSense", ObjectiveSense);
00424       PARAM_getSetting("BlockNumInput", BlockNumInput);
00425       PARAM_getSetting("Concurrent", Concurrent);
00426       PARAM_getSetting("NumBlocksCand", NumBlocksCand);
00427       PARAM_getSetting("CconcurrentCutOffTime", ConcurrentCutOffTime);
00428       PARAM_getSetting("CurrentWorkingDir", CurrentWorkingDir);
00429       PARAM_getSetting("SubProbParallel", SubProbParallel);
00430       PARAM_getSetting("SubProbParallelType", SubProbParallelType);
00431       PARAM_getSetting("SubProbParallelChunksize", SubProbParallelChunksize);
00432       PARAM_getSetting("ConcurrentThreadsNum", ConcurrentThreadsNum);
00433       PARAM_getSetting("BlockFileOutput", BlockFileOutput);
00434       PARAM_getSetting("RedCostEpsilon", RedCostEpsilon);
00435       PARAM_getSetting("PhaseIObjTol", PhaseIObjTol);
00436       PARAM_getSetting("CheckSpecialStructure", CheckSpecialStructure);
00437       PARAM_getSetting("BlockFileOutputFormat", BlockFileOutputFormat);
00438       PARAM_getSetting("SolutionOutputToFile", SolutionOutputToFile);
00439       PARAM_getSetting("SolutionOutputFileName", SolutionOutputFileName);
00440       PARAM_getSetting("WarmStart", WarmStart);
00441       //---
00442       //--- store the original setting for DualStabAlpha
00443       //---
00444       DualStabAlphaOrig = DualStabAlpha;
00445    }
00446 
00447    inline void getSettings(UtilParameters& param) {
00448       const std::string sec = "DECOMP";
00449       getSettingsImpl(param, sec.c_str());
00450    }
00451 
00452    inline void getSettings(UtilParameters& param,
00453                            const std::string& sec) {
00454       //---
00455       //--- first get any settings that apply across any DECOMP algo
00456       //---    from the [DECOMP] section
00457       //---
00458       getSettingsImpl(param, "DECOMP");
00459       //---
00460       //--- then get any settings that apply to this algo
00461       //---    from the [<sec>] section
00462       //---
00463       getSettingsImpl(param, sec.c_str());
00464    }
00465 
00467    void dumpSettings(const std::string& sec,
00468                      std::ostream*       os = &std::cout) {
00469       (*os) << "\n========================================================";
00470       (*os) << "\nDECOMP PARAMETER SETTINGS\n";
00471       UtilPrintParameter(os, sec, "LogLevel",            LogLevel);
00472       UtilPrintParameter(os, sec, "LogDebugLevel",       LogDebugLevel);
00473       UtilPrintParameter(os, sec, "LogLpLevel",          LogLpLevel);
00474       UtilPrintParameter(os, sec, "LogIpLevel",          LogIpLevel);
00475       UtilPrintParameter(os, sec, "LogDumpModel",        LogDumpModel);
00476       UtilPrintParameter(os, sec, "LogObjHistory",       LogObjHistory);
00477       UtilPrintParameter(os, sec, "LimitInitVars",       LimitInitVars);
00478       UtilPrintParameter(os, sec, "DebugLevel",          DebugLevel);
00479       UtilPrintParameter(os, sec, "TolZero",             TolZero);
00480       UtilPrintParameter(os, sec, "LimitTotalCutIters",  LimitTotalCutIters);
00481       UtilPrintParameter(os, sec, "LimitTotalPriceIters", LimitTotalPriceIters);
00482       UtilPrintParameter(os, sec, "LimitRoundCutIters",  LimitRoundCutIters);
00483       UtilPrintParameter(os, sec, "LimitRoundPriceIters", LimitRoundPriceIters);
00484       UtilPrintParameter(os, sec, "LimitTime",           LimitTime);
00485       UtilPrintParameter(os, sec, "LimitNodes",          LimitNodes);
00486       UtilPrintParameter(os, sec, "TailoffLength",       TailoffLength);
00487       UtilPrintParameter(os, sec, "TailoffPercent",      TailoffPercent);
00488       UtilPrintParameter(os, sec, "MasterGapLimit",      MasterGapLimit);
00489       UtilPrintParameter(os, sec, "PCStrategy",          PCStrategy);
00490       UtilPrintParameter(os, sec, "CompressColumns",     CompressColumns);
00491       UtilPrintParameter(os, sec, "CompressColumnsIterFreq",
00492                          CompressColumnsIterFreq);
00493       UtilPrintParameter(os, sec, "CompressColumnsSizeMultLimit",
00494                          CompressColumnsSizeMultLimit);
00495       UtilPrintParameter(os, sec, "CompressColumnsMasterGapStart",
00496                          CompressColumnsMasterGapStart);
00497       UtilPrintParameter(os, sec, "CutDC",               CutDC);
00498       UtilPrintParameter(os, sec, "CutCGL",              CutCGL);
00499       UtilPrintParameter(os, sec, "CutCglKnapC",         CutCglKnapC);
00500       UtilPrintParameter(os, sec, "CutCglFlowC",         CutCglFlowC);
00501       UtilPrintParameter(os, sec, "CutCglMir",           CutCglMir);
00502       UtilPrintParameter(os, sec, "CutCglClique",        CutCglClique);
00503       UtilPrintParameter(os, sec, "CutCglOddHole",       CutCglOddHole);
00504       UtilPrintParameter(os, sec, "CutCglGomory",        CutCglGomory);
00505       UtilPrintParameter(os, sec, "SubProbUseCutoff",    SubProbUseCutoff);
00506       UtilPrintParameter(os, sec, "SubProbGapLimitExact",
00507                          SubProbGapLimitExact);
00508       UtilPrintParameter(os, sec, "SubProbGapLimitInexact",
00509                          SubProbGapLimitInexact);
00510       UtilPrintParameter(os, sec, "SubProbTimeLimitExact",
00511                          SubProbTimeLimitExact);
00512       UtilPrintParameter(os, sec, "SubProbTimeLimitInexact",
00513                          SubProbTimeLimitInexact);
00514       UtilPrintParameter(os, sec, "NumConcurrentThreadsSubProb",
00515                          NumConcurrentThreadsSubProb);
00516       UtilPrintParameter(os, sec, "NumThreadsIPSolver",  NumThreadsIPSolver);
00517       UtilPrintParameter(os, sec, "SubProbNumSolLimit", SubProbNumSolLimit);
00518       UtilPrintParameter(os, sec, "SubProbSolverStartAlgo",
00519                          SubProbSolverStartAlgo);
00520       UtilPrintParameter(os, sec, "RoundRobinInterval",  RoundRobinInterval);
00521       UtilPrintParameter(os, sec, "RoundRobinStrategy",  RoundRobinStrategy);
00522       UtilPrintParameter(os, sec, "SolveMasterAsIp",     SolveMasterAsIp);
00523       UtilPrintParameter(os, sec, "SolveMasterAsIpFreqNode",
00524                          SolveMasterAsIpFreqNode);
00525       UtilPrintParameter(os, sec, "SolveMasterAsIpFreqPass",
00526                          SolveMasterAsIpFreqPass);
00527       UtilPrintParameter(os, sec, "SolveMasterAsIpLimitTime",
00528                          SolveMasterAsIpLimitTime);
00529       UtilPrintParameter(os, sec, "SolveMasterAsIpLimitGap",
00530                          SolveMasterAsIpLimitGap);
00531       UtilPrintParameter(os, sec, "SolveMasterUpdateAlgo",
00532                          SolveMasterUpdateAlgo);
00533       UtilPrintParameter(os, sec, "SolveRelaxAsIp",     SolveRelaxAsIp);
00534       UtilPrintParameter(os, sec, "InitVarsWithCutDC",   InitVarsWithCutDC);
00535       UtilPrintParameter(os, sec, "InitVarsWithIP",   InitVarsWithIP);
00536       UtilPrintParameter(os, sec, "InitVarsWithIPLimitTime",
00537                          InitVarsWithIPLimitTime);
00538       UtilPrintParameter(os, sec, "InitCompactSolve",  InitCompactSolve);
00539       UtilPrintParameter(os, sec, "DualStab",          DualStab);
00540       UtilPrintParameter(os, sec, "DualStabAlpha",     DualStabAlpha);
00541       UtilPrintParameter(os, sec, "BreakOutPartial",   BreakOutPartial);
00542       UtilPrintParameter(os, sec, "BranchEnforceInSubProb",
00543                          BranchEnforceInSubProb);
00544       UtilPrintParameter(os, sec, "BranchEnforceInMaster",
00545                          BranchEnforceInMaster);
00546       UtilPrintParameter(os, sec, "MasterConvexityLessThan",
00547                          MasterConvexityLessThan);
00548       UtilPrintParameter(os, sec, "ParallelColsLimit", ParallelColsLimit);
00549       UtilPrintParameter(os, sec, "BranchStrongIter",  BranchStrongIter);
00550       UtilPrintParameter(os, sec,
00551                          "DebugCheckBlocksColumns", DebugCheckBlocksColumns);
00552       UtilPrintParameter(os, sec, "LogLevel",  LogLevel);
00553       UtilPrintParameter(os, sec, "DataDir",  DataDir);
00554       UtilPrintParameter(os, sec, "Instance",  Instance);
00555       UtilPrintParameter(os, sec, "InstanceFormat",  InstanceFormat);
00556       UtilPrintParameter(os, sec, "BlockFile",  BlockFile);
00557       UtilPrintParameter(os, sec, "PermuteFile",  PermuteFile);
00558       UtilPrintParameter(os, sec, "BlockFileFormat",  BlockFileFormat);
00559       UtilPrintParameter(os, sec, "InitSolutionFile",  InitSolutionFile);
00560       UtilPrintParameter(os, sec, "UseNames",  UseNames);
00561       UtilPrintParameter(os, sec, "UseSparse",  UseSparse);
00562       UtilPrintParameter(os, sec, "FullModel",  FullModel);
00563       UtilPrintParameter(os, sec, "BestKnownLB",  BestKnownLB);
00564       UtilPrintParameter(os, sec, "BestKnownUB",  BestKnownUB);
00565       UtilPrintParameter(os, sec, "ColumnUB",  ColumnUB);
00566       UtilPrintParameter(os, sec, "ColumnLB",  ColumnLB);
00567       UtilPrintParameter(os, sec, "ObjectiveSense",  ObjectiveSense);
00568       UtilPrintParameter(os, sec, "Concurrent", Concurrent);
00569       UtilPrintParameter(os, sec, "NumBlocksCand", NumBlocksCand);
00570       UtilPrintParameter(os, sec, "ConcurrentCutOffTime", ConcurrentCutOffTime);
00571       UtilPrintParameter(os, sec,  "CurrentWorkingDir", CurrentWorkingDir);
00572       UtilPrintParameter(os, sec, "SubProbParallel", SubProbParallel);
00573       UtilPrintParameter(os, sec, "SubProbParallelType", SubProbParallelType);
00574       UtilPrintParameter(os, sec, "SubProbParallelChunksize",
00575                          SubProbParallelChunksize);
00576       UtilPrintParameter(os, sec, "ConcurrentThreadsNum", ConcurrentThreadsNum);
00577       UtilPrintParameter(os, sec, "BlockNumInput", BlockNumInput);
00578       UtilPrintParameter(os, sec, "BlockFileOutput", BlockFileOutput );
00579       UtilPrintParameter(os, sec, "RedCostEpsilon", RedCostEpsilon);
00580       UtilPrintParameter(os, sec, "PhaseIObjTol", PhaseIObjTol);
00581       UtilPrintParameter(os, sec, "CheckSpecialStructure", CheckSpecialStructure);
00582       UtilPrintParameter(os, sec, "BlockFileOutputFormat", BlockFileOutputFormat);
00583       UtilPrintParameter(os, sec, "SolutionOutputToFile", SolutionOutputToFile);
00584       UtilPrintParameter(os, sec, "SolutionOutputFileName", SolutionOutputFileName);
00585       UtilPrintParameter(os, sec, "WarmStart", WarmStart);
00586       (*os) << "========================================================\n";
00587    }
00588 
00589    void setDefaults() {
00590       LogLevel             = 0;
00591       LogDebugLevel        = 0;
00592       LogLpLevel           = 0;
00593       //verbosity in Symphony allows negative value and 0 is really verbose
00594       // so -1 was set as the default value for Symphony, adjustment is made
00595       // in the corresponding code
00596       LogIpLevel           = 0;
00597       LogDumpModel         = 0;
00598       LogObjHistory        = 0;
00599       LimitInitVars        = 5;
00600       DebugLevel           = 0;
00601       TolZero              = DecompEpsilon;
00602       LimitTotalCutIters   = COIN_INT_MAX;
00603       LimitTotalPriceIters = COIN_INT_MAX;
00604       LimitRoundCutIters   = COIN_INT_MAX;
00605       LimitRoundPriceIters = COIN_INT_MAX;
00606       LimitTime            = DecompBigNum;
00607       LimitNodes           = COIN_INT_MAX;
00608       TailoffLength        = 10;
00609       TailoffPercent       = 0.10;
00610       MasterGapLimit       = 1.0e-6;
00611       PCStrategy           = 0;
00612       CompressColumns      = 1;
00613       CompressColumnsIterFreq       = 2;
00614       CompressColumnsSizeMultLimit  = 1.20;
00615       CompressColumnsMasterGapStart = 0.20;
00616       CutDC                = 0;
00617       CutCGL               = 0;
00618       CutCglKnapC          = 1;
00619       CutCglFlowC          = 1;
00620       CutCglMir            = 1;
00621       CutCglClique         = 1;
00622       CutCglOddHole        = 1;
00623       CutCglGomory         = 1;
00624       SubProbUseCutoff     = 0;
00625       SubProbGapLimitExact   = 0.0001; // 0.01% gap
00626       SubProbGapLimitInexact = 0.1;    //10.00% gap
00627       SubProbTimeLimitExact   = DecompBigNum;
00628       SubProbTimeLimitInexact = DecompBigNum;
00629       NumConcurrentThreadsSubProb       = 4;
00630       NumThreadsIPSolver             = 1;
00631       SubProbNumSolLimit      = 1;
00632       SubProbSolverStartAlgo = DecompDualSimplex;
00633       RoundRobinInterval   = 0;
00634       RoundRobinStrategy   = RoundRobinRotate;
00635       SolveMasterAsIp          = 1;//TODO: turn off if one block
00636       SolveMasterAsIpFreqNode  = 1;
00637       SolveMasterAsIpFreqPass  = 1000;
00638       SolveMasterAsIpLimitTime = 30;
00639       SolveMasterAsIpLimitGap  = 0.05; //5% gap
00640       SolveRelaxAsIp           = 0;
00641       SolveMasterUpdateAlgo    = DecompDualSimplex;
00642       InitVarsWithCutDC        = 0;
00643       InitVarsWithIP           = 0;
00644       InitVarsWithIPLimitTime  = 10;
00645       InitCompactSolve         = 0;
00646       DualStab                 = 0;
00647       DualStabAlpha            = 0.10;
00648       BreakOutPartial          = 0;
00649       BranchEnforceInSubProb   = 1;//usually much better if can
00650       BranchEnforceInMaster    = 0;
00651       MasterConvexityLessThan  = 0;
00652       ParallelColsLimit        = 1.0;
00653       BranchStrongIter         = 0;
00654       DebugCheckBlocksColumns  = false;
00655       /*
00656        * parameters from MILPBlock and to be MILP
00657        */
00658       LogLevel                 = 0;
00659       DataDir                  = "";
00660       Instance                 = "";
00661       InstanceFormat           = "";
00662       BlockFile                = "";
00663       BlockFileFormat          = "";
00664       PermuteFile              = "";
00665       InitSolutionFile         = "";
00666       UseNames                 = 1 ;
00667       UseSparse                = 1 ;
00668       FullModel                = 0 ;
00669       BestKnownLB              = -1.e100;
00670       BestKnownUB              = 1.e100;
00671       ColumnUB                 = 1.e20;
00672       ColumnLB                 = -1.e20;
00673       ObjectiveSense           = 1;
00674       Concurrent               = false;
00675       NumBlocksCand            = 4;
00676       ConcurrentCutOffTime     = 100;
00677       CurrentWorkingDir        = "";
00678       SubProbParallel          = false;
00679       SubProbParallelType      = SubProbScheduleDynamic;
00680       SubProbParallelChunksize = 1;
00681       ConcurrentThreadsNum     = 4;
00682       BlockNumInput            = 0;
00683       BlockFileOutput          = false;
00684       RedCostEpsilon           = 0.0001;
00685       PhaseIObjTol             = 0.0005;
00686       CheckSpecialStructure    = false;
00687       BlockFileOutputFormat    = 0;
00688       SolutionOutputToFile     = true;
00689       SolutionOutputFileName   = "";
00690       WarmStart                = false;
00691    }
00692 
00693    void dumpSettings(std::ostream* os = &std::cout) {
00694       const std::string sec = "DECOMP";
00695       dumpSettings(sec, os);
00696    }
00702    //-----------------------------------------------------------------------//
00707    //-----------------------------------------------------------------------//
00708 public:
00712    DecompParam() {
00713       setDefaults();
00714    }
00715 
00719    ~DecompParam() {}
00723 };
00724 
00725 #endif

Generated on 12 Mar 2015 for Dip-All by  doxygen 1.6.1