Changeset 1542


Ignore:
Timestamp:
Jan 19, 2010 6:16:39 PM (10 years ago)
Author:
pbonami
Message:

Changes to options reports

Location:
trunk/Bonmin/src/Interfaces
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Bonmin/src/Interfaces/BonOsiTMINLPInterface.cpp

    r1536 r1542  
    5757                             "all", "run all available solvers at each node",
    5858                             "Note that option will work only if the specified solver has been installed. Ipopt will usualy be installed with Bonmin by default. For FilterSQP please see http://www-unix.mcs.anl.gov/~leyffer/solvers.html on how to obtain it and https://projects.coin-or.org/Bonmin/wiki/HintTricks on how to configure Bonmin to use it.");
    59   roptions->setOptionExtraInfo("nlp_solver",15);
     59  roptions->setOptionExtraInfo("nlp_solver",127);
    6060  roptions->AddBoundedIntegerOption("nlp_log_level",
    6161                                    "specify NLP solver interface log level (independent from ipopt print_level).",
     
    6464                                    "0 - none, 1 - normal, 2 - verbose"
    6565                                   );
    66   roptions->setOptionExtraInfo("nlp_log_level",15);
     66  roptions->setOptionExtraInfo("nlp_log_level",127);
    6767
    6868  roptions->AddStringOption2("file_solution",
     
    7171       "yes","",
    7272       "no","","");
     73  roptions->setOptionExtraInfo("file_solution",127);
    7374
    7475  roptions->AddStringOption3("warm_start",
     
    111112   "When the number of iterations to solve a node is above this number, the subproblem at this"
    112113   " node is considered to be suspect and it will be outputed in a file (set to -1 to deactivate this).");
    113   roptions->setOptionExtraInfo("num_iterations_suspect",15);
     114  roptions->setOptionExtraInfo("num_iterations_suspect",127);
    114115
    115116 
     
    123124      "try again to solve the failed NLP with $k$ new randomly chosen starting points "
    124125      " or until the problem is solved with success.");
    125   roptions->setOptionExtraInfo("num_retry_unsolved_random_point",15);
     126  roptions->setOptionExtraInfo("num_retry_unsolved_random_point",127);
    126127
    127128
     
    183184(SmartPtr<RegisteredOptions> roptions)
    184185{
    185   roptions->SetRegisteringCategory("Outer Approximation cuts generation", RegisteredOptions::BonminCategory);
     186  roptions->SetRegisteringCategory("Outer Approximation cuts generation discarded options", RegisteredOptions::UndocumentedCategory);
    186187 
    187188  roptions->AddStringOption2("disjunctive_cut_type",
     
    190191      "none", "No disjunctive cuts.",
    191192      "most-fractional", "If discrete variables present, compute disjunction for most-fractional variable");
    192   roptions->setOptionExtraInfo("disjunctive_cut_type",7);
    193 
    194   roptions->AddStringOption2("oa_cuts_scope","Specify if OA cuts added are to be set globally or locally valid",
    195                              "global",
    196                              "local","Cuts are treated as globally valid",
    197                              "global", "Cuts are treated as locally valid",
    198                              "");
    199   roptions->setOptionExtraInfo("oa_cuts_scope",7);
    200 
    201   roptions->AddStringOption2("add_only_violated_oa","Do we add all OA cuts or only the ones violated by current point?",
    202                              "no",
    203                              "no","Add all cuts",
    204                              "yes","Add only violated Cuts","");
    205   roptions->setOptionExtraInfo("add_only_violated_oa",7);
     193  roptions->setOptionExtraInfo("disjunctive_cut_type",119);
    206194
    207195  roptions->AddStringOption4("cut_strengthening_type",
     
    213201                             "sglobal-slocal", "Strengthened global and strengthened local cuts",
    214202                             "");
    215   roptions->setOptionExtraInfo("cut_strengthening_type",7);
     203  roptions->setOptionExtraInfo("cut_strengthening_type",119);
     204
     205  roptions->SetRegisteringCategory("Outer Approximation cuts generation", RegisteredOptions::BonminCategory);
     206
     207  roptions->AddStringOption2("oa_cuts_scope","Specify if OA cuts added are to be set globally or locally valid",
     208                             "global",
     209                             "local","Cuts are treated as globally valid",
     210                             "global", "Cuts are treated as locally valid",
     211                             "");
     212  roptions->setOptionExtraInfo("oa_cuts_scope",119);
     213
     214  roptions->AddStringOption2("add_only_violated_oa","Do we add all OA cuts or only the ones violated by current point?",
     215                             "no",
     216                             "no","Add all cuts",
     217                             "yes","Add only violated Cuts","");
     218  roptions->setOptionExtraInfo("add_only_violated_oa",119);
     219
    216220 
    217221  roptions->AddLowerBoundedNumberOption("tiny_element","Value for tiny element in OA cut",
     
    219223      "We will remove \"cleanly\" (by relaxing cut) an element lower"
    220224      " than this.");
    221   roptions->setOptionExtraInfo("tiny_element",7);
     225  roptions->setOptionExtraInfo("tiny_element",119);
    222226
    223227  roptions->AddLowerBoundedNumberOption("very_tiny_element","Value for very tiny element in OA cut",
     
    225229      "Algorithm will take the risk of neglecting an element lower"
    226230      " than this.");
    227   roptions->setOptionExtraInfo("very_tiny_element",7);
     231  roptions->setOptionExtraInfo("very_tiny_element",119);
    228232
    229233  roptions->AddLowerBoundedIntegerOption("oa_cuts_log_level",
     
    234238                                         "2: always output violation of the cut.\n"
    235239                                         "3: output generated cuts incidence vectors.");
    236   roptions->setOptionExtraInfo("oa_cuts_log_level",7);
     240  roptions->setOptionExtraInfo("oa_cuts_log_level",119);
    237241
    238242}
  • trunk/Bonmin/src/Interfaces/BonRegisteredOptions.cpp

    r1254 r1542  
    1010
    1111#include "BonRegisteredOptions.hpp"
    12 #include "IpSmartPtr.hpp"
     12#include <IpSmartPtr.hpp>
    1313#include <sstream>
    1414#include <climits>
     
    167167
    168168  //Print table header
    169   of<<"\\begin{threeparttable}"<<std::endl
    170     <<"\\caption{\\label{tab:options} "<<std::endl
     169  //of<<"\\begin{threeparttable}"<<std::endl
     170  of<<"\\topcaption{\\label{tab:options} "<<std::endl
    171171    <<"List of options and compatibility with the different algorithms."<<std::endl
    172     <<"}"<<std::endl
    173     <<"\\begin{tabular}{|l|r|r|r|r|r|r|}"
     172    <<"}"<<std::endl;
     173  of<<"\\tablehead{\\hline "<<std::endl
     174    <<"Option & type &  default & {\\tt B-BB} & {\\tt B-OA} & {\\tt B-QG} & {\\tt B-Hyb} & {\\tt B-Ecp} & {\\tt B-iFP} & {\\tt Cbc\\_Par} \\\\"<<std::endl
    174175    <<"\\hline"<<std::endl
    175     <<"Option & type &  default & {\\tt B-BB} & {\\tt B-OA} & {\\tt B-QG} & {\\tt B-Hyb} \\\\"<<std::endl
    176     <<"\\hline"<<std::endl;
     176    <<"\\hline}"<<std::endl;
     177  of<<"\\tabletail{\\hline \\multicolumn{10}{|c|}{continued on next page}\\\\"
     178    <<"\\hline}"<<std::endl;
     179  of<<"\\tablelasttail{\\hline}"<<std::endl;
     180  of<<"{\\tiny"<<std::endl;
     181  of<<"\\begin{xtabular}{|l|r|r|r|r|r|r|r|r|r|}"<<std::endl;
    177182
    178183  //sort options by categories and alphabetical order
     
    193198     registeringCategory = (*i)->RegisteringCategory();
    194199     of<<"\\hline"<<std::endl
    195        <<"\\multicolumn{1}{|c}{} & \\multicolumn{6}{l|}{"
     200       <<"\\multicolumn{1}{|c}{} & \\multicolumn{9}{l|}{"
    196201       <<registeringCategory<<"}\\\\"<<std::endl
    197202       <<"\\hline"<<std::endl;
     
    200205     of<<makeLatex((*i)->Name())<<"& "<<OptionType2Char((*i)->Type())<<"& "
    201206       <<makeLatex(defaultAsString(*i))
    202        <<"& "<<( (isValidForBBB((*i)->Name()))? '+' : '-' )
    203        <<"& "<<( (isValidForBOA((*i)->Name()))? '+' : '-' )
    204        <<"& "<<( (isValidForBQG((*i)->Name()))? '+' : '-' )
    205        <<"& "<<( (isValidForHybrid((*i)->Name()))? '+' : '-' )
     207       <<"& "<<( (isValidForBBB((*i)->Name()))? "$\\surd$" : "-" )
     208       <<"& "<<( (isValidForBOA((*i)->Name()))? "$\\surd$" : "-" )
     209       <<"& "<<( (isValidForBQG((*i)->Name()))? "$\\surd$" : "-" )
     210       <<"& "<<( (isValidForHybrid((*i)->Name()))? "$\\surd$" : "-" )
     211       <<"& "<<( (isValidForBEcp((*i)->Name()))? "$\\surd$" : "-" )
     212       <<"& "<<( (isValidForBiFP((*i)->Name()))? "$\\surd$" : "-" )
     213       <<"& "<<( (isValidForCbc((*i)->Name()))? "$\\surd$" : "-" )
    206214       <<"\\\\"<<std::endl;
    207215   }
    208216   //Print table end
    209217  of<<"\\hline"<<std::endl
    210     <<"\\end{tabular}"<<std::endl
    211     <<"\\begin{tablenotes}"<<std::endl
     218    <<"\\end{xtabular}"<<std::endl;
     219  of<<"}"<<std::endl;
     220#if 0
     221  of<<"\\begin{tablenotes}"<<std::endl
    212222    <<"\\item $\\strut^*$ option is available"<<std::endl
    213223    <<"        for MILP subsolver (it is only passed if the {\\tt milp\\_subsolver} optio"<<std::endl
     
    216226    <<"\\end{tablenotes}"<<std::endl
    217227    <<"\\end{threeparttable} "<<std::endl;
     228#endif
    218229  }
    219230
     
    344355           os.setf(std::ios::left);
    345356           os.width(37);
    346            os<<(*i)->Name();
     357           os<<(*i)->Name()<<" ";
    347358           os.width(10);
    348359           os<<makeNumber(defaultAsString(*i))<<"\t#";
  • trunk/Bonmin/src/Interfaces/BonRegisteredOptions.hpp

    r1254 r1542  
    3131  public:
    3232    enum ExtraOptInfosBits{
    33     validInHybrid=0/** Say that option is valid in Hybrid method.*/,
    34     validInQG/** Say that option is valid in Quesada Grossmann method.*/,
    35     validInOA/**Say that option is valid in outer approximation dec.*/,
    36     validInBBB/** Say that option is valid in the pure branch-and-bound.*/
     33    validInHybrid=0/** Say that option is valid in Hybrid method (1).*/,
     34    validInQG/** Say that option is valid in Quesada Grossmann method (2).*/,
     35    validInOA/**Say that option is valid in outer approximation dec (4).*/,
     36    validInBBB/** Say that option is valid in the pure branch-and-bound (8).*/,
     37    validInEcp/** Say that option is valid in the Ecp (16).*/,
     38    validIniFP/** Say that option is valid in the iFP (32).*/,
     39    validInCbc/** Say that option is valid when using Cbc_Par (64).*/
    3740   };
     41
     42
     43/* Table of values
     44 * only B-Hyb 1
     45 * B-Hyb & B-QG 3
     46 * B-Hyb & B-OA 5
     47 * B-Hyb & B-QG & B-OA & B-ECP 23
     48 */
     49
     50
     51
    3852   enum ExtraCategoriesInfo{
    3953    BonminCategory = 0/** Option category is for Bonmin.*/,
     
    4155    FilterCategory /** Option category for FilterSqp.*/,
    4256    BqpdCategory /** Option category for Bqpd.*/,
    43     CouenneCategory /** Option category for Couenne.*/
     57    CouenneCategory /** Option category for Couenne.*/,
     58    UndocumentedCategory /** Options not yet documented*/
    4459   };
    4560    /** Standard constructor.*/
     
    93108     optionExists(option);
    94109     bonOptInfos_[option] |= 1 << validInBBB;}
     110   
     111   /** Set that option is valid for B-Ecp.*/
     112   inline void optionValidForBEcp(const std::string &option){
     113     optionExists(option);
     114     bonOptInfos_[option] |= 1 << validInEcp;}
     115   
     116   /** Set that option is valid for B-iFP.*/
     117   inline void optionValidForBiFP(const std::string &option){
     118     optionExists(option);
     119     bonOptInfos_[option] |= 1 << validIniFP;}
     120   
     121   /** Set that option is valid for Cbc.*/
     122   inline void optionValidForCbc(const std::string &option){
     123     optionExists(option);
     124     bonOptInfos_[option] |= 1 << validInCbc;}
    95125
    96126
     
    126156     return (i->second) & (1 << validInBBB);
    127157     return true;}
     158
     159   
     160   /** Say if option is valid for B-Ecp.*/
     161   inline bool isValidForBEcp(const std::string &option){
     162     optionExists(option);
     163     std::map<std::string, int>::iterator i = bonOptInfos_.find(option);
     164     if(i != bonOptInfos_.end())
     165     return (i->second) & (1 << validInEcp);
     166     return true;}
     167
     168   
     169   /** Say if option is valid for B-iFP.*/
     170   inline bool isValidForBiFP(const std::string &option){
     171     optionExists(option);
     172     std::map<std::string, int>::iterator i = bonOptInfos_.find(option);
     173     if(i != bonOptInfos_.end())
     174     return (i->second) & (1 << validIniFP);
     175     return true;}
     176
     177   
     178   /** Say if option is valid for Cbc.*/
     179   inline bool isValidForCbc(const std::string &option){
     180     optionExists(option);
     181     std::map<std::string, int>::iterator i = bonOptInfos_.find(option);
     182     if(i != bonOptInfos_.end())
     183     return (i->second) & (1 << validInCbc);
     184     return true;}
     185
     186
    128187   /** Output Latex table of options.*/
    129188   void writeLatexOptionsTable(std::ostream &of, ExtraCategoriesInfo which);
Note: See TracChangeset for help on using the changeset viewer.