CppAD
CppAD copied to clipboard
Leppov case missing in local/optimize/get_op_usage.hpp
Hello, I recently experience that running the "optimize" method of CppAD::ADFun runs into an error.
After debugging, it seems that the operation Leppov is missing from the cases of get_op_usage, I thus fall to the default case here and so to an error.
Is there a fundamental reason for this op not to be in the cases ?
It seems that all the operators, where both arguments are parameters, are missing from https://github.com/coin-or/CppAD/blob/master/include/cppad/local/optimize/get_op_usage.hpp ; i.e.
EqppOp, // compare equal
LeppOp, // compare <=
LtppOp, // compare <
NeppOp, // compare !=
StppOp, // store in VecAD array
These do appear in https://github.com/coin-or/CppAD/blob/master/include/cppad/local/optimize/get_par_usage.hpp
It will take a while for me to create a test case that demonstrates this bug, understand what if anything should be done, and to then fix it.
In the meantime, you might try removing the
CPPAD_ASSERT_UNKNOWN(0);
at the end of get_op_usage.hpp
Ok, thank you
The comparison operators EqppOp, // compare equal LeppOp, // compare <= LtppOp, // compare < NeppOp, // compare != have been fixed. See the following commit: https://github.com/coin-or/CppAD/commit/6966000307ecc09a431fbbdd402c330b562dec89
If this satisfies your problem, please close this bug.