Newer
Older
andreadelprete
committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
* Copyright 2015, LAAS-CNRS
* Author: Andrea Del Prete
*/
#ifndef ROBUST_EQUILIBRIUM_LIB_SOLVER_LP_CLP_HH
#define ROBUST_EQUILIBRIUM_LIB_SOLVER_LP_CLP_HH
#include <robust-equilibrium-lib/config.hh>
#include <robust-equilibrium-lib/util.hh>
#include <robust-equilibrium-lib/solver_LP_abstract.hh>
#include "ClpSimplex.hpp"
namespace robust_equilibrium
{
class ROBUST_EQUILIBRIUM_DLLAPI Solver_LP_clp: public Solver_LP_abstract
{
private:
ClpSimplex m_model;
public:
Solver_LP_clp();
/** Solve the linear program
* minimize c' x
* subject to Alb <= A x <= Aub
* lb <= x <= ub
*/
LP_status solve(Cref_vectorX c, Cref_vectorX lb, Cref_vectorX ub,
Cref_matrixXX A, Cref_vectorX Alb, Cref_vectorX Aub,
Ref_vectorX sol);
/** Get the status of the solver. */
LP_status getStatus();
/** Get the objective value of the last solved problem. */
double getObjectiveValue();
/** Get the current maximum number of iterations performed
* by the solver.
*/
unsigned int getMaximumIterations();
/** Set the current maximum number of iterations performed
* by the solver.
*/
bool setMaximumIterations(unsigned int maxIter);
/** Set the maximum time allowed to solve a problem. */
bool setMaximumTime(double seconds);
};
} // end namespace robust_equilibrium
#endif //ROBUST_EQUILIBRIUM_LIB_SOLVER_LP_CLP_HH