Changeset 1628


Ignore:
Timestamp:
Jan 20, 2010 10:04:49 AM (10 years ago)
Author:
bradbell
Message:

trunk: move ipopt_cppad to cppad_ipopot to facillitate future refactoring, see whats_new_10.omh entry for 01-20.

Location:
trunk
Files:
2 deleted
39 edited
2 copied
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/AUTHORS

    r1626 r1628  
    22             ===========================================
    33
    4 To date, 2010-01-18, Bradley M. Bell is the sole author of CppAD.
     4To date, 2010-01-20, Bradley M. Bell is the sole author of CppAD.
    55While Bradley M. Bell worked for the University of Washington during
    66the development of CppAD, the following are also true:
  • trunk/build.sh

    r1626 r1628  
    665665        then
    666666                list="
    667                         ipopt_cppad/example/example
     667                        cppad_ipopt/example/example
    668668                        $list
    669669                "
  • trunk/check_example.sh

    r1626 r1628  
    1313echo "Checking that all examples are in omh/example_list.omh"
    1414echo "-------------------------------------------------------"
    15 file_list="example/*.cpp example/*.hpp ipopt_cppad/*/*.cpp ipopt_cppad/*/*.hpp"
     15file_list="example/*.cpp example/*.hpp cppad_ipopt/*/*.cpp cppad_ipopt/*/*.hpp"
    1616sed < omh/example_list.omh > check_example.$$ \
    1717        -n -e '/\$begin ListAllExamples\$\$/,/\$end/p'
  • trunk/check_include_def.sh

    r1626 r1628  
    1616# note CPPAD_CPPAD_INCLUDED is a special case, see cppad/error_handler.hpp
    1717grep '^# *ifndef *CPPAD_[0-9a-zA-Z_]*_INCLUDED$' \
    18         ipopt_cppad/*/*.hpp \
     18        cppad_ipopt/*/*.hpp \
    1919        cppad/*.hpp \
    2020        cppad/local/*.hpp \
     
    2929 
    3030ls \
    31         ipopt_cppad/*/*.hpp \
     31        cppad_ipopt/*/*.hpp \
    3232        cppad/*.hpp \
    3333        cppad/local/*.hpp \
     
    3535        example/*.hpp \
    3636        openmp/*.hpp \
    37         | sed -e 's|.*/||' \
     37        | sed -e 's|.*/||' -e 's|^cppad_||' \
    3838        | sort -u \
    3939        > junk.2
  • trunk/check_include_file.sh

    r1626 r1628  
    1515echo "-------------------------------------------------------------------"
    1616grep '^# *include *<cppad/' \
    17         ipopt_cppad/*/*.hpp \
    18         ipopt_cppad/*/*.cpp \
     17        cppad_ipopt/*/*.hpp \
     18        cppad_ipopt/*/*.cpp \
    1919        cppad/*.hpp \
    2020        cppad/local/*.hpp \
  • trunk/check_include_omh.sh

    r1626 r1628  
    2323        dev.omh
    2424        cppad/PowInt.h
    25         ipopt_cppad/*/*.hpp
    26         ipopt_cppad/*/*.cpp
    27         ipopt_cppad/*/*.bat
    28         ipopt_cppad/*/*.omh
     25        cppad_ipopt/*/*.hpp
     26        cppad_ipopt/*/*.cpp
     27        cppad_ipopt/*/*.bat
     28        cppad_ipopt/*/*.omh
    2929        cppad/*.hpp
    3030        cppad/local/*.hpp
  • trunk/check_svn_dist.sh

    r1627 r1628  
    3333# ----------------------------------------------------------------------------
    3434dir=`pwd`
    35 for name in example test_more ipopt_cppad/example ipopt_cppad/speed
     35for name in example test_more cppad_ipopt/example cppad_ipopt/speed
    3636do
    3737        echo "cd $dir/$name"
  • trunk/configure

    r1626 r1628  
    11#! /bin/sh
    22# Guess values for system-dependent variables and create Makefiles.
    3 # Generated by GNU Autoconf 2.63 for CppAD 20100118.
     3# Generated by GNU Autoconf 2.63 for CppAD 20100120.
    44#
    55# Report bugs to <cppad@list.coin-or.org>.
     
    597597PACKAGE_NAME='CppAD'
    598598PACKAGE_TARNAME='cppad'
    599 PACKAGE_VERSION='20100118'
    600 PACKAGE_STRING='CppAD 20100118'
     599PACKAGE_VERSION='20100120'
     600PACKAGE_STRING='CppAD 20100120'
    601601PACKAGE_BUGREPORT='cppad@list.coin-or.org'
    602602
     
    13211321  # This message is too long to be a string in the A/UX 3.1 sh.
    13221322  cat <<_ACEOF
    1323 \`configure' configures CppAD 20100118 to adapt to many kinds of systems.
     1323\`configure' configures CppAD 20100120 to adapt to many kinds of systems.
    13241324
    13251325Usage: $0 [OPTION]... [VAR=VALUE]...
     
    13871387if test -n "$ac_init_help"; then
    13881388  case $ac_init_help in
    1389      short | recursive ) echo "Configuration of CppAD 20100118:";;
     1389     short | recursive ) echo "Configuration of CppAD 20100120:";;
    13901390   esac
    13911391  cat <<\_ACEOF
     
    15001500if $ac_init_version; then
    15011501  cat <<\_ACEOF
    1502 CppAD configure 20100118
     1502CppAD configure 20100120
    15031503generated by GNU Autoconf 2.63
    15041504
     
    15141514running configure, to aid debugging if configure makes a mistake.
    15151515
    1516 It was created by CppAD $as_me 20100118, which was
     1516It was created by CppAD $as_me 20100120, which was
    15171517generated by GNU Autoconf 2.63.  Invocation command line was
    15181518
     
    38523852# Define the identity of the package.
    38533853 PACKAGE='cppad'
    3854  VERSION='20100118'
     3854 VERSION='20100120'
    38553855
    38563856
     
    56885688
    56895689
    5690 ac_config_files="$ac_config_files cppad/configure.hpp doxyfile doc.omh example/test_one.sh omh/install_unix.omh omh/install_windows.omh test_more/test_one.sh makefile example/makefile ipopt_cppad/example/makefile ipopt_cppad/speed/makefile introduction/get_started/makefile introduction/exp_apx/makefile print_for/makefile speed/adolc/makefile speed/cppad/makefile speed/double/makefile speed/example/makefile speed/fadbad/makefile speed/profile/makefile speed/sacado/makefile test_more/makefile"
     5690ac_config_files="$ac_config_files cppad/configure.hpp doxyfile doc.omh example/test_one.sh omh/install_unix.omh omh/install_windows.omh test_more/test_one.sh makefile example/makefile cppad_ipopt/example/makefile cppad_ipopt/speed/makefile introduction/get_started/makefile introduction/exp_apx/makefile print_for/makefile speed/adolc/makefile speed/cppad/makefile speed/double/makefile speed/example/makefile speed/fadbad/makefile speed/profile/makefile speed/sacado/makefile test_more/makefile"
    56915691
    56925692ac_config_commands="$ac_config_commands default-1"
     
    62426242# values after options handling.
    62436243ac_log="
    6244 This file was extended by CppAD $as_me 20100118, which was
     6244This file was extended by CppAD $as_me 20100120, which was
    62456245generated by GNU Autoconf 2.63.  Invocation command line was
    62466246
     
    63056305cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
    63066306ac_cs_version="\\
    6307 CppAD config.status 20100118
     6307CppAD config.status 20100120
    63086308configured by $0, generated by GNU Autoconf 2.63,
    63096309  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
     
    64416441    "makefile") CONFIG_FILES="$CONFIG_FILES makefile" ;;
    64426442    "example/makefile") CONFIG_FILES="$CONFIG_FILES example/makefile" ;;
    6443     "ipopt_cppad/example/makefile") CONFIG_FILES="$CONFIG_FILES ipopt_cppad/example/makefile" ;;
    6444     "ipopt_cppad/speed/makefile") CONFIG_FILES="$CONFIG_FILES ipopt_cppad/speed/makefile" ;;
     6443    "cppad_ipopt/example/makefile") CONFIG_FILES="$CONFIG_FILES cppad_ipopt/example/makefile" ;;
     6444    "cppad_ipopt/speed/makefile") CONFIG_FILES="$CONFIG_FILES cppad_ipopt/speed/makefile" ;;
    64456445    "introduction/get_started/makefile") CONFIG_FILES="$CONFIG_FILES introduction/get_started/makefile" ;;
    64466446    "introduction/exp_apx/makefile") CONFIG_FILES="$CONFIG_FILES introduction/exp_apx/makefile" ;;
  • trunk/configure.ac

    r1626 r1628  
    1313dnl Process this file with autoconf to produce a configure script.
    1414dnl   package   version              bug-report
    15 AC_INIT(CppAD, 20100118, cppad@list.coin-or.org)
     15AC_INIT(CppAD, 20100120, cppad@list.coin-or.org)
    1616
    1717dnl By defalut disable maintainer mode when running configure;
     
    313313        makefile
    314314        example/makefile
    315         ipopt_cppad/example/makefile
    316         ipopt_cppad/speed/makefile
     315        cppad_ipopt/example/makefile
     316        cppad_ipopt/speed/makefile
    317317        introduction/get_started/makefile
    318318        introduction/exp_apx/makefile
  • trunk/cppad/config.h

    r1626 r1628  
    2424
    2525/* Define to the full name and version of this package. */
    26 #define PACKAGE_STRING "CppAD 20100118"
     26#define PACKAGE_STRING "CppAD 20100120"
    2727
    2828/* Define to the one symbol short name of this package. */
     
    3030
    3131/* Define to the version of this package. */
    32 #define PACKAGE_VERSION "20100118"
     32#define PACKAGE_VERSION "20100120"
    3333
    3434/* Version number of package */
    35 #define VERSION "20100118"
     35#define VERSION "20100120"
    3636
    3737/* Define to `__inline__' or `__inline' if that's what the C compiler
  • trunk/cppad/configure.hpp

    r1497 r1628  
    6161cppad-yyyymmdd as a C string where yyyy is year, mm is month, and dd is day.
    6262*/
    63 # define CPPAD_PACKAGE_STRING "CppAD 20090813"
     63# define CPPAD_PACKAGE_STRING "CppAD 20100120"
    6464
    6565/*
  • trunk/cppad/local/cppad_assert.hpp

    r1447 r1628  
    11/* $Id$ */
    2 # ifndef CPPAD_CPPAD_ASSERT_INCLUDED
    3 # define CPPAD_CPPAD_ASSERT_INCLUDED
     2# ifndef CPPAD_ASSERT_INCLUDED
     3# define CPPAD_ASSERT_INCLUDED
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad_ipopt/example/example_windows.bat

    r1626 r1628  
    1212rem ---------------------------------------------------------------------------
    1313goto SKIP_COMMENT
    14 $begin ipopt_cppad_windows$$
     14$begin cppad_ipopt_windows$$
    1515$spell
    1616        CppAD
     
    1818        cppad
    1919        yyyymmdd
    20         ipopt_cppad.sln
     20        cppad_ipopt.sln
    2121$$
    2222$escape $$ $comment so that backslash can appear in codei commands$$
     
    5353Execute the dos command
    5454$codei%
    55         ipopt_cppad\ipopt_cppad_windows.bat %from_directory%
     55        cppad_ipopt\cppad_ipopt_windows.bat %from_directory%
    5656%$$
    5757
     
    5959In Visual Studio open the project file
    6060$codep
    61         ipopt_cppad\ipopt_cppad.sln
     61        cppad_ipopt\cppad_ipopt.sln
    6262$$
    6363and build the $code Release$$ version of the project
     
    6767In the Dos shell window, execute the command
    6868$codep
    69         ipopt_cppad\Release\ipopt_cppad
     69        cppad_ipopt\Release\cppad_ipopt
    7070$$
    7171It should generate the following output:
    7272$codep
    73         Ok:    ipopt_cppad_ode
    74         Ok:    ipopt_cppad_simple
     73        Ok:    cppad_ipopt_ode
     74        Ok:    cppad_ipopt_simple
    7575        Ok:    No memory leak detected
    7676        All 3 tests passed.
     
    8282rem ---------------------------------------------------------------------------
    8383rem
    84 echo Dos script for linking ipopt to ipopt_cppad examples
     84echo Dos script for linking ipopt to cppad_ipopt examples
    8585rem
    8686if not exist "%1\VisualStudio-Coinall"  goto ERROR_MESSAGE
    87 if not exist ipopt_cppad                   goto ERROR_MESSAGE
     87if not exist cppad_ipopt                   goto ERROR_MESSAGE
    8888rem
    89 echo "creating ipopt_cppad\include\coin directory"
    90 mkdir ipopt_cppad\include\coin
    91 echo "creating ipopt_cppad\lib directry"
    92 mkdir ipopt_cppad\lib
     89echo "creating cppad_ipopt\include\coin directory"
     90mkdir cppad_ipopt\include\coin
     91echo "creating cppad_ipopt\lib directry"
     92mkdir cppad_ipopt\lib
    9393rem
    94 echo "copying necessary ipopt include files to ipopt_cppad\include\coin directory"
    95 copy %1\VisualStudio-Coinall\include\coin\config_ipopt.h  ipopt_cppad\include\coin
    96 copy %1\VisualStudio-Coinall\include\coin\Ip*.hpp         ipopt_cppad\include\coin
    97 copy %1\VisualStudio-Coinall\include\coin\Ip*.h           ipopt_cppad\include\coin
     94echo "copying necessary ipopt include files to cppad_ipopt\include\coin directory"
     95copy %1\VisualStudio-Coinall\include\coin\config_ipopt.h  cppad_ipopt\include\coin
     96copy %1\VisualStudio-Coinall\include\coin\Ip*.hpp         cppad_ipopt\include\coin
     97copy %1\VisualStudio-Coinall\include\coin\Ip*.h           cppad_ipopt\include\coin
    9898rem
    99 echo "copying ipopt library to ipopt_cppad\lib directory"
    100 copy %1\VisualStudio-Coinall\lib\libipopt.lib ipopt_cppad\lib
     99echo "copying ipopt library to cppad_ipopt\lib directory"
     100copy %1\VisualStudio-Coinall\lib\libipopt.lib cppad_ipopt\lib
    101101rem
    102 echo "copying ifort libraries to ipopt_cppad\lib directory"
    103 copy %1\VisualStudio-Coinall\lib\ifort\* ipopt_cppad\lib
     102echo "copying ifort libraries to cppad_ipopt\lib directory"
     103copy %1\VisualStudio-Coinall\lib\ifort\* cppad_ipopt\lib
    104104rem
    105105goto DONE
    106106: ERROR_MESSAGE
    107 echo usage: ipopt_cppad\ipopt_cppad_windows from_directory
     107echo usage: cppad_ipopt\cppad_ipopt_windows from_directory
    108108echo where from_directory contains the sub-directory VisualStudio-Coinall
    109109echo which in an unzipped version of CoinAll-1.2-VisualStudio.zip
  • trunk/cppad_ipopt/example/get_started.cpp

    r1626 r1628  
    2626
    2727$head Purpose$$
    28 This example program demonstrates how to use the class ipopt_cppad_nlp to
     28This example program demonstrates how to use the class cppad_ipopt_nlp to
    2929solve the example problem in the Ipopt documentation; i.e., the problem
    3030$latex \[
     
    4747
    4848$code
    49 $verbatim%ipopt_cppad/example/get_started.cpp%0%// BEGIN PROGRAM%// END PROGRAM%1%$$
     49$verbatim%cppad_ipopt/example/get_started.cpp%0%// BEGIN PROGRAM%// END PROGRAM%1%$$
    5050$$
    5151
     
    5454// BEGIN PROGRAM
    5555
    56 # include "../src/ipopt_cppad_nlp.hpp"
     56# include "../src/cppad_ipopt_nlp.hpp"
    5757
    5858namespace {
    5959
    60         class FG_info : public ipopt_cppad_fg_info
     60        class FG_info : public cppad_ipopt_fg_info
    6161        {
    6262        private:
     
    120120        size_t icase;
    121121        for(icase = 0; icase <= 1; icase++)
    122         {       // Should ipopt_cppad_nlp retape the operation sequence for
     122        {       // Should cppad_ipopt_nlp retape the operation sequence for
    123123                // every new x. Can test both true and false cases because
    124124                // the operation sequence does not depend on x (for this case).
     
    129129
    130130                // create the Ipopt interface
    131                 ipopt_cppad_solution solution;
    132                 Ipopt::SmartPtr<Ipopt::TNLP> cppad_nlp = new ipopt_cppad_nlp(
     131                cppad_ipopt_solution solution;
     132                Ipopt::SmartPtr<Ipopt::TNLP> cppad_nlp = new cppad_ipopt_nlp(
    133133                n, m, x_i, x_l, x_u, g_l, g_u, &fg_info, &solution
    134134                );
     
    164164                Check some of the solution values
    165165                */
    166                 ok &= solution.status == ipopt_cppad_solution::success;
     166                ok &= solution.status == cppad_ipopt_solution::success;
    167167                //
    168168                double check_x[]   = { 1.000000, 4.743000, 3.82115, 1.379408 };
  • trunk/cppad_ipopt/example/makefile.am

    r1626 r1628  
    4343example_SOURCES   = \
    4444        example.cpp \
    45         ../src/ipopt_cppad_nlp.cpp \
    46         ../src/ipopt_cppad_nlp.hpp \
     45        ../src/cppad_ipopt_nlp.cpp \
     46        ../src/cppad_ipopt_nlp.hpp \
    4747        get_started.cpp \
    4848        ode_fast.hpp \
  • trunk/cppad_ipopt/example/makefile.in

    r1627 r1628  
    3434POST_UNINSTALL = :
    3535noinst_PROGRAMS = example$(EXEEXT)
    36 subdir = ipopt_cppad/example
     36subdir = cppad_ipopt/example
    3737DIST_COMMON = $(srcdir)/makefile.am $(srcdir)/makefile.in
    3838ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     
    4545CONFIG_CLEAN_VPATH_FILES =
    4646PROGRAMS = $(noinst_PROGRAMS)
    47 am_example_OBJECTS = example.$(OBJEXT) ipopt_cppad_nlp.$(OBJEXT) \
     47am_example_OBJECTS = example.$(OBJEXT) cppad_ipopt_nlp.$(OBJEXT) \
    4848        get_started.$(OBJEXT) ode_check.$(OBJEXT)
    4949example_OBJECTS = $(am_example_OBJECTS)
     
    213213example_SOURCES = \
    214214        example.cpp \
    215         ../src/ipopt_cppad_nlp.cpp \
    216         ../src/ipopt_cppad_nlp.hpp \
     215        ../src/cppad_ipopt_nlp.cpp \
     216        ../src/cppad_ipopt_nlp.hpp \
    217217        get_started.cpp \
    218218        ode_fast.hpp \
     
    235235          esac; \
    236236        done; \
    237         echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ipopt_cppad/example/makefile'; \
     237        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu cppad_ipopt/example/makefile'; \
    238238        $(am__cd) $(top_srcdir) && \
    239           $(AUTOMAKE) --gnu ipopt_cppad/example/makefile
     239          $(AUTOMAKE) --gnu cppad_ipopt/example/makefile
    240240.PRECIOUS: makefile
    241241makefile: $(srcdir)/makefile.in $(top_builddir)/config.status
     
    269269        -rm -f *.tab.c
    270270
     271@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cppad_ipopt_nlp.Po@am__quote@
    271272@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example.Po@am__quote@
    272273@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_started.Po@am__quote@
    273 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipopt_cppad_nlp.Po@am__quote@
    274274@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ode_check.Po@am__quote@
    275275
     
    288288@am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
    289289
    290 ipopt_cppad_nlp.o: ../src/ipopt_cppad_nlp.cpp
    291 @am__fastdepCXX_TRUE@   $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ipopt_cppad_nlp.o -MD -MP -MF $(DEPDIR)/ipopt_cppad_nlp.Tpo -c -o ipopt_cppad_nlp.o `test -f '../src/ipopt_cppad_nlp.cpp' || echo '$(srcdir)/'`../src/ipopt_cppad_nlp.cpp
    292 @am__fastdepCXX_TRUE@   $(am__mv) $(DEPDIR)/ipopt_cppad_nlp.Tpo $(DEPDIR)/ipopt_cppad_nlp.Po
    293 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='../src/ipopt_cppad_nlp.cpp' object='ipopt_cppad_nlp.o' libtool=no @AMDEPBACKSLASH@
     290cppad_ipopt_nlp.o: ../src/cppad_ipopt_nlp.cpp
     291@am__fastdepCXX_TRUE@   $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cppad_ipopt_nlp.o -MD -MP -MF $(DEPDIR)/cppad_ipopt_nlp.Tpo -c -o cppad_ipopt_nlp.o `test -f '../src/cppad_ipopt_nlp.cpp' || echo '$(srcdir)/'`../src/cppad_ipopt_nlp.cpp
     292@am__fastdepCXX_TRUE@   $(am__mv) $(DEPDIR)/cppad_ipopt_nlp.Tpo $(DEPDIR)/cppad_ipopt_nlp.Po
     293@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='../src/cppad_ipopt_nlp.cpp' object='cppad_ipopt_nlp.o' libtool=no @AMDEPBACKSLASH@
    294294@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    295 @am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ipopt_cppad_nlp.o `test -f '../src/ipopt_cppad_nlp.cpp' || echo '$(srcdir)/'`../src/ipopt_cppad_nlp.cpp
    296 
    297 ipopt_cppad_nlp.obj: ../src/ipopt_cppad_nlp.cpp
    298 @am__fastdepCXX_TRUE@   $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ipopt_cppad_nlp.obj -MD -MP -MF $(DEPDIR)/ipopt_cppad_nlp.Tpo -c -o ipopt_cppad_nlp.obj `if test -f '../src/ipopt_cppad_nlp.cpp'; then $(CYGPATH_W) '../src/ipopt_cppad_nlp.cpp'; else $(CYGPATH_W) '$(srcdir)/../src/ipopt_cppad_nlp.cpp'; fi`
    299 @am__fastdepCXX_TRUE@   $(am__mv) $(DEPDIR)/ipopt_cppad_nlp.Tpo $(DEPDIR)/ipopt_cppad_nlp.Po
    300 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='../src/ipopt_cppad_nlp.cpp' object='ipopt_cppad_nlp.obj' libtool=no @AMDEPBACKSLASH@
     295@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cppad_ipopt_nlp.o `test -f '../src/cppad_ipopt_nlp.cpp' || echo '$(srcdir)/'`../src/cppad_ipopt_nlp.cpp
     296
     297cppad_ipopt_nlp.obj: ../src/cppad_ipopt_nlp.cpp
     298@am__fastdepCXX_TRUE@   $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cppad_ipopt_nlp.obj -MD -MP -MF $(DEPDIR)/cppad_ipopt_nlp.Tpo -c -o cppad_ipopt_nlp.obj `if test -f '../src/cppad_ipopt_nlp.cpp'; then $(CYGPATH_W) '../src/cppad_ipopt_nlp.cpp'; else $(CYGPATH_W) '$(srcdir)/../src/cppad_ipopt_nlp.cpp'; fi`
     299@am__fastdepCXX_TRUE@   $(am__mv) $(DEPDIR)/cppad_ipopt_nlp.Tpo $(DEPDIR)/cppad_ipopt_nlp.Po
     300@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='../src/cppad_ipopt_nlp.cpp' object='cppad_ipopt_nlp.obj' libtool=no @AMDEPBACKSLASH@
    301301@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    302 @am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ipopt_cppad_nlp.obj `if test -f '../src/ipopt_cppad_nlp.cpp'; then $(CYGPATH_W) '../src/ipopt_cppad_nlp.cpp'; else $(CYGPATH_W) '$(srcdir)/../src/ipopt_cppad_nlp.cpp'; fi`
     302@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cppad_ipopt_nlp.obj `if test -f '../src/cppad_ipopt_nlp.cpp'; then $(CYGPATH_W) '../src/cppad_ipopt_nlp.cpp'; else $(CYGPATH_W) '$(srcdir)/../src/cppad_ipopt_nlp.cpp'; fi`
    303303
    304304ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
  • trunk/cppad_ipopt/example/ode1.omh

    r1626 r1628  
    1010Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
    1111-------------------------------------------------------------------------- */
    12 $begin ipopt_cppad_ode$$
     12$begin cppad_ipopt_ode$$
    1313
    1414$section Example Simultaneous Solution of Forward and Inverse Problem$$
    1515
    1616$contents%
    17         ipopt_cppad/example/ode2.omh%
    18         ipopt_cppad/example/ode_run.hpp%
    19         ipopt_cppad/example/ode_check.cpp
     17        cppad_ipopt/example/ode2.omh%
     18        cppad_ipopt/example/ode_run.hpp%
     19        cppad_ipopt/example/ode_check.cpp
    2020%$$
    2121       
  • trunk/cppad_ipopt/example/ode2.omh

    r1626 r1628  
    250250
    251251$children%
    252         ipopt_cppad/example/ode_problem.hpp
     252        cppad_ipopt/example/ode_problem.hpp
    253253%$$
    254254$head Source$$
     
    260260$begin ipopt_ode_simple$$
    261261$spell
    262         ipopt_cppad_nlp
     262        cppad_ipopt_nlp
    263263$$
    264264
    265265$section ODE Fitting Using Simple Representation$$
    266266
    267 $index ipopt_cppad_nlp, ode simple representation$$
    268 $index ode, ipopt_cppad_nlp simple representation$$
    269 $index simple, ipopt_cppad_nlp ode representation$$
     267$index cppad_ipopt_nlp, ode simple representation$$
     268$index ode, cppad_ipopt_nlp simple representation$$
     269$index simple, cppad_ipopt_nlp ode representation$$
    270270
    271271$head Purpose$$
    272272In this section we represent the objective and constraint functions,
    273273(in the simultaneous forward and reverse optimization problem)
    274 using the $cref/simple representation/ipopt_cppad_nlp/Simple Representation/$$
    275 in the sense of $code ipopt_cppad_nlp$$.
     274using the $cref/simple representation/cppad_ipopt_nlp/Simple Representation/$$
     275in the sense of $code cppad_ipopt_nlp$$.
    276276
    277277$head Argument Vector$$
    278278The argument vector that we are optimizing with respect to
    279 ( $latex x$$ in $cref/ipopt_cppad_nlp/$$ )
     279( $latex x$$ in $cref/cppad_ipopt_nlp/$$ )
    280280has the following structure
    281281$latex \[
     
    293293$head Objective Function$$
    294294The objective function
    295 ( $latex fg_0 (x)$$ in $cref/ipopt_cppad_nlp/$$ )
     295( $latex fg_0 (x)$$ in $cref/cppad_ipopt_nlp/$$ )
    296296has the following representation,
    297297$latex \[
     
    319319
    320320$children%
    321         ipopt_cppad/example/ode_simple.hpp
     321        cppad_ipopt/example/ode_simple.hpp
    322322%$$
    323323$head Source$$
     
    330330$begin ipopt_ode_fast$$
    331331$spell
    332         ipopt_cppad_nlp
     332        cppad_ipopt_nlp
    333333$$
    334334
    335335$section ODE Fitting Using Fast Representation$$
    336336
    337 $index representation, ipopt_cppad_nlp ode$$
    338 $index ipopt_cppad_nlp, ode representation$$
    339 $index ode, ipopt_cppad_nlp representation$$
     337$index representation, cppad_ipopt_nlp ode$$
     338$index cppad_ipopt_nlp, ode representation$$
     339$index ode, cppad_ipopt_nlp representation$$
    340340
    341341$head Purpose$$
     
    496496The components of the vector $latex x$$
    497497corresponding to the vector $latex u^{k,\ell}$$ are
    498 (and the function $latex fg (x) $$ in $cref/ipopt_cppad_nlp/$$ )
     498(and the function $latex fg (x) $$ in $cref/cppad_ipopt_nlp/$$ )
    499499$latex \[
    500500\begin{array}{rcl}
     
    524524
    525525$children%
    526         ipopt_cppad/example/ode_fast.hpp
     526        cppad_ipopt/example/ode_fast.hpp
    527527%$$
    528528$head Source$$
  • trunk/cppad_ipopt/example/ode_check.cpp

    r1626 r1628  
    1616
    1717$code
    18 $verbatim%ipopt_cppad/example/ode_check.cpp%0%// BEGIN PROGRAM%// END PROGRAM%1%$$
     18$verbatim%cppad_ipopt/example/ode_check.cpp%0%// BEGIN PROGRAM%// END PROGRAM%1%$$
    1919$$
    2020
  • trunk/cppad_ipopt/example/ode_fast.hpp

    r1626 r1628  
    1515$begin ipopt_ode_fast.hpp$$
    1616$spell
    17         ipopt_cppad_nlp
     17        cppad_ipopt_nlp
    1818$$
    1919
    2020$section ODE Fitting Using Fast Representation$$
    2121
    22 $index ipopt_cppad_nlp, ode example source$$
    23 $index ode, ipopt_cppad_nlp example source$$
    24 $index example, ipopt_cppad_nlp ode source$$
    25 $index source, ipopt_cppad_nlp ode example$$
     22$index cppad_ipopt_nlp, ode example source$$
     23$index ode, cppad_ipopt_nlp example source$$
     24$index example, cppad_ipopt_nlp ode source$$
     25$index source, cppad_ipopt_nlp ode example$$
    2626
    2727$code
    28 $verbatim%ipopt_cppad/example/ode_fast.hpp%0%// BEGIN PROGRAM%// END PROGRAM%1%$$
     28$verbatim%cppad_ipopt/example/ode_fast.hpp%0%// BEGIN PROGRAM%// END PROGRAM%1%$$
    2929$$
    3030
     
    3636
    3737namespace {
    38         class FG_fast : public ipopt_cppad_fg_info
     38        class FG_fast : public cppad_ipopt_fg_info
    3939        {
    4040        private:
  • trunk/cppad_ipopt/example/ode_problem.hpp

    r1626 r1628  
    1515$begin ipopt_ode_problem.hpp$$
    1616$spell
    17         ipopt_cppad_nlp
     17        cppad_ipopt_nlp
    1818        Nz
    1919        Ny
     
    2828
    2929$code
    30 $verbatim%ipopt_cppad/example/ode_problem.hpp%0%// BEGIN PROGRAM%// END PROGRAM%1%$$
     30$verbatim%cppad_ipopt/example/ode_problem.hpp%0%// BEGIN PROGRAM%// END PROGRAM%1%$$
    3131$$
    3232
     
    3535*/
    3636// BEGIN PROGRAM
    37 # include "../src/ipopt_cppad_nlp.hpp"
     37# include "../src/cppad_ipopt_nlp.hpp"
    3838
    3939namespace {
  • trunk/cppad_ipopt/example/ode_run.hpp

    r1626 r1628  
    2222
    2323$code
    24 $verbatim%ipopt_cppad/example/ode_run.hpp%0%// BEGIN PROGRAM%// END PROGRAM%1%$$
     24$verbatim%cppad_ipopt/example/ode_run.hpp%0%// BEGIN PROGRAM%// END PROGRAM%1%$$
    2525$$
    2626
     
    8080
    8181        // create the CppAD Ipopt interface
    82         ipopt_cppad_solution solution;
    83         Ipopt::SmartPtr<Ipopt::TNLP> cppad_nlp = new ipopt_cppad_nlp(
     82        cppad_ipopt_solution solution;
     83        Ipopt::SmartPtr<Ipopt::TNLP> cppad_nlp = new cppad_ipopt_nlp(
    8484                n, m, x_i, x_l, x_u, g_l, g_u, &fg_info, &solution
    8585        );
  • trunk/cppad_ipopt/example/ode_simple.hpp

    r1626 r1628  
    1616$begin ipopt_ode_simple.hpp$$
    1717$spell
    18         ipopt_cppad_nlp
     18        cppad_ipopt_nlp
    1919        Nz
    2020        Ny
     
    2424$section ODE Fitting Using Simple Representation$$
    2525
    26 $index ipopt_cppad_nlp, ode example source$$
    27 $index ode, ipopt_cppad_nlp example source$$
    28 $index example, ipopt_cppad_nlp ode source$$
    29 $index source, ipopt_cppad_nlp ode example$$
     26$index cppad_ipopt_nlp, ode example source$$
     27$index ode, cppad_ipopt_nlp example source$$
     28$index example, cppad_ipopt_nlp ode source$$
     29$index source, cppad_ipopt_nlp ode example$$
    3030
    3131$code
    32 $verbatim%ipopt_cppad/example/ode_simple.hpp%0%// BEGIN PROGRAM%// END PROGRAM%1%$$
     32$verbatim%cppad_ipopt/example/ode_simple.hpp%0%// BEGIN PROGRAM%// END PROGRAM%1%$$
    3333$$
    3434
     
    4141// define in the empty namespace
    4242namespace {
    43         class FG_simple : public ipopt_cppad_fg_info
     43        class FG_simple : public cppad_ipopt_fg_info
    4444        {
    4545        private:
  • trunk/cppad_ipopt/speed/makefile.am

    r1627 r1628  
    3636        speed.cpp \
    3737        ode_speed.cpp \
    38         ../src/ipopt_cppad_nlp.cpp \
    39         ../src/ipopt_cppad_nlp.hpp \
     38        ../src/cppad_ipopt_nlp.cpp \
     39        ../src/cppad_ipopt_nlp.hpp \
    4040        ../example/ode_fast.hpp \
    4141        ../example/ode_problem.hpp \
  • trunk/cppad_ipopt/speed/makefile.in

    r1627 r1628  
    3434POST_UNINSTALL = :
    3535noinst_PROGRAMS = speed$(EXEEXT)
    36 subdir = ipopt_cppad/speed
     36subdir = cppad_ipopt/speed
    3737DIST_COMMON = $(srcdir)/makefile.am $(srcdir)/makefile.in
    3838ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     
    4646PROGRAMS = $(noinst_PROGRAMS)
    4747am_speed_OBJECTS = speed.$(OBJEXT) ode_speed.$(OBJEXT) \
    48         ipopt_cppad_nlp.$(OBJEXT)
     48        cppad_ipopt_nlp.$(OBJEXT)
    4949speed_OBJECTS = $(am_speed_OBJECTS)
    5050speed_LDADD = $(LDADD)
     
    8989CYGPATH_W = @CYGPATH_W@
    9090
    91 # $Id: makefile.am 1626 2010-01-18 19:27:35Z bradbell $
     91# $Id: makefile.am 1627 2010-01-19 12:44:18Z bradbell $
    9292# -----------------------------------------------------------------------------
    9393# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-10 Bradley M. Bell
     
    205205        speed.cpp \
    206206        ode_speed.cpp \
    207         ../src/ipopt_cppad_nlp.cpp \
    208         ../src/ipopt_cppad_nlp.hpp \
     207        ../src/cppad_ipopt_nlp.cpp \
     208        ../src/cppad_ipopt_nlp.hpp \
    209209        ../example/ode_fast.hpp \
    210210        ../example/ode_problem.hpp \
     
    224224          esac; \
    225225        done; \
    226         echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ipopt_cppad/speed/makefile'; \
     226        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu cppad_ipopt/speed/makefile'; \
    227227        $(am__cd) $(top_srcdir) && \
    228           $(AUTOMAKE) --gnu ipopt_cppad/speed/makefile
     228          $(AUTOMAKE) --gnu cppad_ipopt/speed/makefile
    229229.PRECIOUS: makefile
    230230makefile: $(srcdir)/makefile.in $(top_builddir)/config.status
     
    258258        -rm -f *.tab.c
    259259
    260 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipopt_cppad_nlp.Po@am__quote@
     260@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cppad_ipopt_nlp.Po@am__quote@
    261261@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ode_speed.Po@am__quote@
    262262@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/speed.Po@am__quote@
     
    276276@am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
    277277
    278 ipopt_cppad_nlp.o: ../src/ipopt_cppad_nlp.cpp
    279 @am__fastdepCXX_TRUE@   $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ipopt_cppad_nlp.o -MD -MP -MF $(DEPDIR)/ipopt_cppad_nlp.Tpo -c -o ipopt_cppad_nlp.o `test -f '../src/ipopt_cppad_nlp.cpp' || echo '$(srcdir)/'`../src/ipopt_cppad_nlp.cpp
    280 @am__fastdepCXX_TRUE@   $(am__mv) $(DEPDIR)/ipopt_cppad_nlp.Tpo $(DEPDIR)/ipopt_cppad_nlp.Po
    281 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='../src/ipopt_cppad_nlp.cpp' object='ipopt_cppad_nlp.o' libtool=no @AMDEPBACKSLASH@
     278cppad_ipopt_nlp.o: ../src/cppad_ipopt_nlp.cpp
     279@am__fastdepCXX_TRUE@   $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cppad_ipopt_nlp.o -MD -MP -MF $(DEPDIR)/cppad_ipopt_nlp.Tpo -c -o cppad_ipopt_nlp.o `test -f '../src/cppad_ipopt_nlp.cpp' || echo '$(srcdir)/'`../src/cppad_ipopt_nlp.cpp
     280@am__fastdepCXX_TRUE@   $(am__mv) $(DEPDIR)/cppad_ipopt_nlp.Tpo $(DEPDIR)/cppad_ipopt_nlp.Po
     281@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='../src/cppad_ipopt_nlp.cpp' object='cppad_ipopt_nlp.o' libtool=no @AMDEPBACKSLASH@
    282282@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    283 @am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ipopt_cppad_nlp.o `test -f '../src/ipopt_cppad_nlp.cpp' || echo '$(srcdir)/'`../src/ipopt_cppad_nlp.cpp
    284 
    285 ipopt_cppad_nlp.obj: ../src/ipopt_cppad_nlp.cpp
    286 @am__fastdepCXX_TRUE@   $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ipopt_cppad_nlp.obj -MD -MP -MF $(DEPDIR)/ipopt_cppad_nlp.Tpo -c -o ipopt_cppad_nlp.obj `if test -f '../src/ipopt_cppad_nlp.cpp'; then $(CYGPATH_W) '../src/ipopt_cppad_nlp.cpp'; else $(CYGPATH_W) '$(srcdir)/../src/ipopt_cppad_nlp.cpp'; fi`
    287 @am__fastdepCXX_TRUE@   $(am__mv) $(DEPDIR)/ipopt_cppad_nlp.Tpo $(DEPDIR)/ipopt_cppad_nlp.Po
    288 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='../src/ipopt_cppad_nlp.cpp' object='ipopt_cppad_nlp.obj' libtool=no @AMDEPBACKSLASH@
     283@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cppad_ipopt_nlp.o `test -f '../src/cppad_ipopt_nlp.cpp' || echo '$(srcdir)/'`../src/cppad_ipopt_nlp.cpp
     284
     285cppad_ipopt_nlp.obj: ../src/cppad_ipopt_nlp.cpp
     286@am__fastdepCXX_TRUE@   $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cppad_ipopt_nlp.obj -MD -MP -MF $(DEPDIR)/cppad_ipopt_nlp.Tpo -c -o cppad_ipopt_nlp.obj `if test -f '../src/cppad_ipopt_nlp.cpp'; then $(CYGPATH_W) '../src/cppad_ipopt_nlp.cpp'; else $(CYGPATH_W) '$(srcdir)/../src/cppad_ipopt_nlp.cpp'; fi`
     287@am__fastdepCXX_TRUE@   $(am__mv) $(DEPDIR)/cppad_ipopt_nlp.Tpo $(DEPDIR)/cppad_ipopt_nlp.Po
     288@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='../src/cppad_ipopt_nlp.cpp' object='cppad_ipopt_nlp.obj' libtool=no @AMDEPBACKSLASH@
    289289@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    290 @am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ipopt_cppad_nlp.obj `if test -f '../src/ipopt_cppad_nlp.cpp'; then $(CYGPATH_W) '../src/ipopt_cppad_nlp.cpp'; else $(CYGPATH_W) '$(srcdir)/../src/ipopt_cppad_nlp.cpp'; fi`
     290@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cppad_ipopt_nlp.obj `if test -f '../src/cppad_ipopt_nlp.cpp'; then $(CYGPATH_W) '../src/cppad_ipopt_nlp.cpp'; else $(CYGPATH_W) '$(srcdir)/../src/cppad_ipopt_nlp.cpp'; fi`
    291291
    292292ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
  • trunk/cppad_ipopt/speed/ode_speed.cpp

    r1627 r1628  
    1616
    1717$code
    18 $verbatim%ipopt_cppad/speed/ode_speed.cpp%0%// BEGIN PROGRAM%// END PROGRAM%1%$$
     18$verbatim%cppad_ipopt/speed/ode_speed.cpp%0%// BEGIN PROGRAM%// END PROGRAM%1%$$
    1919$$
    2020
  • trunk/cppad_ipopt/speed/speed.cpp

    r1627 r1628  
    1717extern double ode_speed(const std::string& name);
    1818
    19 // main program that runs all the ipopt_cppad speed tests
     19// main program that runs all the cppad_ipopt speed tests
    2020int main(void)
    2121{       using std::cout;
  • trunk/cppad_ipopt/src/cppad_ipopt_nlp.cpp

    r1627 r1628  
    1010Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
    1111-------------------------------------------------------------------------- */
    12 # include "ipopt_cppad_nlp.hpp"
     12# include "cppad_ipopt_nlp.hpp"
    1313
    1414// define as 0 for false or 1 for true
     
    2020
    2121/* Constructor. */
    22 ipopt_cppad_nlp::ipopt_cppad_nlp(
     22cppad_ipopt_nlp::cppad_ipopt_nlp(
    2323        size_t                     n           ,
    2424        size_t                     m           ,
     
    2828        const NumberVector&        g_l         ,
    2929        const NumberVector&        g_u         ,
    30         ipopt_cppad_fg_info*       fg_info     ,
    31         ipopt_cppad_solution*      solution    )
     30        cppad_ipopt_fg_info*       fg_info     ,
     31        cppad_ipopt_solution*      solution    )
    3232        : n_ ( n ),
    3333          m_ ( m ),
     
    4141{       size_t i, j, k;
    4242
    43         // set information needed in ipopt_cppad_fg_info
     43        // set information needed in cppad_ipopt_fg_info
    4444        fg_info->set_n(n);
    4545        fg_info->set_m(m);
     
    8484                        << ", I[" << i << "]=" << I_[i] << std::endl;
    8585                        CPPAD_ASSERT_KNOWN( I_[i] <= m,
    86                         "ipopt_cppad_nlp: invalid value in index vector I"
     86                        "cppad_ipopt_nlp: invalid value in index vector I"
    8787                        );
    8888                }
     
    9191                        << ", J[" << j << "]=" << J_[j] << std::endl;
    9292                        CPPAD_ASSERT_KNOWN( J_[j] < n,
    93                         "ipopt_cppad_nlp: invalid value in index vector J"
     93                        "cppad_ipopt_nlp: invalid value in index vector J"
    9494                        );
    9595                }
     
    153153
    154154// static member function that records operation sequence
    155 void ipopt_cppad_nlp::record_r_fun(
    156         ipopt_cppad_fg_info*   fg_info  ,
     155void cppad_ipopt_nlp::record_r_fun(
     156        cppad_ipopt_fg_info*   fg_info  ,
    157157        size_t                 k        ,
    158158        SizeVector&            p        ,
     
    162162/*
    163163fg_info: input
    164 the ipopt_cppad_fg_info object that is used to information
     164the cppad_ipopt_fg_info object that is used to information
    165165about the representation of fg(x).
    166166
     
    190190        ADVector r_ad = fg_info->eval_r(k, u_ad);
    191191        CPPAD_ASSERT_KNOWN( r_ad.size() == p[k] ,
    192                 "ipopt_cppad_nlp: eval_r return value size not equal to p[k]."
     192                "cppad_ipopt_nlp: eval_r return value size not equal to p[k]."
    193193        );
    194194        // stop the recording and store operation sequence in r_fun
     
    198198// static member function that computes CppAD sparsity pattern for
    199199// Jacobian of fg
    200 void ipopt_cppad_nlp::compute_index_jac_fg(
    201         ipopt_cppad_fg_info*  fg_info        ,
     200void cppad_ipopt_nlp::compute_index_jac_fg(
     201        cppad_ipopt_fg_info*  fg_info        ,
    202202        SizeVector&           I              ,
    203203        SizeVector&           J              ,
     
    213213/*
    214214fg_info: input
    215 the ipopt_cppad_fg_info object that is used to compute
     215the cppad_ipopt_fg_info object that is used to compute
    216216information about the representation of fg(x).
    217217
     
    315315// static member function that computes index map from array indices
    316316// for Jacobian of fg
    317 void ipopt_cppad_nlp::compute_index_jac_fg(
     317void cppad_ipopt_nlp::compute_index_jac_fg(
    318318        size_t                m              ,
    319319        size_t                n              ,
     
    352352// static member function that computes CppAD sparsity pattern for
    353353// Hessian of Lagragian
    354 void ipopt_cppad_nlp::compute_index_h_lag(
    355         ipopt_cppad_fg_info  *fg_info        ,
     354void cppad_ipopt_nlp::compute_index_h_lag(
     355        cppad_ipopt_fg_info  *fg_info        ,
    356356        SizeVector&           I              ,
    357357        SizeVector&           J              ,
     
    367367/*
    368368fg_info: input
    369 the ipopt_cppad_fg_info object that is used to compute
     369the cppad_ipopt_fg_info object that is used to compute
    370370information about the representation of fg(x).
    371371
     
    462462// static member function that computes index map from array indices
    463463// in Hessian of Lagragian
    464 void ipopt_cppad_nlp::compute_index_h_lag(
     464void cppad_ipopt_nlp::compute_index_h_lag(
    465465        size_t                m              ,
    466466        size_t                n              ,
     
    499499// static member function that computes the Ipopt sparsity structure for
    500500// Jacobian of g
    501 void ipopt_cppad_nlp::compute_structure_jac_g(
     501void cppad_ipopt_nlp::compute_structure_jac_g(
    502502        IndexMap&         index_jac_fg   , // const does not work
    503503        size_t            m              ,
     
    562562// static member function that computes the Ipopt sparsity structure for
    563563// Hessian of Lagragian
    564 void ipopt_cppad_nlp::compute_structure_h_lag(
     564void cppad_ipopt_nlp::compute_structure_h_lag(
    565565        IndexMap&         index_h_lag    , // const does not work
    566566        size_t             m             ,
     
    624624}
    625625
    626 ipopt_cppad_nlp::~ipopt_cppad_nlp()
     626cppad_ipopt_nlp::~cppad_ipopt_nlp()
    627627{}
    628628
    629 bool ipopt_cppad_nlp::get_nlp_info(Index& n, Index& m, Index& nnz_jac_g,
     629bool cppad_ipopt_nlp::get_nlp_info(Index& n, Index& m, Index& nnz_jac_g,
    630630                         Index& nnz_h_lag, IndexStyleEnum& index_style)
    631631{
     
    641641}
    642642
    643 bool ipopt_cppad_nlp::get_bounds_info(Index n, Number* x_l, Number* x_u,
     643bool cppad_ipopt_nlp::get_bounds_info(Index n, Number* x_l, Number* x_u,
    644644                            Index m, Number* g_l, Number* g_u)
    645645{       size_t i, j;
     
    661661}
    662662
    663 bool ipopt_cppad_nlp::get_starting_point(Index n, bool init_x, Number* x,
     663bool cppad_ipopt_nlp::get_starting_point(Index n, bool init_x, Number* x,
    664664                               bool init_z, Number* z_L, Number* z_U,
    665665                               Index m, bool init_lambda,
     
    679679}
    680680
    681 bool ipopt_cppad_nlp::eval_f(
     681bool cppad_ipopt_nlp::eval_f(
    682682        Index n, const Number* x, bool new_x, Number& obj_value
    683683)
     
    720720        using std::printf;
    721721        for(j = 0; j < n_; j++)
    722                 printf("ipopt_cppad_nlp::eval_f::x[%d] = %20.14g\n", j, x[j]);
    723         printf("ipopt_cppad_nlp::eval_f::obj_value = %20.14g\n", obj_value);
     722                printf("cppad_ipopt_nlp::eval_f::x[%d] = %20.14g\n", j, x[j]);
     723        printf("cppad_ipopt_nlp::eval_f::obj_value = %20.14g\n", obj_value);
    724724# endif
    725725        return true;
    726726}
    727727
    728 bool ipopt_cppad_nlp::eval_grad_f(
     728bool cppad_ipopt_nlp::eval_grad_f(
    729729        Index n, const Number* x, bool new_x, Number* grad_f
    730730)
     
    775775        using std::printf;
    776776        for(j = 0; j < n_; j++) printf(
    777         "ipopt_cppad_nlp::eval_grad_f::x[%d] = %20.14g\n", j, x[j]
     777        "cppad_ipopt_nlp::eval_grad_f::x[%d] = %20.14g\n", j, x[j]
    778778        );
    779779        for(j = 0; j < n_; j++) printf(
    780         "ipopt_cppad_nlp::eval_grad_f::grad_f[%d] = %20.14g\n", j, grad_f[j]
     780        "cppad_ipopt_nlp::eval_grad_f::grad_f[%d] = %20.14g\n", j, grad_f[j]
    781781        );
    782782# endif
     
    784784}
    785785
    786 bool ipopt_cppad_nlp::eval_g(
     786bool cppad_ipopt_nlp::eval_g(
    787787        Index n, const Number* x, bool new_x, Index m, Number* g
    788788)
     
    825825        using std::printf;
    826826        for(j = 0; j < n_; j++)
    827                 printf("ipopt_cppad_nlp::eval_g::x[%d] = %20.14g\n", j, x[j]);
     827                printf("cppad_ipopt_nlp::eval_g::x[%d] = %20.14g\n", j, x[j]);
    828828        for(i = 0; i < m_; i++)
    829                 printf("ipopt_cppad_nlp::eval_g::g[%d] = %20.14g\n", i, g[i]);
     829                printf("cppad_ipopt_nlp::eval_g::g[%d] = %20.14g\n", i, g[i]);
    830830# endif
    831831        return true;
    832832}
    833833
    834 bool ipopt_cppad_nlp::eval_jac_g(Index n, const Number* x, bool new_x,
     834bool cppad_ipopt_nlp::eval_jac_g(Index n, const Number* x, bool new_x,
    835835                       Index m, Index nele_jac, Index* iRow, Index *jCol,
    836836                       Number* values)
     
    895895}
    896896
    897 bool ipopt_cppad_nlp::eval_h(Index n, const Number* x, bool new_x,
     897bool cppad_ipopt_nlp::eval_h(Index n, const Number* x, bool new_x,
    898898                   Number obj_factor, Index m, const Number* lambda,
    899899                   bool new_lambda, Index nele_hess, Index* iRow,
     
    965965}
    966966
    967 void ipopt_cppad_nlp::finalize_solution(
     967void cppad_ipopt_nlp::finalize_solution(
    968968        Ipopt::SolverReturn               status    ,
    969969        Index                             n         ,
     
    984984
    985985        switch(status)
    986         {       // convert status from Ipopt enum to ipopt_cppad_solution enum
     986        {       // convert status from Ipopt enum to cppad_ipopt_solution enum
    987987                case Ipopt::SUCCESS:
    988988                solution_->status =
    989                         ipopt_cppad_solution::success;
     989                        cppad_ipopt_solution::success;
    990990                break;
    991991
    992992                case Ipopt::MAXITER_EXCEEDED:
    993993                solution_->status =
    994                         ipopt_cppad_solution::maxiter_exceeded;
     994                        cppad_ipopt_solution::maxiter_exceeded;
    995995                break;
    996996
    997997                case Ipopt::STOP_AT_TINY_STEP:
    998998                solution_->status =
    999                         ipopt_cppad_solution::stop_at_tiny_step;
     999                        cppad_ipopt_solution::stop_at_tiny_step;
    10001000                break;
    10011001
    10021002                case Ipopt::STOP_AT_ACCEPTABLE_POINT:
    10031003                solution_->status =
    1004                         ipopt_cppad_solution::stop_at_acceptable_point;
     1004                        cppad_ipopt_solution::stop_at_acceptable_point;
    10051005                break;
    10061006
    10071007                case Ipopt::LOCAL_INFEASIBILITY:
    10081008                solution_->status =
    1009                         ipopt_cppad_solution::local_infeasibility;
     1009                        cppad_ipopt_solution::local_infeasibility;
    10101010                break;
    10111011
    10121012                case Ipopt::USER_REQUESTED_STOP:
    10131013                solution_->status =
    1014                         ipopt_cppad_solution::user_requested_stop;
     1014                        cppad_ipopt_solution::user_requested_stop;
    10151015                break;
    10161016
    10171017                case Ipopt::DIVERGING_ITERATES:
    10181018                solution_->status =
    1019                         ipopt_cppad_solution::diverging_iterates;
     1019                        cppad_ipopt_solution::diverging_iterates;
    10201020                break;
    10211021
    10221022                case Ipopt::RESTORATION_FAILURE:
    10231023                solution_->status =
    1024                         ipopt_cppad_solution::restoration_failure;
     1024                        cppad_ipopt_solution::restoration_failure;
    10251025                break;
    10261026
    10271027                case Ipopt::ERROR_IN_STEP_COMPUTATION:
    10281028                solution_->status =
    1029                         ipopt_cppad_solution::error_in_step_computation;
     1029                        cppad_ipopt_solution::error_in_step_computation;
    10301030                break;
    10311031
    10321032                case Ipopt::INVALID_NUMBER_DETECTED:
    10331033                solution_->status =
    1034                         ipopt_cppad_solution::invalid_number_detected;
     1034                        cppad_ipopt_solution::invalid_number_detected;
    10351035                break;
    10361036
    10371037                case Ipopt::INTERNAL_ERROR:
    10381038                solution_->status =
    1039                         ipopt_cppad_solution::internal_error;
     1039                        cppad_ipopt_solution::internal_error;
    10401040                break;
    10411041
    10421042                default:
    10431043                solution_->status =
    1044                         ipopt_cppad_solution::unknown;
     1044                        cppad_ipopt_solution::unknown;
    10451045        }
    10461046
  • trunk/cppad_ipopt/src/cppad_ipopt_nlp.hpp

    r1627 r1628  
    11/* $Id$ */
    2 # ifndef CPPAD_IPOPT_CPPAD_NLP_INCLUDED
    3 # define CPPAD_IPOPT_CPPAD_NLP_INCLUDED
     2# ifndef CPPAD_IPOPT_NLP_INCLUDED
     3# define CPPAD_IPOPT_NLP_INCLUDED
    44/* --------------------------------------------------------------------------
    55CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-10 Bradley M. Bell
     
    1313-------------------------------------------------------------------------- */
    1414/*
    15 $begin ipopt_cppad_nlp$$
     15$begin cppad_ipopt_nlp$$
    1616$spell
    1717        cppad
     
    2727        const
    2828        optimizer
    29         ipopt_cppad_nlp.hpp
     29        cppad_ipopt_nlp.hpp
    3030        fg_info.eval
    3131        retape
     
    4242
    4343$head Syntax$$
    44 $codei%# include "ipopt_cppad_nlp.hpp"
    45 %$$
    46 $codei%# ipopt_cppad_solution %solution%;
    47 %$$
    48 $codei%ipopt_cppad_nlp %cppad_nlp%(
     44$codei%# include "cppad_ipopt_nlp.hpp"
     45%$$
     46$codei%# cppad_ipopt_solution %solution%;
     47%$$
     48$codei%cppad_ipopt_nlp %cppad_nlp%(
    4949        %n%, %m%, %x_i%, %x_l%, %x_u%, %g_l%, %g_u%, &%fg_info%, &%solution%
    5050)%$$
    5151
    5252$head Purpose$$
    53 The class $code ipopt_cppad_nlp$$ is used to solve nonlinear programming
     53The class $code cppad_ipopt_nlp$$ is used to solve nonlinear programming
    5454problems of the form
    5555$latex \[
     
    159159$head SizeVector$$
    160160The type $codei SizeVector$$ is defined by the
    161 $codei ipopt_cppad_nlp.hpp$$ include file to be a
     161$codei cppad_ipopt_nlp.hpp$$ include file to be a
    162162$cref/SimpleVector/$$ class with elements of type
    163163$code size_t$$.
     
    165165$head NumberVector$$
    166166The type $codei NumberVector$$ is defined by the
    167 $codei ipopt_cppad_nlp.hpp$$ include file to be a
     167$codei cppad_ipopt_nlp.hpp$$ include file to be a
    168168$cref/SimpleVector/$$ class with elements of type
    169169$code Ipopt::Number$$.
     
    171171$head ADNumber$$
    172172The type $codei ADNumber$$ is defined by the
    173 $codei ipopt_cppad_nlp.hpp$$ include file to be a
     173$codei cppad_ipopt_nlp.hpp$$ include file to be a
    174174an AD type that can be used to compute derivatives.
    175175
    176176$head ADVector$$
    177177The type $codei ADVector$$ is defined by the
    178 $codei ipopt_cppad_nlp.hpp$$ include file to be a
     178$codei cppad_ipopt_nlp.hpp$$ include file to be a
    179179$cref/SimpleVector/$$ class with elements of type
    180180$code ADNumber$$.
     
    246246%$$
    247247where the class $icode FG_info$$ is derived from the
    248 base class $code ipopt_cppad_fg_info$$.
     248base class $code cppad_ipopt_fg_info$$.
    249249Certain virtual member functions of $icode fg_info$$ are used to
    250250compute the value of $latex fg(x)$$.
     
    254254This member function has prototype
    255255$codei%
    256         virtual size_t ipopt_cppad_fg_info::number_functions(void)
     256        virtual size_t cppad_ipopt_fg_info::number_functions(void)
    257257%$$
    258258If $icode K$$ has type $code size_t$$, the syntax
     
    262262sets $icode K$$ to the number of functions used in the
    263263representation of $latex fg(x)$$; i.e., $latex K$$ in
    264 the $cref/representation/ipopt_cppad_nlp/fg(x)/Representation/$$ above.
     264the $cref/representation/cppad_ipopt_nlp/fg(x)/Representation/$$ above.
    265265$pre
    266266
    267267$$
    268 The $code ipopt_cppad_fg_info$$ implementation of this function
     268The $code cppad_ipopt_fg_info$$ implementation of this function
    269269corresponds to the simple representation mentioned above; i.e.
    270270$icode%K% = 1%$$.
     
    273273This member function has the prototype
    274274$codei%
    275 virtual ADVector ipopt_cppad_fg_info::eval_r(size_t %k%, const ADVector& %u%) = 0;
     275virtual ADVector cppad_ipopt_fg_info::eval_r(size_t %k%, const ADVector& %u%) = 0;
    276276%$$
    277277Thus it is a pure virtual function and must be defined in the
     
    281281$$
    282282This function computes the value of $latex r_k (u)$$
    283 used in the $cref/representation/ipopt_cppad_nlp/fg(x)/Representation/$$
     283used in the $cref/representation/cppad_ipopt_nlp/fg(x)/Representation/$$
    284284for $latex fg(x)$$.
    285285If $icode k$$ in $latex \{0 , \ldots , K-1 \}$$ has type $code size_t$$,
     
    295295This member function has the prototype
    296296$codei%
    297         virtual bool ipopt_cppad_fg_info::retape(size_t %k%)
     297        virtual bool cppad_ipopt_fg_info::retape(size_t %k%)
    298298%$$
    299299If $icode k$$ in $latex \{0 , \ldots , K-1 \}$$ has type $code size_t$$,
     
    305305sets $icode retape$$ to true or false.
    306306If $icode retape$$ is true,
    307 $code ipopt_cppad_nlp$$ will retape the operation sequence
     307$code cppad_ipopt_nlp$$ will retape the operation sequence
    308308corresponding to $latex r_k (u)$$ for
    309309every value of $icode u$$.
    310 An $code ipopt_cppad_nlp$$ object
     310An $code cppad_ipopt_nlp$$ object
    311311should use much less memory and run faster if $icode retape$$ is false.
    312312You can test both the true and false cases to make sure
     
    315315
    316316$$
    317 The $code ipopt_cppad_fg_info$$ implementation of this function
     317The $code cppad_ipopt_fg_info$$ implementation of this function
    318318sets $icode retape$$ to true
    319319(while slower it is also safer to always retape).
     
    322322This member function has prototype
    323323$codei%
    324         virtual size_t ipopt_cppad_fg_info::domain_size(size_t %k%)
     324        virtual size_t cppad_ipopt_fg_info::domain_size(size_t %k%)
    325325%$$
    326326If $icode k$$ in $latex \{0 , \ldots , K-1 \}$$ has type $code size_t$$,
     
    331331sets $icode q$$ to the dimension of the domain space for $latex r_k (u)$$;
    332332i.e., $latex q(k)$$ in
    333 the $cref/representation/ipopt_cppad_nlp/fg(x)/Representation/$$ above.
     333the $cref/representation/cppad_ipopt_nlp/fg(x)/Representation/$$ above.
    334334
    335335$pre
    336336
    337337$$
    338 The $code ipopt_cppad_h_base$$ implementation of this function
     338The $code cppad_ipopt_h_base$$ implementation of this function
    339339corresponds to the simple representation mentioned above; i.e.,
    340340$latex q = n$$.
     
    343343This member function has prototype
    344344$codei%
    345         virtual size_t ipopt_cppad_fg_info::range_size(size_t %k%)
     345        virtual size_t cppad_ipopt_fg_info::range_size(size_t %k%)
    346346%$$
    347347If $icode k$$ in $latex \{0 , \ldots , K-1 \}$$ has type $code size_t$$,
     
    352352sets $icode p$$ to the dimension of the range space for $latex r_k (u)$$;
    353353i.e., $latex p(k)$$ in
    354 the $cref/representation/ipopt_cppad_nlp/fg(x)/Representation/$$ above.
     354the $cref/representation/cppad_ipopt_nlp/fg(x)/Representation/$$ above.
    355355$pre
    356356
    357357$$
    358 The $code ipopt_cppad_h_base$$ implementation of this function
     358The $code cppad_ipopt_h_base$$ implementation of this function
    359359corresponds to the simple representation mentioned above; i.e.,
    360360$latex p = m+1$$.
     
    363363This member function has prototype
    364364$codei%
    365         virtual size_t ipopt_cppad_fg_info::number_terms(size_t %k%)
     365        virtual size_t cppad_ipopt_fg_info::number_terms(size_t %k%)
    366366%$$
    367367If $icode k$$ in $latex \{0 , \ldots , K-1 \}$$ has type $code size_t$$,
     
    373373for this value of $icode k$$;
    374374i.e., $latex L(k)$$ in
    375 the $cref/representation/ipopt_cppad_nlp/fg(x)/Representation/$$ above.
     375the $cref/representation/cppad_ipopt_nlp/fg(x)/Representation/$$ above.
    376376$pre
    377377
    378378$$
    379 The $code ipopt_cppad_h_base$$ implementation of this function
     379The $code cppad_ipopt_h_base$$ implementation of this function
    380380corresponds to the simple representation mentioned above; i.e.,
    381381$latex L = 1$$.
     
    384384This member function has prototype
    385385$codei%
    386         virtual void ipopt_cppad_fg_info::index(
     386        virtual void cppad_ipopt_fg_info::index(
    387387                size_t %k%, size_t %ell%, SizeVector& %I%, SizeVector& %J%
    388388        )
     
    409409the first $latex p(k)$$ elements of $icode I$$
    410410must be the corresponding elements of $latex I_{k,ell}$$
    411 in the $cref/representation/ipopt_cppad_nlp/fg(x)/Representation/$$ above.
     411in the $cref/representation/cppad_ipopt_nlp/fg(x)/Representation/$$ above.
    412412The argument
    413413$icode%
     
    419419the first $latex q(k)$$ elements of $icode J$$
    420420must be the corresponding elements of $latex J_{k,ell}$$
    421 in the $cref/representation/ipopt_cppad_nlp/fg(x)/Representation/$$ above.
     421in the $cref/representation/cppad_ipopt_nlp/fg(x)/Representation/$$ above.
    422422$pre
    423423
    424424$$
    425 The $code ipopt_cppad_h_base$$ implementation of this function
     425The $code cppad_ipopt_h_base$$ implementation of this function
    426426corresponds to the simple representation mentioned above; i.e.,
    427427for $latex i = 0 , \ldots , m$$,
     
    437437The $icode status$$ field of $icode solution$$ has prototype
    438438$codei%
    439         ipopt_cppad_solution::solution_status %solution%.status
     439        cppad_ipopt_solution::solution_status %solution%.status
    440440%$$
    441441It is the final Ipopt status for the optimizer.
     
    446446$rnext
    447447not_defined $cnext
    448 The optimizer did not return a final status to this $code ipopt_cppad_nlp$$
     448The optimizer did not return a final status to this $code cppad_ipopt_nlp$$
    449449object.
    450450$rnext
     
    548548
    549549$children%
    550         ipopt_cppad/example/example_windows.bat%
    551         ipopt_cppad/example/get_started.cpp%
    552         ipopt_cppad/example/ode1.omh%
    553         ipopt_cppad/speed/ode_speed.cpp
     550        cppad_ipopt/example/example_windows.bat%
     551        cppad_ipopt/example/get_started.cpp%
     552        cppad_ipopt/example/ode1.omh%
     553        cppad_ipopt/speed/ode_speed.cpp
    554554%$$
    555555
    556556$head Visual Studio$$
    557557If you are using Visual Studio, see the special
    558 $cref/ipopt_cppad_windows/$$ instructions.
     558$cref/cppad_ipopt_windows/$$ instructions.
    559559
    560560$head Example$$
    561561The file
    562562$cref/ipopt_get_started.cpp/$$ is an example and test of
    563 $code ipopt_cppad_nlp$$  that uses the
    564 $cref/simple representation/ipopt_cppad_nlp/Simple Representation/$$.
     563$code cppad_ipopt_nlp$$  that uses the
     564$cref/simple representation/cppad_ipopt_nlp/Simple Representation/$$.
    565565It returns true if it succeeds and false otherwise.
    566 The section $cref/ipopt_cppad_ode/$$ discusses an example that
     566The section $cref/cppad_ipopt_ode/$$ discusses an example that
    567567uses a more complex representation.
    568568
     
    584584Class for return solution values.
    585585*/
    586 class ipopt_cppad_fg_info
     586class cppad_ipopt_fg_info
    587587{
    588         friend class ipopt_cppad_nlp;
     588        friend class cppad_ipopt_nlp;
    589589private:
    590590        size_t n_;
     
    598598public:
    599599        // make destructor virtual so that derived class destructor gets called
    600         virtual ~ipopt_cppad_fg_info(void)
     600        virtual ~cppad_ipopt_fg_info(void)
    601601        { }
    602602        // number_functions: for simple representation
     
    628628};
    629629
    630 class ipopt_cppad_solution
     630class cppad_ipopt_solution
    631631{
    632632public:
     
    655655        Ipopt::Number     obj_value;
    656656
    657         ipopt_cppad_solution(void)
     657        cppad_ipopt_solution(void)
    658658        {       status = not_defined; }
    659659};
     
    663663and sparsity pattern calculations.
    664664*/
    665 class ipopt_cppad_nlp : public Ipopt::TNLP
     665class cppad_ipopt_nlp : public Ipopt::TNLP
    666666{
    667667        typedef Ipopt::Number                         Number;
     
    675675public:
    676676        // constructor
    677         ipopt_cppad_nlp(
     677        cppad_ipopt_nlp(
    678678                size_t n                         ,
    679679                size_t m                         ,
     
    683683                const NumberVector    &g_l       ,
    684684                const NumberVector    &g_u       ,
    685                 ipopt_cppad_fg_info*   fg_info   ,
    686                 ipopt_cppad_solution*  solution
     685                cppad_ipopt_fg_info*   fg_info   ,
     686                cppad_ipopt_solution*  solution
    687687        );
    688688
    689689
    690690        // default destructor
    691         virtual ~ipopt_cppad_nlp();
     691        virtual ~cppad_ipopt_nlp();
    692692
    693693        // return info about the nlp
     
    810810        const NumberVector              g_u_;
    811811        // Users function that evaluates f and g
    812         ipopt_cppad_fg_info* const      fg_info_;
     812        cppad_ipopt_fg_info* const      fg_info_;
    813813        // object for storing final solution results
    814         ipopt_cppad_solution* const     solution_;
     814        cppad_ipopt_solution* const     solution_;
    815815        // values determined by fg_info
    816816        size_t                 K_;      // number terms in summation
     
    844844        */
    845845        // Methods to block default compiler methods.
    846         ipopt_cppad_nlp(const ipopt_cppad_nlp&);
    847         ipopt_cppad_nlp& operator=(const ipopt_cppad_nlp&);
     846        cppad_ipopt_nlp(const cppad_ipopt_nlp&);
     847        cppad_ipopt_nlp& operator=(const cppad_ipopt_nlp&);
    848848
    849849        // Methods used by public methods
    850850        static void record_r_fun(
    851                 ipopt_cppad_fg_info  *fg_info    ,
     851                cppad_ipopt_fg_info  *fg_info    ,
    852852                size_t                k          ,
    853853                SizeVector&           p          ,
     
    857857        );
    858858        static void compute_index_jac_fg(
    859                 ipopt_cppad_fg_info  *fg_info        ,
     859                cppad_ipopt_fg_info  *fg_info        ,
    860860                SizeVector&           I              ,
    861861                SizeVector&           J              ,
     
    871871        );
    872872        static void compute_index_h_lag(
    873                 ipopt_cppad_fg_info  *fg_info        ,
     873                cppad_ipopt_fg_info  *fg_info        ,
    874874                SizeVector&           I              ,
    875875                SizeVector&           J              ,
  • trunk/makefile.am

    r1626 r1628  
    259259# Did user specify a value for IPOPT_DIR in configure command line
    260260if CppAD_IPOPT_CPPAD
    261 IPOPT_CPPAD = ipopt_cppad/example ipopt_cppad/speed
     261IPOPT_CPPAD = cppad_ipopt/example cppad_ipopt/speed
    262262else
    263263IPOPT_CPPAD =
  • trunk/makefile.in

    r1627 r1628  
    9292ETAGS = etags
    9393CTAGS = ctags
    94 DIST_SUBDIRS = ipopt_cppad/example ipopt_cppad/speed example \
     94DIST_SUBDIRS = cppad_ipopt/example cppad_ipopt/speed example \
    9595        introduction/get_started introduction/exp_apx print_for \
    9696        speed/cppad speed/double speed/example speed/profile \
     
    473473# ---------------------------------------------------------------
    474474# Did user specify a value for IPOPT_DIR in configure command line
    475 @CppAD_IPOPT_CPPAD_TRUE@IPOPT_CPPAD = ipopt_cppad/example ipopt_cppad/speed
     475@CppAD_IPOPT_CPPAD_TRUE@IPOPT_CPPAD = cppad_ipopt/example cppad_ipopt/speed
    476476#
    477477SUBDIRS = \
  • trunk/omh/example_list.omh

    r1626 r1628  
    3535        example/hes_minor_det.cpp%
    3636        example/hes_lu_det.cpp%
    37         ipopt_cppad/src/ipopt_cppad_nlp.hpp%
     37        cppad_ipopt/src/cppad_ipopt_nlp.hpp%
    3838        example/interface_2c.cpp%
    3939        example/jac_minor_det.cpp%
     
    120120$rref FunCheck.cpp$$
    121121$rref get_started.cpp$$
    122 $rref ipopt_cppad_nlp$$
     122$rref cppad_ipopt_nlp$$
    123123$rref ipopt_get_started.cpp$$
    124124$rref ipopt_ode_fast.hpp$$
  • trunk/omh/install_unix.omh.in

    r1401 r1628  
    562562is a valid reference to $code IpIpoptApplication.hpp$$.
    563563In this case, the CppAD interface to Ipopt
    564 $cref/examples/ipopt_cppad_nlp/Example/$$
     564$cref/examples/cppad_ipopt_nlp/Example/$$
    565565will be built.
    566566Once the $code make$$ command
    567567has been executed, you can run these examples by executing the command
    568568$codep
    569         ipopt_cppad/ipopt_cppad
     569        cppad_ipopt/cppad_ipopt
    570570$$
    571571
  • trunk/omh/whats_new_08.omh

    r1625 r1628  
    6464$head 12-04$$
    6565Extensive explanation for the $code ipopt_cppad/ipopt_cppad_ode$$ example was
    66 provided in the section $cref/ipopt_cppad_ode/$$.
     66provided in the section $cref/ipopt_cppad_ode/cppad_ipopt_ode/$$.
    6767
    6868$head 11-22$$
    6969The CppAD interface to the Ipopt nonlinear programming solver
     70$cref/cppad_ipopt_nlp/$$
    7071has been moved from $code example/ipopt_cppad_nlp$$ to
    71 $cref|ipopt_cppad/ipopt_cppad_nlp|ipopt_cppad_nlp|$$.
     72$code ipopt_cppad/ipopt_cppad_nlp$$.
    7273
    7374$head 11-21$$
     
    124125Use parenthesis and brackets to group terms of the form
    125126$latex m \times I$$ to make the documentation of
    126 $cref/ipopt_cppad_nlp/$$ easier to read.
     127$cref/ipopt_cppad_nlp/cppad_ipopt_nlp/$$ easier to read.
    127128
    128129Changed $code ipopt_cppad/ipopt_cppad_ode$$ to use $latex y(t)$$ for
     
    145146Add $code ipopt_cppad/ipopt_cppad_ode$$, an example and test
    146147that optimizes the solution of an ODE.
    147 Change $code r_eval$$ to $code eval_r$$ in $cref/ipopt_cppad_nlp/$$.
     148Change $code r_eval$$ to $code eval_r$$ in $cref/ipopt_cppad_nlp/cppad_ipopt_nlp/$$.
    148149Fix a dimension of $code u_ad$$ error in $code ipopt_cppad_nlp$$.
    149150
    150151$head 09-12$$
    151152Converted from storing full Hessian and Jacobian to a sparse data structure
    152 in $cref/ipopt_cppad_nlp/$$.
     153in $cref/ipopt_cppad_nlp/cppad_ipopt_nlp/$$.
    153154This greatly reduced the memory requirements (and increased the speed)
    154155for sparse problems.
    155156
    156157$head 09-10$$
    157 Fixed more indexing bugs in $cref/ipopt_cppad_nlp/$$
     158Fixed more indexing bugs in $cref/ipopt_cppad_nlp/cppad_ipopt_nlp/$$
    158159that effected cases where the domain index vector $latex J_{k, \ell}$$
    159160was different for different values of $latex k$$ and $latex \ell$$.
     
    161162
    162163$$
    163 In $cref/ipopt_cppad_nlp/$$,
     164In $cref/ipopt_cppad_nlp/cppad_ipopt_nlp/$$,
    164165combined $icode%fg_info%->domain_index()%$$ and
    165166$icode%fg_info%->range_index()%$$ into a single function called
     
    168169
    169170$head 09-09$$
    170 Fixed an indexing bug in $cref/ipopt_cppad_nlp/$$.
     171Fixed an indexing bug in $cref/ipopt_cppad_nlp/cppad_ipopt_nlp/$$.
    171172(This effected cases where the domain index vector $latex J_{k, \ell}$$
    172173was different for different values of $latex k$$ and $latex \ell$$.)
    173174
    174175$head 09-07$$
    175 Change $cref/ipopt_cppad_nlp/$$ so that object and constraints
     176Change $cref/ipopt_cppad_nlp/cppad_ipopt_nlp/$$ so that object and constraints
    176177are expressed as the double summation of simpler functions.
    177178This is more versatile that the single summation representation.
    178179
    179180$head 09-06$$
    180 Checked in a major change to $cref/ipopt_cppad_nlp/$$
     181Checked in a major change to $cref/ipopt_cppad_nlp/cppad_ipopt_nlp/$$
    181182whereby the object and constraints can be expressed as the
    182183sum of simpler functions.
     
    185186
    186187$head 09-05$$
    187 Fix bug in $cref/ipopt_cppad_nlp/$$ (not recording the function
     188Fix bug in $cref/ipopt_cppad_nlp/cppad_ipopt_nlp/$$ (not recording the function
    188189at the proper location. Here is the difference that occurred
    189190multiple places in the $code ipopt_cppad/ipopt_cppad_nlp.cpp$$ source:
     
    203204
    204205$head 09-04$$
    205 The $cref/ipopt_cppad_nlp/$$ interface has been changed to use
     206The $cref/ipopt_cppad_nlp/cppad_ipopt_nlp/$$ interface has been changed to use
    206207a derived class object instead of a pointer to a function.
    207208
    208209$head 09-03$$
    209 The $cref/ipopt_cppad_nlp/$$ interface has been changed to use
     210The $cref/ipopt_cppad_nlp/cppad_ipopt_nlp/$$ interface has been changed to use
    210211$code size_t$$ instead of $code Ipopt::Index$$.
    211212
    212213$head 09-01$$
    213 Back out the changes made to $cref/ipopt_cppad_nlp/$$ on 08-29
     214Back out the changes made to $cref/ipopt_cppad_nlp/cppad_ipopt_nlp/$$ on 08-29
    214215(because testing proved the change to be less efficient in the case
    215216that motivated the change).
     
    231232$$
    232233$index ipopt_cppad_nlp$$
    233 The $cref/ipopt_cppad_nlp/$$ example has been extended
     234The $cref/ipopt_cppad_nlp/cppad_ipopt_nlp/$$ example has been extended
    234235so that it allows for both scalar and vector evaluation of the
    235236objective and constraints; see the argument $icode fg_vector$$ in
    236 $cref/ipopt_cppad_nlp/$$.
     237$cref/ipopt_cppad_nlp/cppad_ipopt_nlp/$$.
    237238In the case where there is not a lot of common terms
    238239between the functions, the scalar evaluation may be more efficient.
     
    245246
    246247$head 08-08$$
    247 There was an indexing bug in the $cref/Ipopt/ipopt_cppad_nlp/$$ example
     248There was an indexing bug in the
     249$cref/ipopt_cppad_nlp/cppad_ipopt_nlp/$$ example
    248250that affected the $icode retape$$ equal to $code false$$ case.
    249251This has been fixed.
     
    256258
    257259$head 06-18$$
    258 Add specifications for the Ipopt class $cref/ipopt_cppad_nlp/$$.
     260Add specifications for the Ipopt class $cref/ipopt_cppad_nlp/cppad_ipopt_nlp/$$.
    259261This is only an example class it may change with future
    260262versions of CppAD.
  • trunk/omh/whats_new_10.omh

    r1626 r1628  
    1313$begin whats_new_10$$
    1414$spell
     15        hpp
     16        ifdef
     17        nlp
    1518        ipopt_cppad/src
    1619        CppAD
     
    2528assist you in learning about changes between various versions of CppAD.
    2629
     30$head 01-20$$
     31We plan to split up the
     32$code ipopt_cppad/src/ipopt_cppad_nlp.hpp$$ include file.
     33In preparation,
     34the example $code ipopt_cppad$$ has been changed to $code cppad_ipopt$$.
     35This will facilitate using $code CPPAD_IPOPT_*$$ for the
     36$code # ifdef$$ commands in the new include files
     37(note that they must begin with $code CPPAD$$).
     38
     39
    2740$head 01-18$$
    2841The $code ipopt_cppad$$ subdirectory of the distribution
     
    3043subdirectories.
    3144The $code example$$ ($code speed$$)
    32 subdirectory is where one builds the $cref%ipopt_cppad_nlp%$$ examples
     45subdirectory is where one builds the $cref/ipopt_cppad_nlp/cppad_ipopt_nlp/$$ examples
    3346($cref%speed tests%ipopt_ode_speed.cpp%$$).
    3447
     
    4255
    4356$lnext
    44 A speed test for $cref/ipopt_cppad_nlp/$$ was added; see
     57A speed test for $cref/ipopt_cppad_nlp/cppad_ipopt_nlp/$$ was added; see
    4558$cref/ipopt_ode_speed.cpp/$$.
    4659
  • trunk/omh/wish_list.omh

    r1625 r1628  
    7575In the case where $codei%retape(%k%)%$$ is true for some $icode k$$,
    7676one can still use the structure of the representation to compute a
    77 sparsity structure. Currently $code ipopt_cppad_nlp$$ uses a dense
     77sparsity structure. Currently $code cppad_ipopt_nlp$$ uses a dense
    7878sparsity structure for this case
    7979
  • trunk/svn_commit.sh

    r1569 r1628  
    1414# log_entry, add_list, delete_list, and change_list below:
    1515#
    16 log_entry="
     16log_entry="Move ipopt_cppad* to cppad_ipopt*.
     17
     18This is to facillitate splitting up cppad_ipopt_nlp.* into multiple
     19files and having CPPAD; see whats_new_10.omh entry for 01-20.
    1720"
    1821add_list="
     
    2427#
    2528change_list="
     29configure
     30svn_status.sh
     31check_include_file.sh
     32check_include_omh.sh
     33test_more/makefile.am
     34M       test_more/makefile.in
     35M       test_more/test_more.cpp
     36A  +    test_more/cppad_ipopt.cpp
     37D       test_more/ipopt_cppad.cpp
     38D       ipopt_cppad
     39D       ipopt_cppad/speed
     40D       ipopt_cppad/speed/speed.cpp
     41D       ipopt_cppad/speed/makefile.in
     42D       ipopt_cppad/speed/ode_speed.cpp
     43D       ipopt_cppad/speed/makefile.am
     44D       ipopt_cppad/src
     45D       ipopt_cppad/src/ipopt_cppad_nlp.hpp
     46D       ipopt_cppad/src/ipopt_cppad_nlp.cpp
     47D       ipopt_cppad/example
     48D       ipopt_cppad/example/ode_run.hpp
     49D       ipopt_cppad/example/makefile.in
     50D       ipopt_cppad/example/ode_check.cpp
     51D       ipopt_cppad/example/example.sln
     52D       ipopt_cppad/example/get_started.cpp
     53D       ipopt_cppad/example/ode_simple.hpp
     54D       ipopt_cppad/example/makefile.am
     55D       ipopt_cppad/example/example_windows.bat
     56D       ipopt_cppad/example/ode1.omh
     57D       ipopt_cppad/example/ode_fast.hpp
     58D       ipopt_cppad/example/ode2.omh
     59D       ipopt_cppad/example/example.cpp
     60D       ipopt_cppad/example/example.vcproj
     61D       ipopt_cppad/example/ode_problem.hpp
     62A  +    cppad_ipopt
     63M  +    cppad_ipopt/speed/speed.cpp
     64M  +    cppad_ipopt/speed/makefile.in
     65M  +    cppad_ipopt/speed/ode_speed.cpp
     66M  +    cppad_ipopt/speed/makefile.am
     67D  +    cppad_ipopt/src/ipopt_cppad_nlp.hpp
     68A  +    cppad_ipopt/src/cppad_ipopt_nlp.hpp
     69D  +    cppad_ipopt/src/ipopt_cppad_nlp.cpp
     70A  +    cppad_ipopt/src/cppad_ipopt_nlp.cpp
     71M  +    cppad_ipopt/example/ode_run.hpp
     72M  +    cppad_ipopt/example/makefile.in
     73M  +    cppad_ipopt/example/ode_check.cpp
     74M  +    cppad_ipopt/example/get_started.cpp
     75M  +    cppad_ipopt/example/ode_simple.hpp
     76M  +    cppad_ipopt/example/makefile.am
     77M  +    cppad_ipopt/example/example_windows.bat
     78M  +    cppad_ipopt/example/ode1.omh
     79M  +    cppad_ipopt/example/ode_fast.hpp
     80M  +    cppad_ipopt/example/ode2.omh
     81M  +    cppad_ipopt/example/ode_problem.hpp
     82M       configure.ac
     83M       check_include_def.sh
     84M       build.sh
     85M       makefile.am
     86M       makefile.in
     87M       omh/whats_new_10.omh
     88M       omh/wish_list.omh
     89M       omh/example_list.omh
     90M       omh/whats_new_08.omh
     91M       omh/install_unix.omh.in
     92M       cppad/local/cppad_assert.hpp
     93M       cppad/config.h
     94M       check_svn_dist.sh
     95M       check_example.sh
     96diff configure-local configure-subversion
     975690c5690
     98< ac_config_files="$ac_config_files cppad/configure.hpp doxyfile doc.omh example/test_one.sh omh/install_unix.omh omh/install_windows.omh test_more/test_one.sh makefile example/makefile cppad_ipopt/example/makefile cppad_ipopt/speed/makefile introduction/get_started/makefile introduction/exp_apx/makefile print_for/makefile speed/adolc/makefile speed/cppad/makefile speed/double/makefile speed/example/makefile speed/fadbad/makefile speed/profile/makefile speed/sacado/makefile test_more/makefile"
     99---
     100> ac_config_files="$ac_config_files cppad/configure.hpp doxyfile doc.omh example/test_one.sh omh/install_unix.omh omh/install_windows.omh test_more/test_one.sh makefile example/makefile ipopt_cppad/example/makefile ipopt_cppad/speed/makefile introduction/get_started/makefile introduction/exp_apx/makefile print_for/makefile speed/adolc/makefile speed/cppad/makefile speed/double/makefile speed/example/makefile speed/fadbad/makefile speed/profile/makefile speed/sacado/makefile test_more/makefile"
     1016443,6444c6443,6444
     102<     "cppad_ipopt/example/makefile") CONFIG_FILES="$CONFIG_FILES cppad_ipopt/example/makefile" ;;
     103<     "cppad_ipopt/speed/makefile") CONFIG_FILES="$CONFIG_FILES cppad_ipopt/speed/makefile" ;;
     104---
     105>     "ipopt_cppad/example/makefile") CONFIG_FILES="$CONFIG_FILES ipopt_cppad/example/makefile" ;;
     106>     "ipopt_cppad/speed/makefile") CONFIG_FILES="$CONFIG_FILES ipopt_cppad/speed/makefile" ;;
     107diff AUTHORS-local AUTHORS-subversion
     108diff configure.ac-local configure.ac-subversion
     109315,316c315,316
     110<       cppad_ipopt/example/makefile
     111<       cppad_ipopt/speed/makefile
     112---
     113>       ipopt_cppad/example/makefile
     114>       ipopt_cppad/speed/makefile
     115diff cppad/config.h-local cppad/config.h-subversion
    26116"
    27117#
  • trunk/svn_status.sh

    r1615 r1628  
    6565        -e '/^[?] *test_more\/test_one.sh$/d'                 \
    6666        -e '/^[?] *example\/example$/d'                       \
    67         -e '/^[?] *ipopt_cppad\/ipopt_cppad$/d'               \
    68         -e '/^[?] *ipopt_cppad\/ipopt_ode_speed$/d'           \
     67        -e '/^[?] *cppad_ipopt\/cppad_ipopt$/d'               \
     68        -e '/^[?] *cppad_ipopt\/ipopt_ode_speed$/d'           \
    6969        -e '/^[?] *print_for\/print_for$/d'                   \
    7070        -e '/^[?] *speed\/adolc\/adolc$/d'                    \
     
    7676        -e '/^[?] *speed\/sacado\/sacado$/d'                  \
    7777        -e '/^[?] *test_more\/test_more$/d'                   \
    78         -e '/^[?] *ipopt_cppad\/include$/d'                   \
    79         -e '/^[?] *ipopt_cppad\/lib$/d'                       \
     78        -e '/^[?] *cppad_ipopt\/include$/d'                   \
     79        -e '/^[?] *cppad_ipopt\/lib$/d'                       \
    8080        -e '/cygwin_package$/d'
    8181#
  • trunk/test_more/cppad_ipopt.cpp

    r1627 r1628  
    1111-------------------------------------------------------------------------- */
    1212
    13 # include "../ipopt_cppad/src/ipopt_cppad_nlp.hpp"
     13# include "../cppad_ipopt/src/cppad_ipopt_nlp.hpp"
    1414
    1515namespace { // Begin empty namespace
    1616// ---------------------------------------------------------------------------
    17 class FG_retape : public ipopt_cppad_fg_info
     17class FG_retape : public cppad_ipopt_fg_info
    1818{
    1919public:
     
    3939};
    4040
    41 bool ipopt_cppad_retape(void)
     41bool cppad_ipopt_retape(void)
    4242{       bool ok = true;
    4343        size_t j;
     
    6565        // object in derived class
    6666        FG_retape fg_retape;
    67         ipopt_cppad_fg_info *fg_info = &fg_retape; 
     67        cppad_ipopt_fg_info *fg_info = &fg_retape; 
    6868
    6969        // create the Ipopt interface
    70         ipopt_cppad_solution solution;
    71         Ipopt::SmartPtr<Ipopt::TNLP> cppad_nlp = new ipopt_cppad_nlp(
     70        cppad_ipopt_solution solution;
     71        Ipopt::SmartPtr<Ipopt::TNLP> cppad_nlp = new cppad_ipopt_nlp(
    7272                n, m, x_i, x_l, x_u, g_l, g_u, fg_info, &solution
    7373        );
     
    103103        Check some of the solution values
    104104        */
    105         ok &= solution.status == ipopt_cppad_solution::success;
     105        ok &= solution.status == cppad_ipopt_solution::success;
    106106        //
    107107        double check_x[]   = { -1., 0. };
     
    119119/*
    120120This solve the same problem as
    121 ../ipopt_cppad/ipopt_cppad_simple.cpp (repository revision
     121../cppad_ipopt/cppad_ipopt_simple.cpp (repository revision
    1221221276) in a convoluted way in order to test the representation code.
    123123*/
    124 class FG_K_gt_1 : public ipopt_cppad_fg_info
     124class FG_K_gt_1 : public cppad_ipopt_fg_info
    125125{
    126126private:
     
    181181};
    182182       
    183 bool ipopt_cppad_K_gt_1(void)
     183bool cppad_ipopt_K_gt_1(void)
    184184{       bool ok = true;
    185185        size_t j;
     
    214214        size_t icase;
    215215        for(icase = 0; icase <= 1; icase++)
    216         {       // Should ipopt_cppad_nlp retape the operation sequence for
     216        {       // Should cppad_ipopt_nlp retape the operation sequence for
    217217                // every new x. Can test both true and false cases because
    218218                // the operation sequence does not depend on x (for this case).
     
    227227                // object in derived class
    228228                FG_K_gt_1 my_fg_info(retape);
    229                 ipopt_cppad_fg_info *fg_info = &my_fg_info; 
     229                cppad_ipopt_fg_info *fg_info = &my_fg_info; 
    230230
    231231                // create the Ipopt interface
    232                 ipopt_cppad_solution solution;
    233                 Ipopt::SmartPtr<Ipopt::TNLP> cppad_nlp = new ipopt_cppad_nlp(
     232                cppad_ipopt_solution solution;
     233                Ipopt::SmartPtr<Ipopt::TNLP> cppad_nlp = new cppad_ipopt_nlp(
    234234                n, m, x_i, x_l, x_u, g_l, g_u, fg_info, &solution
    235235                );
     
    265265                Check some of the solution values
    266266                */
    267                 ok &= solution.status == ipopt_cppad_solution::success;
     267                ok &= solution.status == cppad_ipopt_solution::success;
    268268                //
    269269                double check_z_l[] = { 1.087871, 0.,       0.,      0.       };
     
    301301namespace
    302302{
    303 class FG_J_changes : public ipopt_cppad_fg_info
     303class FG_J_changes : public cppad_ipopt_fg_info
    304304{
    305305private:
     
    360360}
    361361
    362 bool ipopt_cppad_J_changes(void)
     362bool cppad_ipopt_J_changes(void)
    363363{
    364364        bool ok = true;
     
    388388        bool retape = false;
    389389        FG_J_changes my_fg_info(retape);
    390         ipopt_cppad_fg_info *fg_info = &my_fg_info;
    391 
    392         ipopt_cppad_solution solution;
    393         Ipopt::SmartPtr<Ipopt::TNLP> cppad_nlp = new ipopt_cppad_nlp(
     390        cppad_ipopt_fg_info *fg_info = &my_fg_info;
     391
     392        cppad_ipopt_solution solution;
     393        Ipopt::SmartPtr<Ipopt::TNLP> cppad_nlp = new cppad_ipopt_nlp(
    394394                n, m, x_i, x_l, x_u, g_l, g_u, fg_info, &solution
    395395        );
     
    419419         Check solution status
    420420         */
    421         ok &= solution.status == ipopt_cppad_solution::success;
     421        ok &= solution.status == cppad_ipopt_solution::success;
    422422        ok &= CppAD::NearEqual(solution.x[1], 0., 1e-6, 1e-6);
    423423
     
    428428} // End empty namespace
    429429
    430 bool ipopt_cppad(void)
     430bool cppad_ipopt(void)
    431431{       bool ok = true;
    432         ok &= ipopt_cppad_retape();
    433         ok &= ipopt_cppad_K_gt_1();
    434         ok &= ipopt_cppad_J_changes();
     432        ok &= cppad_ipopt_retape();
     433        ok &= cppad_ipopt_K_gt_1();
     434        ok &= cppad_ipopt_J_changes();
    435435        return ok;
    436436}
  • trunk/test_more/makefile.am

    r1626 r1628  
    2929endif
    3030if CppAD_IPOPT_CPPAD
    31 IPOPT_SRC_FILES   = ../ipopt_cppad/src/ipopt_cppad_nlp.cpp ipopt_cppad.cpp
     31IPOPT_SRC_FILES   = ../cppad_ipopt/src/cppad_ipopt_nlp.cpp cppad_ipopt.cpp
    3232IPOPT_EXTRA_FILES =
    3333IPOPT_INCLUDE     = -I$(IPOPT_DIR)/include
     
    3737else
    3838IPOPT_SRC_FILES   =
    39 IPOPT_EXTRA_FILES = ipopt_cppad.cpp
     39IPOPT_EXTRA_FILES = cppad_ipopt.cpp
    4040IPOPT_INCLUDE     =
    4141IPOPT_LIB         =
  • trunk/test_more/makefile.in

    r1627 r1628  
    4747PROGRAMS = $(noinst_PROGRAMS)
    4848am__test_more_SOURCES_DIST = base_adolc.cpp \
    49         ../ipopt_cppad/src/ipopt_cppad_nlp.cpp ipopt_cppad.cpp \
     49        ../cppad_ipopt/src/cppad_ipopt_nlp.cpp cppad_ipopt.cpp \
    5050        test_more.cpp abs.cpp acos.cpp asin.cpp add.cpp add_eq.cpp \
    5151        add_zero.cpp atan.cpp atan_2.cpp check_simple_vector.cpp \
     
    6464        value.cpp vec_ad.cpp vec_ad_par.cpp vec_unary.cpp
    6565@CppAD_ADOLC_TRUE@am__objects_1 = base_adolc.$(OBJEXT)
    66 @CppAD_IPOPT_CPPAD_TRUE@am__objects_2 = ipopt_cppad_nlp.$(OBJEXT) \
    67 @CppAD_IPOPT_CPPAD_TRUE@        ipopt_cppad.$(OBJEXT)
     66@CppAD_IPOPT_CPPAD_TRUE@am__objects_2 = cppad_ipopt_nlp.$(OBJEXT) \
     67@CppAD_IPOPT_CPPAD_TRUE@        cppad_ipopt.$(OBJEXT)
    6868am_test_more_OBJECTS = $(am__objects_1) $(am__objects_2) \
    6969        test_more.$(OBJEXT) abs.$(OBJEXT) acos.$(OBJEXT) \
     
    240240@CppAD_ADOLC_TRUE@ADOLC_FLAGS = -DCPPAD_ADOLC_TEST
    241241@CppAD_IPOPT_CPPAD_FALSE@IPOPT_SRC_FILES =
    242 @CppAD_IPOPT_CPPAD_TRUE@IPOPT_SRC_FILES = ../ipopt_cppad/src/ipopt_cppad_nlp.cpp ipopt_cppad.cpp
    243 @CppAD_IPOPT_CPPAD_FALSE@IPOPT_EXTRA_FILES = ipopt_cppad.cpp
     242@CppAD_IPOPT_CPPAD_TRUE@IPOPT_SRC_FILES = ../cppad_ipopt/src/cppad_ipopt_nlp.cpp cppad_ipopt.cpp
     243@CppAD_IPOPT_CPPAD_FALSE@IPOPT_EXTRA_FILES = cppad_ipopt.cpp
    244244@CppAD_IPOPT_CPPAD_TRUE@IPOPT_EXTRA_FILES =
    245245@CppAD_IPOPT_CPPAD_FALSE@IPOPT_INCLUDE =
     
    404404@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cos.Po@am__quote@
    405405@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cosh.Po@am__quote@
     406@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cppad_ipopt.Po@am__quote@
     407@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cppad_ipopt_nlp.Po@am__quote@
    406408@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbl_epsilon.Po@am__quote@
    407409@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/div.Po@am__quote@
     
    415417@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/from_base.Po@am__quote@
    416418@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fun_check.Po@am__quote@
    417 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipopt_cppad.Po@am__quote@
    418 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipopt_cppad_nlp.Po@am__quote@
    419419@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jacobian.Po@am__quote@
    420420@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Po@am__quote@
     
    470470@am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
    471471
    472 ipopt_cppad_nlp.o: ../ipopt_cppad/src/ipopt_cppad_nlp.cpp
    473 @am__fastdepCXX_TRUE@   $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ipopt_cppad_nlp.o -MD -MP -MF $(DEPDIR)/ipopt_cppad_nlp.Tpo -c -o ipopt_cppad_nlp.o `test -f '../ipopt_cppad/src/ipopt_cppad_nlp.cpp' || echo '$(srcdir)/'`../ipopt_cppad/src/ipopt_cppad_nlp.cpp
    474 @am__fastdepCXX_TRUE@   $(am__mv) $(DEPDIR)/ipopt_cppad_nlp.Tpo $(DEPDIR)/ipopt_cppad_nlp.Po
    475 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='../ipopt_cppad/src/ipopt_cppad_nlp.cpp' object='ipopt_cppad_nlp.o' libtool=no @AMDEPBACKSLASH@
     472cppad_ipopt_nlp.o: ../cppad_ipopt/src/cppad_ipopt_nlp.cpp
     473@am__fastdepCXX_TRUE@   $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cppad_ipopt_nlp.o -MD -MP -MF $(DEPDIR)/cppad_ipopt_nlp.Tpo -c -o cppad_ipopt_nlp.o `test -f '../cppad_ipopt/src/cppad_ipopt_nlp.cpp' || echo '$(srcdir)/'`../cppad_ipopt/src/cppad_ipopt_nlp.cpp
     474@am__fastdepCXX_TRUE@   $(am__mv) $(DEPDIR)/cppad_ipopt_nlp.Tpo $(DEPDIR)/cppad_ipopt_nlp.Po
     475@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='../cppad_ipopt/src/cppad_ipopt_nlp.cpp' object='cppad_ipopt_nlp.o' libtool=no @AMDEPBACKSLASH@
    476476@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    477 @am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ipopt_cppad_nlp.o `test -f '../ipopt_cppad/src/ipopt_cppad_nlp.cpp' || echo '$(srcdir)/'`../ipopt_cppad/src/ipopt_cppad_nlp.cpp
    478 
    479 ipopt_cppad_nlp.obj: ../ipopt_cppad/src/ipopt_cppad_nlp.cpp
    480 @am__fastdepCXX_TRUE@   $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ipopt_cppad_nlp.obj -MD -MP -MF $(DEPDIR)/ipopt_cppad_nlp.Tpo -c -o ipopt_cppad_nlp.obj `if test -f '../ipopt_cppad/src/ipopt_cppad_nlp.cpp'; then $(CYGPATH_W) '../ipopt_cppad/src/ipopt_cppad_nlp.cpp'; else $(CYGPATH_W) '$(srcdir)/../ipopt_cppad/src/ipopt_cppad_nlp.cpp'; fi`
    481 @am__fastdepCXX_TRUE@   $(am__mv) $(DEPDIR)/ipopt_cppad_nlp.Tpo $(DEPDIR)/ipopt_cppad_nlp.Po
    482 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='../ipopt_cppad/src/ipopt_cppad_nlp.cpp' object='ipopt_cppad_nlp.obj' libtool=no @AMDEPBACKSLASH@
     477@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cppad_ipopt_nlp.o `test -f '../cppad_ipopt/src/cppad_ipopt_nlp.cpp' || echo '$(srcdir)/'`../cppad_ipopt/src/cppad_ipopt_nlp.cpp
     478
     479cppad_ipopt_nlp.obj: ../cppad_ipopt/src/cppad_ipopt_nlp.cpp
     480@am__fastdepCXX_TRUE@   $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cppad_ipopt_nlp.obj -MD -MP -MF $(DEPDIR)/cppad_ipopt_nlp.Tpo -c -o cppad_ipopt_nlp.obj `if test -f '../cppad_ipopt/src/cppad_ipopt_nlp.cpp'; then $(CYGPATH_W) '../cppad_ipopt/src/cppad_ipopt_nlp.cpp'; else $(CYGPATH_W) '$(srcdir)/../cppad_ipopt/src/cppad_ipopt_nlp.cpp'; fi`
     481@am__fastdepCXX_TRUE@   $(am__mv) $(DEPDIR)/cppad_ipopt_nlp.Tpo $(DEPDIR)/cppad_ipopt_nlp.Po
     482@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='../cppad_ipopt/src/cppad_ipopt_nlp.cpp' object='cppad_ipopt_nlp.obj' libtool=no @AMDEPBACKSLASH@
    483483@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    484 @am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ipopt_cppad_nlp.obj `if test -f '../ipopt_cppad/src/ipopt_cppad_nlp.cpp'; then $(CYGPATH_W) '../ipopt_cppad/src/ipopt_cppad_nlp.cpp'; else $(CYGPATH_W) '$(srcdir)/../ipopt_cppad/src/ipopt_cppad_nlp.cpp'; fi`
     484@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cppad_ipopt_nlp.obj `if test -f '../cppad_ipopt/src/cppad_ipopt_nlp.cpp'; then $(CYGPATH_W) '../cppad_ipopt/src/cppad_ipopt_nlp.cpp'; else $(CYGPATH_W) '$(srcdir)/../cppad_ipopt/src/cppad_ipopt_nlp.cpp'; fi`
    485485
    486486ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
  • trunk/test_more/test_more.cpp

    r1558 r1628  
    2323extern bool AddEq(void);
    2424extern bool AddZero(void);
    25 extern bool ipopt_cppad(void);
     25extern bool cppad_ipopt(void);
    2626extern bool Asin(void);
    2727extern bool Atan(void);
     
    186186# endif
    187187# ifdef CPPAD_IPOPT_CPPAD_TEST
    188         ok &= Run( ipopt_cppad,     "ipopt_cppad"    );
     188        ok &= Run( cppad_ipopt,     "cppad_ipopt"    );
    189189# endif
    190190
Note: See TracChangeset for help on using the changeset viewer.