Skip to content
Snippets Groups Projects
solver_LP_clp.hh 1.36 KiB
Newer Older
/*
 * Copyright 2015, LAAS-CNRS
 * Author: Andrea Del Prete
 */

Steve Tonneau's avatar
Steve Tonneau committed
#ifndef CENTROIDAL_DYNAMICS_LIB_SOLVER_LP_CLP_HH
#define CENTROIDAL_DYNAMICS_LIB_SOLVER_LP_CLP_HH
Guilhem Saurel's avatar
Guilhem Saurel committed
#include <hpp/centroidal-dynamics/config.hh>
#include <hpp/centroidal-dynamics/util.hh>
#include <hpp/centroidal-dynamics/solver_LP_abstract.hh>
namespace centroidal_dynamics
Steve Tonneau's avatar
Steve Tonneau committed
class CENTROIDAL_DYNAMICS_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
   */
  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);

  /** Get the objective value of the last solved problem. */
  /** Get the value of the dual variables. */
  virtual void getDualSolution(Ref_vectorX res);
  virtual bool setMaximumIterations(unsigned int maxIter);
} // end namespace centroidal_dynamics
Steve Tonneau's avatar
Steve Tonneau committed
#endif //CENTROIDAL_DYNAMICS_LIB_SOLVER_LP_CLP_HH