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

Method postprocess_solution

uno/model/FixedBoundsConstraintsModel.cpp:193–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191 }
192
193 void FixedBoundsConstraintsModel::postprocess_solution(Iterate& iterate) const {
194 // move the multipliers back from the general constraints to the bound constraints
195 size_t current_constraint = this->model.number_constraints;
196 for (size_t variable_index: this->model.get_fixed_variables()) {
197 const double constraint_multiplier = iterate.multipliers.constraints[current_constraint];
198 if (0. < constraint_multiplier) {
199 iterate.multipliers.lower_bounds[variable_index] = constraint_multiplier;
200 }
201 else {
202 iterate.multipliers.upper_bounds[variable_index] = constraint_multiplier;
203 }
204 ++current_constraint;
205 }
206 this->model.postprocess_solution(iterate);
207 }
208
209 size_t FixedBoundsConstraintsModel::number_jacobian_nonzeros() const {
210 return this->model.number_jacobian_nonzeros() + this->model.get_fixed_variables().size();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected