|
|
| LinearProgramHandleGurobi (detail::Badge< GurobiSolver >, std::shared_ptr< GRBmodel > grbmodel, std::shared_ptr< GRBenv > grbenv) |
| |
|
std::size_t | num_vars () const override |
| | Get the number of variables in the LP.
|
| |
|
std::size_t | num_constraints () const override |
| | Get the number of cosntraints in the LP.
|
| |
|
void | set_objective_sense (const OptimizationType objsense) override |
| | Set the objective sense of this ILinearProgramHandle. The Optimization type can be either OptimizationType::Minimize or OptimizationType::Maximize, which correspond to the LP formulations min c^T * x and max c^T * x, respectively.
|
| |
| Variable | variable (std::size_t i) const override |
| | Retrieve variable i from the internal LP solver. More...
|
| |
| std::vector< Variable > | variables () const override |
| | Retrieve the variables from the internal LP solver. More...
|
| |
| void | add_variables (const std::vector< Variable > &vars) override |
| | Add variables to the LP. More...
|
| |
|
void | add_variables (const std::size_t num_vars) override |
| | Add num_vars non-negative variables to the LP. To be called before settings the objective function.
|
| |
|
void | add_constraints (const std::vector< Constraint< double >> &constraints) override |
| | Add a set of constraints to the LP formulation. This can only be called after calling set_objective().
|
| |
| void | remove_variable (const std::size_t i) override |
| | Remove a variable from the LP. More...
|
| |
| void | remove_constraint (std::size_t i) override |
| | Remove a constraint from the LP. More...
|
| |
|
OptimizationType | optimization_type () const override |
| | Retrieve the objective sense of this ILinearProgramHandle. The Optimization type can be either OptimizationType::Minimize or OptimizationType::Maximize, which correspond to the LP formulations min c^T * x and max c^T * x, respectively.
|
| |
|
void | set_objective (const Objective< double > &objective) override |
| | Set the objective function to be used. This method must be called before calling add_constraints().
|
| |
| virtual Constraint< double > | constraint (std::size_t i) const override |
| | Retrieve constraint i of the internal LP. This method requests a constraint from the internal LP solver backend, copies it, and returns it. Since constraints have to be copied from the backend, this can be an expensive operation, and so should be used sparingly. More...
|
| |
| std::vector< Constraint< double > > | constraints () const override |
| | Retrieve the constraints of the internal LP. This method requests the constraints from the internal LP solver backend, copies them, and returns them in a vector. Since the constraints have to be copied from the backend, this can be quite an expensive operation, and so should not be called in a loop. More...
|
| |
| Objective< double > | objective () const override |
| | Retrieve the objective function of the internal LP. This method requests the objective function values from the LP backend, copies them, and returns them. Since the objective values have to be copied from the backend, this can be quite an expensive operation, and so should not be called in a loop. More...
|
| |
|
std::shared_ptr< GRBmodel > | gurobi_model (detail::Badge< GurobiSolver >) const |
| |
|
std::shared_ptr< GRBenv > | gurobi_env (detail::Badge< GurobiSolver >) const |
| |
|
void | set_num_vars (detail::Badge< GurobiSolver >, std::size_t nvars) |
| |
Public Member Functions inherited from lpint::ILinearProgramHandle |
|
| ILinearProgramHandle (const ILinearProgramHandle &)=default |
| |
|
| ILinearProgramHandle (ILinearProgramHandle &&)=default |
| |
|
ILinearProgramHandle & | operator= (const ILinearProgramHandle &)=default |
| |
|
ILinearProgramHandle & | operator= (ILinearProgramHandle &&)=default |
| |