forked from RobotLocomotion/drake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathipopt_solver.h
38 lines (25 loc) · 991 Bytes
/
ipopt_solver.h
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
#pragma once
#include <string>
#include "drake/common/drake_copyable.h"
#include "drake/solvers/mathematical_program_solver_interface.h"
namespace drake {
namespace solvers {
class IpoptSolver : public MathematicalProgramSolverInterface {
public:
DRAKE_NO_COPY_NO_MOVE_NO_ASSIGN(IpoptSolver)
IpoptSolver() = default;
~IpoptSolver() override = default;
// This solver is implemented in various pieces depending on if
// Ipopt was available during compilation.
bool available() const override { return is_available(); };
static bool is_available();
SolutionResult Solve(MathematicalProgram& prog) const override;
SolverId solver_id() const override;
/// @return same as MathematicalProgramSolverInterface::solver_id()
static SolverId id();
bool AreProgramAttributesSatisfied(
const MathematicalProgram& prog) const override;
static bool ProgramAttributesSatisfied(const MathematicalProgram& prog);
};
} // namespace solvers
} // namespace drake