roboptim-commit Mailing List for RobOptim (Page 80)
Status: Beta
Brought to you by:
flamiraux
You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(62) |
Jul
(62) |
Aug
(36) |
Sep
(24) |
Oct
(41) |
Nov
(182) |
Dec
(8) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(12) |
Feb
(13) |
Mar
(104) |
Apr
(95) |
May
(90) |
Jun
(90) |
Jul
(93) |
Aug
(97) |
Sep
(91) |
Oct
(93) |
Nov
(90) |
Dec
(95) |
2011 |
Jan
(96) |
Feb
(84) |
Mar
(94) |
Apr
(91) |
May
(93) |
Jun
(91) |
Jul
(93) |
Aug
(93) |
Sep
(107) |
Oct
(93) |
Nov
(58) |
Dec
|
2012 |
Jan
(8) |
Feb
(4) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(6) |
Dec
(5) |
2013 |
Jan
(16) |
Feb
(22) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <no-...@ro...> - 2010-03-08 13:41:34
|
The Buildbot has finished a build of roboptim-core on RobOptim. Full details are available at: http://buildbot.roboptim.net/builders/roboptim-core/builds/6 Buildbot URL: http://buildbot.roboptim.net/ Buildslave for this Build: buildbot.roboptim.net Build Reason: The web-page 'force build' button was pressed by 'Thomas': Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed configure sincerely, -The Buildbot |
From: Thomas M. <tho...@us...> - 2010-03-08 13:40:13
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "build-aux". The branch, master has been updated via 73b6e9a1360cfba11ea780526934aecd7ba20929 (commit) from 527142d1b5d6635b7b20227ee67293a55a6fba76 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 73b6e9a1360cfba11ea780526934aecd7ba20929 Author: Thomas Moulard <tho...@gm...> Date: Mon Mar 8 14:38:01 2010 +0100 Update warnings.m4. * warning.m4: Avoid erroneous concatenation in recent Autoconf versions. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 6e20ec0..472f249 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-03-08 Thomas Moulard <tho...@gm...> + + Update warnings.m4. + * warning.m4: Avoid erroneous concatenation in recent Autoconf versions. + 2010-01-20 Thomas Moulard <tho...@gm...> Add CORBA IDL generation rules. diff --git a/warning.m4 b/warning.m4 index 53216fe..28981a8 100644 --- a/warning.m4 +++ b/warning.m4 @@ -1,6 +1,6 @@ -# Finding valid warning flags for the C Compiler. -*-Autoconf-*- +# Finding valid warning flags for the C and C++ Compilers. -*-Autoconf-*- # -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 2003, 2006, 2009 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,7 +17,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # 02111-1307 USA -# serial 2 +# serial 3 # AC_COMPILE_STDERR_IFELSE([PROGRAM], # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) @@ -31,7 +31,7 @@ AS_IF([_AC_EVAL_STDERR($ac_compile) && AC_TRY_COMMAND([test -s conftest.$ac_objext])], [$2], [_AC_MSG_LOG_CONFTEST -m4_ifvaln([$3],[$3])dnl])dnl +m4_ifvaln([$3],[$3])dnl]) rm -f conftest.$ac_objext m4_ifval([$1], [conftest.$ac_ext])[]dnl ])# AC_COMPILE_STDERR_IFELSE @@ -78,8 +78,8 @@ AC_COMPILE_STDERR_IFELSE([AC_LANG_PROGRAM], fi]) JRL_COMPILER_FLAGS_NAME=$ac_save_[]JRL_COMPILER_FLAGS_NAME ]) -AS_IF([test AS_VAR_GET(ac_Option) = yes], [$2], [$3])[]dnl -AS_VAR_PUSHDEF([ac_Option])dnl +AS_VAR_IF([ac_Option], [yes], [$2], [$3])dnl +AS_VAR_POPDEF([ac_Option])dnl ])# JRL_COMPILER_OPTION_IF @@ -99,7 +99,10 @@ AC_DEFUN([JRL_CXX_WARNINGS], m4_foreach([AC_Option], [$1], [JRL_COMPILER_OPTION_IF(AC_Option, [WARNING_CXXFLAGS="$WARNING_CXXFLAGS AC_Option" - JRL_COMPILER_FLAGS_NAME="$ac_save_compiler_flags $WARNING_FLAGS"])]) + JRL_COMPILER_FLAGS_NAME="$ac_save_compiler_flags $WARNING_FLAGS"]) +dnl Newlines inserted on purpose, to avoid erroneous concatenations. + +]) JRL_COMPILER_FLAGS_NAME=$ac_save_compiler_flags AC_SUBST([WARNING_CXXFLAGS]) ])# JRL_CXX_WARNINGS(OPTIONS) ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 +++++ warning.m4 | 17 ++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) hooks/post-receive -- build-aux |
From: Thomas M. <tho...@us...> - 2010-03-08 13:40:11
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-core". The branch, master has been updated via 8dd3e1927013062e5a76ffa2849db0550bbce710 (commit) from dc6ae48bef8d7a68df404f4eabc24bd82a26a640 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 8dd3e1927013062e5a76ffa2849db0550bbce710 Author: Thomas Moulard <tho...@gm...> Date: Mon Mar 8 14:39:50 2010 +0100 Synchronize. * build-aux: Synchronize. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 53104e3..5b842ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-03-08 Thomas Moulard <tho...@gm...> + + Synchronize. + * build-aux: Synchronize. + 2010-03-03 Thomas Moulard <tho...@gm...> Add Split filter. diff --git a/build-aux b/build-aux index 2478a62..73b6e9a 160000 --- a/build-aux +++ b/build-aux @@ -1 +1 @@ -Subproject commit 2478a6240e98e4a1e8ab014e0408607f60eaaa25 +Subproject commit 73b6e9a1360cfba11ea780526934aecd7ba20929 ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 +++++ build-aux | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) hooks/post-receive -- roboptim-core |
From: <no-...@ro...> - 2010-03-08 12:55:37
|
The Buildbot has finished a build of roboptim-core on RobOptim. Full details are available at: http://buildbot.roboptim.net/builders/roboptim-core/builds/5 Buildbot URL: http://buildbot.roboptim.net/ Buildslave for this Build: buildbot.roboptim.net Build Reason: The web-page 'force build' button was pressed by 'Thomas': Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed configure sincerely, -The Buildbot |
From: <no-...@ro...> - 2010-03-08 12:54:38
|
The Buildbot has finished a build of roboptim-core on RobOptim. Full details are available at: http://buildbot.roboptim.net/builders/roboptim-core/builds/4 Buildbot URL: http://buildbot.roboptim.net/ Buildslave for this Build: buildbot.roboptim.net Build Reason: The web-page 'force build' button was pressed by 'Thomas': Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed configure sincerely, -The Buildbot |
From: <no-...@ro...> - 2010-03-08 12:39:56
|
The Buildbot has finished a build of roboptim-core on RobOptim. Full details are available at: http://buildbot.roboptim.net/builders/roboptim-core/builds/2 Buildbot URL: http://buildbot.roboptim.net/ Buildslave for this Build: buildbot.roboptim.net Build Reason: The web-page 'force build' button was pressed by 'Thomas': Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed shell_1 configure sincerely, -The Buildbot |
From: <no-...@ro...> - 2010-03-08 12:36:29
|
The Buildbot has finished a build of roboptim-core on RobOptim. Full details are available at: http://buildbot.roboptim.net/builders/roboptim-core/builds/3 Buildbot URL: http://buildbot.roboptim.net/ Buildslave for this Build: buildbot.roboptim.net Build Reason: The web-page 'force build' button was pressed by 'Thomas': Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed configure sincerely, -The Buildbot |
From: <no-...@ro...> - 2010-03-08 12:34:54
|
The Buildbot has finished a build of roboptim-core on RobOptim. Full details are available at: http://buildbot.roboptim.net/builders/roboptim-core/builds/1 Buildbot URL: http://buildbot.roboptim.net/ Buildslave for this Build: buildbot.roboptim.net Build Reason: The web-page 'force build' button was pressed by 'Thomas': Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed shell_1 configure sincerely, -The Buildbot |
From: <no-...@ro...> - 2010-03-08 12:34:54
|
The Buildbot has finished a build of roboptim-core on RobOptim. Full details are available at: http://buildbot.roboptim.net/builders/roboptim-core/builds/0 Buildbot URL: http://buildbot.roboptim.net/ Buildslave for this Build: buildbot.roboptim.net Build Reason: The web-page 'force build' button was pressed by 'Thomas': Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed shell_1 configure sincerely, -The Buildbot |
From: Thomas M. <tho...@us...> - 2010-03-05 15:29:52
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-trajectory". The branch, master has been updated via afbe6e8265309e20c155fb64ec48d0546ad71aa0 (commit) via a80bc79b4be92f82b6c2d8ceb9a27bf0fc644e41 (commit) from 65953273cad3111b250d6b432cdeadf60dce396b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit afbe6e8265309e20c155fb64ec48d0546ad71aa0 Author: Thomas Moulard <tho...@gm...> Date: Fri Mar 5 16:29:36 2010 +0100 Check value at spline start. * tests/spline.cc: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 48ee67d..b8fbf1f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2010-03-05 Thomas Moulard <tho...@gm...> + Check value at spline start. + * tests/spline.cc: Here. + +2010-03-05 Thomas Moulard <tho...@gm...> + Debug frezze constraints on spline. * include/roboptim/trajectory/cubic-b-spline.hxx: Here. diff --git a/tests/spline.cc b/tests/spline.cc index db13f8f..7f77bee 100644 --- a/tests/spline.cc +++ b/tests/spline.cc @@ -122,7 +122,7 @@ int run_test () << "# " << spline.derivative (2.5, 2) << std::endl << "# " << spline.derivative (5., 2) << std::endl; - for (double t = 0.; t < 5.; t += 0.5) + for (double t = 0.5; t < 5.; t += 0.5) { try { @@ -139,6 +139,23 @@ int run_test () status = 1; } } + + for (double x = 0.; x < 10.; x += 0.25) + { + Function::vector_t params = spline.parameters (); + params[0 * 2] = 321; + params[1 * 2] = 123; + params[2 * 2] = 6. * (x - 1./6. * params[0 * 2] - 2. / 3. * params[1 * 2]); + + assert (1. / 6. * params[0 * 2] + + 2. / 3. * params[1 * 2] + + 1. / 6. * params[2 * 2] - x < 1e-8); + + spline.setParameters (params); + if (std::fabs (spline (0.)[0] - x) >= 1e-8) + std::cout << "# " << spline (0.)[0] << " != " << x << std::endl; + } + return status; } commit a80bc79b4be92f82b6c2d8ceb9a27bf0fc644e41 Author: Thomas Moulard <tho...@gm...> Date: Fri Mar 5 16:29:06 2010 +0100 Debug frezze constraints on spline. * include/roboptim/trajectory/cubic-b-spline.hxx: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 094959a..48ee67d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-03-05 Thomas Moulard <tho...@gm...> + + Debug frezze constraints on spline. + * include/roboptim/trajectory/cubic-b-spline.hxx: Here. + 2010-03-04 Thomas Moulard <tho...@gm...> Debug CubicBSpline start/end points freezing. diff --git a/include/roboptim/trajectory/cubic-b-spline.hxx b/include/roboptim/trajectory/cubic-b-spline.hxx index 1bddcce..add541e 100644 --- a/include/roboptim/trajectory/cubic-b-spline.hxx +++ b/include/roboptim/trajectory/cubic-b-spline.hxx @@ -40,7 +40,7 @@ namespace roboptim A (0, offset + i + 0. * outputSize ()) = 1. / 6.; A (0, offset + i + 1. * outputSize ()) = 2. / 3.; A (0, offset + i + 2. * outputSize ()) = 1. / 6.; - b (0) = -parameters ()[offset + i]; + b (0) = -parameters ()[i]; NumericLinearFunction* boundaryCond = new NumericLinearFunction (A, b); shared_ptr<LinearFunction> boundaryCondShPtr (boundaryCond); problem.addConstraint (boundaryCondShPtr, interval); ----------------------------------------------------------------------- Summary of changes: ChangeLog | 10 ++++++++++ include/roboptim/trajectory/cubic-b-spline.hxx | 2 +- tests/spline.cc | 19 ++++++++++++++++++- 3 files changed, 29 insertions(+), 2 deletions(-) hooks/post-receive -- roboptim-trajectory |
From: Thomas M. <tho...@us...> - 2010-03-04 14:59:34
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-trajectory". The branch, master has been updated via 65953273cad3111b250d6b432cdeadf60dce396b (commit) from b95cbc4b1d83a4f49e797c5a74c8cd465f0776e9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 65953273cad3111b250d6b432cdeadf60dce396b Author: Thomas Moulard <tho...@gm...> Date: Thu Mar 4 15:59:15 2010 +0100 Debug CubicBSpline start/end points freezing. * include/roboptim/trajectory/cubic-b-spline.hxx: Debug. * tests/spline-time-optimization.stdout: Regenerate. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index ad163c0..094959a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2010-03-04 Thomas Moulard <tho...@gm...> + Debug CubicBSpline start/end points freezing. + * include/roboptim/trajectory/cubic-b-spline.hxx: Debug. + * tests/spline-time-optimization.stdout: Regenerate. + +2010-03-04 Thomas Moulard <tho...@gm...> + Fix start/end freezing constriant for CubicBSpline. * include/roboptim/trajectory/cubic-b-spline.hh, * include/roboptim/trajectory/cubic-b-spline.hxx: Fix constraint diff --git a/include/roboptim/trajectory/cubic-b-spline.hxx b/include/roboptim/trajectory/cubic-b-spline.hxx index 0f0f974..1bddcce 100644 --- a/include/roboptim/trajectory/cubic-b-spline.hxx +++ b/include/roboptim/trajectory/cubic-b-spline.hxx @@ -63,9 +63,9 @@ namespace roboptim A.clear (); b.clear (); - A (0, paramSize - 1 - i - 0. * outputSize ()) = 1. / 6.; - A (0, paramSize - 1 - i - 1. * outputSize ()) = 2. / 3.; - A (0, paramSize - 1 - i - 2. * outputSize ()) = 1. / 6.; + A (0, offset + paramSize - 1 - i - 0. * outputSize ()) = 1. / 6.; + A (0, offset + paramSize - 1 - i - 1. * outputSize ()) = 2. / 3.; + A (0, offset + paramSize - 1 - i - 2. * outputSize ()) = 1. / 6.; b (0) = -parameters ()[paramSize - 1 - i]; NumericLinearFunction* boundaryCond = new NumericLinearFunction (A, b); shared_ptr<LinearFunction> boundaryCondShPtr (boundaryCond); diff --git a/tests/spline-time-optimization.stdout b/tests/spline-time-optimization.stdout index b921506..a697f59 100644 --- a/tests/spline-time-optimization.stdout +++ b/tests/spline-time-optimization.stdout @@ -16,11 +16,11 @@ Solver: Constraint 1 Numeric linear function - A = [1,16]((0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.17,0.67,0.17,0.00)) + A = [1,16]((0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.17,0.67,0.17)) B = [1](-200.00) Bounds: (0.00, 0.00) Scales: 1.00 - Initial value: [1](-3.33) (constraint not satisfied) + Initial value: [1](-0.00) (constraint not satisfied) Constraint 2 speed limit (0.00662252) (derivable function) ----------------------------------------------------------------------- Summary of changes: ChangeLog | 6 ++++++ include/roboptim/trajectory/cubic-b-spline.hxx | 6 +++--- tests/spline-time-optimization.stdout | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) hooks/post-receive -- roboptim-trajectory |
From: Thomas M. <tho...@us...> - 2010-03-04 12:58:59
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-trajectory". The branch, master has been updated via b95cbc4b1d83a4f49e797c5a74c8cd465f0776e9 (commit) from d6efc235e8d07dbbc73dcccb3fef58363df8ec5a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b95cbc4b1d83a4f49e797c5a74c8cd465f0776e9 Author: Thomas Moulard <tho...@gm...> Date: Thu Mar 4 13:58:42 2010 +0100 Fix start/end freezing constriant for CubicBSpline. * include/roboptim/trajectory/cubic-b-spline.hh, * include/roboptim/trajectory/cubic-b-spline.hxx: Fix constraint and add optional offset to handle trajectories with extra parameters. * tests/spline-optimization.cc: Use new linear constraint. * tests/spline-optimization.stdout: Regenerate. * tests/spline-time-optimization.cc: Use new linear constraint. * tests/spline-time-optimization.stdout: Regenerate. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 2296944..ad163c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2010-03-04 Thomas Moulard <tho...@gm...> + + Fix start/end freezing constriant for CubicBSpline. + * include/roboptim/trajectory/cubic-b-spline.hh, + * include/roboptim/trajectory/cubic-b-spline.hxx: Fix constraint + and add optional offset to handle trajectories with extra parameters. + * tests/spline-optimization.cc: Use new linear constraint. + * tests/spline-optimization.stdout: Regenerate. + * tests/spline-time-optimization.cc: Use new linear constraint. + * tests/spline-time-optimization.stdout: Regenerate. + 2010-03-03 Thomas Moulard <tho...@gm...> Fix SPEC file. diff --git a/include/roboptim/trajectory/cubic-b-spline.hh b/include/roboptim/trajectory/cubic-b-spline.hh index e02164c..d76320e 100644 --- a/include/roboptim/trajectory/cubic-b-spline.hh +++ b/include/roboptim/trajectory/cubic-b-spline.hh @@ -97,9 +97,9 @@ namespace roboptim const throw (); template <typename P> - void freezeCurveStart (P& problem); + void freezeCurveStart (P& problem, size_type offset = 0) const throw (); template <typename P> - void freezeCurveEnd (P& problem); + void freezeCurveEnd (P& problem, size_type offset = 0) const throw (); protected: void impl_compute (result_t&, double) const throw (); @@ -121,4 +121,5 @@ namespace roboptim } // end of namespace roboptim. +# include <roboptim/trajectory/cubic-b-spline.hxx> #endif //! ROBOPTIM_TRAJECTORY_TRAJECTORY_HH diff --git a/include/roboptim/trajectory/cubic-b-spline.hxx b/include/roboptim/trajectory/cubic-b-spline.hxx index 5aadeed..0f0f974 100644 --- a/include/roboptim/trajectory/cubic-b-spline.hxx +++ b/include/roboptim/trajectory/cubic-b-spline.hxx @@ -17,81 +17,61 @@ #ifndef ROBOPTIM_TRAJECTORY_CUBIC_B_SPLINE_HXX # define ROBOPTIM_TRAJECTORY_CUBIC_B_SPLINE_HXX +# include <roboptim/core/numeric-linear-function.hh> namespace roboptim { template <typename P> void - CubicBSpline::frezzeCurveStart (P& problem) + CubicBSpline::freezeCurveStart (P& problem, size_type offset) const throw () { - using boost::numeric::ublas::zero_matrix; - using boost::numeric::ublas::zero_vector; + using boost::shared_ptr; + const size_type paramSize = parameters ().size (); + const Function::interval_t interval = Function::makeInterval (0, 0); + assert (paramSize >= offset + 3 * outputSize ()); - Function::matrix_t A[3]; - Function::vector_t b[3]; + for (size_type i = 0; i < outputSize (); ++i) + { + Function::matrix_t A (1, offset + paramSize); + Function::vector_t b (1); + A.clear (); + b.clear (); - A[0] = zero_matrix<double>(1, paramSize); - A[1] = zero_matrix<double>(1, paramSize); - A[2] = zero_matrix<double>(1, paramSize); - - b[0] = zero_vector<double>(1); - b[1] = zero_vector<double>(1); - b[2] = zero_vector<double>(1); - A[0](0,1) = A[1](0,2) = A[2](0,3)=1./6.; - A[0](0,4) = A[1](0,5) = A[2](0,6)=2./3.; - A[0](0,7) = A[1](0,8) = A[2](0,9)=1./6.; - b[0](0) = -freeTimeTraj_.parameters ()[1+0]; - b[1](0) = -freeTimeTraj_.parameters ()[1+1]; - b[2](0) = -freeTimeTraj_.parameters ()[1+2]; - NumericLinearFunction* boundaryCond; - boundaryCond = new NumericLinearFunction(A[0], b[0]); - boost::shared_ptr<LinearFunction> boundaryCond0ShPtr(boundaryCond); - boundaryCond = new NumericLinearFunction(A[1], b[1]); - boost::shared_ptr<LinearFunction> boundaryCond1ShPtr(boundaryCond); - boundaryCond = new NumericLinearFunction(A[2], b[2]); - boost::shared_ptr<LinearFunction> boundaryCond2ShPtr(boundaryCond); - - problem.addConstraint(boundaryCond0ShPtr, interval); - problem.addConstraint(boundaryCond1ShPtr, interval); - problem.addConstraint(boundaryCond2ShPtr, interval); + A (0, offset + i + 0. * outputSize ()) = 1. / 6.; + A (0, offset + i + 1. * outputSize ()) = 2. / 3.; + A (0, offset + i + 2. * outputSize ()) = 1. / 6.; + b (0) = -parameters ()[offset + i]; + NumericLinearFunction* boundaryCond = new NumericLinearFunction (A, b); + shared_ptr<LinearFunction> boundaryCondShPtr (boundaryCond); + problem.addConstraint (boundaryCondShPtr, interval); + } } template <typename P> void - CubicBSpline::frezzeCurveEnd (P& problem) + CubicBSpline::freezeCurveEnd (P& problem, size_type offset) const throw () { - using boost::numeric::ublas::zero_matrix; - using boost::numeric::ublas::zero_vector; - - Function::matrix_t A[3]; - Function::vector_t b[3]; + using boost::shared_ptr; + const size_type paramSize = parameters ().size (); + const Function::interval_t interval = Function::makeInterval (0, 0); + assert (paramSize >= offset + 3 * outputSize ()); - A[0] = zero_matrix<double>(1, paramSize); - A[1] = zero_matrix<double>(1, paramSize); - A[2] = zero_matrix<double>(1, paramSize); - b[0] = zero_vector<double>(1); - b[1] = zero_vector<double>(1); - b[2] = zero_vector<double>(1); + for (size_type i = 0; i < outputSize (); ++i) + { + Function::matrix_t A (1, offset + paramSize); + Function::vector_t b (1); + A.clear (); + b.clear (); - A[0](0,paramSize-9) = A[1](0,paramSize-8) = A[2](0,paramSize-7)=1./6.; - A[0](0,paramSize-6) = A[1](0,paramSize-5) = A[2](0,paramSize-4)=2./3.; - A[0](0,paramSize-3) = A[1](0,paramSize-2) = A[2](0,paramSize-1)=1./6.; - b[0](0) = -freeTimeTraj_.parameters ()[paramSize-3]; - b[1](0) = -freeTimeTraj_.parameters ()[paramSize-2]; - b[2](0) = -freeTimeTraj_.parameters ()[paramSize-1]; - boundaryCond = new NumericLinearFunction(A[0], b[0]); - boost::shared_ptr<LinearFunction> boundaryCond3ShPtr(boundaryCond); - boundaryCond = new NumericLinearFunction(A[1], b[1]); - boost::shared_ptr<LinearFunction> boundaryCond4ShPtr(boundaryCond); - boundaryCond = new NumericLinearFunction(A[2], b[2]); - boost::shared_ptr<LinearFunction> boundaryCond5ShPtr(boundaryCond); - - Function::interval_t interval = Function::makeInterval(0., 0.); - problem.addConstraint(boundaryCond3ShPtr, interval); - problem.addConstraint(boundaryCond4ShPtr, interval); - problem.addConstraint(boundaryCond5ShPtr, interval); + A (0, paramSize - 1 - i - 0. * outputSize ()) = 1. / 6.; + A (0, paramSize - 1 - i - 1. * outputSize ()) = 2. / 3.; + A (0, paramSize - 1 - i - 2. * outputSize ()) = 1. / 6.; + b (0) = -parameters ()[paramSize - 1 - i]; + NumericLinearFunction* boundaryCond = new NumericLinearFunction (A, b); + shared_ptr<LinearFunction> boundaryCondShPtr (boundaryCond); + problem.addConstraint (boundaryCondShPtr, interval); + } } - } // end of namespace roboptim. #endif //! ROBOPTIM_TRAJECTORY_TRAJECTORY_HXX diff --git a/tests/spline-optimization.cc b/tests/spline-optimization.cc index 89727db..dbad8a2 100644 --- a/tests/spline-optimization.cc +++ b/tests/spline-optimization.cc @@ -28,7 +28,6 @@ #include <roboptim/core/visualization/gnuplot-commands.hh> #include <roboptim/core/visualization/gnuplot-function.hh> -#include <roboptim/trajectory/freeze.hh> #include <roboptim/trajectory/fwd.hh> #include <roboptim/trajectory/spline-length.hh> #include <roboptim/trajectory/cubic-b-spline.hh> @@ -48,6 +47,32 @@ using namespace roboptim::visualization::gnuplot; typedef CFSQPSolver::problem_t::constraints_t constraint_t; typedef CFSQPSolver solver_t; +void showSpline (const CubicBSpline& spline); + +void showSpline (const CubicBSpline& spline) +{ + std::cout + << "# Values:" << std::endl + << "# " << normalize (spline (0.)) << std::endl + << "# " << normalize (spline (2.5)) << std::endl + << "# " << normalize (spline (4.)) << std::endl + + << "# 1st derivative:" << std::endl + << "# " << normalize (spline.derivative (0., 1)) << std::endl + << "# " << normalize (spline.derivative (2.5, 1)) << std::endl + << "# " << normalize (spline.derivative (4., 1)) << std::endl + + << "# 2nd derivative:" << std::endl + << "# " << normalize (spline.derivative (0., 2)) << std::endl + << "# " << normalize (spline.derivative (2.5, 2)) << std::endl + << "# " << normalize (spline.derivative (4., 2)) << std::endl + + << "# variationConfigWrtParam:" << std::endl + << "# " << normalize (spline.variationConfigWrtParam (0.)) << std::endl + << "# " << normalize (spline.variationConfigWrtParam (2.5)) << std::endl + << "# " << normalize (spline.variationConfigWrtParam (4.)) << std::endl; +} + int run_test () { using namespace boost::assign; @@ -71,26 +96,7 @@ int run_test () CubicBSpline spline (timeRange, 2, params, "before"); discreteInterval_t interval (0., 4., 0.01); - std::cout - << "# Values:" << std::endl - << "# " << normalize (spline (0.)) << std::endl - << "# " << normalize (spline (2.5)) << std::endl - << "# " << normalize (spline (4.)) << std::endl - - << "# 1st derivative:" << std::endl - << "# " << normalize (spline.derivative (0., 1)) << std::endl - << "# " << normalize (spline.derivative (2.5, 1)) << std::endl - << "# " << normalize (spline.derivative (4., 1)) << std::endl - - << "# 2nd derivative:" << std::endl - << "# " << normalize (spline.derivative (0., 2)) << std::endl - << "# " << normalize (spline.derivative (2.5, 2)) << std::endl - << "# " << normalize (spline.derivative (4., 2)) << std::endl - - << "# variationConfigWrtParam:" << std::endl - << "# " << normalize (spline.variationConfigWrtParam (0.)) << std::endl - << "# " << normalize (spline.variationConfigWrtParam (2.5)) << std::endl - << "# " << normalize (spline.variationConfigWrtParam (4.)) << std::endl; + showSpline (spline); Gnuplot gnuplot = Gnuplot::make_interactive_gnuplot (); gnuplot @@ -120,20 +126,8 @@ int run_test () solver_t::problem_t problem (cost); problem.startingPoint () = params; - std::vector<Function::size_type> indices; - indices.push_back (0); - indices.push_back (1); - indices.push_back (2); - indices.push_back (3); - indices.push_back (4); - indices.push_back (5); - indices.push_back (params.size () - 6); - indices.push_back (params.size () - 5); - indices.push_back (params.size () - 4); - indices.push_back (params.size () - 3); - indices.push_back (params.size () - 2); - indices.push_back (params.size () - 1); - makeFreeze (problem) (indices, params); + spline.freezeCurveStart (problem); + spline.freezeCurveEnd (problem); SolverFactory<solver_t> factory ("cfsqp", problem); solver_t& solver = factory (); @@ -151,6 +145,7 @@ int run_test () { Result& result = boost::get<Result> (res); CubicBSpline optimizedSpline (timeRange, 2, result.x, "after"); + showSpline (optimizedSpline); params = result.x; gnuplot << plot_xy (optimizedSpline); break; @@ -165,6 +160,7 @@ int run_test () { ResultWithWarnings& result = boost::get<ResultWithWarnings> (res); CubicBSpline optimizedSpline (timeRange, 2, result.x, "after"); + showSpline (optimizedSpline); params = result.x; std::cerr << result << std::endl; gnuplot << plot_xy (optimizedSpline); diff --git a/tests/spline-optimization.stdout b/tests/spline-optimization.stdout index 4cb3deb..f3a4741 100644 --- a/tests/spline-optimization.stdout +++ b/tests/spline-optimization.stdout @@ -14,8 +14,24 @@ # [2,16]((0.17,0.00,0.67,0.00,0.17,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00),(0.00,0.17,0.00,0.67,0.00,0.17,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00)) # [2,16]((0.00,0.00,0.00,0.00,0.00,0.00,0.11,0.00,0.65,0.00,0.24,0.00,0.00,0.00,0.00,0.00),(0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.11,0.00,0.65,0.00,0.24,0.00,0.00,0.00,0.00)) # [2,16]((0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.17,0.00,0.67,0.00,0.17,0.00),(0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.17,0.00,0.67,0.00,0.17)) +# Values: +# [2](0.00,0.00) +# [2](62.63,62.63) +# [2](100.00,100.00) +# 1st derivative: +# [2](21.48,21.48) +# [2](24.97,24.97) +# [2](21.48,21.48) +# 2nd derivative: +# [2](13.87,13.87) +# [2](-1.06,-1.06) +# [2](-13.87,-13.87) +# variationConfigWrtParam: +# [2,16]((0.17,0.00,0.67,0.00,0.17,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00),(0.00,0.17,0.00,0.67,0.00,0.17,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00)) +# [2,16]((0.00,0.00,0.00,0.00,0.00,0.00,0.11,0.00,0.65,0.00,0.24,0.00,0.00,0.00,0.00,0.00),(0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.11,0.00,0.65,0.00,0.24,0.00,0.00,0.00,0.00)) +# [2,16]((0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.17,0.00,0.67,0.00,0.17,0.00),(0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.17,0.00,0.67,0.00,0.17)) #!/usr/bin/gnuplot -# Generated by RobOptim core library 0.5 +# Generated by RobOptim core library 0.5.12.dc6a set terminal wxt persist set multiplot layout 1,2 set grid @@ -121,104 +137,104 @@ plot '-' title 'before' with line e plot '-' title 'after' with line -0.000877 0.000877 -0.007018 0.007018 -0.023684 0.023684 -0.056140 0.056140 -0.109649 0.109649 -0.189473 0.189473 -0.300877 0.300877 -0.449122 0.449122 -0.639473 0.639473 -0.877191 0.877191 -1.167542 1.167542 -1.515787 1.515787 -1.927190 1.927190 -2.407013 2.407013 -2.960521 2.960521 -3.592976 3.592976 -4.309642 4.309642 -5.115781 5.115781 -6.016656 6.016656 -7.017532 7.017532 -8.121367 8.121367 -9.321914 9.321914 -10.610618 10.610618 -11.978927 11.978927 -13.418289 13.418289 -14.920150 14.920150 -16.475959 16.475959 -18.077163 18.077163 -19.715210 19.715210 -21.381545 21.381545 -23.067618 23.067618 -24.764876 24.764876 -26.464765 26.464765 -28.158733 28.158733 -29.838228 29.838228 -31.494697 31.494697 -33.119587 33.119587 -34.704347 34.704347 -36.240422 36.240422 -37.719262 37.719262 -39.134834 39.134834 -40.491196 40.491196 -41.794927 41.794927 -43.052606 43.052606 -44.270812 44.270812 -45.456123 45.456123 -46.615118 46.615118 -47.754377 47.754377 -48.880478 48.880478 +0.870031 0.870031 +1.760881 1.760881 +2.671182 2.671182 +3.599565 3.599565 +4.544661 4.544661 +5.505102 5.505102 +6.479520 6.479520 +7.466546 7.466546 +8.464811 8.464811 +9.472947 9.472947 +10.489585 10.489585 +11.513357 11.513357 +12.542894 12.542894 +13.576828 13.576828 +14.613790 14.613790 +15.652411 15.652411 +16.691324 16.691324 +17.729159 17.729159 +18.764548 18.764548 +19.796122 19.796122 +20.822807 20.822807 +21.844702 21.844702 +22.862201 22.862201 +23.875697 23.875697 +24.885584 24.885584 +25.892254 25.892254 +26.896102 26.896102 +27.897520 27.897520 +28.896902 28.896902 +29.894641 29.894641 +30.891132 30.891132 +31.886766 31.886766 +32.881939 32.881939 +33.877042 33.877042 +34.872469 34.872469 +35.868614 35.868614 +36.865871 36.865871 +37.864632 37.864632 +38.865290 38.865290 +39.868241 39.868241 +40.873765 40.873765 +41.881706 41.881706 +42.891794 42.891794 +43.903762 43.903762 +44.917341 44.917341 +45.932262 45.932262 +46.948257 46.948257 +47.965057 47.965057 +48.982394 48.982394 50.000000 50.000000 -51.119522 51.119522 -52.245623 52.245623 -53.384882 53.384882 -54.543877 54.543877 -55.729188 55.729188 -56.947394 56.947394 -58.205073 58.205073 -59.508804 59.508804 -60.865166 60.865166 -62.280738 62.280738 -63.759578 63.759578 -65.295653 65.295653 -66.880413 66.880413 -68.505303 68.505303 -70.161772 70.161772 -71.841267 71.841267 -73.535235 73.535235 -75.235124 75.235124 -76.932382 76.932382 -78.618455 78.618455 -80.284790 80.284790 -81.922837 81.922837 -83.524041 83.524041 -85.079850 85.079850 -86.581711 86.581711 -88.021073 88.021073 -89.389382 89.389382 -90.678086 90.678086 -91.878633 91.878633 -92.982468 92.982468 -93.983344 93.983344 -94.884219 94.884219 -95.690358 95.690358 -96.407024 96.407024 -97.039479 97.039479 -97.592987 97.592987 -98.072810 98.072810 -98.484213 98.484213 -98.832458 98.832458 -99.122809 99.122809 -99.360527 99.360527 -99.550878 99.550878 -99.699123 99.699123 -99.810527 99.810527 -99.890351 99.890351 -99.943860 99.943860 -99.976316 99.976316 -99.992982 99.992982 +51.017606 51.017606 +52.034943 52.034943 +53.051743 53.051743 +54.067738 54.067738 +55.082659 55.082659 +56.096238 56.096238 +57.108206 57.108206 +58.118294 58.118294 +59.126235 59.126235 +60.131759 60.131759 +61.134710 61.134710 +62.135368 62.135368 +63.134129 63.134129 +64.131386 64.131386 +65.127531 65.127531 +66.122958 66.122958 +67.118061 67.118061 +68.113234 68.113234 +69.108868 69.108868 +70.105359 70.105359 +71.103098 71.103098 +72.102480 72.102480 +73.103898 73.103898 +74.107746 74.107746 +75.114416 75.114416 +76.124303 76.124303 +77.137799 77.137799 +78.155298 78.155298 +79.177193 79.177193 +80.203878 80.203878 +81.235452 81.235452 +82.270841 82.270841 +83.308676 83.308676 +84.347589 84.347589 +85.386210 85.386210 +86.423172 86.423172 +87.457106 87.457106 +88.486643 88.486643 +89.510415 89.510415 +90.527053 90.527053 +91.535189 91.535189 +92.533454 92.533454 +93.520480 93.520480 +94.494898 94.494898 +95.455339 95.455339 +96.400435 96.400435 +97.328818 97.328818 +98.239119 98.239119 e unset multiplot diff --git a/tests/spline-time-optimization.cc b/tests/spline-time-optimization.cc index a5d6b9e..5b0f351 100644 --- a/tests/spline-time-optimization.cc +++ b/tests/spline-time-optimization.cc @@ -31,7 +31,6 @@ #include <roboptim/core/visualization/gnuplot-function.hh> #include <roboptim/trajectory/free-time-trajectory.hh> -#include <roboptim/trajectory/freeze.hh> #include <roboptim/trajectory/fwd.hh> #include <roboptim/trajectory/limit-speed.hh> #include <roboptim/trajectory/spline-length.hh> @@ -97,14 +96,8 @@ int run_test () const freeTime_t::vector_t freeTimeParams = freeTimeTraj.parameters (); - std::vector<Function::size_type> indices; - indices.push_back (1); - indices.push_back (2); - indices.push_back (3); - indices.push_back (freeTimeParams.size () - 3); - indices.push_back (freeTimeParams.size () - 2); - indices.push_back (freeTimeParams.size () - 1); - makeFreeze (problem) (indices, freeTimeParams); + spline.freezeCurveStart (problem, 1); + spline.freezeCurveEnd (problem, 1); Function::interval_t vRange = Function::makeUpperInterval (.5 * vMax * vMax); LimitSpeed<FreeTimeTrajectory<CubicBSpline> >::addToProblem diff --git a/tests/spline-time-optimization.stdout b/tests/spline-time-optimization.stdout index 0fa2cd1..b921506 100644 --- a/tests/spline-time-optimization.stdout +++ b/tests/spline-time-optimization.stdout @@ -3,904 +3,920 @@ Solver: Numeric linear function A = [1,16]((-1.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00)) B = [1](0.00) - Argument's bounds: (0.00, inf), (0.00, 0.00), (0.00, 0.00), (0.00, 0.00), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (200.00, 200.00), (200.00, 200.00), (200.00, 200.00) + Argument's bounds: (0.00, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf) Argument's scales: 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00 - Number of constraints: 150 + Number of constraints: 152 Constraint 0 + Numeric linear function + A = [1,16]((0.00,0.17,0.67,0.17,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00)) + B = [1](-0.00) + Bounds: (0.00, 0.00) + Scales: 1.00 + Initial value: [1](0.00) + + Constraint 1 + Numeric linear function + A = [1,16]((0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.17,0.67,0.17,0.00)) + B = [1](-200.00) + Bounds: (0.00, 0.00) + Scales: 1.00 + Initial value: [1](-3.33) (constraint not satisfied) + + Constraint 2 speed limit (0.00662252) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](0.02) - Constraint 1 + Constraint 3 speed limit (0.013245) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](0.29) - Constraint 2 + Constraint 4 speed limit (0.0198675) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1.45) - Constraint 3 + Constraint 5 speed limit (0.0264901) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](4.59) - Constraint 4 + Constraint 6 speed limit (0.0331126) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](11.22) - Constraint 5 + Constraint 7 speed limit (0.0397351) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](23.26) - Constraint 6 + Constraint 8 speed limit (0.0463576) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](43.09) - Constraint 7 + Constraint 9 speed limit (0.0529801) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](73.52) - Constraint 8 + Constraint 10 speed limit (0.0596026) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](117.76) - Constraint 9 + Constraint 11 speed limit (0.0662252) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](179.49) - Constraint 10 + Constraint 12 speed limit (0.0728477) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](262.78) - Constraint 11 + Constraint 13 speed limit (0.0794702) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](372.18) - Constraint 12 + Constraint 14 speed limit (0.0860927) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](510.52) - Constraint 13 + Constraint 15 speed limit (0.0927152) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](661.56) - Constraint 14 + Constraint 16 speed limit (0.0993377) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](816.75) - Constraint 15 + Constraint 17 speed limit (0.10596) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](971.51) - Constraint 16 + Constraint 18 speed limit (0.112583) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1121.66) - Constraint 17 + Constraint 19 speed limit (0.119205) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1263.48) - Constraint 18 + Constraint 20 speed limit (0.125828) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1393.66) - Constraint 19 + Constraint 21 speed limit (0.13245) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1509.33) - Constraint 20 + Constraint 22 speed limit (0.139073) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1608.05) - Constraint 21 + Constraint 23 speed limit (0.145695) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1687.81) - Constraint 22 + Constraint 24 speed limit (0.152318) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1747.03) - Constraint 23 + Constraint 25 speed limit (0.15894) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1784.56) - Constraint 24 + Constraint 26 speed limit (0.165563) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1799.68) - Constraint 25 + Constraint 27 speed limit (0.172185) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 26 + Constraint 28 speed limit (0.178808) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 27 + Constraint 29 speed limit (0.18543) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 28 + Constraint 30 speed limit (0.192053) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 29 + Constraint 31 speed limit (0.198675) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 30 + Constraint 32 speed limit (0.205298) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 31 + Constraint 33 speed limit (0.211921) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 32 + Constraint 34 speed limit (0.218543) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 33 + Constraint 35 speed limit (0.225166) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 34 + Constraint 36 speed limit (0.231788) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 35 + Constraint 37 speed limit (0.238411) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 36 + Constraint 38 speed limit (0.245033) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 37 + Constraint 39 speed limit (0.251656) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 38 + Constraint 40 speed limit (0.258278) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 39 + Constraint 41 speed limit (0.264901) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 40 + Constraint 42 speed limit (0.271523) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 41 + Constraint 43 speed limit (0.278146) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 42 + Constraint 44 speed limit (0.284768) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 43 + Constraint 45 speed limit (0.291391) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 44 + Constraint 46 speed limit (0.298013) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 45 + Constraint 47 speed limit (0.304636) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 46 + Constraint 48 speed limit (0.311258) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 47 + Constraint 49 speed limit (0.317881) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 48 + Constraint 50 speed limit (0.324503) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 49 + Constraint 51 speed limit (0.331126) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 50 + Constraint 52 speed limit (0.337748) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 51 + Constraint 53 speed limit (0.344371) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 52 + Constraint 54 speed limit (0.350993) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 53 + Constraint 55 speed limit (0.357616) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 54 + Constraint 56 speed limit (0.364238) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 55 + Constraint 57 speed limit (0.370861) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 56 + Constraint 58 speed limit (0.377483) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 57 + Constraint 59 speed limit (0.384106) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 58 + Constraint 60 speed limit (0.390728) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 59 + Constraint 61 speed limit (0.397351) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 60 + Constraint 62 speed limit (0.403974) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 61 + Constraint 63 speed limit (0.410596) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 62 + Constraint 64 speed limit (0.417219) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 63 + Constraint 65 speed limit (0.423841) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 64 + Constraint 66 speed limit (0.430464) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 65 + Constraint 67 speed limit (0.437086) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 66 + Constraint 68 speed limit (0.443709) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 67 + Constraint 69 speed limit (0.450331) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 68 + Constraint 70 speed limit (0.456954) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 69 + Constraint 71 speed limit (0.463576) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 70 + Constraint 72 speed limit (0.470199) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 71 + Constraint 73 speed limit (0.476821) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 72 + Constraint 74 speed limit (0.483444) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 73 + Constraint 75 speed limit (0.490066) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 74 + Constraint 76 speed limit (0.496689) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 75 + Constraint 77 speed limit (0.503311) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 76 + Constraint 78 speed limit (0.509934) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 77 + Constraint 79 speed limit (0.516556) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 78 + Constraint 80 speed limit (0.523179) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 79 + Constraint 81 speed limit (0.529801) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 80 + Constraint 82 speed limit (0.536424) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 81 + Constraint 83 speed limit (0.543046) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 82 + Constraint 84 speed limit (0.549669) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 83 + Constraint 85 speed limit (0.556291) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 84 + Constraint 86 speed limit (0.562914) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 85 + Constraint 87 speed limit (0.569536) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 86 + Constraint 88 speed limit (0.576159) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 87 + Constraint 89 speed limit (0.582781) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 88 + Constraint 90 speed limit (0.589404) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 89 + Constraint 91 speed limit (0.596026) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 90 + Constraint 92 speed limit (0.602649) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 91 + Constraint 93 speed limit (0.609272) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 92 + Constraint 94 speed limit (0.615894) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 93 + Constraint 95 speed limit (0.622517) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 94 + Constraint 96 speed limit (0.629139) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 95 + Constraint 97 speed limit (0.635762) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 96 + Constraint 98 speed limit (0.642384) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 97 + Constraint 99 speed limit (0.649007) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 98 + Constraint 100 speed limit (0.655629) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 99 + Constraint 101 speed limit (0.662252) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 100 + Constraint 102 speed limit (0.668874) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 101 + Constraint 103 speed limit (0.675497) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 102 + Constraint 104 speed limit (0.682119) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 103 + Constraint 105 speed limit (0.688742) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 104 + Constraint 106 speed limit (0.695364) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 105 + Constraint 107 speed limit (0.701987) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 106 + Constraint 108 speed limit (0.708609) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 107 + Constraint 109 speed limit (0.715232) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 108 + Constraint 110 speed limit (0.721854) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 109 + Constraint 111 speed limit (0.728477) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 110 + Constraint 112 speed limit (0.735099) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 111 + Constraint 113 speed limit (0.741722) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 112 + Constraint 114 speed limit (0.748344) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 113 + Constraint 115 speed limit (0.754967) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 114 + Constraint 116 speed limit (0.761589) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 115 + Constraint 117 speed limit (0.768212) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 116 + Constraint 118 speed limit (0.774834) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 117 + Constraint 119 speed limit (0.781457) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 118 + Constraint 120 speed limit (0.788079) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 119 + Constraint 121 speed limit (0.794702) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 120 + Constraint 122 speed limit (0.801325) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 121 + Constraint 123 speed limit (0.807947) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 122 + Constraint 124 speed limit (0.81457) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 123 + Constraint 125 speed limit (0.821192) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 124 + Constraint 126 speed limit (0.827815) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1800.00) - Constraint 125 + Constraint 127 speed limit (0.834437) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1799.68) - Constraint 126 + Constraint 128 speed limit (0.84106) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1784.56) - Constraint 127 + Constraint 129 speed limit (0.847682) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1747.03) - Constraint 128 + Constraint 130 speed limit (0.854305) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1687.81) - Constraint 129 + Constraint 131 speed limit (0.860927) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1608.05) - Constraint 130 + Constraint 132 speed limit (0.86755) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1509.33) - Constraint 131 + Constraint 133 speed limit (0.874172) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1393.66) - Constraint 132 + Constraint 134 speed limit (0.880795) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1263.48) - Constraint 133 + Constraint 135 speed limit (0.887417) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1121.66) - Constraint 134 + Constraint 136 speed limit (0.89404) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](971.51) - Constraint 135 + Constraint 137 speed limit (0.900662) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](816.75) - Constraint 136 + Constraint 138 speed limit (0.907285) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](661.56) - Constraint 137 + Constraint 139 speed limit (0.913907) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](510.52) - Constraint 138 + Constraint 140 speed limit (0.92053) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](372.18) - Constraint 139 + Constraint 141 speed limit (0.927152) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](262.78) - Constraint 140 + Constraint 142 speed limit (0.933775) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](179.49) - Constraint 141 + Constraint 143 speed limit (0.940397) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](117.76) - Constraint 142 + Constraint 144 speed limit (0.94702) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](73.52) - Constraint 143 + Constraint 145 speed limit (0.953642) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](43.09) - Constraint 144 + Constraint 146 speed limit (0.960265) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](23.26) - Constraint 145 + Constraint 147 speed limit (0.966887) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](11.22) - Constraint 146 + Constraint 148 speed limit (0.97351) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](4.59) - Constraint 147 + Constraint 149 speed limit (0.980132) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](1.45) - Constraint 148 + Constraint 150 speed limit (0.986755) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 Initial value: [1](0.29) - Constraint 149 + Constraint 151 speed limit (0.993377) (derivable function) Bounds: (-inf, 3612.50) Scales: 1.00 @@ -921,6 +937,6 @@ Solver: CFSQP specific variables: Nineq: 150 Nineqn: 150 - Neq: 0 + Neq: 2 Neqn: 0 - CFSQP constraints: (0, 0), (1, 0), (2, 0), (3, 0), (4, 0), (5, 0), (6, 0), (7, 0), (8, 0), (9, 0), (10, 0), (11, 0), (12, 0), (13, 0), (14, 0), (15, 0), (16, 0), (17, 0), (18, 0), (19, 0), (20, 0), (21, 0), (22, 0), (23, 0), (24, 0), (25, 0), (26, 0), (27, 0), (28, 0), (29, 0), (30, 0), (31, 0), (32, 0), (33, 0), (34, 0), (35, 0), (36, 0), (37, 0), (38, 0), (39, 0), (40, 0), (41, 0), (42, 0), (43, 0), (44, 0), (45, 0), (46, 0), (47, 0), (48, 0), (49, 0), (50, 0), (51, 0), (52, 0), (53, 0), (54, 0), (55, 0), (56, 0), (57, 0), (58, 0), (59, 0), (60, 0), (61, 0), (62, 0), (63, 0), (64, 0), (65, 0), (66, 0), (67, 0), (68, 0), (69, 0), (70, 0), (71, 0), (72, 0), (73, 0), (74, 0), (75, 0), (76, 0), (77, 0), (78, 0), (79, 0), (80, 0), (81, 0), (82, 0), (83, 0), (84, 0), (85, 0), (86, 0), (87, 0), (88, 0), (89, 0), (90, 0), (91, 0), (92, 0), (93, 0), (94, 0), (95, 0), (96, 0), (97, 0), (98, 0), (99, 0), (100, 0), (101, 0), (102, 0), (103, 0), (104, 0), (105, 0), (106, 0), (107, 0), (108, 0), (109, 0), (110, 0), (111, 0), (112, 0), (113, 0), (114, 0), (115, 0), (116, 0), (117, 0), (118, 0), (119, 0), (120, 0), (121, 0), (122, 0), (123, 0), (124, 0), (125, 0), (126, 0), (127, 0), (128, 0), (129, 0), (130, 0), (131, 0), (132, 0), (133, 0), (134, 0), (135, 0), (136, 0), (137, 0), (138, 0), (139, 0), (140, 0), (141, 0), (142, 0), (143, 0), (144, 0), (145, 0), (146, 0), (147, 0), (148, 0), (149, 0) + CFSQP constraints: (2, 0), (3, 0), (4, 0), (5, 0), (6, 0), (7, 0), (8, 0), (9, 0), (10, 0), (11, 0), (12, 0), (13, 0), (14, 0), (15, 0), (16, 0), (17, 0), (18, 0), (19, 0), (20, 0), (21, 0), (22, 0), (23, 0), (24, 0), (25, 0), (26, 0), (27, 0), (28, 0), (29, 0), (30, 0), (31, 0), (32, 0), (33, 0), (34, 0), (35, 0), (36, 0), (37, 0), (38, 0), (39, 0), (40, 0), (41, 0), (42, 0), (43, 0), (44, 0), (45, 0), (46, 0), (47, 0), (48, 0), (49, 0), (50, 0), (51, 0), (52, 0), (53, 0), (54, 0), (55, 0), (56, 0), (57, 0), (58, 0), (59, 0), (60, 0), (61, 0), (62, 0), (63, 0), (64, 0), (65, 0), (66, 0), (67, 0), (68, 0), (69, 0), (70, 0), (71, 0), (72, 0), (73, 0), (74, 0), (75, 0), (76, 0), (77, 0), (78, 0), (79, 0), (80, 0), (81, 0), (82, 0), (83, 0), (84, 0), (85, 0), (86, 0), (87, 0), (88, 0), (89, 0), (90, 0), (91, 0), (92, 0), (93, 0), (94, 0), (95, 0), (96, 0), (97, 0), (98, 0), (99, 0), (100, 0), (101, 0), (102, 0), (103, 0), (104, 0), (105, 0), (106, 0), (107, 0), (108, 0), (109, 0), (110, 0), (111, 0), (112, 0), (113, 0), (114, 0), (115, 0), (116, 0), (117, 0), (118, 0), (119, 0), (120, 0), (121, 0), (122, 0), (123, 0), (124, 0), (125, 0), (126, 0), (127, 0), (128, 0), (129, 0), (130, 0), (131, 0), (132, 0), (133, 0), (134, 0), (135, 0), (136, 0), (137, 0), (138, 0), (139, 0), (140, 0), (141, 0), (142, 0), (143, 0), (144, 0), (145, 0), (146, 0), (147, 0), (148, 0), (149, 0), (150, 0), (151, 0), (0, 1), (1, 1) ----------------------------------------------------------------------- Summary of changes: ChangeLog | 11 + include/roboptim/trajectory/cubic-b-spline.hh | 5 +- include/roboptim/trajectory/cubic-b-spline.hxx | 98 +++----- tests/spline-optimization.cc | 66 +++--- tests/spline-optimization.stdout | 212 +++++++++------- tests/spline-time-optimization.cc | 11 +- tests/spline-time-optimization.stdout | 322 +++++++++++++----------- 7 files changed, 369 insertions(+), 356 deletions(-) hooks/post-receive -- roboptim-trajectory |
From: Thomas M. <tho...@us...> - 2010-03-03 17:20:40
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-trajectory". The branch, master has been updated via d6efc235e8d07dbbc73dcccb3fef58363df8ec5a (commit) via 5fc244021e8d5402ebc8bf797a2ab5575d51fc3f (commit) from dbfbe2d7b1d5691888268981b2275f3f3ad45851 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit d6efc235e8d07dbbc73dcccb3fef58363df8ec5a Author: Thomas Moulard <tho...@gm...> Date: Wed Mar 3 18:20:23 2010 +0100 Fix SPEC file. * roboptim-trajectory.spec.in: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 6966c24..2296944 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2010-03-03 Thomas Moulard <tho...@gm...> + Fix SPEC file. + * roboptim-trajectory.spec.in: Here. + +2010-03-03 Thomas Moulard <tho...@gm...> + Add constraint to freeze start/end of the cubic spline. * configure.ac: Update requirements. * include/Makefile.am: Distribute new header. diff --git a/roboptim-trajectory.spec.in b/roboptim-trajectory.spec.in index 4e021f8..6fba2de 100644 --- a/roboptim-trajectory.spec.in +++ b/roboptim-trajectory.spec.in @@ -83,7 +83,7 @@ rm -rf $RPM_BUILD_ROOT %files devel %defattr(-,root,root,-) -%{_includedir}/* +%{_includedir}/roboptim/trajectory %{_libdir}/*.so %{_libdir}/pkgconfig/* @@ -95,6 +95,9 @@ rm -rf $RPM_BUILD_ROOT %postun -p /sbin/ldconfig %changelog +* Mon Feb 22 2010 Thomas Moulard <tho...@gm...> - 0.5-2 +- Fix include directory owning issue. + * Wed Feb 17 2010 Thomas Moulard <tho...@gm...> - 0.5-1 - Fix source0. commit 5fc244021e8d5402ebc8bf797a2ab5575d51fc3f Author: Thomas Moulard <tho...@gm...> Date: Wed Mar 3 18:20:10 2010 +0100 Add constraint to freeze start/end of the cubic spline. * configure.ac: Update requirements. * include/Makefile.am: Distribute new header. * include/roboptim/trajectory.hh: New. * include/roboptim/trajectory/cubic-b-spline.hh: Add new method. * include/roboptim/trajectory/cubic-b-spline.hxx: New. * tests/spline-time-optimization.stdout: Regenerate. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 722424b..6966c24 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2010-03-03 Thomas Moulard <tho...@gm...> + + Add constraint to freeze start/end of the cubic spline. + * configure.ac: Update requirements. + * include/Makefile.am: Distribute new header. + * include/roboptim/trajectory.hh: New. + * include/roboptim/trajectory/cubic-b-spline.hh: Add new method. + * include/roboptim/trajectory/cubic-b-spline.hxx: New. + * tests/spline-time-optimization.stdout: Regenerate. + 2010-02-17 Thomas Moulard <tho...@gm...> Update SPEC file. diff --git a/configure.ac b/configure.ac index 5673f77..7974ba3 100644 --- a/configure.ac +++ b/configure.ac @@ -61,7 +61,7 @@ JRL_PROG_DOXYGEN LT_INIT([dlopen]) # Search for RobOptim core. -ROBOPTIM_CORE_PKG_CONFIG([roboptim-core >= 0.5]) +ROBOPTIM_CORE_PKG_CONFIG([roboptim-core >= 0.5.12]) # Search for Roboptim core CFSQP plug-in. AC_CHECK_HEADERS([roboptim/core/plugin/cfsqp.hh], diff --git a/include/Makefile.am b/include/Makefile.am index 02c5762..0659847 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -2,6 +2,9 @@ include $(top_srcdir)/build-aux/init.mk # --- Distribute and install headers. nobase_include_HEADERS = \ + roboptim/trajectory.hh + +nobase_include_HEADERS += \ roboptim/trajectory/anthropomorphic-cost-function.hh \ roboptim/trajectory/anthropomorphic-cost-function.hxx \ roboptim/trajectory/free-time-trajectory.hh \ @@ -16,6 +19,7 @@ nobase_include_HEADERS = \ roboptim/trajectory/limit-speed.hxx \ roboptim/trajectory/orthogonal-speed.hh \ roboptim/trajectory/cubic-b-spline.hh \ + roboptim/trajectory/cubic-b-spline.hxx \ roboptim/trajectory/spline-length.hh \ roboptim/trajectory/stable-point-state-function.hh \ roboptim/trajectory/stable-point-state-function.hxx \ diff --git a/include/roboptim/trajectory.hh b/include/roboptim/trajectory.hh new file mode 100644 index 0000000..a57ded9 --- /dev/null +++ b/include/roboptim/trajectory.hh @@ -0,0 +1,48 @@ +// Copyright (C) 2010 by Thomas Moulard, AIST, CNRS, INRIA. +// +// This file is part of the roboptim. +// +// roboptim is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// roboptim is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with roboptim. If not, see <http://www.gnu.org/licenses/>. + +#ifndef ROBOPTIM_TRAJECTORY_HH +# define ROBOPTIM_TRAJECTORY_HH +# include <roboptim/trajectory/sys.hh> + +// Generic headers. +# include <roboptim/trajectory/fwd.hh> + + +// Main headers. +# include <roboptim/trajectory/cubic-b-spline.hh> +# include <roboptim/trajectory/free-time-trajectory.hh> +# include <roboptim/trajectory/freeze.hh> +# include <roboptim/trajectory/frontal-speed.hh> +# include <roboptim/trajectory/limit-omega.hh> +# include <roboptim/trajectory/limit-speed.hh> +# include <roboptim/trajectory/orthogonal-speed.hh> +# include <roboptim/trajectory/spline-length.hh> +# include <roboptim/trajectory/stable-point-state-function.hh> +# include <roboptim/trajectory/stable-time-point.hh> +# include <roboptim/trajectory/state-function.hh> +# include <roboptim/trajectory/trajectory-cost.hh> +# include <roboptim/trajectory/trajectory-sum-cost.hh> +# include <roboptim/trajectory/trajectory.hh> + + +// Visualization. +# include <roboptim/trajectory/visualization/limit-speed.hh> +# include <roboptim/trajectory/visualization/speed.hh> +# include <roboptim/trajectory/visualization/trajectory.hh> + +#endif //! ROBOPTIM_TRAJECTORY_HH diff --git a/include/roboptim/trajectory/cubic-b-spline.hh b/include/roboptim/trajectory/cubic-b-spline.hh index d0fb488..e02164c 100644 --- a/include/roboptim/trajectory/cubic-b-spline.hh +++ b/include/roboptim/trajectory/cubic-b-spline.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2009 by Thomas Moulard, AIST, CNRS, INRIA. +// Copyright (C) 2009, 2010 by Thomas Moulard, AIST, CNRS, INRIA. // // This file is part of the roboptim. // @@ -96,6 +96,11 @@ namespace roboptim jacobian_t variationDerivWrtParam (StableTimePoint tp, size_type order) const throw (); + template <typename P> + void freezeCurveStart (P& problem); + template <typename P> + void freezeCurveEnd (P& problem); + protected: void impl_compute (result_t&, double) const throw (); void impl_derivative (gradient_t& g, double x, size_type order) diff --git a/include/roboptim/trajectory/cubic-b-spline.hxx b/include/roboptim/trajectory/cubic-b-spline.hxx new file mode 100644 index 0000000..5aadeed --- /dev/null +++ b/include/roboptim/trajectory/cubic-b-spline.hxx @@ -0,0 +1,97 @@ +// Copyright (C) 2010 by Thomas Moulard, AIST, CNRS, INRIA. +// +// This file is part of the roboptim. +// +// roboptim is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// roboptim is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with roboptim. If not, see <http://www.gnu.org/licenses/>. + +#ifndef ROBOPTIM_TRAJECTORY_CUBIC_B_SPLINE_HXX +# define ROBOPTIM_TRAJECTORY_CUBIC_B_SPLINE_HXX + +namespace roboptim +{ + template <typename P> + void + CubicBSpline::frezzeCurveStart (P& problem) + { + using boost::numeric::ublas::zero_matrix; + using boost::numeric::ublas::zero_vector; + + Function::matrix_t A[3]; + Function::vector_t b[3]; + + A[0] = zero_matrix<double>(1, paramSize); + A[1] = zero_matrix<double>(1, paramSize); + A[2] = zero_matrix<double>(1, paramSize); + + b[0] = zero_vector<double>(1); + b[1] = zero_vector<double>(1); + b[2] = zero_vector<double>(1); + A[0](0,1) = A[1](0,2) = A[2](0,3)=1./6.; + A[0](0,4) = A[1](0,5) = A[2](0,6)=2./3.; + A[0](0,7) = A[1](0,8) = A[2](0,9)=1./6.; + b[0](0) = -freeTimeTraj_.parameters ()[1+0]; + b[1](0) = -freeTimeTraj_.parameters ()[1+1]; + b[2](0) = -freeTimeTraj_.parameters ()[1+2]; + NumericLinearFunction* boundaryCond; + boundaryCond = new NumericLinearFunction(A[0], b[0]); + boost::shared_ptr<LinearFunction> boundaryCond0ShPtr(boundaryCond); + boundaryCond = new NumericLinearFunction(A[1], b[1]); + boost::shared_ptr<LinearFunction> boundaryCond1ShPtr(boundaryCond); + boundaryCond = new NumericLinearFunction(A[2], b[2]); + boost::shared_ptr<LinearFunction> boundaryCond2ShPtr(boundaryCond); + + problem.addConstraint(boundaryCond0ShPtr, interval); + problem.addConstraint(boundaryCond1ShPtr, interval); + problem.addConstraint(boundaryCond2ShPtr, interval); + } + + template <typename P> + void + CubicBSpline::frezzeCurveEnd (P& problem) + { + using boost::numeric::ublas::zero_matrix; + using boost::numeric::ublas::zero_vector; + + Function::matrix_t A[3]; + Function::vector_t b[3]; + + A[0] = zero_matrix<double>(1, paramSize); + A[1] = zero_matrix<double>(1, paramSize); + A[2] = zero_matrix<double>(1, paramSize); + b[0] = zero_vector<double>(1); + b[1] = zero_vector<double>(1); + b[2] = zero_vector<double>(1); + + A[0](0,paramSize-9) = A[1](0,paramSize-8) = A[2](0,paramSize-7)=1./6.; + A[0](0,paramSize-6) = A[1](0,paramSize-5) = A[2](0,paramSize-4)=2./3.; + A[0](0,paramSize-3) = A[1](0,paramSize-2) = A[2](0,paramSize-1)=1./6.; + b[0](0) = -freeTimeTraj_.parameters ()[paramSize-3]; + b[1](0) = -freeTimeTraj_.parameters ()[paramSize-2]; + b[2](0) = -freeTimeTraj_.parameters ()[paramSize-1]; + boundaryCond = new NumericLinearFunction(A[0], b[0]); + boost::shared_ptr<LinearFunction> boundaryCond3ShPtr(boundaryCond); + boundaryCond = new NumericLinearFunction(A[1], b[1]); + boost::shared_ptr<LinearFunction> boundaryCond4ShPtr(boundaryCond); + boundaryCond = new NumericLinearFunction(A[2], b[2]); + boost::shared_ptr<LinearFunction> boundaryCond5ShPtr(boundaryCond); + + Function::interval_t interval = Function::makeInterval(0., 0.); + problem.addConstraint(boundaryCond3ShPtr, interval); + problem.addConstraint(boundaryCond4ShPtr, interval); + problem.addConstraint(boundaryCond5ShPtr, interval); + } + +} // end of namespace roboptim. + +#endif //! ROBOPTIM_TRAJECTORY_TRAJECTORY_HXX diff --git a/tests/spline-time-optimization.stdout b/tests/spline-time-optimization.stdout index 96f57cd..0fa2cd1 100644 --- a/tests/spline-time-optimization.stdout +++ b/tests/spline-time-optimization.stdout @@ -1,923 +1,926 @@ -Problem: - Numeric linear function - A = [1,16]((-1.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00)) - B = [1](0.00) - Argument's bounds: (0.00, inf), (0.00, 0.00), (0.00, 0.00), (0.00, 0.00), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (200.00, 200.00), (200.00, 200.00), (200.00, 200.00) - Argument's scales: 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00 - Number of constraints: 150 - Constraint 0 - speed limit (0.00662252) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](0.02) - - Constraint 1 - speed limit (0.013245) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](0.29) - - Constraint 2 - speed limit (0.0198675) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1.45) - - Constraint 3 - speed limit (0.0264901) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](4.59) - - Constraint 4 - speed limit (0.0331126) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](11.22) - - Constraint 5 - speed limit (0.0397351) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](23.26) - - Constraint 6 - speed limit (0.0463576) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](43.09) - - Constraint 7 - speed limit (0.0529801) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](73.52) - - Constraint 8 - speed limit (0.0596026) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](117.76) - - Constraint 9 - speed limit (0.0662252) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](179.49) - - Constraint 10 - speed limit (0.0728477) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](262.78) - - Constraint 11 - speed limit (0.0794702) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](372.18) - - Constraint 12 - speed limit (0.0860927) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](510.52) - - Constraint 13 - speed limit (0.0927152) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](661.56) - - Constraint 14 - speed limit (0.0993377) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](816.75) - - Constraint 15 - speed limit (0.10596) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](971.51) - - Constraint 16 - speed limit (0.112583) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1121.66) - - Constraint 17 - speed limit (0.119205) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1263.48) - - Constraint 18 - speed limit (0.125828) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1393.66) - - Constraint 19 - speed limit (0.13245) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1509.33) - - Constraint 20 - speed limit (0.139073) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1608.05) - - Constraint 21 - speed limit (0.145695) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1687.81) - - Constraint 22 - speed limit (0.152318) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1747.03) - - Constraint 23 - speed limit (0.15894) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1784.56) - - Constraint 24 - speed limit (0.165563) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1799.68) - - Constraint 25 - speed limit (0.172185) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 26 - speed limit (0.178808) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 27 - speed limit (0.18543) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 28 - speed limit (0.192053) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 29 - speed limit (0.198675) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 30 - speed limit (0.205298) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 31 - speed limit (0.211921) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 32 - speed limit (0.218543) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 33 - speed limit (0.225166) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 34 - speed limit (0.231788) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 35 - speed limit (0.238411) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 36 - speed limit (0.245033) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 37 - speed limit (0.251656) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 38 - speed limit (0.258278) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 39 - speed limit (0.264901) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 40 - speed limit (0.271523) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 41 - speed limit (0.278146) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 42 - speed limit (0.284768) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 43 - speed limit (0.291391) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 44 - speed limit (0.298013) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 45 - speed limit (0.304636) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 46 - speed limit (0.311258) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 47 - speed limit (0.317881) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 48 - speed limit (0.324503) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 49 - speed limit (0.331126) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 50 - speed limit (0.337748) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 51 - speed limit (0.344371) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 52 - speed limit (0.350993) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 53 - speed limit (0.357616) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 54 - speed limit (0.364238) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 55 - speed limit (0.370861) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 56 - speed limit (0.377483) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 57 - speed limit (0.384106) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 58 - speed limit (0.390728) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 59 - speed limit (0.397351) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 60 - speed limit (0.403974) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 61 - speed limit (0.410596) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 62 - speed limit (0.417219) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 63 - speed limit (0.423841) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 64 - speed limit (0.430464) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 65 - speed limit (0.437086) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 66 - speed limit (0.443709) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 67 - speed limit (0.450331) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 68 - speed limit (0.456954) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 69 - speed limit (0.463576) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 70 - speed limit (0.470199) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 71 - speed limit (0.476821) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 72 - speed limit (0.483444) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 73 - speed limit (0.490066) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 74 - speed limit (0.496689) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 75 - speed limit (0.503311) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 76 - speed limit (0.509934) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 77 - speed limit (0.516556) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 78 - speed limit (0.523179) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 79 - speed limit (0.529801) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 80 - speed limit (0.536424) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 81 - speed limit (0.543046) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 82 - speed limit (0.549669) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 83 - speed limit (0.556291) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 84 - speed limit (0.562914) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 85 - speed limit (0.569536) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 86 - speed limit (0.576159) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 87 - speed limit (0.582781) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 88 - speed limit (0.589404) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 89 - speed limit (0.596026) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 90 - speed limit (0.602649) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 91 - speed limit (0.609272) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 92 - speed limit (0.615894) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 93 - speed limit (0.622517) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 94 - speed limit (0.629139) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 95 - speed limit (0.635762) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 96 - speed limit (0.642384) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 97 - speed limit (0.649007) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 98 - speed limit (0.655629) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 99 - speed limit (0.662252) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 100 - speed limit (0.668874) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 101 - speed limit (0.675497) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 102 - speed limit (0.682119) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 103 - speed limit (0.688742) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 104 - speed limit (0.695364) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 105 - speed limit (0.701987) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 106 - speed limit (0.708609) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 107 - speed limit (0.715232) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 108 - speed limit (0.721854) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 109 - speed limit (0.728477) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 110 - speed limit (0.735099) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 111 - speed limit (0.741722) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 112 - speed limit (0.748344) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 113 - speed limit (0.754967) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 114 - speed limit (0.761589) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 115 - speed limit (0.768212) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 116 - speed limit (0.774834) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 117 - speed limit (0.781457) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 118 - speed limit (0.788079) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 119 - speed limit (0.794702) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 120 - speed limit (0.801325) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 121 - speed limit (0.807947) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 122 - speed limit (0.81457) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 123 - speed limit (0.821192) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 124 - speed limit (0.827815) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1800.00) - - Constraint 125 - speed limit (0.834437) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1799.68) - - Constraint 126 - speed limit (0.84106) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1784.56) - - Constraint 127 - speed limit (0.847682) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1747.03) - - Constraint 128 - speed limit (0.854305) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1687.81) - - Constraint 129 - speed limit (0.860927) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1608.05) - - Constraint 130 - speed limit (0.86755) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1509.33) - - Constraint 131 - speed limit (0.874172) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1393.66) - - Constraint 132 - speed limit (0.880795) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1263.48) - - Constraint 133 - speed limit (0.887417) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1121.66) - - Constraint 134 - speed limit (0.89404) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](971.51) - - Constraint 135 - speed limit (0.900662) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](816.75) - - Constraint 136 - speed limit (0.907285) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](661.56) - - Constraint 137 - speed limit (0.913907) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](510.52) - - Constraint 138 - speed limit (0.92053) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](372.18) - - Constraint 139 - speed limit (0.927152) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](262.78) - - Constraint 140 - speed limit (0.933775) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](179.49) - - Constraint 141 - speed limit (0.940397) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](117.76) - - Constraint 142 - speed limit (0.94702) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](73.52) - - Constraint 143 - speed limit (0.953642) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](43.09) - - Constraint 144 - speed limit (0.960265) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](23.26) - - Constraint 145 - speed limit (0.966887) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](11.22) - - Constraint 146 - speed limit (0.97351) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](4.59) - - Constraint 147 - speed limit (0.980132) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](1.45) - - Constraint 148 - speed limit (0.986755) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](0.29) - - Constraint 149 - speed limit (0.993377) (derivable function) - Bounds: (-inf, 3612.50) - Scales: 1.00 - Initial value: [1](0.02) - - Starting point: [16](1.00,0.00,0.00,0.00,20.00,40.00,60.00,80.00,100.00,120.00,140.00,160.00,180.00,200.00,200.00,200.00) - Starting value: [1](-1.00) - Infinity value (for all functions): inf +Solver: + Problem: + Numeric linear function + A = [1,16]((-1.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00)) + B = [1](0.00) + Argument's bounds: (0.00, inf), (0.00, 0.00), (0.00, 0.00), (0.00, 0.00), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (200.00, 200.00), (200.00, 200.00), (200.00, 200.00) + Argument's scales: 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00 + Number of constraints: 150 + Constraint 0 + speed limit (0.00662252) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](0.02) + + Constraint 1 + speed limit (0.013245) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](0.29) + + Constraint 2 + speed limit (0.0198675) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1.45) + + Constraint 3 + speed limit (0.0264901) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](4.59) + + Constraint 4 + speed limit (0.0331126) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](11.22) + + Constraint 5 + speed limit (0.0397351) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](23.26) + + Constraint 6 + speed limit (0.0463576) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](43.09) + + Constraint 7 + speed limit (0.0529801) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](73.52) + + Constraint 8 + speed limit (0.0596026) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](117.76) + + Constraint 9 + speed limit (0.0662252) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](179.49) + + Constraint 10 + speed limit (0.0728477) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](262.78) + + Constraint 11 + speed limit (0.0794702) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](372.18) + + Constraint 12 + speed limit (0.0860927) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](510.52) + + Constraint 13 + speed limit (0.0927152) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](661.56) + + Constraint 14 + speed limit (0.0993377) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](816.75) + + Constraint 15 + speed limit (0.10596) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](971.51) + + Constraint 16 + speed limit (0.112583) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1121.66) + + Constraint 17 + speed limit (0.119205) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1263.48) + + Constraint 18 + speed limit (0.125828) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1393.66) + + Constraint 19 + speed limit (0.13245) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1509.33) + + Constraint 20 + speed limit (0.139073) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1608.05) + + Constraint 21 + speed limit (0.145695) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1687.81) + + Constraint 22 + speed limit (0.152318) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1747.03) + + Constraint 23 + speed limit (0.15894) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1784.56) + + Constraint 24 + speed limit (0.165563) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1799.68) + + Constraint 25 + speed limit (0.172185) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 26 + speed limit (0.178808) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 27 + speed limit (0.18543) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 28 + speed limit (0.192053) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 29 + speed limit (0.198675) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 30 + speed limit (0.205298) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 31 + speed limit (0.211921) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 32 + speed limit (0.218543) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 33 + speed limit (0.225166) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 34 + speed limit (0.231788) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 35 + speed limit (0.238411) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 36 + speed limit (0.245033) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 37 + speed limit (0.251656) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 38 + speed limit (0.258278) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 39 + speed limit (0.264901) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 40 + speed limit (0.271523) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 41 + speed limit (0.278146) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 42 + speed limit (0.284768) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 43 + speed limit (0.291391) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 44 + speed limit (0.298013) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 45 + speed limit (0.304636) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 46 + speed limit (0.311258) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 47 + speed limit (0.317881) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 48 + speed limit (0.324503) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 49 + speed limit (0.331126) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 50 + speed limit (0.337748) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 51 + speed limit (0.344371) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 52 + speed limit (0.350993) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 53 + speed limit (0.357616) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 54 + speed limit (0.364238) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 55 + speed limit (0.370861) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 56 + speed limit (0.377483) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 57 + speed limit (0.384106) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 58 + speed limit (0.390728) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 59 + speed limit (0.397351) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 60 + speed limit (0.403974) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 61 + speed limit (0.410596) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 62 + speed limit (0.417219) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 63 + speed limit (0.423841) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 64 + speed limit (0.430464) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 65 + speed limit (0.437086) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 66 + speed limit (0.443709) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 67 + speed limit (0.450331) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 68 + speed limit (0.456954) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 69 + speed limit (0.463576) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 70 + speed limit (0.470199) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 71 + speed limit (0.476821) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 72 + speed limit (0.483444) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 73 + speed limit (0.490066) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 74 + speed limit (0.496689) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 75 + speed limit (0.503311) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 76 + speed limit (0.509934) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 77 + speed limit (0.516556) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 78 + speed limit (0.523179) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 79 + speed limit (0.529801) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 80 + speed limit (0.536424) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 81 + speed limit (0.543046) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 82 + speed limit (0.549669) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 83 + speed limit (0.556291) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 84 + speed limit (0.562914) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 85 + speed limit (0.569536) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 86 + speed limit (0.576159) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 87 + speed limit (0.582781) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 88 + speed limit (0.589404) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 89 + speed limit (0.596026) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 90 + speed limit (0.602649) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 91 + speed limit (0.609272) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 92 + speed limit (0.615894) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 93 + speed limit (0.622517) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 94 + speed limit (0.629139) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 95 + speed limit (0.635762) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 96 + speed limit (0.642384) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 97 + speed limit (0.649007) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 98 + speed limit (0.655629) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 99 + speed limit (0.662252) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 100 + speed limit (0.668874) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 101 + speed limit (0.675497) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 102 + speed limit (0.682119) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 103 + speed limit (0.688742) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 104 + speed limit (0.695364) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 105 + speed limit (0.701987) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 106 + speed limit (0.708609) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 107 + speed limit (0.715232) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 108 + speed limit (0.721854) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 109 + speed limit (0.728477) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 110 + speed limit (0.735099) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 111 + speed limit (0.741722) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 112 + speed limit (0.748344) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 113 + speed limit (0.754967) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 114 + speed limit (0.761589) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 115 + speed limit (0.768212) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 116 + speed limit (0.774834) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 117 + speed limit (0.781457) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 118 + speed limit (0.788079) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 119 + speed limit (0.794702) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 120 + speed limit (0.801325) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 121 + speed limit (0.807947) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 122 + speed limit (0.81457) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 123 + speed limit (0.821192) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 124 + speed limit (0.827815) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1800.00) + + Constraint 125 + speed limit (0.834437) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1799.68) + + Constraint 126 + speed limit (0.84106) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1784.56) + + Constraint 127 + speed limit (0.847682) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1747.03) + + Constraint 128 + speed limit (0.854305) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1687.81) + + Constraint 129 + speed limit (0.860927) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1608.05) + + Constraint 130 + speed limit (0.86755) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1509.33) + + Constraint 131 + speed limit (0.874172) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1393.66) + + Constraint 132 + speed limit (0.880795) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1263.48) + + Constraint 133 + speed limit (0.887417) (derivable function) + Bounds: (-inf, 3612.50) + Scales: 1.00 + Initial value: [1](1121.66) + ... [truncated message content] |
From: Thomas M. <tho...@us...> - 2010-03-03 12:35:20
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-core". The branch, master has been updated via dc6ae48bef8d7a68df404f4eabc24bd82a26a640 (commit) via a84e158a8e722d36c5cfafdeba3fb051611c6933 (commit) from 7943b4f0089d67ad40cb7a8887e0e2e20fccedfd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit dc6ae48bef8d7a68df404f4eabc24bd82a26a640 Author: Thomas Moulard <tho...@gm...> Date: Wed Mar 3 13:34:59 2010 +0100 Add Split filter. * include/Makefile.am: Distribute new headers. * include/roboptim/core/filter/split.hh: New. * include/roboptim/core/filter/split.hxx: New. * tests/Makefile.am: Compile new test case. * tests/split.cc: New. * tests/split.stdout: New. * tests/testsuite.at: Add new test case. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 4ce911b..53104e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ 2010-03-03 Thomas Moulard <tho...@gm...> + Add Split filter. + * include/Makefile.am: Distribute new headers. + * include/roboptim/core/filter/split.hh: New. + * include/roboptim/core/filter/split.hxx: New. + * tests/Makefile.am: Compile new test case. + * tests/split.cc: New. + * tests/split.stdout: New. + * tests/testsuite.at: Add new test case. + +2010-03-03 Thomas Moulard <tho...@gm...> + Clean filter. * include/roboptim/core/derivative-size.hh: New. * include/roboptim/core/filter/cached-function.hh, diff --git a/include/Makefile.am b/include/Makefile.am index de2cb13..e4e3dd2 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -2,14 +2,18 @@ include $(top_srcdir)/build-aux/init.mk # --- Distribute and install headers. nobase_include_HEADERS = \ + roboptim/core.hh + +nobase_include_HEADERS += \ roboptim/core/constant-function.hh \ roboptim/core/debug.hh \ roboptim/core/derivable-function.hh \ roboptim/core/derivable-parametrized-function.hh\ - roboptim/core/function.hh \ - roboptim/core/fwd.hh \ + roboptim/core/derivative-size.hh \ roboptim/core/finite-difference-gradient.hh \ roboptim/core/finite-difference-gradient.hxx \ + roboptim/core/function.hh \ + roboptim/core/fwd.hh \ roboptim/core/generic-solver.hh \ roboptim/core/identity-function.hh \ roboptim/core/indent.hh \ @@ -17,16 +21,16 @@ nobase_include_HEADERS = \ roboptim/core/linear-function.hh \ roboptim/core/n-times-derivable-function.hh \ roboptim/core/n-times-derivable-function.hxx \ - roboptim/core/numeric-quadratic-function.hh \ roboptim/core/numeric-linear-function.hh \ + roboptim/core/numeric-quadratic-function.hh \ roboptim/core/parametrized-function.hh \ roboptim/core/parametrized-function.hxx \ roboptim/core/portability.hh \ roboptim/core/problem.hh \ roboptim/core/problem.hxx \ roboptim/core/quadratic-function.hh \ - roboptim/core/result.hh \ roboptim/core/result-with-warnings.hh \ + roboptim/core/result.hh \ roboptim/core/solver-error.hh \ roboptim/core/solver-factory.hh \ roboptim/core/solver-factory.hxx \ @@ -41,7 +45,9 @@ nobase_include_HEADERS = \ # Function filters. nobase_include_HEADERS += \ roboptim/core/filter/cached-function.hh \ - roboptim/core/filter/cached-function.hxx + roboptim/core/filter/cached-function.hxx \ + roboptim/core/filter/split.hh \ + roboptim/core/filter/split.hxx # Built-in plug-in. diff --git a/include/roboptim/core/filter/split.hh b/include/roboptim/core/filter/split.hh new file mode 100644 index 0000000..27045fb --- /dev/null +++ b/include/roboptim/core/filter/split.hh @@ -0,0 +1,97 @@ +// Copyright (C) 2010 by Thomas Moulard, AIST, CNRS, INRIA. +// +// This file is part of the roboptim. +// +// roboptim is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// roboptim is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with roboptim. If not, see <http://www.gnu.org/licenses/>. + +#ifndef ROBOPTIM_CORE_FILTER_SPLIT_HH +# define ROBOPTIM_CORE_FILTER_SPLIT_HH +# include <roboptim/core/sys.hh> +# include <roboptim/core/debug.hh> + +# include <boost/shared_ptr.hpp> + +# include <roboptim/core/n-times-derivable-function.hh> + +namespace roboptim +{ + /// \addtogroup roboptim_filter + /// @{ + + + template <typename T> + class ROBOPTIM_DLLAPI Split : public T + { + public: + /// \brief Import value type. + typedef typename DerivableFunction::value_type value_type; + /// \brief Import size type. + typedef typename DerivableFunction::size_type size_type; + /// \brief Import vector type. + typedef typename DerivableFunction::vector_t vector_t; + /// \brief Import result type. + typedef typename DerivableFunction::result_t result_t; + /// \brief Import argument type. + typedef typename DerivableFunction::argument_t argument_t; + /// \brief Import gradient type. + typedef typename DerivableFunction::gradient_t gradient_t; + /// \brief Import hessian type. + typedef typename TwiceDerivableFunction::hessian_t hessian_t; + /// \brief Import jacobian type. + typedef typename DerivableFunction::jacobian_t jacobian_t; + /// \brief Import interval type. + typedef typename DerivableFunction::interval_t interval_t; + + explicit Split (boost::shared_ptr<const T> fct, unsigned functionId) throw (); + ~Split () throw (); + + protected: + virtual void impl_compute (result_t& result, const argument_t& argument) + const throw (); + + + virtual void impl_gradient (gradient_t& gradient, + const argument_t& argument, + size_type functionId = 0) + const throw (); + + virtual void impl_hessian (hessian_t& hessian, + const argument_t& argument, + size_type functionId = 0) const throw (); + + virtual void impl_derivative (gradient_t& derivative, + double argument, + size_type order = 1) const throw (); + + private: + boost::shared_ptr<const T> function_; + unsigned functionId_; + }; + + template <typename P, typename C> + void addNonScalarConstraint + (P& problem, + boost::shared_ptr<C> constraint, + std::vector<Function::interval_t> interval, + std::vector<Function::value_type> scale + = std::vector<Function::value_type> ()) + throw (std::runtime_error); + + + /// @} + +} // end of namespace roboptim + +# include <roboptim/core/filter/split.hxx> +#endif //! ROBOPTIM_CORE_FILTER_SPLIT_HH diff --git a/include/roboptim/core/filter/split.hxx b/include/roboptim/core/filter/split.hxx new file mode 100644 index 0000000..b6cb7c0 --- /dev/null +++ b/include/roboptim/core/filter/split.hxx @@ -0,0 +1,183 @@ +// Copyright (C) 2010 by Thomas Moulard, AIST, CNRS, INRIA. +// +// This file is part of the roboptim. +// +// roboptim is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// roboptim is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with roboptim. If not, see <http://www.gnu.org/licenses/>. + +#ifndef ROBOPTIM_CORE_FILTER_SPLIT_HXX +# define ROBOPTIM_CORE_FILTER_SPLIT_HXX +# include <boost/format.hpp> + +# include <roboptim/core/derivative-size.hh> + +namespace roboptim +{ + namespace + { + template <typename T> + std::string splitName (const T& fct); + + template <typename T> + std::string splitName (const T& fct, unsigned functionId) + { + boost::format fmt ("%1% (split, function Id = %2%)"); + fmt % fct.getName () % functionId; + return fmt.str (); + } + } // end of anonymous namespace. + + template <typename T> + Split<T>::Split (boost::shared_ptr<const T> fct, unsigned functionId) throw () + : T (fct->inputSize (), 1, splitName (*fct, functionId)), + function_ (fct), + functionId_ (functionId) + { + assert (functionId < fct->outputSize ()); + } + + template <typename T> + Split<T>::~Split () throw () + { + } + + template <typename T> + void + Split<T>::impl_compute (result_t& result, + const argument_t& argument) + const throw () + { + result_t res (function_->outputSize ()); + (*function_) (res, argument); + result[0] = res[functionId_]; + } + + + template <> + void + Split<Function>::impl_gradient (gradient_t&, const argument_t&, size_type) + const throw () + { + assert (0); + } + + template <typename T> + void + Split<T>::impl_gradient (gradient_t& gradient, + const argument_t& argument, + size_type functionId) + const throw () + { + assert (functionId == 0); + function_->gradient (gradient, argument, functionId_); + } + + + + + template <> + void + Split<Function>::impl_hessian + (hessian_t&, const argument_t&, size_type) const throw () + { + assert (0); + } + + template <> + void + Split<DerivableFunction>::impl_hessian + (hessian_t&, const argument_t&, size_type) const throw () + { + assert (0); + } + + + + template <typename T> + void + Split<T>::impl_hessian (hessian_t& hessian, + const argument_t& argument, + size_type functionId) + const throw () + { + assert (functionId == 0); + function_->hessian (hessian, argument, functionId_); + } + + + template <> + void + Split<Function>::impl_derivative + (gradient_t&, double, size_type) const throw () + { + assert (0); + } + + template <> + void + Split<DerivableFunction>::impl_derivative + (gradient_t&, double, size_type) const throw () + { + assert (0); + } + + template <> + void + Split<TwiceDerivableFunction>::impl_derivative + (gradient_t&, double, size_type) const throw () + { + assert (0); + } + + template <typename T> + void + Split<T>::impl_derivative (gradient_t& derivative, + double argument, + size_type order) + const throw () + { + function_->derivative (derivative, argument, order); + } + + template <typename P, typename C> + void addNonScalarConstraint + (P& problem, + boost::shared_ptr<C> constraint, + std::vector<Function::interval_t> interval, + std::vector<Function::value_type> scale) + throw (std::runtime_error) + { + assert (constraint); + assert (interval.size () == constraint->outputSize ()); + assert (scale.empty () || scale.size () == constraint->outputSize ()); + + if (constraint->outputSize () == 1) + { + if (scale.empty ()) + problem.addConstraint (constraint, interval[0]); + else + problem.addConstraint (constraint, interval[0], scale[0]); + return; + } + for (unsigned i = 0; i < constraint->outputSize (); ++i) + { + boost::shared_ptr<Split<C> > split = new Split<C> (constraint, i); + if (scale.empty ()) + problem.addConstraint (split, interval[i]); + else + problem.addConstraint (split, interval[i], scale[i]); + } + } +} // end of namespace roboptim + +#endif //! ROBOPTIM_CORE_FILTER_SPLIT_HXX diff --git a/tests/Makefile.am b/tests/Makefile.am index 96a6157..f84cef2 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -97,11 +97,6 @@ derivable_parametrized_function_SOURCES = derivable-parametrized-function.cc \ $(COMMON_SOURCES) derivable_parametrized_function_LDADD = $(top_builddir)/src/libroboptim-core.la -# cached-function -check_PROGRAMS += cached-function -cached_function_SOURCES = cached-function.cc $(COMMON_SOURCES) -cached_function_LDADD = $(top_builddir)/src/libroboptim-core.la - # plugin check_PROGRAMS += plugin plugin_SOURCES = plugin.cc $(COMMON_SOURCES) @@ -123,6 +118,20 @@ check_PROGRAMS += constant-function constant_function_SOURCES = constant-function.cc $(COMMON_SOURCES) constant_function_LDADD = $(top_builddir)/src/libroboptim-core.la + + +# cached-function +check_PROGRAMS += cached-function +cached_function_SOURCES = cached-function.cc $(COMMON_SOURCES) +cached_function_LDADD = $(top_builddir)/src/libroboptim-core.la + +# split +check_PROGRAMS += split +split_SOURCES = split.cc $(COMMON_SOURCES) +split_LDADD = $(top_builddir)/src/libroboptim-core.la + + + # visualization-gnuplot-simple check_PROGRAMS += visualization-gnuplot-simple visualization_gnuplot_simple_SOURCES = visualization-gnuplot-simple.cc \ @@ -176,6 +185,7 @@ EXTRA_DIST += \ problem-cc.stdout \ result.stdout \ simple.stdout \ + split.stdout \ twice-derivable-function.stdout \ util.stdout \ visualization-gnuplot-function.stdout \ diff --git a/tests/split.cc b/tests/split.cc new file mode 100644 index 0000000..c34509b --- /dev/null +++ b/tests/split.cc @@ -0,0 +1,75 @@ +// Copyright (C) 2010 by Thomas Moulard, AIST, CNRS, INRIA. +// +// This file is part of the roboptim. +// +// roboptim is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// roboptim is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with roboptim. If not, see <http://www.gnu.org/licenses/>. + +#include "common.hh" + +#include <iostream> + +#include <roboptim/core/io.hh> +#include <roboptim/core/derivable-function.hh> +#include <roboptim/core/util.hh> +#include <roboptim/core/filter/split.hh> + +using namespace roboptim; + +struct F : public DerivableFunction +{ + F () : DerivableFunction (1, 10, "f_n (x) = n * x") + {} + + void impl_compute (result_t& res, const argument_t& argument) const throw () + { + res.clear (); + for (size_type i = 0; i < outputSize (); ++i) + res[i] = i * argument[0]; + } + + void impl_gradient (gradient_t& grad, const argument_t& argument, + size_type functionId) const throw () + { + grad.clear (); + grad[0] = functionId; + } +}; + +int run_test () +{ + boost::shared_ptr<F> f (new F ()); + + for (unsigned id = 0; id < 10; ++id) + { + Split<DerivableFunction> splitF (f, id); + + std::cout << splitF << ":" << std::endl + << std::endl; + + Function::vector_t x (1); + for (double i = 0.; i < 10.; i += 0.5) + { + x[0] = i; + std::cout << splitF (x) << std::endl; + std::cout << splitF (x) << std::endl; + //assert ((*f) (x)[0] == splitF (x)[id]); + + std::cout << splitF.gradient (x) << std::endl; + std::cout << splitF.gradient (x) << std::endl; + } + } + return 0; +} + +GENERATE_TEST () diff --git a/tests/split.stdout b/tests/split.stdout new file mode 100644 index 0000000..f0227c7 --- /dev/null +++ b/tests/split.stdout @@ -0,0 +1,820 @@ +f_n (x) = n * x (split, function Id = 0) (derivable function): + +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +[1](0) +f_n (x) = n * x (split, function Id = 1) (derivable function): + +[1](0) +[1](0) +[1](1) +[1](1) +[1](0.5) +[1](0.5) +[1](1) +[1](1) +[1](1) +[1](1) +[1](1) +[1](1) +[1](1.5) +[1](1.5) +[1](1) +[1](1) +[1](2) +[1](2) +[1](1) +[1](1) +[1](2.5) +[1](2.5) +[1](1) +[1](1) +[1](3) +[1](3) +[1](1) +[1](1) +[1](3.5) +[1](3.5) +[1](1) +[1](1) +[1](4) +[1](4) +[1](1) +[1](1) +[1](4.5) +[1](4.5) +[1](1) +[1](1) +[1](5) +[1](5) +[1](1) +[1](1) +[1](5.5) +[1](5.5) +[1](1) +[1](1) +[1](6) +[1](6) +[1](1) +[1](1) +[1](6.5) +[1](6.5) +[1](1) +[1](1) +[1](7) +[1](7) +[1](1) +[1](1) +[1](7.5) +[1](7.5) +[1](1) +[1](1) +[1](8) +[1](8) +[1](1) +[1](1) +[1](8.5) +[1](8.5) +[1](1) +[1](1) +[1](9) +[1](9) +[1](1) +[1](1) +[1](9.5) +[1](9.5) +[1](1) +[1](1) +f_n (x) = n * x (split, function Id = 2) (derivable function): + +[1](0) +[1](0) +[1](2) +[1](2) +[1](1) +[1](1) +[1](2) +[1](2) +[1](2) +[1](2) +[1](2) +[1](2) +[1](3) +[1](3) +[1](2) +[1](2) +[1](4) +[1](4) +[1](2) +[1](2) +[1](5) +[1](5) +[1](2) +[1](2) +[1](6) +[1](6) +[1](2) +[1](2) +[1](7) +[1](7) +[1](2) +[1](2) +[1](8) +[1](8) +[1](2) +[1](2) +[1](9) +[1](9) +[1](2) +[1](2) +[1](10) +[1](10) +[1](2) +[1](2) +[1](11) +[1](11) +[1](2) +[1](2) +[1](12) +[1](12) +[1](2) +[1](2) +[1](13) +[1](13) +[1](2) +[1](2) +[1](14) +[1](14) +[1](2) +[1](2) +[1](15) +[1](15) +[1](2) +[1](2) +[1](16) +[1](16) +[1](2) +[1](2) +[1](17) +[1](17) +[1](2) +[1](2) +[1](18) +[1](18) +[1](2) +[1](2) +[1](19) +[1](19) +[1](2) +[1](2) +f_n (x) = n * x (split, function Id = 3) (derivable function): + +[1](0) +[1](0) +[1](3) +[1](3) +[1](1.5) +[1](1.5) +[1](3) +[1](3) +[1](3) +[1](3) +[1](3) +[1](3) +[1](4.5) +[1](4.5) +[1](3) +[1](3) +[1](6) +[1](6) +[1](3) +[1](3) +[1](7.5) +[1](7.5) +[1](3) +[1](3) +[1](9) +[1](9) +[1](3) +[1](3) +[1](10.5) +[1](10.5) +[1](3) +[1](3) +[1](12) +[1](12) +[1](3) +[1](3) +[1](13.5) +[1](13.5) +[1](3) +[1](3) +[1](15) +[1](15) +[1](3) +[1](3) +[1](16.5) +[1](16.5) +[1](3) +[1](3) +[1](18) +[1](18) +[1](3) +[1](3) +[1](19.5) +[1](19.5) +[1](3) +[1](3) +[1](21) +[1](21) +[1](3) +[1](3) +[1](22.5) +[1](22.5) +[1](3) +[1](3) +[1](24) +[1](24) +[1](3) +[1](3) +[1](25.5) +[1](25.5) +[1](3) +[1](3) +[1](27) +[1](27) +[1](3) +[1](3) +[1](28.5) +[1](28.5) +[1](3) +[1](3) +f_n (x) = n * x (split, function Id = 4) (derivable function): + +[1](0) +[1](0) +[1](4) +[1](4) +[1](2) +[1](2) +[1](4) +[1](4) +[1](4) +[1](4) +[1](4) +[1](4) +[1](6) +[1](6) +[1](4) +[1](4) +[1](8) +[1](8) +[1](4) +[1](4) +[1](10) +[1](10) +[1](4) +[1](4) +[1](12) +[1](12) +[1](4) +[1](4) +[1](14) +[1](14) +[1](4) +[1](4) +[1](16) +[1](16) +[1](4) +[1](4) +[1](18) +[1](18) +[1](4) +[1](4) +[1](20) +[1](20) +[1](4) +[1](4) +[1](22) +[1](22) +[1](4) +[1](4) +[1](24) +[1](24) +[1](4) +[1](4) +[1](26) +[1](26) +[1](4) +[1](4) +[1](28) +[1](28) +[1](4) +[1](4) +[1](30) +[1](30) +[1](4) +[1](4) +[1](32) +[1](32) +[1](4) +[1](4) +[1](34) +[1](34) +[1](4) +[1](4) +[1](36) +[1](36) +[1](4) +[1](4) +[1](38) +[1](38) +[1](4) +[1](4) +f_n (x) = n * x (split, function Id = 5) (derivable function): + +[1](0) +[1](0) +[1](5) +[1](5) +[1](2.5) +[1](2.5) +[1](5) +[1](5) +[1](5) +[1](5) +[1](5) +[1](5) +[1](7.5) +[1](7.5) +[1](5) +[1](5) +[1](10) +[1](10) +[1](5) +[1](5) +[1](12.5) +[1](12.5) +[1](5) +[1](5) +[1](15) +[1](15) +[1](5) +[1](5) +[1](17.5) +[1](17.5) +[1](5) +[1](5) +[1](20) +[1](20) +[1](5) +[1](5) +[1](22.5) +[1](22.5) +[1](5) +[1](5) +[1](25) +[1](25) +[1](5) +[1](5) +[1](27.5) +[1](27.5) +[1](5) +[1](5) +[1](30) +[1](30) +[1](5) +[1](5) +[1](32.5) +[1](32.5) +[1](5) +[1](5) +[1](35) +[1](35) +[1](5) +[1](5) +[1](37.5) +[1](37.5) +[1](5) +[1](5) +[1](40) +[1](40) +[1](5) +[1](5) +[1](42.5) +[1](42.5) +[1](5) +[1](5) +[1](45) +[1](45) +[1](5) +[1](5) +[1](47.5) +[1](47.5) +[1](5) +[1](5) +f_n (x) = n * x (split, function Id = 6) (derivable function): + +[1](0) +[1](0) +[1](6) +[1](6) +[1](3) +[1](3) +[1](6) +[1](6) +[1](6) +[1](6) +[1](6) +[1](6) +[1](9) +[1](9) +[1](6) +[1](6) +[1](12) +[1](12) +[1](6) +[1](6) +[1](15) +[1](15) +[1](6) +[1](6) +[1](18) +[1](18) +[1](6) +[1](6) +[1](21) +[1](21) +[1](6) +[1](6) +[1](24) +[1](24) +[1](6) +[1](6) +[1](27) +[1](27) +[1](6) +[1](6) +[1](30) +[1](30) +[1](6) +[1](6) +[1](33) +[1](33) +[1](6) +[1](6) +[1](36) +[1](36) +[1](6) +[1](6) +[1](39) +[1](39) +[1](6) +[1](6) +[1](42) +[1](42) +[1](6) +[1](6) +[1](45) +[1](45) +[1](6) +[1](6) +[1](48) +[1](48) +[1](6) +[1](6) +[1](51) +[1](51) +[1](6) +[1](6) +[1](54) +[1](54) +[1](6) +[1](6) +[1](57) +[1](57) +[1](6) +[1](6) +f_n (x) = n * x (split, function Id = 7) (derivable function): + +[1](0) +[1](0) +[1](7) +[1](7) +[1](3.5) +[1](3.5) +[1](7) +[1](7) +[1](7) +[1](7) +[1](7) +[1](7) +[1](10.5) +[1](10.5) +[1](7) +[1](7) +[1](14) +[1](14) +[1](7) +[1](7) +[1](17.5) +[1](17.5) +[1](7) +[1](7) +[1](21) +[1](21) +[1](7) +[1](7) +[1](24.5) +[1](24.5) +[1](7) +[1](7) +[1](28) +[1](28) +[1](7) +[1](7) +[1](31.5) +[1](31.5) +[1](7) +[1](7) +[1](35) +[1](35) +[1](7) +[1](7) +[1](38.5) +[1](38.5) +[1](7) +[1](7) +[1](42) +[1](42) +[1](7) +[1](7) +[1](45.5) +[1](45.5) +[1](7) +[1](7) +[1](49) +[1](49) +[1](7) +[1](7) +[1](52.5) +[1](52.5) +[1](7) +[1](7) +[1](56) +[1](56) +[1](7) +[1](7) +[1](59.5) +[1](59.5) +[1](7) +[1](7) +[1](63) +[1](63) +[1](7) +[1](7) +[1](66.5) +[1](66.5) +[1](7) +[1](7) +f_n (x) = n * x (split, function Id = 8) (derivable function): + +[1](0) +[1](0) +[1](8) +[1](8) +[1](4) +[1](4) +[1](8) +[1](8) +[1](8) +[1](8) +[1](8) +[1](8) +[1](12) +[1](12) +[1](8) +[1](8) +[1](16) +[1](16) +[1](8) +[1](8) +[1](20) +[1](20) +[1](8) +[1](8) +[1](24) +[1](24) +[1](8) +[1](8) +[1](28) +[1](28) +[1](8) +[1](8) +[1](32) +[1](32) +[1](8) +[1](8) +[1](36) +[1](36) +[1](8) +[1](8) +[1](40) +[1](40) +[1](8) +[1](8) +[1](44) +[1](44) +[1](8) +[1](8) +[1](48) +[1](48) +[1](8) +[1](8) +[1](52) +[1](52) +[1](8) +[1](8) +[1](56) +[1](56) +[1](8) +[1](8) +[1](60) +[1](60) +[1](8) +[1](8) +[1](64) +[1](64) +[1](8) +[1](8) +[1](68) +[1](68) +[1](8) +[1](8) +[1](72) +[1](72) +[1](8) +[1](8) +[1](76) +[1](76) +[1](8) +[1](8) +f_n (x) = n * x (split, function Id = 9) (derivable function): + +[1](0) +[1](0) +[1](9) +[1](9) +[1](4.5) +[1](4.5) +[1](9) +[1](9) +[1](9) +[1](9) +[1](9) +[1](9) +[1](13.5) +[1](13.5) +[1](9) +[1](9) +[1](18) +[1](18) +[1](9) +[1](9) +[1](22.5) +[1](22.5) +[1](9) +[1](9) +[1](27) +[1](27) +[1](9) +[1](9) +[1](31.5) +[1](31.5) +[1](9) +[1](9) +[1](36) +[1](36) +[1](9) +[1](9) +[1](40.5) +[1](40.5) +[1](9) +[1](9) +[1](45) +[1](45) +[1](9) +[1](9) +[1](49.5) +[1](49.5) +[1](9) +[1](9) +[1](54) +[1](54) +[1](9) +[1](9) +[1](58.5) +[1](58.5) +[1](9) +[1](9) +[1](63) +[1](63) +[1](9) +[1](9) +[1](67.5) +[1](67.5) +[1](9) +[1](9) +[1](72) +[1](72) +[1](9) +[1](9) +[1](76.5) +[1](76.5) +[1](9) +[1](9) +[1](81) +[1](81) +[1](9) +[1](9) +[1](85.5) +[1](85.5) +[1](9) +[1](9) diff --git a/tests/testsuite.at b/tests/testsuite.at index 7acb59c..7421cc2 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -47,7 +47,6 @@ CHECK_STDOUT([constant-function], [Check constant function class.]) CHECK_STDOUT([parametrized-function], [Check parametrized function class.]) CHECK_STDOUT([derivable-parametrized-function], [Check derivable parametrized function class.]) -CHECK_STDOUT([cached-function], [Check cached-function class.]) AT_BANNER([Problems]) CHECK_STDOUT([problem-cc], [Check problem copy constructor.]) @@ -59,6 +58,10 @@ CHECK_STDOUT([simple], [Check basic features.]) AT_BANNER([Plug-in mechanism]) CHECK_STDOUT([plugin], [Load dummy plug-in dynamically.]) +AT_BANNER([Filter]) +CHECK_STDOUT([cached-function], [Cache function]) +CHECK_STDOUT([split], [Split function]) + AT_BANNER([Visualization (Gnuplot)]) CHECK_STDOUT([visualization-gnuplot-simple], [Check Gnuplot visualization.]) CHECK_STDOUT([visualization-gnuplot-simple], [Check Gnuplot functions visualization.]) commit a84e158a8e722d36c5cfafdeba3fb051611c6933 Author: Thomas Moulard <tho...@gm...> Date: Wed Mar 3 13:34:17 2010 +0100 Clean filter. * include/roboptim/core/derivative-size.hh: New. * include/roboptim/core/filter/cached-function.hh, * include/roboptim/core/filter/cached-function.hxx: Uniformize header guards. * include/roboptim/core/fwd.hh: Pre-declare derivativeSize. * src/doc.hh: Define new group. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 8190bbc..4ce911b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2010-03-03 Thomas Moulard <tho...@gm...> + Clean filter. + * include/roboptim/core/derivative-size.hh: New. + * include/roboptim/core/filter/cached-function.hh, + * include/roboptim/core/filter/cached-function.hxx: + Uniformize header guards. + * include/roboptim/core/fwd.hh: Pre-declare derivativeSize. + * src/doc.hh: Define new group. + +2010-03-03 Thomas Moulard <tho...@gm...> + Add root-level header to easy library use. * include/roboptim/core.hh: New. diff --git a/include/roboptim/core/derivative-size.hh b/include/roboptim/core/derivative-size.hh new file mode 100644 index 0000000..7cca07e --- /dev/null +++ b/include/roboptim/core/derivative-size.hh @@ -0,0 +1,49 @@ +// Copyright (C) 2010 by Thomas Moulard, AIST, CNRS, INRIA. +// +// This file is part of the roboptim. +// +// roboptim is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// roboptim is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with roboptim. If not, see <http://www.gnu.org/licenses/>. + +#ifndef ROBOPTIM_CORE_DERIVATIVE_SIZE_HH +# define ROBOPTIM_CORE_DERIVATIVE_SIZE_HH +# include <roboptim/core/fwd.hh> + +namespace roboptim +{ + template <> + struct derivativeSize<Function> + { + static const unsigned int value = 0; + }; + + template <> + struct derivativeSize<DerivableFunction> + { + static const unsigned int value = 1; + }; + + template <> + struct derivativeSize<TwiceDerivableFunction> + { + static const unsigned int value = 2; + }; + + template <unsigned N> + struct derivativeSize<NTimesDerivableFunction<N> > + { + static const unsigned int value = N; + }; +} // end of namespace roboptim + +#endif //! ROBOPTIM_CORE_DERIVATIVE_SIZE_HH diff --git a/include/roboptim/core/filter/cached-function.hh b/include/roboptim/core/filter/cached-function.hh index 8d50d55..86fe547 100644 --- a/include/roboptim/core/filter/cached-function.hh +++ b/include/roboptim/core/filter/cached-function.hh @@ -15,8 +15,8 @@ // You should have received a copy of the GNU Lesser General Public License // along with roboptim. If not, see <http://www.gnu.org/licenses/>. -#ifndef ROBOPTIM_CORE_CACHED_FUNCTION_HH -# define ROBOPTIM_CORE_CACHED_FUNCTION_HH +#ifndef ROBOPTIM_CORE_FILTER_CACHED_FUNCTION_HH +# define ROBOPTIM_CORE_FILTER_CACHED_FUNCTION_HH # include <roboptim/core/sys.hh> # include <roboptim/core/debug.hh> @@ -28,7 +28,7 @@ namespace roboptim { - /// \addtogroup roboptim_meta_function + /// \addtogroup roboptim_filter /// @{ struct ltvector @@ -111,4 +111,4 @@ namespace roboptim } // end of namespace roboptim # include <roboptim/core/filter/cached-function.hxx> -#endif //! ROBOPTIM_CORE_CACHED_FUNCTION_HH +#endif //! ROBOPTIM_CORE_FILTER_CACHED_FUNCTION_HH diff --git a/include/roboptim/core/filter/cached-function.hxx b/include/roboptim/core/filter/cached-function.hxx index 80d117e..9acb9fc 100644 --- a/include/roboptim/core/filter/cached-function.hxx +++ b/include/roboptim/core/filter/cached-function.hxx @@ -15,10 +15,12 @@ // You should have received a copy of the GNU Lesser General Public License // along with roboptim. If not, see <http://www.gnu.org/licenses/>. -#ifndef ROBOPTIM_CORE_CACHED_FUNCTION_HXX -# define ROBOPTIM_CORE_CACHED_FUNCTION_HXX +#ifndef ROBOPTIM_CORE_FILTER_CACHED_FUNCTION_HXX +# define ROBOPTIM_CORE_FILTER_CACHED_FUNCTION_HXX # include <boost/format.hpp> +# include <roboptim/core/derivative-size.hh> + namespace roboptim { namespace @@ -34,33 +36,6 @@ namespace roboptim return fmt.str (); } - template <typename T> - struct derivativeSize; - - template <> - struct derivativeSize<Function> - { - static const unsigned int value = 0; - }; - - template <> - struct derivativeSize<DerivableFunction> - { - static const unsigned int value = 1; - }; - - template <> - struct derivativeSize<TwiceDerivableFunction> - { - static const unsigned int value = 2; - }; - - template <unsigned N> - struct derivativeSize<NTimesDerivableFunction<N> > - { - static const unsigned int value = 3; - }; - } // end of anonymous namespace. template <typename T> @@ -218,4 +193,4 @@ namespace roboptim } // end of namespace roboptim -#endif //! ROBOPTIM_CORE_CACHED_FUNCTION_HXX +#endif //! ROBOPTIM_CORE_FILTER_CACHED_FUNCTION_HXX diff --git a/include/roboptim/core/fwd.hh b/include/roboptim/core/fwd.hh index 11f3d2d..1012b5d 100644 --- a/include/roboptim/core/fwd.hh +++ b/include/roboptim/core/fwd.hh @@ -60,6 +60,9 @@ namespace roboptim template <typename T> class SolverFactory; template <unsigned DerivabilityOrder> class NTimesDerivableFunction; + template <typename T> + struct derivativeSize; + } // end of namespace roboptim. #endif //! ROBOPTIM_CORE_FWD_HH diff --git a/src/doc.hh b/src/doc.hh index dac74e5..add5243 100644 --- a/src/doc.hh +++ b/src/doc.hh @@ -771,6 +771,7 @@ int run_test () /// \defgroup roboptim_meta_function Mathematical abstract functions /// \defgroup roboptim_function Mathematical functions +/// \defgroup roboptim_filter Function filters /// \defgroup roboptim_problem Optimization problems /// \defgroup roboptim_solver Optimization solvers /// \defgroup roboptim_visualization Visualization ----------------------------------------------------------------------- Summary of changes: ChangeLog | 21 + include/Makefile.am | 16 +- .../roboptim/core/derivative-size.hh | 35 +- include/roboptim/core/filter/cached-function.hh | 8 +- include/roboptim/core/filter/cached-function.hxx | 35 +- .../core/filter/{cached-function.hh => split.hh} | 55 +- include/roboptim/core/filter/split.hxx | 183 +++++ include/roboptim/core/fwd.hh | 3 + src/doc.hh | 1 + tests/Makefile.am | 20 +- tests/{cached-function.cc => split.cc} | 46 +- tests/split.stdout | 820 ++++++++++++++++++++ tests/testsuite.at | 5 +- 13 files changed, 1138 insertions(+), 110 deletions(-) copy src/solver.cc => include/roboptim/core/derivative-size.hh (57%) copy include/roboptim/core/filter/{cached-function.hh => split.hh} (69%) create mode 100644 include/roboptim/core/filter/split.hxx copy tests/{cached-function.cc => split.cc} (60%) create mode 100644 tests/split.stdout hooks/post-receive -- roboptim-core |
From: Thomas M. <tho...@us...> - 2010-03-03 10:27:33
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-core". The branch, master has been updated via 7943b4f0089d67ad40cb7a8887e0e2e20fccedfd (commit) from 6130f6bad150054f656ee2099771d78bee8b2132 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 7943b4f0089d67ad40cb7a8887e0e2e20fccedfd Author: Thomas Moulard <tho...@gm...> Date: Wed Mar 3 11:27:09 2010 +0100 Add root-level header to easy library use. * include/roboptim/core.hh: New. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 47bf03d..8190bbc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2010-03-03 Thomas Moulard <tho...@gm...> + Add root-level header to easy library use. + * include/roboptim/core.hh: New. + +2010-03-03 Thomas Moulard <tho...@gm...> + Distribute filters in a separate sub-directory. * include/Makefile.am: Fix path. * include/roboptim/core/filter/cached-function.hh: diff --git a/include/roboptim/core.hh b/include/roboptim/core.hh new file mode 100644 index 0000000..109edb4 --- /dev/null +++ b/include/roboptim/core.hh @@ -0,0 +1,65 @@ +// Copyright (C) 2010 by Thomas Moulard, AIST, CNRS, INRIA. +// +// This file is part of the roboptim. +// +// roboptim is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// roboptim is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with roboptim. If not, see <http://www.gnu.org/licenses/>. + +#ifndef ROBOPTIM_CORE_HH +# define ROBOPTIM_CORE_HH +# include <roboptim/core/sys.hh> +# include <roboptim/core/debug.hh> + +// Generic headers. +# include <roboptim/core/fwd.hh> +# include <roboptim/core/io.hh> +# include <roboptim/core/visualization/fwd.hh> + + +// Main headers. +# include <roboptim/core/result-with-warnings.hh> +# include <roboptim/core/constant-function.hh> +# include <roboptim/core/derivable-function.hh> +# include <roboptim/core/derivable-parametrized-function.hh> +# include <roboptim/core/finite-difference-gradient.hh> +# include <roboptim/core/function.hh> +# include <roboptim/core/generic-solver.hh> +# include <roboptim/core/identity-function.hh> +# include <roboptim/core/indent.hh> +# include <roboptim/core/linear-function.hh> +# include <roboptim/core/n-times-derivable-function.hh> +# include <roboptim/core/numeric-linear-function.hh> +# include <roboptim/core/numeric-quadratic-function.hh> +# include <roboptim/core/parametrized-function.hh> +# include <roboptim/core/problem.hh> +# include <roboptim/core/quadratic-function.hh> +# include <roboptim/core/result.hh> +# include <roboptim/core/solver-error.hh> +# include <roboptim/core/solver-factory.hh> +# include <roboptim/core/solver-warning.hh> +# include <roboptim/core/solver.hh> +# include <roboptim/core/twice-derivable-function.hh> +# include <roboptim/core/util.hh> + + +// Filters. +# include <roboptim/core/filter/cached-function.hh> + + +// Visualization. +# include <roboptim/core/visualization/gnuplot.hh> +# include <roboptim/core/visualization/gnuplot-commands.hh> +# include <roboptim/core/visualization/gnuplot-function.hh> + + +#endif //! ROBOPTIM_CORE_HH ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 +++ include/roboptim/core.hh | 65 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 0 deletions(-) create mode 100644 include/roboptim/core.hh hooks/post-receive -- roboptim-core |
From: Thomas M. <tho...@us...> - 2010-03-03 10:07:10
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-core". The branch, master has been updated via 6130f6bad150054f656ee2099771d78bee8b2132 (commit) from 11f0b418862fd26d07643b1eaa35ab4e1d34af48 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6130f6bad150054f656ee2099771d78bee8b2132 Author: Thomas Moulard <tho...@gm...> Date: Wed Mar 3 11:06:42 2010 +0100 Distribute filters in a separate sub-directory. * include/Makefile.am: Fix path. * include/roboptim/core/filter/cached-function.hh: Rename from include/roboptim/core/cached-function.hh. * include/roboptim/core/filter/cached-function.hxx: Rename from include/roboptim/core/cached-function.hxx. * tests/cached-function.cc: Fix include. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index f9b9ded..47bf03d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2010-03-03 Thomas Moulard <tho...@gm...> + + Distribute filters in a separate sub-directory. + * include/Makefile.am: Fix path. + * include/roboptim/core/filter/cached-function.hh: + Rename from include/roboptim/core/cached-function.hh. + * include/roboptim/core/filter/cached-function.hxx: + Rename from include/roboptim/core/cached-function.hxx. + * tests/cached-function.cc: Fix include. + 2010-03-01 Thomas Moulard <tho...@gm...> Use shared pointers in caching proxy. diff --git a/include/Makefile.am b/include/Makefile.am index d6b0b98..de2cb13 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -2,8 +2,6 @@ include $(top_srcdir)/build-aux/init.mk # --- Distribute and install headers. nobase_include_HEADERS = \ - roboptim/core/cached-function.hh \ - roboptim/core/cached-function.hxx \ roboptim/core/constant-function.hh \ roboptim/core/debug.hh \ roboptim/core/derivable-function.hh \ @@ -40,6 +38,12 @@ nobase_include_HEADERS = \ roboptim/core/util.hh \ roboptim/core/util.hxx +# Function filters. +nobase_include_HEADERS += \ + roboptim/core/filter/cached-function.hh \ + roboptim/core/filter/cached-function.hxx + + # Built-in plug-in. nobase_include_HEADERS += \ roboptim/core/plugin/dummy.hh diff --git a/include/roboptim/core/cached-function.hh b/include/roboptim/core/filter/cached-function.hh similarity index 98% rename from include/roboptim/core/cached-function.hh rename to include/roboptim/core/filter/cached-function.hh index 5c032e4..8d50d55 100644 --- a/include/roboptim/core/cached-function.hh +++ b/include/roboptim/core/filter/cached-function.hh @@ -110,5 +110,5 @@ namespace roboptim } // end of namespace roboptim -# include <roboptim/core/cached-function.hxx> +# include <roboptim/core/filter/cached-function.hxx> #endif //! ROBOPTIM_CORE_CACHED_FUNCTION_HH diff --git a/include/roboptim/core/cached-function.hxx b/include/roboptim/core/filter/cached-function.hxx similarity index 100% rename from include/roboptim/core/cached-function.hxx rename to include/roboptim/core/filter/cached-function.hxx diff --git a/tests/cached-function.cc b/tests/cached-function.cc index 5c5efcc..d279d37 100644 --- a/tests/cached-function.cc +++ b/tests/cached-function.cc @@ -19,10 +19,10 @@ #include <iostream> -#include <roboptim/core/cached-function.hh> #include <roboptim/core/io.hh> #include <roboptim/core/derivable-function.hh> #include <roboptim/core/util.hh> +#include <roboptim/core/filter/cached-function.hh> using namespace roboptim; ----------------------------------------------------------------------- Summary of changes: ChangeLog | 10 ++++++++++ include/Makefile.am | 8 ++++++-- .../roboptim/core/{ => filter}/cached-function.hh | 2 +- .../roboptim/core/{ => filter}/cached-function.hxx | 0 tests/cached-function.cc | 2 +- 5 files changed, 18 insertions(+), 4 deletions(-) rename include/roboptim/core/{ => filter}/cached-function.hh (98%) rename include/roboptim/core/{ => filter}/cached-function.hxx (100%) hooks/post-receive -- roboptim-core |
From: Thomas M. <tho...@us...> - 2010-03-01 15:28:25
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-core". The branch, master has been updated via 11f0b418862fd26d07643b1eaa35ab4e1d34af48 (commit) from e487dc074102f28f3209cacb12b40ef8d5633981 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 11f0b418862fd26d07643b1eaa35ab4e1d34af48 Author: Thomas Moulard <tho...@gm...> Date: Mon Mar 1 16:28:08 2010 +0100 Use shared pointers in caching proxy. * include/roboptim/core/cached-function.hh, * include/roboptim/core/cached-function.hxx: Use shared pointers. * tests/cached-function.cc: Update. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index b57ca11..f9b9ded 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2010-03-01 Thomas Moulard <tho...@gm...> + Use shared pointers in caching proxy. + * include/roboptim/core/cached-function.hh, + * include/roboptim/core/cached-function.hxx: Use shared pointers. + * tests/cached-function.cc: Update. + +2010-03-01 Thomas Moulard <tho...@gm...> + Implement function caching. * include/Makefile.am: Distribute new header and source. * include/roboptim/core/cached-function.hh: New. diff --git a/include/roboptim/core/cached-function.hh b/include/roboptim/core/cached-function.hh index e37f17c..5c032e4 100644 --- a/include/roboptim/core/cached-function.hh +++ b/include/roboptim/core/cached-function.hh @@ -22,10 +22,9 @@ # include <map> -# include <roboptim/core/n-times-derivable-function.hh> - +# include <boost/shared_ptr.hpp> -#include <roboptim/core/io.hh> +# include <roboptim/core/n-times-derivable-function.hh> namespace roboptim { @@ -77,7 +76,7 @@ namespace roboptim typedef std::map<Function::vector_t, Function::vector_t, ltvector> functionCache_t; - explicit CachedFunction (const T& fct) throw (); + explicit CachedFunction (boost::shared_ptr<const T> fct) throw (); ~CachedFunction () throw (); void reset () throw (); @@ -101,7 +100,7 @@ namespace roboptim size_type order = 1) const throw (); private: - const T& function_; + boost::shared_ptr<const T> function_; mutable std::vector<functionCache_t> cache_; mutable std::vector<functionCache_t> gradientCache_; mutable std::vector<functionCache_t> hessianCache_; diff --git a/include/roboptim/core/cached-function.hxx b/include/roboptim/core/cached-function.hxx index c5f8c0c..80d117e 100644 --- a/include/roboptim/core/cached-function.hxx +++ b/include/roboptim/core/cached-function.hxx @@ -64,12 +64,12 @@ namespace roboptim } // end of anonymous namespace. template <typename T> - CachedFunction<T>::CachedFunction (const T& fct) throw () - : T (fct.inputSize (), fct.outputSize (), cachedFunctionName (fct)), + CachedFunction<T>::CachedFunction (boost::shared_ptr<const T> fct) throw () + : T (fct->inputSize (), fct->outputSize (), cachedFunctionName (*fct)), function_ (fct), cache_ (derivativeSize<T>::value), - gradientCache_ (fct.outputSize ()), - hessianCache_ (fct.outputSize ()) + gradientCache_ (fct->outputSize ()), + hessianCache_ (fct->outputSize ()) { } @@ -102,7 +102,7 @@ namespace roboptim return; } std::cout << "not cached" << std::endl; - function_ (result, argument); + (*function_) (result, argument); cache_[0][argument] = result; } @@ -129,7 +129,7 @@ namespace roboptim gradient = it->second; return; } - function_.gradient (gradient, argument, functionId); + function_->gradient (gradient, argument, functionId); gradientCache_[functionId][argument] = gradient; } @@ -168,7 +168,7 @@ namespace roboptim hessian = it->second; return; } - function_.hessian (hessian, argument, functionId); + function_->hessian (hessian, argument, functionId); hessianCache_[functionId][argument] = hessian; } @@ -212,7 +212,7 @@ namespace roboptim derivative = it->second; return; } - function_.derivative (derivative, x, order); + function_->derivative (derivative, x, order); cache_[order][x] = derivative; } diff --git a/tests/cached-function.cc b/tests/cached-function.cc index c984487..5c5efcc 100644 --- a/tests/cached-function.cc +++ b/tests/cached-function.cc @@ -47,7 +47,7 @@ struct F : public DerivableFunction int run_test () { - F f; + boost::shared_ptr<F> f (new F ()); CachedFunction<DerivableFunction> cachedF (f); @@ -60,7 +60,7 @@ int run_test () x[0] = i; std::cout << cachedF (x) << std::endl; std::cout << cachedF (x) << std::endl; - assert (f (x)[0] == cachedF (x)[0]); + assert ((*f) (x)[0] == cachedF (x)[0]); std::cout << cachedF.gradient (x) << std::endl; std::cout << cachedF.gradient (x) << std::endl; ----------------------------------------------------------------------- Summary of changes: ChangeLog | 7 +++++++ include/roboptim/core/cached-function.hh | 9 ++++----- include/roboptim/core/cached-function.hxx | 16 ++++++++-------- tests/cached-function.cc | 4 ++-- 4 files changed, 21 insertions(+), 15 deletions(-) hooks/post-receive -- roboptim-core |
From: Thomas M. <tho...@us...> - 2010-03-01 15:11:15
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-core". The branch, master has been updated via e487dc074102f28f3209cacb12b40ef8d5633981 (commit) from a9e3d16f4c0d3dfa2f6c9e65825f0d0c449893a9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e487dc074102f28f3209cacb12b40ef8d5633981 Author: Thomas Moulard <tho...@gm...> Date: Mon Mar 1 16:10:58 2010 +0100 Implement function caching. * include/Makefile.am: Distribute new header and source. * include/roboptim/core/cached-function.hh: New. * include/roboptim/core/cached-function.hxx: New. * tests/Makefile.am: Compile new test case. * tests/cached-function.cc: New. * tests/cached-function.stdout: New. * tests/testsuite.at: Add new test case. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index ddc5f38..b57ca11 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2010-03-01 Thomas Moulard <tho...@gm...> + + Implement function caching. + * include/Makefile.am: Distribute new header and source. + * include/roboptim/core/cached-function.hh: New. + * include/roboptim/core/cached-function.hxx: New. + * tests/Makefile.am: Compile new test case. + * tests/cached-function.cc: New. + * tests/cached-function.stdout: New. + * tests/testsuite.at: Add new test case. + 2010-02-26 Thomas Moulard <tho...@gm...> Fix parameter code. diff --git a/include/Makefile.am b/include/Makefile.am index c78b902..d6b0b98 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -2,6 +2,8 @@ include $(top_srcdir)/build-aux/init.mk # --- Distribute and install headers. nobase_include_HEADERS = \ + roboptim/core/cached-function.hh \ + roboptim/core/cached-function.hxx \ roboptim/core/constant-function.hh \ roboptim/core/debug.hh \ roboptim/core/derivable-function.hh \ diff --git a/include/roboptim/core/cached-function.hh b/include/roboptim/core/cached-function.hh new file mode 100644 index 0000000..e37f17c --- /dev/null +++ b/include/roboptim/core/cached-function.hh @@ -0,0 +1,115 @@ +// Copyright (C) 2010 by Thomas Moulard, AIST, CNRS, INRIA. +// +// This file is part of the roboptim. +// +// roboptim is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// roboptim is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with roboptim. If not, see <http://www.gnu.org/licenses/>. + +#ifndef ROBOPTIM_CORE_CACHED_FUNCTION_HH +# define ROBOPTIM_CORE_CACHED_FUNCTION_HH +# include <roboptim/core/sys.hh> +# include <roboptim/core/debug.hh> + +# include <map> + +# include <roboptim/core/n-times-derivable-function.hh> + + +#include <roboptim/core/io.hh> + +namespace roboptim +{ + /// \addtogroup roboptim_meta_function + /// @{ + + struct ltvector + { + bool operator()(const Function::vector_t& v1, + const Function::vector_t& v2) const + { + Function::vector_t::const_iterator it1 = v1.begin (); + Function::vector_t::const_iterator it2 = v2.begin (); + + while (it1 != v1.end () && it2 != v2.end ()) + { + if (*it1 < *it2) + return true; + ++it1, ++it2; + } + return it1 != v1.end () && it2 == v2.end (); + } + }; + + template <typename T> + class ROBOPTIM_DLLAPI CachedFunction : public T + { + public: + /// \brief Import value type. + typedef typename DerivableFunction::value_type value_type; + /// \brief Import size type. + typedef typename DerivableFunction::size_type size_type; + /// \brief Import vector type. + typedef typename DerivableFunction::vector_t vector_t; + /// \brief Import result type. + typedef typename DerivableFunction::result_t result_t; + /// \brief Import argument type. + typedef typename DerivableFunction::argument_t argument_t; + /// \brief Import gradient type. + typedef typename DerivableFunction::gradient_t gradient_t; + /// \brief Import hessian type. + typedef typename TwiceDerivableFunction::hessian_t hessian_t; + /// \brief Import jacobian type. + typedef typename DerivableFunction::jacobian_t jacobian_t; + /// \brief Import interval type. + typedef typename DerivableFunction::interval_t interval_t; + + + typedef std::map<Function::vector_t, Function::vector_t, ltvector> + functionCache_t; + + explicit CachedFunction (const T& fct) throw (); + ~CachedFunction () throw (); + + void reset () throw (); + + protected: + virtual void impl_compute (result_t& result, const argument_t& argument) + const throw (); + + + virtual void impl_gradient (gradient_t& gradient, + const argument_t& argument, + size_type functionId = 0) + const throw (); + + virtual void impl_hessian (hessian_t& hessian, + const argument_t& argument, + size_type functionId = 0) const throw (); + + virtual void impl_derivative (gradient_t& derivative, + double argument, + size_type order = 1) const throw (); + + private: + const T& function_; + mutable std::vector<functionCache_t> cache_; + mutable std::vector<functionCache_t> gradientCache_; + mutable std::vector<functionCache_t> hessianCache_; + }; + + /// @} + +} // end of namespace roboptim + +# include <roboptim/core/cached-function.hxx> +#endif //! ROBOPTIM_CORE_CACHED_FUNCTION_HH diff --git a/include/roboptim/core/cached-function.hxx b/include/roboptim/core/cached-function.hxx new file mode 100644 index 0000000..c5f8c0c --- /dev/null +++ b/include/roboptim/core/cached-function.hxx @@ -0,0 +1,221 @@ +// Copyright (C) 2010 by Thomas Moulard, AIST, CNRS, INRIA. +// +// This file is part of the roboptim. +// +// roboptim is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// roboptim is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with roboptim. If not, see <http://www.gnu.org/licenses/>. + +#ifndef ROBOPTIM_CORE_CACHED_FUNCTION_HXX +# define ROBOPTIM_CORE_CACHED_FUNCTION_HXX +# include <boost/format.hpp> + +namespace roboptim +{ + namespace + { + template <typename T> + std::string cachedFunctionName (const T& fct); + + template <typename T> + std::string cachedFunctionName (const T& fct) + { + boost::format fmt ("%1% (cached)"); + fmt % fct.getName (); + return fmt.str (); + } + + template <typename T> + struct derivativeSize; + + template <> + struct derivativeSize<Function> + { + static const unsigned int value = 0; + }; + + template <> + struct derivativeSize<DerivableFunction> + { + static const unsigned int value = 1; + }; + + template <> + struct derivativeSize<TwiceDerivableFunction> + { + static const unsigned int value = 2; + }; + + template <unsigned N> + struct derivativeSize<NTimesDerivableFunction<N> > + { + static const unsigned int value = 3; + }; + + } // end of anonymous namespace. + + template <typename T> + CachedFunction<T>::CachedFunction (const T& fct) throw () + : T (fct.inputSize (), fct.outputSize (), cachedFunctionName (fct)), + function_ (fct), + cache_ (derivativeSize<T>::value), + gradientCache_ (fct.outputSize ()), + hessianCache_ (fct.outputSize ()) + { + } + + template <typename T> + CachedFunction<T>::~CachedFunction () throw () + { + } + + template <typename T> + void + CachedFunction<T>::reset () throw () + { + cache_.clear (); + gradientCache_.clear (); + hessianCache_.clear (); + } + + + template <typename T> + void + CachedFunction<T>::impl_compute (result_t& result, + const argument_t& argument) + const throw () + { + functionCache_t::const_iterator it = cache_[0].find (argument); + if (it != cache_[0].end ()) + { + std::cout << "cached" << std::endl; + result = it->second; + return; + } + std::cout << "not cached" << std::endl; + function_ (result, argument); + cache_[0][argument] = result; + } + + + template <> + void + CachedFunction<Function>::impl_gradient (gradient_t&, const argument_t&, size_type) + const throw () + { + assert (0); + } + + template <typename T> + void + CachedFunction<T>::impl_gradient (gradient_t& gradient, + const argument_t& argument, + size_type functionId) + const throw () + { + functionCache_t::const_iterator it = + gradientCache_[functionId].find (argument); + if (it != gradientCache_[functionId].end ()) + { + gradient = it->second; + return; + } + function_.gradient (gradient, argument, functionId); + gradientCache_[functionId][argument] = gradient; + } + + + + + template <> + void + CachedFunction<Function>::impl_hessian + (hessian_t&, const argument_t&, size_type) const throw () + { + assert (0); + } + + template <> + void + CachedFunction<DerivableFunction>::impl_hessian + (hessian_t&, const argument_t&, size_type) const throw () + { + assert (0); + } + + + + template <typename T> + void + CachedFunction<T>::impl_hessian (hessian_t& hessian, + const argument_t& argument, + size_type functionId) + const throw () + { + functionCache_t::const_iterator it = + hessianCache_[functionId].find (argument); + if (it != hessianCache_[functionId].end ()) + { + hessian = it->second; + return; + } + function_.hessian (hessian, argument, functionId); + hessianCache_[functionId][argument] = hessian; + } + + + template <> + void + CachedFunction<Function>::impl_derivative + (gradient_t&, double, size_type) const throw () + { + assert (0); + } + + template <> + void + CachedFunction<DerivableFunction>::impl_derivative + (gradient_t&, double, size_type) const throw () + { + assert (0); + } + + template <> + void + CachedFunction<TwiceDerivableFunction>::impl_derivative + (gradient_t&, double, size_type) const throw () + { + assert (0); + } + + template <typename T> + void + CachedFunction<T>::impl_derivative (gradient_t& derivative, + double argument, + size_type order) + const throw () + { + vector_t x (1); + x[0] = argument; + functionCache_t::const_iterator it = cache_[order].find (x); + if (it != cache_[order].end ()) + { + derivative = it->second; + return; + } + function_.derivative (derivative, x, order); + cache_[order][x] = derivative; + } + +} // end of namespace roboptim + +#endif //! ROBOPTIM_CORE_CACHED_FUNCTION_HXX diff --git a/tests/Makefile.am b/tests/Makefile.am index 2f14961..96a6157 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -97,6 +97,11 @@ derivable_parametrized_function_SOURCES = derivable-parametrized-function.cc \ $(COMMON_SOURCES) derivable_parametrized_function_LDADD = $(top_builddir)/src/libroboptim-core.la +# cached-function +check_PROGRAMS += cached-function +cached_function_SOURCES = cached-function.cc $(COMMON_SOURCES) +cached_function_LDADD = $(top_builddir)/src/libroboptim-core.la + # plugin check_PROGRAMS += plugin plugin_SOURCES = plugin.cc $(COMMON_SOURCES) @@ -153,6 +158,7 @@ generate-reference: # Distribute reference files. EXTRA_DIST += \ + cached-function.stdout \ constant-function.stdout \ derivable-function.stdout \ finite-difference-gradient.stdout \ diff --git a/tests/cached-function.cc b/tests/cached-function.cc new file mode 100644 index 0000000..c984487 --- /dev/null +++ b/tests/cached-function.cc @@ -0,0 +1,71 @@ +// Copyright (C) 2009 by Thomas Moulard, AIST, CNRS, INRIA. +// +// This file is part of the roboptim. +// +// roboptim is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// roboptim is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with roboptim. If not, see <http://www.gnu.org/licenses/>. + +#include "common.hh" + +#include <iostream> + +#include <roboptim/core/cached-function.hh> +#include <roboptim/core/io.hh> +#include <roboptim/core/derivable-function.hh> +#include <roboptim/core/util.hh> + +using namespace roboptim; + +struct F : public DerivableFunction +{ + F () : DerivableFunction (1, 1, "2 * x") + {} + + void impl_compute (result_t& res, const argument_t& argument) const throw () + { + res.clear (); + res[0] = 2. * argument[0]; + } + + void impl_gradient (gradient_t& grad, const argument_t& argument, + size_type) const throw () + { + grad.clear (); + grad[0] = 2.; + } +}; + +int run_test () +{ + F f; + + CachedFunction<DerivableFunction> cachedF (f); + + std::cout << cachedF << ":" << std::endl + << std::endl; + + Function::vector_t x (1); + for (double i = 0.; i < 10.; i += 0.5) + { + x[0] = i; + std::cout << cachedF (x) << std::endl; + std::cout << cachedF (x) << std::endl; + assert (f (x)[0] == cachedF (x)[0]); + + std::cout << cachedF.gradient (x) << std::endl; + std::cout << cachedF.gradient (x) << std::endl; + } + return 0; +} + +GENERATE_TEST () diff --git a/tests/cached-function.stdout b/tests/cached-function.stdout new file mode 100644 index 0000000..9b20194 --- /dev/null +++ b/tests/cached-function.stdout @@ -0,0 +1,142 @@ +2 * x (cached) (derivable function): + +not cached +[1](0) +cached +[1](0) +cached +[1](2) +[1](2) +not cached +[1](1) +cached +[1](1) +cached +[1](2) +[1](2) +not cached +[1](2) +cached +[1](2) +cached +[1](2) +[1](2) +not cached +[1](3) +cached +[1](3) +cached +[1](2) +[1](2) +not cached +[1](4) +cached +[1](4) +cached +[1](2) +[1](2) +not cached +[1](5) +cached +[1](5) +cached +[1](2) +[1](2) +not cached +[1](6) +cached +[1](6) +cached +[1](2) +[1](2) +not cached +[1](7) +cached +[1](7) +cached +[1](2) +[1](2) +not cached +[1](8) +cached +[1](8) +cached +[1](2) +[1](2) +not cached +[1](9) +cached +[1](9) +cached +[1](2) +[1](2) +not cached +[1](10) +cached +[1](10) +cached +[1](2) +[1](2) +not cached +[1](11) +cached +[1](11) +cached +[1](2) +[1](2) +not cached +[1](12) +cached +[1](12) +cached +[1](2) +[1](2) +not cached +[1](13) +cached +[1](13) +cached +[1](2) +[1](2) +not cached +[1](14) +cached +[1](14) +cached +[1](2) +[1](2) +not cached +[1](15) +cached +[1](15) +cached +[1](2) +[1](2) +not cached +[1](16) +cached +[1](16) +cached +[1](2) +[1](2) +not cached +[1](17) +cached +[1](17) +cached +[1](2) +[1](2) +not cached +[1](18) +cached +[1](18) +cached +[1](2) +[1](2) +not cached +[1](19) +cached +[1](19) +cached +[1](2) +[1](2) diff --git a/tests/testsuite.at b/tests/testsuite.at index 69413b3..7acb59c 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -47,6 +47,7 @@ CHECK_STDOUT([constant-function], [Check constant function class.]) CHECK_STDOUT([parametrized-function], [Check parametrized function class.]) CHECK_STDOUT([derivable-parametrized-function], [Check derivable parametrized function class.]) +CHECK_STDOUT([cached-function], [Check cached-function class.]) AT_BANNER([Problems]) CHECK_STDOUT([problem-cc], [Check problem copy constructor.]) ----------------------------------------------------------------------- Summary of changes: ChangeLog | 11 + include/Makefile.am | 2 + include/roboptim/core/cached-function.hh | 115 +++++++++++ include/roboptim/core/cached-function.hxx | 221 ++++++++++++++++++++++ tests/Makefile.am | 6 + tests/{linear-function.cc => cached-function.cc} | 52 ++--- tests/cached-function.stdout | 142 ++++++++++++++ tests/testsuite.at | 1 + 8 files changed, 519 insertions(+), 31 deletions(-) create mode 100644 include/roboptim/core/cached-function.hh create mode 100644 include/roboptim/core/cached-function.hxx copy tests/{linear-function.cc => cached-function.cc} (60%) create mode 100644 tests/cached-function.stdout hooks/post-receive -- roboptim-core |
From: Thomas M. <tho...@us...> - 2010-03-01 11:58:48
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-core-plugin-ipopt". The branch, master has been updated via 1ad8ad98472632730398108b93a1d27e84ea47fc (commit) from 9aab3c5112f63480f06f5da0a807892c91241c61 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1ad8ad98472632730398108b93a1d27e84ea47fc Author: Thomas Moulard <tho...@gm...> Date: Mon Mar 1 12:58:34 2010 +0100 Add rpm SPEC file. * Makefile.am: Enable rpm rules. * roboptim-core-ipopt-plugin.spec.in: New. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 359c122..c9294a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2010-03-01 Thomas Moulard <tho...@gm...> + Add rpm SPEC file. + * Makefile.am: Enable rpm rules. + * roboptim-core-ipopt-plugin.spec.in: New. + +2010-03-01 Thomas Moulard <tho...@gm...> + Update documentation. * .gitmodules: Remove old doc submodule. * doc/Doxyfile.extra.in: New. diff --git a/Makefile.am b/Makefile.am index fab1a06..e6b81a2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -24,7 +24,7 @@ include $(top_srcdir)/build-aux/libtool.mk include $(top_srcdir)/build-aux/pkg-config.mk include $(top_srcdir)/build-aux/git-version-gen.mk -#include $(top_srcdir)/build-aux/rpm.mk +include $(top_srcdir)/build-aux/rpm.mk SF_PROJECT_ID=roboptim diff --git a/roboptim-core-ipopt-plugin.spec.in b/roboptim-core-ipopt-plugin.spec.in new file mode 100644 index 0000000..fd342c3 --- /dev/null +++ b/roboptim-core-ipopt-plugin.spec.in @@ -0,0 +1,77 @@ +Name: @PACKAGE_TARNAME@ +Version: @PACKAGE_VERSION@ +Release: 1%{?dist} +Summary: The Ipopt plug-in for RobOptim + +Group: Development/Libraries +License: LGPLv3+ +URL: http://roboptim.sourceforge.net/ +Source0: http://dl.sf.net/sourceforge/%{name}/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: roboptim-core-devel, boost-devel, libtool-ltdl-devel, doxygen +# Not yet packaged: ipopt-devel + +%description +Provide a plug-in to enable the use of Ipopt as a RobOptim back-end + +%package devel +Summary: The roboptim-core-ipopt-plugin headers and development-related files +Group: Development/Libraries +Requires: @PACKAGE_TARNAME@ = %{version}-%{release} +%description devel +Headers and shared object symlinks for the RobOptim Ipopt plug-in + + +%package doc +Summary: API documentation +Group: Documentation +Requires: @PACKAGE_TARNAME@ = %{version}-%{release} +%description doc +Documentation for the RobOptim Ipopt plug-in + + + + + +%prep +%setup -q + +%build +%configure --docdir=%{_datadir}/doc/%{name}-%{version} --disable-static +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + +make %{?_smp_mflags} + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT + +# Get rid of Libtool files as they should not be installed. +rm $RPM_BUILD_ROOT/%{_libdir}/*.la + + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +%{_libdir}/*.so.* + +%files devel +%defattr(-,root,root,-) +%{_includedir}/* +%{_libdir}/*.so + +%files doc +%defattr(-,root,root,-) +%doc AUTHORS COPYING README NEWS +%{_datadir}/doc/%{name}-%{version}/* + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%changelog +* Thu Mar 01 2010 Thomas Moulard <tho...@gm...> - 0.2-1 +- initial work ----------------------------------------------------------------------- Summary of changes: ChangeLog | 6 +++ Makefile.am | 2 +- roboptim-core-ipopt-plugin.spec.in | 77 ++++++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 1 deletions(-) create mode 100644 roboptim-core-ipopt-plugin.spec.in hooks/post-receive -- roboptim-core-plugin-ipopt |
From: Thomas M. <tho...@us...> - 2010-03-01 11:05:49
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-core-plugin-ipopt". The branch, master has been updated via 9aab3c5112f63480f06f5da0a807892c91241c61 (commit) via 8e32311004e4ea2581a24287aaf1120cea80a245 (commit) from 5969cebdb6746deb3dd17c2afed109649a2f2e19 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9aab3c5112f63480f06f5da0a807892c91241c61 Author: Thomas Moulard <tho...@gm...> Date: Mon Mar 1 12:05:36 2010 +0100 Update documentation. * .gitmodules: Remove old doc submodule. * doc/Doxyfile.extra.in: New. * doc/Makefile.am: New. * doc: Remove. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/.gitmodules b/.gitmodules index 6e0cca4..5a8205a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,6 +4,3 @@ [submodule "build-aux"] path = build-aux url = roboptim:build-aux -[submodule "doc"] - path = doc - url = roboptim:doc diff --git a/ChangeLog b/ChangeLog index f843352..359c122 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2010-03-01 Thomas Moulard <tho...@gm...> + Update documentation. + * .gitmodules: Remove old doc submodule. + * doc/Doxyfile.extra.in: New. + * doc/Makefile.am: New. + * doc: Remove. + +2010-03-01 Thomas Moulard <tho...@gm...> + Update buildchain. * .gitignore: Ignore more files (like ``.version''). * Makefile.am: Factorize rules. diff --git a/doc b/doc deleted file mode 160000 index 0b2fbea..0000000 --- a/doc +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0b2fbeaf61da3b4efce4cfdaf8476d6842efd9e4 diff --git a/doc/Doxyfile.extra.in b/doc/Doxyfile.extra.in new file mode 100644 index 0000000..28e5d11 --- /dev/null +++ b/doc/Doxyfile.extra.in @@ -0,0 +1 @@ +TAGFILES = "@ROBOPTIMCORE_DOXYGENDOCDIR@/roboptim-core.doxytag = @ROBOPTIMCORE_DOXYGENDOCDIR@" diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..dc7dc61 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,3 @@ +include $(top_srcdir)/build-aux/init.mk +include $(top_srcdir)/build-aux/doxygen.mk +include $(top_srcdir)/build-aux/sf-doc.mk commit 8e32311004e4ea2581a24287aaf1120cea80a245 Author: Thomas Moulard <tho...@gm...> Date: Mon Mar 1 12:03:32 2010 +0100 Update buildchain. * .gitignore: Ignore more files (like ``.version''). * Makefile.am: Factorize rules. * build-aux: Synchronize. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/.gitignore b/.gitignore index 0ed27d6..2641437 100644 --- a/.gitignore +++ b/.gitignore @@ -7,9 +7,16 @@ config.h.in config.h.in~ configure doc/Makefile.in +packages/Makefile.in +packages/debian/Makefile.in +packages/ebuild/Makefile.in +packages/rpm/Makefile.in src/Makefile.in tests/Makefile.in tests/testsuite +committed/ ,* testsuite.log +*svn-log* +.version +.tarball-version diff --git a/ChangeLog b/ChangeLog index dfc762e..f843352 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2010-03-01 Thomas Moulard <tho...@gm...> + Update buildchain. + * .gitignore: Ignore more files (like ``.version''). + * Makefile.am: Factorize rules. + * build-aux: Synchronize. + +2010-03-01 Thomas Moulard <tho...@gm...> + Upgrade to RobOptim core 0.5.6. CAUTION: starting from now, $(libdir)/roboptim-core /MUST/ diff --git a/Makefile.am b/Makefile.am index c8eac8b..fab1a06 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/build-aux/init.mk + # Search for autoconf macros in build-aux. ACLOCAL_AMFLAGS = -I build-aux @@ -15,12 +17,16 @@ EXTRA_DIST = bootstrap build-aux/bootstrap # Nothing to do in this directory. all: -# Libtool rules -LIBTOOL_DEPS = @LIBTOOL_DEPS@ -libtool: $(LIBTOOL_DEPS) - $(SHELL) ./config.status --recheck +# Include various rules... +include $(top_srcdir)/build-aux/dist-sign.mk +include $(top_srcdir)/build-aux/doc-recursive.mk +include $(top_srcdir)/build-aux/libtool.mk +include $(top_srcdir)/build-aux/pkg-config.mk +include $(top_srcdir)/build-aux/git-version-gen.mk + +#include $(top_srcdir)/build-aux/rpm.mk + -# -- Generate documentation -.PHONY: doc html -doc html: - cd doc && $(MAKE) $(AM_MAKEFLAGS) $@ +SF_PROJECT_ID=roboptim +include $(top_srcdir)/build-aux/announce-gen.mk +include $(top_srcdir)/build-aux/sf-release.mk diff --git a/build-aux b/build-aux index 53249c7..527142d 160000 --- a/build-aux +++ b/build-aux @@ -1 +1 @@ -Subproject commit 53249c7a39864b963946d8088c421e367c8e6b75 +Subproject commit 527142d1b5d6635b7b20227ee67293a55a6fba76 ----------------------------------------------------------------------- Summary of changes: .gitignore | 7 +++++++ .gitmodules | 3 --- ChangeLog | 15 +++++++++++++++ Makefile.am | 22 ++++++++++++++-------- build-aux | 2 +- doc | 1 - doc/Doxyfile.extra.in | 1 + doc/Makefile.am | 3 +++ 8 files changed, 41 insertions(+), 13 deletions(-) delete mode 160000 doc create mode 100644 doc/Doxyfile.extra.in create mode 100644 doc/Makefile.am hooks/post-receive -- roboptim-core-plugin-ipopt |
From: Thomas M. <tho...@us...> - 2010-03-01 10:46:36
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-core-plugin-ipopt". The branch, master has been updated via 5969cebdb6746deb3dd17c2afed109649a2f2e19 (commit) from 457e3a7c13b08437cb3d7eb3c34d9dd8ab8dfdbf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 5969cebdb6746deb3dd17c2afed109649a2f2e19 Author: Thomas Moulard <tho...@gm...> Date: Mon Mar 1 11:46:23 2010 +0100 Upgrade to RobOptim core 0.5.6. CAUTION: starting from now, $(libdir)/roboptim-core /MUST/ be in your LT_LIBRARY_PATH! It is also recommended to remove manually your old $(libdir)/roboptim-core-ipopt* files. * configure.ac: Require newer roboptim-core. * include/roboptim/core/plugin/ipopt.hh: Declare parameters management methods. * src/Makefile.am: Install plug-in in separate directory. * src/roboptim-core-ipopt-plugin.cc: Management parameters properly. * tests/plugin.stdout, * tests/simple.stdout: Regenerate. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index ed628fd..dfc762e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2010-03-01 Thomas Moulard <tho...@gm...> + + Upgrade to RobOptim core 0.5.6. + + CAUTION: starting from now, $(libdir)/roboptim-core /MUST/ + be in your LT_LIBRARY_PATH! It is also recommended to remove + manually your old $(libdir)/roboptim-core-ipopt* files. + + * configure.ac: Require newer roboptim-core. + * include/roboptim/core/plugin/ipopt.hh: + Declare parameters management methods. + * src/Makefile.am: Install plug-in in separate directory. + * src/roboptim-core-ipopt-plugin.cc: Management parameters properly. + * tests/plugin.stdout, + * tests/simple.stdout: Regenerate. + 2009-08-24 Thomas Moulard <tho...@gm...> Update to new SourceForge URLs. diff --git a/configure.ac b/configure.ac index b935d04..927ad3b 100644 --- a/configure.ac +++ b/configure.ac @@ -58,7 +58,7 @@ JRL_PROG_DOXYGEN LT_INIT([dlopen]) # Search for roboptim-core. -ROBOPTIM_CORE_PKG_CONFIG([roboptim-core >= 0.2]) +ROBOPTIM_CORE_PKG_CONFIG([roboptim-core >= 0.5.6]) # Search for Ipopt. IPOPT_HEADERS(, [AC_MSG_FAILURE(["Ipopt header not found."])]) diff --git a/include/roboptim/core/plugin/ipopt.hh b/include/roboptim/core/plugin/ipopt.hh index 5e85c49..e0fec0b 100644 --- a/include/roboptim/core/plugin/ipopt.hh +++ b/include/roboptim/core/plugin/ipopt.hh @@ -17,11 +17,17 @@ #ifndef ROBOPTIM_CORE_IPOPT_HH # define ROBOPTIM_CORE_IPOPT_HH +# include <roboptim/core/sys.hh> +# include <roboptim/core/portability.hh> + # include <boost/mpl/vector.hpp> + # include <coin/IpSmartPtr.hpp> + # include <roboptim/core/solver.hh> # include <roboptim/core/twice-derivable-function.hh> + /// \brief Ipopt classes. namespace Ipopt { @@ -47,8 +53,9 @@ namespace roboptim /// /// \warning Ipopt needs twice derivable functions, so be sure /// to provide hessians in your function's problems. - class IpoptSolver : public Solver<TwiceDerivableFunction, - boost::mpl::vector<TwiceDerivableFunction> > + class ROBOPTIM_DLLEXPORT IpoptSolver + : public Solver<TwiceDerivableFunction, + boost::mpl::vector<TwiceDerivableFunction> > { public: friend class detail::MyTNLP; @@ -74,6 +81,16 @@ namespace roboptim virtual Ipopt::SmartPtr<Ipopt::IpoptApplication> getIpoptApplication () throw (); private: + /// \brief Initialize parameters. + /// + /// Add solver parameters. Called during construction. + void initializeParameters () throw (); + + /// \brief Read parameters and update associated options in Ipopt. + /// + /// Called before solving problem. + void updateParameters () throw (); + /// \brief Smart pointer to the Ipopt non linear problem description. Ipopt::SmartPtr<Ipopt::TNLP> nlp_; /// \brief Smart pointer to the Ipopt application instance. diff --git a/src/Makefile.am b/src/Makefile.am index 7e227fa..9d4c8a8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -10,7 +10,10 @@ AM_CPPFLAGS += $(ROBOPTIMCORE_CFLAGS) # Add available warnings flags. AM_CXXFLAGS += $(WARNING_CXXFLAGS) -lib_LTLIBRARIES = roboptim-core-ipopt-plugin.la +# Define plug-in directory. +plugindir = $(libdir)/roboptim-core + +plugin_LTLIBRARIES = roboptim-core-ipopt-plugin.la roboptim_core_ipopt_plugin_la_SOURCES = doc.hh roboptim-core-ipopt-plugin.cc diff --git a/src/roboptim-core-ipopt-plugin.cc b/src/roboptim-core-ipopt-plugin.cc index 663b334..b413de1 100644 --- a/src/roboptim-core-ipopt-plugin.cc +++ b/src/roboptim-core-ipopt-plugin.cc @@ -18,6 +18,9 @@ #include <cassert> #include <cstring> +#include <boost/foreach.hpp> +#include <boost/variant/apply_visitor.hpp> + #include <coin/IpIpoptApplication.hpp> #include <coin/IpTNLP.hpp> @@ -501,12 +504,110 @@ namespace roboptim nlp_ (new MyTNLP (*this)), app_ (new IpoptApplication (false, false)) { - // Set default options. - app_->Options ()->SetNumericValue ("tol", 1e-7); - app_->Options ()->SetStringValue ("mu_strategy", "adaptive"); - app_->Options ()->SetStringValue ("output_file", ""); + // Initialize parameters. + initializeParameters (); + } + +#define DEFINE_PARAMETER(KEY, DESCRIPTION, VALUE) \ + do { \ + parameters_[KEY].description = DESCRIPTION; \ + parameters_[KEY].value = VALUE; \ + } while (0) + + void + IpoptSolver::initializeParameters () throw () + { + parameters_.clear (); + + // Shared parameters. + DEFINE_PARAMETER ("max-iterations", "number of iterations", 3000); + + // IPOPT specific. + // Much more options are available for Ipopt, see ``Options reference'' of + // Ipopt documentation. + + // Output + DEFINE_PARAMETER ("ipopt.print_level", "output verbosity level", 5); + DEFINE_PARAMETER ("ipopt.print_user_options", + "print all options set by the user", "no"); + DEFINE_PARAMETER ("ipopt.print_options_documentation", + "switch to print all algorithmic options", "no"); + DEFINE_PARAMETER + ("ipopt.output_file", + "file name of desired output file (leave unset for no file output)", ""); + DEFINE_PARAMETER ("ipopt.file_print_level", + "verbosity level for output file", 5); + DEFINE_PARAMETER ("ipopt.option_file_name", + "file name of options file (to overwrite default)", ""); + + // Termination + DEFINE_PARAMETER ("ipopt.tol", + "desired convergence tolerance (relative)", 1e-7); + + // Barrier parameter + DEFINE_PARAMETER ("ipopt.mu_strategy", + "update strategy for barrier parameter", "adaptive"); - //app_->Options ()->SetStringValue ("nlp_scaling_method", "user-scaling"); + } + +#undef DEFINE_PARAMETER + + + namespace + { + struct IpoptParametersUpdater + : public boost::static_visitor<> + { + explicit IpoptParametersUpdater + (const Ipopt::SmartPtr<Ipopt::IpoptApplication>& app, + const std::string& key) + : app (app), + key (key) + + {} + void + operator () (const Function::value_type& val) const + { + app->Options ()->SetNumericValue (key, val); + } + + void + operator () (const int& val) const + { + app->Options ()->SetNumericValue (key, val); + } + + void + operator () (const std::string& val) const + { + app->Options ()->SetStringValue (key, val); + } + + private: + const Ipopt::SmartPtr<Ipopt::IpoptApplication>& app; + const std::string& key; + }; + } // end of anonymous namespace. + + void + IpoptSolver::updateParameters () throw () + { + const std::string prefix = "ipopt."; + typedef const std::pair<const std::string, Parameter> const_iterator_t; + BOOST_FOREACH (const_iterator_t& it, parameters_) + { + if (it.first.substr (0, prefix.size ()) == prefix) + { + boost::apply_visitor + (IpoptParametersUpdater + (app_, it.first.substr (prefix.size ())), it.second.value); + } + } + + // Remap standardized parameters. + boost::apply_visitor + (IpoptParametersUpdater + (app_, "max_iter"), parameters_["max-iterations"].value); } IpoptSolver::~IpoptSolver () throw () @@ -571,6 +672,8 @@ namespace roboptim void IpoptSolver::solve () throw () { + // Read parameters and forward them to Ipopt. + updateParameters (); ApplicationReturnStatus status = app_->Initialize (""); switch (status) @@ -603,15 +706,21 @@ extern "C" using namespace roboptim; typedef IpoptSolver::parent_t solver_t; - solver_t* create (const IpoptSolver::problem_t& pb); - void destroy (solver_t* p); + ROBOPTIM_DLLEXPORT unsigned getSizeOfProblem (); + ROBOPTIM_DLLEXPORT solver_t* create (const IpoptSolver::problem_t& pb); + ROBOPTIM_DLLEXPORT void destroy (solver_t* p); + + ROBOPTIM_DLLEXPORT unsigned getSizeOfProblem () + { + return sizeof (IpoptSolver::problem_t); + } - solver_t* create (const IpoptSolver::problem_t& pb) + ROBOPTIM_DLLEXPORT solver_t* create (const IpoptSolver::problem_t& pb) { return new IpoptSolver (pb); } - void destroy (solver_t* p) + ROBOPTIM_DLLEXPORT void destroy (solver_t* p) { delete p; } diff --git a/tests/plugin.stdout b/tests/plugin.stdout index ebcc32b..b285a32 100644 --- a/tests/plugin.stdout +++ b/tests/plugin.stdout @@ -1,23 +1,35 @@ -Problem: - a * d * (a + b + c) + d (twice derivable function) - Argument's bounds: (1, 5), (1, 5), (1, 5), (1, 5) - Argument's scales: 1, 1, 1, 1 - Number of constraints: 2 - Constraint 0 - a * b * c * d (twice derivable function) - Bounds: (25, inf) - Scales: 1 - Initial value: [1](25) - - Constraint 1 - a * a + b * b + c * c + d * d (twice derivable function) - Bounds: (40, 40) - Scales: 1 - Initial value: [1](52) - - Starting point: [4](1,5,5,1) - Starting value: [1](12) - Infinity value (for all functions): inf +Solver: + Problem: + a * d * (a + b + c) + d (twice derivable function) + Argument's bounds: (1, 5), (1, 5), (1, 5), (1, 5) + Argument's scales: 1, 1, 1, 1 + Number of constraints: 2 + Constraint 0 + a * b * c * d (twice derivable function) + Bounds: (25, inf) + Scales: 1 + Initial value: [1](25) + + Constraint 1 + a * a + b * b + c * c + d * d (twice derivable function) + Bounds: (40, 40) + Scales: 1 + Initial value: [1](52) (constraint not satisfied) + + Starting point: [4](1,5,5,1) + Starting value: [1](12) + Infinity value (for all functions): inf + Parameters: + ipopt.file_print_level (verbosity level for output file): 5 + ipopt.mu_strategy (update strategy for barrier parameter): adaptive + ipopt.option_file_name (file name of options file (to overwrite default)): + ipopt.output_file (file name of desired output file (leave unset for no file output)): + ipopt.print_level (output verbosity level): 5 + ipopt.print_options_documentation (switch to print all algorithmic options): no + ipopt.print_user_options (print all options set by the user): no + ipopt.tol (desired convergence tolerance (relative)): 1e-07 + max-iterations (number of iterations): 3000 + A solution has been found: Result: Size (input, output): 4, 1 diff --git a/tests/simple.stdout b/tests/simple.stdout index ebcc32b..b285a32 100644 --- a/tests/simple.stdout +++ b/tests/simple.stdout @@ -1,23 +1,35 @@ -Problem: - a * d * (a + b + c) + d (twice derivable function) - Argument's bounds: (1, 5), (1, 5), (1, 5), (1, 5) - Argument's scales: 1, 1, 1, 1 - Number of constraints: 2 - Constraint 0 - a * b * c * d (twice derivable function) - Bounds: (25, inf) - Scales: 1 - Initial value: [1](25) - - Constraint 1 - a * a + b * b + c * c + d * d (twice derivable function) - Bounds: (40, 40) - Scales: 1 - Initial value: [1](52) - - Starting point: [4](1,5,5,1) - Starting value: [1](12) - Infinity value (for all functions): inf +Solver: + Problem: + a * d * (a + b + c) + d (twice derivable function) + Argument's bounds: (1, 5), (1, 5), (1, 5), (1, 5) + Argument's scales: 1, 1, 1, 1 + Number of constraints: 2 + Constraint 0 + a * b * c * d (twice derivable function) + Bounds: (25, inf) + Scales: 1 + Initial value: [1](25) + + Constraint 1 + a * a + b * b + c * c + d * d (twice derivable function) + Bounds: (40, 40) + Scales: 1 + Initial value: [1](52) (constraint not satisfied) + + Starting point: [4](1,5,5,1) + Starting value: [1](12) + Infinity value (for all functions): inf + Parameters: + ipopt.file_print_level (verbosity level for output file): 5 + ipopt.mu_strategy (update strategy for barrier parameter): adaptive + ipopt.option_file_name (file name of options file (to overwrite default)): + ipopt.output_file (file name of desired output file (leave unset for no file output)): + ipopt.print_level (output verbosity level): 5 + ipopt.print_options_documentation (switch to print all algorithmic options): no + ipopt.print_user_options (print all options set by the user): no + ipopt.tol (desired convergence tolerance (relative)): 1e-07 + max-iterations (number of iterations): 3000 + A solution has been found: Result: Size (input, output): 4, 1 ----------------------------------------------------------------------- Summary of changes: ChangeLog | 16 ++++ configure.ac | 2 +- include/roboptim/core/plugin/ipopt.hh | 21 +++++- src/Makefile.am | 5 +- src/roboptim-core-ipopt-plugin.cc | 127 ++++++++++++++++++++++++++++++--- tests/plugin.stdout | 52 ++++++++----- tests/simple.stdout | 52 ++++++++----- 7 files changed, 222 insertions(+), 53 deletions(-) hooks/post-receive -- roboptim-core-plugin-ipopt |
From: Thomas M. <tho...@us...> - 2010-02-26 16:52:41
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-core". The branch, master has been updated via a9e3d16f4c0d3dfa2f6c9e65825f0d0c449893a9 (commit) from d0c07c8a8aea0906d77cb59c3ffa6b1079ed1318 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a9e3d16f4c0d3dfa2f6c9e65825f0d0c449893a9 Author: Thomas Moulard <tho...@gm...> Date: Fri Feb 26 17:52:24 2010 +0100 Fix parameter code. * include/roboptim/core/solver.hxx: Fix getParameter, std::map::operator[] is /not/ const (!). * src/solver.cc: Fix display code to remove spurious pointer display (previously was displaying output stream address). Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index a28451f..ddc5f38 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2010-02-26 Thomas Moulard <tho...@gm...> + Fix parameter code. + * include/roboptim/core/solver.hxx: Fix getParameter, + std::map::operator[] is /not/ const (!). + * src/solver.cc: Fix display code to remove spurious + pointer display (previously was displaying output stream address). + +2010-02-26 Thomas Moulard <tho...@gm...> + Fix typo in source filename. * src/Makefile.am: Fix typo. diff --git a/include/roboptim/core/solver.hxx b/include/roboptim/core/solver.hxx index 2089773..73b2b22 100644 --- a/include/roboptim/core/solver.hxx +++ b/include/roboptim/core/solver.hxx @@ -68,9 +68,10 @@ namespace roboptim const T& Solver<F, C>::getParameter (const std::string& key) const { - return boost::get<T> (parameters_[key].value); + parameters_t::const_iterator it = parameters_.find (key); + return boost::get<T> (it->second.value); } - + template <typename F, typename C> std::ostream& diff --git a/src/solver.cc b/src/solver.cc index 579e8ac..d820fb5 100644 --- a/src/solver.cc +++ b/src/solver.cc @@ -24,6 +24,7 @@ namespace roboptim std::ostream& operator<< (std::ostream& o, const Parameter& parameter) { - return o << parameter.description; + o << parameter.description; + return o; } } // end of namespace roboptim ----------------------------------------------------------------------- Summary of changes: ChangeLog | 8 ++++++++ include/roboptim/core/solver.hxx | 5 +++-- src/solver.cc | 3 ++- 3 files changed, 13 insertions(+), 3 deletions(-) hooks/post-receive -- roboptim-core |
From: Thomas M. <tho...@us...> - 2010-02-26 14:01:15
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-core". The branch, master has been updated via d0c07c8a8aea0906d77cb59c3ffa6b1079ed1318 (commit) from ebe5b424803cae381101fb0f2442520808484db2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit d0c07c8a8aea0906d77cb59c3ffa6b1079ed1318 Author: Thomas Moulard <tho...@gm...> Date: Fri Feb 26 15:01:01 2010 +0100 Fix typo in source filename. * src/Makefile.am: Fix typo. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 725448a..a28451f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-02-26 Thomas Moulard <tho...@gm...> + + Fix typo in source filename. + * src/Makefile.am: Fix typo. + 2010-02-25 Thomas Moulard <tho...@gm...> Implement run-time parameters management. diff --git a/src/Makefile.am b/src/Makefile.am index 40f8baa..62c4423 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -22,7 +22,7 @@ libroboptim_core_la_SOURCES = \ quadratic-function.cc \ result.cc \ result-with-warnings.cc \ - solver.c \ + solver.cc \ solver-error.cc \ solver-warning.cc \ twice-derivable-function.cc \ ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 +++++ src/Makefile.am | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) hooks/post-receive -- roboptim-core |
From: Thomas M. <tho...@us...> - 2010-02-25 17:06:26
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-core". The branch, master has been updated via ebe5b424803cae381101fb0f2442520808484db2 (commit) from 567bdb3ab6f4af76063e944f7868b2fe4c03f078 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ebe5b424803cae381101fb0f2442520808484db2 Author: Thomas Moulard <tho...@gm...> Date: Thu Feb 25 18:06:08 2010 +0100 Implement run-time parameters management. * include/roboptim/core/solver.hh, * include/roboptim/core/solver.hxx: Add parameters related methods. * src/Makefile.am: Compile ``solver.cc''. * src/roboptim-core-dummy-plugin.cc: Add dummy parameters. * src/solver.cc: New. * tests/plugin.stdout, * tests/simple.stdout: Regenerate. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 791151d..725448a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2010-02-25 Thomas Moulard <tho...@gm...> + + Implement run-time parameters management. + * include/roboptim/core/solver.hh, + * include/roboptim/core/solver.hxx: + Add parameters related methods. + * src/Makefile.am: Compile ``solver.cc''. + * src/roboptim-core-dummy-plugin.cc: Add dummy parameters. + * src/solver.cc: New. + * tests/plugin.stdout, + * tests/simple.stdout: Regenerate. + 2010-01-14 Thomas Moulard <tho...@gm...> Add ChangeLog information to spec file. diff --git a/include/roboptim/core/solver.hh b/include/roboptim/core/solver.hh index a3fadbe..24292f6 100644 --- a/include/roboptim/core/solver.hh +++ b/include/roboptim/core/solver.hh @@ -20,8 +20,13 @@ # include <roboptim/core/sys.hh> # include <roboptim/core/debug.hh> +# include <map> +# include <string> + # include <boost/static_assert.hpp> # include <boost/type_traits/is_base_of.hpp> +# include <boost/variant/variant.hpp> +# include <boost/variant/get.hpp> # include <roboptim/core/fwd.hh> # include <roboptim/core/function.hh> @@ -33,6 +38,19 @@ namespace roboptim /// \addtogroup roboptim_problem /// @{ + /// \brief Parameters type. + struct Parameter + { + /// \brief Allowed types for parameters. + typedef boost::variant<Function::value_type, int, std::string> parameterValues_t; + + /// \brief Parameter description (for humans). + std::string description; + + /// \brief Value. + parameterValues_t value; + }; + /// \brief Solver for a specific problem class. /// /// This class is parametrized by two types: @@ -56,6 +74,10 @@ namespace roboptim /// required. typedef Problem<F, C> problem_t; + /// \brief Map of parameters. + typedef std::map<std::string, Parameter> parameters_t; + + /// \brief Instantiate a solver from a problem. /// /// \param problem problem that should be solved @@ -86,6 +108,15 @@ namespace roboptim /// \return problem this solver is solving const problem_t& problem () const throw (); + /// \name Parameters + /// \{ + const parameters_t& parameters () const throw (); + parameters_t& parameters () throw (); + + template <typename T> + const T& getParameter (const std::string& key) const; + /// \} + /// \brief Display the solver on the specified output stream. /// /// \param o output stream used for display @@ -94,8 +125,18 @@ namespace roboptim protected: /// \brief Problem that will be solved. const problem_t problem_; + + /// \brief Solver parameters (run-time configuration). + parameters_t parameters_; }; + /// \brief Override operator<< to display ``parameters'' objects. + /// + /// \param o output stream used for display + /// \param ns NoSolution object, ignored + /// \return output stream + ROBOPTIM_DLLAPI std::ostream& + operator<< (std::ostream& o, const Parameter& parameter); /// @} } // end of namespace roboptim diff --git a/include/roboptim/core/solver.hxx b/include/roboptim/core/solver.hxx index 15901b8..2089773 100644 --- a/include/roboptim/core/solver.hxx +++ b/include/roboptim/core/solver.hxx @@ -17,6 +17,8 @@ #ifndef ROBOPTIM_CORE_SOLVER_HXX # define ROBOPTIM_CORE_SOLVER_HXX +# include <boost/foreach.hpp> +# include <roboptim/core/io.hh> namespace roboptim { @@ -48,10 +50,42 @@ namespace roboptim } template <typename F, typename C> + const typename Solver<F, C>::parameters_t& + Solver<F, C>::parameters () const throw () + { + return parameters_; + } + + template <typename F, typename C> + typename Solver<F, C>::parameters_t& + Solver<F, C>::parameters () throw () + { + return parameters_; + } + + template <typename F, typename C> + template <typename T> + const T& + Solver<F, C>::getParameter (const std::string& key) const + { + return boost::get<T> (parameters_[key].value); + } + + + template <typename F, typename C> std::ostream& Solver<F, C>::print (std::ostream& o) const throw () { - return o << this->problem_; + o << incindent << "Solver:" << iendl + << this->problem_ << iendl + << "Parameters:" << incindent << iendl; + + typedef const std::pair<const std::string, Parameter> const_iterator_t; + BOOST_FOREACH (const_iterator_t& it, parameters_) + o << it.first << " (" << it.second.description << ")" << ": " + << it.second.value << iendl; + o << decindent << decindent; + return o; } } // end of namespace roboptim #endif //! ROBOPTIM_CORE_SOLVER_HH diff --git a/src/Makefile.am b/src/Makefile.am index 9531757..40f8baa 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -22,6 +22,7 @@ libroboptim_core_la_SOURCES = \ quadratic-function.cc \ result.cc \ result-with-warnings.cc \ + solver.c \ solver-error.cc \ solver-warning.cc \ twice-derivable-function.cc \ diff --git a/src/roboptim-core-dummy-plugin.cc b/src/roboptim-core-dummy-plugin.cc index 44289dc..98bde30 100644 --- a/src/roboptim-core-dummy-plugin.cc +++ b/src/roboptim-core-dummy-plugin.cc @@ -26,6 +26,14 @@ namespace roboptim DummySolver::DummySolver (const problem_t& pb) throw () : parent_t (pb) { + parameters_["dummy-parameter"].description = "dummy parameter"; + parameters_["dummy-parameter"].value = 42.; + + parameters_["dummy-parameter2"].description = "yet another dummy parameter"; + parameters_["dummy-parameter2"].value = 3; + + parameters_["dummy-parameter3"].description = "just a dummy key"; + parameters_["dummy-parameter3"].value = "...and a dummy value!"; } DummySolver::~DummySolver () throw () diff --git a/src/solver.cc b/src/solver.cc new file mode 100644 index 0000000..579e8ac --- /dev/null +++ b/src/solver.cc @@ -0,0 +1,29 @@ +// Copyright (C) 2010 by Thomas Moulard, AIST, CNRS, INRIA. +// +// This file is part of the roboptim. +// +// roboptim is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// roboptim is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with roboptim. If not, see <http://www.gnu.org/licenses/>. + +#include "debug.hh" + +#include "roboptim/core/solver.hh" + +namespace roboptim +{ + std::ostream& operator<< (std::ostream& o, + const Parameter& parameter) + { + return o << parameter.description; + } +} // end of namespace roboptim diff --git a/tests/plugin.stdout b/tests/plugin.stdout index dc67f65..e81c7e6 100644 --- a/tests/plugin.stdout +++ b/tests/plugin.stdout @@ -6,11 +6,17 @@ Problem: No starting point. Infinity value (for all functions): inf --- -Problem: - a * d * (a + b + c) + d (not derivable) - Argument's bounds: (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf) - Argument's scales: 1, 1, 1, 1 - No constraints. - No starting point. - Infinity value (for all functions): inf +Solver: + Problem: + a * d * (a + b + c) + d (not derivable) + Argument's bounds: (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf) + Argument's scales: 1, 1, 1, 1 + No constraints. + No starting point. + Infinity value (for all functions): inf + Parameters: + dummy-parameter (dummy parameter): 42 + dummy-parameter2 (yet another dummy parameter): 3 + dummy-parameter3 (just a dummy key): ...and a dummy value! + The dummy solver always fail. diff --git a/tests/simple.stdout b/tests/simple.stdout index 7c47757..42de086 100644 --- a/tests/simple.stdout +++ b/tests/simple.stdout @@ -20,20 +20,26 @@ Problem: Starting value: [1](0) Infinity value (for all functions): inf --- -Problem: - a * d * (a + b + c) + d (not derivable) - Argument's bounds: (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf) - Argument's scales: 1, 1, 1, 1 - Number of constraints: 1 - Constraint 0 - a * d * (a + b + c) + d (not derivable) - Bounds: (0, 5) - Scales: 3.5 - Initial value: [1](0) - - Starting point: [4](0,0,0,0) - Starting value: [1](0) - Infinity value (for all functions): inf +Solver: + Problem: + a * d * (a + b + c) + d (not derivable) + Argument's bounds: (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf) + Argument's scales: 1, 1, 1, 1 + Number of constraints: 1 + Constraint 0 + a * d * (a + b + c) + d (not derivable) + Bounds: (0, 5) + Scales: 3.5 + Initial value: [1](0) + + Starting point: [4](0,0,0,0) + Starting value: [1](0) + Infinity value (for all functions): inf + Parameters: + dummy-parameter (dummy parameter): 42 + dummy-parameter2 (yet another dummy parameter): 3 + dummy-parameter3 (just a dummy key): ...and a dummy value! + The dummy solver always fail. Discrete point: 2.3 (cnt: 1) Discrete point: 2.8 (cnt: 2) ----------------------------------------------------------------------- Summary of changes: ChangeLog | 12 ++++++++++ include/roboptim/core/solver.hh | 41 ++++++++++++++++++++++++++++++++++ include/roboptim/core/solver.hxx | 36 +++++++++++++++++++++++++++++- src/Makefile.am | 1 + src/roboptim-core-dummy-plugin.cc | 8 ++++++ src/{solver-warning.cc => solver.cc} | 15 ++++-------- tests/plugin.stdout | 20 ++++++++++----- tests/simple.stdout | 34 ++++++++++++++++----------- 8 files changed, 135 insertions(+), 32 deletions(-) copy src/{solver-warning.cc => solver.cc} (72%) hooks/post-receive -- roboptim-core |
From: Thomas M. <tho...@us...> - 2010-02-17 19:17:54
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "web". The branch, master has been updated via 4590c19ee7be999a6f305208fba3f52fea31bdf5 (commit) from 483c88c4deabcb89c3b0da161cfe7ffce6b5acb7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 4590c19ee7be999a6f305208fba3f52fea31bdf5 Author: Thomas Moulard <tho...@gm...> Date: Wed Feb 17 20:17:38 2010 +0100 Add new releases. * htdocs/index.html: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index bf108c7..1ce4bb2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-02-17 Thomas Moulard <tho...@gm...> + + Add new releases. + * htdocs/index.html: Here. + 2009-11-16 Thomas Moulard <tho...@gm...> Fix documentation links, add 0.4 release information. diff --git a/htdocs/index.html b/htdocs/index.html index 45a1e67..cb69681 100644 --- a/htdocs/index.html +++ b/htdocs/index.html @@ -49,6 +49,10 @@ <h2><a name="releases"></a>Releases</h2> <dl> + <dt>2010-02-17</dt> <dd>Release 0.5 + (<a href="https://sourceforge.net/projects/roboptim/files/">download</a>). + </dd> + <dt>2009-11-16</dt> <dd>Release 0.4 (<a href="https://sourceforge.net/projects/roboptim/files/">download</a>). </dd> @@ -78,6 +82,7 @@ <li><a href="doc/core/0.2/">HTML (0.2)</a></li> <li><a href="doc/core/0.3/">HTML (0.3)</a></li> <li><a href="doc/core/0.4/">HTML (0.4)</a></li> + <li><a href="doc/core/0.5/">HTML (0.5)</a></li> <li><a href="doc/core/HEAD/">HTML (development version)</a></li> <li> Plug-ins: @@ -108,6 +113,7 @@ <ul> <li><a href="doc/trajectory/0.2.1/">HTML (0.2.1)</a></li> <li><a href="doc/trajectory/0.4/">HTML (0.4)</a></li> + <li><a href="doc/trajectory/0.5/">HTML (0.5)</a></li> <li><a href="doc/trajectory/HEAD/">HTML (development version)</a></li> </ul> ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 +++++ htdocs/index.html | 6 ++++++ 2 files changed, 11 insertions(+), 0 deletions(-) hooks/post-receive -- web |