Changeset 1408


Ignore:
Timestamp:
Apr 5, 2009 2:59:39 AM (11 years ago)
Author:
pbonami
Message:

Fix bonmin.opt

Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:externals
      •  

        old new  
        1313Ipopt https://projects.coin-or.org/svn/Ipopt/trunk/Ipopt
        1414Osi https://projects.coin-or.org/svn/Osi/trunk/Osi
        15 Bcp https://projects.coin-or.org/svn/Bcp/trunk/Bcp
  • trunk/Bonmin/src/Algorithms/Makefile.am

    r1407 r1408  
    103103includecoin_HEADERS = \
    104104          BonBabSetupBase.hpp \
     105          BonSubMipSolver.hpp \
    105106          BonBonminSetup.hpp
    106107 
  • trunk/Bonmin/src/Algorithms/Makefile.in

    r1407 r1408  
    414414includecoin_HEADERS = \
    415415          BonBabSetupBase.hpp \
     416          BonSubMipSolver.hpp \
    416417          BonBonminSetup.hpp
    417418
  • trunk/Bonmin/src/CbcBonmin/Heuristics/BonPumpForMinlp.cpp

    r1404 r1408  
    3636  PumpForMinlp::solution(double & objectiveValue,
    3737                                 double * newSolution){
    38     if(model_->getNodeCount() || model_->getCurrentPassNumber() > 1) return 0;
     38    //if(model_->getNodeCount() || model_->getCurrentPassNumber() > 1) return 0;
     39    if(model_->getSolutionCount()) return 0;
    3940    int numberObjects = model_->numberObjects();
    4041    OsiObject ** objects = model_->objects();
     
    6364   roptions->AddStringOption2(
    6465     "pump_for_minlp",
    65      "if yes runs a heuristic which looks like a dummy FP",
    66      "no",
     66     "if yes runs FP for MINLP",
     67     "yes",
    6768     "no", "don't run it",
    6869     "yes", "runs the heuristic",
  • trunk/Bonmin/src/Interfaces/Ampl/BonAmplTMINLP.cpp

    r1326 r1408  
    756756
    757757
    758   void
    759   AmplTMINLP::fillAmplOptionList(AmplOptionsList* amplOptList)
    760   {
    761     amplOptList->AddAmplOption("bonmin.algorithm","bonmin.algorithm",
    762         AmplOptionsList::String_Option,
    763         "Choice of the algorithm.");
    764 
    765     amplOptList->AddAmplOption("bonmin.bb_log_level","bonmin.bb_log_level",
    766         AmplOptionsList::Integer_Option,
    767         "specify BB log level");
    768 
    769     amplOptList->AddAmplOption("bonmin.lp_log_level","bonmin.lp_log_level",
    770         AmplOptionsList::Integer_Option,
    771         "specify sub-LP log level");
    772 
    773     amplOptList->AddAmplOption("bonmin.milp_log_level","bonmin.milp_log_level",
    774         AmplOptionsList::Integer_Option,
    775         "specify sub-MILP log level");
    776 
    777     amplOptList->AddAmplOption("bonmin.oa_log_level","bonmin.oa_log_level",
    778         AmplOptionsList::Integer_Option,
    779         "specify OA log level");
    780 
    781     amplOptList->AddAmplOption("bonmin.oa_log_frequency","bonmin.oa_log_frequency",
    782         AmplOptionsList::Number_Option,
    783         "specify OA log frequency");
    784 
    785     amplOptList->AddAmplOption("bonmin.nlp_log_level","bonmin.nlp_log_level",
    786         AmplOptionsList::Integer_Option,
    787         "specify sub-NLP log level");
    788 
    789     amplOptList->AddAmplOption("bonmin.print_user_options","bonmin.print_user_options",
    790         AmplOptionsList::String_Option,
    791         "print options list");
    792 
    793     amplOptList->AddAmplOption("bonmin.bb_log_interval","bonmin.bb_log_interval",
    794         AmplOptionsList::Integer_Option,
    795         "Interval at which bound output is given");
    796 
    797     amplOptList->AddAmplOption("bonmin.allowable_gap","bonmin.allowable_gap",
    798         AmplOptionsList::Number_Option,
    799         "Specify allowable absolute gap");
    800 
    801     amplOptList->AddAmplOption("bonmin.allowable_fraction_gap","bonmin.allowable_fraction_gap",
    802         AmplOptionsList::Number_Option,
    803         "Specify allowable relative gap");
    804 
    805     amplOptList->AddAmplOption("bonmin.cutoff_decr","bonmin.cutoff_decr",
    806         AmplOptionsList::Number_Option,
    807         "Specify cutoff decrement");
    808 
    809     amplOptList->AddAmplOption("bonmin.cutoff","bonmin.cutoff",
    810         AmplOptionsList::Number_Option,
    811         "Specify cutoff");
    812 
    813     amplOptList->AddAmplOption("bonmin.node_comparison","bonmin.node_comparison",
    814         AmplOptionsList::String_Option,
    815         "Choose the node comparison function");
    816 
    817     amplOptList->AddAmplOption("bonmin.tree_search_strategy","bonmin.tree_search_strategy",
    818         AmplOptionsList::String_Option,
    819         "Choose the node selection strategy");
    820 
    821     amplOptList->AddAmplOption("bonmin.variable_selection","bonmin.variable_selection",
    822         AmplOptionsList::String_Option,
    823         "Choose the variable selection strategy");
    824 
    825     /*amplOptList->AddAmplOption("couenne.branch_pt_select","couenne.branch_pt_select",
    826         AmplOptionsList::String_Option,
    827         "Choose policy to select branching point");*/
    828 
    829     amplOptList->AddAmplOption("bonmin.number_strong_branch", "bonmin.number_strong_branch",
    830         AmplOptionsList::Integer_Option,
    831         "Chooes number of variable for strong branching");
    832 
    833     amplOptList->AddAmplOption("bonmin.number_before_trust", "bonmin.number_before_trust",
    834         AmplOptionsList::Integer_Option,
    835         "Set number of branches on a variable before its pseudo-costs are to be believed");
    836 
    837     amplOptList->AddAmplOption("bonmin.time_limit", "bonmin.time_limit",
    838         AmplOptionsList::Number_Option,
    839         "Set maximum computation time for Algorithm");
    840 
    841     amplOptList->AddAmplOption("bonmin.node_limit","bonmin.node_limit",
    842         AmplOptionsList::Integer_Option,
    843         "Set maximum number of nodes explored");
    844 
    845     amplOptList->AddAmplOption("bonmin.solution_limit","bonmin.solution_limit",
    846         AmplOptionsList::Integer_Option,
    847         "Set maximum of new best integer before aborting.");
    848 
    849     amplOptList->AddAmplOption("bonmin.iteration_limit","bonmin.iteration_limit",
    850         AmplOptionsList::Integer_Option,
    851         "Set cummulated maximum number of iterations in sub-algorithm used for nodes relaxations");
    852 
    853     amplOptList->AddAmplOption("bonmin.integer_tolerance", "bonmin.integer_tolerance",
    854         AmplOptionsList::Number_Option,
    855         "Set integer tolerance");
    856 
    857     amplOptList->AddAmplOption("bonmin.warm_start","bonmin.warm_start",
    858         AmplOptionsList::String_Option,
    859         "Set warm start method");
    860 
    861     amplOptList->AddAmplOption("bonmin.sos_constraints","bonmin.sos_constraints",
    862         AmplOptionsList::String_Option,
    863         "Disable SOS contraints");
    864 
    865     amplOptList->AddAmplOption("bonmin.max_random_point_radius",
    866         "bonmin.max_random_point_radius",
    867         AmplOptionsList::Number_Option,
    868         "Set max value for a random point");
    869 
    870     amplOptList->AddAmplOption("bonmin.max_consecutive_failures",
    871         "bonmin.max_consecutive_failures",
    872         AmplOptionsList::Integer_Option,
    873         "Number of consecutive unsolved problems before aborting.");
    874 
    875     amplOptList->AddAmplOption("bonmin.num_iterations_suspect",
    876         "bonmin.num_iterations_suspect",
    877         AmplOptionsList::Integer_Option,
    878         "Number of iteration over which a node is considered suspect");
    879 
    880     amplOptList->AddAmplOption("bonmin.nlp_failure_behavior",
    881         "bonmin.nlp_failure_behavior",
    882         AmplOptionsList::String_Option,
    883         "Set the behavior when the nlp fails.");
    884 
    885     amplOptList->AddAmplOption("bonmin.num_retry_unsolved_random_point",
    886         "bonmin.num_retry_unsolved_random_point",
    887         AmplOptionsList::Integer_Option,
    888         "Number of tries to resolve a failed NLP with a random starting point");
    889 
    890     amplOptList->AddAmplOption("bonmin.max_consecutive_infeasible",
    891         "bonmin.max_consecutive_infeasible",
    892         AmplOptionsList::Integer_Option,
    893         "Number of consecutive infeasible problems before continuing a"
    894         " branch.");
    895 
    896     amplOptList->AddAmplOption("bonmin.num_resolve_at_root", "bonmin.num_resolve_at_root",
    897         AmplOptionsList::Integer_Option,
    898         "Number of tries to resolve the root node with different starting point (only usefull in non-convex).");
    899 
    900     amplOptList->AddAmplOption("bonmin.num_resolve_at_node","bonmin.num_resolve_at_node",
    901         AmplOptionsList::Integer_Option,
    902         "Number of tries to resolve a non root node with different starting point (only usefull in non-convex).");
    903 
    904 
    905     amplOptList->AddAmplOption("bonmin.nlp_solve_frequency","bonmin.nlp_solve_frequency",
    906         AmplOptionsList::Integer_Option,
    907         "Specify the frequency at which nlp relaxations are solved in hybrid.");
    908 
    909     amplOptList->AddAmplOption("bonmin.filmint_ecp_cuts","bonmin.filmint_ecp_cuts",
    910         AmplOptionsList::Integer_Option,
    911         "Specify the frequency (in terms of nodes) at which some a la filmint ecp cuts are generated.");
    912 
    913     amplOptList->AddAmplOption("bonmin.couenne_ecp_cuts","bonmin.couenne_ecp_cuts",
    914         AmplOptionsList::Integer_Option,
    915         "Specify the frequency (in terms of nodes) at which couenne cuts are generated.");
    916 
    917     amplOptList->AddAmplOption("bonmin.oa_dec_time_limit", "bonmin.oa_dec_time_limit",
    918         AmplOptionsList::Number_Option,
    919         "Specify the maximum amount of time spent in OA decomposition iteratrions.");
    920 
    921     amplOptList->AddAmplOption("bonmin.tiny_element","bonmin.tiny_element",
    922         AmplOptionsList::Number_Option,
    923         "Value for tiny element in OA cut");
    924 
    925     amplOptList->AddAmplOption("bonmin.very_tiny_element","bonmin.very_tiny_element",
    926         AmplOptionsList::Number_Option,
    927         "Value for very tiny element in OA cut");
    928 
    929     amplOptList->AddAmplOption("bonmin.milp_subsolver", "bonmin.milp_subsolver",
    930         AmplOptionsList::String_Option,
    931         "Choose the subsolver to solve MILPs sub-problems in OA decompositions.");
    932 
    933     amplOptList->AddAmplOption("bonmin.Gomory_cuts", "bonmin.Gomory_cuts",
    934         AmplOptionsList::Integer_Option,
    935         "Frequency for Generating Gomory cuts in branch-and-cut.");
    936 
    937     amplOptList->AddAmplOption("bonmin.probing_cuts", "bonmin.probing_cuts",
    938         AmplOptionsList::Integer_Option,
    939         "Frequency for Generating probing cuts in branch-and-cut");
    940 
    941     amplOptList->AddAmplOption("bonmin.cover_cuts", "bonmin.cover_cuts",
    942         AmplOptionsList::Integer_Option,
    943         "Frequency for Generating cover cuts in branch-and-cut");
    944 
    945 
    946     amplOptList->AddAmplOption("bonmin.mir_cuts", "bonmin.mir_cuts",
    947         AmplOptionsList::Integer_Option,
    948         "Frequency for Generating MIR cuts in branch-and-cut");
    949 
    950   }
    951 
    952758  /** This method to returns the value of an alternative objective function for
    953759  upper bounding (if one has been declared by using the prefix UBObj).*/
  • trunk/Bonmin/src/Interfaces/Ampl/BonAmplTMINLP.hpp

    r1254 r1408  
    203203    virtual void getLinearPartOfObjective(double * obj);
    204204
    205 
    206     /** Method to add the extra option for ampl */
    207     void fillAmplOptionList(AmplOptionsList* amplOptList);
    208 
    209205    /** Do we have an alternate objective for upper bounding?*/
    210206    virtual bool hasUpperBoundingObjective()
  • trunk/Bonmin/src/Interfaces/BonOsiTMINLPInterface.cpp

    r1401 r1408  
    17481748void
    17491749OsiTMINLPInterface::getOuterApproximation(OsiCuts &cs, const double * x,
    1750                                           bool getObj, const double * x2,
     1750                                          int getObj, const double * x2,
    17511751                                          double theta, bool global)
    17521752{
     
    18941894  delete [] cut2rowIdx;
    18951895
    1896   if(getObj && !problem_->hasLinearObjective()) { // Get the objective cuts
    1897     printf("Generating obj cut\n");
     1896  if(getObj == 2 || (getObj && !problem_->hasLinearObjective())) { // Get the objective cuts
    18981897    double * obj = new double [n];
    18991898    problem_to_optimize_->eval_grad_f(n, x, 1,obj);
     
    19521951    }
    19531952    delete [] obj;
     1953    }
     1954    else{
     1955      printf("Objective is linear\n");
    19541956    }
    19551957
  • trunk/Bonmin/src/Interfaces/BonOsiTMINLPInterface.hpp

    r1397 r1408  
    852852      If x2 is different from NULL only add cuts violated by x2.
    853853   (Only get outer-approximations of nonlinear constraints of the problem.)*/
    854   void getOuterApproximation(OsiCuts &cs, bool getObj, const double * x2, bool global)
     854  void getOuterApproximation(OsiCuts &cs, int getObj, const double * x2, bool global)
    855855{
    856856  getOuterApproximation(cs, getColSolution(), getObj, x2, global);
     
    860860      If x2 is different from NULL only add cuts violated by x2.
    861861   (Only get outer-approximations of nonlinear constraints of the problem.)*/
    862   void getOuterApproximation(OsiCuts &cs, const double * x, bool getObj, const double * x2, bool global){
     862  void getOuterApproximation(OsiCuts &cs, const double * x, int getObj, const double * x2, bool global){
    863863    getOuterApproximation(cs, x, getObj, x2, 0., global);}
    864864
     
    866866      If x2 is different from NULL only add cuts violated by x2 by more than delta.
    867867   (Only get outer-approximations of nonlinear constraints of the problem.)*/
    868   virtual void getOuterApproximation(OsiCuts &cs, const double * x, bool getObj, const double * x2,
     868  virtual void getOuterApproximation(OsiCuts &cs, const double * x, int getObj, const double * x2,
    869869                                     double theta, bool global);
    870870
  • trunk/Bonmin/test/bonmin.opt

    r1372 r1408  
    1 jacobian_approximation finite-difference-values
    2 
    31
    42# registering category: Algorithm choice
    53
    6 bonmin.algorithm                            B-Hyb       #Choice of the algorithm.
     4bonmin.algorithm                            B-BB        #Choice of the algorithm.
    75
    86# registering category: Bonmin ecp based strong branching
    97
    108bonmin.ecp_abs_tol_strong                   1e-06       #Set the absolute termination tolerance for ECP rounds in strong branching.
    11 bonmin.ecp_max_rounds_strong                5           #Set the maximal number of rounds of ECP cuts in strong branching.
     9bonmin.ecp_max_rounds_strong                0           #Set the maximal number of rounds of ECP cuts in strong branching.
    1210bonmin.ecp_rel_tol_strong                   0.1         #Set the relative termination tolerance for ECP rounds in strong branching.
     11bonmin.lp_strong_warmstart_method           Basis       #Choose method to use for warm starting lp in strong branching
    1312
    1413# registering category: Branch-and-bound options
     
    1615bonmin.allowable_fraction_gap               0           #Specify the value of relative gap under which the algorithm stops.
    1716bonmin.allowable_gap                        0           #Specify the value of absolute gap under which the algorithm stops.
    18 #AW: THIS IS NON-CONVEX OPTION! REMOVED FOR NOW, AW. bonmin.branch_pt_select                     mid-point      #Chooses branching point selection strategy
    1917bonmin.cutoff                               1e+100      #Specify cutoff value.
    2018bonmin.cutoff_decr                          1e-05       #Specify cutoff decrement.
     19bonmin.enable_dynamic_nlp                   no          #Enable dynamic linear and quadratic rows addition in nlp
    2120bonmin.integer_tolerance                    1e-06       #Set integer tolerance.
    2221bonmin.iteration_limit                      2147483647  #Set the cumulated maximum number of iteration in the algorithm used to process nodes continuous relaxations in the branch-and-bound.
    2322bonmin.nlp_failure_behavior                 stop        #Set the behavior when an NLP or a series of NLP are unsolved by Ipopt (we call unsolved an NLP for which Ipopt is not able to guarantee optimality within the specified tolerances).
    24 bonmin.node_comparison                      dynamic     #Choose the node selection strategy.
     23bonmin.node_comparison                      best-bound  #Choose the node selection strategy.
    2524bonmin.node_limit                           2147483647  #Set the maximum number of nodes explored in the branch-and-bound search.
    2625bonmin.num_cut_passes                       1           #Set the maximum number of cut passes at regular nodes of the branch-and-cut.
     
    3130bonmin.sos_constraints                      enable      #Wether or not to activate SOS constraints.
    3231bonmin.time_limit                           1e+10       #Set the global maximum computation time (in secs) for the algorithm.
    33 bonmin.tree_search_strategy                 top-node    #Pick a strategy for traversing the tree
    34 bonmin.variable_selection                       strong-branching        #Chooses variable selection strategy
     32bonmin.tree_search_strategy                 probed-dive #Pick a strategy for traversing the tree
     33bonmin.variable_selection                   strong-branching    #Chooses variable selection strategy
    3534
    3635# registering category: Diving options
     
    3938bonmin.max_dive_depth                       2147483647  #When using dfs-dive search. Maximum depth to go to from the diving board (node where the diving started.
    4039bonmin.stop_diving_on_cutoff                no          #Flag indicating whether we stop diving based on guessed feasible objective and the current cutoff
     40
     41# registering category: Feasibility pump heuristic
     42
     43bonmin.feasibility_pump_objective_norm      1           #Norm of feasibility pump objective function
     44bonmin.heuristic_feasibility_pump           no          #whether the heuristic feasibility pump should be used
     45
     46# registering category: Fractional diving MIP heuristic
     47
     48bonmin.heuristic_dive_MIP_fractional        no          #if yes runs the Dive MIP Fractional heuristic
     49
     50# registering category: Fractional diving heuristic
     51
     52bonmin.heuristic_dive_fractional            no          #if yes runs the Dive Fractional heuristic
     53
     54# registering category: Local search based heuristics
     55
     56bonmin.dummy_pump_heuristic                 no          #if yes runs a heuristic which looks like a dummy FP
     57bonmin.fix_and_solve_heuristic              no          #if yes runs a heuristic at root where fixes all variables integer in the continuous solution
     58bonmin.heuristic_RINS                       no          #if yes runs the RINS heuristic
     59bonmin.heuristic_local_branching            no          #if yes runs the LocalBranching heuristic
     60bonmin.pump_for_minlp                       yes         #if yes runs FP for MINLP
    4161
    4262# registering category: MILP cutting planes in hybrid
     
    6484bonmin.nlp_solve_frequency                  10          #Specify the frequency (in terms of nodes) at which NLP relaxations are solved in B-Hyb.
    6585bonmin.nlp_solve_max_depth                  10          #Set maximum depth in the tree at which NLP relaxations are solved in B-Hyb.
     86bonmin.nlp_solves_per_depth                 1e+30       #Set average number of nodes in the tree at which NLP relaxations are solved in B-Hyb for each depth.
    6687
    67 # registering category: Options for MILP subsolver in OA decomposition
     88# registering category: Options for MILP solver
    6889
    69 bonmin.milp_log_level                       0           #specify MILP subsolver log level.
    70 bonmin.milp_subsolver                       Cbc_D       #Choose the subsolver to solve MILP sub-problems in OA decompositions.
     90bonmin.milp_log_level                       0           #specify MILP solver log level.
     91bonmin.milp_solver                          Cbc_D       #Choose the subsolver to solve MILP sub-problems in OA decompositions.
    7192
    7293# registering category: Options for OA decomposition
    7394
    74 bonmin.oa_dec_time_limit                    30          #Specify the maximum number of seconds spent overall in OA decomposition iterations.
     95bonmin.oa_decomposition                     no          #If yes do initial OA decomposition
    7596bonmin.oa_log_frequency                     100         #display an update on lower and upper bounds in OA every n seconds
    7697bonmin.oa_log_level                         1           #specify OA iterations log level.
     
    83104bonmin.ecp_rel_tol                          0           #Set the relative termination tolerance for ECP rounds.
    84105bonmin.filmint_ecp_cuts                     0           #Specify the frequency (in terms of nodes) at which some a la filmint ecp cuts are generated.
     106
     107# registering category: Options for feasibility pump
     108
     109bonmin.fp_log_frequency                     100         #display an update on lower and upper bounds in FP every n seconds
     110bonmin.fp_log_level                         1           #specify FP iterations log level.
    85111
    86112# registering category: Options for non-convex problems
     
    101127bonmin.very_tiny_element                    1e-17       #Value for very tiny element in OA cut
    102128
    103 # registering category: Output ond log-levels ptions
     129# registering category: Output ond log-levels options
    104130
    105131bonmin.bb_log_interval                      100         #Interval at which node level output is printed.
     
    114140bonmin.min_number_strong_branch             0           #Sets minimum number of variables for strong branching (overriding trust)
    115141bonmin.number_before_trust_list             0           #Set the number of branches on a variable before its pseudo costs are to be believed during setup of strong branching candidate list.
     142bonmin.number_look_ahead                    0           #Sets limit of look-ahead strong-branching trials
    116143bonmin.number_strong_branch_root            2147483647  #Maximum number of variables considered for strong branching in root node.
    117144bonmin.setup_pseudo_frac                    0.5         #Proportion of strong branching list that has to be taken from most-integer-infeasible list.
     145bonmin.trust_strong_branching_for_pseudo_cost yes               #Wether or not to trust strong branching results for updating pseudo costs.
     146
     147# registering category: VectorLength diving MIP heuristic
     148
     149bonmin.heuristic_dive_MIP_vectorLength      no          #if yes runs the Dive MIP VectorLength heuristic
     150
     151# registering category: VectorLength diving heuristic
     152
     153bonmin.heuristic_dive_vectorLength          no          #if yes runs the Dive VectorLength heuristic
    118154
    119155# registering category: nlp interface option
  • trunk/Externals

    r1394 r1408  
    1313Ipopt https://projects.coin-or.org/svn/Ipopt/trunk/Ipopt
    1414Osi https://projects.coin-or.org/svn/Osi/trunk/Osi
    15 Bcp https://projects.coin-or.org/svn/Bcp/trunk/Bcp
Note: See TracChangeset for help on using the changeset viewer.