| 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; |
nothing calls this directly
no test coverage detected