11 #ifndef CMR_LP_INTERFACE_H 12 #define CMR_LP_INTERFACE_H 54 bool primal_feas()
const;
55 bool dual_feas()
const;
62 double get_coeff(
int row,
int col)
const;
65 void get_rhs(std::vector<double> &rhs,
int begin,
int end)
const;
68 std::vector<double> lower_bds(
int begin,
int end)
const;
71 std::vector<double> upper_bds(
int begin,
int end)
const;
74 std::vector<char> senses(
int begin,
int end)
const;
77 void get_col(
int col, std::vector<int> &cmatind,
78 std::vector<double> &cmatval)
const;
81 void get_row(
int row, std::vector<int> &rmatind,
82 std::vector<double> &rmatval)
const;
87 void get_row_infeas(
const std::vector<double> &x,
88 std::vector<double> &feas_stat,
int begin,
92 void get_col_infeas(
const std::vector<double> &x,
93 std::vector<double> &feas_stat,
int begin,
96 double get_objval()
const;
100 double condition_num()
const;
102 void get_x(std::vector<double> &x)
const;
104 std::vector<double> lp_vec()
const;
108 void get_base(std::vector<int> &colstat, std::vector<int> &rowstat)
const;
110 Basis basis_obj()
const;
112 std::vector<int> col_stat()
const;
113 std::vector<int> row_stat()
const;
116 void get_row_slacks(std::vector<double> &slack,
int begin,
120 std::vector<double> row_slacks(
int begin,
int end)
const;
123 void get_pi(std::vector<double> &pi,
int begin,
int end)
const;
126 std::vector<double> pi(
int begin,
int end)
const;
129 void get_redcosts(std::vector<double> &redcosts,
int begin,
int end)
const;
132 std::vector<double> redcosts(
int begin,
int end)
const;
140 void primal_strong_branch(
const std::vector<double> &tour_vec,
141 const std::vector<int> &colstat,
142 const std::vector<int> &rowstat,
143 const std::vector<int> &indices,
144 std::vector<Estimate> &down_est,
145 std::vector<Estimate> &up_est,
146 std::vector<Basis> &contra_bases,
147 int itlim,
double upperbound);
150 void tighten_bound(
int index,
char sense,
double val);
153 void change_obj(
int index,
double val);
162 void new_row(
char sense,
double rhs);
164 void new_rows(
const std::vector<char> &sense,
165 const std::vector<double> &rhs);
167 void add_cut(
double rhs,
char sense,
168 const std::vector<int> &rmatind,
169 const std::vector<double> &rmatval);
173 void add_cuts(
const std::vector<double> &rhs,
174 const std::vector<char> &sense,
175 const std::vector<int> &rmatbeg,
176 const std::vector<int> &rmatind,
177 const std::vector<double> &rmatval);
180 void del_set_rows(std::vector<int> &delstat);
182 void add_col(
const double objval,
183 const std::vector<int> &indices,
184 const std::vector<double> &coeffs,
185 const double lb,
const double ub);
188 void del_set_cols(std::vector<int> &delstat);
196 void copy_start(
const std::vector<double> &x);
199 void copy_start(
const std::vector<double> &x,
200 const std::vector<int> &col_stat,
201 const std::vector<int> &row_stat);
204 void copy_base(
const std::vector<int> &col_stat,
205 const std::vector<int> &row_stat);
208 void copy_base(
const Basis &base);
217 void switch_steepest();
221 void nondegen_pivot(
double upper_bound);
224 void cb_nondegen_pivot(
double upper_bound,
Basis &base,
int bas_freq);
226 void one_primal_pivot();
227 void one_dual_pivot();
229 void primal_recover();
237 std::unique_ptr<solver_impl>
simpl_p;
243 : rel(_rel), tour_base(), upper_bound(ub), basis_freq(bfreq) {}
256 int pfeas_itcount = 0;
SolStat
Enum class for categorizing solution statuses.
Definition: lp_util.hpp:42
Miscellaneous functions, structs/enums, and constants for LPs.
Definition: lp_interface.cpp:56
int basis_freq
How often to copy a basis.
Definition: lp_interface.hpp:254
Basis tour_base
A new basis for the tour to be set by the callback.
Definition: lp_interface.hpp:246
std::unique_ptr< solver_impl > simpl_p
Implementation hiding for solver.
Definition: lp_interface.hpp:236
Row and column basic statuses corresponding to some LP solution.
Definition: lp_util.hpp:76
Handle for data during a non-degenerate pivot callback.
Definition: lp_interface.hpp:241
LP::SparseRow get_row(const CCtsp_lpcut_in &cc_cut, const std::vector< int > &perm, const Graph::CoreGraph &core_graph)
SparseRow corresponding to Concorde cut.
Definition: process_cuts.cpp:30
double upper_bound
Value of best primal feasible solution.
Definition: lp_interface.hpp:248
Class for storing an lp relaxation via interface to an lp solver.
Definition: lp_interface.hpp:33
The namespace for this project.
Definition: abc_nodesel.hpp:20
Simple struct representing sparse matrix row for passing to LP solver.
Definition: lp_util.hpp:149
Memory-managed access to classes needed during safe GMI separation.
Definition: mirgroup.hpp:59