| 192 | } |
| 193 | |
| 194 | HighsLp lp1(const double cost, const double col_lower, const double bound) { |
| 195 | HighsLp lp; |
| 196 | // Set up the LP |
| 197 | // |
| 198 | // min -4C x -7C y |
| 199 | // |
| 200 | // st x + y <= 6B; -2B <= x-y |
| 201 | // |
| 202 | // b <= [x, y] <= 10*B |
| 203 | // |
| 204 | // Optimal minimizer is [2B, 4B] so, if this should scale with B and |
| 205 | // test the scaling bounds down scenario |
| 206 | // |
| 207 | // Optimal maximizer is [b, b] so, if b and B are small (but bigger |
| 208 | // than B) this should test the "all small bounds" scaled up |
| 209 | // scenario |
| 210 | lp.num_col_ = 2; |
| 211 | lp.num_row_ = 2; |
| 212 | lp.offset_ = 1e-4; |
| 213 | lp.col_cost_ = {-4 * cost, -7 * cost}; |
| 214 | lp.col_lower_ = {col_lower, col_lower}; |
| 215 | lp.col_upper_ = {10 * bound, 10 * bound}; |
| 216 | lp.row_lower_ = {-kHighsInf, -2 * bound}; |
| 217 | lp.row_upper_ = {6 * bound, kHighsInf}; |
| 218 | lp.a_matrix_.start_ = {0, 2, 4}; |
| 219 | lp.a_matrix_.index_ = {0, 1, 0, 1}; |
| 220 | lp.a_matrix_.value_ = {1, 1, 1, -1}; |
| 221 | return lp; |
| 222 | } |
| 223 | |
| 224 | HighsLp mip1(const double cost, const double col_lower, const double bound) { |
| 225 | HighsLp lp = lp1(cost, col_lower, bound); |