14#define OsiSolverInterface ClpSimplex
16#include "OsiSolverInterface.hpp"
17typedef int CoinBigIndex;
19class CoinMessageHandler;
76 void crash(
int numberPass, CoinMessageHandler * handler,
77 const CoinMessages * messages,
bool doCrossover =
true);
117 smallInfeas_ = value;
123 return reasonableInfeas_;
126 reasonableInfeas_ = value;
131 return exitFeasibility_;
134 exitFeasibility_ = value;
139 return majorIterations_;
142 majorIterations_ = value;
184 lightWeight_ = value;
195 return dropEnoughFeasibility_;
198 dropEnoughFeasibility_ = value;
202 return dropEnoughWeighted_;
205 dropEnoughWeighted_ = value;
220 void solve2(CoinMessageHandler * handler,
const CoinMessages *messages);
223 int nrows,
int ncols,
double * rowsol ,
double * colsol,
224 double * pi,
double * djs,
const double * origcost ,
226 double * rowupper,
const double * lower,
227 const double * upper,
const double * element,
228 const int * row,
const CoinBigIndex * colcc,
229 const int * length,
double * lambda,
230 int maxIts,
double mu,
double drop,
231 double maxmin,
double offset,
232 int strategy,
double djTol,
double djExit,
double djFlag,
233 CoinThreadRandom * randomNumberGenerator);
238 IdiotResult objval(
int nrows,
int ncols,
double * rowsol ,
double * colsol,
239 double * pi,
double * djs,
const double * cost ,
240 const double * rowlower,
241 const double * rowupper,
const double * lower,
242 const double * upper,
const double * elemnt,
243 const int * row,
const CoinBigIndex * columnStart,
244 const int * length,
int extraBlock,
int * rowExtra,
245 double * solExtra,
double * elemExtra,
double * upperExtra,
246 double * costExtra,
double weight);
248 int cleanIteration(
int iteration,
int ordinaryStart,
int ordinaryEnd,
249 double * colsol,
const double * lower,
const double * upper,
250 const double * rowLower,
const double * rowUpper,
251 const double * cost,
const double * element,
double fixTolerance,
double & objChange,
252 double & infChange,
double & maxInfeasibility);
263 double reasonableInfeas_;
266 double exitFeasibility_;
267 double dropEnoughFeasibility_;
268 double dropEnoughWeighted_;
272 int majorIterations_;
276 int lambdaIterations_;
#define OsiSolverInterface
This class implements a very silly algorithm.
double getReasonablyFeasible() const
Reasonably feasible.
int getLightweight() const
How lightweight - 0 not, 1 yes, 2 very lightweight.
void setDropEnoughWeighted(double value)
Idiot(OsiSolverInterface &model)
Constructor with model.
void setWeightFactor(double value)
void setReasonablyFeasible(double value)
void setDropEnoughFeasibility(double value)
void setMinorIterations0(int value)
double getExitInfeasibility() const
Exit infeasibility - exit if sum of infeasibilities less than this.
void setLightweight(int value)
void setStartingWeight(double value)
Idiot()
Default constructor.
double getDropEnoughWeighted() const
Fine tuning - okay if weighted obj drop this factor.
Idiot & operator=(const Idiot &rhs)
Assignment operator. This copies the data.
void setModel(OsiSolverInterface *model)
Set model.
void crash(int numberPass, CoinMessageHandler *handler, const CoinMessages *messages, bool doCrossover=true)
Lightweight "crash".
void crossOver(int mode)
Use simplex to get an optimal solution mode is how many steps the simplex crossover should take to ar...
double getFeasibilityTolerance() const
Feasibility tolerance - problem essentially feasible if individual infeasibilities less than this.
void setLogLevel(int value)
void solve()
Get an approximate solution with the idiot code.
int getReduceIterations() const
Reduce weight after this many major iterations.
void setStrategy(int value)
void solve2(CoinMessageHandler *handler, const CoinMessages *messages)
Stuff for internal use.
double getStartingWeight() const
Starting weight - small emphasizes feasibility, default 1.0e-4.
int getLogLevel() const
Amount of information - default of 1 should be okay.
int getMajorIterations() const
Major iterations.
double getDropEnoughFeasibility() const
Fine tuning - okay if feasibility drop this factor.
int getStrategy() const
strategy
void setFeasibilityTolerance(double value)
void setMajorIterations(int value)
void setExitInfeasibility(double value)
int getMinorIterations() const
Minor iterations.
Idiot(const Idiot &)
Copy constructor.
int getMinorIterations0() const
double getWeightFactor() const
Weight factor - weight multiplied by this when changes, default 0.333.
void setReduceIterations(int value)
void setMinorIterations(int value)