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

Function Highs_getModel

highs/interfaces/highs_c_api.cpp:1273–1297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1271}
1272
1273HighsInt Highs_getModel(const void* highs, const HighsInt a_format,
1274 const HighsInt q_format, HighsInt* num_col,
1275 HighsInt* num_row, HighsInt* num_nz, HighsInt* q_num_nz,
1276 HighsInt* sense, double* offset, double* col_cost,
1277 double* col_lower, double* col_upper, double* row_lower,
1278 double* row_upper, HighsInt* a_start, HighsInt* a_index,
1279 double* a_value, HighsInt* q_start, HighsInt* q_index,
1280 double* q_value, HighsInt* integrality) {
1281 HighsInt return_status = Highs_getHighsLpData(
1282 ((Highs*)highs)->getLp(), a_format, num_col, num_row, num_nz, sense,
1283 offset, col_cost, col_lower, col_upper, row_lower, row_upper, a_start,
1284 a_index, a_value, integrality);
1285 if (return_status != kHighsStatusOk) return return_status;
1286 const HighsHessian& hessian = ((Highs*)highs)->getModel().hessian_;
1287 if (hessian.dim_ > 0) {
1288 *q_num_nz = hessian.start_[*num_col];
1289 if (q_start)
1290 memcpy(q_start, hessian.start_.data(), *num_col * sizeof(HighsInt));
1291 if (q_index)
1292 memcpy(q_index, hessian.index_.data(), *q_num_nz * sizeof(HighsInt));
1293 if (q_value)
1294 memcpy(q_value, hessian.value_.data(), *q_num_nz * sizeof(double));
1295 }
1296 return kHighsStatusOk;
1297}
1298
1299HighsInt Highs_getLp(const void* highs, const HighsInt a_format,
1300 HighsInt* num_col, HighsInt* num_row, HighsInt* num_nz,

Callers 1

testGetModelFunction · 0.85

Calls 2

Highs_getHighsLpDataFunction · 0.85
dataMethod · 0.80

Tested by 1

testGetModelFunction · 0.68