@@ -2238,6 +2238,77 @@ void testIis() {
22382238 }
22392239 }
22402240
2241+ // Re #2635 check with feasible LP
2242+ /*
2243+ Highs_clear(highs);
2244+
2245+ ret = Highs_addCol(highs, 0.0, 0.0, inf, 0, NULL, NULL);
2246+ assert(ret == 0);
2247+ ret = Highs_addCol(highs, 0.0, 0.0, inf, 0, NULL, NULL);
2248+ assert(ret == 0);
2249+ index[0] = 0;
2250+ index[1] = 1;
2251+ value_1[0] = 1;
2252+ value_1[1] = 2;
2253+ value_2[0] = 1;
2254+ value_2[1] = 4;
2255+ ret = Highs_addRow(highs, -inf, 80, 2, index, value_1);
2256+ assert(ret == 0);
2257+ ret = Highs_addRow(highs, -inf, 120, 2, index, value_2);
2258+ assert(ret == 0);
2259+
2260+ ret = Highs_getLp(highs, kHighsMatrixFormatRowwise,
2261+ &num_col, &num_row, &num_nz,
2262+ &sense, &offset,
2263+ NULL, NULL, NULL,
2264+ NULL, NULL,
2265+ NULL, NULL, NULL,
2266+ NULL);
2267+
2268+ HighsInt* col_index;
2269+ HighsInt* row_index;
2270+ HighsInt* col_bound;
2271+ HighsInt* row_bound;
2272+ HighsInt* col_status = (HighsInt*)malloc(sizeof(HighsInt) * num_col);
2273+ HighsInt* row_status = (HighsInt*)malloc(sizeof(HighsInt) * num_row);
2274+
2275+ for (int k = 0 ; k < 2; k++) {
2276+ HighsInt iis_num_col;
2277+ HighsInt iis_num_row;
2278+ ret = Highs_getIis(highs,
2279+ &iis_num_col, &iis_num_row,
2280+ NULL, NULL,
2281+ NULL, NULL,
2282+ NULL, NULL);
2283+ assert(ret == 0);
2284+
2285+ assert(iis_num_col == 0);
2286+ assert(iis_num_row == 0);
2287+ ret = Highs_getIis(highs,
2288+ &iis_num_col, &iis_num_row,
2289+ col_index, row_index,
2290+ col_bound, row_bound,
2291+ col_status, row_status);
2292+ if (k == 0) {
2293+ assert(ret == 0);
2294+
2295+ assert(col_status[0] == kHighsIisStatusNotInConflict);
2296+ assert(col_status[1] == kHighsIisStatusNotInConflict);
2297+
2298+ assert(row_status[0] == kHighsIisStatusNotInConflict);
2299+ assert(row_status[1] == kHighsIisStatusNotInConflict);
2300+ } else {
2301+ assert(ret == -1);
2302+ }
2303+ }
2304+ free(col_index);
2305+ free(row_index);
2306+ free(col_bound);
2307+ free(row_bound);
2308+ free(col_status);
2309+ free(row_status);
2310+ */
2311+
22412312 Highs_destroy (highs );
22422313}
22432314
@@ -2351,30 +2422,30 @@ void testFixedLp() {
23512422}
23522423
23532424int main () {
2354- minimalApiIllegalLp ();
2355- testCallback ();
2356- versionApi ();
2357- fullApi ();
2358- minimalApiLp ();
2359- minimalApiMip ();
2360- minimalApiQp ();
2361- fullApiOptions ();
2362- fullApiLp ();
2363- fullApiMip ();
2364- fullApiQp ();
2365- passPresolveGetLp ();
2366- options ();
2367- testGetColsByRange ();
2368- testPassHessian ();
2369- testRanging ();
2370- testFeasibilityRelaxation ();
2371- testGetModel ();
2372- testMultiObjective ();
2373- testQpIndefiniteFailure ();
2374- testDualRayTwice ();
2375- testDeleteRowResolveWithBasis ();
2425+ // minimalApiIllegalLp();
2426+ // testCallback();
2427+ // versionApi();
2428+ // fullApi();
2429+ // minimalApiLp();
2430+ // minimalApiMip();
2431+ // minimalApiQp();
2432+ // fullApiOptions();
2433+ // fullApiLp();
2434+ // fullApiMip();
2435+ // fullApiQp();
2436+ // passPresolveGetLp();
2437+ // options();
2438+ // testGetColsByRange();
2439+ // testPassHessian();
2440+ // testRanging();
2441+ // testFeasibilityRelaxation();
2442+ // testGetModel();
2443+ // testMultiObjective();
2444+ // testQpIndefiniteFailure();
2445+ // testDualRayTwice();
2446+ // testDeleteRowResolveWithBasis();
23762447 testIis ();
2377- testFixedLp ();
2448+ // testFixedLp();
23782449 return 0 ;
23792450}
23802451// testSetSolution();
0 commit comments