12 #define OsiSolverInterface ClpSimplex
14 #include "OsiSolverInterface.hpp"
15 typedef int CoinBigIndex;
17 class CoinMessageHandler;
74 void crash(
int numberPass, CoinMessageHandler * handler,
75 const CoinMessages * messages,
bool doCrossover =
true);
214 void solve2(CoinMessageHandler * handler,
const CoinMessages *messages);
217 int nrows,
int ncols,
double * rowsol ,
double * colsol,
218 double * pi,
double * djs,
const double * origcost ,
220 double * rowupper,
const double * lower,
221 const double * upper,
const double * element,
222 const int * row,
const CoinBigIndex * colcc,
223 const int * length,
double * lambda,
224 int maxIts,
double mu,
double drop,
225 double maxmin,
double offset,
226 int strategy,
double djTol,
double djExit,
double djFlag,
227 CoinThreadRandom * randomNumberGenerator);
233 double * pi,
double * djs,
const double * cost ,
234 const double * rowlower,
235 const double * rowupper,
const double * lower,
236 const double * upper,
const double * elemnt,
237 const int * row,
const CoinBigIndex * columnStart,
238 const int * length,
int extraBlock,
int * rowExtra,
239 double * solExtra,
double * elemExtra,
double * upperExtra,
240 double * costExtra,
double weight);
242 int cleanIteration(
int iteration,
int ordinaryStart,
int ordinaryEnd,
243 double * colsol,
const double * lower,
const double * upper,
244 const double * rowLower,
const double * rowUpper,
245 const double * cost,
const double * element,
double fixTolerance,
double & objChange,
Idiot()
Default constructor.
double getFeasibilityTolerance() const
Feasibility tolerance - problem essentially feasible if individual infeasibilities less than this...
int getMajorIterations() const
Major iterations.
int getMinorIterations() const
Minor iterations.
void setExitInfeasibility(double value)
Starting weight - small emphasizes feasibility, default 1.0e-4.
int getReduceIterations() const
Reduce weight after this many major iterations.
void setDropEnoughWeighted(double value)
Starting weight - small emphasizes feasibility, default 1.0e-4.
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)
int dropping(IdiotResult result, double tolerance, double small, int *nbad)
void setReduceIterations(int value)
Starting weight - small emphasizes feasibility, default 1.0e-4.
void setStartingWeight(double value)
Starting weight - small emphasizes feasibility, default 1.0e-4.
void setFeasibilityTolerance(double value)
Starting weight - small emphasizes feasibility, default 1.0e-4.
void setMajorIterations(int value)
Starting weight - small emphasizes feasibility, default 1.0e-4.
double getDropEnoughWeighted() const
Fine tuning - okay if weighted obj drop this factor.
void setReasonablyFeasible(double value)
Starting weight - small emphasizes feasibility, default 1.0e-4.
double dropEnoughWeighted_
double getStartingWeight() const
Starting weight - small emphasizes feasibility, default 1.0e-4.
void setLogLevel(int value)
Starting weight - small emphasizes feasibility, default 1.0e-4.
void setMinorIterations(int value)
Starting weight - small emphasizes feasibility, default 1.0e-4.
int getMinorIterations0() const
Starting weight - small emphasizes feasibility, default 1.0e-4.
void solve()
Get an approximate solution with the idiot code.
void crossOver(int mode)
Use simplex to get an optimal solution mode is how many steps the simplex crossover should take to ar...
void setWeightFactor(double value)
Starting weight - small emphasizes feasibility, default 1.0e-4.
double getDropEnoughFeasibility() const
Fine tuning - okay if feasibility drop this factor.
void setLightweight(int value)
Starting weight - small emphasizes feasibility, default 1.0e-4.
double dropEnoughFeasibility_
int getStrategy() const
strategy
void crash(int numberPass, CoinMessageHandler *handler, const CoinMessages *messages, bool doCrossover=true)
Lightweight "crash".
void setDropEnoughFeasibility(double value)
Starting weight - small emphasizes feasibility, default 1.0e-4.
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)
int getLogLevel() const
Amount of information - default of 1 should be okay.
void solve2(CoinMessageHandler *handler, const CoinMessages *messages)
Stuff for internal use.
Idiot & operator=(const Idiot &rhs)
Assignment operator. This copies the data.
void setStrategy(int value)
Starting weight - small emphasizes feasibility, default 1.0e-4.
#define OsiSolverInterface
OsiSolverInterface * model_
Underlying model.
This class implements a very silly algorithm.
double getReasonablyFeasible() const
Reasonably feasible.
void setMinorIterations0(int value)
Starting weight - small emphasizes feasibility, default 1.0e-4.
double getExitInfeasibility() const
Exit infeasibility - exit if sum of infeasibilities less than this.
double getWeightFactor() const
Weight factor - weight multiplied by this when changes, default 0.333.
int getLightweight() const
How lightweight - 0 not, 1 yes, 2 very lightweight.