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

Function computeObjectiveValue

highs/lp_data/HighsSolution.cpp:1413–1419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1411}
1412
1413double computeObjectiveValue(const HighsLp& lp, const HighsSolution& solution) {
1414 double objective_value = 0;
1415 for (HighsInt iCol = 0; iCol < lp.num_col_; iCol++)
1416 objective_value += lp.col_cost_[iCol] * solution.col_value[iCol];
1417 objective_value += lp.offset_;
1418 return objective_value;
1419}
1420
1421// Refine any HighsBasisStatus::kNonbasic settings according to the LP
1422// and any solution values

Callers 1

callRunPostsolveMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected