Prev Next whats_new_08

@(@\newcommand{\W}[1]{ \; #1 \; } \newcommand{\R}[1]{ {\rm #1} } \newcommand{\B}[1]{ {\bf #1} } \newcommand{\D}[2]{ \frac{\partial #1}{\partial #2} } \newcommand{\DD}[3]{ \frac{\partial^2 #1}{\partial #2 \partial #3} } \newcommand{\Dpow}[2]{ \frac{\partial^{#1}}{\partial {#2}^{#1}} } \newcommand{\dpow}[2]{ \frac{ {\rm d}^{#1}}{{\rm d}\, {#2}^{#1}} }@)@
Changes and Additions to CppAD During 2008

This section contains a list of the changes to CppAD during 2008 (in reverse order by date). The purpose of this section is to assist you in learning about changes between various versions of CppAD.

In the documentation for pow_int change the integer exponent from int y to const int &y . In the implementation for pow make the integer base case agree with the documentation; i.e., change from int x to const int &x .

Added another test of mul_level calculations (in the test_more directory).

Extensive explanation for the ipopt_cppad/ipopt_cppad_ode example was provided in the section ipopt_cppad_ode .

The CppAD interface to the Ipopt nonlinear programming solver cppad_ipopt_nlp has been moved from example/ipopt_cppad_nlp to ipopt_cppad/ipopt_cppad_nlp.

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 warnings are no longer generated because these inline directives are converted to empty code when a Microsoft Visual C++ is used.

The function tanh(x) was added to the unary_standard_math functions. The abs and erf functions were removed from the Base requirements . The restrictions about the Base class were removed from abs , atan2 , LuRatio , erf .

Visual Studio Version 9.0 could not handle the large number of static constants in the CppAD erf function. This function was changed to a simpler representation that is much faster and that is differentiable at all points (not defined differently on subregions). The down side to this is that the new version is not as accurate.

Change prototypes for ipopt_cppad/ipopt_cppad_ode helper routines to use const (where appropriate).

Major improvements to the ipopt_cppad/ipopt_cppad_ode example.

Minor improvement to description of optimization argument in ipopt_cppad/ipopt_cppad_ode.

Add or modify some wish list entries; see cppad_ipopt_nlp (since removed), multiple argument forward (completed with forward_dir ), and sparsity patterns (sparsity patterns has been fulfilled).

Use parenthesis and brackets to group terms of the form @(@ m \times I @)@ to make the documentation of ipopt_cppad_nlp easier to read. Changed ipopt_cppad/ipopt_cppad_ode to use @(@ y(t) @)@ for the solution of the ODE to distinguish it for @(@ x @)@, the vector we are optimizing with respect to.

Changed ipopt_cppad/ipopt_cppad_ode to a case where @(@ x(t) @)@ is a pair of exponential functions instead of a linear and quadratic. Fixed some of the comments in this example and included the source code in the documentation (which was missing by mistake).

Changed ipopt_cppad/ipopt_cppad_ode to a case where there are two components in the ODE (instead of one). Also removed an initialization section that was only intended for tests with a specific initial value.

Add ipopt_cppad/ipopt_cppad_ode, an example and test that optimizes the solution of an ODE. Change r_eval to eval_r in ipopt_cppad_nlp . Fix a dimension of u_ad error in ipopt_cppad_nlp.

Converted from storing full Hessian and Jacobian to a sparse data structure in ipopt_cppad_nlp . This greatly reduced the memory requirements (and increased the speed) for sparse problems.

Fixed more indexing bugs in ipopt_cppad_nlp that effected cases where the domain index vector @(@ J_{k, \ell} @)@ was different for different values of @(@ k @)@ and @(@ \ell @)@.

In ipopt_cppad_nlp , combined fg_info->domain_index() and fg_info->range_index() into a single function called fg_info->index() . Also added more error checking (if NDEBUG is not defined).

Fixed an indexing bug in ipopt_cppad_nlp . (This effected cases where the domain index vector @(@ J_{k, \ell} @)@ was different for different values of @(@ k @)@ and @(@ \ell @)@.)

Change ipopt_cppad_nlp so that object and constraints are expressed as the double summation of simpler functions. This is more versatile that the single summation representation.

Checked in a major change to ipopt_cppad_nlp whereby the object and constraints can be expressed as the sum of simpler functions. This is the first step in what will eventually be a more versatile representation.

Fix bug in ipopt_cppad_nlp (not recording the function at the proper location. Here is the difference that occurred multiple places in the ipopt_cppad/ipopt_cppad_nlp.cpp source:
     for(j = 0; j < n_; j++)
-         x_ad_vec[0] = x[j];
+         x_ad_vec[j] = x[j];
This did not show up in testing because there currently is no test of ipopt_cppad_nlp where the operation sequence depends on the value of @(@ x @)@.

Changed eval_grad_f in ipopt_cppad_nlp.cpp to be more efficient.

The ipopt_cppad_nlp interface has been changed to use a derived class object instead of a pointer to a function.

The ipopt_cppad_nlp interface has been changed to use size_t instead of Ipopt::Index.

Back out the changes made to ipopt_cppad_nlp on 08-29 (because testing proved the change to be less efficient in the case that motivated the change).

The push_vector member function was missing from the vectorBool class. This has been fixed. In addition, it seems that for some cases (or compilers) the assignment
x[i] = y[j]
did not work properly when both x and y had type vectorBool. This has been fixed.

The ipopt_cppad_nlp example has been extended so that it allows for both scalar and vector evaluation of the objective and constraints; see the argument fg_vector in ipopt_cppad_nlp . In the case where there is not a lot of common terms between the functions, the scalar evaluation may be more efficient.

Add push of a vector to the CppAD::vector template class. This makes it easy to accumulate multiple scalars and simple vectors into one large CppAD::vector.

There was an indexing bug in the ipopt_cppad_nlp example that affected the retape equal to false case. This has been fixed. In addition, the missing retape documentation was added.

Extend configure command to check for extras libraries that are necessary for linking the ipopt example.

Add specifications for the Ipopt class ipopt_cppad_nlp . This is only an example class it may change with future versions of CppAD.

The nonlinear programming example ipopt_nlp_get_started.cpp was added. This is a preliminary version of this example.

The sparsity pattern for the Hessian was being calculated each time by SparseHessian . This is not efficient when the pattern does not change between calls to SparseHessian. An optional sparsity pattern argument was added to SparseHessian so that it need not be recalculated each time.

The sparsity pattern for the Jacobian was being calculated each time by SparseJacobian . This is not efficient when the pattern does not change between calls to SparseJacobian. An optional sparsity pattern argument was added to SparseJacobian so that it need not be recalculated each time.

The sparse_jacobian routine has been added.

The example in sparse_hessian pointed to hessian.cpp instead of sparse_hessian.cpp . This has been fixed.

The retape flag has been added to speed_main . In addition the routines link_det_minor , link_poly , and link_ode pass this flag along to the speed test implementations (because the corresponding tests have a fixed operation sequence). If this flag is false, a test implementation is allowed to just tape the operation sequence once and reuse it. The following tests use this flag: adolc_det_minor.cpp , cppad_det_minor.cpp , cppad_ode.cpp , adolc_poly.cpp , cppad_poly.cpp .

Create specialized zero order forward mode routine that should be faster, but does not test out as faster under cygwin g++ (GCC) 3.4.4.

Added the ode_evaluate speed test utility in preparation for having ode speed tests. Created ode speed test for the cppad and double cases; see speed_main . In addition, added the examples ode_evaluate.cpp and sparse_hessian.cpp .

Changed the speed_main routines defined for each package from compute_name to link_name . For example, in speed/cppad/det_minor.cpp, the function name compute_det_minor was changed to link_det_minor.

Fix a problem in the link_poly correctness test. Also add double_sparse_hessian.cpp to the set speed and correctness tests (now available).

Change all the Adolc speed examples to use TrackNewDel instead of using new and delete directly. This makes it easy to check for memory allocation errors and leaks (when NDEBUG is not defined). Also include in documentation sub functions that indicate the sparse_hessian speed test is not available for double_sparse_hessian.cpp , fadbad_sparse_hessian.cpp , and sacado_sparse_hessian.cpp .

The following wish list entry has been completed and removed from the list: "Change private member variables names (not part of the user interface) so that they all end with an underscore."

Fix a problem compiling the speed test main program with gcc 4.3.

Corrected cppad_sparse_hessian.cpp so that it uses the sparse case when USE_CPPAD_SPARSE_HESSIAN is 1. Also added a wish list sparsity pattern entry (the sparsity pattern entry has been fulfilled).

Change the name of speedtest.cpp to speed_program.cpp .

Change windows install instructions to use Unix formatted files (so only two instead of four tarballs are necessary for each version). The Microsoft project files for speed/cppad, speed/double, and speed/example were missing. This has also been fixed.

There was an ambiguity problem (detected by g++ 4.3) with the following operations
x op y
where x and y were AD<double> and op was a member operator of that class. This has been fixed by making all such member functions friends instead of members of AD<double>.

Remove compound assignment entry from wish list (it was fixed on 2007-05-26 ). Add an expression hashing entry to the wish_list (it has since been removed). Add Library and Scripting Languages to the wish list (this has since been fulfilled by the example ad_in_c.cpp ).

The LuFactor routine gave a misleading error message when the input matrix had not a number or infinity in it. This has been fixed.

The postfix_dir has been added to the configure command line options.

A sparse Hessian case was added to the speed tests; see sparse_hessian .

CppAD can now be installed using yum on Fedora operating systems.

The CppAD correctness tests assume that machine epsilon is less than 1e-13. A test for this has been added to the test_more/test_more program.

Added a sparse_hessian routine and extended Hessian to allow for a weight vector w instead of just one component l .
Input File: omh/appendix/whats_new/whats_new_08.omh