|
|
void | setSolverBehavior (const std::vector< double > &red_costs, const std::vector< char > &types, const std::vector< double > &lower_bounds, const std::vector< double > &upper_bounds) |
| |
| int | get_ncols () const override |
| | returns number of columns of the problem
|
| |
| int | get_n_integer_vars () const override |
| | returns number of integer variables in the problem
|
| |
| void | get_lp_sol (double *, double *, double *red_costs) const override |
| | Get LP solution of a problem (available after method "solve_lp")
|
| |
| void | get_col_type (char *coltype, int begin, int end) const override |
| | Returns the column types for the columns in a given range.
|
| |
| void | get_lb (double *lb, int begin, int end) const override |
| | Returns the lower bounds for variables in a given range.
|
| |
| void | get_ub (double *ub, int begin, int end) const override |
| | Returns the upper bounds for variables in a given range.
|
| |
| SolverAbstract * | clone () const override |
| |
| int | get_number_of_instances () override |
| | Returns number of instances of solver currently in memory.
|
| |
| std::string | get_solver_name () const override |
| | Returns the solver used.
|
| |
| void | init () override |
| | Initializes a problem.
|
| |
| void | free () override |
| | Frees all the datas contained in the Solver environment.
|
| |
| void | write_prob_mps (const std::filesystem::path &filename) override |
| | writes an optimization problem in a MPS file
|
| |
| void | write_prob_lp (const std::filesystem::path &filename) override |
| | writes an optimization problem in a LP file
|
| |
| void | read_prob_mps (const std::filesystem::path &filename) override |
| | reads an optimization problem contained in a MPS file
|
| |
| void | read_prob_lp (const std::filesystem::path &filename) override |
| | reads an optimization problem contained in a MPS file
|
| |
| int | get_nrows () const override |
| | returns number of rows of the problem
|
| |
| int | get_nelems () const override |
| | returns number of non zeros elements in the matrix, excluding objective
|
| |
| void | get_obj (double *obj, int first, int last) const override |
| | returns the objective function coefficients for the columns in a given range
|
| |
| void | set_obj_to_zero () override |
| | Set the objective function coefficients to zero.
|
| |
| void | set_obj (const double *obj, int first, int last) override |
| | Set the objective function coefficients for the columns in a given range.
|
| |
| void | get_rows (int *mstart, int *mclind, double *dmatval, int size, int *nels, int first, int last) const override |
| | get coefficients of rows from index first to last
|
| |
| void | get_row_type (char *qrtype, int first, int last) const override |
| | Returns the row types for the rows in a given range.
|
| |
| void | get_rhs (double *rhs, int first, int last) const override |
| | Returns the right-hand sides of the rows in a given range.
|
| |
| void | get_rhs_range (double *range, int first, int last) const override |
| | Returns the right hand side range values for the rows in a given range.
|
| |
| void | get_cols (int *mstart, int *mrwind, double *dmatval, int size, int *nels, int first, int last) const override |
| | get coefficients of cols from index first to last
|
| |
| int | get_row_index (const std::string &name) override |
| | Returns the index of row named "name".
|
| |
| int | get_col_index (const std::string &name) override |
| | Returns the index of column named "name".
|
| |
| std::vector< std::string > | get_row_names (int first, int last) const override |
| | Returns the names of row from index first to last cannot be declared as const because of some solver methods.
|
| |
| std::vector< std::string > | get_row_names () override |
| | Returns the names of rows.
|
| |
| std::vector< std::string > | get_col_names (int first, int last) const override |
| | Returns the names of columns from index first to last cannot be declared as const because of some solver methods.
|
| |
| std::vector< std::string > | get_col_names () override |
| | Returns the names of columns.
|
| |
| void | del_rows (int first, int last) override |
| | Deletes rows between index first and last.
|
| |
| void | del_cols (int first, int last) override |
| | Deletes col at index first and last.
|
| |
| void | add_rows (int newrows, int newnz, const char *qrtype, const double *rhs, const double *range, const int *mstart, const int *mclind, const double *dmatval, const std::vector< std::string > &row_names) override |
| | Adds rows to the problem.
|
| |
| void | add_cols (int newcol, int newnz, const double *objx, const int *mstart, const int *mrwind, const double *dmatval, const double *bdl, const double *bdu, const std::vector< std::string > &col_names) override |
| | Adds new columns to the problem.
|
| |
| void | add_name (int type, const char *cnames, int indice) override |
| | Adds a name to a row or a column.
|
| |
| void | add_names (int type, const std::vector< std::string > &cnames, int first, int end) override |
| |
| void | chg_obj (const std::vector< int > &mindex, const std::vector< double > &obj) override |
| | Change coefficients in objective function.
|
| |
| void | chg_obj_direction (const bool minimize) override |
| | Change the problem's objective function sense to minimize or maximize.
|
| |
| void | chg_bounds (const std::vector< int > &mindex, const std::vector< char > &qbtype, const std::vector< double > &bnd) override |
| | Change bounds of some variables.
|
| |
| void | chg_col_type (const std::vector< int > &mindex, const std::vector< char > &qctype) override |
| | Change type of some columns.
|
| |
| void | chg_rhs (int id_row, double val) override |
| | Change rhs of a row.
|
| |
| void | chg_coef (int id_row, int id_col, double val) override |
| | Change a coefficient in the matrix.
|
| |
| void | chg_row_name (int id_row, const std::string &name) override |
| | Change the name of a constraint.
|
| |
| void | chg_col_name (int id_col, const std::string &name) override |
| | Change the name of a variable.
|
| |
| int | solve_lp () override |
| | Solves a problem as LP.
|
| |
| int | solve_mip () override |
| | Solves a problem as MIP.
|
| |
| void | get_basis (int *rstatus, int *cstatus) const override |
| | Returns the current basis into the user's data arrays.
|
| |
| double | get_mip_value () const override |
| | Get the optimal value of a MIP problem (available after method "solve_mip")
|
| |
| double | get_lp_value () const override |
| | Get the optimal value of a LP problem (available after method "solve_lp" )
|
| |
| int | get_splex_num_of_ite_last () const override |
| | Get the number of simplex iterations done in the last resolution of the problem.
|
| |
| void | get_mip_sol (double *primals) override |
| | Get MIP solution of a problem (available after method "solve_mip")
|
| |
| void | set_output_log_level (int loglevel) override |
| | Sets log level of the solver.
|
| |
| void | set_algorithm (const std::string &algo) override |
| | Sets algorithm used by solver to solve LP's.
|
| |
| void | set_threads (int n_threads) override |
| | Sets the maximum number of threads used to perform optimization.
|
| |
| void | set_optimality_gap (double gap) override |
| | Sets the optimality gap.
|
| |
| void | set_simplex_iter (int iter) override |
| | Sets the maximum number of simplex iterations the solver can perform.
|
| |
| void | write_basis (const std::filesystem::path &filename) override |
| | Writes the current basis to a file for later input into the optimizer.
|
| |
| void | read_basis (const std::filesystem::path &filename) override |
| | Instructs the optimizer to read in a previously saved basis from a file.
|
| |
| void | set_basis (std::span< int > rstatus, std::span< int > cstatus) override |
| |
| void | save_prob (const std::filesystem::path &filename) override |
| | write an optimisation problem in a file
|
| |
| void | restore_prob (const std::filesystem::path &filename) override |
| | read an optimisation problem from a file
|
| |
| void | get_presolve_map (int *rowmap, int *colmap) const override |
| | Get the presolve map (to be implemented by derived classes)
|
| |
| void | mark_indices_to_keep_presolve (int nrows, int ncols, int *rowind, int *colind) override |
| | Mark indices to keep during presolve (to be implemented by derived classes)
|
| |
| void | presolve_only () override |
| | Presolve the problem (to be implemented by derived classes)
|
| |
|
virtual | ~SolverAbstract ()=default |
| | destructor of SolverAbstract class : does nothing
|
| |
|
std::list< std::ostream * > & | get_stream () const |
| | returns the list of streams used by the solver instance
|
| |
| void | add_stream (std::ostream &stream) |
| | add a stream to the list of streams used by the solver instance
|
| |
|
void | set_fp (FILE *fp) |
| |
|
bool | operator== (const SolverAbstract &) const |
| |