34 #ifndef OPENMS_DATASTRUCTURES_LPWRAPPER_H
35 #define OPENMS_DATASTRUCTURES_LPWRAPPER_H
45 #define GLP_PROB_DEFINED
49 #if OPENMS_GLPK_VERSION_MINOR < 48
52 double _opaque_prob[100];
70 message_level(3), branching_tech(4), backtrack_tech(3),
71 preprocessing_tech(2), enable_feas_pump_heuristic(true), enable_gmi_cuts(true),
72 enable_mir_cuts(true), enable_cov_cuts(true), enable_clq_cuts(true), mip_gap(0.0),
73 time_limit((std::numeric_limits<
Int>::max)()), output_freq(5000), output_delay(10000), enable_presolve(true),
74 enable_binarization(true)
127 #if COINOR_SOLVER == 1
145 Int addRow(std::vector<Int> row_indices, std::vector<DoubleReal> row_values,
const String & name);
149 Int addColumn(std::vector<Int> column_indices, std::vector<DoubleReal> column_values,
const String & name);
163 Int addRow(std::vector<Int> & row_indices, std::vector<DoubleReal> & row_values,
const String & name,
DoubleReal lower_bound,
DoubleReal upper_bound, Type type);
175 Int addColumn(std::vector<Int> & column_indices, std::vector<DoubleReal> & column_values,
const String & name,
DoubleReal lower_bound,
DoubleReal upper_bound, Type type);
178 void deleteRow(
Int index);
180 void setColumnName(
Int index,
const String & name);
198 void setRowName(
Int index,
const String & name);
226 void setColumnType(
Int index, VariableType type);
234 VariableType getColumnType(
Int index);
246 void setObjectiveSense(Sense sense);
247 Sense getObjectiveSense();
250 Int getNumberOfColumns();
252 Int getNumberOfRows();
272 void writeProblem(
const String & filename,
const WriteFormat format)
const;
284 Int solve(SolverParam & solver_param,
const Size verbose_level = 0);
291 SolverStatus getStatus();
297 Int getNumberOfNonZeroEntriesInRow(
Int idx);
298 void getMatrixRow(
Int idx, std::vector<Int> & indexes);
302 void setSolver(
const SOLVER s);
305 SOLVER getSolver()
const;
308 #if COINOR_SOLVER == 1
310 std::vector<DoubleReal> solution_;
322 #endif // OPENMS_DATASTRUCTURES_LPWRAPPER_H
bool enable_gmi_cuts
Definition: LPWrapper.h:83
WriteFormat
Definition: LPWrapper.h:117
Int output_freq
Definition: LPWrapper.h:89
A more convenient string class.
Definition: String.h:56
SOLVER
Definition: LPWrapper.h:124
Definition: LPWrapper.h:100
Definition: LPWrapper.h:99
Definition: LPWrapper.h:120
bool enable_clq_cuts
Definition: LPWrapper.h:86
Struct that holds the parameters of the LP solver.
Definition: LPWrapper.h:67
Definition: LPWrapper.h:61
Sense
Definition: LPWrapper.h:111
bool enable_cov_cuts
Definition: LPWrapper.h:85
Int time_limit
Definition: LPWrapper.h:88
Int message_level
Definition: LPWrapper.h:78
Int branching_tech
Definition: LPWrapper.h:79
DoubleReal mip_gap
Definition: LPWrapper.h:87
SolverParam()
Definition: LPWrapper.h:69
bool enable_presolve
Definition: LPWrapper.h:91
Definition: LPWrapper.h:107
SOLVER solver_
Definition: LPWrapper.h:315
Int backtrack_tech
Definition: LPWrapper.h:80
Type
Definition: LPWrapper.h:95
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:144
SolverStatus
Definition: LPWrapper.h:132
Definition: LPWrapper.h:98
Int preprocessing_tech
Definition: LPWrapper.h:81
glp_prob * lp_problem_
Definition: LPWrapper.h:313
VariableType
Definition: LPWrapper.h:104
int Int
Signed integer type.
Definition: Types.h:100
bool enable_mir_cuts
Definition: LPWrapper.h:84
bool enable_feas_pump_heuristic
Definition: LPWrapper.h:82
Int output_delay
Definition: LPWrapper.h:90
bool enable_binarization
Definition: LPWrapper.h:92
Definition: LPWrapper.h:50