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

Method objectiveCDoubleValue

highs/lp_data/HighsLp.cpp:132–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132HighsCDouble HighsLp::objectiveCDoubleValue(
133 const std::vector<double>& solution) const {
134 assert((int)solution.size() >= this->num_col_);
135 HighsCDouble objective_function_value = this->offset_;
136 for (HighsInt iCol = 0; iCol < this->num_col_; iCol++)
137 objective_function_value +=
138 static_cast<HighsCDouble>(this->col_cost_[iCol]) * solution[iCol];
139 return objective_function_value;
140}
141
142void HighsLp::setMatrixDimensions() {
143 this->a_matrix_.num_col_ = this->num_col_;

Callers 2

writeModelObjectiveFunction · 0.45
writeLpObjectiveFunction · 0.45

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected