Prev Next WishList

The CppAD Wish List

Atan2
The atan2 function could be made faster by adding a special operator for it.

BenderQuad
See the problem with the current BenderQuad specifications.

CondExp
Extend the conditional expressions CondExp so that they are valid for complex types by comparing real parts. In addition, use this change to extend LuRatio so that it works with complex AD types.

Exceptions
When the function Independent is called, a new tape is created. If an exception occurs before the call to the corresponding ADFun constructor or Dependent , the tape recording will never stop. Thus, there should be a way to abort a tape recording.

Ipopt
  1. A speed test for ipopt_cppad_nlp should be added. Then changes should be made to improve its speed.
  2. Perhaps it would help to cache the solution of the sparse Jacobian and spare Hessian graph coloring algorithm. Then, when the sparsity pattern does not depend on the argument value, these colorings would not have to be recomputed.
  3. In the case where retape(k) is true for some k , one can still use the structure of the representation to compute a sparsity structure. Currently ipopt_cppad_nlp uses a dense sparsity structure for this case
  4. The new_x flag could be used to avoid zero order forward mode computations. Because the same ADFun object is used at different argument values, this would require forward mode at multiple argument values (see multiple arguments ).


Library
One could build a CppAD library for use with the type AD<double>. This would speed up compilation for the most common usage where the Base type is double.

Multiple Arguments
It has been suggested that computing and storing forward mode results for multiple argument values (and for multiple orders) is faster for Adolc. Perhaps CppAD should allow for forward mode at multiple argument values (perhaps multiple orders).

Numeric Limits
Use a multiple of std::numeric_limits<double>::epsilon() instead 1e-10 for a small number in correctness checks; e.g., see tan.cpp .

Operation Sequence
It is possible to detect if the AD of Base operation sequence does not depend on any of the independent variable values. This could be returned as an extra SeqProperty .

Optimization

Expression Hashing
Hash codes could be used to detect expressions that have already been computed (and avoid extra entries in the operation sequence). This would also involve has coding the constants and avoiding duplicate copies in the constant table.

Microsoft Compiler
The Microsoft's Visual C++ Version 9.0 generates a warning of the form warning C4396:%...% for every template function that is declared as a both a friend and inline (it thinks it is only doing this for specializations of template functions). The CPPAD_INLINE preprocessor symbol is used to convert these inline directives to empty code (if a Microsoft Visual C++ is used). If it is shown to be faster and does not slow down CppAD with other compilers, non-friend functions should be used to map these operations to member functions so that both can be compiled inline.

Remove Operations From Tape
A single RevSparseJac sweep could be used to determine which parts of the operation sequence in an ADFun object can be removed.

Scripting Languages
One could develop a SWIG compatible interface to AD<double> and ADFun<double> that would make it easy to connect the SWIG languages, e.g., Python, see, SWIG for a description of SWIG and a list of the languages. This could also be used for faster evaluation of algorithms that have a fixed operation sequence . This would require the library wish list entry to be implemented.

Software Guidelines

Boost
The following is a list of some software guidelines taken from boost . These guidelines are not followed by the current CppAD source code, but perhaps they should be:
  1. Names (except as noted below) should be all lowercase, with words separated by underscores. For example, acronyms should be treated as ordinary names (xml_parser instead of XML_parser).
  2. Template parameter names should begin with an uppercase letter.
  3. Use spaces rather than tabs.


Sparse Jacobians and Hessians
Testing cppad_sparse_hessian.cpp with USE_CPPAD_SPARSE_HESSIAN equal to 1 (true) and 0 (false) indicates that sparse_hessian is more efficient than Hessian (for large sparse cases). Create an implementation of sparse_hessian that is more efficient (the initial implementation was only meant as a demonstration). For example, use arrays of index sets where for each row (column) the index contains the non-zero column (row) indices. (Also see Ipopt wish list.)

Sparsity Patterns
Add option to use index sets for each variable (instead of a boolean array) for the computation of sparsity patterns. This should be more efficient for very large problems. When using arrays of booleans, use OpenMP to parallelize the computation of the sparsity patterns.

Speed Testing
Extend the speed tests for Adolc, Fadbad, and Sacado to run under MS Windows. Run the CppAD speed tests on a set of different machines and operating systems.

Tan and Tanh
The AD tan and tanh functions are implemented using the AD sin, cos, sinh and cosh functions. They could be improved by making them atomic using the equations  \[
\begin{array}{rcl}
     \tan^{(1)} (x)  & = & 1 + \tan (x)^2 \\
     \tanh^{(1)} (x) & = & 1 - \tanh (x)^2
\end{array}
\] 
see standard math functions .

Tracing
Add forward and reverse mode operation tracing to the developer documentation (perhaps it will eventually become part of the user interface and documentation).

VecAD
Make assignment operation in VecAD like assignment in ad_copy . This will fix slicing to int when assigning from double to VecAD< AD<double> >::reference object.

Vector Element Type
Change cross references from elements of a specified type to value_type .
Input File: omh/wish_list.omh