HashedExpression
HashedExpression copied to clipboard
support subexpression sharing for Ipopt template
We generate a method of doing combined computation, but we don't actually use it to help make Ipopt more efficient.
@dalvescb, to this end, we might be able to take advantage the new_x
Boolean value provided by Ipopt to the eval_f
, eval_grad_f
, eval_g
, eval_jac_g
and eval_h
functions, documented here as "false if any evaluation method (eval_*) was previously called with the same values in x, true otherwise. This can be helpful when users have efficient implementations that calculate multiple outputs at once. Ipopt internally caches results from the TNLP and generally, this flag can be ignored."