Skip to content

Commit

Permalink
add comment on duals of fixed vars to TNLP::finalize_solution
Browse files Browse the repository at this point in the history
- ref #308
  • Loading branch information
svigerske committed Apr 20, 2021
1 parent 06ee7fa commit 483e4cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/Interfaces/IpTNLP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,10 @@ class IPOPTLIB_EXPORT TNLP : public ReferencedObject
/** @name Solution Methods */
///@{
/** This method is called when the algorithm has finished (successfully or not) so the TNLP can digest the outcome, e.g., store/write the solution, if any.
*
* @note If fixed_variable_treatment is make_parameter (the default), then zero is returned for the bound multipliers of fixed variables.
* Therefore, in an optimal solution, the gradient of the Lagrangian w.r.t. fixed variables may not appear to be zero.
* If this is a problem, setting parameter fixed_variable_treatment to make_constraint could be workaround.
*
* @param status @parblock (in) gives the status of the algorithm
* - SUCCESS: Algorithm terminated successfully at a locally optimal
Expand Down
4 changes: 2 additions & 2 deletions src/Interfaces/IpTNLPAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@ bool TNLPAdapter::GetSpaces(
jac_c_jCol = NULL;

// ... build the nonzero structure for jac_d
// ... (the permuation from rows in jac_g to jac_c is the
// ... (the permutation from rows in jac_g to jac_c is the
// ... the same as P_d_g_)
Index* jac_d_iRow = new Index[nz_full_jac_g_];
Index* jac_d_jCol = new Index[nz_full_jac_g_];
Expand Down Expand Up @@ -2824,7 +2824,7 @@ bool TNLPAdapter::CheckDerivatives(
}
}
#endif
// Obtain values at reference pont
// Obtain values at reference point
jac_g = new Number[nz_jac_g];
retval = tnlp_->eval_jac_g(nx, xref, new_x, ng, nz_jac_g, NULL, NULL, jac_g);
ASSERT_EXCEPTION(retval, ERROR_IN_TNLP_DERIVATIVE_TEST,
Expand Down

0 comments on commit 483e4cd

Please sign in to comment.