MCPcopy Create free account
hub / github.com/cvanaret/Uno / evaluate_objective

Method evaluate_objective

interfaces/AMPL/AMPLModel.cpp:125–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123 }
124
125 double AMPLModel::evaluate_objective(const Vector<double>& x) const {
126 fint error_flag = 0;
127 const double result = this->optimization_sense * this->asl->p.Objval(this->asl, 0, const_cast<double*>(x.data()), &error_flag);
128 if (0 < error_flag) {
129 throw FunctionEvaluationError();
130 }
131 ++this->number_model_evaluations.objective;
132 return result;
133 }
134
135 void AMPLModel::evaluate_constraints(const Vector<double>& x, Vector<double>& constraints) const {
136 fint error_flag = 0;

Callers

nothing calls this directly

Calls 2

dataMethod · 0.45

Tested by

no test coverage detected