14#define OsiSolverInterface ClpSimplex
16#include "OsiSolverInterface.hpp"
17typedef int CoinBigIndex;
19class CoinMessageHandler;
74 void crash(
int numberPass, CoinMessageHandler *handler,
75 const CoinMessages *messages,
bool doCrossover =
true);
244 void solve2(CoinMessageHandler *handler,
const CoinMessages *messages);
248 int nrows,
int ncols,
double *rowsol,
double *colsol,
249 double *pi,
double *djs,
const double *origcost,
251 double *rowupper,
const double *lower,
252 const double *upper,
const double *element,
253 const int *row,
const CoinBigIndex *colcc,
254 const int *length,
double *lambda,
255 int maxIts,
double mu,
double drop,
256 double maxmin,
double offset,
257 int strategy,
double djTol,
double djExit,
double djFlag,
258 CoinThreadRandom *randomNumberGenerator);
264 double *pi,
double *djs,
const double *cost,
265 const double *rowlower,
266 const double *rowupper,
const double *lower,
267 const double *upper,
const double *elemnt,
268 const int *row,
const CoinBigIndex *columnStart,
269 const int *length,
int extraBlock,
int *rowExtra,
270 double *solExtra,
double *elemExtra,
double *upperExtra,
271 double *costExtra,
double weight);
274 double *colsol,
const double *lower,
const double *upper,
275 const double *rowLower,
const double *rowUpper,
276 const double *cost,
const double *element,
double fixTolerance,
double &objChange,
277 double &infChange,
double &maxInfeasibility);
#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)
double dropEnoughFeasibility_
int dropping(IdiotResult result, double tolerance, double small, int *nbad)
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.
int cleanIteration(int iteration, int ordinaryStart, int ordinaryEnd, double *colsol, const double *lower, const double *upper, const double *rowLower, const double *rowUpper, const double *cost, const double *element, double fixTolerance, double &objChange, double &infChange, double &maxInfeasibility)
void setStrategy(int value)
void solve2(CoinMessageHandler *handler, const CoinMessages *messages)
Stuff for internal use.
IdiotResult objval(int nrows, int ncols, double *rowsol, double *colsol, double *pi, double *djs, const double *cost, const double *rowlower, const double *rowupper, const double *lower, const double *upper, const double *elemnt, const int *row, const CoinBigIndex *columnStart, const int *length, int extraBlock, int *rowExtra, double *solExtra, double *elemExtra, double *upperExtra, double *costExtra, double weight)
IdiotResult IdiSolve(int nrows, int ncols, double *rowsol, double *colsol, double *pi, double *djs, const double *origcost, double *rowlower, double *rowupper, const double *lower, const double *upper, const double *element, const int *row, const CoinBigIndex *colcc, const int *length, double *lambda, int maxIts, double mu, double drop, double maxmin, double offset, int strategy, double djTol, double djExit, double djFlag, CoinThreadRandom *randomNumberGenerator)
double getStartingWeight() const
Starting weight - small emphasizes feasibility, default 1.0e-4.
OsiSolverInterface * model_
Underlying model.
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)
double dropEnoughWeighted_
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)