Newer
Older
andreadelprete
committed
/*
* Copyright 2015, LAAS-CNRS
* Author: Andrea Del Prete
*/
#ifdef CLP_FOUND
andreadelprete
committed
#ifndef ROBUST_EQUILIBRIUM_LIB_SOLVER_LP_CLP_HH
#define ROBUST_EQUILIBRIUM_LIB_SOLVER_LP_CLP_HH
#include <centroidal-dynamics-lib/config.hh>
#include <centroidal-dynamics-lib/util.hh>
#include <centroidal-dynamics-lib/solver_LP_abstract.hh>
andreadelprete
committed
#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
*/
andreadelprete
committed
virtual LP_status solve(Cref_vectorX c, Cref_vectorX lb, Cref_vectorX ub,
Cref_matrixXX A, Cref_vectorX Alb, Cref_vectorX Aub,
Ref_vectorX sol);
andreadelprete
committed
/** Get the status of the solver. */
andreadelprete
committed
virtual LP_status getStatus();
andreadelprete
committed
/** Get the objective value of the last solved problem. */
andreadelprete
committed
virtual double getObjectiveValue();
andreadelprete
committed
andreadelprete
committed
/** Get the value of the dual variables. */
virtual void getDualSolution(Ref_vectorX res);
andreadelprete
committed
virtual unsigned int getMaximumIterations();
andreadelprete
committed
virtual bool setMaximumIterations(unsigned int maxIter);
andreadelprete
committed
andreadelprete
committed
virtual bool setMaximumTime(double seconds);
andreadelprete
committed
};
} // end namespace robust_equilibrium
#endif //ROBUST_EQUILIBRIUM_LIB_SOLVER_LP_CLP_HH
#endif // CLP_FOUND