MCPcopy Create free account
hub / github.com/ERGO-Code/HiGHS / createBlendingLp

Function createBlendingLp

check/TestCAPI.c:241–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239}
240
241void createBlendingLp(void* highs) {
242 // Special variant of the blending LP, with redundant constraint so
243 // that LP is reduced by presolve - but not to empty!
244 const double kHighsInf = Highs_getInfinity(highs);
245
246 HighsInt num_col = 2;
247 HighsInt num_row = 3;
248 HighsInt num_nz = 6;
249 HighsInt sense = -1;
250 double col_cost[2] = {8, 10};
251 double col_lower[2] = {0, 0};
252 double col_upper[2] = {kHighsInf, kHighsInf};
253 double row_lower[3] = {-kHighsInf, -kHighsInf, -kHighsInf};
254 double row_upper[3] = {500, 120, 210};
255 HighsInt a_index[6] = {0, 1, 0, 1, 0, 1};
256 double a_value[6] = {0.5, 0.5, 0.3, 0.5, 0.7, 0.5};
257 HighsInt a_start[3] = {0, 2, 4};
258 Highs_addVars(highs, num_col, col_lower, col_upper);
259 Highs_changeColsCostByRange(highs, 0, num_col - 1, col_cost);
260 Highs_addRows(highs, num_row, row_lower, row_upper, num_nz, a_start, a_index,
261 a_value);
262 Highs_changeObjectiveSense(highs, sense);
263}
264
265// Test methods
266void versionApi() {

Callers 1

testNamesFunction · 0.85

Calls 5

Highs_getInfinityFunction · 0.85
Highs_addVarsFunction · 0.85
Highs_addRowsFunction · 0.85

Tested by

no test coverage detected