Changeset 6183


Ignore:
Timestamp:
12/14/08 13:38:10 (5 years ago)
Author:
wehart
Message:

Merged revisions 6022-6182 via svnmerge from
 https://software.sandia.gov/svn/public/acro/interfaces/trunk

........

r6032 | jdsiiro | 2008-12-07 18:53:11 -0700 (Sun, 07 Dec 2008) | 2 lines


Bugfix to Hooke interface. Fixes ticket #4276.

........

r6040 | wehart | 2008-12-07 20:37:24 -0700 (Sun, 07 Dec 2008) | 2 lines


Update.

........

r6049 | wehart | 2008-12-07 22:51:08 -0700 (Sun, 07 Dec 2008) | 2 lines


Updating parsing mechanism for COLIN optimizers.

........

r6050 | wehart | 2008-12-07 22:51:38 -0700 (Sun, 07 Dec 2008) | 3 lines


Reformatting.
Adding COLIN options that are inherited.

........

r6051 | wehart | 2008-12-07 22:51:53 -0700 (Sun, 07 Dec 2008) | 2 lines


Adding COLIN options that are inherited.

........

r6052 | jdsiiro | 2008-12-07 23:08:24 -0700 (Sun, 07 Dec 2008) | 3 lines


Cleaning up the connection between interfaces and scolib so that scolib
solvers are registered in coliny if they are present.

........

r6053 | wehart | 2008-12-07 23:13:52 -0700 (Sun, 07 Dec 2008) | 2 lines


Adding registration of the reset method.

........

r6057 | wehart | 2008-12-07 23:44:17 -0700 (Sun, 07 Dec 2008) | 2 lines


Update to illustrate OPT++ bug.

........

r6059 | wehart | 2008-12-07 23:47:36 -0700 (Sun, 07 Dec 2008) | 2 lines


Adding OPT++ experiments.

........

r6060 | wehart | 2008-12-07 23:57:49 -0700 (Sun, 07 Dec 2008) | 2 lines


Fixes to link in scolib and register its solvers.

........

r6066 | jdsiiro | 2008-12-08 13:30:46 -0700 (Mon, 08 Dec 2008) | 3 lines


  • fix for logic error introduced in r6060 (see ticket #4282)
  • standardizing colin in-source references to libutilib.a to use libutilib.la

........

r6070 | jdsiiro | 2008-12-08 16:25:11 -0700 (Mon, 08 Dec 2008) | 2 lines


Bugfixes to initialize NLF pointers to NULL

........

r6094 | jdsiiro | 2008-12-10 15:01:44 -0700 (Wed, 10 Dec 2008) | 11 lines


Renaming several core COLIN classes to remove the "Opt" prefix:


This goes a long way toward closing #4217.

........

r6114 | jdsiiro | 2008-12-10 17:40:06 -0700 (Wed, 10 Dec 2008) | 17 lines


Removing deprecated colin headers


Removing deprecated object files:

  • LoadAMPL.cpp (colin)
  • LoadXML.cpp (colin)
  • factory.cpp (scolib & interfaces)


This goes a long way toward addressing ticket #4274.

........

r6130 | wehart | 2008-12-10 21:56:55 -0700 (Wed, 10 Dec 2008) | 2 lines


Misc update to tags, to avoid applying these tests.

........

r6182 | wehart | 2008-12-14 13:37:38 -0700 (Sun, 14 Dec 2008) | 2 lines


Documentation updates.

........

Location:
interfaces/stable/1.0
Files:
3 deleted
22 edited
4 copied

Legend:

Unmodified
Added
Removed
  • interfaces/stable/1.0

  • interfaces/stable/1.0/CHANGELOG

    r4973 r6183  
    55############################################################################### 
    66 
    7 Interfaces 1.0 
     7------------------------------------------------------------------------------- 
     8Interfaces 1.0 (2008/12/14) 
     9------------------------------------------------------------------------------- 
    810 
    911Initial release. 
  • interfaces/stable/1.0/interfaces/APPS.h

    r5787 r6183  
    3030//#include <colin/AppResponseAnalysis.h> 
    3131#include <colin/CommonOptions.h> 
    32 #include <colin/OptSolver.h> 
     32#include <colin/Solver.h> 
    3333#include <utilib/std_headers.h> 
    3434 
     
    5353*/ 
    5454 
    55 class APPS : virtual public colin::OptSolver<colin::UNLP0_problem>, public colin::CommonOptions 
     55class APPS : virtual public colin::Solver<colin::UNLP0_problem>, public colin::CommonOptions 
    5656{ 
    5757 
  • interfaces/stable/1.0/interfaces/Cobyla.h

    r5787 r6183  
    2121#include <acro_config.h> 
    2222#ifdef ACRO_USING_COBYLA 
    23 #include <colin/OptSolver.h> 
     23#include <colin/Solver.h> 
    2424#include <colin/CommonOptions.h> 
    2525 
     
    3131  * this C++ and COBYLA's Fortran code. 
    3232  */ 
    33 class Cobyla : public colin::OptSolver<colin::NLP0_problem>,  
     33class Cobyla : public colin::Solver<colin::NLP0_problem>,  
    3434               public colin::CommonOptions 
    3535{ 
     
    7979 
    8080  /// 
    81   static colin::OptProblem<colin::NLP0_problem>* calcfc_problem; 
     81  static colin::Problem<colin::NLP0_problem>* calcfc_problem; 
    8282 
    8383  /// TODO: why do we need this? 
  • interfaces/stable/1.0/interfaces/DOT.h

    r5787 r6183  
    3131/** An interface to the DOT Conjugate Gradient algorithm. 
    3232*/ 
    33 class DOT_CG : public colin::OptSolver<vector<double> > 
     33class DOT_CG : public colin::Solver<vector<double> > 
    3434{ 
    3535public: 
  • interfaces/stable/1.0/interfaces/Hooke.h

    r5787 r6183  
    2121#include <acro_config.h> 
    2222#ifdef ACRO_USING_THREEPO 
    23 #include <colin/OptSolver.h> 
     23#include <colin/Solver.h> 
    2424#include <colin/CommonOptions.h> 
    2525 
     
    2828/** An interface to the hooke direct search method. 
    2929  */ 
    30 class Hooke : public colin::OptSolver<colin::UNLP0_problem>, 
     30class Hooke : public colin::Solver<colin::UNLP0_problem>, 
    3131              public colin::CommonOptions 
    3232{ 
  • interfaces/stable/1.0/interfaces/MOMHLib.h

    r5804 r6183  
    2222#include <acro_config.h> 
    2323#ifdef ACRO_USING_MOMHLIB 
    24 #include <colin/OptSolver.h> 
     24#include <colin/Solver.h> 
    2525#include <colin/CommonOptions.h> 
    2626#include <utilib/Normal.h> 
     
    8282 
    8383   /// The COLIN problem 
    84    colin::OptProblem<ProblemT> problem; 
     84   colin::Problem<ProblemT> problem; 
    8585 
    8686}; 
     
    9393*/ 
    9494template <class MProblemT, class MSolutionT, class ProblemT> 
    95 class MOMHLib : virtual public colin::OptSolver<ProblemT>, colin::CommonOptions 
     95class MOMHLib : virtual public colin::Solver<ProblemT>, colin::CommonOptions 
    9696{ 
    9797public: 
     
    9999   /// Constructor 
    100100   MOMHLib() 
    101         : colin::OptSolver<ProblemT>(), CommonOptions(this->option) 
     101        : colin::Solver<ProblemT>(), CommonOptions(this->option) 
    102102        {  
    103103        this->reset_signal.connect( boost::bind( &MOMHLib::reset_MOMHLib, this ) ); 
  • interfaces/stable/1.0/interfaces/Makefile.am

    r5802 r6183  
    2020OPTpp.h\ 
    2121TCC.h\ 
    22 ColinyRegistrations.h 
     22InterfacesRegistrations.h 
    2323 
    2424includeinterfacesdir=$(includedir)/interfaces 
  • interfaces/stable/1.0/interfaces/NPSOL.h

    r5787 r6183  
    1717#define interfaces_NPSOL_h 
    1818 
    19 #include <colin/OptSolver.h> 
     19#include <colin/Solver.h> 
    2020#include <colin/ColinUtilib.h> 
    2121 
     
    2626/// An interface to the NPSOL optimization 
    2727/// 
    28 class NPSOL : public colin::OptSolver<utilib::BasicArray<double> > 
     28class NPSOL : public colin::Solver<utilib::BasicArray<double> > 
    2929{ 
    3030public: 
  • interfaces/stable/1.0/interfaces/OPTpp.h

    r5970 r6183  
    2121#include <acro_config.h> 
    2222#ifdef ACRO_USING_OPTPP 
    23 #include <colin/OptSolver.h> 
     23#include <colin/Solver.h> 
    2424#include <colin/CommonOptions.h> 
    2525 
     
    2929/** A base class for NLP0 optimizers for OPT++ 
    3030  */ 
    31 class OptppNLP0 : public colin::OptSolver<colin::NLP0_problem> 
     31class OptppNLP0 : public colin::Solver<colin::NLP0_problem> 
    3232{ 
    3333public: 
     
    6363/** A base class for NLP1 optimizers for OPT++ 
    6464  */ 
    65 class OptppNLP1 : public colin::OptSolver<colin::NLP1_problem> 
     65class OptppNLP1 : public colin::Solver<colin::NLP1_problem> 
    6666{ 
    6767public: 
     
    9797/** A base class for NLP2 optimizers for OPT++ 
    9898  */ 
    99 class OptppNLP2 : public colin::OptSolver<colin::NLP2_problem> 
     99class OptppNLP2 : public colin::Solver<colin::NLP2_problem> 
    100100{ 
    101101public: 
     
    243243      option.add("var_scale", sx, 
    244244                 "Variable scaling"); 
     245 
     246      option.enable("debug"); 
     247      option.enable("max_neval"); 
     248      option.enable("max_iters"); 
    245249   } 
    246250 
     
    277281 
    278282 
    279 class NewtonOptions  
     283class NewtonOptions 
    280284{ 
    281285public: 
     
    283287   NewtonOptions(utilib::OptionParser& option) 
    284288   { 
    285 strategy="TrustRegion"; 
    286 option.add("search-strategy",strategy, 
    287     "Set the globalization strategy: LineSearch, TrustRegion, or TrustPDS"); 
    288  
    289 TR_size=0.0; 
    290 option.add("tr-size",TR_size, 
    291     "The size of the trust region.  If this is set to zero, then at runtime the trust  region is initialized to the gradient multiplier * norm of gradient"); 
    292  
    293 gradMult=0.1; 
    294 option.add("gradient-multiplier",gradMult, 
    295     "Multiplier for scaling gradient norm to set trust region size"); 
    296  
    297 searchSize=64; 
    298 option.add("trustPDS-size",searchSize, 
    299     "Number of pattern points for TrustPDS"); 
     289      strategy = "TrustRegion"; 
     290      option.add("search-strategy", strategy, 
     291                 "Set the globalization strategy: LineSearch, TrustRegion, or TrustPDS"); 
     292 
     293      TR_size = 0.0; 
     294      option.add("tr-size", TR_size, 
     295                 "The size of the trust region.  If this is set to zero, then at runtime the trust  region is initialized to the gradient multiplier * norm of gradient"); 
     296 
     297      gradMult = 0.1; 
     298      option.add("gradient-multiplier", gradMult, 
     299                 "Multiplier for scaling gradient norm to set trust region size"); 
     300 
     301      searchSize = 64; 
     302      option.add("trustPDS-size", searchSize, 
     303                 "Number of pattern points for TrustPDS"); 
    300304   } 
    301305 
     
    308312   void set_options(OptT* opt, NLFT* nlf, ProblemT& problem) 
    309313   { 
    310    if (problem->enforcing_domain_bounds()) 
    311        opt->setSearchStrategy(OPTPP::LineSearch); 
    312     else { 
    313     if (strategy == "TrustRegion") 
    314        opt->setSearchStrategy(OPTPP::TrustRegion); 
    315     else if (strategy == "LineSearch") 
    316        opt->setSearchStrategy(OPTPP::LineSearch); 
    317     else if (strategy == "TrustPDS") 
    318        opt->setSearchStrategy(OPTPP::TrustPDS); 
    319     else 
    320        EXCEPTION_MNGR(std::runtime_error, "Unexpected value for option 'search-        strategy': '" << strategy << "'. Expected values are TrustRegion, LineSearch and       TrustPDS"); 
    321     } 
    322 opt->setTRSize(TR_size); 
    323 opt->setGradMult(gradMult); 
    324 opt->setSearchSize(searchSize); 
     314      if (problem->enforcing_domain_bounds()) 
     315         opt->setSearchStrategy(OPTPP::LineSearch); 
     316      else 
     317      { 
     318         if (strategy == "TrustRegion") 
     319            opt->setSearchStrategy(OPTPP::TrustRegion); 
     320         else if (strategy == "LineSearch") 
     321            opt->setSearchStrategy(OPTPP::LineSearch); 
     322         else if (strategy == "TrustPDS") 
     323            opt->setSearchStrategy(OPTPP::TrustPDS); 
     324         else 
     325            EXCEPTION_MNGR(std::runtime_error, "Unexpected value for option 'search-        strategy': '" << strategy << "'. Expected values are TrustRegion, LineSearch and       TrustPDS"); 
     326      } 
     327      opt->setTRSize(TR_size); 
     328      opt->setGradMult(gradMult); 
     329      opt->setSearchSize(searchSize); 
    325330   } 
    326331 
     
    405410   template <class OptT> 
    406411   void set_options(OptT* opt) 
    407     { 
    408     if (MeritFcn == "NormFmu") 
    409         opt->setMeritFcn(OPTPP::NormFmu); 
    410     else if (MeritFcn == "ArgaezTapia") 
    411         opt->setMeritFcn(OPTPP::ArgaezTapia); 
    412     else if (MeritFcn == "VanShanno") 
    413         opt->setMeritFcn(OPTPP::VanShanno); 
    414     else 
    415         EXCEPTION_MNGR(std::runtime_error, "Unknown value for option 'merit-fn': '" << MeritFcn << "'. Expected NormFmu, ArgaezTapia or VanShanno"); 
    416     if (sigmin > 0.0) 
    417         opt->setCenteringParameter(sigmin); 
    418     if (taumin > 0.0) 
    419         opt->setStepLengthToBdry(sigmin); 
    420     } 
    421  
    422    /// 
    423    std::string define_solver_type() const 
    424       { return "optpp:nips_nlp1"; } 
     412   { 
     413      if (MeritFcn == "NormFmu") 
     414         opt->setMeritFcn(OPTPP::NormFmu); 
     415      else if (MeritFcn == "ArgaezTapia") 
     416         opt->setMeritFcn(OPTPP::ArgaezTapia); 
     417      else if (MeritFcn == "VanShanno") 
     418         opt->setMeritFcn(OPTPP::VanShanno); 
     419      else 
     420         EXCEPTION_MNGR(std::runtime_error, "Unknown value for option 'merit-fn': '" << MeritFcn << "'. Expected NormFmu, ArgaezTapia or VanShanno"); 
     421      if (sigmin > 0.0) 
     422         opt->setCenteringParameter(sigmin); 
     423      if (taumin > 0.0) 
     424         opt->setStepLengthToBdry(sigmin); 
     425   } 
     426 
     427   /// 
     428   std::string define_solver_type() const 
     429   { return "optpp:nips_nlp1"; } 
    425430 
    426431private: 
     
    452457   template <class OptT> 
    453458   void set_options(OptT* opt) 
    454     { 
    455     if (MeritFcn == "NormFmu") 
    456         opt->setMeritFcn(OPTPP::NormFmu); 
    457     else if (MeritFcn == "ArgaezTapia") 
    458         opt->setMeritFcn(OPTPP::ArgaezTapia); 
    459     else if (MeritFcn == "VanShanno") 
    460         opt->setMeritFcn(OPTPP::VanShanno); 
    461     else 
    462         EXCEPTION_MNGR(std::runtime_error, "Unknown value for option 'merit-fn': '" << MeritFcn << "'. Expected NormFmu, ArgaezTapia or VanShanno"); 
    463     if (sigmin > 0.0) 
    464         opt->setCenteringParameter(sigmin); 
    465     if (taumin > 0.0) 
    466         opt->setStepLengthToBdry(sigmin); 
    467     } 
    468  
    469    /// 
    470    std::string define_solver_type() const 
    471       { return "optpp:nips_nlp2"; } 
     459   { 
     460      if (MeritFcn == "NormFmu") 
     461         opt->setMeritFcn(OPTPP::NormFmu); 
     462      else if (MeritFcn == "ArgaezTapia") 
     463         opt->setMeritFcn(OPTPP::ArgaezTapia); 
     464      else if (MeritFcn == "VanShanno") 
     465         opt->setMeritFcn(OPTPP::VanShanno); 
     466      else 
     467         EXCEPTION_MNGR(std::runtime_error, "Unknown value for option 'merit-fn': '" << MeritFcn << "'. Expected NormFmu, ArgaezTapia or VanShanno"); 
     468      if (sigmin > 0.0) 
     469         opt->setCenteringParameter(sigmin); 
     470      if (taumin > 0.0) 
     471         opt->setStepLengthToBdry(sigmin); 
     472   } 
     473 
     474   /// 
     475   std::string define_solver_type() const 
     476   { return "optpp:nips_nlp2"; } 
    472477 
    473478private: 
     
    547552   std::vector<double> vscales; 
    548553   NEWMAT::Matrix simplex_matrix; 
    549    std::string scheme_filename;  
     554   std::string scheme_filename; 
    550555 
    551556protected: 
  • interfaces/stable/1.0/interfaces/TCC.h

    r5787 r6183  
    2323 
    2424#include <utilib/DoubleMatrix.h> 
    25 #include <colin/ColinStdSolver.h> 
    26 #include <colin/ColinReal.h> 
     25#include <colin/Solver.h> 
     26#include <colin/real.h> 
    2727 
    2828namespace interfaces { 
  • interfaces/stable/1.0/src/Makefile.am

    r5850 r6183  
    4242lib/OPTpp.cpp\ 
    4343lib/MOMHLib.cpp\ 
    44 lib/ColinyRegistrations.cpp 
     44lib/InterfacesRegistrations.cpp 
    4545 
    4646FOO= \ 
     
    5252if BUILD_APPSPACK 
    5353APPSPACKLIB= $(top_builddir)/lib/libappspack.a\ 
    54          $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) 
     54         $(LAPACK_LIBS) $(BLAS_LIBS)  
    5555endif 
    5656if BUILD_THREEPO 
     
    7373PEBBLLIB=$(top_builddir)/packages/pebbl/src/libpebbl.a 
    7474endif 
     75if BUILD_SCOLIB 
     76SCOLIB=$(top_builddir)/packages/scolib/src/libscolib.a 
     77endif 
    7578 
    7679#$(top_builddir)/packages/coliny/src/libcoliny.a 
    7780 
    78 LDADD_ACRO_LIBS = $(top_builddir)/packages/interfaces/src/libinterfaces.a\ 
     81LDADD_ACRO_LIBS = libinterfaces.a\ 
     82        $(SCOLIB)\ 
    7983        $(top_builddir)/packages/colin/src/libcolin.a\ 
    8084        $(PEBBLLIB)\ 
     
    9296 
    9397coliny_SOURCES=exec/coliny.cpp exec/funcadd.c 
    94 coliny_DEPENDENCIES=libinterfaces.a $(LDADD_ACRO_LIBS) 
     98coliny_DEPENDENCIES=$(LDADD_ACRO_LIBS) 
    9599endif 
    96100endif 
  • interfaces/stable/1.0/src/exec/coliny.cpp

    r5787 r6183  
    1414// 
    1515 
    16 #include <interfaces/ColinyRegistrations.h> 
     16#include <acro_config.h> 
    1717#include <colin/ColinDriver.h> 
     18 
     19#ifdef ACRO_USING_SCOLIB 
     20#include <scolib/SCORegistrations.h> 
     21#endif 
     22 
     23#include <interfaces/InterfacesRegistrations.h> 
    1824 
    1925int main(int argc, char* argv[]) 
    2026{ 
    21 static_cast<void>(interfaces::StaticInitializers::static_coliny_registrations); 
    22 return colin::colin_driver(argc,argv,"coliny"); 
     27   // bring in (register) each of the interfaces from this package 
     28   static_cast<void> 
     29      (interfaces::StaticInitializers::static_interfaces_registrations); 
     30 
     31#ifdef ACRO_USING_SCOLIB 
     32   // bring in (register) the scolib package solvers, if they is present 
     33   static_cast<void>(scolib::StaticInitializers::static_scolib_registrations); 
     34#endif 
     35 
     36   return colin::colin_driver(argc, argv, "coliny"); 
    2337} 
  • interfaces/stable/1.0/src/lib/APPS.cpp

    r5966 r6183  
    180180   synch_flag(true) 
    181181{ 
     182reset_signal.connect( boost::bind( &APPS::reset_APPS, this ) ); 
     183 
    182184feval_mgr = new ColinyAPPS::FevalMgr(this); 
    183185params = new APPSPACK::Parameter::List; 
     
    223225option.add("profile",profile,  
    224226        "Profile level"); 
     227 
     228option.enable("debug"); 
     229option.enable("max_neval"); 
     230option.enable("max_neval_curr"); 
     231option.enable("accuracy"); 
    225232} 
    226233 
     
    321328   return; 
    322329   } 
    323 if (initial_points->size( problem.application() )) { 
     330if (initial_points->size( problem.application() ) == 0) { 
    324331   solver_status.termination_info = "No-Initial-Point"; 
    325332   solver_status.model_status = colin::model_no_solution_returned; 
  • interfaces/stable/1.0/src/lib/Cobyla.cpp

    r5978 r6183  
    1919#include "cobyla.h" 
    2020#include <utilib/DoubleMatrix.h> 
    21 #include <colin/ConcreteOptSolverHandle.h> 
    2221#include <colin/SolverMngr.h> 
    2322#include <interfaces/Cobyla.h> 
     
    3837BasicArray<colin::real> Cobyla::blower; 
    3938BasicArray<colin::real> Cobyla::bupper; 
    40 colin::OptProblem<colin::NLP0_problem>* Cobyla::calcfc_problem; 
     39colin::Problem<colin::NLP0_problem>* Cobyla::calcfc_problem; 
    4140colin::EvaluationManager Cobyla::static_eval_mngr; 
    4241 
     
    7372 
    7473Cobyla::Cobyla() 
    75     : colin::OptSolver<colin::NLP0_problem>(), 
     74    : colin::Solver<colin::NLP0_problem>(), 
    7675      CommonOptions(this->option) 
    7776{ 
     
    8483option.add("initial_step",initial_step, 
    8584        "Initial step length"); 
     85option.enable("debug"); 
     86option.enable("max_neval"); 
     87option.enable("accuracy"); 
    8688} 
    8789 
     
    128130// Get the initial point 
    129131// 
    130 if (initial_points->size( problem.application() )) { 
     132if (initial_points->size( problem.application() ) == 0) { 
    131133   solver_status.termination_info = "No-Initial-Point"; 
    132134   solver_status.model_status = colin::model_no_solution_returned; 
  • interfaces/stable/1.0/src/lib/Hooke.cpp

    r5978 r6183  
    1515 
    1616#include <acro_config.h> 
    17 #include <colin/ConcreteOptSolverHandle.h> 
    1817#include <colin/SolverMngr.h> 
    1918#include <interfaces/Hooke.h> 
     
    2120using namespace std; 
    2221 
    23 extern int hooke(int,double*,double*,double,double,int);//,int,double); 
     22extern int hooke(int,double*,double*,double,double,int,int,double); 
    2423 
    2524namespace interfaces { 
     
    5857 
    5958Hooke::Hooke() 
    60     : colin::OptSolver<colin::UNLP0_problem>(), 
     59    : colin::Solver<colin::UNLP0_problem>(), 
    6160      colin::CommonOptions(option) 
    6261{ 
     
    7473option.add("min_step_length",epsilon, 
    7574        "The minimum step length"); 
     75 
     76option.enable("debug"); 
     77option.enable("max_iters"); 
     78option.enable("max_neval"); 
     79option.enable("accuracy"); 
    7680} 
    7781 
     
    100104// Get the initial point 
    101105// 
    102 if (initial_points->size( problem.application() )) { 
     106if ( initial_points->size( problem.application() ) == 0 ) { 
    103107   solver_status.termination_info = "No-Initial-Point"; 
    104108   solver_status.model_status = colin::model_no_solution_returned; 
     
    130134curr_solver = this; 
    131135utilib::BasicArray<double> final_point(x.size()); 
    132 int status = hooke(n, x.data(), final_point.data(), rho, epsilon, num_iters);//, num_evals, accuracy); 
     136int status = hooke(n, x.data(), final_point.data(), rho, epsilon, num_iters, num_evals, accuracy); 
    133137// 
    134138// Setup the solver status 
  • interfaces/stable/1.0/src/lib/NSGA2.cpp

    r5787 r6183  
    3030public: 
    3131    void evaluate(double *, int , double *, int); 
    32     coliny_objective(colin::OptProblem<BasicArray<double>,colin::AppResponse_Utilib>* p) : problem(p) {} 
     32    coliny_objective(colin::Problem<BasicArray<double>,colin::AppResponse_Utilib>* p) : problem(p) {} 
    3333         
    34 colin::OptProblem<BasicArray<double>,colin::AppResponse_Utilib>* problem; 
     34colin::Problem<BasicArray<double>,colin::AppResponse_Utilib>* problem; 
    3535}; 
    3636 
  • interfaces/stable/1.0/src/lib/OPTpp.cpp

    r5966 r6183  
    7171       typeid(NEWMAT::ColumnVector), 
    7272       &lexical_cast_to_newmat); 
     73   return true; 
    7374} 
    7475 
     
    9293 
    9394    /// 
    94     colin::OptProblem<colin::UNLP0_problem> problem; 
     95    colin::Problem<colin::UNLP0_problem> problem; 
    9596 
    9697    /// 
     
    215216 
    216217    /// 
    217     colin::OptProblem<colin::UNLP1_problem> problem; 
     218    colin::Problem<colin::UNLP1_problem> problem; 
    218219 
    219220    /// 
     
    376377 
    377378    /// 
    378     colin::OptProblem<colin::UNLP2_problem> problem; 
     379    colin::Problem<colin::UNLP2_problem> problem; 
    379380 
    380381    /// 
     
    569570 
    570571OptppNLP0::OptppNLP0() 
    571 { reset_signal.connect( boost::bind( &OptppNLP0::reset_OptppNLP0, this ) ); } 
     572   : nlf(NULL) 
     573{  
     574   reset_signal.connect( boost::bind( &OptppNLP0::reset_OptppNLP0, this ) );  
     575} 
    572576 
    573577OptppNLP0::~OptppNLP0() 
    574578{ if (nlf) delete nlf; } 
     579 
    575580 
    576581void OptppNLP0::reset_OptppNLP0() 
     
    584589 
    585590OptppNLP1::OptppNLP1() 
    586 { reset_signal.connect( boost::bind( &OptppNLP1::reset_OptppNLP1, this ) ); } 
     591   : nlf(NULL) 
     592{ 
     593   reset_signal.connect( boost::bind( &OptppNLP1::reset_OptppNLP1, this ) );  
     594} 
    587595 
    588596OptppNLP1::~OptppNLP1() 
     
    599607 
    600608OptppNLP2::OptppNLP2() 
    601 { reset_signal.connect( boost::bind( &OptppNLP2::reset_OptppNLP2, this ) ); } 
     609   : nlf(NULL) 
     610{ 
     611   reset_signal.connect( boost::bind( &OptppNLP2::reset_OptppNLP2, this ) );  
     612} 
    602613 
    603614OptppNLP2::~OptppNLP2() 
  • interfaces/stable/1.0/src/lib/TCC.cpp

    r5787 r6183  
    3939// 
    4040#ifdef ACRO_HAVE_TEMPLATES_AS_TEMPLATE_ARGUMENTS 
    41 static colin::OptProblem<BasicArray<double>,BasicArray > *localFn; 
     41static colin::Problem<BasicArray<double>,BasicArray > *localFn; 
    4242#else 
    43 static colin::OptProblem<BasicArray<double> >* localFn; 
     43static colin::Problem<BasicArray<double> >* localFn; 
    4444#endif 
    4545static BasicArray<double> vec; 
  • interfaces/stable/1.0/test/acro-reps.study.xml

    r5971 r6183  
    55<experimental-study name="acro-reps"> 
    66  <tags> 
    7     <tag>acro</tag> 
     7    <tag>coliny</tag> 
    88  </tags> 
    99 
  • interfaces/stable/1.0/test/acro_test

    r5752 r6183  
    2222# 
    2323def process_log(OUTPUT,logfile): 
    24         status = 1 
    25         leak_flag=False 
    26         valgrind_leaks="-1" 
    27         valgrind_errors="-1" 
    28         if os.path.exists(logfile): 
    29            INPUT = open(logfile,"r") 
    30            for line in INPUT: 
    31              #print "LINE",line 
    32              words = re.split('[ \t]+',line.strip()) 
    33              if len(words) < 2: 
    34                 continue 
     24        status = 1 
     25        leak_flag=False 
     26        valgrind_leaks="-1" 
     27        valgrind_errors="-1" 
     28        if os.path.exists(logfile): 
     29           INPUT = open(logfile,"r") 
     30           for line in INPUT: 
     31             #print "LINE",line 
     32             words = re.split('[ \t]+',line.strip()) 
     33             if len(words) < 2: 
     34                continue 
    3535 
    36              if words[0] == "Final-Value:": 
    37                 status = 0 
    38                 print >>OUTPUT, "Value numeric/double " + words[1] 
     36             if len(words) == 3 and words[0:2] == ["Final","Value:"]: 
     37                status = 0 
     38                print >>OUTPUT, "Value numeric/double " + words[2] 
    3939 
    40              elif words[0] == "Final-Point:": 
    41                 print >>OUTPUT, "Final-Point text/string \""," ".join(words[1:]),"\"" 
     40             elif len(words) >= 3 and words[0:2] == ["Final","Point:"]: 
     41                print >>OUTPUT, "Final-Point text/string \""," ".join(words[2:]),"\"" 
    4242 
    43              elif words[0] == "Final-Stats:": 
    44                 print >>OUTPUT, "Num-Evaluations numeric/integer " + words[2] 
    45                 print >>OUTPUT, "ConstraintViolation numeric/double " + words[4] 
     43             elif len(words) == 5 and words[0:3] == ["Number","of","Evaluations"]: 
     44                print >>OUTPUT, "Num-Evaluations numeric/integer " + words[4] 
    4645 
    47              elif words[0] == "Termination:": 
    48                 print >>OUTPUT, "TerminationStatus text/string \"" + words[1] + "\"" 
     46             elif len(words) == 3 and words[0:2] == ["Constraint","Violation:"]: 
     47                print >>OUTPUT, "ConstraintViolation numeric/double " + words[2] 
    4948 
    50              elif words[0] == "ModelStatus:": 
    51                 print >>OUTPUT, "ModelStatus text/string \"" + words[1] + "\"" 
     49             elif words[0] == "Termination:": 
     50                print >>OUTPUT, "TerminationStatus text/string \"" + words[1] + "\"" 
    5251 
    53              elif words[0] == "SolverStatus:": 
    54                 print >>OUTPUT, "SolverStatus text/string \"" + words[1] + "\"" 
     52             elif words[0] == "ModelStatus:": 
     53                print >>OUTPUT, "ModelStatus text/string \"" + words[1] + "\"" 
    5554 
    56              elif words[0] == "Repetition-Check:": 
    57                 print >>OUTPUT, "Repetition-Check text/string \"" + words[1] + "\"" 
     55             elif words[0] == "SolverStatus:": 
     56                print >>OUTPUT, "SolverStatus text/string \"" + words[1] + "\"" 
    5857 
    59              elif words[0] == "Coliny:" and words[1] == "Solver:": 
    60                 print >>OUTPUT, "Coliny-Solver text/string \"" + words[2] + "\"" 
     58             elif words[0] == "Repetition-Check:": 
     59                print >>OUTPUT, "Repetition-Check text/string \"" + words[1] + "\"" 
    6160 
    62              elif words[0] == "CPU" and words[1] == "RunTime=": 
    63                 print >>OUTPUT, "\"CPU RunTime\" numeric/double " + words[2] 
     61             elif len(words) == 3 and words[0:2] == ["Solver", "Type:"]: 
     62                print >>OUTPUT, "Coliny-Solver text/string \"" + words[2] + "\"" 
    6463 
    65              elif words[0] == "CPU" and words[1] == "TotalTime=": 
    66                 print >>OUTPUT, "\"CPU TotalTime\" numeric/double " + words[2] 
     64             elif len(words) == 4 and words[0:2] == ["CPU","RunTime"]: 
     65                print >>OUTPUT, "\"CPU RunTime\" numeric/double " + words[3] 
    6766 
    68              elif words[0] == "WallClock" and words[1] == "TotalTime=": 
    69                 print >>OUTPUT, "\"WallClock TotalTime\" numeric/double " + words[2] 
     67             elif len(words) == 4 and words[0:2] == ["WallClock","RunTime"]: 
     68                print >>OUTPUT, "\"WallClock RunTime\" numeric/double " + words[3] 
    7069 
    7170             elif words[0] == "Seed:": 
     
    9392        print >>OUTPUT, "\"Valgrind Errors\" numeric/integer " + valgrind_errors 
    9493        print >>OUTPUT, "\"Valgrind Leaks\" numeric/integer " + valgrind_leaks 
    95         print >>OUTPUT, "exit_status numeric/integer " + `status`; 
     94        print >>OUTPUT, "exit_status numeric/integer " + `status`; 
    9695 
    9796 
     
    156155   for key in solver_options[solvers[0]].keys(): 
    157156     if key[0] != '_': 
    158         val = solver_options[solvers[0]][key] 
     157        val = solver_options[solvers[0]][key] 
    159158        try: 
    160159           print >>OUTPUT, key + "=" + val, 
     
    168167        for key in solver_options[solvers[i]].keys(): 
    169168          if key[0] != '_': 
    170              val = solver_options[solvers[i]][key] 
     169             val = solver_options[solvers[i]][key] 
    171170             try: 
    172171                print >>OUTPUT, key + "=" + val, 
  • interfaces/stable/1.0/test/colintest1.mod

    r6022 r6183  
    1 model ../../scolib/etc/ampl/linear1.mod; 
     1model ../../scolib/etc/ampl/text_book.mod; 
    22option solver coliny; 
    3 option coliny_options (" solver=hj:hj accuracy=1.1 "); 
     3option coliny_verbosity "verbose"; 
     4option coliny_options (" solver=optpp:cg max_iters=10 debug=1000 "); 
    45solve; 
Note: See TracChangeset for help on using the changeset viewer.