Commit 7058ddd4 authored by Enrico Gorgone's avatar Enrico Gorgone

added Nriter parameter

the call to FIO->GetNDOSolver()->NrIter() has been deleted and it has been introduced the parameter NrCall
parent e4be6644
......@@ -7,8 +7,8 @@
/*-- object. This class conforms to the interface defined by the class --*/
/*-- MPSolver [see MPSolver.h]. --*/
/*-- --*/
/*-- VERSION 1.75 --*/
/*-- 26 - 01 - 2019 --*/
/*-- VERSION 1.76 --*/
/*-- 09 - 09 - 2019 --*/
/*-- --*/
/*-- Original Idea: --*/
/*-- --*/
......@@ -43,7 +43,7 @@
/*-------------------------------- MACROS ----------------------------------*/
/*--------------------------------------------------------------------------*/
#define WHICH_OSISOLVER 0
#define WHICH_OSISOLVER 1
/* Unfortunately, OsiSolverInterface objects do not do a bunch of things that
underlying solvers actually do, among which
......@@ -72,6 +72,12 @@
/*--------------------------------------------------------------------------*/
#define OSIMPSOLVERLOG 0
/* If OSIMPSOLVERLOG > 0, the OSIMPSolver class produces a log of its
activities on the ostream object and at the "level of verbosity" set with
the method SetMPLog() [see below]. */
#if( OSIMPSOLVERLOG )
#define MSG( l , m ) if( MPLLvl > l ) (*MPLog) << m << flush
#else
......@@ -189,7 +195,9 @@ OSIMPSolver::OSIMPSolver( std::istream *iStrm ) : MPSolver()
MaxTime = 0; // no time limit
OptEps = defOptEps; // default optimality parameter
FsbEps = defFsbEps; // default feasibility parameter
NRCall = 0; // number of calls to SolveMP is zero
// the master is empty- - - - - - - - - - - - - - - - - - - - - - - - - - - -
MaxBSize = 0; // max bundle is zero
......@@ -1218,7 +1226,7 @@ OSIMPSolver::MPStatus OSIMPSolver::SolveMP( void )
#if( OSIMPSOLVERLOG )
if( osiSlvr && MPLLvl > 1 && nc && nr ) {
std::strstream filename;
filename << "MP_" << FIO->GetNDOSolver()->NrIter() << ".lp" << std::ends;
filename << "MP_" << NRCall++ << ".lp" << std::ends;
// use native solver API when possible, because OSI ignores (and,
// therefore, does not print) the quadratic objective, if any
#if WHICH_OSISOLVER == 1
......@@ -3424,6 +3432,8 @@ void OSIMPSolver::cleanup( void )
t = 1;
first = true;
MaxBSize = 0;
NRCall = 0;
} // end( OSIMPSolver::cleanup )
......
......@@ -6,9 +6,9 @@
* Bundle algorithms using a generic OSISolverInterface object. This class
* conforms to the interface defined by the class MPSolver [see MPSolver.h].
*
* \version 1.32
* \version 1.33
*
* \date 27 - 01 - 2019
* \date 09 - 09 - 2019
*
* \author Antonio Frangioni (original idea & implementation)\n
* Operations Research Group \n
......@@ -55,14 +55,6 @@
it may be useless (and therefore better avoided for higher efficiency in
both space and time) with certain OsiSolvers. */
/*--------------------------------------------------------------------------*/
#define OSIMPSOLVERLOG 0
/* If OSIMPSOLVERLOG > 0, the OSIMPSolver class produces a log of its
activities on the ostream object and at the "level of verbosity" set with
the method SetMPLog() [see below]. */
/*--------------------------------------------------------------------------*/
/*------------------------------ INCLUDES ----------------------------------*/
/*--------------------------------------------------------------------------*/
......@@ -513,6 +505,8 @@ class OSIMPSolver : public MPSolver
#endif
CoinMessageHandler *derhand;
Index NRCall; ///< number of calls to SolveMP procedure
/*--------------------------------------------------------------------------*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment