roboptim-commit Mailing List for RobOptim (Page 92)
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: Thomas M. <tho...@gm...> - 2009-08-31 10:19:09
|
Hello, I have pushed a modification in roboptim-core that change how finite difference gradients are computed. It breaks the current interface but the update is trivial. * Idea / implementation Before, the gradient was computed directly in FiniteDifferenceGradient class and has been changed several times to enhance the last algorithm comes from the GNU Scientific Library and use the five points rules. The advantage is that it is extremely precise but on the other hand it is costly to compute. As usually the naive fast algorithm is fast enough, I have changed the interface so that one can choose what algorithm will be used. The implementation idea comes from the well-known Andrei Alexandescu's policy based design pattern. See: - http://en.wikipedia.org/wiki/Policy-based_design - http://erdani.org/ In practice, it means the gradient computation algorithm is in a separate class and the finiteDifferenceGradient class is just a facade templated by the algorithm type. I.e.: FiniteDiffrerenceGradient<FiniteDifferenceGradientPolicies::Simple> simple (/* FIXME */); FiniteDiffrerenceGradient<FiniteDifferenceGradientPolicies::FivePointsRule> compex (/* FIXME */); The first line declare an object that uses a simple gradient computation, the second a complex one. The header fwd.hh contains pre-declarations and declare FivePointsRule as the default policy, so one can write: FiniteDifferenceGradient<> myGradient (/* FIXME */); ...and in this case the complex algorithm is used. Rationale: 1/ this commit does not change program's behavior as the complex algorithm was the only one available previously, 2/ a default behavior has to be correct. If one wants to choose speed over correctness, he has to do it explicitly. BTW anyone can declare a new gradient computation algorithm by doing class MyNewGradientComputationAlgorithm { void computeGradient (/* FIXME - argument are the same than other policies */) { // compute gradient here. } }; FiniteDifferenceGradient<MyNewGradientComputationAlgorithm> (/* FIXME */); * How to update your code to new interface Just add change FiniteDifferenceGradient into ``FiniteDifferenceGradient<>'' (of course you can precise a policy if you want). On Mon, Aug 31, 2009 at 6:55 PM, Thomas Moulard<tho...@us...> wrote: > 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 26ad52ac15f29ca16d282688e26a03b773c09345 (commit) > from 4e051e05e1b1b5789c59e39d36bc7bb35f61f6d6 (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 26ad52ac15f29ca16d282688e26a03b773c09345 > Author: Thomas Moulard <tho...@gm...> > Date: Mon Aug 31 11:54:54 2009 +0900 > > Add policies to finite-difference gradients computation. > > * include/Makefile.am: Distribute new header. > * include/roboptim/core/finite-difference-gradient.hh: > Add policies and template FiniteDifferenceGradient by them. > * include/roboptim/core/finite-difference-gradient.hxx: New. > * include/roboptim/core/fwd.hh: Update forward declaration, > make FivePointsRule the default policy. > * src/finite-difference-gradient.cc: Implement policies, > update free functions. > * tests/finite-difference-gradient.cc: Use new interface, > check both policies. > > Signed-off-by: Thomas Moulard <tho...@gm...> > > diff --git a/ChangeLog b/ChangeLog > index d81d8aa..5dc817b 100644 > --- a/ChangeLog > +++ b/ChangeLog > @@ -1,3 +1,17 @@ > +2009-08-31 Thomas Moulard <tho...@gm...> > + > + Add policies to finite-difference gradients computation. > + * include/Makefile.am: Distribute new header. > + * include/roboptim/core/finite-difference-gradient.hh: > + Add policies and template FiniteDifferenceGradient by them. > + * include/roboptim/core/finite-difference-gradient.hxx: New. > + * include/roboptim/core/fwd.hh: Update forward declaration, > + make FivePointsRule the default policy. > + * src/finite-difference-gradient.cc: Implement policies, > + update free functions. > + * tests/finite-difference-gradient.cc: Use new interface, > + check both policies. > + > 2009-08-30 Thomas Moulard <tho...@gm...> > > Fix error in return type. > diff --git a/include/Makefile.am b/include/Makefile.am > index 2c744c6..c78b902 100644 > --- a/include/Makefile.am > +++ b/include/Makefile.am > @@ -9,6 +9,7 @@ nobase_include_HEADERS = \ > roboptim/core/function.hh \ > roboptim/core/fwd.hh \ > roboptim/core/finite-difference-gradient.hh \ > + roboptim/core/finite-difference-gradient.hxx \ > roboptim/core/generic-solver.hh \ > roboptim/core/identity-function.hh \ > roboptim/core/indent.hh \ > diff --git a/include/roboptim/core/finite-difference-gradient.hh b/include/roboptim/core/finite-difference-gradient.hh > index d2bd7fa..da3efbc 100644 > --- a/include/roboptim/core/finite-difference-gradient.hh > +++ b/include/roboptim/core/finite-difference-gradient.hh > @@ -81,6 +81,29 @@ namespace roboptim > /// \return output stream > ROBOPTIM_DLLAPI std::ostream& operator<< (std::ostream& o, const BadGradient& f); > > + namespace finiteDifferenceGradientPolicies > + { > + struct ROBOPTIM_DLLAPI Simple > + { > + void computeGradient > + (const Function& adaptee, > + Function::value_type epsilon, > + Function::result_t& gradient, > + const Function::argument_t& argument, > + Function::value_type idFunction) const throw (); > + }; > + > + struct ROBOPTIM_DLLAPI FivePointsRule > + { > + void computeGradient > + (const Function& adaptee, > + Function::value_type epsilon, > + Function::result_t& gradient, > + const Function::argument_t& argument, > + Function::value_type idFunction) const throw (); > + }; > + } // end of namespace policy. > + > > /// \addtogroup roboptim_function > /// @{ > @@ -98,7 +121,10 @@ namespace roboptim > /// \f[f'(x)\approx {f(x+\epsilon)-f(x)\over \epsilon}\f] > /// where \f$\epsilon\f$ is a constant given when calling the class > /// constructor. > - class ROBOPTIM_DLLAPI FiniteDifferenceGradient : public DerivableFunction > + template <typename FdgPolicy> > + class FiniteDifferenceGradient > + : public DerivableFunction, > + private FdgPolicy > { > public: > /// \brief Instantiate a finite differences gradient. > @@ -155,4 +181,5 @@ namespace roboptim > > } // end of namespace roboptim > > +# include <roboptim/core/finite-difference-gradient.hxx> > #endif //! ROBOPTIM_CORE_FINITE_DIFFERENCE_GRADIENT_HH > diff --git a/include/roboptim/core/finite-difference-gradient.hxx b/include/roboptim/core/finite-difference-gradient.hxx > new file mode 100644 > index 0000000..371c91c > --- /dev/null > +++ b/include/roboptim/core/finite-difference-gradient.hxx > @@ -0,0 +1,62 @@ > +// 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/>. > + > +#ifndef ROBOPTIM_CORE_FINITE_DIFFERENCE_GRADIENT_HXX > +# define ROBOPTIM_CORE_FINITE_DIFFERENCE_GRADIENT_HXX > + > +namespace roboptim > +{ > + template <typename FdgPolicy> > + FiniteDifferenceGradient<FdgPolicy>::FiniteDifferenceGradient (const Function& adaptee, > + value_type epsilon) > + throw () > + : DerivableFunction (adaptee.inputSize (), adaptee.outputSize ()), > + FdgPolicy (), > + adaptee_ (adaptee), > + epsilon_ (epsilon) > + { > + // Avoid meaningless values for epsilon such as 0 or NaN. > + assert (epsilon != 0. && epsilon == epsilon); > + } > + > + template <typename FdgPolicy> > + FiniteDifferenceGradient<FdgPolicy>::~FiniteDifferenceGradient () throw () > + { > + } > + > + template <typename FdgPolicy> > + void > + FiniteDifferenceGradient<FdgPolicy>::impl_compute (result_t& result, > + const argument_t& argument) > + const throw () > + { > + adaptee_ (result, argument); > + } > + > + template <typename FdgPolicy> > + void > + FiniteDifferenceGradient<FdgPolicy>::impl_gradient > + (gradient_t& gradient, > + const argument_t& argument, > + size_type idFunction) const throw () > + { > + this->computeGradient (adaptee_, epsilon_, gradient, argument, idFunction); > + } > + > +} // end of namespace roboptim > + > +#endif //! ROBOPTIM_CORE_FINITE_DIFFERENCE_GRADIENT_HXX > diff --git a/include/roboptim/core/fwd.hh b/include/roboptim/core/fwd.hh > index 5760b16..11f3d2d 100644 > --- a/include/roboptim/core/fwd.hh > +++ b/include/roboptim/core/fwd.hh > @@ -33,6 +33,15 @@ namespace roboptim > class ConstantFunction; > class DerivableFunction; > class DummySolver; > + > + namespace finiteDifferenceGradientPolicies > + { > + class Simple; > + class FivePointsRule; > + }; // end of finiteDifferenceGradientPolicies > + > + template <typename FdgPolicy = > + finiteDifferenceGradientPolicies::FivePointsRule> > class FiniteDifferenceGradient; > class Function; > class GenericSolver; > diff --git a/src/finite-difference-gradient.cc b/src/finite-difference-gradient.cc > index 8fba1e5..edc4ce1 100644 > --- a/src/finite-difference-gradient.cc > +++ b/src/finite-difference-gradient.cc > @@ -62,31 +62,6 @@ namespace roboptim > } > > > - > - FiniteDifferenceGradient::FiniteDifferenceGradient (const Function& adaptee, > - value_type epsilon) > - throw () > - : DerivableFunction (adaptee.inputSize (), adaptee.outputSize ()), > - adaptee_ (adaptee), > - epsilon_ (epsilon) > - { > - // Avoid meaningless values for epsilon such as 0 or NaN. > - assert (epsilon != 0. && epsilon == epsilon); > - } > - > - FiniteDifferenceGradient::~FiniteDifferenceGradient () throw () > - { > - } > - > - void > - FiniteDifferenceGradient::impl_compute (result_t& result, > - const argument_t& argument) > - const throw () > - { > - adaptee_ (result, argument); > - } > - > - > namespace detail > { > void > @@ -154,54 +129,83 @@ namespace roboptim > } > } > > - void > - FiniteDifferenceGradient::impl_gradient (gradient_t& gradient, > - const argument_t& argument, > - size_type idFunction) const throw () > + namespace finiteDifferenceGradientPolicies > { > - assert (outputSize () - idFunction > 0); > - > - value_type h = epsilon_ / 2.; > - value_type r_0 = 0.; > - value_type round = 0.; > - value_type trunc = 0.; > - value_type error = 0.; > - > - for (unsigned j = 0; j < argument.size (); ++j) > - { > - detail::compute_deriv (adaptee_, j, h, > - r_0, round, trunc, > - argument, idFunction); > - error = round + trunc; > - > - if (round < trunc && (round > 0 && trunc > 0)) > - { > - value_type r_opt = 0., round_opt = 0., trunc_opt = 0., error_opt = 0.; > - > - /* Compute an optimised stepsize to minimize the total error, > - using the scaling of the truncation error (O(h^2)) and > - rounding error (O(1/h)). */ > - > - value_type h_opt = > - h * std::pow (round / (2. * trunc), 1. / 3.); > - > - detail::compute_deriv (adaptee_, j, h_opt, > - r_opt, round_opt, trunc_opt, > - argument, idFunction); > - error_opt = round_opt + trunc_opt; > - > - /* Check that the new error is smaller, and that the new derivative > - is consistent with the error bounds of the original estimate. */ > - > - if (error_opt < error && std::fabs (r_opt - r_0) < 4. * error) > - { > - r_0 = r_opt; > - error = error_opt; > - } > - } > - > - gradient (j) = r_0; > - } > + void > + Simple::computeGradient > + (const Function& adaptee, > + Function::value_type epsilon, > + Function::result_t& gradient, > + const Function::argument_t& argument, > + Function::value_type idFunction) const throw () > + { > + typedef Function::value_type value_type; > + assert (adaptee.outputSize () - idFunction > 0); > + > + Function::result_t res = adaptee (argument); > + for (unsigned j = 0; j < adaptee.inputSize (); ++j) > + { > + Function::argument_t xEps = argument; > + xEps[j] += epsilon; > + Function::result_t resEps = adaptee (xEps); > + gradient (j) = (resEps[idFunction] - res[idFunction]) / epsilon; > + } > + } > + > + void > + FivePointsRule::computeGradient > + (const Function& adaptee, > + Function::value_type epsilon, > + Function::result_t& gradient, > + const Function::argument_t& argument, > + Function::value_type idFunction) const throw () > + { > + typedef Function::value_type value_type; > + > + assert (adaptee.outputSize () - idFunction > 0); > + > + value_type h = epsilon / 2.; > + value_type r_0 = 0.; > + value_type round = 0.; > + value_type trunc = 0.; > + value_type error = 0.; > + > + for (unsigned j = 0; j < argument.size (); ++j) > + { > + detail::compute_deriv (adaptee, j, h, > + r_0, round, trunc, > + argument, idFunction); > + error = round + trunc; > + > + if (round < trunc && (round > 0 && trunc > 0)) > + { > + value_type r_opt = 0., round_opt = 0., trunc_opt = 0., error_opt = 0.; > + > + /* Compute an optimised stepsize to minimize the total error, > + using the scaling of the truncation error (O(h^2)) and > + rounding error (O(1/h)). */ > + > + value_type h_opt = > + h * std::pow (round / (2. * trunc), 1. / 3.); > + > + detail::compute_deriv (adaptee, j, h_opt, > + r_opt, round_opt, trunc_opt, > + argument, idFunction); > + error_opt = round_opt + trunc_opt; > + > + /* Check that the new error is smaller, and that the new derivative > + is consistent with the error bounds of the original estimate. */ > + > + if (error_opt < error && std::fabs (r_opt - r_0) < 4. * error) > + { > + r_0 = r_opt; > + error = error_opt; > + } > + } > + > + gradient (j) = r_0; > + } > + } > } > > > @@ -211,7 +215,7 @@ namespace roboptim > const Function::vector_t& x, > Function::value_type threshold) throw () > { > - FiniteDifferenceGradient fdfunction (function); > + FiniteDifferenceGradient<> fdfunction (function); > DerivableFunction::gradient_t grad = function.gradient (x, i); > DerivableFunction::gradient_t fdgrad = fdfunction.gradient (x, i); > > @@ -228,7 +232,7 @@ namespace roboptim > Function::value_type threshold) > throw (BadGradient) > { > - FiniteDifferenceGradient fdfunction (function); > + FiniteDifferenceGradient<> fdfunction (function); > DerivableFunction::gradient_t grad = function.gradient (x, i); > DerivableFunction::gradient_t fdgrad = fdfunction.gradient (x, i); > > diff --git a/tests/finite-difference-gradient.cc b/tests/finite-difference-gradient.cc > index d765a76..6ada2ed 100644 > --- a/tests/finite-difference-gradient.cc > +++ b/tests/finite-difference-gradient.cc > @@ -151,7 +151,7 @@ displayGradient (const DerivableFunction& function, > const Function::vector_t& x, > int i) > { > - FiniteDifferenceGradient fdfunction (function); > + FiniteDifferenceGradient<> fdfunction (function); > DerivableFunction::gradient_t grad = function.gradient (x, i); > DerivableFunction::gradient_t fdgrad = fdfunction.gradient (x, i); > > @@ -200,10 +200,11 @@ int run_test () > > Gnuplot gnuplot = Gnuplot::make_interactive_gnuplot (); > > - FiniteDifferenceGradient fg_fd (fg, 10.); > + FiniteDifferenceGradient<> fg_fd (fg, 10.); > > Polynomial p; > - FiniteDifferenceGradient p_fd (p, 10.); > + FiniteDifferenceGradient<finiteDifferenceGradientPolicies::Simple> > + p_fd (p, 10.); > > Function::discreteInterval_t interval (-100., 100., 1.); > > > ----------------------------------------------------------------------- > > Summary of changes: > ChangeLog | 14 ++ > include/Makefile.am | 1 + > .../roboptim/core/finite-difference-gradient.hh | 29 ++++- > .../roboptim/core/finite-difference-gradient.hxx | 62 ++++++++ > include/roboptim/core/fwd.hh | 9 ++ > src/finite-difference-gradient.cc | 152 ++++++++++---------- > tests/finite-difference-gradient.cc | 7 +- > 7 files changed, 196 insertions(+), 78 deletions(-) > create mode 100644 include/roboptim/core/finite-difference-gradient.hxx > > > hooks/post-receive > -- > roboptim-core > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > roboptim-commit mailing list > rob...@li... > https://lists.sourceforge.net/lists/listinfo/roboptim-commit > -- Thomas Moulard http://www.linkedin.com/in/moulard |
From: Thomas M. <tho...@us...> - 2009-08-31 10:00: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-trajectory". The branch, master has been updated via e7cb836983ae9268e595130c5308f966c712731c (commit) from 3dee62897a456441a241b29dcc27e30ca2321835 (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 e7cb836983ae9268e595130c5308f966c712731c Author: Thomas Moulard <tho...@gm...> Date: Mon Aug 31 11:59:40 2009 +0900 Update to new interface. * include/roboptim/trajectory/anthropomorphic-cost-function.hxx, * include/roboptim/trajectory/limit-omega.hxx, * include/roboptim/trajectory/limit-speed.hxx: Update to new finite difference gradient interface. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index b5fbed7..5d74507 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-08-31 Thomas Moulard <tho...@gm...> + + Update to new interface. + * include/roboptim/trajectory/anthropomorphic-cost-function.hxx, + * include/roboptim/trajectory/limit-omega.hxx, + * include/roboptim/trajectory/limit-speed.hxx: + Update to new finite difference gradient interface. + 2009-08-24 Thomas Moulard <tho...@gm...> Update submodules to new SourceForge URLs. diff --git a/include/roboptim/trajectory/anthropomorphic-cost-function.hxx b/include/roboptim/trajectory/anthropomorphic-cost-function.hxx index 122fd91..0559a59 100644 --- a/include/roboptim/trajectory/anthropomorphic-cost-function.hxx +++ b/include/roboptim/trajectory/anthropomorphic-cost-function.hxx @@ -118,7 +118,7 @@ namespace roboptim size_type i) const throw () { - FiniteDifferenceGradient fdfunction (*this); + FiniteDifferenceGradient<> fdfunction (*this); fdfunction.gradient (grad, p, 0); } diff --git a/include/roboptim/trajectory/limit-omega.hxx b/include/roboptim/trajectory/limit-omega.hxx index a7880ec..dc549b9 100644 --- a/include/roboptim/trajectory/limit-omega.hxx +++ b/include/roboptim/trajectory/limit-omega.hxx @@ -78,7 +78,7 @@ namespace roboptim LimitOmega<T>::impl_gradient (gradient_t& grad, const argument_t& p, size_type i) const throw () { - FiniteDifferenceGradient fd (*this); + FiniteDifferenceGradient<> fd (*this); fd.gradient (grad, p, i); } diff --git a/include/roboptim/trajectory/limit-speed.hxx b/include/roboptim/trajectory/limit-speed.hxx index 85b3414..bd36190 100644 --- a/include/roboptim/trajectory/limit-speed.hxx +++ b/include/roboptim/trajectory/limit-speed.hxx @@ -83,7 +83,7 @@ namespace roboptim grad.clear (); //FIXME: compute gradient analytically. - FiniteDifferenceGradient fdfunction (*this); + FiniteDifferenceGradient<> fdfunction (*this); fdfunction.gradient (grad, p, 0); } ----------------------------------------------------------------------- Summary of changes: ChangeLog | 8 ++++++++ .../trajectory/anthropomorphic-cost-function.hxx | 2 +- include/roboptim/trajectory/limit-omega.hxx | 2 +- include/roboptim/trajectory/limit-speed.hxx | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) hooks/post-receive -- roboptim-trajectory |
From: Thomas M. <tho...@us...> - 2009-08-31 09:55:47
|
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 26ad52ac15f29ca16d282688e26a03b773c09345 (commit) from 4e051e05e1b1b5789c59e39d36bc7bb35f61f6d6 (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 26ad52ac15f29ca16d282688e26a03b773c09345 Author: Thomas Moulard <tho...@gm...> Date: Mon Aug 31 11:54:54 2009 +0900 Add policies to finite-difference gradients computation. * include/Makefile.am: Distribute new header. * include/roboptim/core/finite-difference-gradient.hh: Add policies and template FiniteDifferenceGradient by them. * include/roboptim/core/finite-difference-gradient.hxx: New. * include/roboptim/core/fwd.hh: Update forward declaration, make FivePointsRule the default policy. * src/finite-difference-gradient.cc: Implement policies, update free functions. * tests/finite-difference-gradient.cc: Use new interface, check both policies. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index d81d8aa..5dc817b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2009-08-31 Thomas Moulard <tho...@gm...> + + Add policies to finite-difference gradients computation. + * include/Makefile.am: Distribute new header. + * include/roboptim/core/finite-difference-gradient.hh: + Add policies and template FiniteDifferenceGradient by them. + * include/roboptim/core/finite-difference-gradient.hxx: New. + * include/roboptim/core/fwd.hh: Update forward declaration, + make FivePointsRule the default policy. + * src/finite-difference-gradient.cc: Implement policies, + update free functions. + * tests/finite-difference-gradient.cc: Use new interface, + check both policies. + 2009-08-30 Thomas Moulard <tho...@gm...> Fix error in return type. diff --git a/include/Makefile.am b/include/Makefile.am index 2c744c6..c78b902 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -9,6 +9,7 @@ nobase_include_HEADERS = \ roboptim/core/function.hh \ roboptim/core/fwd.hh \ roboptim/core/finite-difference-gradient.hh \ + roboptim/core/finite-difference-gradient.hxx \ roboptim/core/generic-solver.hh \ roboptim/core/identity-function.hh \ roboptim/core/indent.hh \ diff --git a/include/roboptim/core/finite-difference-gradient.hh b/include/roboptim/core/finite-difference-gradient.hh index d2bd7fa..da3efbc 100644 --- a/include/roboptim/core/finite-difference-gradient.hh +++ b/include/roboptim/core/finite-difference-gradient.hh @@ -81,6 +81,29 @@ namespace roboptim /// \return output stream ROBOPTIM_DLLAPI std::ostream& operator<< (std::ostream& o, const BadGradient& f); + namespace finiteDifferenceGradientPolicies + { + struct ROBOPTIM_DLLAPI Simple + { + void computeGradient + (const Function& adaptee, + Function::value_type epsilon, + Function::result_t& gradient, + const Function::argument_t& argument, + Function::value_type idFunction) const throw (); + }; + + struct ROBOPTIM_DLLAPI FivePointsRule + { + void computeGradient + (const Function& adaptee, + Function::value_type epsilon, + Function::result_t& gradient, + const Function::argument_t& argument, + Function::value_type idFunction) const throw (); + }; + } // end of namespace policy. + /// \addtogroup roboptim_function /// @{ @@ -98,7 +121,10 @@ namespace roboptim /// \f[f'(x)\approx {f(x+\epsilon)-f(x)\over \epsilon}\f] /// where \f$\epsilon\f$ is a constant given when calling the class /// constructor. - class ROBOPTIM_DLLAPI FiniteDifferenceGradient : public DerivableFunction + template <typename FdgPolicy> + class FiniteDifferenceGradient + : public DerivableFunction, + private FdgPolicy { public: /// \brief Instantiate a finite differences gradient. @@ -155,4 +181,5 @@ namespace roboptim } // end of namespace roboptim +# include <roboptim/core/finite-difference-gradient.hxx> #endif //! ROBOPTIM_CORE_FINITE_DIFFERENCE_GRADIENT_HH diff --git a/include/roboptim/core/finite-difference-gradient.hxx b/include/roboptim/core/finite-difference-gradient.hxx new file mode 100644 index 0000000..371c91c --- /dev/null +++ b/include/roboptim/core/finite-difference-gradient.hxx @@ -0,0 +1,62 @@ +// 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/>. + +#ifndef ROBOPTIM_CORE_FINITE_DIFFERENCE_GRADIENT_HXX +# define ROBOPTIM_CORE_FINITE_DIFFERENCE_GRADIENT_HXX + +namespace roboptim +{ + template <typename FdgPolicy> + FiniteDifferenceGradient<FdgPolicy>::FiniteDifferenceGradient (const Function& adaptee, + value_type epsilon) + throw () + : DerivableFunction (adaptee.inputSize (), adaptee.outputSize ()), + FdgPolicy (), + adaptee_ (adaptee), + epsilon_ (epsilon) + { + // Avoid meaningless values for epsilon such as 0 or NaN. + assert (epsilon != 0. && epsilon == epsilon); + } + + template <typename FdgPolicy> + FiniteDifferenceGradient<FdgPolicy>::~FiniteDifferenceGradient () throw () + { + } + + template <typename FdgPolicy> + void + FiniteDifferenceGradient<FdgPolicy>::impl_compute (result_t& result, + const argument_t& argument) + const throw () + { + adaptee_ (result, argument); + } + + template <typename FdgPolicy> + void + FiniteDifferenceGradient<FdgPolicy>::impl_gradient + (gradient_t& gradient, + const argument_t& argument, + size_type idFunction) const throw () + { + this->computeGradient (adaptee_, epsilon_, gradient, argument, idFunction); + } + +} // end of namespace roboptim + +#endif //! ROBOPTIM_CORE_FINITE_DIFFERENCE_GRADIENT_HXX diff --git a/include/roboptim/core/fwd.hh b/include/roboptim/core/fwd.hh index 5760b16..11f3d2d 100644 --- a/include/roboptim/core/fwd.hh +++ b/include/roboptim/core/fwd.hh @@ -33,6 +33,15 @@ namespace roboptim class ConstantFunction; class DerivableFunction; class DummySolver; + + namespace finiteDifferenceGradientPolicies + { + class Simple; + class FivePointsRule; + }; // end of finiteDifferenceGradientPolicies + + template <typename FdgPolicy = + finiteDifferenceGradientPolicies::FivePointsRule> class FiniteDifferenceGradient; class Function; class GenericSolver; diff --git a/src/finite-difference-gradient.cc b/src/finite-difference-gradient.cc index 8fba1e5..edc4ce1 100644 --- a/src/finite-difference-gradient.cc +++ b/src/finite-difference-gradient.cc @@ -62,31 +62,6 @@ namespace roboptim } - - FiniteDifferenceGradient::FiniteDifferenceGradient (const Function& adaptee, - value_type epsilon) - throw () - : DerivableFunction (adaptee.inputSize (), adaptee.outputSize ()), - adaptee_ (adaptee), - epsilon_ (epsilon) - { - // Avoid meaningless values for epsilon such as 0 or NaN. - assert (epsilon != 0. && epsilon == epsilon); - } - - FiniteDifferenceGradient::~FiniteDifferenceGradient () throw () - { - } - - void - FiniteDifferenceGradient::impl_compute (result_t& result, - const argument_t& argument) - const throw () - { - adaptee_ (result, argument); - } - - namespace detail { void @@ -154,54 +129,83 @@ namespace roboptim } } - void - FiniteDifferenceGradient::impl_gradient (gradient_t& gradient, - const argument_t& argument, - size_type idFunction) const throw () + namespace finiteDifferenceGradientPolicies { - assert (outputSize () - idFunction > 0); - - value_type h = epsilon_ / 2.; - value_type r_0 = 0.; - value_type round = 0.; - value_type trunc = 0.; - value_type error = 0.; - - for (unsigned j = 0; j < argument.size (); ++j) - { - detail::compute_deriv (adaptee_, j, h, - r_0, round, trunc, - argument, idFunction); - error = round + trunc; - - if (round < trunc && (round > 0 && trunc > 0)) - { - value_type r_opt = 0., round_opt = 0., trunc_opt = 0., error_opt = 0.; - - /* Compute an optimised stepsize to minimize the total error, - using the scaling of the truncation error (O(h^2)) and - rounding error (O(1/h)). */ - - value_type h_opt = - h * std::pow (round / (2. * trunc), 1. / 3.); - - detail::compute_deriv (adaptee_, j, h_opt, - r_opt, round_opt, trunc_opt, - argument, idFunction); - error_opt = round_opt + trunc_opt; - - /* Check that the new error is smaller, and that the new derivative - is consistent with the error bounds of the original estimate. */ - - if (error_opt < error && std::fabs (r_opt - r_0) < 4. * error) - { - r_0 = r_opt; - error = error_opt; - } - } - - gradient (j) = r_0; - } + void + Simple::computeGradient + (const Function& adaptee, + Function::value_type epsilon, + Function::result_t& gradient, + const Function::argument_t& argument, + Function::value_type idFunction) const throw () + { + typedef Function::value_type value_type; + assert (adaptee.outputSize () - idFunction > 0); + + Function::result_t res = adaptee (argument); + for (unsigned j = 0; j < adaptee.inputSize (); ++j) + { + Function::argument_t xEps = argument; + xEps[j] += epsilon; + Function::result_t resEps = adaptee (xEps); + gradient (j) = (resEps[idFunction] - res[idFunction]) / epsilon; + } + } + + void + FivePointsRule::computeGradient + (const Function& adaptee, + Function::value_type epsilon, + Function::result_t& gradient, + const Function::argument_t& argument, + Function::value_type idFunction) const throw () + { + typedef Function::value_type value_type; + + assert (adaptee.outputSize () - idFunction > 0); + + value_type h = epsilon / 2.; + value_type r_0 = 0.; + value_type round = 0.; + value_type trunc = 0.; + value_type error = 0.; + + for (unsigned j = 0; j < argument.size (); ++j) + { + detail::compute_deriv (adaptee, j, h, + r_0, round, trunc, + argument, idFunction); + error = round + trunc; + + if (round < trunc && (round > 0 && trunc > 0)) + { + value_type r_opt = 0., round_opt = 0., trunc_opt = 0., error_opt = 0.; + + /* Compute an optimised stepsize to minimize the total error, + using the scaling of the truncation error (O(h^2)) and + rounding error (O(1/h)). */ + + value_type h_opt = + h * std::pow (round / (2. * trunc), 1. / 3.); + + detail::compute_deriv (adaptee, j, h_opt, + r_opt, round_opt, trunc_opt, + argument, idFunction); + error_opt = round_opt + trunc_opt; + + /* Check that the new error is smaller, and that the new derivative + is consistent with the error bounds of the original estimate. */ + + if (error_opt < error && std::fabs (r_opt - r_0) < 4. * error) + { + r_0 = r_opt; + error = error_opt; + } + } + + gradient (j) = r_0; + } + } } @@ -211,7 +215,7 @@ namespace roboptim const Function::vector_t& x, Function::value_type threshold) throw () { - FiniteDifferenceGradient fdfunction (function); + FiniteDifferenceGradient<> fdfunction (function); DerivableFunction::gradient_t grad = function.gradient (x, i); DerivableFunction::gradient_t fdgrad = fdfunction.gradient (x, i); @@ -228,7 +232,7 @@ namespace roboptim Function::value_type threshold) throw (BadGradient) { - FiniteDifferenceGradient fdfunction (function); + FiniteDifferenceGradient<> fdfunction (function); DerivableFunction::gradient_t grad = function.gradient (x, i); DerivableFunction::gradient_t fdgrad = fdfunction.gradient (x, i); diff --git a/tests/finite-difference-gradient.cc b/tests/finite-difference-gradient.cc index d765a76..6ada2ed 100644 --- a/tests/finite-difference-gradient.cc +++ b/tests/finite-difference-gradient.cc @@ -151,7 +151,7 @@ displayGradient (const DerivableFunction& function, const Function::vector_t& x, int i) { - FiniteDifferenceGradient fdfunction (function); + FiniteDifferenceGradient<> fdfunction (function); DerivableFunction::gradient_t grad = function.gradient (x, i); DerivableFunction::gradient_t fdgrad = fdfunction.gradient (x, i); @@ -200,10 +200,11 @@ int run_test () Gnuplot gnuplot = Gnuplot::make_interactive_gnuplot (); - FiniteDifferenceGradient fg_fd (fg, 10.); + FiniteDifferenceGradient<> fg_fd (fg, 10.); Polynomial p; - FiniteDifferenceGradient p_fd (p, 10.); + FiniteDifferenceGradient<finiteDifferenceGradientPolicies::Simple> + p_fd (p, 10.); Function::discreteInterval_t interval (-100., 100., 1.); ----------------------------------------------------------------------- Summary of changes: ChangeLog | 14 ++ include/Makefile.am | 1 + .../roboptim/core/finite-difference-gradient.hh | 29 ++++- .../roboptim/core/finite-difference-gradient.hxx | 62 ++++++++ include/roboptim/core/fwd.hh | 9 ++ src/finite-difference-gradient.cc | 152 ++++++++++---------- tests/finite-difference-gradient.cc | 7 +- 7 files changed, 196 insertions(+), 78 deletions(-) create mode 100644 include/roboptim/core/finite-difference-gradient.hxx hooks/post-receive -- roboptim-core |
From: Thomas M. <tho...@us...> - 2009-08-30 18:34:28
|
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 4e051e05e1b1b5789c59e39d36bc7bb35f61f6d6 (commit) via 8980fa2309dd7053be886c47ea996dbc1585b56c (commit) via 0c07daf824d659fe777c8e93b02dea39ade71dee (commit) from e2128f56e085df69e40d7c502e92a6f47a75101e (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 4e051e05e1b1b5789c59e39d36bc7bb35f61f6d6 Author: Thomas Moulard <tho...@gm...> Date: Sun Aug 30 20:32:38 2009 +0900 Fix error in return type. * include/roboptim/core/derivable-function.hh: Use RobOptim size type instead of default system size type (was triggering an error with MSVC). Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 0c6d7f1..d81d8aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2009-08-30 Thomas Moulard <tho...@gm...> + Fix error in return type. + * include/roboptim/core/derivable-function.hh: Use RobOptim + size type instead of default system size type (was triggering + an error with MSVC). + +2009-08-30 Thomas Moulard <tho...@gm...> + Add Francois Keith to thanks file. * AUTHORS: Update. diff --git a/include/roboptim/core/derivable-function.hh b/include/roboptim/core/derivable-function.hh index 539ae4a..7c122da 100644 --- a/include/roboptim/core/derivable-function.hh +++ b/include/roboptim/core/derivable-function.hh @@ -76,7 +76,7 @@ namespace roboptim /// \brief Return the gradient size. /// /// Gradient size is equals to the input size. - size_t gradientSize () const throw () + size_type gradientSize () const throw () { return inputSize (); } commit 8980fa2309dd7053be886c47ea996dbc1585b56c Author: Thomas Moulard <tho...@gm...> Date: Sun Aug 30 20:28:45 2009 +0900 Add Francois Keith to thanks file. * AUTHORS: Update. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/AUTHORS b/AUTHORS index 6c3b93a..60c6e14 100644 --- a/AUTHORS +++ b/AUTHORS @@ -3,6 +3,9 @@ This package was written by and with the assistance of * Florent Lamiraux fl...@la... - Interface design. +* François Keith fra...@gm... +- Microsoft Windows / Microsoft Visual Studio support. + * Thomas Moulard tho...@gm... - Package creation. - Interface implementation. diff --git a/ChangeLog b/ChangeLog index 0d19ae2..0c6d7f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-08-30 Thomas Moulard <tho...@gm...> + Add Francois Keith to thanks file. + * AUTHORS: Update. + +2009-08-30 Thomas Moulard <tho...@gm...> + Enhance Microsoft Visual Studio solution and projects. Introduce new installation rules and add Visual Studio properties for Boost support. Compile in debug and release commit 0c07daf824d659fe777c8e93b02dea39ade71dee Author: Thomas Moulard <tho...@gm...> Date: Sun Aug 30 20:25:30 2009 +0900 Enhance Microsoft Visual Studio solution and projects. Introduce new installation rules and add Visual Studio properties for Boost support. Compile in debug and release modes. Original patch by "Keith Francois" <fra...@gm...>. * README: Add information about Microsoft Visual Studio project. * msvc/INSTALL/INSTALL.vcproj: New. * msvc/INSTALL/excludedFiles.txt: New. * msvc/roboptim-core/boost.vsprops: New. * msvc/roboptim-core/rob_opt.vsprops: New. * msvc/roboptim-core-dummy-plugin/roboptim-core-dummy-plugin.vcproj, * msvc/roboptim-core/roboptim-core.sln, * msvc/roboptim-core/roboptim-core.vcproj, * msvc/simple/simple.vcproj: Use shared options and add integrate new features. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 1e41aee..0d19ae2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2009-08-30 Thomas Moulard <tho...@gm...> + + Enhance Microsoft Visual Studio solution and projects. + Introduce new installation rules and add Visual Studio + properties for Boost support. Compile in debug and release + modes. + Original patch by "Keith Francois" <fra...@gm...>. + * README: Add information about Microsoft Visual + Studio project. + * msvc/INSTALL/INSTALL.vcproj: New. + * msvc/INSTALL/excludedFiles.txt: New. + * msvc/roboptim-core/boost.vsprops: New. + * msvc/roboptim-core/rob_opt.vsprops: New. + * msvc/roboptim-core-dummy-plugin/roboptim-core-dummy-plugin.vcproj, + * msvc/roboptim-core/roboptim-core.sln, + * msvc/roboptim-core/roboptim-core.vcproj, + * msvc/simple/simple.vcproj: Use shared options and add integrate + new features. + 2009-08-24 Thomas Moulard <tho...@gm...> Update submodules to use new SourceForge URLs. diff --git a/README b/README index 368c219..f04f6c4 100644 --- a/README +++ b/README @@ -40,3 +40,30 @@ with the environment variable ``CHECK_PREFIX''. $ export CHECK_PREFIX='valgrind --log-file=valgrind.log' $ make check + + +* Visual Studio Issues + +** How to change default installation path (RobOptim can not be found) + +Default installation path is ``C:/Libraries/roboptim''. +This can be changed in the .vsprops files placed in the folder +``msvc/roboptim-core''. + +In the Visual Project window of the project, go to ``View > Property +Manager > roboptim-core > Debug > rob_opt''. + + NB: the same property file (rob_opt.vsprops) is opened by all the 3 + projects in Debug and Release mode. + While ``opening roboptim-core > Debug > rob_opt'', you open the same + file as ``simple > Release > rob_opt''. + +Go to User Macros and modify the value of "ROB_OPTIM_INSTALL_DIR" to +the desired value. This will change the folder of install of the +project and the include/lib folder used while compiling/linking your +project. + +** I can't find Boost + +Please open the file boost.vsprops (see above), and modify the include +files in ``C/C++ > General > Additional Include Directories''. diff --git a/msvc/INSTALL/INSTALL.vcproj b/msvc/INSTALL/INSTALL.vcproj new file mode 100644 index 0000000..fc8f136 --- /dev/null +++ b/msvc/INSTALL/INSTALL.vcproj @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8,00" + Name="INSTALL" + ProjectGUID="{97411593-CAE3-4A98-BD15-41A81614C4FC}" + RootNamespace="INSTALL" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="10" + InheritedPropertySheets="..\roboptim-core\rob_opt.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="set root_directory=%ROB_OPTIM_INSTALL_DIR%

XCOPY ..\..\include %root_directory%\include /S /E /C /I /F /K /Y /EXCLUDE:excludedFiles.txt
XCOPY ..\roboptim-core\Debug\roboptim-cored.dll %root_directory%\bin\ /S /E /C /I /F /K /Y
XCOPY ..\roboptim-core\Debug\roboptim-cored.lib %root_directory%\lib\ /S /E /C /I /F /K /Y
XCOPY ..\roboptim-core\Debug\roboptim-cored.pdb %root_directory%\bin\ /S /E /C /I /F /K /Y

XCOPY ..\roboptim-core\Debug\roboptim-core-dummy-plugind.dll %root_directory%\bin\ /S /E /C /I /F /K /Y
XCOPY ..\roboptim-core\Debug\roboptim-core-dummy-plugind.pdb %root_directory%\bin\ /S /E /C /I /F /K /Y
" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="10" + InheritedPropertySheets="..\roboptim-core\rob_opt.vsprops" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="set root_directory=%ROB_OPTIM_INSTALL_DIR%

XCOPY ..\..\include %root_directory%\include /S /E /C /I /F /K /Y /EXCLUDE:excludedFiles.txt
XCOPY ..\roboptim-core\Release\roboptim-core.dll %root_directory%\bin\ /S /E /C /I /F /K /Y
XCOPY ..\roboptim-core\Release\roboptim-core-dummy-plugin.dll %root_directory%\bin\ /S /E /C /I /F /K /Y
XCOPY ..\roboptim-core\Release\roboptim-core.lib %root_directory%\lib\ /S /E /C /I /F /K /Y
" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/msvc/INSTALL/excludedFiles.txt b/msvc/INSTALL/excludedFiles.txt new file mode 100644 index 0000000..89064d2 --- /dev/null +++ b/msvc/INSTALL/excludedFiles.txt @@ -0,0 +1 @@ +.am \ No newline at end of file diff --git a/msvc/roboptim-core-dummy-plugin/roboptim-core-dummy-plugin.vcproj b/msvc/roboptim-core-dummy-plugin/roboptim-core-dummy-plugin.vcproj index 676801d..39a34cc 100644 --- a/msvc/roboptim-core-dummy-plugin/roboptim-core-dummy-plugin.vcproj +++ b/msvc/roboptim-core-dummy-plugin/roboptim-core-dummy-plugin.vcproj @@ -1,201 +1,210 @@ -<?xml version="1.0" encoding="shift_jis"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9.00" - Name="roboptim-core-dummy-plugin" - ProjectGUID="{21220FE9-892A-4D20-BC45-7697DFC5242F}" - RootNamespace="roboptimcoredummyplugin" - TargetFrameworkVersion="196613" - > - <Platforms> - <Platform - Name="Win32" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="$(SolutionDir)$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="2" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories=""$(ProjectDir)\..\..\src";"$(ProjectDir)\..\..\include";"$(ProjectDir)"" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - WarningLevel="3" - DebugInformationFormat="4" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - GenerateDebugInformation="true" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="$(SolutionDir)$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="1" - CharacterSet="2" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - EnableIntrinsicFunctions="true" - RuntimeLibrary="2" - EnableFunctionLevelLinking="true" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - GenerateDebugInformation="true" - OptimizeReferences="2" - EnableCOMDATFolding="2" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Fichiers sources" - Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath="..\..\src\roboptim-core-dummy-plugin.cc" - > - </File> - </Filter> - <Filter - Name="Fichiers d'en-tête" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - <Filter - Name="roboptim" - > - <Filter - Name="core" - > - <Filter - Name="plugin" - > - <File - RelativePath="..\..\include\roboptim\core\plugin\dummy.hh" - > - </File> - </Filter> - </Filter> - </Filter> - </Filter> - <Filter - Name="Fichiers de ressources" - Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" - > - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> +<?xml version="1.0" encoding="shift_jis"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8,00" + Name="roboptim-core-dummy-plugin" + ProjectGUID="{21220FE9-892A-4D20-BC45-7697DFC5242F}" + RootNamespace="roboptimcoredummyplugin" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="..\roboptim-core\boost.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories=""$(ProjectDir)\..\..\src";"$(ProjectDir)\..\..\include";"$(ProjectDir)"" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + WarningLevel="3" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="$(OutDir)\$(ProjectName)d.dll" + GenerateDebugInformation="true" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="..\roboptim-core\boost.vsprops" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + EnableIntrinsicFunctions="true" + AdditionalIncludeDirectories=""$(ProjectDir)\..\..\src";"$(ProjectDir)\..\..\include";"$(ProjectDir)"" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + GenerateDebugInformation="true" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Fichiers sources" + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath="..\..\src\roboptim-core-dummy-plugin.cc" + > + </File> + </Filter> + <Filter + Name="Fichiers d'en-tête" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <Filter + Name="roboptim" + > + <Filter + Name="core" + > + <Filter + Name="plugin" + > + <File + RelativePath="..\..\include\roboptim\core\plugin\dummy.hh" + > + </File> + </Filter> + </Filter> + </Filter> + </Filter> + <Filter + Name="Fichiers de ressources" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/msvc/roboptim-core/boost.vsprops b/msvc/roboptim-core/boost.vsprops new file mode 100644 index 0000000..4a2f72d --- /dev/null +++ b/msvc/roboptim-core/boost.vsprops @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioPropertySheet + ProjectType="Visual C++" + Version="8.00" + Name="boost" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories=""E:\Libraries\Boost\boost_1_36_0\include\boost-1_36";"E:\Libraries\Boost\boost_1_36_0"" + /> +</VisualStudioPropertySheet> diff --git a/msvc/roboptim-core/rob_opt.vsprops b/msvc/roboptim-core/rob_opt.vsprops new file mode 100644 index 0000000..90c3793 --- /dev/null +++ b/msvc/roboptim-core/rob_opt.vsprops @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioPropertySheet + ProjectType="Visual C++" + Version="8.00" + Name="rob_opt" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories=""${ROB_OPTIM_INSTALL_DIR}\include"" + /> + <Tool + Name="VCLinkerTool" + AdditionalLibraryDirectories=""${ROB_OPTIM_INSTALL_DIR}\lib"" + /> + <UserMacro + Name="ROB_OPTIM_INSTALL_DIR" + Value=""C:/Libraries/roboptim"" + PerformEnvironmentSet="true" + /> +</VisualStudioPropertySheet> diff --git a/msvc/roboptim-core/roboptim-core.sln b/msvc/roboptim-core/roboptim-core.sln index 389349e..40132ee 100644 --- a/msvc/roboptim-core/roboptim-core.sln +++ b/msvc/roboptim-core/roboptim-core.sln @@ -1,38 +1,46 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual C++ Express 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "roboptim-core", "roboptim-core.vcproj", "{C6C47D7F-6793-4E24-9447-2DD0BA87BE6F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "roboptim-core-dummy-plugin", "..\roboptim-core-dummy-plugin\roboptim-core-dummy-plugin.vcproj", "{21220FE9-892A-4D20-BC45-7697DFC5242F}" - ProjectSection(ProjectDependencies) = postProject - {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F} = {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple", "..\simple\simple.vcproj", "{C2F563F8-9C86-47EB-B3A9-F687D6CF62BC}" - ProjectSection(ProjectDependencies) = postProject - {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F} = {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F}.Debug|Win32.ActiveCfg = Debug|Win32 - {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F}.Debug|Win32.Build.0 = Debug|Win32 - {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F}.Release|Win32.ActiveCfg = Release|Win32 - {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F}.Release|Win32.Build.0 = Release|Win32 - {21220FE9-892A-4D20-BC45-7697DFC5242F}.Debug|Win32.ActiveCfg = Debug|Win32 - {21220FE9-892A-4D20-BC45-7697DFC5242F}.Debug|Win32.Build.0 = Debug|Win32 - {21220FE9-892A-4D20-BC45-7697DFC5242F}.Release|Win32.ActiveCfg = Release|Win32 - {21220FE9-892A-4D20-BC45-7697DFC5242F}.Release|Win32.Build.0 = Release|Win32 - {C2F563F8-9C86-47EB-B3A9-F687D6CF62BC}.Debug|Win32.ActiveCfg = Debug|Win32 - {C2F563F8-9C86-47EB-B3A9-F687D6CF62BC}.Debug|Win32.Build.0 = Debug|Win32 - {C2F563F8-9C86-47EB-B3A9-F687D6CF62BC}.Release|Win32.ActiveCfg = Release|Win32 - {C2F563F8-9C86-47EB-B3A9-F687D6CF62BC}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "roboptim-core", "roboptim-core.vcproj", "{C6C47D7F-6793-4E24-9447-2DD0BA87BE6F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "roboptim-core-dummy-plugin", "..\roboptim-core-dummy-plugin\roboptim-core-dummy-plugin.vcproj", "{21220FE9-892A-4D20-BC45-7697DFC5242F}" + ProjectSection(ProjectDependencies) = postProject + {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F} = {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple", "..\simple\simple.vcproj", "{C2F563F8-9C86-47EB-B3A9-F687D6CF62BC}" + ProjectSection(ProjectDependencies) = postProject + {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F} = {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INSTALL", "..\INSTALL\INSTALL.vcproj", "{97411593-CAE3-4A98-BD15-41A81614C4FC}" + ProjectSection(ProjectDependencies) = postProject + {21220FE9-892A-4D20-BC45-7697DFC5242F} = {21220FE9-892A-4D20-BC45-7697DFC5242F} + {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F} = {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F}.Debug|Win32.ActiveCfg = Debug|Win32 + {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F}.Debug|Win32.Build.0 = Debug|Win32 + {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F}.Release|Win32.ActiveCfg = Release|Win32 + {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F}.Release|Win32.Build.0 = Release|Win32 + {21220FE9-892A-4D20-BC45-7697DFC5242F}.Debug|Win32.ActiveCfg = Debug|Win32 + {21220FE9-892A-4D20-BC45-7697DFC5242F}.Debug|Win32.Build.0 = Debug|Win32 + {21220FE9-892A-4D20-BC45-7697DFC5242F}.Release|Win32.ActiveCfg = Release|Win32 + {21220FE9-892A-4D20-BC45-7697DFC5242F}.Release|Win32.Build.0 = Release|Win32 + {C2F563F8-9C86-47EB-B3A9-F687D6CF62BC}.Debug|Win32.ActiveCfg = Debug|Win32 + {C2F563F8-9C86-47EB-B3A9-F687D6CF62BC}.Debug|Win32.Build.0 = Debug|Win32 + {C2F563F8-9C86-47EB-B3A9-F687D6CF62BC}.Release|Win32.ActiveCfg = Release|Win32 + {C2F563F8-9C86-47EB-B3A9-F687D6CF62BC}.Release|Win32.Build.0 = Release|Win32 + {97411593-CAE3-4A98-BD15-41A81614C4FC}.Debug|Win32.ActiveCfg = Debug|Win32 + {97411593-CAE3-4A98-BD15-41A81614C4FC}.Release|Win32.ActiveCfg = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/msvc/roboptim-core/roboptim-core.vcproj b/msvc/roboptim-core/roboptim-core.vcproj index 22e754d..643d456 100644 --- a/msvc/roboptim-core/roboptim-core.vcproj +++ b/msvc/roboptim-core/roboptim-core.vcproj @@ -1,442 +1,452 @@ -<?xml version="1.0" encoding="shift_jis"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9.00" - Name="roboptim-core" - ProjectGUID="{C6C47D7F-6793-4E24-9447-2DD0BA87BE6F}" - RootNamespace="roboptimcore" - TargetFrameworkVersion="196613" - > - <Platforms> - <Platform - Name="Win32" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="$(SolutionDir)$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="2" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories=""$(ProjectDir)\..\..\src";"$(ProjectDir)\..\..\include";"$(ProjectDir)"" - PreprocessorDefinitions="BUILDING_ROBOPTIM" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - WarningLevel="3" - DebugInformationFormat="4" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - GenerateDebugInformation="true" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="$(SolutionDir)$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="1" - CharacterSet="2" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - EnableIntrinsicFunctions="true" - RuntimeLibrary="2" - EnableFunctionLevelLinking="true" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - GenerateDebugInformation="true" - OptimizeReferences="2" - EnableCOMDATFolding="2" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Fichiers sources" - Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath=".\config.h" - > - </File> - <File - RelativePath="..\..\src\constant-function.cc" - > - </File> - <File - RelativePath="..\..\src\debug.cc" - > - </File> - <File - RelativePath="..\..\src\debug.hh" - > - </File> - <File - RelativePath="..\..\src\derivable-function.cc" - > - </File> - <File - RelativePath="..\..\src\doc.hh" - > - </File> - <File - RelativePath="..\..\src\finite-difference-gradient.cc" - > - </File> - <File - RelativePath="..\..\src\function.cc" - > - </File> - <File - RelativePath="..\..\src\generic-solver.cc" - > - </File> - <File - RelativePath="..\..\src\identity-function.cc" - > - </File> - <File - RelativePath="..\..\src\indent.cc" - > - </File> - <File - RelativePath="..\..\src\linear-function.cc" - > - </File> - <File - RelativePath="..\..\src\numeric-linear-function.cc" - > - </File> - <File - RelativePath="..\..\src\numeric-quadratic-function.cc" - > - </File> - <File - RelativePath="..\..\src\quadratic-function.cc" - > - </File> - <File - RelativePath="..\..\src\result-with-warnings.cc" - > - </File> - <File - RelativePath="..\..\src\result.cc" - > - </File> - <File - RelativePath="..\..\src\solver-error.cc" - > - </File> - <File - RelativePath="..\..\src\solver-warning.cc" - > - </File> - <File - RelativePath="..\..\src\twice-derivable-function.cc" - > - </File> - <File - RelativePath="..\..\src\util.cc" - > - </File> - <Filter - Name="visualization" - > - <File - RelativePath="..\..\src\visualization\gnuplot-commands.cc" - > - </File> - <File - RelativePath="..\..\src\visualization\gnuplot.cc" - > - </File> - </Filter> - </Filter> - <Filter - Name="Fichiers d'en-tête" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - <Filter - Name="roboptim" - > - <Filter - Name="core" - > - <File - RelativePath="..\..\include\roboptim\core\constant-function.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\debug.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\derivable-function.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\derivable-parametrized-function.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\finite-difference-gradient.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\function.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\fwd.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\generic-solver.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\identity-function.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\indent.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\io.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\linear-function.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\n-times-derivable-function.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\n-times-derivable-function.hxx" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\numeric-linear-function.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\numeric-quadratic-function.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\parametrized-function.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\parametrized-function.hxx" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\portability.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\problem.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\problem.hxx" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\quadratic-function.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\result-with-warnings.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\result.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\solver-error.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\solver-factory.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\solver-factory.hxx" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\solver-warning.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\solver.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\solver.hxx" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\sys.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\twice-derivable-function.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\util.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\util.hxx" - > - </File> - <Filter - Name="visualization" - > - <File - RelativePath="..\..\include\roboptim\core\visualization\fwd.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\visualization\gnuplot-commands.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\visualization\gnuplot-function.hh" - > - </File> - <File - RelativePath="..\..\include\roboptim\core\visualization\gnuplot.hh" - > - </File> - </Filter> - </Filter> - </Filter> - </Filter> - <Filter - Name="Fichiers de ressources" - Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" - > - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> +<?xml version="1.0" encoding="shift_jis"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8,00" + Name="roboptim-core" + ProjectGUID="{C6C47D7F-6793-4E24-9447-2DD0BA87BE6F}" + RootNamespace="roboptimcore" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets=".\boost.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories=""$(ProjectDir)\..\..\src";"$(ProjectDir)\..\..\include";"$(ProjectDir)"" + PreprocessorDefinitions="BUILDING_ROBOPTIM" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + WarningLevel="3" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="$(OutDir)\$(ProjectName)d.dll" + GenerateDebugInformation="true" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets=".\boost.vsprops" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions=" /D "BUILDING_ROBOPTIM"" + Optimization="2" + EnableIntrinsicFunctions="true" + AdditionalIncludeDirectories=""$(ProjectDir)\..\..\src";"$(ProjectDir)\..\..\include";"$(ProjectDir)"" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + GenerateDebugInformation="true" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Fichiers sources" + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath=".\config.h" + > + </File> + <File + RelativePath="..\..\src\constant-function.cc" + > + </File> + <File + RelativePath="..\..\src\debug.cc" + > + </File> + <File + RelativePath="..\..\src\debug.hh" + > + </File> + <File + RelativePath="..\..\src\derivable-function.cc" + > + </File> + <File + RelativePath="..\..\src\doc.hh" + > + </File> + <File + RelativePath="..\..\src\finite-difference-gradient.cc" + > + </File> + <File + RelativePath="..\..\src\function.cc" + > + </File> + <File + RelativePath="..\..\src\generic-solver.cc" + > + </File> + <File + RelativePath="..\..\src\identity-function.cc" + > + </File> + <File + RelativePath="..\..\src\indent.cc" + > + </File> + <File + RelativePath="..\..\src\linear-function.cc" + > + </File> + <File + RelativePath="..\..\src\numeric-linear-function.cc" + > + </File> + <File + RelativePath="..\..\src\numeric-quadratic-function.cc" + > + </File> + <File + RelativePath="..\..\src\quadratic-function.cc" + > + </File> + <File + RelativePath="..\..\src\result-with-warnings.cc" + > + </File> + <File + RelativePath="..\..\src\result.cc" + > + </File> + <File + RelativePath="..\..\src\solver-error.cc" + > + </File> + <File + RelativePath="..\..\src\solver-warning.cc" + > + </File> + <File + RelativePath="..\..\src\twice-derivable-function.cc" + > + </File> + <File + RelativePath="..\..\src\util.cc" + > + </File> + <Filter + Name="visualization" + > + <File + RelativePath="..\..\src\visualization\gnuplot-commands.cc" + > + </File> + <File + RelativePath="..\..\src\visualization\gnuplot.cc" + > + </File> + </Filter> + </Filter> + <Filter + Name="Fichiers d'en-tête" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <Filter + Name="roboptim" + > + <Filter + Name="core" + > + <File + RelativePath="..\..\include\roboptim\core\constant-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\debug.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\derivable-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\derivable-parametrized-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\finite-difference-gradient.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\fwd.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\generic-solver.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\identity-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\indent.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\io.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\linear-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\n-times-derivable-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\n-times-derivable-function.hxx" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\numeric-linear-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\numeric-quadratic-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\parametrized-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\parametrized-function.hxx" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\portability.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\problem.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\problem.hxx" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\quadratic-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\result-with-warnings.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\result.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\solver-error.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\solver-factory.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\solver-factory.hxx" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\solver-warning.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\solver.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\solver.hxx" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\sys.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\twice-derivable-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\util.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\util.hxx" + > + </File> + <Filter + Name="visualization" + > + <File + RelativePath="..\..\include\roboptim\core\visualization\fwd.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\visualization\gnuplot-commands.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\visualization\gnuplot-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\visualization\gnuplot.hh" + > + </File> + </Filter> + </Filter> + </Filter> + </Filter> + <Filter + Name="Fichiers de ressources" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/msvc/simple/simple.vcproj b/msvc/simple/simple.vcproj index 8b037c4..4cbbd2c 100644 --- a/msvc/simple/simple.vcproj +++ b/msvc/simple/simple.vcproj @@ -1,193 +1,202 @@ -<?xml version="1.0" encoding="shift_jis"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9.00" - Name="simple" - ProjectGUID="{C2F563F8-9C86-47EB-B3A9-F687D6CF62BC}" - RootNamespace="simple" - TargetFrameworkVersion="196613" - > - <Platforms> - <Platform - Name="Win32" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="$(SolutionDir)$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="1" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories=""$(ProjectDir)\..\..\src";"$(ProjectDir)\..\..\include";"$(ProjectDir)\..\..\tests";"$(ProjectDir)\..\roboptim-core";"$(ProjectDir)"" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - WarningLevel="3" - DebugInformationFormat="4" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - GenerateDebugInformation="true" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="$(SolutionDir)$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="1" - CharacterSet="2" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - EnableIntrinsicFunctions="true" - RuntimeLibrary="2" - EnableFunctionLevelLinking="true" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - GenerateDebugInformation="true" - OptimizeReferences="2" - EnableCOMDATFolding="2" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Fichiers sources" - Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath="..\..\src\roboptim-core-dummy-plugin.cc" - > - </File> - <File - RelativePath="..\..\tests\simple.cc" - > - </File> - </Filter> - <Filter - Name="Fichiers d'en-tête" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - <File - RelativePath="..\..\tests\common.hh" - > - </File> - </Filter> - <Filter - Name="Fichiers de ressources" - Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" - > - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> +<?xml version="1.0" encoding="shift_jis"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8,00" + Name="simple" + ProjectGUID="{C2F563F8-9C86-47EB-B3A9-F687D6CF62BC}" + RootNamespace="simple" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + InheritedPropertySheets="..\roboptim-core\boost.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories=""$(ProjectDir)\..\..\src";"$(ProjectDir)\..\..\include";"$(ProjectDir)\..\..\tests";"$(ProjectDir)\..\roboptim-core";"$(ProjectDir)"" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + WarningLevel="3" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="$(OutDir)\$(ProjectName)d.exe" + GenerateDebugInformation="true" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + InheritedPropertySheets="..\roboptim-core\boost.vsprops" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + EnableIntrinsicFunctions="true" + AdditionalIncludeDirectories=""$(ProjectDir)\..\..\src";"$(ProjectDir)\..\..\include";"$(ProjectDir)\..\..\tests";"$(ProjectDir)\..\roboptim-core";"$(ProjectDir)"" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + GenerateDebugInformation="true" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Fichiers sources" + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath="..\..\src\roboptim-core-dummy-plugin.cc" + > + </File> + <File + RelativePath="..\..\tests\simple.cc" + > + </File> + </Filter> + <Filter + Name="Fichiers d'en-tête" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath="..\..\tests\common.hh" + > + </File> + </Filter> + <Filter + Name="Fichiers de ressources" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> ----------------------------------------------------------------------- Summary of changes: AUTHORS | 3 + ChangeLog | 31 + README | 27 + include/roboptim/core/derivable-function.hh | 2 +- msvc/INSTALL/INSTALL.vcproj | 69 ++ msvc/INSTALL/excludedFiles.txt | 1 + .../roboptim-core-dummy-plugin.vcproj | 411 +++++----- msvc/roboptim-core/boost.vsprops | 11 + msvc/roboptim-core/rob_opt.vsprops | 20 + msvc/roboptim-core/roboptim-core.sln | 84 +- msvc/roboptim-core/roboptim-core.vcproj | 894 ++++++++++---------- msvc/simple/simple.vcproj | 395 +++++----- 12 files changed, 1073 insertions(+), 875 deletions(-) create mode 100644 msvc/INSTALL/INSTALL.vcproj create mode 100644 msvc/INSTALL/excludedFiles.txt create mode 100644 msvc/roboptim-core/boost.vsprops create mode 100644 msvc/roboptim-core/rob_opt.vsprops hooks/post-receive -- roboptim-core |
From: Thomas M. <tho...@us...> - 2009-08-24 21:13:28
|
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 457e3a7c13b08437cb3d7eb3c34d9dd8ab8dfdbf (commit) via b2cba9edd264fa810db4e2c6b6f74ff0a184829b (commit) from 30e3d33bb1b890210481cbb5b8203ef71e7fcd54 (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 457e3a7c13b08437cb3d7eb3c34d9dd8ab8dfdbf Author: Thomas Moulard <tho...@gm...> Date: Mon Aug 24 23:11:56 2009 +0900 Update to new SourceForge URLs. * .gitmodules: Update to new URLs. * bootstrap: Detect new alias. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/.gitmodules b/.gitmodules index 4467d76..6e0cca4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,9 @@ [submodule "tests/shared-tests"] path = tests/shared-tests - url = sourceforge:roboptim -[submodule "doc"] - path = doc - url = sourceforge:roboptim + url = roboptim:shared-tests [submodule "build-aux"] path = build-aux - url = sourceforge:roboptim + url = roboptim:build-aux +[submodule "doc"] + path = doc + url = roboptim:doc diff --git a/ChangeLog b/ChangeLog index c989d1e..ed628fd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-08-24 Thomas Moulard <tho...@gm...> + + Update to new SourceForge URLs. + * .gitmodules: Update to new URLs. + * bootstrap: Detect new alias. + 2009-07-27 Thomas Moulard <tho...@gm...> Disable gcov support in plug-in. diff --git a/bootstrap b/bootstrap index 98280fe..4099823 100755 --- a/bootstrap +++ b/bootstrap @@ -1,5 +1,7 @@ #! /bin/sh +set -e + # Print an error message and exit. die () { @@ -8,17 +10,17 @@ die () } # Properly explain how to set up a RobOptim working directory and exit. -die_nosourceforgealias () +die_noroboptimalias () { - echo >&2 "To properly finish setting up your working directory," - echo >&2 "you need to define how RobOptim should connect to SourceForge." - echo >&2 "" - echo >&2 "If you only need read-access (which is usually what one wants):" - echo >&2 "echo '[url \"git://roboptim.git.sourceforge.net/gitroot/\"]" - echo >&2 " insteadOf = sourceforge:' >> ~/.gitconfig" - echo >&2 "" - - die "no \`\`sourceforge:'' alias in your git configuration." + echo >&2 "To properly finish setting up your working directory," + echo >&2 "you need to define how RobOptim should connect to SourceForge." + echo >&2 "" + echo >&2 "If you only need read-access (which is usually what one wants):" + echo >&2 "echo '[url \"git://roboptim.git.sourceforge.net/gitroot/roboptim/\"]" + echo >&2 " insteadOf = roboptim:' >> ~/.gitconfig" + echo >&2 "" + + die "no \`\`roboptim:'' alias in your git configuration." } # Check that git version is newer enough. @@ -48,8 +50,8 @@ if test -d ".git"; then # Url rewriting has been introduced in git 1.5.5. check_git_version "1.5.5" - if test x`git config -l | grep 'url\..*\.insteadof=sourceforge:'` = x; then - die_nosourceforgealias + if test x`git config -l | grep 'url\..*\.insteadof=roboptim:'` = x; then + die_noroboptimalias fi git submodule init commit b2cba9edd264fa810db4e2c6b6f74ff0a184829b Author: Thomas Moulard <tho...@gm...> Date: Mon Jul 27 20:58:20 2009 +0900 Disable gcov support in plug-in. * src/Makefile.am: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 21015af..c989d1e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-07-27 Thomas Moulard <tho...@gm...> + + Disable gcov support in plug-in. + * src/Makefile.am: Here. + 2009-07-02 Thomas Moulard <tho...@gm...> Handle submodule and check for git. diff --git a/src/Makefile.am b/src/Makefile.am index 9742e0d..7e227fa 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -22,3 +22,8 @@ roboptim_core_ipopt_plugin_la_LIBADD = $(ROBOPTIMCORE_LIBS) roboptim_core_ipopt_plugin_la_LIBADD += $(IPOPT_LIBS) roboptim_core_ipopt_plugin_la_LDFLAGS = -module -version-info 1:1:0 + +# Make sure one does not compile a plug-in with test coverage support as +# it seems to trigger a segv at exit. +roboptim_core_ipopt_plugin_la_CXXFLAGS = \ + `echo $(CXXFLAGS) | sed -e 's/-ftest-coverage//' -e 's/-fprofile-arcs//'` ----------------------------------------------------------------------- Summary of changes: .gitmodules | 10 +++++----- ChangeLog | 11 +++++++++++ bootstrap | 26 ++++++++++++++------------ src/Makefile.am | 5 +++++ 4 files changed, 35 insertions(+), 17 deletions(-) hooks/post-receive -- roboptim-core-plugin-ipopt |
From: Thomas M. <tho...@us...> - 2009-08-24 21:07:02
|
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 3dee62897a456441a241b29dcc27e30ca2321835 (commit) from 1adc664ea6e3abb9ed863daa215c97ecd804dfe9 (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 3dee62897a456441a241b29dcc27e30ca2321835 Author: Thomas Moulard <tho...@gm...> Date: Mon Aug 24 23:03:44 2009 +0900 Update submodules to new SourceForge URLs. * .gitmodules: Update to new URLs. * bootstrap: Detect new alias. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/.gitmodules b/.gitmodules index 6302c9e..9fff8b2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ -[submodule "doc"] - path = doc - url = sourceforge:roboptim [submodule "build-aux"] path = build-aux - url = sourceforge:roboptim + url = roboptim:build-aux +[submodule "doc"] + path = doc + url = roboptim:doc diff --git a/ChangeLog b/ChangeLog index 6dff36f..b5fbed7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-08-24 Thomas Moulard <tho...@gm...> + + Update submodules to new SourceForge URLs. + * .gitmodules: Update to new URLs. + * bootstrap: Detect new alias. + 2009-08-20 Thomas Moulard <tho...@gm...> Fix limit-omega. diff --git a/bootstrap b/bootstrap index 98280fe..4099823 100755 --- a/bootstrap +++ b/bootstrap @@ -1,5 +1,7 @@ #! /bin/sh +set -e + # Print an error message and exit. die () { @@ -8,17 +10,17 @@ die () } # Properly explain how to set up a RobOptim working directory and exit. -die_nosourceforgealias () +die_noroboptimalias () { - echo >&2 "To properly finish setting up your working directory," - echo >&2 "you need to define how RobOptim should connect to SourceForge." - echo >&2 "" - echo >&2 "If you only need read-access (which is usually what one wants):" - echo >&2 "echo '[url \"git://roboptim.git.sourceforge.net/gitroot/\"]" - echo >&2 " insteadOf = sourceforge:' >> ~/.gitconfig" - echo >&2 "" - - die "no \`\`sourceforge:'' alias in your git configuration." + echo >&2 "To properly finish setting up your working directory," + echo >&2 "you need to define how RobOptim should connect to SourceForge." + echo >&2 "" + echo >&2 "If you only need read-access (which is usually what one wants):" + echo >&2 "echo '[url \"git://roboptim.git.sourceforge.net/gitroot/roboptim/\"]" + echo >&2 " insteadOf = roboptim:' >> ~/.gitconfig" + echo >&2 "" + + die "no \`\`roboptim:'' alias in your git configuration." } # Check that git version is newer enough. @@ -48,8 +50,8 @@ if test -d ".git"; then # Url rewriting has been introduced in git 1.5.5. check_git_version "1.5.5" - if test x`git config -l | grep 'url\..*\.insteadof=sourceforge:'` = x; then - die_nosourceforgealias + if test x`git config -l | grep 'url\..*\.insteadof=roboptim:'` = x; then + die_noroboptimalias fi git submodule init ----------------------------------------------------------------------- Summary of changes: .gitmodules | 8 ++++---- ChangeLog | 6 ++++++ bootstrap | 26 ++++++++++++++------------ 3 files changed, 24 insertions(+), 16 deletions(-) hooks/post-receive -- roboptim-trajectory |
From: Thomas M. <tho...@us...> - 2009-08-24 21:01: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". The branch, master has been updated via e2128f56e085df69e40d7c502e92a6f47a75101e (commit) from 720a3fa9b5f2fe20093ffb64ee1d03c062ac2c2e (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 e2128f56e085df69e40d7c502e92a6f47a75101e Author: Thomas Moulard <tho...@gm...> Date: Mon Aug 24 23:00:53 2009 +0900 Update submodules to use new SourceForge URLs. * .gitmodules: Update to new URLs. * bootstrap: Detect new alias. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/.gitmodules b/.gitmodules index 6302c9e..9fff8b2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ -[submodule "doc"] - path = doc - url = sourceforge:roboptim [submodule "build-aux"] path = build-aux - url = sourceforge:roboptim + url = roboptim:build-aux +[submodule "doc"] + path = doc + url = roboptim:doc diff --git a/ChangeLog b/ChangeLog index bb8e050..1e41aee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-08-24 Thomas Moulard <tho...@gm...> + + Update submodules to use new SourceForge URLs. + * .gitmodules: Update to new URLs. + * bootstrap: Detect new alias. + 2009-08-18 Thomas Moulard <tho...@gm...> Display if constraints are satisfied or not when outputing a problem. diff --git a/bootstrap b/bootstrap index 98280fe..4099823 100755 --- a/bootstrap +++ b/bootstrap @@ -1,5 +1,7 @@ #! /bin/sh +set -e + # Print an error message and exit. die () { @@ -8,17 +10,17 @@ die () } # Properly explain how to set up a RobOptim working directory and exit. -die_nosourceforgealias () +die_noroboptimalias () { - echo >&2 "To properly finish setting up your working directory," - echo >&2 "you need to define how RobOptim should connect to SourceForge." - echo >&2 "" - echo >&2 "If you only need read-access (which is usually what one wants):" - echo >&2 "echo '[url \"git://roboptim.git.sourceforge.net/gitroot/\"]" - echo >&2 " insteadOf = sourceforge:' >> ~/.gitconfig" - echo >&2 "" - - die "no \`\`sourceforge:'' alias in your git configuration." + echo >&2 "To properly finish setting up your working directory," + echo >&2 "you need to define how RobOptim should connect to SourceForge." + echo >&2 "" + echo >&2 "If you only need read-access (which is usually what one wants):" + echo >&2 "echo '[url \"git://roboptim.git.sourceforge.net/gitroot/roboptim/\"]" + echo >&2 " insteadOf = roboptim:' >> ~/.gitconfig" + echo >&2 "" + + die "no \`\`roboptim:'' alias in your git configuration." } # Check that git version is newer enough. @@ -48,8 +50,8 @@ if test -d ".git"; then # Url rewriting has been introduced in git 1.5.5. check_git_version "1.5.5" - if test x`git config -l | grep 'url\..*\.insteadof=sourceforge:'` = x; then - die_nosourceforgealias + if test x`git config -l | grep 'url\..*\.insteadof=roboptim:'` = x; then + die_noroboptimalias fi git submodule init ----------------------------------------------------------------------- Summary of changes: .gitmodules | 8 ++++---- ChangeLog | 6 ++++++ bootstrap | 26 ++++++++++++++------------ 3 files changed, 24 insertions(+), 16 deletions(-) hooks/post-receive -- roboptim-core |
From: Thomas M. <tho...@us...> - 2009-08-24 20:38:58
|
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 "shared-tests". The branch, master has been created at a566f94bbf6a9f315e35a982b6b682f91e2b01a1 (commit) - Log ----------------------------------------------------------------- commit a566f94bbf6a9f315e35a982b6b682f91e2b01a1 Author: Thomas Moulard <tho...@gm...> Date: Wed Jul 1 16:53:10 2009 +0900 Create separate shared-tests branch. * build-aux/autotest.at: Remove. * build-aux/autotest.mk: Remove. * build-aux/boost.m4: Remove. * build-aux/bootstrap: Remove. * build-aux/config.guess: Remove. * build-aux/config.sub: Remove. * build-aux/deb.mk: Remove. * build-aux/depcomp: Remove. * build-aux/doxygen.m4: Remove. * build-aux/ebuild.mk: Remove. * build-aux/init.mk: Remove. * build-aux/install-sh: Remove. * build-aux/libtool.m4: Remove. * build-aux/ltmain.sh: Remove. * build-aux/ltoptions.m4: Remove. * build-aux/ltsugar.m4: Remove. * build-aux/ltversion.m4: Remove. * build-aux/lt~obsolete.m4: Remove. * build-aux/missing: Remove. * build-aux/move-if-change: Remove. * build-aux/pkg-config.mk: Remove. * build-aux/pkg-config.pc.in: Remove. * build-aux/roboptim-core.m4: Remove. * build-aux/rpm.mk: Remove. * build-aux/warning.m4: Remove. * doc/Doxyfile.in: Remove. * doc/Makefile.am: Remove. * doc/Makefile.in: Remove. * doc/doxygen.css: Remove. * doc/footer.html: Remove. * doc/header.html: Remove. * doc/package.css: Remove. * doc/sf-upload.sh.in: Remove. * doc/tabs.css: Remove. * hs071.hh: Rename from optimization-tests/hs071.hh. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index a14ed04..fa378ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,42 @@ +2009-07-01 Thomas Moulard <tho...@gm...> + + Create separate shared-tests branch. + * build-aux/autotest.at: Remove. + * build-aux/autotest.mk: Remove. + * build-aux/boost.m4: Remove. + * build-aux/bootstrap: Remove. + * build-aux/config.guess: Remove. + * build-aux/config.sub: Remove. + * build-aux/deb.mk: Remove. + * build-aux/depcomp: Remove. + * build-aux/doxygen.m4: Remove. + * build-aux/ebuild.mk: Remove. + * build-aux/init.mk: Remove. + * build-aux/install-sh: Remove. + * build-aux/libtool.m4: Remove. + * build-aux/ltmain.sh: Remove. + * build-aux/ltoptions.m4: Remove. + * build-aux/ltsugar.m4: Remove. + * build-aux/ltversion.m4: Remove. + * build-aux/lt~obsolete.m4: Remove. + * build-aux/missing: Remove. + * build-aux/move-if-change: Remove. + * build-aux/pkg-config.mk: Remove. + * build-aux/pkg-config.pc.in: Remove. + * build-aux/roboptim-core.m4: Remove. + * build-aux/rpm.mk: Remove. + * build-aux/warning.m4: Remove. + * doc/Doxyfile.in: Remove. + * doc/Makefile.am: Remove. + * doc/Makefile.in: Remove. + * doc/doxygen.css: Remove. + * doc/footer.html: Remove. + * doc/header.html: Remove. + * doc/package.css: Remove. + * doc/sf-upload.sh.in: Remove. + * doc/tabs.css: Remove. + * hs071.hh: Rename from optimization-tests/hs071.hh. + 2009-06-26 Thomas Moulard <tho...@gm...> Add titles to function. diff --git a/build-aux/autotest.at b/build-aux/autotest.at deleted file mode 100644 index 75485ee..0000000 --- a/build-aux/autotest.at +++ /dev/null @@ -1,63 +0,0 @@ -# -*-Autoconf-*- -# 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 General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Additional permission under section 7 of the GNU General Public -# License, version 3 ("GPLv3"): -# -# If you convey this file as part of a work that contains a -# configuration script generated by Autoconf, you may do so under -# terms of your choice. -# -# 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with roboptim. If not, see <http://www.gnu.org/licenses/>. - -# serial 1 - -m4_pattern_forbid([^CHECK_STDOUT]) - - -# CHECK_STDOUT(BINARY, [DESCRIPTION], -# [SKIP_EXPR = false], [XFAIL_EXPR = false]) -# -------------------------------------------------------------- -# Check against a ``.stdout'' file. -# If the binary can not be built, the test is skipped. -# BINARY: the binary that has to be runned. -# DESCRIPTION: test's description. -# SKIP_EXPR: if shell expression evalutes to true, skip test. -# XFAIL_EXPR: if shell expression evalutes to true, tag test as xfail. -m4_define([CHECK_STDOUT], -[m4_ifset ([$1], [], - [m4_fatal([CHECK_STDOUT has be called with at least one argument])]) -AT_SETUP([m4_default([$2], [Unnamed test])]) - -AT_CHECK([if m4_default([$3], [false]); then - exit 77; else - true; fi], [0], [ignore], [ignore]) - -AT_XFAIL_IF([m4_default([$4], [false])]) -cp $abs_srcdir/$1.stdout expout -AT_CHECK([$CHECK_PREFIX `which $1`], [0], [expout], [ignore]) - -AT_CLEANUP -]) # CHECK_STDOUT - - -# CHECK_STDOUT_SKIP(BINARY, [DESCRIPTION], [XFAIL_EXPR]) -# -------------------------------------------------------------- -# Do a CHECK_STDOUT if the BINARY exists (is in the path). -m4_define([CHECK_STDOUT_SKIPPABLE], -[CHECK_STDOUT([$1], [$2], [test x`which $1` = x], [$3]) -]) # CHECK_STDOUT_SKIP - -# End of autotest.at diff --git a/build-aux/autotest.mk b/build-aux/autotest.mk deleted file mode 100644 index 1308305..0000000 --- a/build-aux/autotest.mk +++ /dev/null @@ -1,87 +0,0 @@ -# -*-Automake-*- -# 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 General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Additional permission under section 7 of the GNU General Public -# License, version 3 ("GPLv3"): -# -# If you convey this file as part of a work that contains a -# configuration script generated by Autoconf, you may do so under -# terms of your choice. -# -# 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with roboptim. If not, see <http://www.gnu.org/licenses/>. - -# -------# -# README # -# -------# - -# This file should be included in Makefile.am associated to a directory which -# contains an Autotest test suite. -# -# This file assumes that: -# -# - you include *before* this file init.mk or make sure that any global -# variable can be used with the += syntax. -# - package.m4 is located in $(top_builddir)/tests -# - you provide atlocal and testsuite.at files (see Autotest -# documentation in the Autoconf manual). -# - you define TESTSUITE_AT which contains the list of the .at files -# included by this test suite. - - -# -----# -# TODO # -# -----# - -# - Make it more generic. - - -# Define how autom4te is called to generate the testsuite file. -AUTOTEST = $(AUTOM4TE) --language=autotest -Wall - -# Package following files. -EXTRA_DIST += atlocal testsuite.at $(TESTSUITE) $(TESTSUITE_AT) - -# Run testsuite in this directory. -TESTSUITE = $(srcdir)/testsuite - -# Define where package.m4.in is located. -PACKAGE_M4_IN=$(top_srcdir)/tests/package.m4.in - -# Define m4 dependencies. -TESTSUITE_AT = $(top_srcdir)/build-aux/autotest.at - - -# ----- # -# RULES # -# ----- # - -check-local: atconfig atlocal $(TESTSUITE) - $(SHELL) $(TESTSUITE) $(TESTSUITEFLAGS) - -installcheck-local: atconfig atlocal $(TESTSUITE) - $(SHELL) $(TESTSUITE) AUTOTEST_PATH="$(bindir)" $(TESTSUITEFLAGS) - -clean-local: - test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean - rm -f -r autom4te.cache - -$(TESTSUITE): $(PACKAGE_M4_IN) $(srcdir)/testsuite.at $(TESTSUITE_AT) \ - $(top_srcdir)/configure - $(AUTOTEST) -I'$(srcdir)' -I'$(top_srcdir)/build-aux' \ - -I'$(top_builddir)/tests' $@.at -o $@.tmp - mv $@.tmp $@ - -atconfig: $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status tests/$@ diff --git a/build-aux/boost.m4 b/build-aux/boost.m4 deleted file mode 100644 index a9fc46c..0000000 --- a/build-aux/boost.m4 +++ /dev/null @@ -1,933 +0,0 @@ -# boost.m4: Locate Boost headers and libraries for autoconf-based projects. -# Copyright (C) 2007, 2008, 2009 Benoit Sigoure <ts...@lr...> -# -# 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 -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Additional permission under section 7 of the GNU General Public -# License, version 3 ("GPLv3"): -# -# If you convey this file as part of a work that contains a -# configuration script generated by Autoconf, you may do so under -# terms of your choice. -# -# This program 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -# serial 10 -# Original sources can be found at http://repo.or.cz/w/boost.m4.git -# You can fetch the latest version of the script by doing: -# wget 'http://repo.or.cz/w/boost.m4.git?a=blob_plain;f=build-aux/boost.m4;hb=HEAD' -O boost.m4 - -# ------ # -# README # -# ------ # - -# This file provides several macros to use the various Boost libraries. -# The first macro is BOOST_REQUIRE. It will simply check if it's possible to -# find the Boost headers of a given (optional) minimum version and it will -# define BOOST_CPPFLAGS accordingly. It will add an option --with-boost to -# your configure so that users can specify non standard locations. -# If the user's environment contains BOOST_ROOT and --with-boost was not -# specified, --with-boost=$BOOST_ROOT is implicitly used. -# For more README and documentation, go to http://repo.or.cz/w/boost.m4.git -# Note: THESE MACROS ASSUME THAT YOU USE LIBTOOL. If you don't, don't worry, -# simply read the README, it will show you what to do step by step. - -m4_pattern_forbid([^_?BOOST_]) - - -# _BOOST_SED_CPP(SED-PROGRAM, PROGRAM, -# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# -------------------------------------------------------- -# Same as AC_EGREP_CPP, but leave the result in conftest.i. -# PATTERN is *not* overquoted, as in AC_EGREP_CPP. It could be useful -# to turn this into a macro which extracts the value of any macro. -m4_define([_BOOST_SED_CPP], -[AC_LANG_PREPROC_REQUIRE()dnl -AC_REQUIRE([AC_PROG_SED])dnl -AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])]) -AS_IF([dnl eval is necessary to expand ac_cpp. -dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell. -(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | - $SED -n -e "$1" >conftest.i 2>&1], - [$3], - [$4])dnl -rm -f conftest* -])# AC_EGREP_CPP - - - -# BOOST_REQUIRE([VERSION]) -# ------------------------ -# Look for Boost. If version is given, it must either be a literal of the form -# "X.Y.Z" where X, Y and Z are integers (the ".Z" part being optional) or a -# variable "$var". -# Defines the value BOOST_CPPFLAGS. This macro only checks for headers with -# the required version, it does not check for any of the Boost libraries. -# FIXME: Add a 2nd optional argument so that it's not fatal if Boost isn't found -# and add an AC_DEFINE to tell whether HAVE_BOOST. -AC_DEFUN([BOOST_REQUIRE], -[boost_save_IFS=$IFS -boost_version_req="$1" -IFS=. -set x $boost_version_req 0 0 0 -IFS=$boost_save_IFS -shift -boost_version_req=`expr "$[1]" '*' 100000 + "$[2]" '*' 100 + "$[3]"` -AC_ARG_WITH([boost], - [AS_HELP_STRING([--with-boost=DIR], - [prefix of Boost $1 @<:@guess@:>@])])dnl -AC_ARG_VAR([BOOST_ROOT],[Location of Boost installation])dnl -# If BOOST_ROOT is set and the user has not provided a value to -# --with-boost, then treat BOOST_ROOT as if it the user supplied it. -if test x"$BOOST_ROOT" != x; then - if test x"$with_boost" = x; then - AC_MSG_NOTICE([Detected BOOST_ROOT; continuing with --with-boost=$BOOST_ROOT]) - with_boost=$BOOST_ROOT - else - AC_MSG_NOTICE([Detected BOOST_ROOT=$BOOST_ROOT, but overridden by --with-boost=$with_boost]) - fi -fi -AC_SUBST([DISTCHECK_CONFIGURE_FLAGS], - ["$DISTCHECK_CONFIGURE_FLAGS '--with-boost=$with_boost'"]) -boost_save_CPPFLAGS=$CPPFLAGS - AC_CACHE_CHECK([for Boost headers version >= $boost_version_req], - [boost_cv_inc_path], - [boost_cv_inc_path=no -AC_LANG_PUSH([C++])dnl -m4_pattern_allow([^BOOST_VERSION$])dnl - AC_LANG_CONFTEST([AC_LANG_PROGRAM([[#include <boost/version.hpp> -#if !defined BOOST_VERSION -# error BOOST_VERSION is not defined -#elif BOOST_VERSION < $boost_version_req -# error Boost headers version < $boost_version_req -#endif -]])]) - # If the user provided a value to --with-boost, use it and only it. - case $with_boost in #( - ''|yes) set x '' /opt/local/include /usr/local/include /opt/include \ - /usr/include C:/Boost/include;; #( - *) set x "$with_boost/include" "$with_boost";; - esac - shift - for boost_dir - do - # Without --layout=system, Boost (or at least some versions) installs - # itself in <prefix>/include/boost-<version>. This inner loop helps to - # find headers in such directories. - # I didn't indent this loop on purpose (to avoid over-indented code) - for boost_inc in "$boost_dir" "$boost_dir"/boost-* - do - test x"$boost_inc" != x && CPPFLAGS="$CPPFLAGS -I$boost_inc" - AC_COMPILE_IFELSE([], [boost_cv_inc_path=yes], [boost_cv_version=no]) - if test x"$boost_cv_inc_path" = xyes; then - if test x"$boost_inc" != x; then - boost_cv_inc_path=$boost_inc - fi - break 2 - fi - done - done -AC_LANG_POP([C++])dnl - ]) - case $boost_cv_inc_path in #( - no) AC_MSG_ERROR([cannot find Boost headers version >= $boost_version_req]);;#( - yes) BOOST_CPPFLAGS=;;#( - *) AC_SUBST([BOOST_CPPFLAGS], ["-I$boost_cv_inc_path"]);; - esac - AC_CACHE_CHECK([for Boost's header version], - [boost_cv_lib_version], - [m4_pattern_allow([^BOOST_LIB_VERSION$])dnl - _BOOST_SED_CPP([/^boost-lib-version = /{s///;s/\"//g;p;g;}], - [#include <boost/version.hpp> -boost-lib-version = BOOST_LIB_VERSION], - [boost_cv_lib_version=`cat conftest.i`])]) - # e.g. "134" for 1_34_1 or "135" for 1_35 - boost_major_version=`echo "$boost_cv_lib_version" | sed 's/_//;s/_.*//'` - case $boost_major_version in #( - '' | *[[!0-9]]*) - AC_MSG_ERROR([Invalid value: boost_major_version=$boost_major_version]) - ;; - esac -CPPFLAGS=$boost_save_CPPFLAGS -])# BOOST_REQUIRE - -# BOOST_STATIC() -# -------------- -# Add the "--enable-static-boost" configure argument. If this argument is given -# on the command line, static versions of the libraries will be looked up. -AC_DEFUN([BOOST_STATIC], - [AC_ARG_ENABLE([static-boost], - [AC_HELP_STRING([--enable-static-boost], - [Prefer the static boost libraries over the shared ones [no]])], - [enable_static_boost=yes], - [enable_static_boost=no])])# BOOST_STATIC - -# BOOST_FIND_HEADER([HEADER-NAME], [ACTION-IF-NOT-FOUND], [ACTION-IF-FOUND]) -# -------------------------------------------------------------------------- -# Wrapper around AC_CHECK_HEADER for Boost headers. Useful to check for -# some parts of the Boost library which are only made of headers and don't -# require linking (such as Boost.Foreach). -# -# Default ACTION-IF-NOT-FOUND: Fail with a fatal error. -# -# Default ACTION-IF-FOUND: define the preprocessor symbol HAVE_<HEADER-NAME> in -# case of success # (where HEADER-NAME is written LIKE_THIS, e.g., -# HAVE_BOOST_FOREACH_HPP). -AC_DEFUN([BOOST_FIND_HEADER], -[AC_REQUIRE([BOOST_REQUIRE])dnl -AC_LANG_PUSH([C++])dnl -boost_save_CPPFLAGS=$CPPFLAGS -CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" -AC_CHECK_HEADER([$1], - [m4_default([$3], [AC_DEFINE(AS_TR_CPP([HAVE_$1]), [1], - [Define to 1 if you have <$1>])])], - [m4_default([$2], [AC_MSG_ERROR([cannot find $1])])]) -CPPFLAGS=$boost_save_CPPFLAGS -AC_LANG_POP([C++])dnl -])# BOOST_FIND_HEADER - - -# BOOST_FIND_LIB([LIB-NAME], [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST], -# [CXX-PROLOGUE]) -# ------------------------------------------------------------------------- -# Look for the Boost library LIB-NAME (e.g., LIB-NAME = `thread', for -# libboost_thread). Check that HEADER-NAME works and check that -# libboost_LIB-NAME can link with the code CXX-TEST. The optional argument -# CXX-PROLOGUE can be used to include some C++ code before the `main' -# function. -# -# Invokes BOOST_FIND_HEADER([HEADER-NAME]) (see above). -# -# Boost libraries typically come compiled with several flavors (with different -# runtime options) so PREFERRED-RT-OPT is the preferred suffix. A suffix is one -# or more of the following letters: sgdpn (in that order). s = static -# runtime, d = debug build, g = debug/diagnostic runtime, p = STLPort build, -# n = (unsure) STLPort build without iostreams from STLPort (it looks like `n' -# must always be used along with `p'). Additionally, PREFERRED-RT-OPT can -# start with `mt-' to indicate that there is a preference for multi-thread -# builds. Some sample values for PREFERRED-RT-OPT: (nothing), mt, d, mt-d, gdp -# ... If you want to make sure you have a specific version of Boost -# (eg, >= 1.33) you *must* invoke BOOST_REQUIRE before this macro. -AC_DEFUN([BOOST_FIND_LIB], -[AC_REQUIRE([_BOOST_FIND_COMPILER_TAG])dnl -AC_REQUIRE([BOOST_REQUIRE])dnl -AC_REQUIRE([BOOST_STATIC])dnl -AC_REQUIRE([_BOOST_GUESS_WHETHER_TO_USE_MT])dnl -AC_LANG_PUSH([C++])dnl -AS_VAR_PUSHDEF([Boost_lib], [boost_cv_lib_$1])dnl -AS_VAR_PUSHDEF([Boost_lib_LDFLAGS], [boost_cv_lib_$1_LDFLAGS])dnl -AS_VAR_PUSHDEF([Boost_lib_LIBS], [boost_cv_lib_$1_LIBS])dnl -BOOST_FIND_HEADER([$3]) -boost_save_CPPFLAGS=$CPPFLAGS -CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" -# Now let's try to find the library. The algorithm is as follows: first look -# for a given library name according to the user's PREFERRED-RT-OPT. For each -# library name, we prefer to use the ones that carry the tag (toolset name). -# Each library is searched through the various standard paths were Boost is -# usually installed. If we can't find the standard variants, we try to -# enforce -mt (for instance on MacOSX, libboost_threads.dylib doesn't exist -# but there's -obviously- libboost_threads-mt.dylib). -AC_CACHE_CHECK([for the Boost $1 library], [Boost_lib], - [Boost_lib=no - case "$2" in #( - mt | mt-) boost_mt=-mt; boost_rtopt=;; #( - mt* | mt-*) boost_mt=-mt; boost_rtopt=`expr "X$2" : 'Xmt-*\(.*\)'`;; #( - *) boost_mt=; boost_rtopt=$2;; - esac - if test $enable_static_boost = yes; then - boost_rtopt="s$boost_rtopt" - fi - # Find the proper debug variant depending on what we've been asked to find. - case $boost_rtopt in #( - *d*) boost_rt_d=$boost_rtopt;; #( - *[[sgpn]]*) # Insert the `d' at the right place (in between `sg' and `pn') - boost_rt_d=`echo "$boost_rtopt" | sed 's/\(s*g*\)\(p*n*\)/\1\2/'`;; #( - *) boost_rt_d='-d';; - esac - # If the PREFERRED-RT-OPT are not empty, prepend a `-'. - test -n "$boost_rtopt" && boost_rtopt="-$boost_rtopt" - $boost_guess_use_mt && boost_mt=-mt - # Look for the abs path the static archive. - # $libext is computed by Libtool but let's make sure it's non empty. - test -z "$libext" && - AC_MSG_ERROR([the libext variable is empty, did you invoke Libtool?]) - boost_save_ac_objext=$ac_objext - # Generate the test file. - AC_LANG_CONFTEST([AC_LANG_PROGRAM([#include <$3> -$5], [$4])]) -dnl Optimization hacks: compiling C++ is slow, especially with Boost. What -dnl we're trying to do here is guess the right combination of link flags -dnl (LIBS / LDFLAGS) to use a given library. This can take several -dnl iterations before it succeeds and is thus *very* slow. So what we do -dnl instead is that we compile the code first (and thus get an object file, -dnl typically conftest.o). Then we try various combinations of link flags -dnl until we succeed to link conftest.o in an executable. The problem is -dnl that the various TRY_LINK / COMPILE_IFELSE macros of Autoconf always -dnl remove all the temporary files including conftest.o. So the trick here -dnl is to temporarily change the value of ac_objext so that conftest.o is -dnl preserved accross tests. This is obviously fragile and I will burn in -dnl hell for not respecting Autoconf's documented interfaces, but in the -dnl mean time, it optimizes the macro by a factor of 5 to 30. -dnl Another small optimization: the first argument of AC_COMPILE_IFELSE left -dnl empty because the test file is generated only once above (before we -dnl start the for loops). - AC_COMPILE_IFELSE([], - [ac_objext=do_not_rm_me_plz], - [AC_MSG_ERROR([Cannot compile a test that uses Boost $1])]) - ac_objext=$boost_save_ac_objext - boost_failed_libs= -# Don't bother to ident the 6 nested for loops, only the 2 innermost ones -# matter. -for boost_tag_ in -$boost_cv_lib_tag ''; do -for boost_ver_ in -$boost_cv_lib_version ''; do -for boost_mt_ in $boost_mt -mt ''; do -for boost_rtopt_ in $boost_rtopt '' -d; do - for boost_lib in \ - boost_$1$boost_tag_$boost_mt_$boost_rtopt_$boost_ver_ \ - boost_$1$boost_tag_$boost_rtopt_$boost_ver_ \ - boost_$1$boost_tag_$boost_mt_$boost_ver_ \ - boost_$1$boost_tag_$boost_ver_ - do - # Avoid testing twice the same lib - case $boost_failed_libs in #( - *@$boost_lib@*) continue;; - esac - # If with_boost is empty, we'll search in /lib first, which is not quite - # right so instead we'll try to a location based on where the headers are. - boost_tmp_lib=$with_boost - test x"$with_boost" = x && boost_tmp_lib=${boost_cv_inc_path%/include} - for boost_ldpath in "$boost_tmp_lib/lib" '' \ - /opt/local/lib /usr/local/lib /opt/lib /usr/lib \ - "$with_boost" C:/Boost/lib /lib /usr/lib64 /lib64 - do - test -e "$boost_ldpath" || continue - boost_save_LDFLAGS=$LDFLAGS - # Are we looking for a static library? - case $boost_ldpath:$boost_rtopt_ in #( - *?*:*s*) # Yes (Non empty boost_ldpath + s in rt opt) - Boost_lib_LIBS="$boost_ldpath/lib$boost_lib.$libext" - test -e "$Boost_lib_LIBS" || continue;; #( - *) # No: use -lboost_foo to find the shared library. - Boost_lib_LIBS="-l$boost_lib";; - esac - boost_save_LIBS=$LIBS - LIBS="$Boost_lib_LIBS $LIBS" - test x"$boost_ldpath" != x && LDFLAGS="$LDFLAGS -L$boost_ldpath" -dnl First argument of AC_LINK_IFELSE left empty because the test file is -dnl generated only once above (before we start the for loops). - _BOOST_AC_LINK_IFELSE([], - [Boost_lib=yes], [Boost_lib=no]) - ac_objext=$boost_save_ac_objext - LDFLAGS=$boost_save_LDFLAGS - LIBS=$boost_save_LIBS - if test x"$Boost_lib" = xyes; then - Boost_lib_LDFLAGS="-L$boost_ldpath -R$boost_ldpath" - break 6 - else - boost_failed_libs="$boost_failed_libs@$boost_lib@" - fi - done - done -done -done -done -done -rm -f conftest.$ac_objext -]) -case $Boost_lib in #( - no) AC_MSG_ERROR([Could not find the flags to link with Boost $1]) - ;; -esac -AC_SUBST(AS_TR_CPP([BOOST_$1_LDFLAGS]), [$Boost_lib_LDFLAGS]) -AC_SUBST(AS_TR_CPP([BOOST_$1_LIBS]), [$Boost_lib_LIBS]) -CPPFLAGS=$boost_save_CPPFLAGS -AS_VAR_POPDEF([Boost_lib])dnl -AS_VAR_POPDEF([Boost_lib_LDFLAGS])dnl -AS_VAR_POPDEF([Boost_lib_LIBS])dnl -AC_LANG_POP([C++])dnl -])# BOOST_FIND_LIB - - -# --------------------------------------- # -# Checks for the various Boost libraries. # -# --------------------------------------- # - -# List of boost libraries: http://www.boost.org/libs/libraries.htm -# The page http://beta.boost.org/doc/libs is useful: it gives the first release -# version of each library (among other things). - - -# BOOST_ASIO() -# ------------ -# Look for Boost.Asio (new in Boost 1.35). -AC_DEFUN([BOOST_ASIO], -[AC_REQUIRE([BOOST_SYSTEM])dnl -BOOST_FIND_HEADER([boost/asio.hpp])]) - - -# BOOST_BIND() -# ------------ -# Look for Boost.Bind -AC_DEFUN([BOOST_BIND], -[BOOST_FIND_HEADER([boost/bind.hpp])]) - - -# BOOST_CONVERSION() -# ------------------ -# Look for Boost.Conversion (cast / lexical_cast) -AC_DEFUN([BOOST_CONVERSION], -[BOOST_FIND_HEADER([boost/cast.hpp]) -BOOST_FIND_HEADER([boost/lexical_cast.hpp]) -])# BOOST_CONVERSION - - -# BOOST_DATE_TIME([PREFERRED-RT-OPT]) -# ----------------------------------- -# Look for Boost.Date_Time. For the documentation of PREFERRED-RT-OPT, see the -# documentation of BOOST_FIND_LIB above. -AC_DEFUN([BOOST_DATE_TIME], -[BOOST_FIND_LIB([date_time], [$1], - [boost/date_time/posix_time/posix_time.hpp], - [boost::posix_time::ptime t;]) -])# BOOST_DATE_TIME - - -# BOOST_FILESYSTEM([PREFERRED-RT-OPT]) -# ------------------------------------ -# Look for Boost.Filesystem. For the documentation of PREFERRED-RT-OPT, see -# the documentation of BOOST_FIND_LIB above. -# Do not check for boost/filesystem.hpp because this file was introduced in -# 1.34. -AC_DEFUN([BOOST_FILESYSTEM], -[# Do we have to check for Boost.System? This link-time dependency was -# added as of 1.35.0. If we have a version <1.35, we must not attempt to -# find Boost.System as it didn't exist by then. -if test $boost_major_version -ge 135; then -BOOST_SYSTEM([$1]) -fi # end of the Boost.System check. -boost_filesystem_save_LIBS=$LIBS -boost_filesystem_save_LDFLAGS=$LDFLAGS -m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl -LIBS="$LIBS $BOOST_SYSTEM_LIBS" -LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS" -BOOST_FIND_LIB([filesystem], [$1], - [boost/filesystem/path.hpp], [boost::filesystem::path p;]) -LIBS=$boost_filesystem_save_LIBS -LDFLAGS=$boost_filesystem_save_LDFLAGS -])# BOOST_FILESYSTEM - - -# BOOST_FOREACH() -# --------------- -# Look for Boost.Foreach -AC_DEFUN([BOOST_FOREACH], -[BOOST_FIND_HEADER([boost/foreach.hpp])]) - - -# BOOST_FORMAT() -# -------------- -# Look for Boost.Format -# Note: we can't check for boost/format/format_fwd.hpp because the header isn't -# standalone. It can't be compiled because it triggers the following error: -# boost/format/detail/config_macros.hpp:88: error: 'locale' in namespace 'std' -# does not name a type -AC_DEFUN([BOOST_FORMAT], -[BOOST_FIND_HEADER([boost/format.hpp])]) - - -# BOOST_FUNCTION() -# ---------------- -# Look for Boost.Function -AC_DEFUN([BOOST_FUNCTION], -[BOOST_FIND_HEADER([boost/function.hpp])]) - - -# BOOST_FUSTION() -# ---------------- -# Look for Boost.Fusion -AC_DEFUN([BOOST_FUSION], -[BOOST_FIND_HEADER([boost/fusion/include/vector.hpp])]) - - -# BOOST_GRAPH([PREFERRED-RT-OPT]) -# ------------------------------- -# Look for Boost.Graphs. For the documentation of PREFERRED-RT-OPT, see the -# documentation of BOOST_FIND_LIB above. -AC_DEFUN([BOOST_GRAPH], -[BOOST_FIND_LIB([graph], [$1], - [boost/graph/adjacency_list.hpp], [boost::adjacency_list<> g;]) -])# BOOST_GRAPH - - -# BOOST_IOSTREAMS([PREFERRED-RT-OPT]) -# ------------------------------- -# Look for Boost.IOStreams. For the documentation of PREFERRED-RT-OPT, see the -# documentation of BOOST_FIND_LIB above. -AC_DEFUN([BOOST_IOSTREAMS], -[BOOST_FIND_LIB([iostreams], [$1], - [boost/iostreams/device/file_descriptor.hpp], - [boost::iostreams::file_descriptor fd(0); fd.close();]) -])# BOOST_IOSTREAMS - - -# BOOST_HASH() -# ------------ -# Look for Boost.Functional/Hash -AC_DEFUN([BOOST_HASH], -[BOOST_FIND_HEADER([boost/functional/hash.hpp])]) - - -# BOOST_LAMBDA() -# -------------- -# Look for Boost.Lambda -AC_DEFUN([BOOST_LAMBDA], -[BOOST_FIND_HEADER([boost/lambda/lambda.hpp])]) - -# BOOST_MPL() -# -------------- -# Look for Boost.MPL -AC_DEFUN([BOOST_MPL], -[BOOST_FIND_HEADER([boost/mpl/void_fwd.hpp])]) - - -# BOOST_OPTIONAL() -# ---------------- -# Look for Boost.Optional -AC_DEFUN([BOOST_OPTIONAL], -[BOOST_FIND_HEADER([boost/optional.hpp])]) - - -# BOOST_PREPROCESSOR() -# -------------------- -# Look for Boost.Preprocessor -AC_DEFUN([BOOST_PREPROCESSOR], -[BOOST_FIND_HEADER([boost/preprocessor/repeat.hpp])]) - - -# BOOST_PROGRAM_OPTIONS([PREFERRED-RT-OPT]) -# ----------------------------------------- -# Look for Boost.Program_options. For the documentation of PREFERRED-RT-OPT, see -# the documentation of BOOST_FIND_LIB above. -AC_DEFUN([BOOST_PROGRAM_OPTIONS], -[BOOST_FIND_LIB([program_options], [$1], - [boost/program_options.hpp], - [boost::program_options::options_description d("test");]) -])# BOOST_PROGRAM_OPTIONS - - -# BOOST_REF() -# ----------- -# Look for Boost.Ref -AC_DEFUN([BOOST_REF], -[BOOST_FIND_HEADER([boost/ref.hpp])]) - - -# BOOST_REGEX([PREFERRED-RT-OPT]) -# ------------------------------- -# Look for Boost.Regex. For the documentation of PREFERRED-RT-OPT, see the -# documentation of BOOST_FIND_LIB above. -AC_DEFUN([BOOST_REGEX], -[BOOST_FIND_LIB([regex], [$1], - [boost/regex.hpp], - [boost::regex exp("*"); boost::regex_match("foo", exp);]) -])# BOOST_REGEX - - -# BOOST_SERIALIZATION([PREFERRED-RT-OPT]) -# --------------------------------------- -# Look for Boost.Serialization. For the documentation of PREFERRED-RT-OPT, see -# the documentation of BOOST_FIND_LIB above. -AC_DEFUN([BOOST_SERIALIZATION], -[BOOST_FIND_LIB([serialization], [$1], - [boost/archive/text_oarchive.hpp], - [std::ostream* o = 0; // Cheap way to get an ostream... - boost::archive::text_oarchive t(*o);]) -])# BOOST_SIGNALS - - -# BOOST_SIGNALS([PREFERRED-RT-OPT]) -# --------------------------------- -# Look for Boost.Signals. For the documentation of PREFERRED-RT-OPT, see the -# documentation of BOOST_FIND_LIB above. -AC_DEFUN([BOOST_SIGNALS], -[BOOST_FIND_LIB([signals], [$1], - [boost/signal.hpp], - [boost::signal<void ()> s;]) -])# BOOST_SIGNALS - - -# BOOST_SMART_PTR() -# ----------------- -# Look for Boost.SmartPtr -AC_DEFUN([BOOST_SMART_PTR], -[BOOST_FIND_HEADER([boost/scoped_ptr.hpp]) -BOOST_FIND_HEADER([boost/shared_ptr.hpp]) -]) - - -# BOOST_STATICASSERT() -# -------------------- -# Look for Boost.StaticAssert -AC_DEFUN([BOOST_STATICASSERT], -[BOOST_FIND_HEADER([boost/static_assert.hpp])]) - - -# BOOST_STRING_ALGO() -# ------------------- -# Look for Boost.StringAlgo -AC_DEFUN([BOOST_STRING_ALGO], -[BOOST_FIND_HEADER([boost/algorithm/string.hpp]) -]) - - -# BOOST_SYSTEM([PREFERRED-RT-OPT]) -# -------------------------------- -# Look for Boost.System. For the documentation of PREFERRED-RT-OPT, see the -# documentation of BOOST_FIND_LIB above. This library was introduced in Boost -# 1.35.0. -AC_DEFUN([BOOST_SYSTEM], -[BOOST_FIND_LIB([system], [$1], - [boost/system/error_code.hpp], - [boost::system::error_code e; e.clear();]) -])# BOOST_SYSTEM - - -# BOOST_TEST([PREFERRED-RT-OPT]) -# ------------------------------ -# Look for Boost.Test. For the documentation of PREFERRED-RT-OPT, see the -# documentation of BOOST_FIND_LIB above. -AC_DEFUN([BOOST_TEST], -[m4_pattern_allow([^BOOST_CHECK$])dnl -BOOST_FIND_LIB([unit_test_framework], [$1], - [boost/test/unit_test.hpp], [BOOST_CHECK(2 == 2);], - [using boost::unit_test::test_suite; - test_suite* init_unit_test_suite(int argc, char ** argv) - { return NULL; }]) -])# BOOST_TEST - - -# BOOST_THREADS([PREFERRED-RT-OPT]) -# --------------------------------- -# Look for Boost.Thread. For the documentation of PREFERRED-RT-OPT, see the -# documentation of BOOST_FIND_LIB above. -# FIXME: Provide an alias "BOOST_THREAD". -AC_DEFUN([BOOST_THREADS], -[dnl Having the pthread flag is required at least on GCC3 where -dnl boost/thread.hpp would complain if we try to compile without -dnl -pthread on GNU/Linux. -AC_REQUIRE([_BOOST_PTHREAD_FLAG])dnl -boost_threads_save_LIBS=$LIBS -boost_threads_save_CPPFLAGS=$CPPFLAGS -LIBS="$LIBS $boost_cv_pthread_flag" -# Yes, we *need* to put the -pthread thing in CPPFLAGS because with GCC3, -# boost/thread.hpp will trigger a #error if -pthread isn't used: -# boost/config/requires_threads.hpp:47:5: #error "Compiler threading support -# is not turned on. Please set the correct command line options for -# threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)" -CPPFLAGS="$CPPFLAGS $boost_cv_pthread_flag" -BOOST_FIND_LIB([thread], [$1], - [boost/thread.hpp], [boost::thread t; boost::mutex m;]) -BOOST_THREAD_LIBS="$BOOST_THREAD_LIBS $boost_cv_pthread_flag" -BOOST_CPPFLAGS="$BOOST_CPPFLAGS $boost_cv_pthread_flag" -LIBS=$boost_threads_save_LIBS -CPPFLAGS=$boost_threads_save_CPPFLAGS -])# BOOST_THREADS - - -# BOOST_TOKENIZER() -# ----------------- -# Look for Boost.Tokenizer -AC_DEFUN([BOOST_TOKENIZER], -[BOOST_FIND_HEADER([boost/tokenizer.hpp])]) - - -# BOOST_TRIBOOL() -# --------------- -# Look for Boost.Tribool -AC_DEFUN([BOOST_TRIBOOL], -[BOOST_FIND_HEADER([boost/logic/tribool_fwd.hpp]) -BOOST_FIND_HEADER([boost/logic/tribool.hpp]) -]) - - -# BOOST_TUPLE() -# ------------- -# Look for Boost.Tuple -AC_DEFUN([BOOST_TUPLE], -[BOOST_FIND_HEADER([boost/tuple/tuple.hpp])]) - - -# BOOST_TYPETRAITS() -# -------------------- -# Look for Boost.TypeTraits -AC_DEFUN([BOOST_TYPETRAITS], -[BOOST_FIND_HEADER([boost/type_traits.hpp])]) - - -# BOOST_UTILITY() -# --------------- -# Look for Boost.Utility (noncopyable, result_of, base-from-member idiom, -# etc.) -AC_DEFUN([BOOST_UTILITY], -[BOOST_FIND_HEADER([boost/utility.hpp])]) - - -# BOOST_VARIANT() -# --------------- -# Look for Boost.Variant. -AC_DEFUN([BOOST_VARIANT], -[BOOST_FIND_HEADER([boost/variant/variant_fwd.hpp]) -BOOST_FIND_HEADER([boost/variant.hpp])]) - - -# BOOST_WAVE([PREFERRED-RT-OPT]) -# ------------------------------ -# NOTE: If you intend to use Wave/Spirit with thread support, make sure you -# call BOOST_THREADS first. -# Look for Boost.Wave. For the documentation of PREFERRED-RT-OPT, see the -# documentation of BOOST_FIND_LIB above. -AC_DEFUN([BOOST_WAVE], -[AC_REQUIRE([BOOST_FILESYSTEM])dnl -AC_REQUIRE([BOOST_DATE_TIME])dnl -boost_wave_save_LIBS=$LIBS -boost_wave_save_LDFLAGS=$LDFLAGS -m4_pattern_allow([^BOOST_((FILE)?SYSTEM|DATE_TIME|THREAD)_(LIBS|LDFLAGS)$])dnl -LIBS="$LIBS $BOOST_SYSTEM_LIBS $BOOST_FILESYSTEM_LIBS $BOOST_DATE_TIME_LIBS\ -$BOOST_THREAD_LIBS" -LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS $BOOST_FILESYSTEM_LDFLAGS\ -$BOOST_DATE_TIME_LDFLAGS $BOOST_THREAD_LDFLAGS" -BOOST_FIND_LIB([wave], [$1], - [boost/wave.hpp], - [boost::wave::token_id id; get_token_name(id);]) -LIBS=$boost_wave_save_LIBS -LDFLAGS=$boost_wave_save_LDFLAGS -])# BOOST_WAVE - - -# BOOST_XPRESSIVE() -# ----------------- -# Look for Boost.Xpressive (new since 1.36.0). -AC_DEFUN([BOOST_XPRESSIVE], -[BOOST_FIND_HEADER([boost/xpressive/xpressive.hpp])]) - - -# ----------------- # -# Internal helpers. # -# ----------------- # - - -# _BOOST_PTHREAD_FLAG() -# --------------------- -# Internal helper for BOOST_THREADS. Based on ACX_PTHREAD: -# http://autoconf-archive.cryp.to/acx_pthread.html -AC_DEFUN([_BOOST_PTHREAD_FLAG], -[AC_REQUIRE([AC_PROG_CXX])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_LANG_PUSH([C++])dnl -AC_CACHE_CHECK([for the flags needed to use pthreads], [boost_cv_pthread_flag], -[ boost_cv_pthread_flag= - # The ordering *is* (sometimes) important. Some notes on the - # individual items follow: - # (none): in case threads are in libc; should be tried before -Kthread and - # other compiler flags to prevent continual compiler warnings - # -lpthreads: AIX (must check this before -lpthread) - # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) - # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) - # -llthread: LinuxThreads port on FreeBSD (also preferred to -pthread) - # -pthread: GNU Linux/GCC (kernel threads), BSD/GCC (userland threads) - # -pthreads: Solaris/GCC - # -mthreads: MinGW32/GCC, Lynx/GCC - # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it - # doesn't hurt to check since this sometimes defines pthreads too; - # also defines -D_REENTRANT) - # ... -mt is also the pthreads flag for HP/aCC - # -lpthread: GNU Linux, etc. - # --thread-safe: KAI C++ - case $host_os in #( - *solaris*) - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthreads/-mt/ - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: - boost_pthread_flags="-pthreads -lpthread -mt -pthread";; #( - *) - boost_pthread_flags="-lpthreads -Kthread -kthread -llthread -pthread \ - -pthreads -mthreads -lpthread --thread-safe -mt";; - esac - # Generate the test file. - AC_LANG_CONFTEST([AC_LANG_PROGRAM([#include <pthread.h>], - [pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0);])]) - for boost_pthread_flag in '' $boost_pthread_flags; do - boost_pthread_ok=false -dnl Re-use the test file already generated. - boost_pthreads__save_LIBS=$LIBS - LIBS="$LIBS $boost_pthread_flag" - AC_LINK_IFELSE([], - [if grep ".*$boost_pthread_flag" conftest.err; then - echo "This flag seems to have triggered warnings" >&AS_MESSAGE_LOG_FD - else - boost_pthread_ok=:; boost_cv_pthread_flag=$boost_pthread_flag - fi]) - LIBS=$boost_pthreads__save_LIBS - $boost_pthread_ok && break - done -]) -AC_LANG_POP([C++])dnl -])# _BOOST_PTHREAD_FLAG - - -# _BOOST_gcc_test(MAJOR, MINOR) -# ----------------------------- -# Internal helper for _BOOST_FIND_COMPILER_TAG. -m4_define([_BOOST_gcc_test], -["defined __GNUC__ && __GNUC__ == $1 && __GNUC_MINOR__ == $2 && !defined __ICC @ gcc$1$2"])dnl - - -# _BOOST_FIND_COMPILER_TAG() -# -------------------------- -# Internal. When Boost is installed without --layout=system, each library -# filename will hold a suffix that encodes the compiler used during the -# build. The Boost build system seems to call this a `tag'. -AC_DEFUN([_BOOST_FIND_COMPILER_TAG], -[AC_REQUIRE([AC_PROG_CXX])dnl -AC_CACHE_CHECK([for the toolset name used by Boost for $CXX], [boost_cv_lib_tag], -[AC_LANG_PUSH([C++])dnl - boost_cv_lib_tag=unknown - # The following tests are mostly inspired by boost/config/auto_link.hpp - # The list is sorted to most recent/common to oldest compiler (in order - # to increase the likelihood of finding the right compiler with the - # least number of compilation attempt). - # Beware that some tests are sensible to the order (for instance, we must - # look for MinGW before looking for GCC3). - # I used one compilation test per compiler with a #error to recognize - # each compiler so that it works even when cross-compiling (let me know - # if you know a better approach). - # Known missing tags (known from Boost's tools/build/v2/tools/common.jam): - # como, edg, kcc, bck, mp, sw, tru, xlc - # I'm not sure about my test for `il' (be careful: Intel's ICC pre-defines - # the same defines as GCC's). - # TODO: Move the test on GCC 4.4 up once it's released. - for i in \ - _BOOST_gcc_test(4, 3) \ - _BOOST_gcc_test(4, 2) \ - _BOOST_gcc_test(4, 1) \ - _BOOST_gcc_test(4, 0) \ - "defined __GNUC__ && __GNUC__ == 3 && !defined __ICC \ - && (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \ - || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw" \ - _BOOST_gcc_test(3, 4) \ - _BOOST_gcc_test(3, 3) \ - "defined _MSC_VER && _MSC_VER >= 1400 @ vc80" \ - _BOOST_gcc_test(3, 2) \ - "defined _MSC_VER && _MSC_VER == 1310 @ vc71" \ - _BOOST_gcc_test(3, 1) \ - _BOOST_gcc_test(3, 0) \ - "defined __BORLANDC__ @ bcb" \ - "defined __ICC && (defined __unix || defined __unix__) @ il" \ - "defined __ICL @ iw" \ - "defined _MSC_VER && _MSC_VER == 1300 @ vc7" \ - _BOOST_gcc_test(4, 4) \ - _BOOST_gcc_test(2, 95) \ - "defined __MWERKS__ && __MWERKS__ <= 0x32FF @ cw9" \ - "defined _MSC_VER && _MSC_VER < 1300 && !defined UNDER_CE @ vc6" \ - "defined _MSC_VER && _MSC_VER < 1300 && defined UNDER_CE @ evc4" \ - "defined __MWERKS__ && __MWERKS__ <= 0x31FF @ cw8" - do - boost_tag_test=`expr "X$i" : 'X\([[^@]]*\) @ '` - boost_tag=`expr "X$i" : 'X[[^@]]* @ \(.*\)'` - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#if $boost_tag_test -/* OK */ -#else -# error $boost_tag_test -#endif -]])], [boost_cv_lib_tag=$boost_tag; break], []) - done -AC_LANG_POP([C++])dnl - case $boost_cv_lib_tag in #( - # Some newer (>= 1.35?) versions of Boost seem to only use "gcc" as opposed - # to "gcc41" for instance. - *-gcc | *'-gcc ') :;; #( Don't re-add -gcc: it's already in there. - gcc*) - # We can specify multiple tags in this variable because it's used by - # BOOST_FIND_LIB that does a `for tag in -$boost_cv_lib_tag' ... - boost_cv_lib_tag="$boost_cv_lib_tag -gcc" - ;; #( - unknown) - AC_MSG_WARN([[could not figure out which toolset name to use for $CXX]]) - boost_cv_lib_tag= - ;; - esac -])dnl end of AC_CACHE_CHECK -])# _BOOST_FIND_COMPILER_TAG - - -# _BOOST_GUESS_WHETHER_TO_USE_MT() -# -------------------------------- -# Compile a small test to try to guess whether we should favor MT (Multi -# Thread) flavors of Boost. Sets boost_guess_use_mt accordingly. -AC_DEFUN([_BOOST_GUESS_WHETHER_TO_USE_MT], -[# Check whether we do better use `mt' even though we weren't ask to. -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#if defined _REENTRANT || defined _MT || defined __MT__ -/* use -mt */ -#else -# error MT not needed -#endif -]])], [boost_guess_use_mt=:], [boost_guess_use_mt=false]) -]) - -# _BOOST_AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) -# ------------------------------------------------------------------- -# Fork of _AC_LINK_IFELSE that preserves conftest.o across calls. Fragile, -# will break when Autoconf changes its internals. Requires that you manually -# rm -f conftest.$ac_objext in between to really different tests, otherwise -# you will try to link a conftest.o left behind by a previous test. -# Used to aggressively optimize BOOST_FIND_LIB (see the big comment in this -# macro) -m4_define([_BOOST_AC_LINK_IFELSE], -[m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl -rm -f conftest$ac_exeext -boost_ac_ext_save=$ac_ext -boost_use_source=: -# If we already have a .o, re-use it. We change $ac_ext so that $ac_link -# tries to link the existing object file instead of compiling from source. -test -f conftest.$ac_objext && ac_ext=$ac_objext && boost_use_source=false && - _AS_ECHO_LOG([re-using the existing conftest.$ac_objext]) -AS_IF([_AC_DO_STDERR($ac_link) && { - test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_executable_p conftest$ac_exeext -dnl FIXME: use AS_TEST_X instead when 2.61 is widespread enough. - }], - [$2], - [if $boost_use_source; then - _AC_MSG_LOG_CONFTEST - fi - $3]) -dnl Delete also the IPA/IPO (Inter Procedural Analysis/Optimization) -dnl information created by the PGI compiler (conftest_ipa8_conftest.oo), -dnl as it would interfere with the next link command. -rm -f core conftest.err conftest_ipa8_conftest.oo \ - conftest$ac_exeext m4_ifval([$1], [conftest.$ac_ext])[]dnl -])# _BOOST_AC_LINK_IFELSE - -# Local Variables: -# mode: autoconf -# End: diff --git a/build-aux/bootstrap b/build-aux/bootstrap deleted file mode 100755 index 1f2ecd4..0000000 --- a/build-aux/bootstrap +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh -set -x -autoreconf -v -i diff --git a/build-aux/config.guess b/build-aux/config.guess deleted file mode 100755 index 84d5b85..0000000 --- a/build-aux/config.guess +++ /dev/null @@ -1,1574 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -# Free Software Foundation, Inc. - -timestamp='2009-02-03' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program 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 -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner <pe...@bo...>. -# Please send patches to <con...@gn...>. Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to <con...@gn...>." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (gh...@no... 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -if [ "${UNAME_SYSTEM}" = "Linux" ] ; then - eval $set_cc_for_build - cat << EOF > $dummy.c - #include <features.h> - #ifdef __UCLIBC__ - # ifdef __UCLIBC_CONFIG_VERSION__ - LIBC=uclibc __UCLIBC_CONFIG_VERSION__ - # else - LIBC=uclibc - # endif - #else - LIBC=gnu - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'` -fi - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # ak...@wp... (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef ... [truncated message content] |
From: Thomas M. <tho...@us...> - 2009-08-24 20:38:39
|
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 created at 03ff0bf047ccf89a5c10b8f304c2770d7f75e017 (commit) - Log ----------------------------------------------------------------- commit 03ff0bf047ccf89a5c10b8f304c2770d7f75e017 Author: Thomas Moulard <tho...@gm...> Date: Mon Jul 27 20:43:15 2009 +0900 Beautify Autotest output, capture Valgrind log. * autotest.at: Display what command line has been called and capture ``valgrind.log''. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 843c25f..e132428 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-07-27 Thomas Moulard <tho...@gm...> + + Beautify Autotest output, capture Valgrind log. + * autotest.at: Display what command line has been + called and capture ``valgrind.log''. + 2009-07-01 Thomas Moulard <tho...@gm...> Add Ipopt Autoconf macros. diff --git a/autotest.at b/autotest.at index 75485ee..1d3094d 100644 --- a/autotest.at +++ b/autotest.at @@ -47,8 +47,10 @@ AT_CHECK([if m4_default([$3], [false]); then AT_XFAIL_IF([m4_default([$4], [false])]) cp $abs_srcdir/$1.stdout expout -AT_CHECK([$CHECK_PREFIX `which $1`], [0], [expout], [ignore]) - +TESTCASE=`which $1` +echo "$at_srcdir/AT_LINE: $CHECK_PREFIX $TESTCASE" +AT_CHECK([$CHECK_PREFIX $TESTCASE], [0], [expout], [ignore]) +AT_CAPTURE_FILE ([valgrind.log]) AT_CLEANUP ]) # CHECK_STDOUT commit 53249c7a39864b963946d8088c421e367c8e6b75 Author: Thomas Moulard <tho...@gm...> Date: Wed Jul 1 18:46:23 2009 +0900 Add Ipopt Autoconf macros. * acx_pthread.m4: New. * ipopt.m4: New. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 065e0f4..843c25f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-07-01 Thomas Moulard <tho...@gm...> + Add Ipopt Autoconf macros. + * acx_pthread.m4: New. + * ipopt.m4: New. + +2009-07-01 Thomas Moulard <tho...@gm...> + Create new build-aux branch. * autotest.at: Rename from build-aux/autotest.at. * autotest.mk: Rename from build-aux/autotest.mk. diff --git a/acx_pthread.m4 b/acx_pthread.m4 new file mode 100644 index 0000000..e4e91d3 --- /dev/null +++ b/acx_pthread.m4 @@ -0,0 +1,242 @@ +dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) +dnl +dnl @summary figure out how to build C programs using POSIX threads +dnl +dnl This macro figures out how to build C programs using POSIX threads. +dnl It sets the PTHREAD_LIBS output variable to the threads library and +dnl linker flags, and the PTHREAD_CFLAGS output variable to any special +dnl C compiler flags that are needed. (The user can also force certain +dnl compiler flags/libs to be tested by setting these environment +dnl variables.) +dnl +dnl Also sets PTHREAD_CC to any special C compiler that is needed for +dnl multi-threaded programs (defaults to the value of CC otherwise). +dnl (This is necessary on AIX to use the special cc_r compiler alias.) +dnl +dnl NOTE: You are assumed to not only compile your program with these +dnl flags, but also link it with them as well. e.g. you should link +dnl with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS +dnl $LIBS +dnl +dnl If you are only building threads programs, you may wish to use +dnl these variables in your default LIBS, CFLAGS, and CC: +dnl +dnl LIBS="$PTHREAD_LIBS $LIBS" +dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +dnl CC="$PTHREAD_CC" +dnl +dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute +dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to +dnl that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). +dnl +dnl ACTION-IF-FOUND is a list of shell commands to run if a threads +dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands to +dnl run it if it is not found. If ACTION-IF-FOUND is not specified, the +dnl default action will define HAVE_PTHREAD. +dnl +dnl Please let the authors know if this macro fails on any platform, or +dnl if you have any other suggestions or comments. This macro was based +dnl on work by SGJ on autoconf scripts for FFTW (www.fftw.org) (with +dnl help from M. Frigo), as well as ac_pthread and hb_pthread macros +dnl posted by Alejandro Forero Cuervo to the autoconf macro repository. +dnl We are also grateful for the helpful feedback of numerous users. +dnl +dnl @category InstalledPackages +dnl @author Steven G. Johnson <st...@al...> +dnl @version 2006-05-29 +dnl @license GPLWithACException + +AC_DEFUN([ACX_PTHREAD], [ +AC_REQUIRE([AC_CANONICAL_HOST]) +AC_LANG_SAVE +AC_LANG_C +acx_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on True64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) + AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) + AC_MSG_RESULT($acx_pthread_ok) + if test x"$acx_pthread_ok" = xno; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items starting with a "-" are +# C compiler flags, and other items are library names, except for "none" +# which indicates that we try without any flags at all, and "pthread-config" +# which is a program returning the flags for the Pth emulation library. + +acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) +# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) +# -pthreads: Solaris/gcc +# -mthreads: Mingw32/gcc, Lynx/gcc +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads too; +# also defines -D_REENTRANT) +# ... -mt is also the pthreads flag for HP/aCC +# pthread: Linux, etcetera +# --thread-safe: KAI C++ +# pthread-config: use pthread-config program (for GNU Pth library) + +case "${host_cpu}-${host_os}" in + *solaris*) + + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (We need to link with -pthreads/-mt/ + # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather + # a function called by this macro, so we could check for that, but + # who knows whether they'll stub that too in a future libc.) So, + # we'll just look for -pthreads and -lpthread first: + + acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags" + ;; +esac + +if test x"$acx_pthread_ok" = xno; then +for flag in $acx_pthread_flags; do + + case $flag in + none) + AC_MSG_CHECKING([whether pthreads work without any flags]) + ;; + + -*) + AC_MSG_CHECKING([whether pthreads work with $flag]) + PTHREAD_CFLAGS="$flag" + ;; + + pthread-config) + AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no) + if test x"$acx_pthread_config" = xno; then continue; fi + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; + + *) + AC_MSG_CHECKING([for the pthreads library -l$flag]) + PTHREAD_LIBS="-l$flag" + ;; + esac + + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + AC_TRY_LINK([#include <pthread.h>], + [pthread_t th; pthread_join(th, 0); + pthread_attr_init(0); pthread_cleanup_push(0, 0); + pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], + [acx_pthread_ok=yes]) + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + AC_MSG_RESULT($acx_pthread_ok) + if test "x$acx_pthread_ok" = xyes; then + break; + fi + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi + +# Various other checks: +if test "x$acx_pthread_ok" = xyes; then + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. + AC_MSG_CHECKING([for joinable pthread attribute]) + attr_name=unknown + for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + AC_TRY_LINK([#include <pthread.h>], [int attr=$attr; return attr;], + [attr_name=$attr; break]) + done + AC_MSG_RESULT($attr_name) + if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then + AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name, + [Define to necessary symbol if this constant + uses a non-standard name on your system.]) + fi + + AC_MSG_CHECKING([if more special flags are required for pthreads]) + flag=no + case "${host_cpu}-${host_os}" in + *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; + *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; + esac + AC_MSG_RESULT(${flag}) + if test "x$flag" != xno; then + PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" + fi + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + # More AIX lossage: must compile with xlc_r or cc_r + if test x"$GCC" != xyes; then + AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC}) + else + PTHREAD_CC=$CC + fi +else + PTHREAD_CC="$CC" +fi + +AC_SUBST(PTHREAD_LIBS) +AC_SUBST(PTHREAD_CFLAGS) +AC_SUBST(PTHREAD_CC) + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x"$acx_pthread_ok" = xyes; then + ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) + : +else + acx_pthread_ok=no + $2 +fi +AC_LANG_RESTORE +])dnl ACX_PTHREAD diff --git a/ipopt.m4 b/ipopt.m4 new file mode 100644 index 0000000..01fd68a --- /dev/null +++ b/ipopt.m4 @@ -0,0 +1,97 @@ +# -*-Autoconf-*- +# 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 General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Additional permission under section 7 of the GNU General Public +# License, version 3 ("GPLv3"): +# +# If you convey this file as part of a work that contains a +# configuration script generated by Autoconf, you may do so under +# terms of your choice. +# +# 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with roboptim. If not, see <http://www.gnu.org/licenses/>. + +# serial 1 + +m4_pattern_forbid([^IPOPT_]) + +# IPOPT_LIB([action-if-found], [action-if-not-found]) +# -------------------------------------------------------------- +# Try to detect the library. +AC_DEFUN([IPOPT_LIB], +[ + # Need gfortran library to work. + AC_SEARCH_LIBS([main], [gfortran], $1, $2) + + # Detect pthread. + ACX_PTHREAD + + # No C symbol in the library. + AC_SEARCH_LIBS([main], [ipopt], $1, $2) +]) # LIB_IPOPT_LIB + + +# IPOPT_HEADERS([action-if-found], [action-if-not-found]) +# ------------------------------------------------------------------ +# Try to detect the library headers. +AC_DEFUN([IPOPT_HEADERS], +[AC_CHECK_HEADER([coin/IpIpoptApplication.hpp], $1, $2) +AC_CHECK_HEADER([coin/IpTNLP.hpp], $1, $2) +]) # LIB_IPOPT_HEADERS + + +# IPOPT_ARG_WITH +# ------------------------------ +# Add an optional dependency toward Ipopt. +AC_DEFUN([IPOPT_ARG_WITH], +[ + AC_ARG_WITH([ipopt], + [AS_HELP_STRING([--with-ipopt], + [enable ipopt support])], + [], + [with_ipopt=check]) + + AC_SUBST([DISTCHECK_CONFIGURE_FLAGS], + ["$DISTCHECK_CONFIGURE_FLAGS \ + '--with-ipopt=$with_ipopt'"]) + + ipopt_fail=no + AS_IF([test "x$with_ipopt" != xno], + [ + # Search for Ipopt library. + IPOPT_LIB([], [ipopt_fail=yes]) + + # Search for Ipopt headers. + IPOPT_HEADERS([], [ipopt_fail=yes]) + + # If both tests are OK, add the library and define the CPP symbol. + AS_IF([test "x$ipopt_fail" = xno], + [AC_SUBST([IPOPT_LIBADD], ["-lipopt -lgfortran"]) + AC_DEFINE([HAVE_IPOPT], [1], + [Define if you have ipopt])]) + + # If the support was explicitly required, but detection has failed, + # this is a fatal error. + AS_IF([test "x$with_ipopt" = xyes && \ + test "x$ipopt_fail" = xyes], + [AC_MSG_FAILURE( + [Ipopt test failed (--without-ipopt to disable)]) + ]) + ]) + + # Define a boolean indicating whether or not the package has been found. + AM_CONDITIONAL([HAVE_IPOPT], + [test "x$with_ipopt" != xno && \ + test "x$ipopt_fail" != xyes]) +]) # IPOPT_ARG_WITH commit 8d9c0624ebb36750b1ee81c348196a2073018c67 Author: Thomas Moulard <tho...@gm...> Date: Wed Jul 1 16:44:23 2009 +0900 Create new build-aux branch. * autotest.at: Rename from build-aux/autotest.at. * autotest.mk: Rename from build-aux/autotest.mk. * boost.m4: Rename from build-aux/boost.m4. * bootstrap: Rename from build-aux/bootstrap. * config.guess: Rename from build-aux/config.guess. * config.sub: Rename from build-aux/config.sub. * deb.mk: Rename from build-aux/deb.mk. * depcomp: Rename from build-aux/depcomp. * doc/Doxyfile.in: Remove. * doc/Makefile.am: Remove. * doc/Makefile.in: Remove. * doc/doxygen.css: Remove. * doc/footer.html: Remove. * doc/header.html: Remove. * doc/package.css: Remove. * doc/sf-upload.sh.in: Remove. * doc/tabs.css: Remove. * doxygen.m4: Rename from build-aux/doxygen.m4. * ebuild.mk: Rename from build-aux/ebuild.mk. * init.mk: Rename from build-aux/init.mk. * install-sh: Rename from build-aux/install-sh. * libtool.m4: Rename from build-aux/libtool.m4. * ltmain.sh: Rename from build-aux/ltmain.sh. * ltoptions.m4: Rename from build-aux/ltoptions.m4. * ltsugar.m4: Rename from build-aux/ltsugar.m4. * ltversion.m4: Rename from build-aux/ltversion.m4. * lt~obsolete.m4: Rename from build-aux/lt~obsolete.m4. * missing: Rename from build-aux/missing. * move-if-change: Rename from build-aux/move-if-change. * optimization-tests/hs071.hh: Remove. * pkg-config.mk: Rename from build-aux/pkg-config.mk. * pkg-config.pc.in: Rename from build-aux/pkg-config.pc.in. * roboptim-core.m4: Rename from build-aux/roboptim-core.m4. * rpm.mk: Rename from build-aux/rpm.mk. * warning.m4: Rename from build-aux/warning.m4. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index a14ed04..065e0f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,42 @@ +2009-07-01 Thomas Moulard <tho...@gm...> + + Create new build-aux branch. + * autotest.at: Rename from build-aux/autotest.at. + * autotest.mk: Rename from build-aux/autotest.mk. + * boost.m4: Rename from build-aux/boost.m4. + * bootstrap: Rename from build-aux/bootstrap. + * config.guess: Rename from build-aux/config.guess. + * config.sub: Rename from build-aux/config.sub. + * deb.mk: Rename from build-aux/deb.mk. + * depcomp: Rename from build-aux/depcomp. + * doc/Doxyfile.in: Remove. + * doc/Makefile.am: Remove. + * doc/Makefile.in: Remove. + * doc/doxygen.css: Remove. + * doc/footer.html: Remove. + * doc/header.html: Remove. + * doc/package.css: Remove. + * doc/sf-upload.sh.in: Remove. + * doc/tabs.css: Remove. + * doxygen.m4: Rename from build-aux/doxygen.m4. + * ebuild.mk: Rename from build-aux/ebuild.mk. + * init.mk: Rename from build-aux/init.mk. + * install-sh: Rename from build-aux/install-sh. + * libtool.m4: Rename from build-aux/libtool.m4. + * ltmain.sh: Rename from build-aux/ltmain.sh. + * ltoptions.m4: Rename from build-aux/ltoptions.m4. + * ltsugar.m4: Rename from build-aux/ltsugar.m4. + * ltversion.m4: Rename from build-aux/ltversion.m4. + * lt~obsolete.m4: Rename from build-aux/lt~obsolete.m4. + * missing: Rename from build-aux/missing. + * move-if-change: Rename from build-aux/move-if-change. + * optimization-tests/hs071.hh: Remove. + * pkg-config.mk: Rename from build-aux/pkg-config.mk. + * pkg-config.pc.in: Rename from build-aux/pkg-config.pc.in. + * roboptim-core.m4: Rename from build-aux/roboptim-core.m4. + * rpm.mk: Rename from build-aux/rpm.mk. + * warning.m4: Rename from build-aux/warning.m4. + 2009-06-26 Thomas Moulard <tho...@gm...> Add titles to function. diff --git a/build-aux/autotest.at b/autotest.at similarity index 100% rename from build-aux/autotest.at rename to autotest.at diff --git a/build-aux/autotest.mk b/autotest.mk similarity index 100% rename from build-aux/autotest.mk rename to autotest.mk diff --git a/build-aux/boost.m4 b/boost.m4 similarity index 100% rename from build-aux/boost.m4 rename to boost.m4 diff --git a/build-aux/bootstrap b/bootstrap similarity index 100% rename from build-aux/bootstrap rename to bootstrap diff --git a/build-aux/config.guess b/config.guess similarity index 100% rename from build-aux/config.guess rename to config.guess diff --git a/build-aux/config.sub b/config.sub similarity index 100% rename from build-aux/config.sub rename to config.sub diff --git a/build-aux/deb.mk b/deb.mk similarity index 100% rename from build-aux/deb.mk rename to deb.mk diff --git a/build-aux/depcomp b/depcomp similarity index 100% rename from build-aux/depcomp rename to depcomp diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in deleted file mode 100644 index fd90e82..0000000 --- a/doc/Doxyfile.in +++ /dev/null @@ -1,1516 +0,0 @@ -# Doxyfile 1.5.8 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# http://www.gnu.org/software/libiconv for the list of possible encodings. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = "@PACKAGE_NAME@" - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = "@PACKAGE_VERSION@" - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, -# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, -# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene, -# Spanish, Swedish, and Ukrainian. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = @abs_top_srcdir@ - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = @abs_top_srcdir@/include - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments -# (thus requiring an explicit @brief command for a brief description.) - -JAVADOC_AUTOBRIEF = NO - -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring -# an explicit \brief command for a brief description.) - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified -# scopes will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for -# Fortran. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for -# VHDL. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it parses. -# With this tag you can assign which parser to use for a given extension. -# Doxygen has a built-in mapping, but you can override or extend it using this tag. -# The format is ext=language, where ext is a file extension, and language is one of -# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, -# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat -# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), -# use: inc=Fortran f=C - -EXTENSION_MAPPING = - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. - -BUILTIN_STL_SUPPORT = YES - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public -# instead of private inheritance when no explicit protection keyword is present. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen to replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the -# methods anyway, you should set this option to NO. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. - -TYPEDEF_HIDES_STRUCT = NO - -# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to -# determine which symbols to keep in memory and which to flush to disk. -# When the cache is full, less often used symbols will be written to disk. -# For small to medium size projects (<1000 input files) the default value is -# probably good enough. For larger projects a too small cache size can cause -# doxygen to be busy swapping symbols to and from disk most of the time -# causing a significant performance penality. -# If the system has enough physical memory increasing the cache will improve the -# performance by keeping more symbols in memory. Note that the value works on -# a logarithmic scale so increasing the size by one will rougly double the -# memory usage. The cache size is given by this formula: -# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, -# corresponding to a cache size of 2^16 = 65536 symbols - -SYMBOL_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = YES - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default -# anonymous namespace are hidden. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) -# the group names will appear in their defined order. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = NO - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. - -SHOW_DIRECTORIES = NO - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the -# Folder Tree View (if specified). The default is YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the -# Namespaces page. -# This will remove the Namespaces entry from the Quick Index -# and from the Folder Tree View (if specified). The default is YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command <command> <input-file>, where <command> is the value of -# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by -# doxygen. The layout file controls the global structure of the generated output files -# in an output format independent way. The create the layout file that represents -# doxygen's defaults, run doxygen with the -l option. You can optionally specify a -# file name after the option, if omitted DoxygenLayout.xml will be used as the name -# of the layout file. - -LAYOUT_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = @abs_top_srcdir@/include \ - @abs_top_srcdir@/src - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for -# the list of possible encodings. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 - -FILE_PATTERNS = *.cc \ - *.hh \ - *.hxx \ - *.ice - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = @abs_top_builddir@/packages \ - @abs_top_builddir@/doc \ - @abs_top_builddir@/@PACKAGE_TARNAME@-@PACKAGE_VERSION@ - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test - -EXCLUDE_SYMBOLS = roboptim::detail - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = @abs_top_srcdir@/tests - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = @abs_top_srcdir@/doc - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command <filter> <input-file>, where <filter> -# is the value of the INPUT_FILTER tag, and <input-file> is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. -# If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. -# Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. -# The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. -# Otherwise they will link to the documentation. - -REFERENCES_LINK_SOURCE = YES - -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = YES - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = @PACKAGE_TARNAME@ - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = @abs_top_srcdir@/doc/header.html - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = @abs_top_srcdir@/doc/footer.html - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = @abs_top_srcdir@/doc/package.css - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox -# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). - -HTML_DYNAMIC_SECTIONS = YES - -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. -# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. - -GENERATE_DOCSET = NO - -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) -# can be grouped. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen -# will append .docset to the name. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING -# is used to encode HtmlHelp index (hhk), content (hhc) and project file -# content. - -CHM_INDEX_ENCODING = - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER -# are set, an additional index file will be generated that can be used as input for -# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated -# HTML documentation. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can -# be used to specify the file name of the resulting .qch file. -# The path specified is relative to the HTML output folder. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#namespace - -QHP_NAMESPACE = - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#virtual-folders - -QHP_VIRTUAL_FOLDER = doc - -# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. -# For more information please see -# http://doc.trolltech.com/qthelpproject.html#custom-filters - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see -# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's -# filter section matches. -# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>. - -QHP_SECT_FILTER_ATTRS = - -# If the GENERATE_QHP tag is set to YES, the ... [truncated message content] |
From: Thomas M. <tho...@us...> - 2009-08-24 20:30: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, better-traj-interface has been created at ad4975455e4cdfab7a872bc5eef2b92b80300cad (commit) - Log ----------------------------------------------------------------- commit ad4975455e4cdfab7a872bc5eef2b92b80300cad Author: Thomas Moulard <tho...@gm...> Date: Wed Jun 24 13:17:29 2009 +0900 Make Trajectory and Spline use DerivableParametrizedFunction. * include/roboptim/trajectory/fwd.hh, * include/roboptim/trajectory/spline.hh, * include/roboptim/trajectory/trajectory.hh, * include/roboptim/trajectory/trajectory.hxx, * src/spline.cc: Change interface to match parametrized derivable function concept. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 37c50b9..6b3cbba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-06-24 Thomas Moulard <tho...@gm...> + + Make Trajectory and Spline use DerivableParametrizedFunction. + * include/roboptim/trajectory/fwd.hh, + * include/roboptim/trajectory/spline.hh, + * include/roboptim/trajectory/trajectory.hh, + * include/roboptim/trajectory/trajectory.hxx, + * src/spline.cc: Change interface to match + parametrized derivable function concept. + 2009-06-16 Thomas Moulard <tho...@gm...> Regenerate test suite output on 32-bits machine. diff --git a/include/roboptim/trajectory/fwd.hh b/include/roboptim/trajectory/fwd.hh index 584fb66..aadc122 100644 --- a/include/roboptim/trajectory/fwd.hh +++ b/include/roboptim/trajectory/fwd.hh @@ -20,7 +20,7 @@ namespace roboptim { - template <unsigned dorder> + template <typename IF> class Trajectory; template <typename T> diff --git a/include/roboptim/trajectory/spline.hh b/include/roboptim/trajectory/spline.hh index 8db372c..7550201 100644 --- a/include/roboptim/trajectory/spline.hh +++ b/include/roboptim/trajectory/spline.hh @@ -17,6 +17,7 @@ #ifndef ROBOPTIM_TRAJECTORY_SPLINE_HH # define ROBOPTIM_TRAJECTORY_SPLINE_HH +# include <roboptim/core/n-times-derivable-function.hh> # include <roboptim/trajectory/trajectory.hh> # include <roboptim/trajectory/fwd.hh> @@ -26,15 +27,122 @@ class bspline; namespace roboptim { + namespace detail + { + class SplineConfiguration : NTimesDerivableFunction<4> + { + friend class Spline; + public: + /// \brief Parent type. + typedef NTimesDerivableFunction<4> parent_t; + /// \brief Import value type. + typedef parent_t::value_type value_type; + /// \brief Import size type. + typedef parent_t::size_type size_type; + /// \brief Import vector type. + typedef parent_t::vector_t vector_t; + /// \brief Import matrix type. + typedef parent_t::matrix_t matrix_t; + /// \brief Import result type. + typedef parent_t::result_t result_t; + /// \brief Import argument type. + typedef parent_t::argument_t argument_t; + /// \brief Import gradient type. + typedef parent_t::vector_t gradient_t; + /// \brief Import jacobian type. + typedef parent_t::matrix_t jacobian_t; + /// \brief Import jacobian size type. + typedef parent_t::matrix_t jacobianSize_t; + /// \brief Import interval type. + typedef parent_t::interval_t interval_t; + + /// \name Accessing parameters, and state. + /// \{ + + const vector_t& parameters () const throw () + { + return parameters_; + } + + interval_t timeRange () const throw (); + value_type length () const throw (); + /// \} + + + /// \name Singular points + /// \{ + + /// \brief Get number of singular points + size_type singularPoints () const throw (); + + /// \brief Get singular point at given rank. + value_type singularPointAtRank (size_type rank) const; + + /// \brief Get left limit value of derivative at given singular point + /// + /// \param rank rank of the singular points. + /// \param order order of derivation. + /// \return Limit of the derivative at singular point + /// for increasing parameter values. + vector_t derivBeforeSingularPoint (size_type rank, size_type order) const; + + /// \brief Get right limit value of derivative at given singular point + /// \param rank rank of the singular points. + /// \param order order of derivation. + /// \retval derivative Limit of the derivative at singular point for + /// decreasing parameter values. + vector_t derivAfterSingularPoint (size_type rank, size_type order) const; + + /// \} + + protected: + SplineConfiguration (interval_t tr, + size_type outputSize, + const vector_t& parameters) throw (); + SplineConfiguration (const SplineConfiguration& cfg) throw (); + + ~SplineConfiguration () throw (); + + void impl_compute (result_t&, double) const throw (); + void impl_derivative (gradient_t& g, double x, size_type order) + const throw (); + + private: + /// \brief Update spline parameters. + void setParameters (const vector_t& p) throw (); + + /// \brief Convert parameters to internal representation. + /// \return internal parameter representation + vector_t makeBSplineVector (); + + + /// \brief Pointer to internal spline implementation. + bspline* spline_; + /// \brief Number of control points. + int nbp_; + /// \brief Spline parameters. + vector_t parameters_; + /// \brief Trajectory time interval. + interval_t timeRange_; + /// \brief Number of singular points. + size_type singularPoints_; + }; + + } // end of namespace detail + /// \addtogroup roboptim_function /// @{ /// \brief Spline trajectory. /// /// Implement B-Spline. - class Spline : public Trajectory<4> + class Spline : public Trajectory<detail::SplineConfiguration> { public: + /// \brief Import interval type. + typedef Function::interval_t interval_t; + + /// \brief Instantiate a Spline from its definition. /// /// Instantiate a Spline from its triplet definition: @@ -52,8 +160,7 @@ namespace roboptim /// \param timeRange spline time range /// \param dimension spline dimension /// \param parameters vector of parameters defining control points - Spline (interval_t timeRange, size_type dimension, - const vector_t& parameters) throw (); + Spline (size_type inputSize, size_type outputSize) throw (); /// \brief Copy constructor. /// \param spline spline that will be copied @@ -61,18 +168,6 @@ namespace roboptim virtual ~Spline () throw (); - /// \brief Modify spline parameters. - virtual void setParameters (const vector_t&) throw (); - - virtual jacobian_t variationConfigWrtParam (double t) const throw (); - virtual jacobian_t variationDerivWrtParam (double t, size_type order) - const throw (); - virtual value_type singularPointAtRank (size_type rank) const; - virtual vector_t derivBeforeSingularPoint (size_type rank, size_type order) - const; - virtual vector_t derivAfterSingularPoint (size_type rank, size_type order) - const; - /// \brief Display the function on the specified output stream. /// /// \param o output stream used for display @@ -80,19 +175,11 @@ namespace roboptim virtual std::ostream& print (std::ostream& o) const throw (); protected: - void impl_compute (result_t&, double) const throw (); - void impl_derivative (gradient_t& g, double x, size_type order) - const throw (); - - private: - /// \brief Convert parameters to internal representation. - /// \return internal parameter representation - vector_t makeBSplineVector (); - - /// \brief Number of control points. - int nbp_; - /// \brief Pointer to internal spline implementation. - bspline* spline_; + result_t impl_compute (const argument_t& parameter) const throw (); + void impl_gradient (gradient_t& gradient, + const argument_t& argument, + size_type functionId = 0, + size_type order = 0) const throw (); }; /// Example shows Spline use. diff --git a/include/roboptim/trajectory/trajectory.hh b/include/roboptim/trajectory/trajectory.hh index a3d93f8..f41f206 100644 --- a/include/roboptim/trajectory/trajectory.hh +++ b/include/roboptim/trajectory/trajectory.hh @@ -20,6 +20,7 @@ # include <utility> # include <roboptim/trajectory/fwd.hh> +# include <roboptim/core/derivable-parametrized-function.hh> # include <roboptim/core/n-times-derivable-function.hh> namespace roboptim @@ -35,18 +36,18 @@ namespace roboptim /// - to a vector space \f$\textbf{R}^n\f$: /** \f[ \begin{array}{llll} - \Gamma: & [t_{min}, t_{max}] \times \textbf{R}^m & \rightarrow & \textbf{R}^n \\ + \Gamma: & [t_{min}, t_{max}] \times \textbf{R}^m & \rightarrow & \textbf{R}^n\\ & (t, \textbf{p}) & \rightarrow & \Gamma_{\textbf{p}}(t) \end{array} \f]*/ /// /// \tparam DerivabilityOrder derivability order - template <unsigned DerivabilityOrder> - class Trajectory : public NTimesDerivableFunction<DerivabilityOrder> + template <typename IF> + class Trajectory : public DerivableParametrizedFunction<IF> { public: /// \brief Parent type. - typedef NTimesDerivableFunction<DerivabilityOrder> parent_t; + typedef DerivableParametrizedFunction<IF> parent_t; /// \brief Import value type. typedef typename parent_t::value_type value_type; @@ -56,111 +57,11 @@ namespace roboptim typedef typename parent_t::vector_t vector_t; /// \brief Import jacobian type. typedef typename parent_t::jacobian_t jacobian_t; - /// \brief Import interval type. - typedef typename parent_t::interval_t interval_t; - - Trajectory (interval_t, size_type, const vector_t&) throw (); + Trajectory (size_type inputSize, size_type outputSize) throw (); virtual ~Trajectory () throw (); - /// \name Accessing parameters, and state. - /// \{ - - const vector_t& parameters () const throw (); - virtual void setParameters (const vector_t&) throw (); - - interval_t timeRange () const throw (); - value_type length () const throw (); - - /// \brief Get state along trajectory - /// - /// \param t value \f$t\f$ in the definition interval. - /// \param order the higher order \f$r\f$ of the required derivative - /// \return the state defined as the vector containing the - /// config and first derivatives: - /** \f[ -\textbf{X}(t) = \left(\Gamma_{\textbf{p}}(t), -\frac{d\Gamma_{\textbf{p}}}{dt}(t),\cdots, -\frac{d^{r}\Gamma_{\textbf{p}}}{dt^{r}}(t)\right) - \f]*/ - /// The configuration and derivatives are concatenated in one vector. - virtual vector_t state (double t, size_type order) const throw (); - - /// \} - - /// \name Accessing parameters and gradients - /// \{ - - /// \brief Get the variation of a configuration with respect to parameter - /// vector. - /// \param t value \f$t\f$ in the definition interval. - /// \return Jacobian: - /// \f[\frac{\partial\Gamma_{\textbf{p}}(t)}{\partial\textbf{p}}\f] - virtual jacobian_t variationConfigWrtParam (double t) const throw () = 0; - - /// \brief Get the variation of a derivative with respect to parameter - /// vector. - /// - /// \param t value \f$t\f$ in the definition interval. - /// \param order order \f$r\f$ of the derivative. - /// \return jacobian - /** \f[ -\frac{\partial}{\partial\textbf{p}} -\left(\frac{d^r\Gamma_{\textbf{p}}}{dt^r}(t)\right) - \f]*/ - virtual jacobian_t variationDerivWrtParam (double t, size_type order) - const throw () = 0; - - /// \brief Get the variation of the state with respect to parameter vector - /// - /// \param t value \f$t\f$ in the definition interval. - /// \param order order \f$r\f$ of the derivative. - /// \return jacobian - /** \f[ -\left(\begin{array}{c}\frac{\partial}{\partial \lambda} - \Gamma_{\textbf{p}}(t) \\ - \vdots \\ - \frac{\partial}{\partial \lambda}\frac{d\Gamma_{\textbf{p}}^r}{dt^r}(t) -\end{array}\right) - \f]**/ - - jacobian_t variationStateWrtParam (double t, size_type order) const throw (); - - /// \} - - - /// \name Singular points - /// \{ - - /// \brief Get number of singular points - size_type singularPoints () const throw (); - - /// \brief Get singular point at given rank. - virtual value_type singularPointAtRank (size_type rank) const = 0; - - /// \brief Get left limit value of derivative at given singular point - /// - /// \param rank rank of the singular points. - /// \param order order of derivation. - /// \return Limit of the derivative at singular point - /// for increasing parameter values. - virtual vector_t derivBeforeSingularPoint (size_type rank, size_type order) - const = 0; - - /// \brief Get right limit value of derivative at given singular point - /// \param rank rank of the singular points. - /// \param order order of derivation. - /// \retval derivative Limit of the derivative at singular point for - /// decreasing parameter values. - virtual vector_t derivAfterSingularPoint (size_type rank, size_type order) - const = 0; - /// \} - virtual std::ostream& print (std::ostream&) const throw (); - protected: - interval_t timeRange_; - vector_t parameters_; - size_type singularPoints_; }; /// @} diff --git a/include/roboptim/trajectory/trajectory.hxx b/include/roboptim/trajectory/trajectory.hxx index 86a4aa6..54e86e8 100644 --- a/include/roboptim/trajectory/trajectory.hxx +++ b/include/roboptim/trajectory/trajectory.hxx @@ -20,105 +20,19 @@ namespace roboptim { - template <unsigned dorder> - Trajectory<dorder>::Trajectory (interval_t tr, - size_type outputSize, - const vector_t& p) + template <typename IF> + Trajectory<IF>::Trajectory (size_type inputSize, size_type outputSize) throw () - : parent_t (outputSize), - timeRange_ (tr), - parameters_ (p), - singularPoints_ () - { - //FIXME: can a trajectory be a single point? - assert (tr.first <= tr.second); - } - - - template <unsigned dorder> - Trajectory<dorder>::~Trajectory () throw () - { - } - - - template <unsigned dorder> - const typename Trajectory<dorder>::vector_t& - Trajectory<dorder>::parameters () const throw () - { - return parameters_; - } - - - template <unsigned dorder> - void - Trajectory<dorder>::setParameters (const vector_t& p) throw () - { - parameters_ = p; - } - - - template <unsigned dorder> - typename Trajectory<dorder>::interval_t - Trajectory<dorder>::timeRange () const throw () - { - return timeRange_; - } - - template <unsigned dorder> - typename Trajectory<dorder>::value_type - Trajectory<dorder>::length () const throw () - { - return timeRange ().second - timeRange ().first; - } - - - template <unsigned dorder> - typename Trajectory<dorder>::vector_t - Trajectory<dorder>::state (double t, size_type order) const throw () - { - size_type dimension = this->outputSize (); - vector_t result ((order + 1) * dimension); - - for (size_type o = 0; o <= order; ++o) - { - vector_t df = derivative (t, o); - for (size_type i = 0; i < dimension; ++i) - result (i + dimension * o) = df (i); - } - return result; - } + : parent_t (inputSize, 1, outputSize) + {} + template <typename IF> + Trajectory<IF>::~Trajectory () throw () + {} - template <unsigned dorder> - typename Trajectory<dorder>::jacobian_t - Trajectory<dorder>::variationStateWrtParam (double t, size_type order) - const throw () - { - size_type dimension = this->outputSize (); - size_type parameterSize = parameters ().size (); - jacobian_t result ((dimension + 1) * order, parameterSize); - - for (size_type o = 0; o <= order; ++o) - { - jacobian_t jacobian = variationDerivWrtParam (t, order); - for (size_type i = 0; i < dimension; ++i) - for (size_type j = 0; j < parameterSize; ++j) - result (i + dimension * order, j) = jacobian (i, j); - } - return result; - } - - - template <unsigned dorder> - typename Trajectory<dorder>::size_type - Trajectory<dorder>::singularPoints () const throw () - { - return singularPoints_; - } - - template <unsigned dorder> + template <typename IF> std::ostream& - Trajectory<dorder>::print (std::ostream& o) const throw () + Trajectory<IF>::print (std::ostream& o) const throw () { o << "Generic (abstract) trajectory." << std::endl; return o; diff --git a/src/spline.cc b/src/spline.cc index 8a767bf..22ecd7c 100644 --- a/src/spline.cc +++ b/src/spline.cc @@ -23,190 +23,199 @@ namespace roboptim { - //FIXME: defined_lc_in has to be true (false untested). - Spline::Spline (interval_t tr, size_type outputSize, const vector_t& p) - throw () - : Trajectory<4> (tr, outputSize, p), - spline_ (), - nbp_ (p.size () / outputSize) + namespace detail { - // Can not work with a smalle parameters vector. - assert (parameters_.size () >= 4); - - // - assert (parameters_.size () >= 2 * outputSize - && parameters_.size () % outputSize == 0); - - //FIXME: check params here. - spline_ = new bspline (outputSize, nbp_ + 4, 1, true, true, true); - - setParameters (p); - } - - Spline::Spline (const Spline& spline) throw () - : Trajectory<4> (spline.timeRange (), spline.outputSize (), - spline.parameters ()), - spline_ (), - nbp_ (spline.parameters ().size () / spline.outputSize ()) - { - // Can not work with a smalle parameters vector. - assert (parameters_.size () >= 4); - - assert (parameters_.size () >= 2 * spline.outputSize () - && parameters_.size () % spline.outputSize () == 0); - - //FIXME: check params here. - spline_ = new bspline (spline.outputSize (), nbp_ + 4, 1, - true, true, true); - - setParameters (spline.parameters ()); - } - + //FIXME: defined_lc_in has to be true (false untested). + SplineConfiguration::SplineConfiguration (interval_t tr, + size_type outputSize, + const vector_t& parameters) + throw () + : NTimesDerivableFunction<4> (outputSize), + spline_ (), + nbp_ (parameters.size () / outputSize), + parameters_ (parameters), + timeRange_ (tr), + singularPoints_ () + { + //FIXME: can a trajectory be a single point? + assert (tr.first <= tr.second); + + // Can not work with a smalle parameters vector. + assert (parameters_.size () >= 4); + + // Check that parameter size is compatible. + assert (parameters_.size () >= 2 * outputSize + && parameters_.size () % outputSize == 0); + + //FIXME: check params here. + spline_ = new bspline (outputSize, nbp_ + 4, 1, true, true, true); + + setParameters (parameters); + } + + SplineConfiguration::SplineConfiguration (const SplineConfiguration& cfg) + throw () + : NTimesDerivableFunction<4> (cfg.outputSize ()), + spline_ (), + nbp_ (cfg.parameters ().size () / cfg.outputSize ()), + parameters_ (cfg.parameters ()), + timeRange_ (cfg.timeRange ()), + singularPoints_ (cfg.singularPoints ()) + { + spline_ = new bspline (cfg.outputSize (), nbp_ + 4, 1, true, true, true); + setParameters (cfg.parameters ()); + } + + SplineConfiguration::~SplineConfiguration () throw () + { + delete spline_; + } + + void + SplineConfiguration::setParameters (const vector_t& p) throw () + { + assert (p.size () == parameters_.size ()); + parameters_ = p; + + // Initialized by convert_parameters. + vector_t pos_init (outputSize ()); + vector_t final_pos (outputSize ()); + double l = 0.; + matrix_t mp (outputSize (), nbp_ - 2); + + vector_t splineParams = makeBSplineVector (); + + spline_->convert_parameters_x2P (&splineParams[0], + &mp, + pos_init, + final_pos, + l); + spline_->def_parameters (&mp, pos_init, final_pos, l); + } + + SplineConfiguration::interval_t + SplineConfiguration::timeRange () const throw () + { + return timeRange_; + } + + SplineConfiguration::value_type + SplineConfiguration::length () const throw () + { + return timeRange ().second - timeRange ().first; + } + + SplineConfiguration::size_type + SplineConfiguration::singularPoints () const throw () + { + return singularPoints_; + } + + void + SplineConfiguration::impl_compute (result_t& derivative, double t) const + throw () + { + assert (timeRange ().first <= t && t <= timeRange ().second); + this->derivative (derivative, t, 0); + } + + void + SplineConfiguration::impl_derivative (gradient_t& derivative, + double t, + size_type order) + const throw () + { + assert (timeRange ().first <= t && t <= timeRange ().second); + switch (order) + { + case 0: + spline_->calc_fun (t, &derivative); + break; + case 1: + spline_->calc_dfun (t, &derivative); + break; + case 2: + spline_->calc_ddfun(t, &derivative); + break; + default: + assert (0); + } + } + + SplineConfiguration::vector_t + SplineConfiguration::makeBSplineVector () + { + vector_t res (parameters_.size () + 1); + + for (size_type i = 0; i < parameters_.size (); ++i) + res[i] = parameters_[i]; + res[parameters_.size ()] = length (); + return res; + } + + } // end of namespace detail + + + Spline::Spline (size_type inputSize, size_type outputSize) + throw () + : Trajectory<detail::SplineConfiguration> (inputSize, outputSize) + {} Spline::~Spline () throw () - { - delete spline_; - } - - void - Spline::setParameters (const vector_t& p) throw () - { - assert (p.size () == parameters_.size ()); - parameters_ = p; - - // Initialized by convert_parameters. - vector_t pos_init (outputSize ()); - vector_t final_pos (outputSize ()); - double l = 0.; - matrix_t mp (outputSize (), nbp_ - 2); - - vector_t splineParams = makeBSplineVector (); - - spline_->convert_parameters_x2P (&splineParams[0], - &mp, - pos_init, - final_pos, - l); - spline_->def_parameters (&mp, pos_init, final_pos, l); - } - - void - Spline::impl_compute (result_t& derivative, double t) const throw () - { - assert (timeRange ().first <= t && t <= timeRange ().second); - this->derivative (derivative, t, 0); - } + {} void - Spline::impl_derivative (gradient_t& derivative, double t, size_type order) - const throw () - { - assert (timeRange ().first <= t && t <= timeRange ().second); - switch (order) - { - case 0: - spline_->calc_fun (t, &derivative); - break; - case 1: - spline_->calc_dfun (t, &derivative); - break; - case 2: - spline_->calc_ddfun(t, &derivative); - break; - default: - assert (0); - } - } - - Spline::jacobian_t - Spline::variationConfigWrtParam (double t) const throw () - { - return variationDerivWrtParam (t, 0.); - } - - Spline::jacobian_t - Spline::variationDerivWrtParam (double t, size_type order) - const throw () - { - assert (timeRange ().first <= t && t <= timeRange ().second); - matrix_t fun (outputSize (), 1); - - vector_t all_t (1); - all_t[0] = t; - - ublas::matrix<ublas::vector<double> > fun_grad (outputSize (), 1); - for (size_type i = 0; i < outputSize (); ++i) - fun_grad (i, 0).resize (5); - - switch (order) - { - case 0: - spline_->calc_fun_grad (&all_t, &fun, &fun_grad, 1); - break; - case 1: - spline_->calc_dfun_grad (&all_t, &fun, &fun_grad, 1); - break; - - case 2: - spline_->calc_ddfun_grad (&all_t, &fun, &fun_grad, 1); - break; - default: - assert (0); - } - - ublas::matrix<ublas::vector<double> > tmp (outputSize (), 1); - for (size_type i = 0; i < outputSize (); ++i) - tmp (i, 0).resize (parameters_.size ()+1); - - spline_->uncompress_grad (&all_t, - &fun_grad, - &tmp, - 1); - - jacobian_t jac (outputSize (), nbp_ * outputSize ()); - for (size_type i = 0; i < outputSize (); ++i) - for (size_type j = 0; j < nbp_ * outputSize (); ++j) - jac (i, j) = tmp (i, 0)[j]; - - return jac; - } - - Spline::value_type - Spline::singularPointAtRank (size_type rank) const + Spline::impl_gradient (gradient_t& gradient, + const argument_t& argument, + size_type functionId, + size_type order) const throw () { - return rank * length () / spline_->get_Nint (); - } - - Spline::vector_t - Spline::derivBeforeSingularPoint (size_type rank, size_type order) const - { - return derivative (singularPointAtRank (rank), order); - } - - Spline::vector_t - Spline::derivAfterSingularPoint (size_type rank, size_type order) const - { - return derivative (singularPointAtRank (rank), order); - } - - Spline::vector_t - Spline::makeBSplineVector () - { - vector_t res (parameters_.size () + 1); - - for (size_type i = 0; i < parameters_.size (); ++i) - res[i] = parameters_[i]; - res[parameters_.size ()] = length (); - return res; +// assert (timeRange ().first <= t && t <= timeRange ().second); +// matrix_t fun (outputSize (), 1); + +// vector_t all_t (1); +// all_t[0] = t; + +// ublas::matrix<ublas::vector<double> > fun_grad (outputSize (), 1); +// for (size_type i = 0; i < outputSize (); ++i) +// fun_grad (i, 0).resize (5); + +// switch (order) +// { +// case 0: +// spline_->calc_fun_grad (&all_t, &fun, &fun_grad, 1); +// break; +// case 1: +// spline_->calc_dfun_grad (&all_t, &fun, &fun_grad, 1); +// break; +// case 2: +// spline_->calc_ddfun_grad (&all_t, &fun, &fun_grad, 1); +// break; +// default: +// assert (0); +// } + +// ublas::matrix<ublas::vector<double> > tmp (outputSize (), 1); +// for (size_type i = 0; i < outputSize (); ++i) +// tmp (i, 0).resize (parameters_.size ()+1); + +// spline_->uncompress_grad (&all_t, +// &fun_grad, +// &tmp, +// 1); + +// jacobian_t jac (outputSize (), nbp_ * outputSize ()); +// for (size_type i = 0; i < outputSize (); ++i) +// for (size_type j = 0; j < nbp_ * outputSize (); ++j) +// jac (i, j) = tmp (i, 0)[j]; + +// return jac; } std::ostream& Spline::print (std::ostream& o) const throw () { - o << "Spline" << incindent << std::endl - << "Number of parameters per spline function: " << nbp_ << std::endl - << "Length: " << length () - << decindent; + o << "Spline"; return o; } } // end of namespace roboptim. ----------------------------------------------------------------------- hooks/post-receive -- roboptim-trajectory |
From: Thomas M. <tho...@us...> - 2009-08-24 20:29:08
|
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 1adc664ea6e3abb9ed863daa215c97ecd804dfe9 (commit) via a4c0ae5c5abdeb342c624aff520b52eff58c6645 (commit) via dface2e4e1975273c586d56bdc19a4b38850af64 (commit) via db02462df3dc8314049ea27af497246d2601ad75 (commit) via f3f81b4dc599aed5f5427ac75d29141d1f327054 (commit) via 528faeec205f8e035f93e61a9c04463650cde983 (commit) via c45b6e23396f8037de03358a9d1fd585ced356cc (commit) via b01b5849765e67833cdf09c435d51fc7d8f6a933 (commit) via ec52cd4e8386ecd09afc7d1f1446dde284a90922 (commit) via 2beaa3219af53d21f6fa7b960a43956f59670e83 (commit) via f15fb90f5aeb0262b307247ee62634b61554136b (commit) via e9a54e67b0b23d485001fcfb2817a7291164e474 (commit) via 321791490879daf730f3fdeca0066fe9e8bd5dbc (commit) via 3b4fb66ad11ca7a7d1caa129a8d450b698fb1c64 (commit) via 688a96642f62df945aedd6131f2a3fedcd691f57 (commit) via 11a7128df54cd55b4eae4dd1e4f4221c1f5b89c0 (commit) via dd343fac898690c84cc559a0a0d3ba8594b85bc4 (commit) via c64367d70b9f2cd243d891e327c0052ed370a3d7 (commit) via 8674083ce1db37460ea68cb417246e7ec0391760 (commit) via 987bd9e9a72a8c3872b65f6d891ea0613be40d48 (commit) via 8e190905b910ff81c30a033131093b53e0313bc9 (commit) via b89ab203726b88d848dcc73d0a19974cffd23cc4 (commit) via e4b5e055fedcdbbea796c4a9e1906797c6a3a80d (commit) via 446b079da8ecddba29ec5f6de1dfa7b124d97768 (commit) via 039b3c468ee818fbe7e45adb59bcdcbe41a06c35 (commit) via 3d498c506a744e5483a718a2d170e32904eb3d28 (commit) via 61dcb996cf6ac63c7693b55f4360e17ed8df817d (commit) via 2ddf255b5c6c2b32281f942e5cb39b254960b34e (commit) via 8411f443050b1c8798780715840b0fd9760fbd78 (commit) via aabec11cdc7ed392bf9acbb4cdcca48797ed2bc6 (commit) via 2fc502c861366f2cd71fd4e3a07e79922de3d192 (commit) via d97c3e3e0f4df22c4a3640487b919b78a0a15621 (commit) via 0f165007c39679946ea7cfbdb5095ab23a7a76cf (commit) from 1659ebcc0c6ae966d77e0519d95baa88216941d9 (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 1adc664ea6e3abb9ed863daa215c97ecd804dfe9 Author: Thomas Moulard <tho...@gm...> Date: Thu Aug 20 13:37:59 2009 +0900 Fix limit-omega. * include/roboptim/trajectory/limit-omega.hxx: Compute using finite difference for now. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 91f8a84..6dff36f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-08-20 Thomas Moulard <tho...@gm...> + + Fix limit-omega. + * include/roboptim/trajectory/limit-omega.hxx: Compute + using finite difference for now. + 2009-08-17 Thomas Moulard <tho...@gm...> Use boost::shared_ptr to store function in StateCost. diff --git a/include/roboptim/trajectory/limit-omega.hxx b/include/roboptim/trajectory/limit-omega.hxx index 6e9afad..a7880ec 100644 --- a/include/roboptim/trajectory/limit-omega.hxx +++ b/include/roboptim/trajectory/limit-omega.hxx @@ -78,10 +78,8 @@ namespace roboptim LimitOmega<T>::impl_gradient (gradient_t& grad, const argument_t& p, size_type i) const throw () { - using namespace boost::numeric::ublas; - static T updatedTrajectory = trajectory_; - updatedTrajectory.setParameters (p); - grad = column (updatedTrajectory.variationDerivWrtParam (timePoint_, 1), 0); + FiniteDifferenceGradient fd (*this); + fd.gradient (grad, p, i); } } // end of namespace roboptim. commit a4c0ae5c5abdeb342c624aff520b52eff58c6645 Author: Thomas Moulard <tho...@gm...> Date: Mon Aug 17 20:08:54 2009 +0900 Use boost::shared_ptr to store function in StateCost. * include/roboptim/trajectory/state-cost.hh, * include/roboptim/trajectory/state-cost.hxx: Use shared pointer. * tests/anthropomorphic-cost-function.cc, * tests/state-cost.cc: Use new interface. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index b335e26..91f8a84 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2009-08-17 Thomas Moulard <tho...@gm...> + Use boost::shared_ptr to store function in StateCost. + * include/roboptim/trajectory/state-cost.hh, + * include/roboptim/trajectory/state-cost.hxx: Use shared pointer. + * tests/anthropomorphic-cost-function.cc, + * tests/state-cost.cc: Use new interface. + +2009-08-17 Thomas Moulard <tho...@gm...> + Reimplement speed limits using StateCost. * include/Makefile.am: Remove frontal-speed.hxx, orthogonal-speed.hxx. * include/roboptim/trajectory/anthropomorphic-cost-function.hxx, diff --git a/include/roboptim/trajectory/state-cost.hh b/include/roboptim/trajectory/state-cost.hh index d736653..6950e3d 100644 --- a/include/roboptim/trajectory/state-cost.hh +++ b/include/roboptim/trajectory/state-cost.hh @@ -50,7 +50,7 @@ namespace roboptim /// \brief Concrete class should call this constructor. StateCost (const trajectory_t&, - const DerivableFunction&, + boost::shared_ptr<DerivableFunction>, const StableTimePoint tpt, size_type order = 1) throw (); @@ -60,7 +60,7 @@ namespace roboptim template <typename F, typename CLIST> static void addToProblem (const T& trajectory, - const DerivableFunction& function, + boost::shared_ptr<DerivableFunction> function, unsigned order, Problem<F, CLIST>& problem, typename Function::interval_t bounds, @@ -84,7 +84,7 @@ namespace roboptim private: const trajectory_t& trajectory_; - const DerivableFunction& function_; + boost::shared_ptr<DerivableFunction> function_; StableTimePoint tpt_; size_type order_; }; diff --git a/include/roboptim/trajectory/state-cost.hxx b/include/roboptim/trajectory/state-cost.hxx index 270ecb2..7dc96a3 100644 --- a/include/roboptim/trajectory/state-cost.hxx +++ b/include/roboptim/trajectory/state-cost.hxx @@ -23,19 +23,19 @@ namespace roboptim { template <typename T> StateCost<T>::StateCost (const trajectory_t& trajectory, - const DerivableFunction& function, + boost::shared_ptr<DerivableFunction> function, const StableTimePoint tpt, size_type order) throw () : DerivableFunction (trajectory.parameters ().size (), - function.outputSize (), + function->outputSize (), (boost::format ("state cost using function ``%1%''") - % function.getName ()).str ()), + % function->getName ()).str ()), trajectory_ (trajectory), function_ (function), tpt_ (tpt), order_ (order) { - assert (function_.inputSize () == trajectory_.outputSize () * (order + 1)); + assert (function_->inputSize () == trajectory_.outputSize () * (order + 1)); } template <typename T> @@ -56,8 +56,8 @@ namespace roboptim { static trajectory_t updatedTrajectory = trajectory_; updatedTrajectory.setParameters (p); - function_ (res, updatedTrajectory.state - (tpt_.getTime (updatedTrajectory.timeRange ()), this->order_)); + (*function_) (res, updatedTrajectory.state + (tpt_.getTime (updatedTrajectory.timeRange ()), this->order_)); } template <typename T> @@ -68,7 +68,7 @@ namespace roboptim static trajectory_t updatedTrajectory = trajectory_; updatedTrajectory.setParameters (p); const value_type t = tpt_.getTime (updatedTrajectory.timeRange ()); - grad = prod (function_.gradient (updatedTrajectory.state (t, this->order_), i), + grad = prod (function_->gradient (updatedTrajectory.state (t, this->order_), i), updatedTrajectory.variationStateWrtParam (t, this->order_)); } diff --git a/tests/anthropomorphic-cost-function.cc b/tests/anthropomorphic-cost-function.cc index 6b5d51b..eb41736 100644 --- a/tests/anthropomorphic-cost-function.cc +++ b/tests/anthropomorphic-cost-function.cc @@ -117,14 +117,14 @@ int optimize (double initialX, // Add constraints on speeds. // Frontal - FrontalSpeed frontalSpeed; + boost::shared_ptr<DerivableFunction> frontalSpeed (new FrontalSpeed ()); Function::interval_t vRangeFrontal = Function::makeInterval (0., vMax); StateCost<freeTime_t>::addToProblem (freeTimeTraj, frontalSpeed, 1, problem, vRangeFrontal, nControlPoints * nConstraintsPerCtrlPts); // Orthogonal - OrthogonalSpeed orthogonalSpeed; + boost::shared_ptr<DerivableFunction> orthogonalSpeed (new OrthogonalSpeed ()); Function::interval_t vRangeOrthogonal = Function::makeInterval (-vMax, vMax); StateCost<freeTime_t>::addToProblem (freeTimeTraj, orthogonalSpeed, 1, problem, vRangeOrthogonal, diff --git a/tests/state-cost.cc b/tests/state-cost.cc index a1e13c1..78f0aa6 100644 --- a/tests/state-cost.cc +++ b/tests/state-cost.cc @@ -49,10 +49,10 @@ int run_test () const StableTimePoint timePoint = i / 10. * tMax; const double t = timePoint.getTime (spline.timeRange ()); - FrontalSpeed frontalSpeed; + boost::shared_ptr<DerivableFunction> frontalSpeed (new FrontalSpeed ()); StateCost<Spline> stateCost (spline, frontalSpeed, timePoint, orderMax); - OrthogonalSpeed orthogonalSpeed; + boost::shared_ptr<DerivableFunction> orthogonalSpeed (new OrthogonalSpeed ()); StateCost<Spline> orthoStateCost (spline, orthogonalSpeed, timePoint, orderMax); std::cout << "State cost evaluation:" << std::endl @@ -73,10 +73,10 @@ int run_test () try { std::cout << "Check frontal speed gradient." << std::endl; - checkGradientAndThrow (frontalSpeed, 0, spline.state (t, orderMax)); + checkGradientAndThrow (*frontalSpeed, 0, spline.state (t, orderMax)); std::cout << "Check orthogonal speed gradient." << std::endl; - checkGradientAndThrow (orthogonalSpeed, 0, spline.state (t, orderMax)); + checkGradientAndThrow (*orthogonalSpeed, 0, spline.state (t, orderMax)); std::cout << "Check state cost gradient." << std::endl; checkGradientAndThrow (stateCost, 0, params); commit dface2e4e1975273c586d56bdc19a4b38850af64 Author: Thomas Moulard <tho...@gm...> Date: Mon Aug 17 19:00:52 2009 +0900 Reimplement speed limits using StateCost. * include/Makefile.am: Remove frontal-speed.hxx, orthogonal-speed.hxx. * include/roboptim/trajectory/anthropomorphic-cost-function.hxx, * include/roboptim/trajectory/frontal-speed.hh: Reimplement. * include/roboptim/trajectory/frontal-speed.hxx: Remove. * include/roboptim/trajectory/orthogonal-speed.hh: Reimplement. * include/roboptim/trajectory/orthogonal-speed.hxx: Remove. * include/roboptim/trajectory/trajectory.hxx: Fix state related methods. * include/roboptim/trajectory/visualization/speed.hh: Draw speed properly. * src/Makefile.am: Add new sources. * src/frontal-speed.cc: New. * src/orthogonal-speed.cc: New. * src/spline.cc: Fix documentation. * tests/Makefile.am: Add test case for StateCost. * tests/anthropomorphic-cost-function.cc: Use new speed functions. * tests/spline-time-optimization.cc: Do not write optimization result on stdout. * tests/spline-time-optimization.stdout: Regenerate. * tests/state-cost.cc: New. * tests/state-cost.stdout: New. * tests/testsuite.at: Run new test. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index d6d0caf..b335e26 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,29 @@ 2009-08-17 Thomas Moulard <tho...@gm...> + Reimplement speed limits using StateCost. + * include/Makefile.am: Remove frontal-speed.hxx, orthogonal-speed.hxx. + * include/roboptim/trajectory/anthropomorphic-cost-function.hxx, + * include/roboptim/trajectory/frontal-speed.hh: Reimplement. + * include/roboptim/trajectory/frontal-speed.hxx: Remove. + * include/roboptim/trajectory/orthogonal-speed.hh: Reimplement. + * include/roboptim/trajectory/orthogonal-speed.hxx: Remove. + * include/roboptim/trajectory/trajectory.hxx: Fix state related methods. + * include/roboptim/trajectory/visualization/speed.hh: Draw speed properly. + * src/Makefile.am: Add new sources. + * src/frontal-speed.cc: New. + * src/orthogonal-speed.cc: New. + * src/spline.cc: Fix documentation. + * tests/Makefile.am: Add test case for StateCost. + * tests/anthropomorphic-cost-function.cc: Use new speed functions. + * tests/spline-time-optimization.cc: Do not write optimization result + on stdout. + * tests/spline-time-optimization.stdout: Regenerate. + * tests/state-cost.cc: New. + * tests/state-cost.stdout: New. + * tests/testsuite.at: Run new test. + +2009-08-17 Thomas Moulard <tho...@gm...> + Implement StateCost. * include/roboptim/trajectory/state-cost.hh, * include/roboptim/trajectory/state-cost.hxx: Implement state cost. diff --git a/include/Makefile.am b/include/Makefile.am index cc81c10..57a267d 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -9,14 +9,12 @@ nobase_include_HEADERS = \ roboptim/trajectory/freeze.hh \ roboptim/trajectory/freeze.hxx \ roboptim/trajectory/frontal-speed.hh \ - roboptim/trajectory/frontal-speed.hxx \ roboptim/trajectory/fwd.hh \ roboptim/trajectory/limit-omega.hh \ roboptim/trajectory/limit-omega.hxx \ roboptim/trajectory/limit-speed.hh \ roboptim/trajectory/limit-speed.hxx \ roboptim/trajectory/orthogonal-speed.hh \ - roboptim/trajectory/orthogonal-speed.hxx \ roboptim/trajectory/spline.hh \ roboptim/trajectory/spline-length.hh \ roboptim/trajectory/stable-time-point.hh \ diff --git a/include/roboptim/trajectory/anthropomorphic-cost-function.hxx b/include/roboptim/trajectory/anthropomorphic-cost-function.hxx index b2b9f0c..122fd91 100644 --- a/include/roboptim/trajectory/anthropomorphic-cost-function.hxx +++ b/include/roboptim/trajectory/anthropomorphic-cost-function.hxx @@ -72,12 +72,12 @@ namespace roboptim void operator () (const double& t) { static Function::vector_t t_ (1); - FrontalSpeed<T> frontalSpeed (traj_); - OrthogonalSpeed<T> orthogonalSpeed (traj_); + FrontalSpeed frontalSpeed; + OrthogonalSpeed orthogonalSpeed; t_[0] = t; - const Function::value_type u1 = frontalSpeed.gradient (t_)[0]; + const Function::value_type u1 = frontalSpeed.gradient (traj_.state (t, 1))[0]; const Function::value_type u2 = traj_.derivative (t, 2)[2]; - const Function::value_type u3 = orthogonalSpeed.gradient (t_)[0]; + const Function::value_type u3 = orthogonalSpeed.gradient (traj_.state (t, 1))[0]; res_ += alpha_[0] + alpha_[1] * u1 * u1 diff --git a/include/roboptim/trajectory/frontal-speed.hh b/include/roboptim/trajectory/frontal-speed.hh index 8f4c00c..d9b7c2f 100644 --- a/include/roboptim/trajectory/frontal-speed.hh +++ b/include/roboptim/trajectory/frontal-speed.hh @@ -17,52 +17,21 @@ #ifndef ROBOPTIM_TRAJECTORY_FRONTAL_SPEED_HH # define ROBOPTIM_TRAJECTORY_FRONTAL_SPEED_HH -# include <boost/shared_ptr.hpp> - # include <roboptim/core/derivable-function.hh> -# include <roboptim/trajectory/fwd.hh> namespace roboptim { - template <typename T> class FrontalSpeed : public DerivableFunction { public: - FrontalSpeed (const T& trajectory) throw (); + FrontalSpeed () throw (); ~FrontalSpeed () throw (); protected: void impl_compute (result_t& res, const argument_t& t) const throw (); void impl_gradient (gradient_t& grad, const argument_t& t, size_type i) const throw (); - private: - const T& trajectory_; - }; - - - template <typename T> - class LimitFrontalSpeed : public DerivableFunction - { - public: - LimitFrontalSpeed (StableTimePoint timePoint, - const T& trajectory) throw (); - ~LimitFrontalSpeed () throw (); - - template <typename F, typename CLIST> - static void addToProblem (const T&, - Problem<F, CLIST>&, - typename Function::interval_t, - unsigned); - - protected: - void impl_compute (result_t& res, const argument_t& p) const throw (); - void impl_gradient (gradient_t& grad, const argument_t& p, size_type i) - const throw (); - private: - StableTimePoint timePoint_; - const T& trajectory_; }; } // end of namespace roboptim. -# include <roboptim/trajectory/frontal-speed.hxx> #endif //! ROBOPTIM_TRAJECTORY_FRONTAL_SPEED_HH diff --git a/include/roboptim/trajectory/frontal-speed.hxx b/include/roboptim/trajectory/frontal-speed.hxx deleted file mode 100644 index dee6b47..0000000 --- a/include/roboptim/trajectory/frontal-speed.hxx +++ /dev/null @@ -1,152 +0,0 @@ -// 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/>. - -#ifndef ROBOPTIM_TRAJECTORY_FRONTAL_SPEED_HXX -# define ROBOPTIM_TRAJECTORY_FRONTAL_SPEED_HXX -# include <cmath> -# include <boost/format.hpp> -# include <boost/numeric/ublas/vector.hpp> -# include <boost/scoped_ptr.hpp> - -# include <roboptim/core/finite-difference-gradient.hh> - -# include <roboptim/trajectory/trajectory.hh> - -namespace roboptim -{ - template <typename T> - FrontalSpeed<T>::FrontalSpeed (const T& trajectory) throw () - : DerivableFunction (1, 1, "frontal speed"), - trajectory_ (trajectory) - {} - - template <typename T> - FrontalSpeed<T>::~FrontalSpeed () throw () - {} - - template <typename T> - void - FrontalSpeed<T>::impl_compute (result_t& res, const argument_t& t) const throw () - { - using namespace boost::numeric::ublas; - res.clear (); - - result_t position = trajectory_ (t[0]); - const value_type& theta = position[2]; - - gradient_t speed = trajectory_.derivative (t[0], 1); - const value_type& xdot = speed[0]; - const value_type& ydot = speed[1]; - - res[0] = std::cos (theta) * xdot + std::sin (theta) * ydot; - } - - template <typename T> - void - FrontalSpeed<T>::impl_gradient (gradient_t& grad, const argument_t& t, size_type i) - const throw () - { - - grad.clear (); - - result_t position = trajectory_ (t[0]); - const value_type& theta = position[2]; - - gradient_t speed = trajectory_.derivative (t[0], 1); - const value_type& dx = speed[0]; - const value_type& dy = speed[1]; - const value_type& dtheta = speed[2]; - - gradient_t acceleration = trajectory_.derivative (t[0], 2); - const value_type& ddx = acceleration[0]; - const value_type& ddy = acceleration[1]; - - grad[0] = - std::cos (theta) * (ddx + dtheta * dy) - + std::sin (theta) * (ddy - dtheta * dx); - } - - - - - template <typename T> - LimitFrontalSpeed<T>::LimitFrontalSpeed (StableTimePoint timePoint, - const T& trajectory) throw () - : DerivableFunction (trajectory.parameters ().size (), 1, - (boost::format ("frontal speed limit (%1%)") - % timePoint.getAlpha ()).str ()), - timePoint_ (timePoint), - trajectory_ (trajectory) - { - } - - template <typename T> - LimitFrontalSpeed<T>::~LimitFrontalSpeed () throw () - {} - - template <typename T> - void - LimitFrontalSpeed<T>::impl_compute (result_t& res, const argument_t& p) const throw () - { - static T updatedTrajectory = trajectory_; - static FrontalSpeed<T> frontalSpeed (updatedTrajectory); - static vector_t t (1); - - updatedTrajectory.setParameters (p); - t[0] = this->timePoint_.getTime (updatedTrajectory.timeRange ()); - res = frontalSpeed (t); - } - - template <typename T> - void - LimitFrontalSpeed<T>::impl_gradient (gradient_t& grad, const argument_t& p, size_type i) - const throw () - { - assert (i == 0); - grad.clear (); - - //FIXME: compute gradient analytically. - FiniteDifferenceGradient fdfunction (*this); - fdfunction.gradient (grad, p, 0); - } - - template <typename T> - template <typename F, typename CLIST> - void - LimitFrontalSpeed<T>::addToProblem (const T& trajectory, - Problem<F, CLIST>& problem, - typename Function::interval_t vRange, - unsigned nConstraints) - { - using namespace boost; - - for (unsigned i = 0; i < nConstraints; ++i) - { - const value_type t = (i + 1.) / (nConstraints + 1.); - assert (t > 0. && t < 1.); - shared_ptr<LimitFrontalSpeed> speed - (new LimitFrontalSpeed (t * tMax, trajectory)); - problem.addConstraint - (static_pointer_cast<DerivableFunction> (speed), - vRange); - } - } - -} // end of namespace roboptim. - - -#endif //! ROBOPTIM_TRAJECTORY_FRONTAL_SPEED_HXX diff --git a/include/roboptim/trajectory/orthogonal-speed.hh b/include/roboptim/trajectory/orthogonal-speed.hh index 3a08ad7..3a1804a 100644 --- a/include/roboptim/trajectory/orthogonal-speed.hh +++ b/include/roboptim/trajectory/orthogonal-speed.hh @@ -17,52 +17,21 @@ #ifndef ROBOPTIM_TRAJECTORY_ORTHOGONAL_SPEED_HH # define ROBOPTIM_TRAJECTORY_ORTHOGONAL_SPEED_HH -# include <boost/shared_ptr.hpp> - # include <roboptim/core/derivable-function.hh> -# include <roboptim/trajectory/fwd.hh> namespace roboptim { - template <typename T> class OrthogonalSpeed : public DerivableFunction { public: - OrthogonalSpeed (const T& spline) throw (); + OrthogonalSpeed () throw (); ~OrthogonalSpeed () throw (); protected: void impl_compute (result_t& res, const argument_t& p) const throw (); void impl_gradient (gradient_t& grad, const argument_t& p, size_type i) const throw (); - private: - const T& trajectory_; - }; - - template <typename T> - class LimitOrthogonalSpeed : public DerivableFunction - { - public: - LimitOrthogonalSpeed (StableTimePoint timePoint, - const T& trajectory) throw (); - ~LimitOrthogonalSpeed () throw (); - - template <typename F, typename CLIST> - static void addToProblem (const T&, - Problem<F, CLIST>&, - typename Function::interval_t, - unsigned); - - protected: - void impl_compute (result_t& res, const argument_t& p) const throw (); - void impl_gradient (gradient_t& grad, const argument_t& p, size_type i) - const throw (); - private: - StableTimePoint timePoint_; - const T& trajectory_; }; - } // end of namespace roboptim. -# include <roboptim/trajectory/orthogonal-speed.hxx> #endif //! ROBOPTIM_TRAJECTORY_ORTHOGONAL_SPEED_HH diff --git a/include/roboptim/trajectory/orthogonal-speed.hxx b/include/roboptim/trajectory/orthogonal-speed.hxx deleted file mode 100644 index 6aade93..0000000 --- a/include/roboptim/trajectory/orthogonal-speed.hxx +++ /dev/null @@ -1,146 +0,0 @@ -// 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/>. - -#ifndef ROBOPTIM_TRAJECTORY_ORTHOGONAL_SPEED_HXX -# define ROBOPTIM_TRAJECTORY_ORTHOGONAL_SPEED_HXX -# include <cmath> -# include <boost/format.hpp> -# include <boost/numeric/ublas/vector.hpp> -# include <boost/scoped_ptr.hpp> - -# include <roboptim/core/finite-difference-gradient.hh> - -# include <roboptim/trajectory/trajectory.hh> - -namespace roboptim -{ - template <typename T> - OrthogonalSpeed<T>::OrthogonalSpeed (const T& trajectory) throw () - : DerivableFunction (1, 1, "orthogonal speed"), - trajectory_ (trajectory) - {} - - template <typename T> - OrthogonalSpeed<T>::~OrthogonalSpeed () throw () - {} - - - template <typename T> - void - OrthogonalSpeed<T>::impl_compute (result_t& res, const argument_t& t) const throw () - { - using namespace boost::numeric::ublas; - res.clear (); - - result_t position = trajectory_ (t[0]); - const value_type& theta = position[2]; - - gradient_t speed = trajectory_.derivative (t[0], 1); - const value_type& xdot = speed[0]; - const value_type& ydot = speed[1]; - - res[0] = std::cos (theta) * ydot - std::sin (theta) * xdot; - } - - template <typename T> - void - OrthogonalSpeed<T>::impl_gradient (gradient_t& grad, const argument_t& t, size_type i) - const throw () - { - grad.clear (); - - result_t position = trajectory_ (t[0]); - const value_type& theta = position[2]; - - gradient_t speed = trajectory_.derivative (t[0], 1); - const value_type& dx = speed[0]; - const value_type& dy = speed[1]; - const value_type& dtheta = speed[2]; - - gradient_t acceleration = trajectory_.derivative (t[0], 2); - const value_type& ddx = acceleration[0]; - const value_type& ddy = acceleration[1]; - - grad[0] = - std::cos (theta) * (ddy - dtheta * dx) - - std::sin (theta) * (ddx + dtheta * dy); - } - - - template <typename T> - LimitOrthogonalSpeed<T>::LimitOrthogonalSpeed (StableTimePoint timePoint, - const T& trajectory) throw () - : DerivableFunction (trajectory.parameters ().size (), 1, - (boost::format ("orthogonal speed limit (%1%)") - % timePoint.getAlpha ()).str ()), - timePoint_ (timePoint), - trajectory_ (trajectory) - {} - - template <typename T> - LimitOrthogonalSpeed<T>::~LimitOrthogonalSpeed () throw () - {} - - template <typename T> - void - LimitOrthogonalSpeed<T>::impl_compute (result_t& res, const argument_t& p) const throw () - { - static T updatedTrajectory = trajectory_; - static OrthogonalSpeed<T> orthogonalSpeed (updatedTrajectory); - static vector_t t (1); - - updatedTrajectory.setParameters (p); - t[0] = this->timePoint_.getTime (updatedTrajectory.timeRange ()); - res = orthogonalSpeed (t); - } - - template <typename T> - void - LimitOrthogonalSpeed<T>::impl_gradient (gradient_t& grad, const argument_t& p, size_type i) - const throw () - { - assert (i == 0); - grad.clear (); - - //FIXME: compute gradient analytically. - FiniteDifferenceGradient fdfunction (*this); - fdfunction.gradient (grad, p, 0); - } - - template <typename T> - template <typename F, typename CLIST> - void - LimitOrthogonalSpeed<T>::addToProblem (const T& trajectory, - Problem<F, CLIST>& problem, - typename Function::interval_t vRange, - unsigned nConstraints) - { - using namespace boost; - - for (unsigned i = 0; i < nConstraints; ++i) - { - const value_type t = (i + 1.) / (nConstraints + 1.); - assert (t > 0. && t < 1.); - shared_ptr<DerivableFunction> speed - (new LimitOrthogonalSpeed (t * tMax, trajectory)); - problem.addConstraint (speed, vRange); - } - } -} // end of namespace roboptim. - - -#endif //! ROBOPTIM_TRAJECTORY_ORTHOGONAL_SPEED_HXX diff --git a/include/roboptim/trajectory/trajectory.hxx b/include/roboptim/trajectory/trajectory.hxx index d561332..065530d 100644 --- a/include/roboptim/trajectory/trajectory.hxx +++ b/include/roboptim/trajectory/trajectory.hxx @@ -17,6 +17,8 @@ #ifndef ROBOPTIM_TRAJECTORY_TRAJECTORY_HXX # define ROBOPTIM_TRAJECTORY_TRAJECTORY_HXX +# include <boost/numeric/ublas/matrix_proxy.hpp> +# include <boost/numeric/ublas/vector_proxy.hpp> namespace roboptim { @@ -77,15 +79,13 @@ namespace roboptim typename Trajectory<dorder>::vector_t Trajectory<dorder>::state (double t, size_type order) const throw () { - size_type dimension = this->outputSize (); + using namespace boost::numeric::ublas; + const value_type dimension = this->outputSize (); vector_t result ((order + 1) * dimension); for (size_type o = 0; o <= order; ++o) - { - vector_t df = derivative (t, o); - for (size_type i = 0; i < dimension; ++i) - result (i + dimension * o) = df (i); - } + subrange (result, o * dimension, (o + 1) * dimension) = + this->derivative (t, o); return result; } @@ -95,16 +95,16 @@ namespace roboptim Trajectory<dorder>::variationStateWrtParam (double t, size_type order) const throw () { - size_type dimension = this->outputSize (); - size_type parameterSize = parameters ().size (); - jacobian_t result ((dimension + 1) * order, parameterSize); + using namespace boost::numeric::ublas; + const size_type dimension = this->outputSize (); + const size_type parameterSize = parameters ().size (); + jacobian_t result (dimension * (order + 1), parameterSize); for (size_type o = 0; o <= order; ++o) { - jacobian_t jacobian = variationDerivWrtParam (t, order); - for (size_type i = 0; i < dimension; ++i) - for (size_type j = 0; j < parameterSize; ++j) - result (i + dimension * order, j) = jacobian (i, j); + range xrange (o * dimension, (o + 1) * dimension); + range yrange (0, parameterSize); + project (result, xrange, yrange) = this->variationDerivWrtParam (t, o); } return result; } diff --git a/include/roboptim/trajectory/visualization/speed.hh b/include/roboptim/trajectory/visualization/speed.hh index e04ef06..7567786 100644 --- a/include/roboptim/trajectory/visualization/speed.hh +++ b/include/roboptim/trajectory/visualization/speed.hh @@ -56,31 +56,29 @@ namespace roboptim % traj.getName ()).str (); { - FrontalSpeed<T> frontalSpeed (traj); + FrontalSpeed frontalSpeed; for (double i = step; i < 1. - step; i += step) { StableTimePoint timePoint = i * tMax; - Function::vector_t t_ (1); - t_[0] = timePoint.getTime (traj.timeRange ()); + double t = timePoint.getTime (traj.timeRange ()); str += (format ("%1f %2f\n") - % t_[0] - % frontalSpeed (t_)[0]).str (); + % t + % frontalSpeed (traj.state (t, 1))[0]).str (); } str += "e\n"; } { - OrthogonalSpeed<T> orthogonalSpeed (traj); + OrthogonalSpeed orthogonalSpeed; for (double i = step; i < 1. - step; i += step) { StableTimePoint timePoint = i * tMax; - Function::vector_t t_ (1); - t_[0] = timePoint.getTime (traj.timeRange ()); + double t = timePoint.getTime (traj.timeRange ()); str += (format ("%1f %2f\n") - % t_[0] - % orthogonalSpeed (t_)[0]).str (); + % t + % orthogonalSpeed (traj.state(t, 1))[0]).str (); } str += "e\n"; } @@ -89,11 +87,10 @@ namespace roboptim for (double i = step; i < 1. - step; i += step) { StableTimePoint timePoint = i * tMax; - Function::vector_t t_ (1); - t_[0] = timePoint.getTime (traj.timeRange ()); + double t = timePoint.getTime (traj.timeRange ()); str += (format ("%1f %2f\n") - % t_[0] + % t % traj.derivative (timePoint, 1)[2]).str (); } str += "e\n"; diff --git a/src/Makefile.am b/src/Makefile.am index a4ea844..7be8b1b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -10,6 +10,8 @@ lib_LTLIBRARIES = libroboptim-trajectory.la libroboptim_trajectory_la_SOURCES = \ doc.hh \ + frontal-speed.cc \ + orthogonal-speed.cc \ spline.cc \ spline-length.cc diff --git a/src/frontal-speed.cc b/src/frontal-speed.cc new file mode 100644 index 0000000..9f1bb66 --- /dev/null +++ b/src/frontal-speed.cc @@ -0,0 +1,64 @@ +// 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 <cmath> +#include <roboptim/trajectory/frontal-speed.hh> + +namespace roboptim +{ + FrontalSpeed::FrontalSpeed () throw () + : DerivableFunction (2 * 3, 1, "frontal speed") + {} + + + FrontalSpeed::~FrontalSpeed () throw () + {} + + + void + FrontalSpeed::impl_compute (result_t& res, const argument_t& x) const throw () + { + const value_type& theta = x[2]; + + const value_type& xdot = x[3 + 0]; + const value_type& ydot = x[3 + 1]; + res[0] = std::cos (theta) * xdot + std::sin (theta) * ydot; + } + + + void + FrontalSpeed::impl_gradient (gradient_t& grad, const argument_t& arg, size_type i) + const throw () + { + assert (i == 0); + const value_type& x = arg[0]; + const value_type& y = arg[1]; + const value_type& theta = arg[2]; + const value_type& dx = arg[3 + 0]; + const value_type& dy = arg[3 + 1]; + const value_type& dtheta = arg[3 + 2]; + + // 0, 1, 5 components are null. + grad.clear (); + + grad[2] = std::cos (theta) * dy - std::sin (theta) * dx; + grad[3] = std::cos (theta); + grad[4] = std::sin (theta); + + + } +} // end of namespace roboptim. diff --git a/src/orthogonal-speed.cc b/src/orthogonal-speed.cc new file mode 100644 index 0000000..063111f --- /dev/null +++ b/src/orthogonal-speed.cc @@ -0,0 +1,59 @@ +// 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 <cmath> +#include <roboptim/trajectory/orthogonal-speed.hh> + +namespace roboptim +{ + OrthogonalSpeed::OrthogonalSpeed () throw () + : DerivableFunction (2 * 3, 1, "orthogonal speed") + {} + + OrthogonalSpeed::~OrthogonalSpeed () throw () + {} + + void + OrthogonalSpeed::impl_compute (result_t& res, const argument_t& x) const throw () + { + const value_type& theta = x[2]; + + const value_type& xdot = x[3 + 0]; + const value_type& ydot = x[3 + 1]; + res[0] = std::cos (theta) * ydot - std::sin (theta) * xdot; + } + + + void + OrthogonalSpeed::impl_gradient (gradient_t& grad, const argument_t& arg, size_type i) + const throw () + { + const value_type& x = arg[0]; + const value_type& y = arg[1]; + const value_type& theta = arg[2]; + + const value_type& dx = arg[3 + 0]; + const value_type& dy = arg[3 + 1]; + const value_type& dtheta = arg[3 + 2]; + + grad.clear (); + // 0, 1, 5 components are null. + grad[2] = -1. * (std::cos (theta) * dx + std::sin (theta) * dy); + grad[3] = -std::sin (theta); + grad[4] = std::cos (theta); + } +} // end of namespace roboptim. diff --git a/src/spline.cc b/src/spline.cc index 9d3de11..f4e3722 100644 --- a/src/spline.cc +++ b/src/spline.cc @@ -51,7 +51,7 @@ namespace roboptim spline_ (), nbp_ (spline.parameters ().size () / spline.outputSize ()) { - // Can not work with a smalle parameters vector. + // Can not work with a smaller parameters vector. assert (parameters_.size () >= 4); assert (parameters_.size () >= 2 * spline.outputSize () diff --git a/tests/Makefile.am b/tests/Makefile.am index 82b49fe..692aaea 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -46,6 +46,13 @@ check_PROGRAMS += spline-time-optimization spline_time_optimization_SOURCES = spline-time-optimization.cc $(COMMON_SOURCES) spline_time_optimization_LDADD = $(top_builddir)/src/libroboptim-trajectory.la +# state-cost +check_PROGRAMS += state-cost +state_cost_SOURCES = state-cost.cc $(COMMON_SOURCES) +state_cost_LDADD = $(top_builddir)/src/libroboptim-trajectory.la + + + # anthropomorphic-cost-function-case-1 check_PROGRAMS += anthropomorphic-cost-function-case-1 anthropomorphic_cost_function_case_1_SOURCES = \ @@ -140,4 +147,5 @@ EXTRA_DIST += \ spline-gradient.stdout \ spline-optimization.stdout \ spline-time-optimization.stdout \ - spline.stdout + spline.stdout \ + state-cost.stdout diff --git a/tests/anthropomorphic-cost-function.cc b/tests/anthropomorphic-cost-function.cc index b5366a9..6b5d51b 100644 --- a/tests/anthropomorphic-cost-function.cc +++ b/tests/anthropomorphic-cost-function.cc @@ -35,6 +35,7 @@ #include <roboptim/trajectory/limit-omega.hh> #include <roboptim/trajectory/orthogonal-speed.hh> #include <roboptim/trajectory/spline.hh> +#include <roboptim/trajectory/state-cost.hh> #include <roboptim/trajectory/trajectory-cost.hh> #include <roboptim/trajectory/visualization/trajectory.hh> @@ -116,15 +117,17 @@ int optimize (double initialX, // Add constraints on speeds. // Frontal + FrontalSpeed frontalSpeed; Function::interval_t vRangeFrontal = Function::makeInterval (0., vMax); - LimitFrontalSpeed<freeTime_t>::addToProblem - (freeTimeTraj, problem, vRangeFrontal, + StateCost<freeTime_t>::addToProblem + (freeTimeTraj, frontalSpeed, 1, problem, vRangeFrontal, nControlPoints * nConstraintsPerCtrlPts); // Orthogonal + OrthogonalSpeed orthogonalSpeed; Function::interval_t vRangeOrthogonal = Function::makeInterval (-vMax, vMax); - LimitOrthogonalSpeed<freeTime_t>::addToProblem - (freeTimeTraj, problem, vRangeOrthogonal, + StateCost<freeTime_t>::addToProblem + (freeTimeTraj, orthogonalSpeed, 1, problem, vRangeOrthogonal, nControlPoints * nConstraintsPerCtrlPts); // Omega (theta dot) diff --git a/tests/spline-time-optimization.cc b/tests/spline-time-optimization.cc index 91ef576..f1d58f7 100644 --- a/tests/spline-time-optimization.cc +++ b/tests/spline-time-optimization.cc @@ -116,7 +116,7 @@ int run_test () std::cout << solver << std::endl; solver_t::result_t res = solver.minimum (); - std::cout << res << std::endl; + std::cerr << res << std::endl; FreeTimeTrajectory<Spline::derivabilityOrder> optimizedTrajectory = freeTimeTraj; diff --git a/tests/spline-time-optimization.stdout b/tests/spline-time-optimization.stdout index 4e047f6..94521b2 100644 --- a/tests/spline-time-optimization.stdout +++ b/tests/spline-time-optimization.stdout @@ -675,15 +675,9 @@ CFSQP specific variables: Neqn: 0 Mode: 100 Iprint: 0 - Miter: 500 + Miter: 50 Bigbnd: 1e+10 Eps: 1e-08 Epseqn: 1e-08 Udelta: 1e-08 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) -Result: - Size (input, output): 12, 1 - X: [12](1.41708,1.93056e-33,20.1496,40.0176,60.0117,80.0059,100,119.994,139.988,159.982,179.85,200) - Value: [1](-1.41708) - Constraints values: [110](0.125287,2.0046,10.1483,32.0735,78.3046,162.372,300.815,513.177,822.01,1224.65,1652.09,2077.46,2479.49,2840.04,3144.04,3379.52,3537.61,3612.5,3612.5,3603.23,3595.68,3589.87,3585.77,3583.39,3582.72,3583.77,3586.54,3590.95,3595.47,3599.46,3602.91,3605.84,3608.24,3610.1,3611.43,3612.23,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.23,3611.43,3610.1,3608.24,3605.84,3602.91,3599.46,3595.47,3590.95,3586.54,3583.77,3582.72,3583.39,3585.77,3589.87,3595.68,3603.23,3612.5,3612.5,3537.61,3379.52,3144.04,2840.04,2479.49,2077.46,1652.09,1224.65,822.01,513.177,300.815,162.372,78.3046,32.0735,10.1483,2.0046,0.125287) - Lambda: [110](0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.96365e-05,1.96365e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3.91583e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.96365e-05,1.96365e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3.91583e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.96364e-05,1.96367e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1) diff --git a/tests/state-cost.cc b/tests/state-cost.cc new file mode 100644 index 0000000..a1e13c1 --- /dev/null +++ b/tests/state-cost.cc @@ -0,0 +1,94 @@ +// 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 <roboptim/core/io.hh> +#include <roboptim/core/finite-difference-gradient.hh> + +#include <roboptim/trajectory/frontal-speed.hh> +#include <roboptim/trajectory/orthogonal-speed.hh> +#include <roboptim/trajectory/spline.hh> +#include <roboptim/trajectory/state-cost.hh> + +using namespace roboptim; + +int run_test () +{ + const unsigned orderMax = 1; + Spline::vector_t params (12); + + // Initial position. + params[0] = 0., params[1] = 0., params[2] = 0.; + // Control point 1. + params[3] = 25., params[4] = 100., params[5] = 0.; + // Control point 2. + params[6] = 75., params[7] = 0., params[8] = 0.; + // Final position. + params[9] = 100., params[10] = 100., params[11] = 0.; + + Spline::interval_t timeRange = Spline::makeInterval (0., 4.); + Spline spline (timeRange, 3, params, "before"); + + for (unsigned i = 0; i < 10; ++i) + { + const StableTimePoint timePoint = i / 10. * tMax; + const double t = timePoint.getTime (spline.timeRange ()); + + FrontalSpeed frontalSpeed; + StateCost<Spline> stateCost (spline, frontalSpeed, timePoint, orderMax); + + OrthogonalSpeed orthogonalSpeed; + StateCost<Spline> orthoStateCost (spline, orthogonalSpeed, timePoint, orderMax); + + std::cout << "State cost evaluation:" << std::endl + << stateCost (params) << std::endl + << "State cost gradient:" << std::endl + << stateCost.gradient (params) << std::endl + << "Trajectory state (splitted):" << std::endl; + for (unsigned o = 0; o <= orderMax; ++o) + std::cout << spline.derivative (t, o) << std::endl; + std::cout << "Trajectory state (one call):" << std::endl + << spline.state (t, orderMax) << std::endl + << "Trajectory state variation (splitted):" << std::endl; + for (unsigned o = 0; o <= orderMax; ++o) + std::cout << spline.variationDerivWrtParam (t, o) << std::endl; + std::cout << "Trajectory state (one call):" << std::endl + << spline.variationStateWrtParam (t, orderMax) << std::endl; + + try + { + std::cout << "Check frontal speed gradient." << std::endl; + checkGradientAndThrow (frontalSpeed, 0, spline.state (t, orderMax)); + + std::cout << "Check orthogonal speed gradient." << std::endl; + checkGradientAndThrow (orthogonalSpeed, 0, spline.state (t, orderMax)); + + std::cout << "Check state cost gradient." << std::endl; + checkGradientAndThrow (stateCost, 0, params); + } + catch (BadGradient& bg) + { + std::cout << bg << std::endl; + } + std::cout << "\n\n" << std::endl; + } + + return 0; +} + +GENERATE_TEST () diff --git a/tests/state-cost.stdout b/tests/state-cost.stdout new file mode 100644 index 0000000..f0fff6e --- /dev/null +++ b/tests/state-cost.stdout @@ -0,0 +1,200 @@ +State cost evaluation: +[1](0) +State cost gradient: +[12](0,0,0,0,0,0,0,0,0,0,0,0) +Trajectory state (splitted): +[3](0,0,0) +[3](0,0,0) +Trajectory state (one call): +[6](0,0,0,0,0,0) +Trajectory state variation (splitted): +[3,12]((1,0,0,0,0,0,0,0,0,0,0,0),(0,1,0,0,0,0,0,0,0,0,0,0),(0,0,1,0,0,0,0,0,0,0,0,0)) +[3,12]((0,0,0,0,0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0,0,0,0,0)) +Trajectory state (one call): +[6,12]((1,0,0,0,0,0,0,0,0,0,0,0),(0,1,0,0,0,0,0,0,0,0,0,0),(0,0,1,0,0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0,0,0,0,0)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + +State cost evaluation: +[1](3.90625) +State cost gradient: +[12](-0.15625,0,15.2995,0.15625,0,0.325521,0,0,0,0,0,0) +Trajectory state (splitted): +[3](0.520833,2.08333,0) +[3](3.90625,15.625,0) +Trajectory state (one call): +[6](0.520833,2.08333,0,3.90625,15.625,0) +Trajectory state variation (splitted): +[3,12]((0.979167,0,0,0.0208333,0,0,0,0,0,0,0,0),(0,0.979167,0,0,0.0208333,0,0,0,0,0,0,0),(0,0,0.979167,0,0,0.0208333,0,0,0,0,0,0)) +[3,12]((-0.15625,0,0,0.15625,0,0,0,0,0,0,0,0),(0,-0.15625,0,0,0.15625,0,0,0,0,0,0,0),(0,0,-0.15625,0,0,0.15625,0,0,0,0,0,0)) +Trajectory state (one call): +[6,12]((0.979167,0,0,0.0208333,0,0,0,0,0,0,0,0),(0,0.979167,0,0,0.0208333,0,0,0,0,0,0,0),(0,0,0.979167,0,0,0.0208333,0,0,0,0,0,0),(-0.15625,0,0,0.15625,0,0,0,0,0,0,0,0),(0,-0.15625,0,0,0.15625,0,0,0,0,0,0,0),(0,0,-0.15625,0,0,0.15625,0,0,0,0,0,0)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + +State cost evaluation: +[1](15.625) +State cost gradient: +[12](-0.625,0,52.0833,0.625,0,10.4167,0,0,0,0,0,0) +Trajectory state (splitted): +[3](4.16667,16.6667,0) +[3](15.625,62.5,0) +Trajectory state (one call): +[6](4.16667,16.6667,0,15.625,62.5,0) +Trajectory state variation (splitted): +[3,12]((0.833333,0,0,0.166667,0,0,0,0,0,0,0,0),(0,0.833333,0,0,0.166667,0,0,0,0,0,0,0),(0,0,0.833333,0,0,0.166667,0,0,0,0,0,0)) +[3,12]((-0.625,0,0,0.625,0,0,0,0,0,0,0,0),(0,-0.625,0,0,0.625,0,0,0,0,0,0,0),(0,0,-0.625,0,0,0.625,0,0,0,0,0,0)) +Trajectory state (one call): +[6,12]((0.833333,0,0,0.166667,0,0,0,0,0,0,0,0),(0,0.833333,0,0,0.166667,0,0,0,0,0,0,0),(0,0,0.833333,0,0,0.166667,0,0,0,0,0,0),(-0.625,0,0,0.625,0,0,0,0,0,0,0,0),(0,-0.625,0,0,0.625,0,0,0,0,0,0,0),(0,0,-0.625,0,0,0.625,0,0,0,0,0,0)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + +State cost evaluation: +[1](31.25) +State cost gradient: +[12](-0.9375,0,39.0625,0.78125,0,37.4349,0.15625,0,1.6276,0,0,0) +Trajectory state (splitted): +[3](13.5417,47.9167,0) +[3](31.25,78.125,0) +Trajectory state (one call): +[6](13.5417,47.9167,0,31.25,78.125,0) +Trajectory state variation (splitted): +[3,12]((0.5,0,0,0.479167,0,0,0.0208333,0,0,0,0,0),(0,0.5,0,0,0.479167,0,0,0.0208333,0,0,0,0),(0,0,0.5,0,0,0.479167,0,0,0.0208333,0,0,0)) +[3,12]((-0.9375,0,0,0.78125,0,0,0.15625,0,0,0,0,0),(0,-0.9375,0,0,0.78125,0,0,0.15625,0,0,0,0),(0,0,-0.9375,0,0,0.78125,0,0,0.15625,0,0,0)) +Trajectory state (one call): +[6,12]((0.5,0,0,0.479167,0,0,0.0208333,0,0,0,0,0),(0,0.5,0,0,0.479167,0,0,0.0208333,0,0,0,0),(0,0,0.5,0,0,0.479167,0,0,0.0208333,0,0,0),(-0.9375,0,0,0.78125,0,0,0.15625,0,0,0,0,0),(0,-0.9375,0,0,0.78125,0,0,0.15625,0,0,0,0),(0,0,-0.9375,0,0,0.78125,0,0,0.15625,0,0,0)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + +State cost evaluation: +[1](46.875) +State cost gradient: +[12](-0.625,0,0,0,0,0,0.625,0,0,0,0,0) +Trajectory state (splitted): +[3](29.1667,66.6667,0) +[3](46.875,0,0) +Trajectory state (one call): +[6](29.1667,66.6667,0,46.875,0,0) +Trajectory state variation (splitted): +[3,12]((0.166667,0,0,0.666667,0,0,0.166667,0,0,0,0,0),(0,0.166667,0,0,0.666667,0,0,0.166667,0,0,0,0),(0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0,0)) +[3,12]((-0.625,0,0,0,0,0,0.625,0,0,0,0,0),(0,-0.625,0,0,0,0,0,0.625,0,0,0,0),(0,0,-0.625,0,0,0,0,0,0.625,0,0,0)) +Trajectory state (one call): +[6,12]((0.166667,0,0,0.666667,0,0,0.166667,0,0,0,0,0),(0,0.166667,0,0,0.666667,0,0,0.166667,0,0,0,0),(0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0,0),(-0.625,0,0,0,0,0,0.625,0,0,0,0,0),(0,-0.625,0,0,0,0,0,0.625,0,0,0,0),(0,0,-0.625,0,0,0,0,0,0.625,0,0,0)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + +State cost evaluation: +[1](54.6875) +State cost gradient: +[12](-0.15625,0,-1.30208,-0.78125,0,-29.9479,0.78125,0,-29.9479,0.15625,0,-1.30208) +Trajectory state (splitted): +[3](50,50,0) +[3](54.6875,-62.5,0) +Trajectory state (one call): +[6](50,50,0,54.6875,-62.5,0) +Trajectory state variation (splitted): +[3,12]((0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333,0,0),(0,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333,0),(0,0,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333)) +[3,12]((-0.15625,0,0,-0.78125,0,0,0.78125,0,0,0.15625,0,0),(0,-0.15625,0,0,-0.78125,0,0,0.78125,0,0,0.15625,0),(0,0,-0.15625,0,0,-0.78125,0,0,0.78125,0,0,0.15625)) +Trajectory state (one call): +[6,12]((0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333,0,0),(0,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333,0),(0,0,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333),(-0.15625,0,0,-0.78125,0,0,0.78125,0,0,0.15625,0,0),(0,-0.15625,0,0,-0.78125,0,0,0.78125,0,0,0.15625,0),(0,0,-0.15625,0,0,-0.78125,0,0,0.78125,0,0,0.15625)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + +State cost evaluation: +[1](46.875) +State cost gradient: +[12](0,0,1.00781e-30,-0.625,0,-1.81198e-14,1.11022e-15,0,-7.24791e-14,0.625,0,-1.81198e-14) +Trajectory state (splitted): +[3](70.8333,33.3333,0) +[3](46.875,-1.08719e-13,0) +Trajectory state (one call): +[6](70.8333,33.3333,0,46.875,-1.08719e-13,0) +Trajectory state variation (splitted): +[3,12]((-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0),(0,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667,0),(0,0,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667)) +[3,12]((0,0,0,-0.625,0,0,1.11022e-15,0,0,0.625,0,0),(0,0,0,0,-0.625,0,0,1.11022e-15,0,0,0.625,0),(0,0,0,0,0,-0.625,0,0,1.11022e-15,0,0,0.625)) +Trajectory state (one call): +[6,12]((-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0),(0,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667,0),(0,0,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667),(0,0,0,-0.625,0,0,1.11022e-15,0,0,0.625,0,0),(0,0,0,0,-0.625,0,0,1.11022e-15,0,0,0.625,0),(0,0,0,0,0,-0.625,0,0,1.11022e-15,0,0,0.625)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + +State cost evaluation: +[1](31.25) +State cost gradient: +[12](0,0,0,-0.15625,0,1.6276,-0.78125,0,37.4349,0.9375,0,39.0625) +Trajectory state (splitted): +[3](86.4583,52.0833,0) +[3](31.25,78.125,0) +Trajectory state (one call): +[6](86.4583,52.0833,0,31.25,78.125,0) +Trajectory state variation (splitted): +[3,12]((0,0,0,0.0208333,0,0,0.479167,0,0,0.5,0,0),(0,0,0,0,0.0208333,0,0,0.479167,0,0,0.5,0),(0,0,0,0,0,0.0208333,0,0,0.479167,0,0,0.5)) +[3,12]((0,0,0,-0.15625,0,0,-0.78125,0,0,0.9375,0,0),(0,0,0,0,-0.15625,0,0,-0.78125,0,0,0.9375,0),(0,0,0,0,0,-0.15625,0,0,-0.78125,0,0,0.9375)) +Trajectory state (one call): +[6,12]((0,0,0,0.0208333,0,0,0.479167,0,0,0.5,0,0),(0,0,0,0,0.0208333,0,0,0.479167,0,0,0.5,0),(0,0,0,0,0,0.0208333,0,0,0.479167,0,0,0.5),(0,0,0,-0.15625,0,0,-0.78125,0,0,0.9375,0,0),(0,0,0,0,-0.15625,0,0,-0.78125,0,0,0.9375,0),(0,0,0,0,0,-0.15625,0,0,-0.78125,0,0,0.9375)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + +State cost evaluation: +[1](15.625) +State cost gradient: +[12](0,0,0,0,0,-5.79371e-16,-0.625,0,10.4167,0.625,0,52.0833) +Trajectory state (splitted): +[3](95.8333,83.3333,0) +[3](15.625,62.5,0) +Trajectory state (one call): +[6](95.8333,83.3333,0,15.625,62.5,0) +Trajectory state variation (splitted): +[3,12]((0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333,0,0),(0,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333,0),(0,0,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333)) +[3,12]((0,0,0,0,0,0,-0.625,0,0,0.625,0,0),(0,0,0,0,0,0,0,-0.625,0,0,0.625,0),(0,0,0,0,0,0,0,0,-0.625,0,0,0.625)) +Trajectory state (one call): +[6,12]((0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333,0,0),(0,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333,0),(0,0,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333),(0,0,0,0,0,0,-0.625,0,0,0.625,0,0),(0,0,0,0,0,0,0,-0.625,0,0,0.625,0),(0,0,0,0,0,0,0,0,-0.625,0,0,0.625)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + +State cost evaluation: +[1](3.90625) +State cost gradient: +[12](0,0,0,0,0,0,-0.15625,0,0.325521,0.15625,0,15.2995) +Trajectory state (splitted): +[3](99.4792,97.9167,0) +[3](3.90625,15.625,0) +Trajectory state (one call): +[6](99.4792,97.9167,0,3.90625,15.625,0) +Trajectory state variation (splitted): +[3,12]((0,0,0,0,0,0,0.0208333,0,0,0.979167,0,0),(0,0,0,0,0,0,0,0.0208333,0,0,0.979167,0),(0,0,0,0,0,0,0,0,0.0208333,0,0,0.979167)) +[3,12]((0,0,0,0,0,0,-0.15625,0,0,0.15625,0,0),(0,0,0,0,0,0,0,-0.15625,0,0,0.15625,0),(0,0,0,0,0,0,0,0,-0.15625,0,0,0.15625)) +Trajectory state (one call): +[6,12]((0,0,0,0,0,0,0.0208333,0,0,0.979167,0,0),(0,0,0,0,0,0,0,0.0208333,0,0,0.979167,0),(0,0,0,0,0,0,0,0,0.0208333,0,0,0.979167),(0,0,0,0,0,0,-0.15625,0,0,0.15625,0,0),(0,0,0,0,0,0,0,-0.15625,0,0,0.15625,0),(0,0,0,0,0,0,0,0,-0.15625,0,0,0.15625)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + diff --git a/tests/testsuite.at b/tests/testsuite.at index 141f9fb..b0c4101 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -32,6 +32,7 @@ CHECK_STDOUT([simple], [Check basic features.]) CHECK_STDOUT([spline], [Check Spline class.]) CHECK_STDOUT([spline-gradient], [Check Spline gradient.]) CHECK_STDOUT([free-time-trajectory], [Check free time trajectory.]) +CHECK_STDOUT([state-cost], [Check state cost.]) AT_BANNER([Optimization (require solver plug-in)]) CHECK_STDOUT([spline-optimization], [Optimize a Spline with Cfsqp.]) commit db02462df3dc8314049ea27af497246d2601ad75 Author: Thomas Moulard <tho...@gm...> Date: Mon Aug 17 18:54:28 2009 +0900 Implement StateCost. * include/roboptim/trajectory/state-cost.hh, * include/roboptim/trajectory/state-cost.hxx: Implement state cost. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 45808ac..d6d0caf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-08-17 Thomas Moulard <tho...@gm...> + + Implement StateCost. + * include/roboptim/trajectory/state-cost.hh, + * include/roboptim/trajectory/state-cost.hxx: Implement state cost. + 2009-08-14 Thomas Moulard <tho...@gm...> Fix orthogonal speed function name and clean code. diff --git a/include/roboptim/trajectory/state-cost.hh b/include/roboptim/trajectory/state-cost.hh index f6b7415..d736653 100644 --- a/include/roboptim/trajectory/state-cost.hh +++ b/include/roboptim/trajectory/state-cost.hh @@ -17,8 +17,11 @@ #ifndef ROBOPTIM_TRAJECTORY_STATE_COST_HH # define ROBOPTIM_TRAJECTORY_STATE_COST_HH +# include <boost/shared_ptr.hpp> + # include <roboptim/trajectory/fwd.hh> # include <roboptim/core/derivable-function.hh> +# include <roboptim/trajectory/stable-time-point.hh> namespace roboptim { @@ -46,10 +49,44 @@ namespace roboptim typedef T trajectory_t; /// \brief Concrete class should call this constructor. - /// /param inputSize input size - StateCost (size_type inputSize) throw (); + StateCost (const trajectory_t&, + const DerivableFunction&, + const StableTimePoint tpt, + size_type order = 1) throw (); + + virtual ~StateCost () throw (); + + size_type order () const throw (); + + template <typename F, typename CLIST> + static void addToProblem (const T& trajectory, + const DerivableFunction& function, + unsigned order, + Problem<F, CLIST>& problem, + typename Function::interval_t bounds, + unsigned nConstraints) + { + using namespace boost; + + for (unsigned i = 0; i < nConstraints; ++i) + { + const value_type t = (i + 1.) / (nConstraints + 1.); + assert (t > 0. && t < 1.); + shared_ptr<DerivableFunction> constraint + (new StateCost (trajectory, function, t * tMax, order)); + problem.addConstraint (constraint, bounds); + } + } + + protected: + void impl_compute (result_t&, const argument_t&) const throw (); + void impl_gradient (gradient_t&, const argument_t&, size_type) const throw (); - virtual ~StateCost() throw (); + private: + const trajectory_t& trajectory_; + const DerivableFunction& function_; + StableTimePoint tpt_; + size_type order_; }; /// @} diff --git a/include/roboptim/trajectory/state-cost.hxx b/include/roboptim/trajectory/state-cost.hxx index 9997d34..270ecb2 100644 --- a/include/roboptim/trajectory/state-cost.hxx +++ b/include/roboptim/trajectory/state-cost.hxx @@ -17,19 +17,61 @@ #ifndef ROBOPTIM_TRAJECTORY_STATE_COST_HXX # define ROBOPTIM_TRAJECTORY_STATE_COST_HXX +# include <boost/format.hpp> namespace roboptim { template <typename T> - StateCost<T>::StateCost (size_type m) throw () - : DerivableFunction (m, 1) + StateCost<T>::StateCost (const trajectory_t& trajectory, + const DerivableFunction& function, + const StableTimePoint tpt, + size_type order) throw () + : DerivableFunction (trajectory.parameters ().size (), + function.outputSize (), + (boost::format ("state cost using function ``%1%''") + % function.getName ()).str ()), + trajectory_ (trajectory), + function_ (function), + tpt_ (tpt), + order_ (order) { + assert (function_.inputSize () == trajectory_.outputSize () * (order + 1)); } template <typename T> StateCost<T>::~StateCost() throw () { } + + template <typename T> + typename StateCost<T>::size_type + StateCost<T>::order () const throw () + { + return order_; + } + + template <typename T> + void + StateCost<T>::impl_compute (result_t& res, const argument_t& p) const throw () + { + static trajectory_t updatedTrajectory = trajectory_; + updatedTrajectory.setParameters (p); + function_ (res, updatedTrajectory.state + ... [truncated message content] |
From: Thomas M. <tho...@us...> - 2009-08-24 20:28:22
|
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 1fb3031f2d95daac83ee07017e5df79dc0a982c0 (commit) from 3a9927ec05d115d501f32eb07bddbfc574a4de3a (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 1fb3031f2d95daac83ee07017e5df79dc0a982c0 Author: Thomas Moulard <tho...@gm...> Date: Thu Aug 6 16:23:39 2009 +0900 Add Ohloh widgets. * htdocs/index.html: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 5274081..9c0d5ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-08-06 Thomas Moulard <tho...@gm...> + + Add Ohloh widgets. + * htdocs/index.html: Here. + 2009-06-10 Thomas Moulard <tho...@gm...> Fix plug-in's documentation links. diff --git a/htdocs/index.html b/htdocs/index.html index a9fd982..72f2719 100644 --- a/htdocs/index.html +++ b/htdocs/index.html @@ -149,6 +149,29 @@ <dd>Developer only mailing-list (private)</dd> </dl> + <h2><a name="dev"></a>Development</h2> + + <p> + Development statistics are provided by <a + href="https://www.ohloh.net/p/roboptim">Ohloh</a>. + </p> + + <div style="float: left; padding: 1em"> + <script type="text/javascript" + src="http://www.ohloh.net/p/338750/widgets/project_basic_stats.js"></script> + </div> + + <div style="float: left; padding: 1em"> + <script type="text/javascript" + src="http://www.ohloh.net/p/338750/widgets/project_languages.js"></script> + </div> + + <div style="float: left; padding: 1em"> + <script type="text/javascript" + src="http://www.ohloh.net/p/338750/widgets/project_factoids.js"></script> + </div> + + <div style="clear: both"> </div> <h2><a name="links"></a>Links</h2> <h3>SourceForge</h3> ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 +++++ htdocs/index.html | 23 +++++++++++++++++++++++ 2 files changed, 28 insertions(+), 0 deletions(-) hooks/post-receive -- web |
From: Thomas M. <tho...@us...> - 2009-08-24 20:28:18
|
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 created at 720a3fa9b5f2fe20093ffb64ee1d03c062ac2c2e (commit) - Log ----------------------------------------------------------------- commit 720a3fa9b5f2fe20093ffb64ee1d03c062ac2c2e Author: Thomas Moulard <tho...@gm...> Date: Tue Aug 18 15:33:59 2009 +0900 Display if constraints are satisfied or not when outputing a problem. * include/roboptim/core/problem.hxx: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index c263621..bb8e050 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-08-18 Thomas Moulard <tho...@gm...> + + Display if constraints are satisfied or not when outputing a problem. + * include/roboptim/core/problem.hxx: Here. + 2009-08-17 Thomas Moulard <tho...@gm...> Add Visual Studio solution and projects. diff --git a/include/roboptim/core/problem.hxx b/include/roboptim/core/problem.hxx index 782a2a3..115a9d1 100644 --- a/include/roboptim/core/problem.hxx +++ b/include/roboptim/core/problem.hxx @@ -231,8 +231,13 @@ namespace roboptim if (problem_.startingPoint ()) { U g = get<U> (problem_.constraints ()[i_]); + Function::vector_t x = (*g) (*problem_.startingPoint ()); o_ << "Initial value: " - << (*g) (*problem_.startingPoint ()) << iendl; + << x; + if (x[0] < Function::getLowerBound (problem_.bounds ()[i_]) + || x[0] > Function::getUpperBound (problem_.bounds ()[i_])) + o_ << " (constraint not satisfied)"; + o_ << iendl; } o_ << decindent << decindent; } commit 81de60add981418bbc14ac9428e6c897379a5041 Author: Thomas Moulard <tho...@gm...> Date: Mon Aug 17 13:00:46 2009 +0900 Add Visual Studio solution and projects. * msvc/roboptim-core-dummy-plugin/roboptim-core-dummy-plugin.vcproj: New. * msvc/roboptim-core/config.h: New. * msvc/roboptim-core/roboptim-core.sln: New. * msvc/roboptim-core/roboptim-core.vcproj: New. * msvc/simple/simple.vcproj: New. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 61a0f19..c263621 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2009-08-17 Thomas Moulard <tho...@gm...> + Add Visual Studio solution and projects. + * msvc/roboptim-core-dummy-plugin/roboptim-core-dummy-plugin.vcproj: New. + * msvc/roboptim-core/config.h: New. + * msvc/roboptim-core/roboptim-core.sln: New. + * msvc/roboptim-core/roboptim-core.vcproj: New. + * msvc/simple/simple.vcproj: New. + +2009-08-17 Thomas Moulard <tho...@gm...> + Remove dots in macros to ensure Windows portability. * src/debug.hh: Make CPP code more portable. diff --git a/msvc/roboptim-core-dummy-plugin/roboptim-core-dummy-plugin.vcproj b/msvc/roboptim-core-dummy-plugin/roboptim-core-dummy-plugin.vcproj new file mode 100644 index 0000000..676801d --- /dev/null +++ b/msvc/roboptim-core-dummy-plugin/roboptim-core-dummy-plugin.vcproj @@ -0,0 +1,201 @@ +<?xml version="1.0" encoding="shift_jis"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9.00" + Name="roboptim-core-dummy-plugin" + ProjectGUID="{21220FE9-892A-4D20-BC45-7697DFC5242F}" + RootNamespace="roboptimcoredummyplugin" + TargetFrameworkVersion="196613" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories=""$(ProjectDir)\..\..\src";"$(ProjectDir)\..\..\include";"$(ProjectDir)"" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + WarningLevel="3" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + GenerateDebugInformation="true" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + EnableIntrinsicFunctions="true" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + GenerateDebugInformation="true" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Fichiers sources" + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath="..\..\src\roboptim-core-dummy-plugin.cc" + > + </File> + </Filter> + <Filter + Name="Fichiers d'en-tête" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <Filter + Name="roboptim" + > + <Filter + Name="core" + > + <Filter + Name="plugin" + > + <File + RelativePath="..\..\include\roboptim\core\plugin\dummy.hh" + > + </File> + </Filter> + </Filter> + </Filter> + </Filter> + <Filter + Name="Fichiers de ressources" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/msvc/roboptim-core/config.h b/msvc/roboptim-core/config.h new file mode 100644 index 0000000..ceb38ed --- /dev/null +++ b/msvc/roboptim-core/config.h @@ -0,0 +1,20 @@ +/* Name of package */ +#define PACKAGE "roboptim-core" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "rob...@li..." + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "RobOptim core library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "RobOptim core library 0.2" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "roboptim-core" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "0.2" + +/* Version number of package */ +#define VERSION "0.2" diff --git a/msvc/roboptim-core/roboptim-core.sln b/msvc/roboptim-core/roboptim-core.sln new file mode 100644 index 0000000..389349e --- /dev/null +++ b/msvc/roboptim-core/roboptim-core.sln @@ -0,0 +1,38 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual C++ Express 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "roboptim-core", "roboptim-core.vcproj", "{C6C47D7F-6793-4E24-9447-2DD0BA87BE6F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "roboptim-core-dummy-plugin", "..\roboptim-core-dummy-plugin\roboptim-core-dummy-plugin.vcproj", "{21220FE9-892A-4D20-BC45-7697DFC5242F}" + ProjectSection(ProjectDependencies) = postProject + {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F} = {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple", "..\simple\simple.vcproj", "{C2F563F8-9C86-47EB-B3A9-F687D6CF62BC}" + ProjectSection(ProjectDependencies) = postProject + {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F} = {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F}.Debug|Win32.ActiveCfg = Debug|Win32 + {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F}.Debug|Win32.Build.0 = Debug|Win32 + {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F}.Release|Win32.ActiveCfg = Release|Win32 + {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F}.Release|Win32.Build.0 = Release|Win32 + {21220FE9-892A-4D20-BC45-7697DFC5242F}.Debug|Win32.ActiveCfg = Debug|Win32 + {21220FE9-892A-4D20-BC45-7697DFC5242F}.Debug|Win32.Build.0 = Debug|Win32 + {21220FE9-892A-4D20-BC45-7697DFC5242F}.Release|Win32.ActiveCfg = Release|Win32 + {21220FE9-892A-4D20-BC45-7697DFC5242F}.Release|Win32.Build.0 = Release|Win32 + {C2F563F8-9C86-47EB-B3A9-F687D6CF62BC}.Debug|Win32.ActiveCfg = Debug|Win32 + {C2F563F8-9C86-47EB-B3A9-F687D6CF62BC}.Debug|Win32.Build.0 = Debug|Win32 + {C2F563F8-9C86-47EB-B3A9-F687D6CF62BC}.Release|Win32.ActiveCfg = Release|Win32 + {C2F563F8-9C86-47EB-B3A9-F687D6CF62BC}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/msvc/roboptim-core/roboptim-core.vcproj b/msvc/roboptim-core/roboptim-core.vcproj new file mode 100644 index 0000000..22e754d --- /dev/null +++ b/msvc/roboptim-core/roboptim-core.vcproj @@ -0,0 +1,442 @@ +<?xml version="1.0" encoding="shift_jis"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9.00" + Name="roboptim-core" + ProjectGUID="{C6C47D7F-6793-4E24-9447-2DD0BA87BE6F}" + RootNamespace="roboptimcore" + TargetFrameworkVersion="196613" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories=""$(ProjectDir)\..\..\src";"$(ProjectDir)\..\..\include";"$(ProjectDir)"" + PreprocessorDefinitions="BUILDING_ROBOPTIM" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + WarningLevel="3" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + GenerateDebugInformation="true" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + EnableIntrinsicFunctions="true" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + GenerateDebugInformation="true" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Fichiers sources" + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath=".\config.h" + > + </File> + <File + RelativePath="..\..\src\constant-function.cc" + > + </File> + <File + RelativePath="..\..\src\debug.cc" + > + </File> + <File + RelativePath="..\..\src\debug.hh" + > + </File> + <File + RelativePath="..\..\src\derivable-function.cc" + > + </File> + <File + RelativePath="..\..\src\doc.hh" + > + </File> + <File + RelativePath="..\..\src\finite-difference-gradient.cc" + > + </File> + <File + RelativePath="..\..\src\function.cc" + > + </File> + <File + RelativePath="..\..\src\generic-solver.cc" + > + </File> + <File + RelativePath="..\..\src\identity-function.cc" + > + </File> + <File + RelativePath="..\..\src\indent.cc" + > + </File> + <File + RelativePath="..\..\src\linear-function.cc" + > + </File> + <File + RelativePath="..\..\src\numeric-linear-function.cc" + > + </File> + <File + RelativePath="..\..\src\numeric-quadratic-function.cc" + > + </File> + <File + RelativePath="..\..\src\quadratic-function.cc" + > + </File> + <File + RelativePath="..\..\src\result-with-warnings.cc" + > + </File> + <File + RelativePath="..\..\src\result.cc" + > + </File> + <File + RelativePath="..\..\src\solver-error.cc" + > + </File> + <File + RelativePath="..\..\src\solver-warning.cc" + > + </File> + <File + RelativePath="..\..\src\twice-derivable-function.cc" + > + </File> + <File + RelativePath="..\..\src\util.cc" + > + </File> + <Filter + Name="visualization" + > + <File + RelativePath="..\..\src\visualization\gnuplot-commands.cc" + > + </File> + <File + RelativePath="..\..\src\visualization\gnuplot.cc" + > + </File> + </Filter> + </Filter> + <Filter + Name="Fichiers d'en-tête" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <Filter + Name="roboptim" + > + <Filter + Name="core" + > + <File + RelativePath="..\..\include\roboptim\core\constant-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\debug.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\derivable-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\derivable-parametrized-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\finite-difference-gradient.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\fwd.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\generic-solver.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\identity-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\indent.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\io.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\linear-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\n-times-derivable-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\n-times-derivable-function.hxx" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\numeric-linear-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\numeric-quadratic-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\parametrized-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\parametrized-function.hxx" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\portability.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\problem.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\problem.hxx" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\quadratic-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\result-with-warnings.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\result.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\solver-error.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\solver-factory.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\solver-factory.hxx" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\solver-warning.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\solver.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\solver.hxx" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\sys.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\twice-derivable-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\util.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\util.hxx" + > + </File> + <Filter + Name="visualization" + > + <File + RelativePath="..\..\include\roboptim\core\visualization\fwd.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\visualization\gnuplot-commands.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\visualization\gnuplot-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\visualization\gnuplot.hh" + > + </File> + </Filter> + </Filter> + </Filter> + </Filter> + <Filter + Name="Fichiers de ressources" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/msvc/simple/simple.vcproj b/msvc/simple/simple.vcproj new file mode 100644 index 0000000..8b037c4 --- /dev/null +++ b/msvc/simple/simple.vcproj @@ -0,0 +1,193 @@ +<?xml version="1.0" encoding="shift_jis"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9.00" + Name="simple" + ProjectGUID="{C2F563F8-9C86-47EB-B3A9-F687D6CF62BC}" + RootNamespace="simple" + TargetFrameworkVersion="196613" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories=""$(ProjectDir)\..\..\src";"$(ProjectDir)\..\..\include";"$(ProjectDir)\..\..\tests";"$(ProjectDir)\..\roboptim-core";"$(ProjectDir)"" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + WarningLevel="3" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + GenerateDebugInformation="true" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + EnableIntrinsicFunctions="true" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + GenerateDebugInformation="true" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Fichiers sources" + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath="..\..\src\roboptim-core-dummy-plugin.cc" + > + </File> + <File + RelativePath="..\..\tests\simple.cc" + > + </File> + </Filter> + <Filter + Name="Fichiers d'en-tête" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath="..\..\tests\common.hh" + > + </File> + </Filter> + <Filter + Name="Fichiers de ressources" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> commit be582ffb388970de2f7bcb7ec18ac413d9e289fa Author: Thomas Moulard <tho...@gm...> Date: Mon Aug 17 13:00:29 2009 +0900 Remove dots in macros to ensure Windows portability. * src/debug.hh: Make CPP code more portable. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 6973afc..61a0f19 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-08-17 Thomas Moulard <tho...@gm...> + Remove dots in macros to ensure Windows portability. + * src/debug.hh: Make CPP code more portable. + +2009-08-17 Thomas Moulard <tho...@gm...> + Add ROBOPTIM_DLLAPI to ensure Windows portability. * include/roboptim/core/util.hh: Add missing qualifier. diff --git a/src/debug.hh b/src/debug.hh index 5727102..93de844 100644 --- a/src/debug.hh +++ b/src/debug.hh @@ -27,17 +27,17 @@ # define AllocTag2(p, desc) # define AllocTag_dynamic_description(p, data) # define AllocTag(p, data) -# define Debug(STATEMENT...) +# define Debug(STATEMENT) # define Dout(cntrl, data) # define DoutFatal(cntrl, data) LibcwDoutFatal(, , cntrl, data) -# define ForAllDebugChannels(STATEMENT...) -# define ForAllDebugObjects(STATEMENT...) -# define LibcwDebug(dc_namespace, STATEMENT...) +# define ForAllDebugChannels(STATEMENT) +# define ForAllDebugObjects(STATEMENT) +# define LibcwDebug(dc_namespace, STATEMENT) # define LibcwDout(dc_namespace, d, cntrl, data) # define LibcwDoutFatal(dc_namespace, d, cntrl, data) \ do { ::std::cerr << data << ::std::endl; ::std::exit(EXIT_FAILURE); } while(1) -# define LibcwdForAllDebugChannels(dc_namespace, STATEMENT...) -# define LibcwdForAllDebugObjects(dc_namespace, STATEMENT...) +# define LibcwdForAllDebugChannels(dc_namespace, STATEMENT) +# define LibcwdForAllDebugObjects(dc_namespace, STATEMENT) # define NEW(x) new x # define CWDEBUG_ALLOC 0 # define CWDEBUG_MAGIC 0 commit 3ed35a25bd796e464426e298258bad5b628073a3 Author: Thomas Moulard <tho...@gm...> Date: Mon Aug 17 12:59:56 2009 +0900 Add ROBOPTIM_DLLAPI to ensure Windows portability. * include/roboptim/core/util.hh: Add missing qualifier. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 5bb30f4..6973afc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-08-17 Thomas Moulard <tho...@gm...> + + Add ROBOPTIM_DLLAPI to ensure Windows portability. + * include/roboptim/core/util.hh: Add missing qualifier. + 2009-08-16 Thomas Moulard <tho...@gm...> Fix comment. diff --git a/include/roboptim/core/util.hh b/include/roboptim/core/util.hh index 76c5135..3c81d05 100644 --- a/include/roboptim/core/util.hh +++ b/include/roboptim/core/util.hh @@ -28,11 +28,11 @@ namespace roboptim { /// \internal /// \brief Copy the content of a uBLAS vector into a C array. - void vector_to_array (Function::value_type* dst, const Function::vector_t& src); + ROBOPTIM_DLLAPI void vector_to_array (Function::value_type* dst, const Function::vector_t& src); /// \internal /// \brief Copy the content of a C array into a uBLAS vector. - void array_to_vector (Function::vector_t& dst, const Function::value_type* src); + ROBOPTIM_DLLAPI void array_to_vector (Function::vector_t& dst, const Function::value_type* src); /// \internal /// Merge gradients from several functions (each gradient is a line). commit 2945bbefb12d8ba27e738023234e0a001be9cf04 Author: Thomas Moulard <tho...@gm...> Date: Sun Aug 16 20:56:49 2009 +0900 Fix comment. * include/roboptim/core/solver-factory.hxx: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 8cb6623..5bb30f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-08-16 Thomas Moulard <tho...@gm...> + Fix comment. + * include/roboptim/core/solver-factory.hxx: Here. + +2009-08-16 Thomas Moulard <tho...@gm...> + Add dllexport/dllimport for Windows compatibility. * include/Makefile.am, * include/roboptim/core/constant-function.hh, diff --git a/include/roboptim/core/solver-factory.hxx b/include/roboptim/core/solver-factory.hxx index eb42148..13c72ba 100644 --- a/include/roboptim/core/solver-factory.hxx +++ b/include/roboptim/core/solver-factory.hxx @@ -116,4 +116,4 @@ namespace roboptim } // end of namespace roboptim -#endif //! ROBOPTIM_CORE_SOLVER_FACTORY_HH +#endif //! ROBOPTIM_CORE_SOLVER_FACTORY_HXX commit 0658f5640810199e15549c036c63ded1b570708d Author: Thomas Moulard <tho...@gm...> Date: Sun Aug 16 20:56:33 2009 +0900 Add dllexport/dllimport for Windows compatibility. * include/Makefile.am, * include/roboptim/core/constant-function.hh, * include/roboptim/core/debug.hh, * include/roboptim/core/derivable-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/io.hh, * include/roboptim/core/linear-function.hh, * include/roboptim/core/numeric-linear-function.hh, * include/roboptim/core/numeric-quadratic-function.hh, * include/roboptim/core/portability.hh,ew. * include/roboptim/core/quadratic-function.hh, * include/roboptim/core/result-with-warnings.hh, * include/roboptim/core/result.hh, * include/roboptim/core/solver-error.hh, * include/roboptim/core/solver-warning.hh, * include/roboptim/core/sys.hh, * include/roboptim/core/twice-derivable-function.hh: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index e40f5f7..8cb6623 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,28 @@ +2009-08-16 Thomas Moulard <tho...@gm...> + + Add dllexport/dllimport for Windows compatibility. + * include/Makefile.am, + * include/roboptim/core/constant-function.hh, + * include/roboptim/core/debug.hh, + * include/roboptim/core/derivable-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/io.hh, + * include/roboptim/core/linear-function.hh, + * include/roboptim/core/numeric-linear-function.hh, + * include/roboptim/core/numeric-quadratic-function.hh, + * include/roboptim/core/portability.hh,ew. + * include/roboptim/core/quadratic-function.hh, + * include/roboptim/core/result-with-warnings.hh, + * include/roboptim/core/result.hh, + * include/roboptim/core/solver-error.hh, + * include/roboptim/core/solver-warning.hh, + * include/roboptim/core/sys.hh, + * include/roboptim/core/twice-derivable-function.hh: Here. + 2009-08-06 Thomas Moulard <tho...@gm...> Add new variant of foreach method. diff --git a/include/Makefile.am b/include/Makefile.am index a23251b..2c744c6 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -20,6 +20,7 @@ nobase_include_HEADERS = \ roboptim/core/numeric-linear-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 \ diff --git a/include/roboptim/core/constant-function.hh b/include/roboptim/core/constant-function.hh index f2f2553..d009f61 100644 --- a/include/roboptim/core/constant-function.hh +++ b/include/roboptim/core/constant-function.hh @@ -32,7 +32,7 @@ namespace roboptim /// Implement a constant function using the formula: /// \f[f(x) = offset\f] /// where \f$offset\f$ is set when the class is instantiated. - class ConstantFunction : public LinearFunction + class ROBOPTIM_DLLAPI ConstantFunction : public LinearFunction { public: /// \brief Build an constant function. diff --git a/include/roboptim/core/debug.hh b/include/roboptim/core/debug.hh index 055be71..847b3cf 100644 --- a/include/roboptim/core/debug.hh +++ b/include/roboptim/core/debug.hh @@ -51,7 +51,7 @@ namespace roboptim } # endif // CWDEBUG -# define RoboptimCoreDebug(STATEMENT...) \ +# define RoboptimCoreDebug(STATEMENT) \ LibcwDebug(roboptim::debug::channels, STATEMENT) // Handle indentation properly. @@ -70,9 +70,9 @@ namespace roboptim # define RoboptimCoreDoutFatal(cntrl, data) \ LibcwDoutFatal(roboptim::debug::channels, libcwd::libcw_do, cntrl, data) -# define RoboptimCoreForAllDebugChannels(STATEMENT...) \ +# define RoboptimCoreForAllDebugChannels(STATEMENT) \ LibcwdForAllDebugChannels(roboptim::debug::channels, STATEMENT) -# define RoboptimCoreForAllDebugObjects(STATEMENT...) \ +# define RoboptimCoreForAllDebugObjects(STATEMENT) \ LibcwdForAllDebugObjects(roboptim::debug::channels, STATEMENT) # if defined(Debug) && !defined(ROBOPTIM_CORE_INTERNAL) # error The application source file (.cc or .cpp) must use '#include "debug.h"' _before_ including the header file that it includes now, that led to this error. diff --git a/include/roboptim/core/derivable-function.hh b/include/roboptim/core/derivable-function.hh index c812730..539ae4a 100644 --- a/include/roboptim/core/derivable-function.hh +++ b/include/roboptim/core/derivable-function.hh @@ -61,7 +61,7 @@ namespace roboptim /// ignored in the gradient/jacobian computation. /// The class provides a default value for the function id so that these functions /// do not have to explicitly set the function id. - class DerivableFunction : public Function + class ROBOPTIM_DLLAPI DerivableFunction : public Function { public: /// \brief Gradient type. diff --git a/include/roboptim/core/finite-difference-gradient.hh b/include/roboptim/core/finite-difference-gradient.hh index 0d49772..d2bd7fa 100644 --- a/include/roboptim/core/finite-difference-gradient.hh +++ b/include/roboptim/core/finite-difference-gradient.hh @@ -33,7 +33,7 @@ namespace roboptim static const double finiteDifferenceEpsilon = 1e-8; /// \brief Exception thrown when a gradient check fail. - class BadGradient : public std::runtime_error + class ROBOPTIM_DLLAPI BadGradient : public std::runtime_error { public: /// \brief Import vector. @@ -79,7 +79,7 @@ namespace roboptim /// \param o output stream used for display /// \param f function to be displayed /// \return output stream - std::ostream& operator<< (std::ostream& o, const BadGradient& f); + ROBOPTIM_DLLAPI std::ostream& operator<< (std::ostream& o, const BadGradient& f); /// \addtogroup roboptim_function @@ -98,7 +98,7 @@ namespace roboptim /// \f[f'(x)\approx {f(x+\epsilon)-f(x)\over \epsilon}\f] /// where \f$\epsilon\f$ is a constant given when calling the class /// constructor. - class FiniteDifferenceGradient : public DerivableFunction + class ROBOPTIM_DLLAPI FiniteDifferenceGradient : public DerivableFunction { public: /// \brief Instantiate a finite differences gradient. @@ -134,14 +134,14 @@ namespace roboptim /// \param x point where the gradient will be evaluated /// \param threshold maximum tolerated error /// \return true if valid, false if not - bool checkGradient + ROBOPTIM_DLLAPI bool checkGradient (const DerivableFunction& function, int functionId, const Function::vector_t& x, Function::value_type threshold = finiteDifferenceThreshold) throw (); - void checkGradientAndThrow + ROBOPTIM_DLLAPI void checkGradientAndThrow (const DerivableFunction& function, int functionId, const Function::vector_t& x, diff --git a/include/roboptim/core/function.hh b/include/roboptim/core/function.hh index 6b0a8c4..4d7294e 100644 --- a/include/roboptim/core/function.hh +++ b/include/roboptim/core/function.hh @@ -49,7 +49,7 @@ namespace roboptim /// /// Functions are pure immutable objects: evaluating a function /// twice at a given point <b>must</b> give the same result. - class Function + class ROBOPTIM_DLLAPI Function { public: /// \brief Values type. @@ -397,7 +397,7 @@ namespace roboptim /// \param o output stream used for display /// \param f function to be displayed /// \return output stream - std::ostream& operator<< (std::ostream& o, const Function& f); + ROBOPTIM_DLLAPI std::ostream& operator<< (std::ostream& o, const Function& f); } // end of namespace roboptim diff --git a/include/roboptim/core/generic-solver.hh b/include/roboptim/core/generic-solver.hh index 43e640d..9ad7fec 100644 --- a/include/roboptim/core/generic-solver.hh +++ b/include/roboptim/core/generic-solver.hh @@ -39,7 +39,7 @@ namespace roboptim /// @{ /// \brief Abstract interface satisfied by all solvers. - class GenericSolver : public boost::noncopyable + class ROBOPTIM_DLLAPI GenericSolver : public boost::noncopyable { public: /// \brief Define the kind of solution which has been found. @@ -144,7 +144,7 @@ namespace roboptim /// \param o output stream used for display /// \param gs solver to be displayed /// \return output stream - std::ostream& operator<< (std::ostream& o, const GenericSolver& gs); + ROBOPTIM_DLLAPI std::ostream& operator<< (std::ostream& o, const GenericSolver& gs); /// \brief Override operator<< to display ``no solution'' objects. @@ -152,7 +152,7 @@ namespace roboptim /// \param o output stream used for display /// \param ns NoSolution object, ignored /// \return output stream - std::ostream& operator<< (std::ostream& o, const NoSolution&); + ROBOPTIM_DLLAPI std::ostream& operator<< (std::ostream& o, const NoSolution&); } // end of namespace roboptim diff --git a/include/roboptim/core/identity-function.hh b/include/roboptim/core/identity-function.hh index 81cbc25..910e8dd 100644 --- a/include/roboptim/core/identity-function.hh +++ b/include/roboptim/core/identity-function.hh @@ -32,7 +32,7 @@ namespace roboptim /// Implement a linear function using the formula: /// \f[f(x) = x + offset\f] /// where \f$A\f$ and \f$b\f$ are set when the class is instantiated. - class IdentityFunction : public LinearFunction + class ROBOPTIM_DLLAPI IdentityFunction : public LinearFunction { public: /// \brief Build an identity function. diff --git a/include/roboptim/core/indent.hh b/include/roboptim/core/indent.hh index 1fc6191..bb14667 100644 --- a/include/roboptim/core/indent.hh +++ b/include/roboptim/core/indent.hh @@ -25,27 +25,27 @@ namespace roboptim { /// \brief The current indentation level for \a o. - long int& indent (std::ostream& o); + ROBOPTIM_DLLAPI long int& indent (std::ostream& o); /// \brief Increment the indentation. - std::ostream& incindent (std::ostream& o); + ROBOPTIM_DLLAPI std::ostream& incindent (std::ostream& o); /// \brief Decrement the indentation. - std::ostream& decindent (std::ostream& o); + ROBOPTIM_DLLAPI std::ostream& decindent (std::ostream& o); /// \brief Reset the indentation. - std::ostream& resetindent (std::ostream& o); + ROBOPTIM_DLLAPI std::ostream& resetindent (std::ostream& o); /// \brief Print an end of line, then set the indentation. - std::ostream& iendl (std::ostream& o); + ROBOPTIM_DLLAPI std::ostream& iendl (std::ostream& o); /// \brief Increment the indentation, print an end of line, /// and set the indentation. - std::ostream& incendl (std::ostream& o); + ROBOPTIM_DLLAPI std::ostream& incendl (std::ostream& o); /// \brief Decrement the indentation, print an end of line, /// and set the indentation. - std::ostream& decendl (std::ostream& o); + ROBOPTIM_DLLAPI std::ostream& decendl (std::ostream& o); } #endif // !MISC_INDENT_HH diff --git a/include/roboptim/core/io.hh b/include/roboptim/core/io.hh index 98188a3..40f8f0f 100644 --- a/include/roboptim/core/io.hh +++ b/include/roboptim/core/io.hh @@ -21,7 +21,7 @@ # include <roboptim/core/debug.hh> # include <boost/numeric/ublas/io.hpp> -# include <boost/optional/optional_io.hpp> +//# include <boost/optional/optional_io.hpp> # include <boost/tuple/tuple_io.hpp> # include <boost/variant/detail/variant_io.hpp> diff --git a/include/roboptim/core/linear-function.hh b/include/roboptim/core/linear-function.hh index 73cbf19..84fd5b6 100644 --- a/include/roboptim/core/linear-function.hh +++ b/include/roboptim/core/linear-function.hh @@ -31,7 +31,7 @@ namespace roboptim /// \brief Define an abstract linear function. /// /// Inherit from this class when implementing linear functions. - class LinearFunction : public QuadraticFunction + class ROBOPTIM_DLLAPI LinearFunction : public QuadraticFunction { public: /// \brief Concrete class constructor should call this constructor. diff --git a/include/roboptim/core/numeric-linear-function.hh b/include/roboptim/core/numeric-linear-function.hh index 796803c..e70b9af 100644 --- a/include/roboptim/core/numeric-linear-function.hh +++ b/include/roboptim/core/numeric-linear-function.hh @@ -32,7 +32,7 @@ namespace roboptim /// Implement a linear function using the general formula: /// \f[f(x) = A x + b\f] /// where \f$A\f$ and \f$b\f$ are set when the class is instantiated. - class NumericLinearFunction : public LinearFunction + class ROBOPTIM_DLLAPI NumericLinearFunction : public LinearFunction { public: /// \brief Build a linear function from a matrix and a vector. diff --git a/include/roboptim/core/numeric-quadratic-function.hh b/include/roboptim/core/numeric-quadratic-function.hh index b42010d..2d07248 100644 --- a/include/roboptim/core/numeric-quadratic-function.hh +++ b/include/roboptim/core/numeric-quadratic-function.hh @@ -38,7 +38,7 @@ namespace roboptim /// where \f$A\f$ and \f$B\f$ are set when the class is instantiated. /// /// \note A is a symmetric matrix. - class NumericQuadraticFunction : public QuadraticFunction + class ROBOPTIM_DLLAPI NumericQuadraticFunction : public QuadraticFunction { public: /// \brief Symmetric matrix type. diff --git a/include/roboptim/core/portability.hh b/include/roboptim/core/portability.hh new file mode 100644 index 0000000..912f950 --- /dev/null +++ b/include/roboptim/core/portability.hh @@ -0,0 +1,42 @@ +// 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/>. + +#ifndef ROBOPTIM_CORE_PORTABILITY_HH +# define ROBOPTIM_CORE_PORTABILITY_HH + +// Handle portable symbol export. +// Defining manually which symbol should be exported is required +// under Windows whether MinGW or MSVC is used. +// +// The headers then have to be able to work in two different modes: +// - dllexport when one is building the library, +// - dllimport for clients using the library. +# ifdef _WIN32 +# define ROBOPTIM_DLLIMPORT __declspec(dllimport) +# define ROBOPTIM_DLLEXPORT __declspec(dllexport) +# else +# define ROBOPTIM_DLLIMPORT +# define ROBOPTIM_DLLEXPORT +# endif //! WIN32 + +# ifndef BUILDING_ROBOPTIM +# define ROBOPTIM_DLLAPI ROBOPTIM_DLLIMPORT +# else +# define ROBOPTIM_DLLAPI ROBOPTIM_DLLEXPORT +# endif //! BUILDING_ROBOPTIM_CORE + +#endif //! ROBOPTIM_CORE_PORTABILITY_HH diff --git a/include/roboptim/core/quadratic-function.hh b/include/roboptim/core/quadratic-function.hh index 9bf1725..84464de 100644 --- a/include/roboptim/core/quadratic-function.hh +++ b/include/roboptim/core/quadratic-function.hh @@ -32,7 +32,7 @@ namespace roboptim /// \brief Define an abstract quadratic function. /// /// Inherit from this class when implementing quadratic functions. - class QuadraticFunction : public TwiceDerivableFunction + class ROBOPTIM_DLLAPI QuadraticFunction : public TwiceDerivableFunction { public: /// \brief Concrete class constructor should call this constructor. diff --git a/include/roboptim/core/result-with-warnings.hh b/include/roboptim/core/result-with-warnings.hh index 9ede500..6ea8917 100644 --- a/include/roboptim/core/result-with-warnings.hh +++ b/include/roboptim/core/result-with-warnings.hh @@ -39,7 +39,7 @@ namespace roboptim /// /// A vector or warnings is provided in this result, otherwise the /// class behaves like Result. - class ResultWithWarnings : public Result + class ROBOPTIM_DLLAPI ResultWithWarnings : public Result { public: /// \brief Instantiate the class from an input/output size. diff --git a/include/roboptim/core/result.hh b/include/roboptim/core/result.hh index 71d4b4c..244e447 100644 --- a/include/roboptim/core/result.hh +++ b/include/roboptim/core/result.hh @@ -36,7 +36,7 @@ namespace roboptim /// found. /// It is a set of mutable fields representing the solution /// and its associated meta-information. - class Result + class ROBOPTIM_DLLAPI Result { public: /// \brief Import size type from Function class. @@ -83,7 +83,7 @@ namespace roboptim /// \param o output stream used for display /// \param r result to be displayed /// \return output stream - std::ostream& operator<< (std::ostream& o, const Result& r); + ROBOPTIM_DLLAPI std::ostream& operator<< (std::ostream& o, const Result& r); } // end of namespace roboptim #endif //! ROBOPTIM_CORE_RESULT_HH diff --git a/include/roboptim/core/solver-error.hh b/include/roboptim/core/solver-error.hh index 207680e..45e526c 100644 --- a/include/roboptim/core/solver-error.hh +++ b/include/roboptim/core/solver-error.hh @@ -31,7 +31,7 @@ namespace roboptim /// \brief Base exception class for solving errors. /// All other exceptions classes concerning the optimization /// process should inherits this class. - class SolverError : public std::runtime_error + class ROBOPTIM_DLLAPI SolverError : public std::runtime_error { public: /// \brief Instantiate an error from an error message. @@ -52,7 +52,7 @@ namespace roboptim /// \param o output stream used for display /// \param e error to be displayed /// \return output stream - std::ostream& operator<< (std::ostream& o, const SolverError& e); + ROBOPTIM_DLLAPI std::ostream& operator<< (std::ostream& o, const SolverError& e); } // end of namespace roboptim #endif //! ROBOPTIM_CORE_SOLVER_ERROR_HH diff --git a/include/roboptim/core/solver-warning.hh b/include/roboptim/core/solver-warning.hh index 949f8e1..f88aefc 100644 --- a/include/roboptim/core/solver-warning.hh +++ b/include/roboptim/core/solver-warning.hh @@ -31,7 +31,7 @@ namespace roboptim /// /// This class is mainly used to populate the warning vector of the /// ResultWithWarnings class. - class SolverWarning : public SolverError + class ROBOPTIM_DLLAPI SolverWarning : public SolverError { public: /// \brief Instantiate the class with a message. diff --git a/include/roboptim/core/sys.hh b/include/roboptim/core/sys.hh index f6f9fed..909f497 100644 --- a/include/roboptim/core/sys.hh +++ b/include/roboptim/core/sys.hh @@ -15,7 +15,9 @@ // You should have received a copy of the GNU Lesser General Public License // along with roboptim. If not, see <http://www.gnu.org/licenses/>. -# ifdef CWDEBUG +#include <roboptim/core/portability.hh> + +#ifdef CWDEBUG # ifndef _GNU_SOURCE # define _GNU_SOURCE # endif //! _GNU_SOURCE diff --git a/include/roboptim/core/twice-derivable-function.hh b/include/roboptim/core/twice-derivable-function.hh index 870c661..5847e77 100644 --- a/include/roboptim/core/twice-derivable-function.hh +++ b/include/roboptim/core/twice-derivable-function.hh @@ -50,7 +50,7 @@ namespace roboptim /// To avoid this costly representation, the function is split /// into \f$m\f$ \f$\mathbb{R}^n \rightarrow \mathbb{R}\f$ functions. /// See #DerivableFunction documentation for more information. - class TwiceDerivableFunction : public DerivableFunction + class ROBOPTIM_DLLAPI TwiceDerivableFunction : public DerivableFunction { public: /// \brief Hessian type. commit 2ecc7e4aa1b2463b427210b6846d7d952101dc7b Author: Thomas Moulard <tho...@gm...> Date: Thu Aug 6 20:16:34 2009 +0900 Add new variant of foreach method. * include/roboptim/core/function.hh: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 4c02ccf..e40f5f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-08-06 Thomas Moulard <tho...@gm...> + + Add new variant of foreach method. + * include/roboptim/core/function.hh: Here. + 2009-08-03 Thomas Moulard <tho...@gm...> Fix a probably bug in libcwd documentation. diff --git a/include/roboptim/core/function.hh b/include/roboptim/core/function.hh index 764ce46..6b0a8c4 100644 --- a/include/roboptim/core/function.hh +++ b/include/roboptim/core/function.hh @@ -227,7 +227,7 @@ namespace roboptim /// /// Call the functor to each discretization point of the discrete /// interval. - /// \param interval iterval on which the method iterates + /// \param interval interval on which the method iterates /// \param functor unary function that will be applied /// \tparam F functor type (has to satisfy the STL unary function concept) template <typename F> @@ -237,13 +237,47 @@ namespace roboptim const value_type delta = getUpperBound (interval) - getLowerBound (interval); assert (delta >= 0.); + assert (getStep (interval) > 0.); - value_type n = floor (delta / getStep (interval)); + value_type n = std::floor (delta / getStep (interval)); for (size_type i = 0; i <= n; ++i) { - const value_type t = + value_type t = getLowerBound (interval) + i * getStep (interval); + if (t > getUpperBound (interval)) + t = getUpperBound (interval); + assert (getLowerBound (interval) <= t + && t <= getUpperBound (interval)); + functor (t); + } + } + + /// \brief Iterate on an interval + /// + /// Call the functor regularly n times on an interval. + /// \param interval interval on which the method iterates + /// \param n number of discretization points + /// \param functor unary function that will be applied + /// \tparam F functor type (has to satisfy the STL unary function concept) + template <typename F> + static void foreach (const interval_t interval, + const size_type n, + F functor) + { + const value_type delta = + getUpperBound (interval) - getLowerBound (interval); + assert (delta >= 0.); + + if (!n) + return; + + for (size_type i = 0; i < n; ++i) + { + value_type t = + getLowerBound (interval) + i * (delta / (n - 1)); + if (t > getUpperBound (interval)) + t = getUpperBound (interval); assert (getLowerBound (interval) <= t && t <= getUpperBound (interval)); functor (t); commit 880a68de51983c5b8c5684b6635e5a8c1064d582 Author: Thomas Moulard <tho...@gm...> Date: Mon Aug 3 13:57:08 2009 +0900 Fix a probably bug in libcwd documentation. * include/roboptim/core/debug.hh: Make sure one can compile roboptim-core without requiring libcwd. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index d461011..4c02ccf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-08-03 Thomas Moulard <tho...@gm...> + Fix a probably bug in libcwd documentation. + * include/roboptim/core/debug.hh: Make sure one can + compile roboptim-core without requiring libcwd. + +2009-08-03 Thomas Moulard <tho...@gm...> + Fix compilation error when debug is disabled. * include/roboptim/core/debug.hh: Fix compilation errors. diff --git a/include/roboptim/core/debug.hh b/include/roboptim/core/debug.hh index cffad15..055be71 100644 --- a/include/roboptim/core/debug.hh +++ b/include/roboptim/core/debug.hh @@ -74,7 +74,7 @@ namespace roboptim LibcwdForAllDebugChannels(roboptim::debug::channels, STATEMENT) # define RoboptimCoreForAllDebugObjects(STATEMENT...) \ LibcwdForAllDebugObjects(roboptim::debug::channels, STATEMENT) -# if !defined(Debug) && !defined(ROBOPTIM_CORE_INTERNAL) +# if defined(Debug) && !defined(ROBOPTIM_CORE_INTERNAL) # error The application source file (.cc or .cpp) must use '#include "debug.h"' _before_ including the header file that it includes now, that led to this error. # endif #endif // !ROBOPTIM_CORE_DEBUG_HH commit 88a641bb8d42b50b779da0e06954b76cd2db252a Author: Thomas Moulard <tho...@gm...> Date: Mon Aug 3 13:48:26 2009 +0900 Fix compilation error when debug is disabled. * include/roboptim/core/debug.hh: Fix compilation errors. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index c7fbffb..d461011 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-08-03 Thomas Moulard <tho...@gm...> + Fix compilation error when debug is disabled. + * include/roboptim/core/debug.hh: Fix compilation errors. + +2009-08-03 Thomas Moulard <tho...@gm...> + Uniformize library to support libcwd. * include/roboptim/core/constant-function.hh, * include/roboptim/core/derivable-function.hh, diff --git a/include/roboptim/core/debug.hh b/include/roboptim/core/debug.hh index 5df8222..cffad15 100644 --- a/include/roboptim/core/debug.hh +++ b/include/roboptim/core/debug.hh @@ -55,7 +55,8 @@ namespace roboptim LibcwDebug(roboptim::debug::channels, STATEMENT) // Handle indentation properly. -# define RoboptimCoreDout(cntrl, data) \ +# ifdef CWDEBUG +# define RoboptimCoreDout(cntrl, data) \ LibcwDoutScopeBegin (::roboptim::debug::channels, libcwd::libcw_do, cntrl) \ LibcwDoutStream << data; \ char fill = LibcwDoutStream.fill (' '); \ @@ -63,6 +64,9 @@ namespace roboptim << "" \ << std::setfill (fill); \ LibcwDoutScopeEnd +# else +# define RoboptimCoreDout(cntrl, data) +# endif //! CWDEBUG # define RoboptimCoreDoutFatal(cntrl, data) \ LibcwDoutFatal(roboptim::debug::channels, libcwd::libcw_do, cntrl, data) commit 680290c4cb832abc1f161c78997c29a31eab11bb Author: Thomas Moulard <tho...@gm...> Date: Mon Aug 3 13:23:54 2009 +0900 Uniformize library to support libcwd. * 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/fwd.hh, * include/roboptim/core/generic-solver.hh, * include/roboptim/core/identity-function.hh, * include/roboptim/core/io.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-with-warnings.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, * include/roboptim/core/visualization/fwd.hh, * include/roboptim/core/visualization/gnuplot-commands.hh, * include/roboptim/core/visualization/gnuplot-function.hh, * include/roboptim/core/visualization/gnuplot.hh, * src/constant-function.cc, * src/derivable-function.cc, * src/finite-difference-gradient.cc, * src/function.cc, * src/generic-solver.cc, * src/identity-function.cc, * src/linear-function.cc, * src/numeric-linear-function.cc, * src/numeric-quadratic-function.cc, * src/quadratic-function.cc, * src/result-with-warnings.cc, * src/result.cc, * src/roboptim-core-dummy-plugin.cc, * src/solver-error.cc, * src/solver-warning.cc, * src/twice-derivable-function.cc, * src/util.cc, * src/visualization/gnuplot-commands.cc, * src/visualization/gnuplot.cc, * src/debug.hh: Make sure that sys.hh and debug.hh are included first. * include/roboptim/core/debug.hh: Add support in libcwd for RobOptim indentation, declare new channel. * src/debug.cc: Add new channel. * include/roboptim/core/indent.hh, * src/indent.cc: Make indent accessible by the whole project. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 8902f1b..c7fbffb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,60 @@ +2009-08-03 Thomas Moulard <tho...@gm...> + + Uniformize library to support libcwd. + * 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/fwd.hh, + * include/roboptim/core/generic-solver.hh, + * include/roboptim/core/identity-function.hh, + * include/roboptim/core/io.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-with-warnings.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, + * incl... [truncated message content] |
From: Thomas M. <tho...@us...> - 2009-08-24 20:28:09
|
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 created at 1659ebcc0c6ae966d77e0519d95baa88216941d9 (commit) - Log ----------------------------------------------------------------- commit 1659ebcc0c6ae966d77e0519d95baa88216941d9 Author: Thomas Moulard <tho...@gm...> Date: Thu Jul 30 16:50:55 2009 +0900 Remove useless constraints. * tests/spline-time-optimization.cc: Remove useless constraints. * tests/spline-time-optimization.stdout: Regenerate. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index c72237f..71a6caf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-07-30 Thomas Moulard <tho...@gm...> + Remove useless constraints. + * tests/spline-time-optimization.cc: Remove useless constraints. + * tests/spline-time-optimization.stdout: Regenerate. + +2009-07-30 Thomas Moulard <tho...@gm...> + Fix free time optimization test case. * tests/spline-time-optimization.cc: Fix parameters. * tests/spline-time-optimization.stdout: Regenerate. diff --git a/tests/spline-time-optimization.cc b/tests/spline-time-optimization.cc index 2501ba8..91ef576 100644 --- a/tests/spline-time-optimization.cc +++ b/tests/spline-time-optimization.cc @@ -96,7 +96,7 @@ int run_test () indices.push_back (freeTimeParams.size () - 1); makeFreeze (problem) (indices, freeTimeParams); - Function::interval_t vRange (0., .5 * vMax * vMax); + Function::interval_t vRange = Function::makeUpperInterval (.5 * vMax * vMax); LimitSpeed<FreeTimeTrajectory<Spline::derivabilityOrder> >::addToProblem (freeTimeTraj, problem, vRange, nControlPoints * nConstraintsPerCtrlPts); diff --git a/tests/spline-time-optimization.stdout b/tests/spline-time-optimization.stdout index c30ba0d..8ea5b53 100644 --- a/tests/spline-time-optimization.stdout +++ b/tests/spline-time-optimization.stdout @@ -7,655 +7,655 @@ Problem: Number of constraints: 109 Constraint 0 speed limit (0.00909091) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](0.0637334) Constraint 1 speed limit (0.0181818) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1.01973) Constraint 2 speed limit (0.0272727) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](5.1624) Constraint 3 speed limit (0.0363636) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](16.3157) Constraint 4 speed limit (0.0454545) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](39.8333) Constraint 5 speed limit (0.0545455) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](82.5984) Constraint 6 speed limit (0.0636364) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](153.024) Constraint 7 speed limit (0.0727273) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](261.052) Constraint 8 speed limit (0.0818182) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](418.155) Constraint 9 speed limit (0.0909091) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](619.753) Constraint 10 speed limit (0.1) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](832.32) Constraint 11 speed limit (0.109091) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1043.3) Constraint 12 speed limit (0.118182) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1242.24) Constraint 13 speed limit (0.127273) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1420.22) Constraint 14 speed limit (0.136364) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1569.85) Constraint 15 speed limit (0.145455) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1685.26) Constraint 16 speed limit (0.154545) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1762.12) Constraint 17 speed limit (0.163636) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1797.62) Constraint 18 speed limit (0.172727) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 19 speed limit (0.181818) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 20 speed limit (0.190909) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 21 speed limit (0.2) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 22 speed limit (0.209091) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 23 speed limit (0.218182) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 24 speed limit (0.227273) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 25 speed limit (0.236364) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 26 speed limit (0.245455) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 27 speed limit (0.254545) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 28 speed limit (0.263636) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 29 speed limit (0.272727) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 30 speed limit (0.281818) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 31 speed limit (0.290909) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 32 speed limit (0.3) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 33 speed limit (0.309091) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 34 speed limit (0.318182) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 35 speed limit (0.327273) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 36 speed limit (0.336364) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 37 speed limit (0.345455) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 38 speed limit (0.354545) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 39 speed limit (0.363636) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 40 speed limit (0.372727) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 41 speed limit (0.381818) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 42 speed limit (0.390909) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 43 speed limit (0.4) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 44 speed limit (0.409091) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 45 speed limit (0.418182) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 46 speed limit (0.427273) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 47 speed limit (0.436364) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 48 speed limit (0.445455) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 49 speed limit (0.454545) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 50 speed limit (0.463636) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 51 speed limit (0.472727) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 52 speed limit (0.481818) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 53 speed limit (0.490909) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 54 speed limit (0.5) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 55 speed limit (0.509091) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 56 speed limit (0.518182) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 57 speed limit (0.527273) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 58 speed limit (0.536364) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 59 speed limit (0.545455) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 60 speed limit (0.554545) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 61 speed limit (0.563636) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 62 speed limit (0.572727) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 63 speed limit (0.581818) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 64 speed limit (0.590909) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 65 speed limit (0.6) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 66 speed limit (0.609091) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 67 speed limit (0.618182) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 68 speed limit (0.627273) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 69 speed limit (0.636364) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 70 speed limit (0.645455) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 71 speed limit (0.654545) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 72 speed limit (0.663636) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 73 speed limit (0.672727) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 74 speed limit (0.681818) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 75 speed limit (0.690909) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 76 speed limit (0.7) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 77 speed limit (0.709091) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 78 speed limit (0.718182) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 79 speed limit (0.727273) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 80 speed limit (0.736364) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 81 speed limit (0.745455) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 82 speed limit (0.754545) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 83 speed limit (0.763636) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 84 speed limit (0.772727) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 85 speed limit (0.781818) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 86 speed limit (0.790909) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 87 speed limit (0.8) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 88 speed limit (0.809091) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 89 speed limit (0.818182) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 90 speed limit (0.827273) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1800) Constraint 91 speed limit (0.836364) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1797.62) Constraint 92 speed limit (0.845455) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1762.12) Constraint 93 speed limit (0.854545) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1685.26) Constraint 94 speed limit (0.863636) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1569.85) Constraint 95 speed limit (0.872727) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1420.22) Constraint 96 speed limit (0.881818) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1242.24) Constraint 97 speed limit (0.890909) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1043.3) Constraint 98 speed limit (0.9) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](832.32) Constraint 99 speed limit (0.909091) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](619.753) Constraint 100 speed limit (0.918182) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](418.155) Constraint 101 speed limit (0.927273) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](261.052) Constraint 102 speed limit (0.936364) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](153.024) Constraint 103 speed limit (0.945455) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](82.5984) Constraint 104 speed limit (0.954545) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](39.8333) Constraint 105 speed limit (0.963636) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](16.3157) Constraint 106 speed limit (0.972727) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](5.1624) Constraint 107 speed limit (0.981818) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](1.01973) Constraint 108 speed limit (0.990909) (derivable function) - Bounds: (0, 3612.5) + Bounds: (-inf, 3612.5) Scales: 1 Initial value: [1](0.0637334) @@ -677,7 +677,7 @@ CFSQP specific variables: CFSQP constraints: (0, 1), (0, 0), (1, 1), (1, 0), (2, 1), (2, 0), (3, 1), (3, 0), (4, 1), (4, 0), (5, 1), (5, 0), (6, 1), (6, 0), (7, 1), (7, 0), (8, 1), (8, 0), (9, 1), (9, 0), (10, 1), (10, 0), (11, 1), (11, 0), (12, 1), (12, 0), (13, 1), (13, 0), (14, 1), (14, 0), (15, 1), (15, 0), (16, 1), (16, 0), (17, 1), (17, 0), (18, 1), (18, 0), (19, 1), (19, 0), (20, 1), (20, 0), (21, 1), (21, 0), (22, 1), (22, 0), (23, 1), (23, 0), (24, 1), (24, 0), (25, 1), (25, 0), (26, 1), (26, 0), (27, 1), (27, 0), (28, 1), (28, 0), (29, 1), (29, 0), (30, 1), (30, 0), (31, 1), (31, 0), (32, 1), (32, 0), (33, 1), (33, 0), (34, 1), (34, 0), (35, 1), (35, 0), (36, 1), (36, 0), (37, 1), (37, 0), (38, 1), (38, 0), (39, 1), (39, 0), (40, 1), (40, 0), (41, 1), (41, 0), (42, 1), (42, 0), (43, 1), (43, 0), (44, 1), (44, 0), (45, 1), (45, 0), (46, 1), (46, 0), (47, 1), (47, 0), (48, 1), (48, 0), (49, 1), (49, 0), (50, 1), (50, 0), (51, 1), (51, 0), (52, 1), (52, 0), (53, 1), (53, 0), (54, 1), (54, 0), (55, 1), (55, 0), (56, 1), (56, 0), (57, 1), (57, 0), (58, 1), (58, 0), (59, 1), (59, 0), (60, 1), (60, 0), (61, 1), (61, 0), (62, 1), (62, 0), (63, 1), (63, 0), (64, 1), (64, 0), (65, 1), (65, 0), (66, 1), (66, 0), (67, 1), (67, 0), (68, 1), (68, 0), (69, 1), (69, 0), (70, 1), (70, 0), (71, 1), (71, 0), (72, 1), (72, 0), (73, 1), (73, 0), (74, 1), (74, 0), (75, 1), (75, 0), (76, 1), (76, 0), (77, 1), (77, 0), (78, 1), (78, 0), (79, 1), (79, 0), (80, 1), (80, 0), (81, 1), (81, 0), (82, 1), (82, 0), (83, 1), (83, 0), (84, 1), (84, 0), (85, 1), (85, 0), (86, 1), (86, 0), (87, 1), (87, 0), (88, 1), (88, 0), (89, 1), (89, 0), (90, 1), (90, 0), (91, 1), (91, 0), (92, 1), (92, 0), (93, 1), (93, 0), (94, 1), (94, 0), (95, 1), (95, 0), (96, 1), (96, 0), (97, 1), (97, 0), (98, 1), (98, 0), (99, 1), (99, 0), (100, 1), (100, 0), (101, 1), (101, 0), (102, 1), (102, 0), (103, 1), (103, 0), (104, 1), (104, 0), (105, 1), (105, 0), (106, 1), (106, 0), (107, 1), (107, 0), (108, 1), (108, 0) Result: Size (input, output): 12, 1 - X: [12](1.41692,-1.68622e-39,20.0686,40.0104,60.0077,80.0035,100,119.996,139.992,159.99,179.931,200) + X: [12](1.41692,4.45554e-39,20.0686,40.0104,60.0077,80.0035,100,119.996,139.992,159.99,179.931,200) Value: [1](-1.41692) Constraints values: [109](0.128834,2.06134,10.4356,32.9815,80.5212,166.969,309.33,527.704,845.28,1252.69,1681.87,2107.31,2507.8,2865.24,3164.69,3394.32,3545.45,3612.5,3612.5,3608.42,3605.12,3602.6,3600.87,3599.92,3599.76,3600.37,3601.77,3603.83,3605.76,3607.46,3608.91,3610.11,3611.08,3611.8,3612.27,3612.5,3612.5,3612.45,3612.41,3612.38,3612.36,3612.35,3612.35,3612.35,3612.37,3612.39,3612.41,3612.43,3612.45,3612.47,3612.48,3612.49,3612.49,3612.5,3612.5,3612.5,3612.49,3612.49,3612.48,3612.47,3612.45,3612.43,3612.41,3612.39,3612.37,3612.35,3612.35,3612.35,3612.36,3612.38,3612.41,3612.45,3612.5,3612.5,3612.27,3611.8,3611.08,3610.11,3608.91,3607.46,3605.76,3603.83,3601.77,3600.37,3599.76,3599.92,3600.87,3602.6,3605.12,3608.42,3612.5,3612.5,3545.45,3394.32,3164.69,2865.24,2507.8,2107.31,1681.87,1252.69,845.28,527.704,309.33,166.969,80.5212,32.9815,10.4356,2.06134,0.128834) - Lambda: [218](0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2.60732e-05,0,1.31596e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.31596e-05,0,2.60733e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3.91812e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2.60732e-05,0,1.31598e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.31596e-05,0,2.60734e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1) + Lambda: [218](0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2.60733e-05,0,1.31597e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.31596e-05,0,2.60734e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3.91812e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2.60734e-05,0,1.31595e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.31595e-05,0,2.60732e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1) commit 39b9a29af1f72a63cef2d64e11ea7f4a55f5093f Author: Thomas Moulard <tho...@gm...> Date: Thu Jul 30 15:56:48 2009 +0900 Fix free time optimization test case. * tests/spline-time-optimization.cc: Fix parameters. * tests/spline-time-optimization.stdout: Regenerate. * tests/testsuite.at: Not XFAIL anymore. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index dbe034e..c72237f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2009-07-30 Thomas Moulard <tho...@gm...> + Fix free time optimization test case. + * tests/spline-time-optimization.cc: Fix parameters. + * tests/spline-time-optimization.stdout: Regenerate. + * tests/testsuite.at: Not XFAIL anymore. + +2009-07-30 Thomas Moulard <tho...@gm...> + Do not add constraints on trajectory bounds as gradient is null. * include/roboptim/trajectory/limit-speed.hxx: Here. diff --git a/tests/spline-time-optimization.cc b/tests/spline-time-optimization.cc index 07d2bd7..2501ba8 100644 --- a/tests/spline-time-optimization.cc +++ b/tests/spline-time-optimization.cc @@ -55,8 +55,8 @@ typedef FreeTimeTrajectory<Spline::derivabilityOrder> freeTime_t; // Problem parameters. const unsigned nControlPoints = 11; -const unsigned nConstraintsPerCtrlPts = 1; -const double vMax = 75.; +const unsigned nConstraintsPerCtrlPts = 10; +const double vMax = 85.; int run_test () { diff --git a/tests/spline-time-optimization.stdout b/tests/spline-time-optimization.stdout index 9967d16..c30ba0d 100644 --- a/tests/spline-time-optimization.stdout +++ b/tests/spline-time-optimization.stdout @@ -1,1607 +1,671 @@ Problem: Numeric linear function - A = [1,27]((1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)) + A = [1,12]((-1,0,0,0,0,0,0,0,0,0,0,0)) B = [1](0) - Argument's bounds: (-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, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 - Number of constraints: 264 + Argument's bounds: (0, inf), (0, 0), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (200, 200) + Argument's scales: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 + Number of constraints: 109 Constraint 0 - Numeric linear function - A = [1,27]((1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)) - B = [1](0) - Bounds: (0.001, inf) + speed limit (0.00909091) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1) + Initial value: [1](0.0637334) Constraint 1 - Numeric linear function - A = [1,27]((0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)) - B = [1](-0) - Bounds: (0, 0) + speed limit (0.0181818) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](0) + Initial value: [1](1.01973) Constraint 2 - Numeric linear function - A = [1,27]((0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1)) - B = [1](-200) - Bounds: (0, 0) + speed limit (0.0272727) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](0) + Initial value: [1](5.1624) Constraint 3 - speed limit (0) (derivable function) - Bounds: (0, 31250) + speed limit (0.0363636) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](0) + Initial value: [1](16.3157) Constraint 4 - speed limit (0.00384615) (derivable function) - Bounds: (0, 31250) + speed limit (0.0454545) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](0.0423896) + Initial value: [1](39.8333) Constraint 5 - speed limit (0.00769231) (derivable function) - Bounds: (0, 31250) + speed limit (0.0545455) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](0.678233) + Initial value: [1](82.5984) Constraint 6 - speed limit (0.0115385) (derivable function) - Bounds: (0, 31250) + speed limit (0.0636364) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](3.43356) + Initial value: [1](153.024) Constraint 7 - speed limit (0.0153846) (derivable function) - Bounds: (0, 31250) + speed limit (0.0727273) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](10.8517) + Initial value: [1](261.052) Constraint 8 - speed limit (0.0192308) (derivable function) - Bounds: (0, 31250) + speed limit (0.0818182) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](26.4935) + Initial value: [1](418.155) Constraint 9 - speed limit (0.0230769) (derivable function) - Bounds: (0, 31250) + speed limit (0.0909091) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](54.9369) + Initial value: [1](619.753) Constraint 10 - speed limit (0.0269231) (derivable function) - Bounds: (0, 31250) + speed limit (0.1) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](101.777) + Initial value: [1](832.32) Constraint 11 - speed limit (0.0307692) (derivable function) - Bounds: (0, 31250) + speed limit (0.109091) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](173.628) + Initial value: [1](1043.3) Constraint 12 - speed limit (0.0346154) (derivable function) - Bounds: (0, 31250) + speed limit (0.118182) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](278.118) + Initial value: [1](1242.24) Constraint 13 - speed limit (0.0384615) (derivable function) - Bounds: (0, 31250) + speed limit (0.127273) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](421.573) + Initial value: [1](1420.22) Constraint 14 - speed limit (0.0423077) (derivable function) - Bounds: (0, 31250) + speed limit (0.136364) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](582.696) + Initial value: [1](1569.85) Constraint 15 - speed limit (0.0461538) (derivable function) - Bounds: (0, 31250) + speed limit (0.145455) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](747.156) + Initial value: [1](1685.26) Constraint 16 - speed limit (0.05) (derivable function) - Bounds: (0, 31250) + speed limit (0.154545) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](907.061) + Initial value: [1](1762.12) Constraint 17 - speed limit (0.0538462) (derivable function) - Bounds: (0, 31250) + speed limit (0.163636) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1055.53) + Initial value: [1](1797.62) Constraint 18 - speed limit (0.0576923) (derivable function) - Bounds: (0, 31250) + speed limit (0.172727) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1186.71) + Initial value: [1](1800) Constraint 19 - speed limit (0.0615385) (derivable function) - Bounds: (0, 31250) + speed limit (0.181818) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1295.76) + Initial value: [1](1800) Constraint 20 - speed limit (0.0653846) (derivable function) - Bounds: (0, 31250) + speed limit (0.190909) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1378.85) + Initial value: [1](1800) Constraint 21 - speed limit (0.0692308) (derivable function) - Bounds: (0, 31250) + speed limit (0.2) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1433.17) + Initial value: [1](1800) Constraint 22 - speed limit (0.0730769) (derivable function) - Bounds: (0, 31250) + speed limit (0.209091) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1456.94) + Initial value: [1](1800) Constraint 23 - speed limit (0.0769231) (derivable function) - Bounds: (0, 31250) + speed limit (0.218182) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 24 - speed limit (0.0807692) (derivable function) - Bounds: (0, 31250) + speed limit (0.227273) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 25 - speed limit (0.0846154) (derivable function) - Bounds: (0, 31250) + speed limit (0.236364) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 26 - speed limit (0.0884615) (derivable function) - Bounds: (0, 31250) + speed limit (0.245455) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 27 - speed limit (0.0923077) (derivable function) - Bounds: (0, 31250) + speed limit (0.254545) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 28 - speed limit (0.0961538) (derivable function) - Bounds: (0, 31250) + speed limit (0.263636) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 29 - speed limit (0.1) (derivable function) - Bounds: (0, 31250) + speed limit (0.272727) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 30 - speed limit (0.103846) (derivable function) - Bounds: (0, 31250) + speed limit (0.281818) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 31 - speed limit (0.107692) (derivable function) - Bounds: (0, 31250) + speed limit (0.290909) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 32 - speed limit (0.111538) (derivable function) - Bounds: (0, 31250) + speed limit (0.3) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 33 - speed limit (0.115385) (derivable function) - Bounds: (0, 31250) + speed limit (0.309091) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 34 - speed limit (0.119231) (derivable function) - Bounds: (0, 31250) + speed limit (0.318182) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 35 - speed limit (0.123077) (derivable function) - Bounds: (0, 31250) + speed limit (0.327273) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 36 - speed limit (0.126923) (derivable function) - Bounds: (0, 31250) + speed limit (0.336364) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 37 - speed limit (0.130769) (derivable function) - Bounds: (0, 31250) + speed limit (0.345455) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 38 - speed limit (0.134615) (derivable function) - Bounds: (0, 31250) + speed limit (0.354545) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 39 - speed limit (0.138462) (derivable function) - Bounds: (0, 31250) + speed limit (0.363636) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 40 - speed limit (0.142308) (derivable function) - Bounds: (0, 31250) + speed limit (0.372727) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 41 - speed limit (0.146154) (derivable function) - Bounds: (0, 31250) + speed limit (0.381818) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 42 - speed limit (0.15) (derivable function) - Bounds: (0, 31250) + speed limit (0.390909) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 43 - speed limit (0.153846) (derivable function) - Bounds: (0, 31250) + speed limit (0.4) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 44 - speed limit (0.157692) (derivable function) - Bounds: (0, 31250) + speed limit (0.409091) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 45 - speed limit (0.161538) (derivable function) - Bounds: (0, 31250) + speed limit (0.418182) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 46 - speed limit (0.165385) (derivable function) - Bounds: (0, 31250) + speed limit (0.427273) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 47 - speed limit (0.169231) (derivable function) - Bounds: (0, 31250) + speed limit (0.436364) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 48 - speed limit (0.173077) (derivable function) - Bounds: (0, 31250) + speed limit (0.445455) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 49 - speed limit (0.176923) (derivable function) - Bounds: (0, 31250) + speed limit (0.454545) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 50 - speed limit (0.180769) (derivable function) - Bounds: (0, 31250) + speed limit (0.463636) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 51 - speed limit (0.184615) (derivable function) - Bounds: (0, 31250) + speed limit (0.472727) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 52 - speed limit (0.188462) (derivable function) - Bounds: (0, 31250) + speed limit (0.481818) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 53 - speed limit (0.192308) (derivable function) - Bounds: (0, 31250) + speed limit (0.490909) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 54 - speed limit (0.196154) (derivable function) - Bounds: (0, 31250) + speed limit (0.5) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 55 - speed limit (0.2) (derivable function) - Bounds: (0, 31250) + speed limit (0.509091) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 56 - speed limit (0.203846) (derivable function) - Bounds: (0, 31250) + speed limit (0.518182) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 57 - speed limit (0.207692) (derivable function) - Bounds: (0, 31250) + speed limit (0.527273) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 58 - speed limit (0.211538) (derivable function) - Bounds: (0, 31250) + speed limit (0.536364) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 59 - speed limit (0.215385) (derivable function) - Bounds: (0, 31250) + speed limit (0.545455) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 60 - speed limit (0.219231) (derivable function) - Bounds: (0, 31250) + speed limit (0.554545) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 61 - speed limit (0.223077) (derivable function) - Bounds: (0, 31250) + speed limit (0.563636) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 62 - speed limit (0.226923) (derivable function) - Bounds: (0, 31250) + speed limit (0.572727) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 63 - speed limit (0.230769) (derivable function) - Bounds: (0, 31250) + speed limit (0.581818) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 64 - speed limit (0.234615) (derivable function) - Bounds: (0, 31250) + speed limit (0.590909) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 65 - speed limit (0.238462) (derivable function) - Bounds: (0, 31250) + speed limit (0.6) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 66 - speed limit (0.242308) (derivable function) - Bounds: (0, 31250) + speed limit (0.609091) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 67 - speed limit (0.246154) (derivable function) - Bounds: (0, 31250) + speed limit (0.618182) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 68 - speed limit (0.25) (derivable function) - Bounds: (0, 31250) + speed limit (0.627273) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 69 - speed limit (0.253846) (derivable function) - Bounds: (0, 31250) + speed limit (0.636364) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 70 - speed limit (0.257692) (derivable function) - Bounds: (0, 31250) + speed limit (0.645455) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 71 - speed limit (0.261538) (derivable function) - Bounds: (0, 31250) + speed limit (0.654545) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 72 - speed limit (0.265385) (derivable function) - Bounds: (0, 31250) + speed limit (0.663636) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 73 - speed limit (0.269231) (derivable function) - Bounds: (0, 31250) + speed limit (0.672727) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 74 - speed limit (0.273077) (derivable function) - Bounds: (0, 31250) + speed limit (0.681818) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 75 - speed limit (0.276923) (derivable function) - Bounds: (0, 31250) + speed limit (0.690909) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 76 - speed limit (0.280769) (derivable function) - Bounds: (0, 31250) + speed limit (0.7) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 77 - speed limit (0.284615) (derivable function) - Bounds: (0, 31250) + speed limit (0.709091) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 78 - speed limit (0.288462) (derivable function) - Bounds: (0, 31250) + speed limit (0.718182) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 79 - speed limit (0.292308) (derivable function) - Bounds: (0, 31250) + speed limit (0.727273) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 80 - speed limit (0.296154) (derivable function) - Bounds: (0, 31250) + speed limit (0.736364) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 81 - speed limit (0.3) (derivable function) - Bounds: (0, 31250) + speed limit (0.745455) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 82 - speed limit (0.303846) (derivable function) - Bounds: (0, 31250) + speed limit (0.754545) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 83 - speed limit (0.307692) (derivable function) - Bounds: (0, 31250) + speed limit (0.763636) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 84 - speed limit (0.311538) (derivable function) - Bounds: (0, 31250) + speed limit (0.772727) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 85 - speed limit (0.315385) (derivable function) - Bounds: (0, 31250) + speed limit (0.781818) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 86 - speed limit (0.319231) (derivable function) - Bounds: (0, 31250) + speed limit (0.790909) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 87 - speed limit (0.323077) (derivable function) - Bounds: (0, 31250) + speed limit (0.8) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 88 - speed limit (0.326923) (derivable function) - Bounds: (0, 31250) + speed limit (0.809091) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 89 - speed limit (0.330769) (derivable function) - Bounds: (0, 31250) + speed limit (0.818182) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 90 - speed limit (0.334615) (derivable function) - Bounds: (0, 31250) + speed limit (0.827273) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1800) Constraint 91 - speed limit (0.338462) (derivable function) - Bounds: (0, 31250) + speed limit (0.836364) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1797.62) Constraint 92 - speed limit (0.342308) (derivable function) - Bounds: (0, 31250) + speed limit (0.845455) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1762.12) Constraint 93 - speed limit (0.346154) (derivable function) - Bounds: (0, 31250) + speed limit (0.854545) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1685.26) Constraint 94 - speed limit (0.35) (derivable function) - Bounds: (0, 31250) + speed limit (0.863636) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1569.85) Constraint 95 - speed limit (0.353846) (derivable function) - Bounds: (0, 31250) + speed limit (0.872727) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1420.22) Constraint 96 - speed limit (0.357692) (derivable function) - Bounds: (0, 31250) + speed limit (0.881818) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1242.24) Constraint 97 - speed limit (0.361538) (derivable function) - Bounds: (0, 31250) + speed limit (0.890909) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1043.3) Constraint 98 - speed limit (0.365385) (derivable function) - Bounds: (0, 31250) + speed limit (0.9) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](832.32) Constraint 99 - speed limit (0.369231) (derivable function) - Bounds: (0, 31250) + speed limit (0.909091) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](619.753) Constraint 100 - speed limit (0.373077) (derivable function) - Bounds: (0, 31250) + speed limit (0.918182) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](418.155) Constraint 101 - speed limit (0.376923) (derivable function) - Bounds: (0, 31250) + speed limit (0.927273) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](261.052) Constraint 102 - speed limit (0.380769) (derivable function) - Bounds: (0, 31250) + speed limit (0.936364) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](153.024) Constraint 103 - speed limit (0.384615) (derivable function) - Bounds: (0, 31250) + speed limit (0.945455) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](82.5984) Constraint 104 - speed limit (0.388462) (derivable function) - Bounds: (0, 31250) + speed limit (0.954545) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](39.8333) Constraint 105 - speed limit (0.392308) (derivable function) - Bounds: (0, 31250) + speed limit (0.963636) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](16.3157) Constraint 106 - speed limit (0.396154) (derivable function) - Bounds: (0, 31250) + speed limit (0.972727) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](5.1624) Constraint 107 - speed limit (0.4) (derivable function) - Bounds: (0, 31250) + speed limit (0.981818) (derivable function) + Bounds: (0, 3612.5) Scales: 1 - Initial value: [1](1458) + Initial value: [1](1.01973) Constraint 108 - speed limit (0.403846) (derivable function) - Bounds: (0, 31250) - Scales: 1 - Initial value: [1](1458) - - Constraint 109 - speed limit (0.407692) (derivable function) - Bounds: (0, 31250) - Scales: 1 - Initial value: [1](1458) - - Constraint 110 - speed limit (0.411538) (derivable function) - Bounds: (0, 31250) - Scales: 1 - Initial value: [1](1458) - - Constraint 111 - speed limit (0.415385) (derivable function) - Bounds: (0, 31250) - Scales: 1 - Initial value: [1](1458) - - Constraint 112 - speed limit (0.419231) (derivable function) - Bounds: (0, 31250) - Scales: 1 - Initial value: [1](1458) - - Constraint 113 - speed limit (0.423077) (derivable function) - Bounds: (0, 31250) - Scales: 1 - Initial value: [1](1458) - - Constraint 114 - speed limit (0.426923) (derivable function) - Bounds: (0, 31250) - Scales: 1 - Initial value: [1](1458) - - Constraint 115 - speed limit (0.430769) (derivable function) - Bounds: (0, 31250) - Scales: 1 - Initial value: [1](1458) - - Constraint 116 - speed limit (0.434615) (derivable function) - Bounds: (0, 31250) - Scales: 1 - Initial value: [1](1458) - - Constraint 117 - speed limit (0.438462) (derivable function) - Bounds: (0, 31250) - Scales: 1 - Initial value: [1](1458) - - Constraint 118 - speed limit (0.442308) (derivable function) - Bounds: (0, 31250) - Scales: 1 - Initial value: [1](1458) - - Constraint 119 - speed limit (0.446154) (derivable function) - Bounds: (0, 31250) - Scales: 1 - Initial value: [1](1458) - - Constraint 120 - speed limit (0.45) (derivable function) - Bounds: (0, 31250) - Scales: 1 - Initial value: [1](1458) - - Constraint 121 - speed limit (0.453846) (derivable function) - Bounds: (0, 31250) - Scales: 1 - Initial value: [1](1458) - - Constraint 122 - speed limit (0.457692) (derivable function) - Bounds: (0, 31250) - Scales: 1 - Initial value: [1](1458) - - Constraint 123 - speed limit (0.461538) (derivable function) - Bounds: (0, 31250) - Scales: 1 - Initial value: [1](1458) - - Constraint 124 - speed limit (0.465385) (derivable function) - Bounds: (0, 31250) - Scales: 1 - Initial value: [1](1458) - - Constraint 125 - speed limit (0.469231) (derivable function) - Bounds: (0, 31250) - Scales: 1 - Initial value: [1](1458) - - Constraint 126 - speed limit (0.473077) (derivable function) - Bounds: (0, 31250) - Scales: 1 - Initial value: [1](1458) - - Constraint 127 - speed limit (0.476923) (derivable function) - Bounds: (0, 31250) - Scales: 1 - Initial value: [1](1458) - - Constraint 128 - speed limit (0.480769) (derivable function) - Bounds: (0, 31250) - Scales: 1 - Initial value: [1](1458) - - Constraint 129 - speed limit (0.484615) (der... [truncated message content] |
From: Thomas M. <tho...@us...> - 2009-08-24 20:27:58
|
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 created at 3a9927ec05d115d501f32eb07bddbfc574a4de3a (commit) - Log ----------------------------------------------------------------- commit 3a9927ec05d115d501f32eb07bddbfc574a4de3a Author: Thomas Moulard <tho...@gm...> Date: Wed Jun 10 20:28:49 2009 +0900 Fix plug-in's documentation links. * htdocs/index.html: Update links. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 3d6585a..5274081 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-06-10 Thomas Moulard <tho...@gm...> + Fix plug-in's documentation links. + * htdocs/index.html: Update links. + +2009-06-10 Thomas Moulard <tho...@gm...> + Add link to commit mailing-list and Git web broser. * htdocs/index.html: Here. diff --git a/htdocs/index.html b/htdocs/index.html index eb2fdbd..a9fd982 100644 --- a/htdocs/index.html +++ b/htdocs/index.html @@ -76,7 +76,7 @@ <ul> <li><a href="doc/core-plugin/ipopt/0.2/">HTML (0.2)</a></li> - <li><a href="doc/core-plugin/ipopt/HEAD/">HTML + <li><a href="doc/core-ipopt-plugin/HEAD/">HTML (development version)</a></li> </ul> </li> @@ -84,7 +84,7 @@ <ul> <li><a href="doc/core-plugin/cfsqp/0.2/">HTML (0.2)</a></li> - <li><a href="doc/core-plugin/cfsqp/HEAD/">HTML + <li><a href="doc/core-cfsqp-plugin/HEAD/">HTML (development version)</a></li> </ul> </li> commit e896d72a9e05e6dc727ac766d453ec8d88cc1377 Author: Thomas Moulard <tho...@gm...> Date: Wed Jun 10 10:48:48 2009 +0900 Add link to commit mailing-list and Git web broser. * htdocs/index.html: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index fd058dc..3d6585a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-06-10 Thomas Moulard <tho...@gm...> + + Add link to commit mailing-list and Git web broser. + * htdocs/index.html: Here. + 2009-05-04 Thomas Moulard <tho...@gm...> Fix link to roboptim-trajectory documentation (v0.2.1). diff --git a/htdocs/index.html b/htdocs/index.html index 8b91b2e..eb2fdbd 100644 --- a/htdocs/index.html +++ b/htdocs/index.html @@ -112,13 +112,19 @@ </div> - <h2><a name="download"></a>Download</h2> + <h2><a name="download"></a>Downloading RobOptim</h2> <p> The releases are available on the <a href="https://sourceforge.net/project/showfiles.php?group_id=259573">SourceForge space</a> for download. </p> + <p> + You can also retrieve the latest development version on + the <a href="https://sourceforge.net/scm/?type=git&group_id=259573">Git + repository</a>. + </p> + <h2><a name="mailinglist"></a>Mailing-lists</h2> <dl> @@ -133,6 +139,11 @@ <dd>User mailing-list (high volume, please use this mailing-list for communication)</dd> <dt> + <a href="https://lists.sourceforge.net/mailman/listinfo/roboptim-commit">roboptim-commit</a> + </dt> + <dd>Commit mailing-list (high volume)</dd> + + <dt> <a href="https://lists.sourceforge.net/mailman/listinfo/roboptim-devel">roboptim-devel</a> </dt> <dd>Developer only mailing-list (private)</dd> @@ -143,6 +154,11 @@ <h3>SourceForge</h3> <ul> <li><a href="https://sourceforge.net/projects/roboptim">SourceForge space</a></li> + <li> + <a href="https://sourceforge.net/scm/?type=git&group_id=259573">Git</a> + (<a href="http://roboptim.git.sourceforge.net/git/gitweb.cgi?p=roboptim">browse + repository</a>) + </li> <li><a href="http://apps.sourceforge.net/trac/roboptim/report">Tickets</a> (<a href="http://apps.sourceforge.net/trac/roboptim/report/1">active</a>)</li> <li><a href="http://apps.sourceforge.net/trac/roboptim/wiki">Wiki</a></li> commit 430f093228ab3e8058a212886f7c9836175004f3 Author: Thomas Moulard <tho...@gm...> Date: Mon May 4 00:17:25 2009 +0900 Fix link to roboptim-trajectory documentation (v0.2.1). * htdocs/index.html: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 9912f15..fd058dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-05-04 Thomas Moulard <tho...@gm...> + Fix link to roboptim-trajectory documentation (v0.2.1). + * htdocs/index.html: Here. + +2009-05-04 Thomas Moulard <tho...@gm...> + Add links to new releases. * htdocs/index.html: Here. diff --git a/htdocs/index.html b/htdocs/index.html index e2e10c7..8b91b2e 100644 --- a/htdocs/index.html +++ b/htdocs/index.html @@ -99,7 +99,7 @@ <h3>Trajectory</h3> <ul> - <li><a href="doc/trajectory/0.2/">HTML (0.2)</a></li> + <li><a href="doc/trajectory/0.2.1/">HTML (0.2.1)</a></li> <li><a href="doc/trajectory/HEAD/">HTML (development version)</a></li> </ul> commit 8dc26820d47ae6a0b53977244fd10ed4bd41bb3f Author: Thomas Moulard <tho...@gm...> Date: Mon May 4 00:00:35 2009 +0900 Add links to new releases. * htdocs/index.html: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index b9d55ee..9912f15 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-05-04 Thomas Moulard <tho...@gm...> + + Add links to new releases. + * htdocs/index.html: Here. + 2009-05-03 Thomas Moulard <tho...@gm...> Fix typo. diff --git a/htdocs/index.html b/htdocs/index.html index 19f7301..e2e10c7 100644 --- a/htdocs/index.html +++ b/htdocs/index.html @@ -49,6 +49,12 @@ <h2><a name="releases"></a>Releases</h2> <dl> + <dt>2009-05-04</dt> <dd>Release 0.2: Update + <code>roboptim-core</code>, initial release + of <code>roboptim-core-plugin-ipopt</code> + and <code>roboptim-trajectory</code>. + </dd> + <dt>2009-04-17</dt> <dd>Release 0.1: Initial release of <code>roboptim-core</code> (<a href="https://sourceforge.net/project/showfiles.php?group_id=259573&package_id=318684&release_id=676477">download</a>).</dd> @@ -61,18 +67,23 @@ <h3>Core</h3> <ul> <li><a href="doc/core/0.1/">HTML (0.1)</a></li> + <li><a href="doc/core/0.2/">HTML (0.2)</a></li> <li><a href="doc/core/HEAD/">HTML (development version)</a></li> <li> Plug-ins: <ul> <li>Ipopt <ul> + <li><a href="doc/core-plugin/ipopt/0.2/">HTML + (0.2)</a></li> <li><a href="doc/core-plugin/ipopt/HEAD/">HTML (development version)</a></li> </ul> </li> <li>CFSQP <ul> + <li><a href="doc/core-plugin/cfsqp/0.2/">HTML + (0.2)</a></li> <li><a href="doc/core-plugin/cfsqp/HEAD/">HTML (development version)</a></li> </ul> @@ -88,6 +99,7 @@ <h3>Trajectory</h3> <ul> + <li><a href="doc/trajectory/0.2/">HTML (0.2)</a></li> <li><a href="doc/trajectory/HEAD/">HTML (development version)</a></li> </ul> commit e4cffdd2e7b50289af78eb2ed9782e134f159ee4 Author: Thomas Moulard <tho...@gm...> Date: Sun May 3 18:41:28 2009 +0900 Fix typo. * htdocs/index.html: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 67cfd3d..b9d55ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-05-03 Thomas Moulard <tho...@gm...> + Fix typo. + * htdocs/index.html: Here. + +2009-05-03 Thomas Moulard <tho...@gm...> + Remove debian repository, update homepage. * htdocs/index.html: Add a link to plug-ins. * update-deb-repository.sh: Remove. diff --git a/htdocs/index.html b/htdocs/index.html index 4bbdd7f..19f7301 100644 --- a/htdocs/index.html +++ b/htdocs/index.html @@ -36,7 +36,7 @@ <dt>roboptim-core-cfsqp-plugin</dt> <dd>Allows CFSQP solver to be used as a back-end of roboptim-core - (not distributed on-line due to the restrice license of CFSQP, + (not distributed on-line due to the restrictive license of CFSQP, see CFSQP web site for more information).</dd> <dt>roboptim-posture</dt> commit 1d8cb44c8f060be36c5dfcdfa326a565130fa558 Author: Thomas Moulard <tho...@gm...> Date: Sun May 3 18:34:32 2009 +0900 Remove debian repository, update homepage. * htdocs/index.html: Add a link to plug-ins. * update-deb-repository.sh: Remove. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 4439e19..67cfd3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-05-03 Thomas Moulard <tho...@gm...> + Remove debian repository, update homepage. + * htdocs/index.html: Add a link to plug-ins. + * update-deb-repository.sh: Remove. + +2009-05-03 Thomas Moulard <tho...@gm...> + Remove debian repository. * htdocs/debian/.htaccess: Remove. * htdocs/debian/binary/Packages.gz: Remove. diff --git a/htdocs/index.html b/htdocs/index.html index 4660208..4bbdd7f 100644 --- a/htdocs/index.html +++ b/htdocs/index.html @@ -31,6 +31,14 @@ <dd>Generic C++ package used to solve non-linear optimization problem (<em>not</em> robotics specific).</dd> + <dt>roboptim-core-ipopt-plugin</dt> + <dd>Allows Ipopt solver to be used as a back-end of roboptim-core.</dd> + + <dt>roboptim-core-cfsqp-plugin</dt> + <dd>Allows CFSQP solver to be used as a back-end of roboptim-core + (not distributed on-line due to the restrice license of CFSQP, + see CFSQP web site for more information).</dd> + <dt>roboptim-posture</dt> <dd>Posture optimization for robotics.</dd> @@ -54,16 +62,33 @@ <ul> <li><a href="doc/core/0.1/">HTML (0.1)</a></li> <li><a href="doc/core/HEAD/">HTML (development version)</a></li> + <li> + Plug-ins: + <ul> + <li>Ipopt + <ul> + <li><a href="doc/core-plugin/ipopt/HEAD/">HTML + (development version)</a></li> + </ul> + </li> + <li>CFSQP + <ul> + <li><a href="doc/core-plugin/cfsqp/HEAD/">HTML + (development version)</a></li> + </ul> + </li> + </ul> + </li> </ul> - <h3>Trajectory</h3> + <h3>Posture</h3> <ul> - <li><a href="doc/trajectory/HEAD/">HTML (development version)</a></li> + <li> <a href="#">HTML (development version) - Soon</a></li> </ul> - <h3>Posture</h3> + <h3>Trajectory</h3> <ul> - <li> <a href="#">HTML (development version) - Soon</a></li> + <li><a href="doc/trajectory/HEAD/">HTML (development version)</a></li> </ul> diff --git a/update-deb-repository.sh b/update-deb-repository.sh deleted file mode 100755 index 8a0bf3f..0000000 --- a/update-deb-repository.sh +++ /dev/null @@ -1,6 +0,0 @@ -#! /bin/sh - -cd htdocs/debian -dpkg-scanpackages binary /dev/null | gzip -9c > binary/Packages.gz -dpkg-scansources source /dev/null | gzip -9c > source/Sources.gz -(cd binary && gpg -abs -o Release.gpg Release) commit 2e344a5d8458e25b048724b5de5e04e07d277d66 Author: Thomas Moulard <tho...@gm...> Date: Sun May 3 18:25:40 2009 +0900 Remove debian repository. * htdocs/debian/.htaccess: Remove. * htdocs/debian/binary/Packages.gz: Remove. * htdocs/debian/binary/Release.gpg: Remove. * htdocs/debian/binary/Release: Remove. * htdocs/debian/binary/roboptim-core_0.1-3.dsc: Remove. * htdocs/debian/binary/roboptim-core_0.1-3_i386.changes: Remove. * htdocs/debian/project/debian-roboptim-keyring.gpg: Remove. * htdocs/debian/source/Sources.gz: Remove. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 48a43d2..4439e19 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2009-05-03 Thomas Moulard <tho...@gm...> + + Remove debian repository. + * htdocs/debian/.htaccess: Remove. + * htdocs/debian/binary/Packages.gz: Remove. + * htdocs/debian/binary/Release.gpg: Remove. + * htdocs/debian/binary/Release: Remove. + * htdocs/debian/binary/roboptim-core_0.1-3.dsc: Remove. + * htdocs/debian/binary/roboptim-core_0.1-3_i386.changes: Remove. + * htdocs/debian/project/debian-roboptim-keyring.gpg: Remove. + * htdocs/debian/source/Sources.gz: Remove. + 2009-04-29 Thomas Moulard <tho...@gm...> Regenerate mirror repository. diff --git a/htdocs/debian/.htaccess b/htdocs/debian/.htaccess deleted file mode 100644 index 855a387..0000000 --- a/htdocs/debian/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Options Indexes diff --git a/htdocs/debian/binary/Packages.gz b/htdocs/debian/binary/Packages.gz deleted file mode 100644 index 2778db8..0000000 Binary files a/htdocs/debian/binary/Packages.gz and /dev/null differ diff --git a/htdocs/debian/binary/Release b/htdocs/debian/binary/Release deleted file mode 100644 index beb7989..0000000 --- a/htdocs/debian/binary/Release +++ /dev/null @@ -1,5 +0,0 @@ -Archive: testing -Component: main -Origin: Thomas Moulard <tho...@gm...> -Label: RobOptim package repository -Architecture: i386 diff --git a/htdocs/debian/binary/Release.gpg b/htdocs/debian/binary/Release.gpg deleted file mode 100644 index 423e2e4..0000000 --- a/htdocs/debian/binary/Release.gpg +++ /dev/null @@ -1,7 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.9 (GNU/Linux) - -iEYEABECAAYFAkn3pW4ACgkQ2c3AurFAup5+FACfWT7eZVRL21qCva0IeMqVJCeX -wKEAn2n8rCvA+mwjTAV20tyveXexLozK -=ZGuN ------END PGP SIGNATURE----- diff --git a/htdocs/debian/binary/roboptim-core_0.1-3.dsc b/htdocs/debian/binary/roboptim-core_0.1-3.dsc deleted file mode 100644 index 520bff4..0000000 --- a/htdocs/debian/binary/roboptim-core_0.1-3.dsc +++ /dev/null @@ -1,26 +0,0 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -Format: 1.0 -Source: roboptim-core -Binary: roboptim-core -Architecture: i386 -Version: 0.1-3 -Maintainer: Thomas Moulard <tho...@gm...> -Homepage: http://roboptim.sourceforge.net/ -Standards-Version: 3.6.2 -Build-Depends-Indep: debhelper (>= 4.0.0), autotools-dev -Checksums-Sha1: - c8cdb57b1d2b89b3b50e70e8247f4d3d7f5f0de9 432415 roboptim-core_0.1-3.tar.gz -Checksums-Sha256: - 4433e3fd60adc86d026e6b9fa5afb56ae3b1b4bad82073553114bffb9a7a91b7 432415 roboptim-core_0.1-3.tar.gz -Files: - 75888ac4b5c5b0951e705f784884b12a 432415 roboptim-core_0.1-3.tar.gz - ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.9 (GNU/Linux) - -iEYEARECAAYFAkn3oIYACgkQ2c3AurFAup48CQCgmdtPXi6nAGkI3lU9sAMZp2bQ -OegAoIolUDgVrt8gz46z8gugItnzk5dp -=RYT0 ------END PGP SIGNATURE----- diff --git a/htdocs/debian/binary/roboptim-core_0.1-3_i386.changes b/htdocs/debian/binary/roboptim-core_0.1-3_i386.changes deleted file mode 100644 index 630a27f..0000000 --- a/htdocs/debian/binary/roboptim-core_0.1-3_i386.changes +++ /dev/null @@ -1,39 +0,0 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -Format: 1.8 -Date: Wed, 29 Apr 2009 09:28:12 +0900 -Source: roboptim-core -Binary: roboptim-core -Architecture: source i386 -Version: 0.1-3 -Distribution: unstable -Urgency: low -Maintainer: Thomas Moulard <tho...@gm...> -Changed-By: Thomas Moulard <tho...@gm...> -Description: - roboptim-core - RobOptim core defines a standard C++ interface -Changes: - roboptim-core (0.1-3) unstable; urgency=low - . - * Fix Boost dependency. -Checksums-Sha1: - 411a9a630b21b90589cf2ed24ef2998a2b151966 802 roboptim-core_0.1-3.dsc - c8cdb57b1d2b89b3b50e70e8247f4d3d7f5f0de9 432415 roboptim-core_0.1-3.tar.gz - 6f70847b399ff1f11bedb6c10617d41635e1287d 4776326 roboptim-core_0.1-3_i386.deb -Checksums-Sha256: - 72289c957a55de4b35c15ca5a5dc85d8e2f267465b1ac9165963757287d2ff8c 802 roboptim-core_0.1-3.dsc - 4433e3fd60adc86d026e6b9fa5afb56ae3b1b4bad82073553114bffb9a7a91b7 432415 roboptim-core_0.1-3.tar.gz - 81afe71bca42bb54fc81595b20c7071ec130cd85c4555fc54c5b7f58c62def0c 4776326 roboptim-core_0.1-3_i386.deb -Files: - 95e4a59769f461a8950452186d31ef4f 802 devel optional roboptim-core_0.1-3.dsc - 75888ac4b5c5b0951e705f784884b12a 432415 devel optional roboptim-core_0.1-3.tar.gz - 311bdd1ac58952f48163b9de029db67e 4776326 devel optional roboptim-core_0.1-3_i386.deb - ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.9 (GNU/Linux) - -iEYEARECAAYFAkn3oI4ACgkQ2c3AurFAup5WpgCfTMj/jcPuhCc8HeqEjoAPFi0X -diYAn2tEqeI77aft29B/NHy3nEPdf5Xa -=41nU ------END PGP SIGNATURE----- diff --git a/htdocs/debian/project/debian-roboptim-keyring.gpg b/htdocs/debian/project/debian-roboptim-keyring.gpg deleted file mode 100644 index 85b4d1d..0000000 Binary files a/htdocs/debian/project/debian-roboptim-keyring.gpg and /dev/null differ diff --git a/htdocs/debian/source/Sources.gz b/htdocs/debian/source/Sources.gz deleted file mode 100644 index fa0498a..0000000 Binary files a/htdocs/debian/source/Sources.gz and /dev/null differ commit 0b018089ffd95b7e448f35eb03c6b243b51fcf82 Author: Thomas Moulard <tho...@gm...> Date: Wed Apr 29 09:56:36 2009 +0900 Regenerate mirror repository. * htdocs/debian/binary/Packages.gz: Regenerate. * htdocs/debian/binary/Release.gpg: Regenerate. * htdocs/debian/binary/roboptim-core_0.1-3.dsc: New. * htdocs/debian/binary/roboptim-core_0.1-3_i386.changes: New. * htdocs/debian/source/Sources.gz: Regenerate. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index cc29a55..48a43d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2009-04-29 Thomas Moulard <tho...@gm...> + Regenerate mirror repository. + * htdocs/debian/binary/Packages.gz: Regenerate. + * htdocs/debian/binary/Release.gpg: Regenerate. + * htdocs/debian/binary/roboptim-core_0.1-3.dsc: New. + * htdocs/debian/binary/roboptim-core_0.1-3_i386.changes: New. + * htdocs/debian/source/Sources.gz: Regenerate. + +2009-04-29 Thomas Moulard <tho...@gm...> + Add roboptim-core-0.1-3. * htdocs/debian/binary/Packages.gz, * htdocs/debian/binary/Release.gpg, diff --git a/htdocs/debian/binary/Packages.gz b/htdocs/debian/binary/Packages.gz index 061c2dc..2778db8 100644 Binary files a/htdocs/debian/binary/Packages.gz and b/htdocs/debian/binary/Packages.gz differ diff --git a/htdocs/debian/binary/Release.gpg b/htdocs/debian/binary/Release.gpg index 77d2ad1..423e2e4 100644 --- a/htdocs/debian/binary/Release.gpg +++ b/htdocs/debian/binary/Release.gpg @@ -1,7 +1,7 @@ -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) -iEYEABECAAYFAkn3oogACgkQ2c3AurFAup41FQCfXUszBt6sUPQZx4hm59HF4nXD -NEEAoKXSo2Sh/IlQJNnT1rRiqDIvREnr -=+8p1 +iEYEABECAAYFAkn3pW4ACgkQ2c3AurFAup5+FACfWT7eZVRL21qCva0IeMqVJCeX +wKEAn2n8rCvA+mwjTAV20tyveXexLozK +=ZGuN -----END PGP SIGNATURE----- diff --git a/htdocs/debian/binary/roboptim-core_0.1-3.dsc b/htdocs/debian/binary/roboptim-core_0.1-3.dsc new file mode 100644 index 0000000..520bff4 --- /dev/null +++ b/htdocs/debian/binary/roboptim-core_0.1-3.dsc @@ -0,0 +1,26 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +Format: 1.0 +Source: roboptim-core +Binary: roboptim-core +Architecture: i386 +Version: 0.1-3 +Maintainer: Thomas Moulard <tho...@gm...> +Homepage: http://roboptim.sourceforge.net/ +Standards-Version: 3.6.2 +Build-Depends-Indep: debhelper (>= 4.0.0), autotools-dev +Checksums-Sha1: + c8cdb57b1d2b89b3b50e70e8247f4d3d7f5f0de9 432415 roboptim-core_0.1-3.tar.gz +Checksums-Sha256: + 4433e3fd60adc86d026e6b9fa5afb56ae3b1b4bad82073553114bffb9a7a91b7 432415 roboptim-core_0.1-3.tar.gz +Files: + 75888ac4b5c5b0951e705f784884b12a 432415 roboptim-core_0.1-3.tar.gz + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.9 (GNU/Linux) + +iEYEARECAAYFAkn3oIYACgkQ2c3AurFAup48CQCgmdtPXi6nAGkI3lU9sAMZp2bQ +OegAoIolUDgVrt8gz46z8gugItnzk5dp +=RYT0 +-----END PGP SIGNATURE----- diff --git a/htdocs/debian/binary/roboptim-core_0.1-3_i386.changes b/htdocs/debian/binary/roboptim-core_0.1-3_i386.changes new file mode 100644 index 0000000..630a27f --- /dev/null +++ b/htdocs/debian/binary/roboptim-core_0.1-3_i386.changes @@ -0,0 +1,39 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +Format: 1.8 +Date: Wed, 29 Apr 2009 09:28:12 +0900 +Source: roboptim-core +Binary: roboptim-core +Architecture: source i386 +Version: 0.1-3 +Distribution: unstable +Urgency: low +Maintainer: Thomas Moulard <tho...@gm...> +Changed-By: Thomas Moulard <tho...@gm...> +Description: + roboptim-core - RobOptim core defines a standard C++ interface +Changes: + roboptim-core (0.1-3) unstable; urgency=low + . + * Fix Boost dependency. +Checksums-Sha1: + 411a9a630b21b90589cf2ed24ef2998a2b151966 802 roboptim-core_0.1-3.dsc + c8cdb57b1d2b89b3b50e70e8247f4d3d7f5f0de9 432415 roboptim-core_0.1-3.tar.gz + 6f70847b399ff1f11bedb6c10617d41635e1287d 4776326 roboptim-core_0.1-3_i386.deb +Checksums-Sha256: + 72289c957a55de4b35c15ca5a5dc85d8e2f267465b1ac9165963757287d2ff8c 802 roboptim-core_0.1-3.dsc + 4433e3fd60adc86d026e6b9fa5afb56ae3b1b4bad82073553114bffb9a7a91b7 432415 roboptim-core_0.1-3.tar.gz + 81afe71bca42bb54fc81595b20c7071ec130cd85c4555fc54c5b7f58c62def0c 4776326 roboptim-core_0.1-3_i386.deb +Files: + 95e4a59769f461a8950452186d31ef4f 802 devel optional roboptim-core_0.1-3.dsc + 75888ac4b5c5b0951e705f784884b12a 432415 devel optional roboptim-core_0.1-3.tar.gz + 311bdd1ac58952f48163b9de029db67e 4776326 devel optional roboptim-core_0.1-3_i386.deb + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.9 (GNU/Linux) + +iEYEARECAAYFAkn3oI4ACgkQ2c3AurFAup5WpgCfTMj/jcPuhCc8HeqEjoAPFi0X +diYAn2tEqeI77aft29B/NHy3nEPdf5Xa +=41nU +-----END PGP SIGNATURE----- diff --git a/htdocs/debian/source/Sources.gz b/htdocs/debian/source/Sources.gz index 9003610..fa0498a 100644 Binary files a/htdocs/debian/source/Sources.gz and b/htdocs/debian/source/Sources.gz differ commit 060a66de4b6ac9edf40f233fb4b6913c547a1732 Author: Thomas Moulard <tho...@gm...> Date: Wed Apr 29 09:45:00 2009 +0900 Add roboptim-core-0.1-3. * htdocs/debian/binary/Packages.gz, * htdocs/debian/binary/Release.gpg, * htdocs/debian/source/Sources.gz: Regenerate. * htdocs/index.html: Add Piwik javascript code to store site activity. * sf-upload.sh: Fix perms before uploading. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 7ab0d81..cc29a55 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-04-29 Thomas Moulard <tho...@gm...> + + Add roboptim-core-0.1-3. + * htdocs/debian/binary/Packages.gz, + * htdocs/debian/binary/Release.gpg, + * htdocs/debian/source/Sources.gz: Regenerate. + * htdocs/index.html: Add Piwik javascript code + to store site activity. + * sf-upload.sh: Fix perms before uploading. + 2009-04-28 Thomas Moulard <tho...@gm...> Sign debian package repository files. diff --git a/htdocs/debian/binary/Packages.gz b/htdocs/debian/binary/Packages.gz index b50f91e..061c2dc 100644 Binary files a/htdocs/debian/binary/Packages.gz and b/htdocs/debian/binary/Packages.gz differ diff --git a/htdocs/debian/binary/Release.gpg b/htdocs/debian/binary/Release.gpg index a8b2daa..77d2ad1 100644 --- a/htdocs/debian/binary/Release.gpg +++ b/htdocs/debian/binary/Release.gpg @@ -1,7 +1,7 @@ -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) -iEYEABECAAYFAkn2+ZAACgkQ2c3AurFAup6KOwCfW9/uSf8lwYHvyxodRcxlTdGE -S00AoKtHW5gLOCtYIRBF24tVDitfwynz -=RC5i +iEYEABECAAYFAkn3oogACgkQ2c3AurFAup41FQCfXUszBt6sUPQZx4hm59HF4nXD +NEEAoKXSo2Sh/IlQJNnT1rRiqDIvREnr +=+8p1 -----END PGP SIGNATURE----- diff --git a/htdocs/debian/source/Sources.gz b/htdocs/debian/source/Sources.gz index 3805fb7..9003610 100644 Binary files a/htdocs/debian/source/Sources.gz and b/htdocs/debian/source/Sources.gz differ diff --git a/htdocs/index.html b/htdocs/index.html index 72ab070..4660208 100644 --- a/htdocs/index.html +++ b/htdocs/index.html @@ -122,5 +122,23 @@ alt="CSS Valide !" /></a> </p> + <!-- Piwik --> + <script type="text/javascript"> + var pkBaseURL = (("https:" == document.location.protocol) ? + "https://apps.sourceforge.net/piwik/roboptim/" : + "http://apps.sourceforge.net/piwik/roboptim/"); + document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' + type='text/javascript'%3E%3C/script%3E")); + </script><script type="text/javascript"> + piwik_action_name = ''; + piwik_idsite = 1; + piwik_url = pkBaseURL + "piwik.php"; + piwik_log(piwik_action_name, piwik_idsite, piwik_url); + </script> + <object><noscript><p><img + src="http://apps.sourceforge.net/piwik/roboptim/piwik.php?idsite=1" + alt="piwik"/></p></noscript></object> + <!-- End Piwik Tag --> + </body> </html> diff --git a/sf-upload.sh b/sf-upload.sh index 61ebce9..11e80da 100755 --- a/sf-upload.sh +++ b/sf-upload.sh @@ -31,6 +31,10 @@ if test "x$SF_USERNAME" = x; then exit 2 fi +echo "Fixing permissions" +find htdocs -type f -print0 | xargs -0 chmod 644 +find htdocs -type d -print0 | xargs -0 chmod 755 + echo "Uploading web site to SourceForge server, please wait."; $rsync -avP -e ssh htdocs/* \ $SF_USERNAME,rob...@we...:htdocs/ commit 4c107ed9e93a3857ba6421c140637f3b35e7a21f Author: Thomas Moulard <tho...@gm...> Date: Tue Apr 28 21:43:36 2009 +0900 Sign debian package repository files. * htdocs/debian/binary/Packages.gz: Regenerate. * htdocs/debian/binary/Release.gpg: New. * htdocs/debian/project/debian-roboptim-keyring.gpg: New. * htdocs/debian/source/Sources.gz: Regenerate. * update-deb-repository.sh: Resign after updating the repository. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 6c3c924..7ab0d81 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2009-04-28 Thomas Moulard <tho...@gm...> + Sign debian package repository files. + * htdocs/debian/binary/Packages.gz: Regenerate. + * htdocs/debian/binary/Release.gpg: New. + * htdocs/debian/project/debian-roboptim-keyring.gpg: New. + * htdocs/debian/source/Sources.gz: Regenerate. + * update-deb-repository.sh: Resign after updating the repository. + +2009-04-28 Thomas Moulard <tho...@gm...> + Update debian package repository. * htdocs/debian/binary/Packages.gz, * htdocs/debian/source/Sources.gz: diff --git a/htdocs/debian/binary/Packages.gz b/htdocs/debian/binary/Packages.gz index a6ce176..b50f91e 100644 Binary files a/htdocs/debian/binary/Packages.gz and b/htdocs/debian/binary/Packages.gz differ diff --git a/htdocs/debian/binary/Release.gpg b/htdocs/debian/binary/Release.gpg new file mode 100644 index 0000000..a8b2daa --- /dev/null +++ b/htdocs/debian/binary/Release.gpg @@ -0,0 +1,7 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.9 (GNU/Linux) + +iEYEABECAAYFAkn2+ZAACgkQ2c3AurFAup6KOwCfW9/uSf8lwYHvyxodRcxlTdGE +S00AoKtHW5gLOCtYIRBF24tVDitfwynz +=RC5i +-----END PGP SIGNATURE----- diff --git a/htdocs/debian/project/debian-roboptim-keyring.gpg b/htdocs/debian/project/debian-roboptim-keyring.gpg new file mode 100644 index 0000000..85b4d1d Binary files /dev/null and b/htdocs/debian/project/debian-roboptim-keyring.gpg differ diff --git a/htdocs/debian/source/Sources.gz b/htdocs/debian/source/Sources.gz index b92e21a..3805fb7 100644 Binary files a/htdocs/debian/source/Sources.gz and b/htdocs/debian/source/Sources.gz differ diff --git a/update-deb-repository.sh b/update-deb-repository.sh index 484ddaf..8a0bf3f 100755 --- a/update-deb-repository.sh +++ b/update-deb-repository.sh @@ -3,3 +3,4 @@ cd htdocs/debian dpkg-scanpackages binary /dev/null | gzip -9c > binary/Packages.gz dpkg-scansources source /dev/null | gzip -9c > source/Sources.gz +(cd binary && gpg -abs -o Release.gpg Release) commit 2577a101eb8926ef65e10001325f418ca4cbda9e Author: Thomas Moulard <tho...@gm...> Date: Tue Apr 28 20:38:01 2009 +0900 Update debian package repository. * htdocs/debian/binary/Packages.gz, * htdocs/debian/source/Sources.gz: Regenerate to include roboptim-core-0.1-2.deb. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 6da68bd..6c3c924 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-04-28 Thomas Moulard <tho...@gm...> + + Update debian package repository. + * htdocs/debian/binary/Packages.gz, + * htdocs/debian/source/Sources.gz: + Regenerate to include roboptim-core-0.1-2.deb. + 2009-04-26 Thomas Moulard <tho...@gm...> Add htaccess for debian repository. diff --git a/htdocs/debian/binary/Packages.gz b/htdocs/debian/binary/Packages.gz index a0f85b6..a6ce176 100644 Binary files a/htdocs/debian/binary/Packages.gz and b/htdocs/debian/binary/Packages.gz differ diff --git a/htdocs/debian/source/Sources.gz b/htdocs/debian/source/Sources.gz index d22ad5f..b92e21a 100644 Binary files a/htdocs/debian/source/Sources.gz and b/htdocs/debian/source/Sources.gz differ commit 03381fe0796df19bba574eff4c27e00f760ef90e Author: Thomas Moulard <tho...@gm...> Date: Sun Apr 26 20:59:35 2009 +0900 Add htaccess for debian repository. * htdocs/debian/.htaccess: New. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 43b37a3..6da68bd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-04-26 Thomas Moulard <tho...@gm...> + Add htaccess for debian repository. + * htdocs/debian/.htaccess: New. + +2009-04-26 Thomas Moulard <tho...@gm...> + Set up a package repository for RobOptim. * .gitignore: New. * htdocs/debian/binary/Packages.gz: New. diff --git a/htdocs/debian/.htaccess b/htdocs/debian/.htaccess new file mode 100644 index 0000000..855a387 --- /dev/null +++ b/htdocs/debian/.htaccess @@ -0,0 +1 @@ +Options Indexes commit e325a2b1bf16acff5839cfa55f12dd801a25f43a Author: Thomas Moulard <tho...@gm...> Date: Sun Apr 26 17:45:40 2009 +0900 Set up a package repository for RobOptim. * .gitignore: New. * htdocs/debian/binary/Packages.gz: New. * htdocs/debian/binary/Release: New. * htdocs/debian/source/Sources.gz: New. * update-deb-repository.sh: New. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c00df13 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.deb diff --git a/ChangeLog b/ChangeLog index 997cfb3..43b37a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-04-26 Thomas Moulard <tho...@gm...> + + Set up a package repository for RobOptim. + * .gitignore: New. + * htdocs/debian/binary/Packages.gz: New. + * htdocs/debian/binary/Release: New. + * htdocs/debian/source/Sources.gz: New. + * update-deb-repository.sh: New. + 2009-04-21 Thomas Moulard <tho...@gm...> Do not display logo for now. diff --git a/htdocs/debian/binary/Packages.gz b/htdocs/debian/binary/Packages.gz new file mode 100644 index 0000000..a0f85b6 Binary files /dev/null and b/htdocs/debian/binary/Packages.gz differ diff --git a/htdocs/debian/binary/Release b/htdocs/debian/binary/Release new file mode 100644 index 0000000..beb7989 --- /dev/null +++ b/htdocs/debian/binary/Release @@ -0,0 +1,5 @@ +Archive: testing +Component: main +Origin: Thomas Moulard <tho...@gm...> +Label: RobOptim package repository +Architecture: i386 diff --git a/htdocs/debian/source/Sources.gz b/htdocs/debian/source/Sources.gz new file mode 100644 index 0000000..d22ad5f Binary files /dev/null and b/htdocs/debian/source/Sources.gz differ diff --git a/update-deb-repository.sh b/update-deb-repository.sh new file mode 100755 index 0000000..484ddaf --- /dev/null +++ b/update-deb-repository.sh @@ -0,0 +1,5 @@ +#! /bin/sh + +cd htdocs/debian +dpkg-scanpackages binary /dev/null | gzip -9c > binary/Packages.gz +dpkg-scansources source /dev/null | gzip -9c > source/Sources.gz commit b0b9776cb19e0d9999ed7336f1e91341332c398d Author: Thomas Moulard <tho...@gm...> Date: Tue Apr 21 13:26:31 2009 +0200 Do not display logo for now. * htdocs/index.html: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 88d3928..997cfb3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-04-21 Thomas Moulard <tho...@gm...> + + Do not display logo for now. + * htdocs/index.html: Here. + 2009-04-20 Thomas Moulard <tho...@gm...> Update web page, use a seperate CSS file. diff --git a/htdocs/index.html b/htdocs/index.html index 7dd7563..72ab070 100644 --- a/htdocs/index.html +++ b/htdocs/index.html @@ -111,15 +111,6 @@ <li><a href="http://apps.sourceforge.net/trac/roboptim/wiki">Wiki</a></li> </ul> - <h3>Institutions</h3> - - <p> - <a href='http://www.aist.go.jp/'><img src='aist.jpg' alt='AIST'/></a> - <a href='http://www.cnrs.fr/'><img src='cnrs.jpg' alt='CNRS'/></a> - <a href='http://www.inria.fr/'><img src='inria.jpg' alt='INRIA'/></a> - </p> - - <p style="padding-top:2em"> <a href="http://validator.w3.org/check?uri=referer"> <img src="http://www.w3.org/Icons/valid-xhtml10" commit 2266aa8d4f23a68be9a1960adfb891ac08b0b249 Author: Thomas Moulard <tho...@gm...> Date: Mon Apr 20 16:43:22 2009 +0200 Update web page, use a seperate CSS file. * htdocs/index.html: Update web page, use CSS. * htdocs/stylesheet.css: New. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 51e75d6..88d3928 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-04-20 Thomas Moulard <tho...@gm...> + Update web page, use a seperate CSS file. + * htdocs/index.html: Update web page, use CSS. + * htdocs/stylesheet.css: New. + +2009-04-20 Thomas Moulard <tho...@gm...> + Add placeholder for posture package. * htdocs/index.html: Here. diff --git a/htdocs/index.html b/htdocs/index.html index 583611c..7dd7563 100644 --- a/htdocs/index.html +++ b/htdocs/index.html @@ -1,71 +1,135 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> -<head> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>RobOptim : optimization for robotics</title> -</head> - -<body style="background: white; margin: 1em; padding: 1em; font-family: Arial, Helvetica, Sans"> - -<h1>RobOptim : optimization for robotics</h1> -<p> -This is the web page of the RobOptim package. -</p> - -<p> -Support is done through -<a href ="https://lists.sourceforge.net/lists/listinfo/roboptim-user">roboptim-user AT lists DOT sourceforge DOT net</a>. -<p> - - -<h2>Releases</h2> -<dl> -<dt>2009-04-17</dt> <dd>Release 0.1: Initial release of <code>roboptim-core</code>.</dd> -</dl> - -<h2>Documentation</h2> - -<div style="border: 1px dotted black; background: white; margin: 1em; padding: 1em; font-family: Arial, Helvetica, Sans"> - -<div style="width: 300px; border-bottom: 1px grey solid; font-weight: bold"> Core </div> -<ul style="list-style-type: square"> -<li> <a href="doc/core/0.1/">HTML (0.1)</a></li> -<li> <a href="doc/core/HEAD/">HTML (development version)</a></li> -</ul> - -<div style="width: 300px; border-bottom: 1px grey solid; font-weight: bold"> Trajectory </div> -<ul style="list-style-type: square"> -<li> <a href="doc/trajectory/HEAD/">HTML (development version)</a></li> -</ul> - -<div style="width: 300px; border-bottom: 1px grey solid; font-weight: bold"> Posture </div> -<ul style="list-style-type: square"> -<li> <a href="#">HTML (development version) - Soon</a></li> -</ul> - -Documentation can also be generated through <code>make doc</code>.<br/> -If the package is installed on your system, this documentation should be available in -<code>/usr/share/doc/roboptim-core/html</code>, -<code>/usr/share/doc/roboptim-trajectory/html</code> or -<code>/usr/share/doc/roboptim-posture/html</code>. - -</div> - -<h2>Links</h2> - - -<div style="width: 300px; border-bottom: 1px grey solid; font-weight: bold"> SourceForge </div> -<ul style="list-style-type: square"> -<li> <a href="https://sourceforge.net/projects/roboptim">SourceForge space</a></li> -<li> <a href="http://apps.sourceforge.net/trac/roboptim/report">Tickets</a> -(<a href="http://apps.sourceforge.net/trac/roboptim/report/1">active</a>)</li> -</ul> - -<div style="width: 300px; border-bottom: 1px grey solid; font-weight: bold; margin-bottom: 1em"> - Institutions </div> - -<a href='http://www.aist.go.jp/'><img src='aist.jpg' alt='AIST'/></a> -<a href='http://www.cnrs.fr/'><img src='cnrs.jpg' alt='CNRS'/></a> -<a href='http://www.inria.fr/'><img src='inria.jpg' alt='INRIA'/></a> - -</body> + <link rel="stylesheet" href="stylesheet.css" type="text/css" /> + </head> + + <body> + + <h1>RobOptim : optimization for robotics</h1> + <p> + <em>RobOptim</em> is a set of packages designed to make robotics + non-linear optimization problem easier to solve. It is composed of + several packages which are focusing on different kind of problem related + to robotics, especially humanoid robotics. + </p> + + <p> + Support is done through the + <a href= + "https://lists.sourceforge.net/lists/listinfo/roboptim-user">roboptim-user + </a> mailing-list, see the <a href="#mailinglist">mailing-list + section</a>. + </p> + + + <h2><a name="packages"></a>Package description</h2> + <dl> + <dt>roboptim-core</dt> + <dd>Generic C++ package used to solve non-linear optimization problem + (<em>not</em> robotics specific).</dd> + + <dt>roboptim-posture</dt> + <dd>Posture optimization for robotics.</dd> + + <dt>roboptim-trajectory</dt> + <dd>Trajectory optimization for robotics.</dd> + </dl> + + + <h2><a name="releases"></a>Releases</h2> + <dl> + <dt>2009-04-17</dt> <dd>Release 0.1: Initial release + of <code>roboptim-core</code> + (<a href="https://sourceforge.net/project/showfiles.php?group_id=259573&package_id=318684&release_id=676477">download</a>).</dd> + </dl> + + + <h2><a name="doc"></a>Online documentation</h2> + + <div class="block"> + <h3>Core</h3> + <ul> + <li><a href="doc/core/0.1/">HTML (0.1)</a></li> + <li><a href="doc/core/HEAD/">HTML (development version)</a></li> + </ul> + + <h3>Trajectory</h3> + <ul> + <li><a href="doc/trajectory/HEAD/">HTML (development version)</a></li> + </ul> + + <h3>Posture</h3> + <ul> + <li> <a href="#">HTML (development version) - Soon</a></li> + </ul> + + + Documentation can also be generated through <code>make doc</code>.<br/> + If the package is installed on your system, this documentation should be available in + <code>/usr/share/doc/roboptim-core/html</code>, + <code>/usr/share/doc/roboptim-trajectory/html</code> or + <code>/usr/share/doc/roboptim-posture/html</code>. + </div> + + + <h2><a name="download"></a>Download</h2> + <p> + The releases are available on + the <a href="https://sourceforge.net/project/showfiles.php?group_id=259573">SourceForge + space</a> for download. + </p> + + + <h2><a name="mailinglist"></a>Mailing-lists</h2> + <dl> + <dt> + <a href="https://lists.sourceforge.net/mailman/listinfo/roboptim-announce">roboptim-announce</a> + </dt> + <dd>Announce mailing-list (low volume)</dd> + + <dt> + <a href="https://lists.sourceforge.net/mailman/listinfo/roboptim-user">roboptim-user</a> + </dt> + <dd>User mailing-list (high volume, please use this mailing-list for communication)</dd> + + <dt> + <a href="https://lists.sourceforge.net/mailman/listinfo/roboptim-devel">roboptim-devel</a> + </dt> + <dd>Developer only mailing-list (private)</dd> + </dl> + + + <h2><a name="links"></a>Links</h2> + <h3>SourceForge</h3> + <ul> + <li><a href="https://sourceforge.net/projects/roboptim">SourceForge space</a></li> + <li><a href="http://apps.sourceforge.net/trac/roboptim/report">Tickets</a> + (<a href="http://apps.sourceforge.net/trac/roboptim/report/1">active</a>)</li> + <li><a href="http://apps.sourceforge.net/trac/roboptim/wiki">Wiki</a></li> + </ul> + + <h3>Institutions</h3> + + <p> + <a href='http://www.aist.go.jp/'><img src='aist.jpg' alt='AIST'/></a> + <a href='http://www.cnrs.fr/'><img src='cnrs.jpg' alt='CNRS'/></a> + <a href='http://www.inria.fr/'><img src='inria.jpg' alt='INRIA'/></a> + </p> + + + <p style="padding-top:2em"> + <a href="http://validator.w3.org/check?uri=referer"> + <img src="http://www.w3.org/Icons/valid-xhtml10" + alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a> + + <a href="http://jigsaw.w3.org/css-validator/check/referer"> + <img style="border:0;width:88px;height:31px" + src="http://jigsaw.w3.org/css-validator/images/vcss-blue" + alt="CSS Valide !" /></a> + </p> + + </body> </html> diff --git a/htdocs/stylesheet.css b/htdocs/stylesheet.css new file mode 100644 index 0000000..2f0b230 --- /dev/null +++ b/htdocs/stylesheet.css @@ -0,0 +1,28 @@ +body { + font-family: Arial, Helvetica, Sans; + background: white; + margin: .5em; + padding: .5em; +} + +div.block { + border: 1px dotted black; + background: white; + margin: 1em; + padding: 1em; + font-family: Arial, Helvetica, Sans; +} + +h3 { + width: 300px; + border-bottom: 1px gray solid; + font-weight: bold; +} + +ul { + list-style-type: square; +} + +dt { + font-weight: bold; +} commit b2037dfaa19f94677493123e3eaf207c8e12d96d Author: Thomas Moulard <tho...@gm...> Date: Mon Apr 20 16:11:05 2009 +0200 Add placeholder for posture package. * htdocs/index.html: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 603bf43..51e75d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-04-20 Thomas Moulard <tho...@gm...> + Add placeholder for posture package. + * htdocs/index.html: Here. + +2009-04-20 Thomas Moulard <tho...@gm...> + Add institutions logos. * htdocs/aist.jpg: New. * htdocs/cnrs.jpg: New. diff --git a/htdocs/index.html b/htdocs/index.html index fb19373..583611c 100644 --- a/htdocs/index.html +++ b/htdocs/index.html @@ -1,7 +1,7 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> - <title>RobOptim</title> + <title>RobOptim : optimization for robotics</title> </head> <body style="background: white; margin: 1em; padding: 1em; font-family: Arial, Helvetica, Sans"> @@ -16,6 +16,7 @@ Support is done through <a href ="https://lists.sourceforge.net/lists/listinfo/roboptim-user">roboptim-user AT lists DOT sourceforge DOT net</a>. <p> + <h2>Releases</h2> <dl> <dt>2009-04-17</dt> <dd>Release 0.1: Initial release of <code>roboptim-core</code>.</dd> @@ -36,10 +37,16 @@ Support is done through <li> <a href="doc/trajectory/HEAD/">HTML (development version)</a></li> </ul> +<div style="width: 300px; border-bottom: 1px grey solid; font-weight: bold"> Posture </div> +<ul style="list-style-type: square"> +<li> <a href="#">HTML (development version) - Soon</a></li> +</ul> + Documentation can also be generated through <code>make doc</code>.<br/> If the package is installed on your system, this documentation should be available in -<code>/usr/share/doc/roboptim-core/html</code> and -<code>/usr/share/doc/roboptim-trajectory/html</code>. +<code>/usr/share/doc/roboptim-core/html</code>, +<code>/usr/share/doc/roboptim-trajectory/html</code> or +<code>/usr/share/doc/roboptim-posture/html</code>. </div> commit 2e6df28c2ac396efdf196aac2a4c6d6aae24d014 Author: Thomas Moulard <tho...@gm...> Date: Mon Apr 20 14:36:56 2009 +0200 Add institutions logos. * htdocs/aist.jpg: New. * htdocs/cnrs.jpg: New. * htdocs/inria.jpg: New. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index a0cee6e..603bf43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2009-04-20 Thomas Moulard <tho...@gm...> + Add institutions logos. + * htdocs/aist.jpg: New. + * htdocs/cnrs.jpg: New. + * htdocs/inria.jpg: New. + +2009-04-20 Thomas Moulard <tho...@gm...> + Add instituations to web page. * htdocs/index.html: Here. diff --git a/htdocs/aist.jpg b/htdocs/aist.jpg new file mode 100644 index 0000000..af7a913 Binary files /dev/null and b/htdocs/aist.jpg differ diff --git a/htdocs/cnrs.jpg b/htdocs/cnrs.jpg new file mode 100644 index 0000000..106ec65 Binary files /dev/null and b/htdocs/cnrs.jpg differ diff --git a/htdocs/inria.jpg b/htdocs/inria.jpg new file mode 100644 index 0000000..8c84995 Binary files /dev/null and b/htdocs/inria.jpg differ commit d097a8aa0e947851dd2b3c4ed3b6d729b3c78621 Author: Thomas Moulard <tho...@gm...> Date: Mon Apr 20 14:36:21 2009 +0200 Add instituations to web page. * htdocs/index.html: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 7eef6b0..a0cee6e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-04-20 Thomas Moulard <tho...@gm...> + Add instituations to web page. + * htdocs/index.html: Here. + +2009-04-20 Thomas Moulard <tho...@gm...> + Make release notice more verbose. * htdocs/index.html: Precise the package name that has been released. diff --git a/htdocs/index.html b/htdocs/index.html index bbdec5e..fb19373 100644 --- a/htdocs/index.html +++ b/htdocs/index.html @@ -53,5 +53,12 @@ If the package is installed on your system, this documentation should be availab (<a href="http://apps.sourceforge.net/trac/roboptim/report/1">active</a>)</li> </ul> +<div style="width: 300px; border-bottom: 1px grey solid; font-weight: bold; margin-bottom: 1em"> + Institutions </div> + +<a href='http://www.aist.go.jp/'><img src='aist.jpg' alt='AIST'/></a> +<a href='http://www.cnrs.fr/'><img src='cnrs.jpg' alt='CNRS'/></a> +<a href='http://www.inria.fr/'><img src='inria.jpg' alt='INRIA'/></a> + </body> </html> commit f380d1b8a5d9f08af11226cb8c6bfd27e7325e15 Author: Thomas Moulard <tho...@gm...> Date: Mon Apr 20 14:21:04 2009 +0200 Make release notice more verbose. * htdocs/index.html: Precise the package name that has been released. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 95f85a5..7eef6b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-04-20 Thomas Moulard <tho...@gm...> + Make release notice more verbose. + * htdocs/index.html: Precise the package name + that has been released. + +2009-04-20 Thomas Moulard <tho...@gm...> + Handle documentation for multiple packages. * htdocs/index.html: Fix links. diff --git a/htdocs/index.html b/htdocs/index.html index 78057d1..bbdec5e 100644 --- a/htdocs/index.html +++ b/htdocs/index.html @@ -18,7 +18,7 @@ Support is done through <h2>Releases</h2> <dl> -<dt>2009-04-17</dt> <dd>Release 0.1: Initial release.</dd> +<dt>2009-04-17</dt> <dd>Release 0.1: Initial release of <code>roboptim-core</code>.</dd> </dl> <h2>Documentation</h2> commit 9ee9d0ea0f2d42b342cf39ebc53669d8cf71e0f8 Author: Thomas Moulard <tho...@gm...> Date: Mon Apr 20 14:19:56 2009 +0200 Handle documentation for multiple packages. * htdocs/index.html: Fix links. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 6d2a922..95f85a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-04-20 Thomas Moulard <tho...@gm...> + Handle documentation for multiple packages. + * htdocs/index.html: Fix links. + +2009-04-20 Thomas Moulard <tho...@gm...> + * htdocs/index.html: Add web site. * README: Add instructions about this repository. * sf-upload.sh: Upload web site to SourceForge diff --git a/htdocs/index.html b/htdocs/index.html index 124fec0..78057d1 100644 --- a/htdocs/index.html +++ b/htdocs/index.html @@ -25,15 +25,21 @@ Support is done through <div style="border: 1px dotted black; background: white; margin: 1em; padding: 1em; font-family: Arial, Helvetica, Sans"> -<div style="width: 300px; border-bottom: 1px grey solid; font-weight: bold"> Doxygen documentation </div> +<div style="width: 300px; border-bottom: 1px grey solid; font-weight: bold"> Core </div> <ul style="list-style-type: square"> -<li> <a href="doc/0.1/">HTML (0.1)</a></li> -<li> <a href="doc/HEAD/">HTML (development version)</a></li> +<li> <a href="doc/core/0.1/">HTML (0.1)</a></li> +<li> <a href="doc/core/HEAD/">HTML (development version)</a></li> +</ul> + +<div style="width: 300px; border-bottom: 1px grey solid; font-weight: bold"> Trajectory </div> +<ul style="list-style-type: square"> +<li> <a href="doc/trajectory/HEAD/">HTML (development version)</a></li> </ul> Documentation can also be generated through <code>make doc</code>.<br/> If the package is installed on your system, this documentation should be available in -<code>/usr/share/doc/roboptim-core/html</code>. +<code>/usr/share/doc/roboptim-core/html</code> and +<code>/usr/share/doc/roboptim-trajectory/html</code>. </div> commit 23ecffb5177fc57bc84583f5d5983eb1b97bd990 Author: Thomas Moulard <tho...@gm...> Date: Mon Apr 20 10:54:27 2009 +0200 Add ChangeLog. diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..6d2a922 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,5 @@ +2009-04-20 Thomas Moulard <tho...@gm...> + + * htdocs/index.html: Add web site. + * README: Add instructions about this repository. + * sf-upload.sh: Upload web site to SourceForge commit 06a8ba8d71574777cc7a9d20e012274b45eed12d Author: Thomas Moulard <tho...@gm...> Date: Mon Apr 20 10:52:58 2009 +0200 Initial commit. diff --git a/README b/README new file mode 100644 index 0000000..e0174dd --- /dev/null +++ b/README @@ -0,0 +1,18 @@ + -*- outline -*- + +This repository contains RobOptim web site. + +It is available on-line at: http://roboptim.sourceforge.net/ + +See SourceForge documentation for more information about SourceForge +web site hosting services. + +* FAQ +** I have uploaded the site and now a default's page is being displays, why? + +The ``index.html'' permissions are wrongs. + +Please stick to the following conventions: +- Directories: 755 +- Files: 644 +One should *not* upload executables files. diff --git a/htdocs/index.html b/htdocs/index.html new file mode 100644 index 0000000..124fec0 --- /dev/null +++ b/htdocs/index.html @@ -0,0 +1,51 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> + <title>RobOptim</title> +</head> + +<body style="background: white; margin: 1em; padding: 1em; font-family: Arial, Helvetica, Sans"> + +<h1>RobOptim : optimization for robotics</h1> +<p> +This is the web page of the RobOptim package. +</p> + +<p> +Support is done through +<a href ="https://lists.sourceforge.net/lists/listinfo/roboptim-user">roboptim-user AT lists DOT sourceforge DOT net</a>. +<p> + +<h2>Releases</h2> +<dl> +<dt>2009-04-17</dt> <dd>Release 0.1: Initial release.</dd> +</dl> + +<h2>Documentation</h2> + +<div style="border: 1px dotted black; background: white; margin: 1em; padding: 1em; font-family: Arial, Helvetica, Sans"> + +<div style="width: 300px; border-bottom: 1px grey solid; font-weight: bold"> Doxygen documentation </div> +<ul style="list-style-type: square"> +<li> <a href="doc/0.1/">HTML (0.1)</a></li> +<li> <a href="doc/HEAD/">HTML (development version)</a></li> +</ul> + +Documentation can also be generated through <code>make doc</code>.<br/> +If the package is installed on your system, this documentation should be available in +<code>/usr/share/doc/roboptim-core/html</code>. + +</div> + +<h2>Links</h2> + + +<div style="width: 300px; border-bottom: 1px grey solid; font-weight: bold"> SourceForge </div> +<ul style="list-style-type: square"> +<li> <a href="https://sourceforge.net/projects/roboptim">SourceForge space</a></li> +<li> <a href="http://apps.sourceforge.net/trac/roboptim/report">Tickets</a> +(<a href="http://apps.sourceforge.net/trac/roboptim/report/1">active</a>)</li> +</ul> + +</body> +</html> diff --git a/sf-upload.sh b/sf-upload.sh new file mode 100755 index 0000000..61ebce9 --- /dev/null +++ b/sf-upload.sh @@ -0,0 +1,45 @@ +#! /bin/sh +########## +# README # +########## +# +# Upload the SourceForge web site. +# Requires ``rsync'', ``which'' and basic shell features. +# +# To use this script, set the SF_USERNAME environement +# variable with your SF ID: +# +# $ setenv SF_USERNAME=X12345 +# or +# $ export SF_USERNAME=X12345 +# ...depending on the shell you use. +# +# Then launch the script. It will prompt for your password +# and upload the web site to SourceForge. + + +rsync=$(which rsync) + +if test "x$rsync" = x; then + echo "rsync can not be found. Please add it to your path."; + exit 1 +fi + +if test "x$SF_USERNAME" = x; then + echo -n "SF_USERNAME environment variable not set, " + echo "please define it to your SourceForge ID."; + exit 2 +fi + +echo "Uploading web site to SourceForge server, please wait."; +$rsync -avP -e ssh htdocs/* \ + $SF_USERNAME,rob...@we...:htdocs/ +ret="$?"; +if test 0 -eq "$ret"; then + echo "Done. Exiting"; + exit 0 +else + echo "Upload has failed."; +fi; + +exit $ret ----------------------------------------------------------------------- hooks/post-receive -- web |
From: Thomas M. <tho...@us...> - 2009-08-18 06:34:51
|
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". The branch, core has been updated via 720a3fa9b5f2fe20093ffb64ee1d03c062ac2c2e (commit) from 81de60add981418bbc14ac9428e6c897379a5041 (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 720a3fa9b5f2fe20093ffb64ee1d03c062ac2c2e Author: Thomas Moulard <tho...@gm...> Date: Tue Aug 18 15:33:59 2009 +0900 Display if constraints are satisfied or not when outputing a problem. * include/roboptim/core/problem.hxx: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index c263621..bb8e050 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-08-18 Thomas Moulard <tho...@gm...> + + Display if constraints are satisfied or not when outputing a problem. + * include/roboptim/core/problem.hxx: Here. + 2009-08-17 Thomas Moulard <tho...@gm...> Add Visual Studio solution and projects. diff --git a/include/roboptim/core/problem.hxx b/include/roboptim/core/problem.hxx index 782a2a3..115a9d1 100644 --- a/include/roboptim/core/problem.hxx +++ b/include/roboptim/core/problem.hxx @@ -231,8 +231,13 @@ namespace roboptim if (problem_.startingPoint ()) { U g = get<U> (problem_.constraints ()[i_]); + Function::vector_t x = (*g) (*problem_.startingPoint ()); o_ << "Initial value: " - << (*g) (*problem_.startingPoint ()) << iendl; + << x; + if (x[0] < Function::getLowerBound (problem_.bounds ()[i_]) + || x[0] > Function::getUpperBound (problem_.bounds ()[i_])) + o_ << " (constraint not satisfied)"; + o_ << iendl; } o_ << decindent << decindent; } ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 +++++ include/roboptim/core/problem.hxx | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletions(-) hooks/post-receive -- roboptim |
From: Thomas M. <tho...@us...> - 2009-08-17 11:09:38
|
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". The branch, trajectory has been updated via a4c0ae5c5abdeb342c624aff520b52eff58c6645 (commit) from dface2e4e1975273c586d56bdc19a4b38850af64 (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 a4c0ae5c5abdeb342c624aff520b52eff58c6645 Author: Thomas Moulard <tho...@gm...> Date: Mon Aug 17 20:08:54 2009 +0900 Use boost::shared_ptr to store function in StateCost. * include/roboptim/trajectory/state-cost.hh, * include/roboptim/trajectory/state-cost.hxx: Use shared pointer. * tests/anthropomorphic-cost-function.cc, * tests/state-cost.cc: Use new interface. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index b335e26..91f8a84 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2009-08-17 Thomas Moulard <tho...@gm...> + Use boost::shared_ptr to store function in StateCost. + * include/roboptim/trajectory/state-cost.hh, + * include/roboptim/trajectory/state-cost.hxx: Use shared pointer. + * tests/anthropomorphic-cost-function.cc, + * tests/state-cost.cc: Use new interface. + +2009-08-17 Thomas Moulard <tho...@gm...> + Reimplement speed limits using StateCost. * include/Makefile.am: Remove frontal-speed.hxx, orthogonal-speed.hxx. * include/roboptim/trajectory/anthropomorphic-cost-function.hxx, diff --git a/include/roboptim/trajectory/state-cost.hh b/include/roboptim/trajectory/state-cost.hh index d736653..6950e3d 100644 --- a/include/roboptim/trajectory/state-cost.hh +++ b/include/roboptim/trajectory/state-cost.hh @@ -50,7 +50,7 @@ namespace roboptim /// \brief Concrete class should call this constructor. StateCost (const trajectory_t&, - const DerivableFunction&, + boost::shared_ptr<DerivableFunction>, const StableTimePoint tpt, size_type order = 1) throw (); @@ -60,7 +60,7 @@ namespace roboptim template <typename F, typename CLIST> static void addToProblem (const T& trajectory, - const DerivableFunction& function, + boost::shared_ptr<DerivableFunction> function, unsigned order, Problem<F, CLIST>& problem, typename Function::interval_t bounds, @@ -84,7 +84,7 @@ namespace roboptim private: const trajectory_t& trajectory_; - const DerivableFunction& function_; + boost::shared_ptr<DerivableFunction> function_; StableTimePoint tpt_; size_type order_; }; diff --git a/include/roboptim/trajectory/state-cost.hxx b/include/roboptim/trajectory/state-cost.hxx index 270ecb2..7dc96a3 100644 --- a/include/roboptim/trajectory/state-cost.hxx +++ b/include/roboptim/trajectory/state-cost.hxx @@ -23,19 +23,19 @@ namespace roboptim { template <typename T> StateCost<T>::StateCost (const trajectory_t& trajectory, - const DerivableFunction& function, + boost::shared_ptr<DerivableFunction> function, const StableTimePoint tpt, size_type order) throw () : DerivableFunction (trajectory.parameters ().size (), - function.outputSize (), + function->outputSize (), (boost::format ("state cost using function ``%1%''") - % function.getName ()).str ()), + % function->getName ()).str ()), trajectory_ (trajectory), function_ (function), tpt_ (tpt), order_ (order) { - assert (function_.inputSize () == trajectory_.outputSize () * (order + 1)); + assert (function_->inputSize () == trajectory_.outputSize () * (order + 1)); } template <typename T> @@ -56,8 +56,8 @@ namespace roboptim { static trajectory_t updatedTrajectory = trajectory_; updatedTrajectory.setParameters (p); - function_ (res, updatedTrajectory.state - (tpt_.getTime (updatedTrajectory.timeRange ()), this->order_)); + (*function_) (res, updatedTrajectory.state + (tpt_.getTime (updatedTrajectory.timeRange ()), this->order_)); } template <typename T> @@ -68,7 +68,7 @@ namespace roboptim static trajectory_t updatedTrajectory = trajectory_; updatedTrajectory.setParameters (p); const value_type t = tpt_.getTime (updatedTrajectory.timeRange ()); - grad = prod (function_.gradient (updatedTrajectory.state (t, this->order_), i), + grad = prod (function_->gradient (updatedTrajectory.state (t, this->order_), i), updatedTrajectory.variationStateWrtParam (t, this->order_)); } diff --git a/tests/anthropomorphic-cost-function.cc b/tests/anthropomorphic-cost-function.cc index 6b5d51b..eb41736 100644 --- a/tests/anthropomorphic-cost-function.cc +++ b/tests/anthropomorphic-cost-function.cc @@ -117,14 +117,14 @@ int optimize (double initialX, // Add constraints on speeds. // Frontal - FrontalSpeed frontalSpeed; + boost::shared_ptr<DerivableFunction> frontalSpeed (new FrontalSpeed ()); Function::interval_t vRangeFrontal = Function::makeInterval (0., vMax); StateCost<freeTime_t>::addToProblem (freeTimeTraj, frontalSpeed, 1, problem, vRangeFrontal, nControlPoints * nConstraintsPerCtrlPts); // Orthogonal - OrthogonalSpeed orthogonalSpeed; + boost::shared_ptr<DerivableFunction> orthogonalSpeed (new OrthogonalSpeed ()); Function::interval_t vRangeOrthogonal = Function::makeInterval (-vMax, vMax); StateCost<freeTime_t>::addToProblem (freeTimeTraj, orthogonalSpeed, 1, problem, vRangeOrthogonal, diff --git a/tests/state-cost.cc b/tests/state-cost.cc index a1e13c1..78f0aa6 100644 --- a/tests/state-cost.cc +++ b/tests/state-cost.cc @@ -49,10 +49,10 @@ int run_test () const StableTimePoint timePoint = i / 10. * tMax; const double t = timePoint.getTime (spline.timeRange ()); - FrontalSpeed frontalSpeed; + boost::shared_ptr<DerivableFunction> frontalSpeed (new FrontalSpeed ()); StateCost<Spline> stateCost (spline, frontalSpeed, timePoint, orderMax); - OrthogonalSpeed orthogonalSpeed; + boost::shared_ptr<DerivableFunction> orthogonalSpeed (new OrthogonalSpeed ()); StateCost<Spline> orthoStateCost (spline, orthogonalSpeed, timePoint, orderMax); std::cout << "State cost evaluation:" << std::endl @@ -73,10 +73,10 @@ int run_test () try { std::cout << "Check frontal speed gradient." << std::endl; - checkGradientAndThrow (frontalSpeed, 0, spline.state (t, orderMax)); + checkGradientAndThrow (*frontalSpeed, 0, spline.state (t, orderMax)); std::cout << "Check orthogonal speed gradient." << std::endl; - checkGradientAndThrow (orthogonalSpeed, 0, spline.state (t, orderMax)); + checkGradientAndThrow (*orthogonalSpeed, 0, spline.state (t, orderMax)); std::cout << "Check state cost gradient." << std::endl; checkGradientAndThrow (stateCost, 0, params); ----------------------------------------------------------------------- Summary of changes: ChangeLog | 8 ++++++++ include/roboptim/trajectory/state-cost.hh | 6 +++--- include/roboptim/trajectory/state-cost.hxx | 14 +++++++------- tests/anthropomorphic-cost-function.cc | 4 ++-- tests/state-cost.cc | 8 ++++---- 5 files changed, 24 insertions(+), 16 deletions(-) hooks/post-receive -- roboptim |
From: Thomas M. <tho...@us...> - 2009-08-17 10:01: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". The branch, trajectory has been updated via dface2e4e1975273c586d56bdc19a4b38850af64 (commit) via db02462df3dc8314049ea27af497246d2601ad75 (commit) from f3f81b4dc599aed5f5427ac75d29141d1f327054 (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 dface2e4e1975273c586d56bdc19a4b38850af64 Author: Thomas Moulard <tho...@gm...> Date: Mon Aug 17 19:00:52 2009 +0900 Reimplement speed limits using StateCost. * include/Makefile.am: Remove frontal-speed.hxx, orthogonal-speed.hxx. * include/roboptim/trajectory/anthropomorphic-cost-function.hxx, * include/roboptim/trajectory/frontal-speed.hh: Reimplement. * include/roboptim/trajectory/frontal-speed.hxx: Remove. * include/roboptim/trajectory/orthogonal-speed.hh: Reimplement. * include/roboptim/trajectory/orthogonal-speed.hxx: Remove. * include/roboptim/trajectory/trajectory.hxx: Fix state related methods. * include/roboptim/trajectory/visualization/speed.hh: Draw speed properly. * src/Makefile.am: Add new sources. * src/frontal-speed.cc: New. * src/orthogonal-speed.cc: New. * src/spline.cc: Fix documentation. * tests/Makefile.am: Add test case for StateCost. * tests/anthropomorphic-cost-function.cc: Use new speed functions. * tests/spline-time-optimization.cc: Do not write optimization result on stdout. * tests/spline-time-optimization.stdout: Regenerate. * tests/state-cost.cc: New. * tests/state-cost.stdout: New. * tests/testsuite.at: Run new test. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index d6d0caf..b335e26 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,29 @@ 2009-08-17 Thomas Moulard <tho...@gm...> + Reimplement speed limits using StateCost. + * include/Makefile.am: Remove frontal-speed.hxx, orthogonal-speed.hxx. + * include/roboptim/trajectory/anthropomorphic-cost-function.hxx, + * include/roboptim/trajectory/frontal-speed.hh: Reimplement. + * include/roboptim/trajectory/frontal-speed.hxx: Remove. + * include/roboptim/trajectory/orthogonal-speed.hh: Reimplement. + * include/roboptim/trajectory/orthogonal-speed.hxx: Remove. + * include/roboptim/trajectory/trajectory.hxx: Fix state related methods. + * include/roboptim/trajectory/visualization/speed.hh: Draw speed properly. + * src/Makefile.am: Add new sources. + * src/frontal-speed.cc: New. + * src/orthogonal-speed.cc: New. + * src/spline.cc: Fix documentation. + * tests/Makefile.am: Add test case for StateCost. + * tests/anthropomorphic-cost-function.cc: Use new speed functions. + * tests/spline-time-optimization.cc: Do not write optimization result + on stdout. + * tests/spline-time-optimization.stdout: Regenerate. + * tests/state-cost.cc: New. + * tests/state-cost.stdout: New. + * tests/testsuite.at: Run new test. + +2009-08-17 Thomas Moulard <tho...@gm...> + Implement StateCost. * include/roboptim/trajectory/state-cost.hh, * include/roboptim/trajectory/state-cost.hxx: Implement state cost. diff --git a/include/Makefile.am b/include/Makefile.am index cc81c10..57a267d 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -9,14 +9,12 @@ nobase_include_HEADERS = \ roboptim/trajectory/freeze.hh \ roboptim/trajectory/freeze.hxx \ roboptim/trajectory/frontal-speed.hh \ - roboptim/trajectory/frontal-speed.hxx \ roboptim/trajectory/fwd.hh \ roboptim/trajectory/limit-omega.hh \ roboptim/trajectory/limit-omega.hxx \ roboptim/trajectory/limit-speed.hh \ roboptim/trajectory/limit-speed.hxx \ roboptim/trajectory/orthogonal-speed.hh \ - roboptim/trajectory/orthogonal-speed.hxx \ roboptim/trajectory/spline.hh \ roboptim/trajectory/spline-length.hh \ roboptim/trajectory/stable-time-point.hh \ diff --git a/include/roboptim/trajectory/anthropomorphic-cost-function.hxx b/include/roboptim/trajectory/anthropomorphic-cost-function.hxx index b2b9f0c..122fd91 100644 --- a/include/roboptim/trajectory/anthropomorphic-cost-function.hxx +++ b/include/roboptim/trajectory/anthropomorphic-cost-function.hxx @@ -72,12 +72,12 @@ namespace roboptim void operator () (const double& t) { static Function::vector_t t_ (1); - FrontalSpeed<T> frontalSpeed (traj_); - OrthogonalSpeed<T> orthogonalSpeed (traj_); + FrontalSpeed frontalSpeed; + OrthogonalSpeed orthogonalSpeed; t_[0] = t; - const Function::value_type u1 = frontalSpeed.gradient (t_)[0]; + const Function::value_type u1 = frontalSpeed.gradient (traj_.state (t, 1))[0]; const Function::value_type u2 = traj_.derivative (t, 2)[2]; - const Function::value_type u3 = orthogonalSpeed.gradient (t_)[0]; + const Function::value_type u3 = orthogonalSpeed.gradient (traj_.state (t, 1))[0]; res_ += alpha_[0] + alpha_[1] * u1 * u1 diff --git a/include/roboptim/trajectory/frontal-speed.hh b/include/roboptim/trajectory/frontal-speed.hh index 8f4c00c..d9b7c2f 100644 --- a/include/roboptim/trajectory/frontal-speed.hh +++ b/include/roboptim/trajectory/frontal-speed.hh @@ -17,52 +17,21 @@ #ifndef ROBOPTIM_TRAJECTORY_FRONTAL_SPEED_HH # define ROBOPTIM_TRAJECTORY_FRONTAL_SPEED_HH -# include <boost/shared_ptr.hpp> - # include <roboptim/core/derivable-function.hh> -# include <roboptim/trajectory/fwd.hh> namespace roboptim { - template <typename T> class FrontalSpeed : public DerivableFunction { public: - FrontalSpeed (const T& trajectory) throw (); + FrontalSpeed () throw (); ~FrontalSpeed () throw (); protected: void impl_compute (result_t& res, const argument_t& t) const throw (); void impl_gradient (gradient_t& grad, const argument_t& t, size_type i) const throw (); - private: - const T& trajectory_; - }; - - - template <typename T> - class LimitFrontalSpeed : public DerivableFunction - { - public: - LimitFrontalSpeed (StableTimePoint timePoint, - const T& trajectory) throw (); - ~LimitFrontalSpeed () throw (); - - template <typename F, typename CLIST> - static void addToProblem (const T&, - Problem<F, CLIST>&, - typename Function::interval_t, - unsigned); - - protected: - void impl_compute (result_t& res, const argument_t& p) const throw (); - void impl_gradient (gradient_t& grad, const argument_t& p, size_type i) - const throw (); - private: - StableTimePoint timePoint_; - const T& trajectory_; }; } // end of namespace roboptim. -# include <roboptim/trajectory/frontal-speed.hxx> #endif //! ROBOPTIM_TRAJECTORY_FRONTAL_SPEED_HH diff --git a/include/roboptim/trajectory/frontal-speed.hxx b/include/roboptim/trajectory/frontal-speed.hxx deleted file mode 100644 index dee6b47..0000000 --- a/include/roboptim/trajectory/frontal-speed.hxx +++ /dev/null @@ -1,152 +0,0 @@ -// 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/>. - -#ifndef ROBOPTIM_TRAJECTORY_FRONTAL_SPEED_HXX -# define ROBOPTIM_TRAJECTORY_FRONTAL_SPEED_HXX -# include <cmath> -# include <boost/format.hpp> -# include <boost/numeric/ublas/vector.hpp> -# include <boost/scoped_ptr.hpp> - -# include <roboptim/core/finite-difference-gradient.hh> - -# include <roboptim/trajectory/trajectory.hh> - -namespace roboptim -{ - template <typename T> - FrontalSpeed<T>::FrontalSpeed (const T& trajectory) throw () - : DerivableFunction (1, 1, "frontal speed"), - trajectory_ (trajectory) - {} - - template <typename T> - FrontalSpeed<T>::~FrontalSpeed () throw () - {} - - template <typename T> - void - FrontalSpeed<T>::impl_compute (result_t& res, const argument_t& t) const throw () - { - using namespace boost::numeric::ublas; - res.clear (); - - result_t position = trajectory_ (t[0]); - const value_type& theta = position[2]; - - gradient_t speed = trajectory_.derivative (t[0], 1); - const value_type& xdot = speed[0]; - const value_type& ydot = speed[1]; - - res[0] = std::cos (theta) * xdot + std::sin (theta) * ydot; - } - - template <typename T> - void - FrontalSpeed<T>::impl_gradient (gradient_t& grad, const argument_t& t, size_type i) - const throw () - { - - grad.clear (); - - result_t position = trajectory_ (t[0]); - const value_type& theta = position[2]; - - gradient_t speed = trajectory_.derivative (t[0], 1); - const value_type& dx = speed[0]; - const value_type& dy = speed[1]; - const value_type& dtheta = speed[2]; - - gradient_t acceleration = trajectory_.derivative (t[0], 2); - const value_type& ddx = acceleration[0]; - const value_type& ddy = acceleration[1]; - - grad[0] = - std::cos (theta) * (ddx + dtheta * dy) - + std::sin (theta) * (ddy - dtheta * dx); - } - - - - - template <typename T> - LimitFrontalSpeed<T>::LimitFrontalSpeed (StableTimePoint timePoint, - const T& trajectory) throw () - : DerivableFunction (trajectory.parameters ().size (), 1, - (boost::format ("frontal speed limit (%1%)") - % timePoint.getAlpha ()).str ()), - timePoint_ (timePoint), - trajectory_ (trajectory) - { - } - - template <typename T> - LimitFrontalSpeed<T>::~LimitFrontalSpeed () throw () - {} - - template <typename T> - void - LimitFrontalSpeed<T>::impl_compute (result_t& res, const argument_t& p) const throw () - { - static T updatedTrajectory = trajectory_; - static FrontalSpeed<T> frontalSpeed (updatedTrajectory); - static vector_t t (1); - - updatedTrajectory.setParameters (p); - t[0] = this->timePoint_.getTime (updatedTrajectory.timeRange ()); - res = frontalSpeed (t); - } - - template <typename T> - void - LimitFrontalSpeed<T>::impl_gradient (gradient_t& grad, const argument_t& p, size_type i) - const throw () - { - assert (i == 0); - grad.clear (); - - //FIXME: compute gradient analytically. - FiniteDifferenceGradient fdfunction (*this); - fdfunction.gradient (grad, p, 0); - } - - template <typename T> - template <typename F, typename CLIST> - void - LimitFrontalSpeed<T>::addToProblem (const T& trajectory, - Problem<F, CLIST>& problem, - typename Function::interval_t vRange, - unsigned nConstraints) - { - using namespace boost; - - for (unsigned i = 0; i < nConstraints; ++i) - { - const value_type t = (i + 1.) / (nConstraints + 1.); - assert (t > 0. && t < 1.); - shared_ptr<LimitFrontalSpeed> speed - (new LimitFrontalSpeed (t * tMax, trajectory)); - problem.addConstraint - (static_pointer_cast<DerivableFunction> (speed), - vRange); - } - } - -} // end of namespace roboptim. - - -#endif //! ROBOPTIM_TRAJECTORY_FRONTAL_SPEED_HXX diff --git a/include/roboptim/trajectory/orthogonal-speed.hh b/include/roboptim/trajectory/orthogonal-speed.hh index 3a08ad7..3a1804a 100644 --- a/include/roboptim/trajectory/orthogonal-speed.hh +++ b/include/roboptim/trajectory/orthogonal-speed.hh @@ -17,52 +17,21 @@ #ifndef ROBOPTIM_TRAJECTORY_ORTHOGONAL_SPEED_HH # define ROBOPTIM_TRAJECTORY_ORTHOGONAL_SPEED_HH -# include <boost/shared_ptr.hpp> - # include <roboptim/core/derivable-function.hh> -# include <roboptim/trajectory/fwd.hh> namespace roboptim { - template <typename T> class OrthogonalSpeed : public DerivableFunction { public: - OrthogonalSpeed (const T& spline) throw (); + OrthogonalSpeed () throw (); ~OrthogonalSpeed () throw (); protected: void impl_compute (result_t& res, const argument_t& p) const throw (); void impl_gradient (gradient_t& grad, const argument_t& p, size_type i) const throw (); - private: - const T& trajectory_; - }; - - template <typename T> - class LimitOrthogonalSpeed : public DerivableFunction - { - public: - LimitOrthogonalSpeed (StableTimePoint timePoint, - const T& trajectory) throw (); - ~LimitOrthogonalSpeed () throw (); - - template <typename F, typename CLIST> - static void addToProblem (const T&, - Problem<F, CLIST>&, - typename Function::interval_t, - unsigned); - - protected: - void impl_compute (result_t& res, const argument_t& p) const throw (); - void impl_gradient (gradient_t& grad, const argument_t& p, size_type i) - const throw (); - private: - StableTimePoint timePoint_; - const T& trajectory_; }; - } // end of namespace roboptim. -# include <roboptim/trajectory/orthogonal-speed.hxx> #endif //! ROBOPTIM_TRAJECTORY_ORTHOGONAL_SPEED_HH diff --git a/include/roboptim/trajectory/orthogonal-speed.hxx b/include/roboptim/trajectory/orthogonal-speed.hxx deleted file mode 100644 index 6aade93..0000000 --- a/include/roboptim/trajectory/orthogonal-speed.hxx +++ /dev/null @@ -1,146 +0,0 @@ -// 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/>. - -#ifndef ROBOPTIM_TRAJECTORY_ORTHOGONAL_SPEED_HXX -# define ROBOPTIM_TRAJECTORY_ORTHOGONAL_SPEED_HXX -# include <cmath> -# include <boost/format.hpp> -# include <boost/numeric/ublas/vector.hpp> -# include <boost/scoped_ptr.hpp> - -# include <roboptim/core/finite-difference-gradient.hh> - -# include <roboptim/trajectory/trajectory.hh> - -namespace roboptim -{ - template <typename T> - OrthogonalSpeed<T>::OrthogonalSpeed (const T& trajectory) throw () - : DerivableFunction (1, 1, "orthogonal speed"), - trajectory_ (trajectory) - {} - - template <typename T> - OrthogonalSpeed<T>::~OrthogonalSpeed () throw () - {} - - - template <typename T> - void - OrthogonalSpeed<T>::impl_compute (result_t& res, const argument_t& t) const throw () - { - using namespace boost::numeric::ublas; - res.clear (); - - result_t position = trajectory_ (t[0]); - const value_type& theta = position[2]; - - gradient_t speed = trajectory_.derivative (t[0], 1); - const value_type& xdot = speed[0]; - const value_type& ydot = speed[1]; - - res[0] = std::cos (theta) * ydot - std::sin (theta) * xdot; - } - - template <typename T> - void - OrthogonalSpeed<T>::impl_gradient (gradient_t& grad, const argument_t& t, size_type i) - const throw () - { - grad.clear (); - - result_t position = trajectory_ (t[0]); - const value_type& theta = position[2]; - - gradient_t speed = trajectory_.derivative (t[0], 1); - const value_type& dx = speed[0]; - const value_type& dy = speed[1]; - const value_type& dtheta = speed[2]; - - gradient_t acceleration = trajectory_.derivative (t[0], 2); - const value_type& ddx = acceleration[0]; - const value_type& ddy = acceleration[1]; - - grad[0] = - std::cos (theta) * (ddy - dtheta * dx) - - std::sin (theta) * (ddx + dtheta * dy); - } - - - template <typename T> - LimitOrthogonalSpeed<T>::LimitOrthogonalSpeed (StableTimePoint timePoint, - const T& trajectory) throw () - : DerivableFunction (trajectory.parameters ().size (), 1, - (boost::format ("orthogonal speed limit (%1%)") - % timePoint.getAlpha ()).str ()), - timePoint_ (timePoint), - trajectory_ (trajectory) - {} - - template <typename T> - LimitOrthogonalSpeed<T>::~LimitOrthogonalSpeed () throw () - {} - - template <typename T> - void - LimitOrthogonalSpeed<T>::impl_compute (result_t& res, const argument_t& p) const throw () - { - static T updatedTrajectory = trajectory_; - static OrthogonalSpeed<T> orthogonalSpeed (updatedTrajectory); - static vector_t t (1); - - updatedTrajectory.setParameters (p); - t[0] = this->timePoint_.getTime (updatedTrajectory.timeRange ()); - res = orthogonalSpeed (t); - } - - template <typename T> - void - LimitOrthogonalSpeed<T>::impl_gradient (gradient_t& grad, const argument_t& p, size_type i) - const throw () - { - assert (i == 0); - grad.clear (); - - //FIXME: compute gradient analytically. - FiniteDifferenceGradient fdfunction (*this); - fdfunction.gradient (grad, p, 0); - } - - template <typename T> - template <typename F, typename CLIST> - void - LimitOrthogonalSpeed<T>::addToProblem (const T& trajectory, - Problem<F, CLIST>& problem, - typename Function::interval_t vRange, - unsigned nConstraints) - { - using namespace boost; - - for (unsigned i = 0; i < nConstraints; ++i) - { - const value_type t = (i + 1.) / (nConstraints + 1.); - assert (t > 0. && t < 1.); - shared_ptr<DerivableFunction> speed - (new LimitOrthogonalSpeed (t * tMax, trajectory)); - problem.addConstraint (speed, vRange); - } - } -} // end of namespace roboptim. - - -#endif //! ROBOPTIM_TRAJECTORY_ORTHOGONAL_SPEED_HXX diff --git a/include/roboptim/trajectory/trajectory.hxx b/include/roboptim/trajectory/trajectory.hxx index d561332..065530d 100644 --- a/include/roboptim/trajectory/trajectory.hxx +++ b/include/roboptim/trajectory/trajectory.hxx @@ -17,6 +17,8 @@ #ifndef ROBOPTIM_TRAJECTORY_TRAJECTORY_HXX # define ROBOPTIM_TRAJECTORY_TRAJECTORY_HXX +# include <boost/numeric/ublas/matrix_proxy.hpp> +# include <boost/numeric/ublas/vector_proxy.hpp> namespace roboptim { @@ -77,15 +79,13 @@ namespace roboptim typename Trajectory<dorder>::vector_t Trajectory<dorder>::state (double t, size_type order) const throw () { - size_type dimension = this->outputSize (); + using namespace boost::numeric::ublas; + const value_type dimension = this->outputSize (); vector_t result ((order + 1) * dimension); for (size_type o = 0; o <= order; ++o) - { - vector_t df = derivative (t, o); - for (size_type i = 0; i < dimension; ++i) - result (i + dimension * o) = df (i); - } + subrange (result, o * dimension, (o + 1) * dimension) = + this->derivative (t, o); return result; } @@ -95,16 +95,16 @@ namespace roboptim Trajectory<dorder>::variationStateWrtParam (double t, size_type order) const throw () { - size_type dimension = this->outputSize (); - size_type parameterSize = parameters ().size (); - jacobian_t result ((dimension + 1) * order, parameterSize); + using namespace boost::numeric::ublas; + const size_type dimension = this->outputSize (); + const size_type parameterSize = parameters ().size (); + jacobian_t result (dimension * (order + 1), parameterSize); for (size_type o = 0; o <= order; ++o) { - jacobian_t jacobian = variationDerivWrtParam (t, order); - for (size_type i = 0; i < dimension; ++i) - for (size_type j = 0; j < parameterSize; ++j) - result (i + dimension * order, j) = jacobian (i, j); + range xrange (o * dimension, (o + 1) * dimension); + range yrange (0, parameterSize); + project (result, xrange, yrange) = this->variationDerivWrtParam (t, o); } return result; } diff --git a/include/roboptim/trajectory/visualization/speed.hh b/include/roboptim/trajectory/visualization/speed.hh index e04ef06..7567786 100644 --- a/include/roboptim/trajectory/visualization/speed.hh +++ b/include/roboptim/trajectory/visualization/speed.hh @@ -56,31 +56,29 @@ namespace roboptim % traj.getName ()).str (); { - FrontalSpeed<T> frontalSpeed (traj); + FrontalSpeed frontalSpeed; for (double i = step; i < 1. - step; i += step) { StableTimePoint timePoint = i * tMax; - Function::vector_t t_ (1); - t_[0] = timePoint.getTime (traj.timeRange ()); + double t = timePoint.getTime (traj.timeRange ()); str += (format ("%1f %2f\n") - % t_[0] - % frontalSpeed (t_)[0]).str (); + % t + % frontalSpeed (traj.state (t, 1))[0]).str (); } str += "e\n"; } { - OrthogonalSpeed<T> orthogonalSpeed (traj); + OrthogonalSpeed orthogonalSpeed; for (double i = step; i < 1. - step; i += step) { StableTimePoint timePoint = i * tMax; - Function::vector_t t_ (1); - t_[0] = timePoint.getTime (traj.timeRange ()); + double t = timePoint.getTime (traj.timeRange ()); str += (format ("%1f %2f\n") - % t_[0] - % orthogonalSpeed (t_)[0]).str (); + % t + % orthogonalSpeed (traj.state(t, 1))[0]).str (); } str += "e\n"; } @@ -89,11 +87,10 @@ namespace roboptim for (double i = step; i < 1. - step; i += step) { StableTimePoint timePoint = i * tMax; - Function::vector_t t_ (1); - t_[0] = timePoint.getTime (traj.timeRange ()); + double t = timePoint.getTime (traj.timeRange ()); str += (format ("%1f %2f\n") - % t_[0] + % t % traj.derivative (timePoint, 1)[2]).str (); } str += "e\n"; diff --git a/src/Makefile.am b/src/Makefile.am index a4ea844..7be8b1b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -10,6 +10,8 @@ lib_LTLIBRARIES = libroboptim-trajectory.la libroboptim_trajectory_la_SOURCES = \ doc.hh \ + frontal-speed.cc \ + orthogonal-speed.cc \ spline.cc \ spline-length.cc diff --git a/src/frontal-speed.cc b/src/frontal-speed.cc new file mode 100644 index 0000000..9f1bb66 --- /dev/null +++ b/src/frontal-speed.cc @@ -0,0 +1,64 @@ +// 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 <cmath> +#include <roboptim/trajectory/frontal-speed.hh> + +namespace roboptim +{ + FrontalSpeed::FrontalSpeed () throw () + : DerivableFunction (2 * 3, 1, "frontal speed") + {} + + + FrontalSpeed::~FrontalSpeed () throw () + {} + + + void + FrontalSpeed::impl_compute (result_t& res, const argument_t& x) const throw () + { + const value_type& theta = x[2]; + + const value_type& xdot = x[3 + 0]; + const value_type& ydot = x[3 + 1]; + res[0] = std::cos (theta) * xdot + std::sin (theta) * ydot; + } + + + void + FrontalSpeed::impl_gradient (gradient_t& grad, const argument_t& arg, size_type i) + const throw () + { + assert (i == 0); + const value_type& x = arg[0]; + const value_type& y = arg[1]; + const value_type& theta = arg[2]; + const value_type& dx = arg[3 + 0]; + const value_type& dy = arg[3 + 1]; + const value_type& dtheta = arg[3 + 2]; + + // 0, 1, 5 components are null. + grad.clear (); + + grad[2] = std::cos (theta) * dy - std::sin (theta) * dx; + grad[3] = std::cos (theta); + grad[4] = std::sin (theta); + + + } +} // end of namespace roboptim. diff --git a/src/orthogonal-speed.cc b/src/orthogonal-speed.cc new file mode 100644 index 0000000..063111f --- /dev/null +++ b/src/orthogonal-speed.cc @@ -0,0 +1,59 @@ +// 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 <cmath> +#include <roboptim/trajectory/orthogonal-speed.hh> + +namespace roboptim +{ + OrthogonalSpeed::OrthogonalSpeed () throw () + : DerivableFunction (2 * 3, 1, "orthogonal speed") + {} + + OrthogonalSpeed::~OrthogonalSpeed () throw () + {} + + void + OrthogonalSpeed::impl_compute (result_t& res, const argument_t& x) const throw () + { + const value_type& theta = x[2]; + + const value_type& xdot = x[3 + 0]; + const value_type& ydot = x[3 + 1]; + res[0] = std::cos (theta) * ydot - std::sin (theta) * xdot; + } + + + void + OrthogonalSpeed::impl_gradient (gradient_t& grad, const argument_t& arg, size_type i) + const throw () + { + const value_type& x = arg[0]; + const value_type& y = arg[1]; + const value_type& theta = arg[2]; + + const value_type& dx = arg[3 + 0]; + const value_type& dy = arg[3 + 1]; + const value_type& dtheta = arg[3 + 2]; + + grad.clear (); + // 0, 1, 5 components are null. + grad[2] = -1. * (std::cos (theta) * dx + std::sin (theta) * dy); + grad[3] = -std::sin (theta); + grad[4] = std::cos (theta); + } +} // end of namespace roboptim. diff --git a/src/spline.cc b/src/spline.cc index 9d3de11..f4e3722 100644 --- a/src/spline.cc +++ b/src/spline.cc @@ -51,7 +51,7 @@ namespace roboptim spline_ (), nbp_ (spline.parameters ().size () / spline.outputSize ()) { - // Can not work with a smalle parameters vector. + // Can not work with a smaller parameters vector. assert (parameters_.size () >= 4); assert (parameters_.size () >= 2 * spline.outputSize () diff --git a/tests/Makefile.am b/tests/Makefile.am index 82b49fe..692aaea 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -46,6 +46,13 @@ check_PROGRAMS += spline-time-optimization spline_time_optimization_SOURCES = spline-time-optimization.cc $(COMMON_SOURCES) spline_time_optimization_LDADD = $(top_builddir)/src/libroboptim-trajectory.la +# state-cost +check_PROGRAMS += state-cost +state_cost_SOURCES = state-cost.cc $(COMMON_SOURCES) +state_cost_LDADD = $(top_builddir)/src/libroboptim-trajectory.la + + + # anthropomorphic-cost-function-case-1 check_PROGRAMS += anthropomorphic-cost-function-case-1 anthropomorphic_cost_function_case_1_SOURCES = \ @@ -140,4 +147,5 @@ EXTRA_DIST += \ spline-gradient.stdout \ spline-optimization.stdout \ spline-time-optimization.stdout \ - spline.stdout + spline.stdout \ + state-cost.stdout diff --git a/tests/anthropomorphic-cost-function.cc b/tests/anthropomorphic-cost-function.cc index b5366a9..6b5d51b 100644 --- a/tests/anthropomorphic-cost-function.cc +++ b/tests/anthropomorphic-cost-function.cc @@ -35,6 +35,7 @@ #include <roboptim/trajectory/limit-omega.hh> #include <roboptim/trajectory/orthogonal-speed.hh> #include <roboptim/trajectory/spline.hh> +#include <roboptim/trajectory/state-cost.hh> #include <roboptim/trajectory/trajectory-cost.hh> #include <roboptim/trajectory/visualization/trajectory.hh> @@ -116,15 +117,17 @@ int optimize (double initialX, // Add constraints on speeds. // Frontal + FrontalSpeed frontalSpeed; Function::interval_t vRangeFrontal = Function::makeInterval (0., vMax); - LimitFrontalSpeed<freeTime_t>::addToProblem - (freeTimeTraj, problem, vRangeFrontal, + StateCost<freeTime_t>::addToProblem + (freeTimeTraj, frontalSpeed, 1, problem, vRangeFrontal, nControlPoints * nConstraintsPerCtrlPts); // Orthogonal + OrthogonalSpeed orthogonalSpeed; Function::interval_t vRangeOrthogonal = Function::makeInterval (-vMax, vMax); - LimitOrthogonalSpeed<freeTime_t>::addToProblem - (freeTimeTraj, problem, vRangeOrthogonal, + StateCost<freeTime_t>::addToProblem + (freeTimeTraj, orthogonalSpeed, 1, problem, vRangeOrthogonal, nControlPoints * nConstraintsPerCtrlPts); // Omega (theta dot) diff --git a/tests/spline-time-optimization.cc b/tests/spline-time-optimization.cc index 91ef576..f1d58f7 100644 --- a/tests/spline-time-optimization.cc +++ b/tests/spline-time-optimization.cc @@ -116,7 +116,7 @@ int run_test () std::cout << solver << std::endl; solver_t::result_t res = solver.minimum (); - std::cout << res << std::endl; + std::cerr << res << std::endl; FreeTimeTrajectory<Spline::derivabilityOrder> optimizedTrajectory = freeTimeTraj; diff --git a/tests/spline-time-optimization.stdout b/tests/spline-time-optimization.stdout index 4e047f6..94521b2 100644 --- a/tests/spline-time-optimization.stdout +++ b/tests/spline-time-optimization.stdout @@ -675,15 +675,9 @@ CFSQP specific variables: Neqn: 0 Mode: 100 Iprint: 0 - Miter: 500 + Miter: 50 Bigbnd: 1e+10 Eps: 1e-08 Epseqn: 1e-08 Udelta: 1e-08 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) -Result: - Size (input, output): 12, 1 - X: [12](1.41708,1.93056e-33,20.1496,40.0176,60.0117,80.0059,100,119.994,139.988,159.982,179.85,200) - Value: [1](-1.41708) - Constraints values: [110](0.125287,2.0046,10.1483,32.0735,78.3046,162.372,300.815,513.177,822.01,1224.65,1652.09,2077.46,2479.49,2840.04,3144.04,3379.52,3537.61,3612.5,3612.5,3603.23,3595.68,3589.87,3585.77,3583.39,3582.72,3583.77,3586.54,3590.95,3595.47,3599.46,3602.91,3605.84,3608.24,3610.1,3611.43,3612.23,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.23,3611.43,3610.1,3608.24,3605.84,3602.91,3599.46,3595.47,3590.95,3586.54,3583.77,3582.72,3583.39,3585.77,3589.87,3595.68,3603.23,3612.5,3612.5,3537.61,3379.52,3144.04,2840.04,2479.49,2077.46,1652.09,1224.65,822.01,513.177,300.815,162.372,78.3046,32.0735,10.1483,2.0046,0.125287) - Lambda: [110](0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.96365e-05,1.96365e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3.91583e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.96365e-05,1.96365e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3.91583e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.96364e-05,1.96367e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1) diff --git a/tests/state-cost.cc b/tests/state-cost.cc new file mode 100644 index 0000000..a1e13c1 --- /dev/null +++ b/tests/state-cost.cc @@ -0,0 +1,94 @@ +// 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 <roboptim/core/io.hh> +#include <roboptim/core/finite-difference-gradient.hh> + +#include <roboptim/trajectory/frontal-speed.hh> +#include <roboptim/trajectory/orthogonal-speed.hh> +#include <roboptim/trajectory/spline.hh> +#include <roboptim/trajectory/state-cost.hh> + +using namespace roboptim; + +int run_test () +{ + const unsigned orderMax = 1; + Spline::vector_t params (12); + + // Initial position. + params[0] = 0., params[1] = 0., params[2] = 0.; + // Control point 1. + params[3] = 25., params[4] = 100., params[5] = 0.; + // Control point 2. + params[6] = 75., params[7] = 0., params[8] = 0.; + // Final position. + params[9] = 100., params[10] = 100., params[11] = 0.; + + Spline::interval_t timeRange = Spline::makeInterval (0., 4.); + Spline spline (timeRange, 3, params, "before"); + + for (unsigned i = 0; i < 10; ++i) + { + const StableTimePoint timePoint = i / 10. * tMax; + const double t = timePoint.getTime (spline.timeRange ()); + + FrontalSpeed frontalSpeed; + StateCost<Spline> stateCost (spline, frontalSpeed, timePoint, orderMax); + + OrthogonalSpeed orthogonalSpeed; + StateCost<Spline> orthoStateCost (spline, orthogonalSpeed, timePoint, orderMax); + + std::cout << "State cost evaluation:" << std::endl + << stateCost (params) << std::endl + << "State cost gradient:" << std::endl + << stateCost.gradient (params) << std::endl + << "Trajectory state (splitted):" << std::endl; + for (unsigned o = 0; o <= orderMax; ++o) + std::cout << spline.derivative (t, o) << std::endl; + std::cout << "Trajectory state (one call):" << std::endl + << spline.state (t, orderMax) << std::endl + << "Trajectory state variation (splitted):" << std::endl; + for (unsigned o = 0; o <= orderMax; ++o) + std::cout << spline.variationDerivWrtParam (t, o) << std::endl; + std::cout << "Trajectory state (one call):" << std::endl + << spline.variationStateWrtParam (t, orderMax) << std::endl; + + try + { + std::cout << "Check frontal speed gradient." << std::endl; + checkGradientAndThrow (frontalSpeed, 0, spline.state (t, orderMax)); + + std::cout << "Check orthogonal speed gradient." << std::endl; + checkGradientAndThrow (orthogonalSpeed, 0, spline.state (t, orderMax)); + + std::cout << "Check state cost gradient." << std::endl; + checkGradientAndThrow (stateCost, 0, params); + } + catch (BadGradient& bg) + { + std::cout << bg << std::endl; + } + std::cout << "\n\n" << std::endl; + } + + return 0; +} + +GENERATE_TEST () diff --git a/tests/state-cost.stdout b/tests/state-cost.stdout new file mode 100644 index 0000000..f0fff6e --- /dev/null +++ b/tests/state-cost.stdout @@ -0,0 +1,200 @@ +State cost evaluation: +[1](0) +State cost gradient: +[12](0,0,0,0,0,0,0,0,0,0,0,0) +Trajectory state (splitted): +[3](0,0,0) +[3](0,0,0) +Trajectory state (one call): +[6](0,0,0,0,0,0) +Trajectory state variation (splitted): +[3,12]((1,0,0,0,0,0,0,0,0,0,0,0),(0,1,0,0,0,0,0,0,0,0,0,0),(0,0,1,0,0,0,0,0,0,0,0,0)) +[3,12]((0,0,0,0,0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0,0,0,0,0)) +Trajectory state (one call): +[6,12]((1,0,0,0,0,0,0,0,0,0,0,0),(0,1,0,0,0,0,0,0,0,0,0,0),(0,0,1,0,0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0,0,0,0,0)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + +State cost evaluation: +[1](3.90625) +State cost gradient: +[12](-0.15625,0,15.2995,0.15625,0,0.325521,0,0,0,0,0,0) +Trajectory state (splitted): +[3](0.520833,2.08333,0) +[3](3.90625,15.625,0) +Trajectory state (one call): +[6](0.520833,2.08333,0,3.90625,15.625,0) +Trajectory state variation (splitted): +[3,12]((0.979167,0,0,0.0208333,0,0,0,0,0,0,0,0),(0,0.979167,0,0,0.0208333,0,0,0,0,0,0,0),(0,0,0.979167,0,0,0.0208333,0,0,0,0,0,0)) +[3,12]((-0.15625,0,0,0.15625,0,0,0,0,0,0,0,0),(0,-0.15625,0,0,0.15625,0,0,0,0,0,0,0),(0,0,-0.15625,0,0,0.15625,0,0,0,0,0,0)) +Trajectory state (one call): +[6,12]((0.979167,0,0,0.0208333,0,0,0,0,0,0,0,0),(0,0.979167,0,0,0.0208333,0,0,0,0,0,0,0),(0,0,0.979167,0,0,0.0208333,0,0,0,0,0,0),(-0.15625,0,0,0.15625,0,0,0,0,0,0,0,0),(0,-0.15625,0,0,0.15625,0,0,0,0,0,0,0),(0,0,-0.15625,0,0,0.15625,0,0,0,0,0,0)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + +State cost evaluation: +[1](15.625) +State cost gradient: +[12](-0.625,0,52.0833,0.625,0,10.4167,0,0,0,0,0,0) +Trajectory state (splitted): +[3](4.16667,16.6667,0) +[3](15.625,62.5,0) +Trajectory state (one call): +[6](4.16667,16.6667,0,15.625,62.5,0) +Trajectory state variation (splitted): +[3,12]((0.833333,0,0,0.166667,0,0,0,0,0,0,0,0),(0,0.833333,0,0,0.166667,0,0,0,0,0,0,0),(0,0,0.833333,0,0,0.166667,0,0,0,0,0,0)) +[3,12]((-0.625,0,0,0.625,0,0,0,0,0,0,0,0),(0,-0.625,0,0,0.625,0,0,0,0,0,0,0),(0,0,-0.625,0,0,0.625,0,0,0,0,0,0)) +Trajectory state (one call): +[6,12]((0.833333,0,0,0.166667,0,0,0,0,0,0,0,0),(0,0.833333,0,0,0.166667,0,0,0,0,0,0,0),(0,0,0.833333,0,0,0.166667,0,0,0,0,0,0),(-0.625,0,0,0.625,0,0,0,0,0,0,0,0),(0,-0.625,0,0,0.625,0,0,0,0,0,0,0),(0,0,-0.625,0,0,0.625,0,0,0,0,0,0)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + +State cost evaluation: +[1](31.25) +State cost gradient: +[12](-0.9375,0,39.0625,0.78125,0,37.4349,0.15625,0,1.6276,0,0,0) +Trajectory state (splitted): +[3](13.5417,47.9167,0) +[3](31.25,78.125,0) +Trajectory state (one call): +[6](13.5417,47.9167,0,31.25,78.125,0) +Trajectory state variation (splitted): +[3,12]((0.5,0,0,0.479167,0,0,0.0208333,0,0,0,0,0),(0,0.5,0,0,0.479167,0,0,0.0208333,0,0,0,0),(0,0,0.5,0,0,0.479167,0,0,0.0208333,0,0,0)) +[3,12]((-0.9375,0,0,0.78125,0,0,0.15625,0,0,0,0,0),(0,-0.9375,0,0,0.78125,0,0,0.15625,0,0,0,0),(0,0,-0.9375,0,0,0.78125,0,0,0.15625,0,0,0)) +Trajectory state (one call): +[6,12]((0.5,0,0,0.479167,0,0,0.0208333,0,0,0,0,0),(0,0.5,0,0,0.479167,0,0,0.0208333,0,0,0,0),(0,0,0.5,0,0,0.479167,0,0,0.0208333,0,0,0),(-0.9375,0,0,0.78125,0,0,0.15625,0,0,0,0,0),(0,-0.9375,0,0,0.78125,0,0,0.15625,0,0,0,0),(0,0,-0.9375,0,0,0.78125,0,0,0.15625,0,0,0)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + +State cost evaluation: +[1](46.875) +State cost gradient: +[12](-0.625,0,0,0,0,0,0.625,0,0,0,0,0) +Trajectory state (splitted): +[3](29.1667,66.6667,0) +[3](46.875,0,0) +Trajectory state (one call): +[6](29.1667,66.6667,0,46.875,0,0) +Trajectory state variation (splitted): +[3,12]((0.166667,0,0,0.666667,0,0,0.166667,0,0,0,0,0),(0,0.166667,0,0,0.666667,0,0,0.166667,0,0,0,0),(0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0,0)) +[3,12]((-0.625,0,0,0,0,0,0.625,0,0,0,0,0),(0,-0.625,0,0,0,0,0,0.625,0,0,0,0),(0,0,-0.625,0,0,0,0,0,0.625,0,0,0)) +Trajectory state (one call): +[6,12]((0.166667,0,0,0.666667,0,0,0.166667,0,0,0,0,0),(0,0.166667,0,0,0.666667,0,0,0.166667,0,0,0,0),(0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0,0),(-0.625,0,0,0,0,0,0.625,0,0,0,0,0),(0,-0.625,0,0,0,0,0,0.625,0,0,0,0),(0,0,-0.625,0,0,0,0,0,0.625,0,0,0)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + +State cost evaluation: +[1](54.6875) +State cost gradient: +[12](-0.15625,0,-1.30208,-0.78125,0,-29.9479,0.78125,0,-29.9479,0.15625,0,-1.30208) +Trajectory state (splitted): +[3](50,50,0) +[3](54.6875,-62.5,0) +Trajectory state (one call): +[6](50,50,0,54.6875,-62.5,0) +Trajectory state variation (splitted): +[3,12]((0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333,0,0),(0,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333,0),(0,0,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333)) +[3,12]((-0.15625,0,0,-0.78125,0,0,0.78125,0,0,0.15625,0,0),(0,-0.15625,0,0,-0.78125,0,0,0.78125,0,0,0.15625,0),(0,0,-0.15625,0,0,-0.78125,0,0,0.78125,0,0,0.15625)) +Trajectory state (one call): +[6,12]((0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333,0,0),(0,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333,0),(0,0,0.0208333,0,0,0.479167,0,0,0.479167,0,0,0.0208333),(-0.15625,0,0,-0.78125,0,0,0.78125,0,0,0.15625,0,0),(0,-0.15625,0,0,-0.78125,0,0,0.78125,0,0,0.15625,0),(0,0,-0.15625,0,0,-0.78125,0,0,0.78125,0,0,0.15625)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + +State cost evaluation: +[1](46.875) +State cost gradient: +[12](0,0,1.00781e-30,-0.625,0,-1.81198e-14,1.11022e-15,0,-7.24791e-14,0.625,0,-1.81198e-14) +Trajectory state (splitted): +[3](70.8333,33.3333,0) +[3](46.875,-1.08719e-13,0) +Trajectory state (one call): +[6](70.8333,33.3333,0,46.875,-1.08719e-13,0) +Trajectory state variation (splitted): +[3,12]((-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0),(0,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667,0),(0,0,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667)) +[3,12]((0,0,0,-0.625,0,0,1.11022e-15,0,0,0.625,0,0),(0,0,0,0,-0.625,0,0,1.11022e-15,0,0,0.625,0),(0,0,0,0,0,-0.625,0,0,1.11022e-15,0,0,0.625)) +Trajectory state (one call): +[6,12]((-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667,0,0),(0,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667,0),(0,0,-9.26993e-18,0,0,0.166667,0,0,0.666667,0,0,0.166667),(0,0,0,-0.625,0,0,1.11022e-15,0,0,0.625,0,0),(0,0,0,0,-0.625,0,0,1.11022e-15,0,0,0.625,0),(0,0,0,0,0,-0.625,0,0,1.11022e-15,0,0,0.625)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + +State cost evaluation: +[1](31.25) +State cost gradient: +[12](0,0,0,-0.15625,0,1.6276,-0.78125,0,37.4349,0.9375,0,39.0625) +Trajectory state (splitted): +[3](86.4583,52.0833,0) +[3](31.25,78.125,0) +Trajectory state (one call): +[6](86.4583,52.0833,0,31.25,78.125,0) +Trajectory state variation (splitted): +[3,12]((0,0,0,0.0208333,0,0,0.479167,0,0,0.5,0,0),(0,0,0,0,0.0208333,0,0,0.479167,0,0,0.5,0),(0,0,0,0,0,0.0208333,0,0,0.479167,0,0,0.5)) +[3,12]((0,0,0,-0.15625,0,0,-0.78125,0,0,0.9375,0,0),(0,0,0,0,-0.15625,0,0,-0.78125,0,0,0.9375,0),(0,0,0,0,0,-0.15625,0,0,-0.78125,0,0,0.9375)) +Trajectory state (one call): +[6,12]((0,0,0,0.0208333,0,0,0.479167,0,0,0.5,0,0),(0,0,0,0,0.0208333,0,0,0.479167,0,0,0.5,0),(0,0,0,0,0,0.0208333,0,0,0.479167,0,0,0.5),(0,0,0,-0.15625,0,0,-0.78125,0,0,0.9375,0,0),(0,0,0,0,-0.15625,0,0,-0.78125,0,0,0.9375,0),(0,0,0,0,0,-0.15625,0,0,-0.78125,0,0,0.9375)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + +State cost evaluation: +[1](15.625) +State cost gradient: +[12](0,0,0,0,0,-5.79371e-16,-0.625,0,10.4167,0.625,0,52.0833) +Trajectory state (splitted): +[3](95.8333,83.3333,0) +[3](15.625,62.5,0) +Trajectory state (one call): +[6](95.8333,83.3333,0,15.625,62.5,0) +Trajectory state variation (splitted): +[3,12]((0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333,0,0),(0,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333,0),(0,0,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333)) +[3,12]((0,0,0,0,0,0,-0.625,0,0,0.625,0,0),(0,0,0,0,0,0,0,-0.625,0,0,0.625,0),(0,0,0,0,0,0,0,0,-0.625,0,0,0.625)) +Trajectory state (one call): +[6,12]((0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333,0,0),(0,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333,0),(0,0,0,0,0,-9.26993e-18,0,0,0.166667,0,0,0.833333),(0,0,0,0,0,0,-0.625,0,0,0.625,0,0),(0,0,0,0,0,0,0,-0.625,0,0,0.625,0),(0,0,0,0,0,0,0,0,-0.625,0,0,0.625)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + +State cost evaluation: +[1](3.90625) +State cost gradient: +[12](0,0,0,0,0,0,-0.15625,0,0.325521,0.15625,0,15.2995) +Trajectory state (splitted): +[3](99.4792,97.9167,0) +[3](3.90625,15.625,0) +Trajectory state (one call): +[6](99.4792,97.9167,0,3.90625,15.625,0) +Trajectory state variation (splitted): +[3,12]((0,0,0,0,0,0,0.0208333,0,0,0.979167,0,0),(0,0,0,0,0,0,0,0.0208333,0,0,0.979167,0),(0,0,0,0,0,0,0,0,0.0208333,0,0,0.979167)) +[3,12]((0,0,0,0,0,0,-0.15625,0,0,0.15625,0,0),(0,0,0,0,0,0,0,-0.15625,0,0,0.15625,0),(0,0,0,0,0,0,0,0,-0.15625,0,0,0.15625)) +Trajectory state (one call): +[6,12]((0,0,0,0,0,0,0.0208333,0,0,0.979167,0,0),(0,0,0,0,0,0,0,0.0208333,0,0,0.979167,0),(0,0,0,0,0,0,0,0,0.0208333,0,0,0.979167),(0,0,0,0,0,0,-0.15625,0,0,0.15625,0,0),(0,0,0,0,0,0,0,-0.15625,0,0,0.15625,0),(0,0,0,0,0,0,0,0,-0.15625,0,0,0.15625)) +Check frontal speed gradient. +Check orthogonal speed gradient. +Check state cost gradient. + + + diff --git a/tests/testsuite.at b/tests/testsuite.at index 141f9fb..b0c4101 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -32,6 +32,7 @@ CHECK_STDOUT([simple], [Check basic features.]) CHECK_STDOUT([spline], [Check Spline class.]) CHECK_STDOUT([spline-gradient], [Check Spline gradient.]) CHECK_STDOUT([free-time-trajectory], [Check free time trajectory.]) +CHECK_STDOUT([state-cost], [Check state cost.]) AT_BANNER([Optimization (require solver plug-in)]) CHECK_STDOUT([spline-optimization], [Optimize a Spline with Cfsqp.]) commit db02462df3dc8314049ea27af497246d2601ad75 Author: Thomas Moulard <tho...@gm...> Date: Mon Aug 17 18:54:28 2009 +0900 Implement StateCost. * include/roboptim/trajectory/state-cost.hh, * include/roboptim/trajectory/state-cost.hxx: Implement state cost. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 45808ac..d6d0caf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-08-17 Thomas Moulard <tho...@gm...> + + Implement StateCost. + * include/roboptim/trajectory/state-cost.hh, + * include/roboptim/trajectory/state-cost.hxx: Implement state cost. + 2009-08-14 Thomas Moulard <tho...@gm...> Fix orthogonal speed function name and clean code. diff --git a/include/roboptim/trajectory/state-cost.hh b/include/roboptim/trajectory/state-cost.hh index f6b7415..d736653 100644 --- a/include/roboptim/trajectory/state-cost.hh +++ b/include/roboptim/trajectory/state-cost.hh @@ -17,8 +17,11 @@ #ifndef ROBOPTIM_TRAJECTORY_STATE_COST_HH # define ROBOPTIM_TRAJECTORY_STATE_COST_HH +# include <boost/shared_ptr.hpp> + # include <roboptim/trajectory/fwd.hh> # include <roboptim/core/derivable-function.hh> +# include <roboptim/trajectory/stable-time-point.hh> namespace roboptim { @@ -46,10 +49,44 @@ namespace roboptim typedef T trajectory_t; /// \brief Concrete class should call this constructor. - /// /param inputSize input size - StateCost (size_type inputSize) throw (); + StateCost (const trajectory_t&, + const DerivableFunction&, + const StableTimePoint tpt, + size_type order = 1) throw (); + + virtual ~StateCost () throw (); + + size_type order () const throw (); + + template <typename F, typename CLIST> + static void addToProblem (const T& trajectory, + const DerivableFunction& function, + unsigned order, + Problem<F, CLIST>& problem, + typename Function::interval_t bounds, + unsigned nConstraints) + { + using namespace boost; + + for (unsigned i = 0; i < nConstraints; ++i) + { + const value_type t = (i + 1.) / (nConstraints + 1.); + assert (t > 0. && t < 1.); + shared_ptr<DerivableFunction> constraint + (new StateCost (trajectory, function, t * tMax, order)); + problem.addConstraint (constraint, bounds); + } + } + + protected: + void impl_compute (result_t&, const argument_t&) const throw (); + void impl_gradient (gradient_t&, const argument_t&, size_type) const throw (); - virtual ~StateCost() throw (); + private: + const trajectory_t& trajectory_; + const DerivableFunction& function_; + StableTimePoint tpt_; + size_type order_; }; /// @} diff --git a/include/roboptim/trajectory/state-cost.hxx b/include/roboptim/trajectory/state-cost.hxx index 9997d34..270ecb2 100644 --- a/include/roboptim/trajectory/state-cost.hxx +++ b/include/roboptim/trajectory/state-cost.hxx @@ -17,19 +17,61 @@ #ifndef ROBOPTIM_TRAJECTORY_STATE_COST_HXX # define ROBOPTIM_TRAJECTORY_STATE_COST_HXX +# include <boost/format.hpp> namespace roboptim { template <typename T> - StateCost<T>::StateCost (size_type m) throw () - : DerivableFunction (m, 1) + StateCost<T>::StateCost (const trajectory_t& trajectory, + const DerivableFunction& function, + const StableTimePoint tpt, + size_type order) throw () + : DerivableFunction (trajectory.parameters ().size (), + function.outputSize (), + (boost::format ("state cost using function ``%1%''") + % function.getName ()).str ()), + trajectory_ (trajectory), + function_ (function), + tpt_ (tpt), + order_ (order) { + assert (function_.inputSize () == trajectory_.outputSize () * (order + 1)); } template <typename T> StateCost<T>::~StateCost() throw () { } + + template <typename T> + typename StateCost<T>::size_type + StateCost<T>::order () const throw () + { + return order_; + } + + template <typename T> + void + StateCost<T>::impl_compute (result_t& res, const argument_t& p) const throw () + { + static trajectory_t updatedTrajectory = trajectory_; + updatedTrajectory.setParameters (p); + function_ (res, updatedTrajectory.state + (tpt_.getTime (updatedTrajectory.timeRange ()), this->order_)); + } + + template <typename T> + void + StateCost<T>::impl_gradient (gradient_t& grad, const argument_t& p, size_type i) const throw () + { + using namespace boost::numeric::ublas; + static trajectory_t updatedTrajectory = trajectory_; + updatedTrajectory.setParameters (p); + const value_type t = tpt_.getTime (updatedTrajectory.timeRange ()); + grad = prod (function_.gradient (updatedTrajectory.state (t, this->order_), i), + updatedTrajectory.variationStateWrtParam (t, this->order_)); + } + } // end of namespace roboptim. #endif //! ROBOPTIM_TRAJECTORY_STATE_COST_HXX ----------------------------------------------------------------------- Summary of changes: ChangeLog | 30 +++ include/Makefile.am | 2 - .../trajectory/anthropomorphic-cost-function.hxx | 8 +- include/roboptim/trajectory/frontal-speed.hh | 33 +--- include/roboptim/trajectory/frontal-speed.hxx | 152 --------------- include/roboptim/trajectory/orthogonal-speed.hh | 33 +--- include/roboptim/trajectory/orthogonal-speed.hxx | 146 -------------- include/roboptim/trajectory/state-cost.hh | 43 ++++- include/roboptim/trajectory/state-cost.hxx | 46 +++++- include/roboptim/trajectory/trajectory.hxx | 26 ++-- include/roboptim/trajectory/visualization/speed.hh | 23 +-- src/Makefile.am | 2 + src/frontal-speed.cc | 64 +++++++ src/orthogonal-speed.cc | 59 ++++++ src/spline.cc | 2 +- tests/Makefile.am | 10 +- tests/anthropomorphic-cost-function.cc | 11 +- tests/spline-time-optimization.cc | 2 +- tests/spline-time-optimization.stdout | 8 +- tests/state-cost.cc | 94 +++++++++ tests/state-cost.stdout | 200 ++++++++++++++++++++ tests/testsuite.at | 1 + 22 files changed, 582 insertions(+), 413 deletions(-) delete mode 100644 include/roboptim/trajectory/frontal-speed.hxx delete mode 100644 include/roboptim/trajectory/orthogonal-speed.hxx create mode 100644 src/frontal-speed.cc create mode 100644 src/orthogonal-speed.cc create mode 100644 tests/state-cost.cc create mode 100644 tests/state-cost.stdout hooks/post-receive -- roboptim |
From: Thomas M. <tho...@us...> - 2009-08-17 04:01:42
|
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". The branch, core has been updated via 81de60add981418bbc14ac9428e6c897379a5041 (commit) via be582ffb388970de2f7bcb7ec18ac413d9e289fa (commit) via 3ed35a25bd796e464426e298258bad5b628073a3 (commit) from 2945bbefb12d8ba27e738023234e0a001be9cf04 (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 81de60add981418bbc14ac9428e6c897379a5041 Author: Thomas Moulard <tho...@gm...> Date: Mon Aug 17 13:00:46 2009 +0900 Add Visual Studio solution and projects. * msvc/roboptim-core-dummy-plugin/roboptim-core-dummy-plugin.vcproj: New. * msvc/roboptim-core/config.h: New. * msvc/roboptim-core/roboptim-core.sln: New. * msvc/roboptim-core/roboptim-core.vcproj: New. * msvc/simple/simple.vcproj: New. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 61a0f19..c263621 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2009-08-17 Thomas Moulard <tho...@gm...> + Add Visual Studio solution and projects. + * msvc/roboptim-core-dummy-plugin/roboptim-core-dummy-plugin.vcproj: New. + * msvc/roboptim-core/config.h: New. + * msvc/roboptim-core/roboptim-core.sln: New. + * msvc/roboptim-core/roboptim-core.vcproj: New. + * msvc/simple/simple.vcproj: New. + +2009-08-17 Thomas Moulard <tho...@gm...> + Remove dots in macros to ensure Windows portability. * src/debug.hh: Make CPP code more portable. diff --git a/msvc/roboptim-core-dummy-plugin/roboptim-core-dummy-plugin.vcproj b/msvc/roboptim-core-dummy-plugin/roboptim-core-dummy-plugin.vcproj new file mode 100644 index 0000000..676801d --- /dev/null +++ b/msvc/roboptim-core-dummy-plugin/roboptim-core-dummy-plugin.vcproj @@ -0,0 +1,201 @@ +<?xml version="1.0" encoding="shift_jis"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9.00" + Name="roboptim-core-dummy-plugin" + ProjectGUID="{21220FE9-892A-4D20-BC45-7697DFC5242F}" + RootNamespace="roboptimcoredummyplugin" + TargetFrameworkVersion="196613" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories=""$(ProjectDir)\..\..\src";"$(ProjectDir)\..\..\include";"$(ProjectDir)"" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + WarningLevel="3" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + GenerateDebugInformation="true" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + EnableIntrinsicFunctions="true" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + GenerateDebugInformation="true" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Fichiers sources" + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath="..\..\src\roboptim-core-dummy-plugin.cc" + > + </File> + </Filter> + <Filter + Name="Fichiers d'en-tête" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <Filter + Name="roboptim" + > + <Filter + Name="core" + > + <Filter + Name="plugin" + > + <File + RelativePath="..\..\include\roboptim\core\plugin\dummy.hh" + > + </File> + </Filter> + </Filter> + </Filter> + </Filter> + <Filter + Name="Fichiers de ressources" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/msvc/roboptim-core/config.h b/msvc/roboptim-core/config.h new file mode 100644 index 0000000..ceb38ed --- /dev/null +++ b/msvc/roboptim-core/config.h @@ -0,0 +1,20 @@ +/* Name of package */ +#define PACKAGE "roboptim-core" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "rob...@li..." + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "RobOptim core library" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "RobOptim core library 0.2" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "roboptim-core" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "0.2" + +/* Version number of package */ +#define VERSION "0.2" diff --git a/msvc/roboptim-core/roboptim-core.sln b/msvc/roboptim-core/roboptim-core.sln new file mode 100644 index 0000000..389349e --- /dev/null +++ b/msvc/roboptim-core/roboptim-core.sln @@ -0,0 +1,38 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual C++ Express 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "roboptim-core", "roboptim-core.vcproj", "{C6C47D7F-6793-4E24-9447-2DD0BA87BE6F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "roboptim-core-dummy-plugin", "..\roboptim-core-dummy-plugin\roboptim-core-dummy-plugin.vcproj", "{21220FE9-892A-4D20-BC45-7697DFC5242F}" + ProjectSection(ProjectDependencies) = postProject + {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F} = {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple", "..\simple\simple.vcproj", "{C2F563F8-9C86-47EB-B3A9-F687D6CF62BC}" + ProjectSection(ProjectDependencies) = postProject + {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F} = {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F}.Debug|Win32.ActiveCfg = Debug|Win32 + {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F}.Debug|Win32.Build.0 = Debug|Win32 + {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F}.Release|Win32.ActiveCfg = Release|Win32 + {C6C47D7F-6793-4E24-9447-2DD0BA87BE6F}.Release|Win32.Build.0 = Release|Win32 + {21220FE9-892A-4D20-BC45-7697DFC5242F}.Debug|Win32.ActiveCfg = Debug|Win32 + {21220FE9-892A-4D20-BC45-7697DFC5242F}.Debug|Win32.Build.0 = Debug|Win32 + {21220FE9-892A-4D20-BC45-7697DFC5242F}.Release|Win32.ActiveCfg = Release|Win32 + {21220FE9-892A-4D20-BC45-7697DFC5242F}.Release|Win32.Build.0 = Release|Win32 + {C2F563F8-9C86-47EB-B3A9-F687D6CF62BC}.Debug|Win32.ActiveCfg = Debug|Win32 + {C2F563F8-9C86-47EB-B3A9-F687D6CF62BC}.Debug|Win32.Build.0 = Debug|Win32 + {C2F563F8-9C86-47EB-B3A9-F687D6CF62BC}.Release|Win32.ActiveCfg = Release|Win32 + {C2F563F8-9C86-47EB-B3A9-F687D6CF62BC}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/msvc/roboptim-core/roboptim-core.vcproj b/msvc/roboptim-core/roboptim-core.vcproj new file mode 100644 index 0000000..22e754d --- /dev/null +++ b/msvc/roboptim-core/roboptim-core.vcproj @@ -0,0 +1,442 @@ +<?xml version="1.0" encoding="shift_jis"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9.00" + Name="roboptim-core" + ProjectGUID="{C6C47D7F-6793-4E24-9447-2DD0BA87BE6F}" + RootNamespace="roboptimcore" + TargetFrameworkVersion="196613" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories=""$(ProjectDir)\..\..\src";"$(ProjectDir)\..\..\include";"$(ProjectDir)"" + PreprocessorDefinitions="BUILDING_ROBOPTIM" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + WarningLevel="3" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + GenerateDebugInformation="true" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + EnableIntrinsicFunctions="true" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + GenerateDebugInformation="true" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Fichiers sources" + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath=".\config.h" + > + </File> + <File + RelativePath="..\..\src\constant-function.cc" + > + </File> + <File + RelativePath="..\..\src\debug.cc" + > + </File> + <File + RelativePath="..\..\src\debug.hh" + > + </File> + <File + RelativePath="..\..\src\derivable-function.cc" + > + </File> + <File + RelativePath="..\..\src\doc.hh" + > + </File> + <File + RelativePath="..\..\src\finite-difference-gradient.cc" + > + </File> + <File + RelativePath="..\..\src\function.cc" + > + </File> + <File + RelativePath="..\..\src\generic-solver.cc" + > + </File> + <File + RelativePath="..\..\src\identity-function.cc" + > + </File> + <File + RelativePath="..\..\src\indent.cc" + > + </File> + <File + RelativePath="..\..\src\linear-function.cc" + > + </File> + <File + RelativePath="..\..\src\numeric-linear-function.cc" + > + </File> + <File + RelativePath="..\..\src\numeric-quadratic-function.cc" + > + </File> + <File + RelativePath="..\..\src\quadratic-function.cc" + > + </File> + <File + RelativePath="..\..\src\result-with-warnings.cc" + > + </File> + <File + RelativePath="..\..\src\result.cc" + > + </File> + <File + RelativePath="..\..\src\solver-error.cc" + > + </File> + <File + RelativePath="..\..\src\solver-warning.cc" + > + </File> + <File + RelativePath="..\..\src\twice-derivable-function.cc" + > + </File> + <File + RelativePath="..\..\src\util.cc" + > + </File> + <Filter + Name="visualization" + > + <File + RelativePath="..\..\src\visualization\gnuplot-commands.cc" + > + </File> + <File + RelativePath="..\..\src\visualization\gnuplot.cc" + > + </File> + </Filter> + </Filter> + <Filter + Name="Fichiers d'en-tête" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <Filter + Name="roboptim" + > + <Filter + Name="core" + > + <File + RelativePath="..\..\include\roboptim\core\constant-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\debug.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\derivable-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\derivable-parametrized-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\finite-difference-gradient.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\fwd.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\generic-solver.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\identity-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\indent.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\io.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\linear-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\n-times-derivable-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\n-times-derivable-function.hxx" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\numeric-linear-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\numeric-quadratic-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\parametrized-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\parametrized-function.hxx" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\portability.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\problem.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\problem.hxx" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\quadratic-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\result-with-warnings.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\result.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\solver-error.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\solver-factory.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\solver-factory.hxx" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\solver-warning.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\solver.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\solver.hxx" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\sys.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\twice-derivable-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\util.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\util.hxx" + > + </File> + <Filter + Name="visualization" + > + <File + RelativePath="..\..\include\roboptim\core\visualization\fwd.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\visualization\gnuplot-commands.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\visualization\gnuplot-function.hh" + > + </File> + <File + RelativePath="..\..\include\roboptim\core\visualization\gnuplot.hh" + > + </File> + </Filter> + </Filter> + </Filter> + </Filter> + <Filter + Name="Fichiers de ressources" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/msvc/simple/simple.vcproj b/msvc/simple/simple.vcproj new file mode 100644 index 0000000..8b037c4 --- /dev/null +++ b/msvc/simple/simple.vcproj @@ -0,0 +1,193 @@ +<?xml version="1.0" encoding="shift_jis"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9.00" + Name="simple" + ProjectGUID="{C2F563F8-9C86-47EB-B3A9-F687D6CF62BC}" + RootNamespace="simple" + TargetFrameworkVersion="196613" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories=""$(ProjectDir)\..\..\src";"$(ProjectDir)\..\..\include";"$(ProjectDir)\..\..\tests";"$(ProjectDir)\..\roboptim-core";"$(ProjectDir)"" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + WarningLevel="3" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + GenerateDebugInformation="true" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + EnableIntrinsicFunctions="true" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + GenerateDebugInformation="true" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Fichiers sources" + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath="..\..\src\roboptim-core-dummy-plugin.cc" + > + </File> + <File + RelativePath="..\..\tests\simple.cc" + > + </File> + </Filter> + <Filter + Name="Fichiers d'en-tête" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath="..\..\tests\common.hh" + > + </File> + </Filter> + <Filter + Name="Fichiers de ressources" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> commit be582ffb388970de2f7bcb7ec18ac413d9e289fa Author: Thomas Moulard <tho...@gm...> Date: Mon Aug 17 13:00:29 2009 +0900 Remove dots in macros to ensure Windows portability. * src/debug.hh: Make CPP code more portable. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 6973afc..61a0f19 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-08-17 Thomas Moulard <tho...@gm...> + Remove dots in macros to ensure Windows portability. + * src/debug.hh: Make CPP code more portable. + +2009-08-17 Thomas Moulard <tho...@gm...> + Add ROBOPTIM_DLLAPI to ensure Windows portability. * include/roboptim/core/util.hh: Add missing qualifier. diff --git a/src/debug.hh b/src/debug.hh index 5727102..93de844 100644 --- a/src/debug.hh +++ b/src/debug.hh @@ -27,17 +27,17 @@ # define AllocTag2(p, desc) # define AllocTag_dynamic_description(p, data) # define AllocTag(p, data) -# define Debug(STATEMENT...) +# define Debug(STATEMENT) # define Dout(cntrl, data) # define DoutFatal(cntrl, data) LibcwDoutFatal(, , cntrl, data) -# define ForAllDebugChannels(STATEMENT...) -# define ForAllDebugObjects(STATEMENT...) -# define LibcwDebug(dc_namespace, STATEMENT...) +# define ForAllDebugChannels(STATEMENT) +# define ForAllDebugObjects(STATEMENT) +# define LibcwDebug(dc_namespace, STATEMENT) # define LibcwDout(dc_namespace, d, cntrl, data) # define LibcwDoutFatal(dc_namespace, d, cntrl, data) \ do { ::std::cerr << data << ::std::endl; ::std::exit(EXIT_FAILURE); } while(1) -# define LibcwdForAllDebugChannels(dc_namespace, STATEMENT...) -# define LibcwdForAllDebugObjects(dc_namespace, STATEMENT...) +# define LibcwdForAllDebugChannels(dc_namespace, STATEMENT) +# define LibcwdForAllDebugObjects(dc_namespace, STATEMENT) # define NEW(x) new x # define CWDEBUG_ALLOC 0 # define CWDEBUG_MAGIC 0 commit 3ed35a25bd796e464426e298258bad5b628073a3 Author: Thomas Moulard <tho...@gm...> Date: Mon Aug 17 12:59:56 2009 +0900 Add ROBOPTIM_DLLAPI to ensure Windows portability. * include/roboptim/core/util.hh: Add missing qualifier. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 5bb30f4..6973afc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-08-17 Thomas Moulard <tho...@gm...> + + Add ROBOPTIM_DLLAPI to ensure Windows portability. + * include/roboptim/core/util.hh: Add missing qualifier. + 2009-08-16 Thomas Moulard <tho...@gm...> Fix comment. diff --git a/include/roboptim/core/util.hh b/include/roboptim/core/util.hh index 76c5135..3c81d05 100644 --- a/include/roboptim/core/util.hh +++ b/include/roboptim/core/util.hh @@ -28,11 +28,11 @@ namespace roboptim { /// \internal /// \brief Copy the content of a uBLAS vector into a C array. - void vector_to_array (Function::value_type* dst, const Function::vector_t& src); + ROBOPTIM_DLLAPI void vector_to_array (Function::value_type* dst, const Function::vector_t& src); /// \internal /// \brief Copy the content of a C array into a uBLAS vector. - void array_to_vector (Function::vector_t& dst, const Function::value_type* src); + ROBOPTIM_DLLAPI void array_to_vector (Function::vector_t& dst, const Function::value_type* src); /// \internal /// Merge gradients from several functions (each gradient is a line). ----------------------------------------------------------------------- Summary of changes: ChangeLog | 19 + include/roboptim/core/util.hh | 4 +- .../roboptim-core-dummy-plugin.vcproj | 201 +++++++++ msvc/roboptim-core/config.h | 20 + msvc/roboptim-core/roboptim-core.sln | 38 ++ msvc/roboptim-core/roboptim-core.vcproj | 442 ++++++++++++++++++++ msvc/simple/simple.vcproj | 193 +++++++++ src/debug.hh | 12 +- 8 files changed, 921 insertions(+), 8 deletions(-) create mode 100644 msvc/roboptim-core-dummy-plugin/roboptim-core-dummy-plugin.vcproj create mode 100644 msvc/roboptim-core/config.h create mode 100644 msvc/roboptim-core/roboptim-core.sln create mode 100644 msvc/roboptim-core/roboptim-core.vcproj create mode 100644 msvc/simple/simple.vcproj hooks/post-receive -- roboptim |
From: Thomas M. <tho...@us...> - 2009-08-16 11:57:53
|
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". The branch, core has been updated via 2945bbefb12d8ba27e738023234e0a001be9cf04 (commit) via 0658f5640810199e15549c036c63ded1b570708d (commit) from 2ecc7e4aa1b2463b427210b6846d7d952101dc7b (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 2945bbefb12d8ba27e738023234e0a001be9cf04 Author: Thomas Moulard <tho...@gm...> Date: Sun Aug 16 20:56:49 2009 +0900 Fix comment. * include/roboptim/core/solver-factory.hxx: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 8cb6623..5bb30f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-08-16 Thomas Moulard <tho...@gm...> + Fix comment. + * include/roboptim/core/solver-factory.hxx: Here. + +2009-08-16 Thomas Moulard <tho...@gm...> + Add dllexport/dllimport for Windows compatibility. * include/Makefile.am, * include/roboptim/core/constant-function.hh, diff --git a/include/roboptim/core/solver-factory.hxx b/include/roboptim/core/solver-factory.hxx index eb42148..13c72ba 100644 --- a/include/roboptim/core/solver-factory.hxx +++ b/include/roboptim/core/solver-factory.hxx @@ -116,4 +116,4 @@ namespace roboptim } // end of namespace roboptim -#endif //! ROBOPTIM_CORE_SOLVER_FACTORY_HH +#endif //! ROBOPTIM_CORE_SOLVER_FACTORY_HXX commit 0658f5640810199e15549c036c63ded1b570708d Author: Thomas Moulard <tho...@gm...> Date: Sun Aug 16 20:56:33 2009 +0900 Add dllexport/dllimport for Windows compatibility. * include/Makefile.am, * include/roboptim/core/constant-function.hh, * include/roboptim/core/debug.hh, * include/roboptim/core/derivable-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/io.hh, * include/roboptim/core/linear-function.hh, * include/roboptim/core/numeric-linear-function.hh, * include/roboptim/core/numeric-quadratic-function.hh, * include/roboptim/core/portability.hh,ew. * include/roboptim/core/quadratic-function.hh, * include/roboptim/core/result-with-warnings.hh, * include/roboptim/core/result.hh, * include/roboptim/core/solver-error.hh, * include/roboptim/core/solver-warning.hh, * include/roboptim/core/sys.hh, * include/roboptim/core/twice-derivable-function.hh: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index e40f5f7..8cb6623 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,28 @@ +2009-08-16 Thomas Moulard <tho...@gm...> + + Add dllexport/dllimport for Windows compatibility. + * include/Makefile.am, + * include/roboptim/core/constant-function.hh, + * include/roboptim/core/debug.hh, + * include/roboptim/core/derivable-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/io.hh, + * include/roboptim/core/linear-function.hh, + * include/roboptim/core/numeric-linear-function.hh, + * include/roboptim/core/numeric-quadratic-function.hh, + * include/roboptim/core/portability.hh,ew. + * include/roboptim/core/quadratic-function.hh, + * include/roboptim/core/result-with-warnings.hh, + * include/roboptim/core/result.hh, + * include/roboptim/core/solver-error.hh, + * include/roboptim/core/solver-warning.hh, + * include/roboptim/core/sys.hh, + * include/roboptim/core/twice-derivable-function.hh: Here. + 2009-08-06 Thomas Moulard <tho...@gm...> Add new variant of foreach method. diff --git a/include/Makefile.am b/include/Makefile.am index a23251b..2c744c6 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -20,6 +20,7 @@ nobase_include_HEADERS = \ roboptim/core/numeric-linear-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 \ diff --git a/include/roboptim/core/constant-function.hh b/include/roboptim/core/constant-function.hh index f2f2553..d009f61 100644 --- a/include/roboptim/core/constant-function.hh +++ b/include/roboptim/core/constant-function.hh @@ -32,7 +32,7 @@ namespace roboptim /// Implement a constant function using the formula: /// \f[f(x) = offset\f] /// where \f$offset\f$ is set when the class is instantiated. - class ConstantFunction : public LinearFunction + class ROBOPTIM_DLLAPI ConstantFunction : public LinearFunction { public: /// \brief Build an constant function. diff --git a/include/roboptim/core/debug.hh b/include/roboptim/core/debug.hh index 055be71..847b3cf 100644 --- a/include/roboptim/core/debug.hh +++ b/include/roboptim/core/debug.hh @@ -51,7 +51,7 @@ namespace roboptim } # endif // CWDEBUG -# define RoboptimCoreDebug(STATEMENT...) \ +# define RoboptimCoreDebug(STATEMENT) \ LibcwDebug(roboptim::debug::channels, STATEMENT) // Handle indentation properly. @@ -70,9 +70,9 @@ namespace roboptim # define RoboptimCoreDoutFatal(cntrl, data) \ LibcwDoutFatal(roboptim::debug::channels, libcwd::libcw_do, cntrl, data) -# define RoboptimCoreForAllDebugChannels(STATEMENT...) \ +# define RoboptimCoreForAllDebugChannels(STATEMENT) \ LibcwdForAllDebugChannels(roboptim::debug::channels, STATEMENT) -# define RoboptimCoreForAllDebugObjects(STATEMENT...) \ +# define RoboptimCoreForAllDebugObjects(STATEMENT) \ LibcwdForAllDebugObjects(roboptim::debug::channels, STATEMENT) # if defined(Debug) && !defined(ROBOPTIM_CORE_INTERNAL) # error The application source file (.cc or .cpp) must use '#include "debug.h"' _before_ including the header file that it includes now, that led to this error. diff --git a/include/roboptim/core/derivable-function.hh b/include/roboptim/core/derivable-function.hh index c812730..539ae4a 100644 --- a/include/roboptim/core/derivable-function.hh +++ b/include/roboptim/core/derivable-function.hh @@ -61,7 +61,7 @@ namespace roboptim /// ignored in the gradient/jacobian computation. /// The class provides a default value for the function id so that these functions /// do not have to explicitly set the function id. - class DerivableFunction : public Function + class ROBOPTIM_DLLAPI DerivableFunction : public Function { public: /// \brief Gradient type. diff --git a/include/roboptim/core/finite-difference-gradient.hh b/include/roboptim/core/finite-difference-gradient.hh index 0d49772..d2bd7fa 100644 --- a/include/roboptim/core/finite-difference-gradient.hh +++ b/include/roboptim/core/finite-difference-gradient.hh @@ -33,7 +33,7 @@ namespace roboptim static const double finiteDifferenceEpsilon = 1e-8; /// \brief Exception thrown when a gradient check fail. - class BadGradient : public std::runtime_error + class ROBOPTIM_DLLAPI BadGradient : public std::runtime_error { public: /// \brief Import vector. @@ -79,7 +79,7 @@ namespace roboptim /// \param o output stream used for display /// \param f function to be displayed /// \return output stream - std::ostream& operator<< (std::ostream& o, const BadGradient& f); + ROBOPTIM_DLLAPI std::ostream& operator<< (std::ostream& o, const BadGradient& f); /// \addtogroup roboptim_function @@ -98,7 +98,7 @@ namespace roboptim /// \f[f'(x)\approx {f(x+\epsilon)-f(x)\over \epsilon}\f] /// where \f$\epsilon\f$ is a constant given when calling the class /// constructor. - class FiniteDifferenceGradient : public DerivableFunction + class ROBOPTIM_DLLAPI FiniteDifferenceGradient : public DerivableFunction { public: /// \brief Instantiate a finite differences gradient. @@ -134,14 +134,14 @@ namespace roboptim /// \param x point where the gradient will be evaluated /// \param threshold maximum tolerated error /// \return true if valid, false if not - bool checkGradient + ROBOPTIM_DLLAPI bool checkGradient (const DerivableFunction& function, int functionId, const Function::vector_t& x, Function::value_type threshold = finiteDifferenceThreshold) throw (); - void checkGradientAndThrow + ROBOPTIM_DLLAPI void checkGradientAndThrow (const DerivableFunction& function, int functionId, const Function::vector_t& x, diff --git a/include/roboptim/core/function.hh b/include/roboptim/core/function.hh index 6b0a8c4..4d7294e 100644 --- a/include/roboptim/core/function.hh +++ b/include/roboptim/core/function.hh @@ -49,7 +49,7 @@ namespace roboptim /// /// Functions are pure immutable objects: evaluating a function /// twice at a given point <b>must</b> give the same result. - class Function + class ROBOPTIM_DLLAPI Function { public: /// \brief Values type. @@ -397,7 +397,7 @@ namespace roboptim /// \param o output stream used for display /// \param f function to be displayed /// \return output stream - std::ostream& operator<< (std::ostream& o, const Function& f); + ROBOPTIM_DLLAPI std::ostream& operator<< (std::ostream& o, const Function& f); } // end of namespace roboptim diff --git a/include/roboptim/core/generic-solver.hh b/include/roboptim/core/generic-solver.hh index 43e640d..9ad7fec 100644 --- a/include/roboptim/core/generic-solver.hh +++ b/include/roboptim/core/generic-solver.hh @@ -39,7 +39,7 @@ namespace roboptim /// @{ /// \brief Abstract interface satisfied by all solvers. - class GenericSolver : public boost::noncopyable + class ROBOPTIM_DLLAPI GenericSolver : public boost::noncopyable { public: /// \brief Define the kind of solution which has been found. @@ -144,7 +144,7 @@ namespace roboptim /// \param o output stream used for display /// \param gs solver to be displayed /// \return output stream - std::ostream& operator<< (std::ostream& o, const GenericSolver& gs); + ROBOPTIM_DLLAPI std::ostream& operator<< (std::ostream& o, const GenericSolver& gs); /// \brief Override operator<< to display ``no solution'' objects. @@ -152,7 +152,7 @@ namespace roboptim /// \param o output stream used for display /// \param ns NoSolution object, ignored /// \return output stream - std::ostream& operator<< (std::ostream& o, const NoSolution&); + ROBOPTIM_DLLAPI std::ostream& operator<< (std::ostream& o, const NoSolution&); } // end of namespace roboptim diff --git a/include/roboptim/core/identity-function.hh b/include/roboptim/core/identity-function.hh index 81cbc25..910e8dd 100644 --- a/include/roboptim/core/identity-function.hh +++ b/include/roboptim/core/identity-function.hh @@ -32,7 +32,7 @@ namespace roboptim /// Implement a linear function using the formula: /// \f[f(x) = x + offset\f] /// where \f$A\f$ and \f$b\f$ are set when the class is instantiated. - class IdentityFunction : public LinearFunction + class ROBOPTIM_DLLAPI IdentityFunction : public LinearFunction { public: /// \brief Build an identity function. diff --git a/include/roboptim/core/indent.hh b/include/roboptim/core/indent.hh index 1fc6191..bb14667 100644 --- a/include/roboptim/core/indent.hh +++ b/include/roboptim/core/indent.hh @@ -25,27 +25,27 @@ namespace roboptim { /// \brief The current indentation level for \a o. - long int& indent (std::ostream& o); + ROBOPTIM_DLLAPI long int& indent (std::ostream& o); /// \brief Increment the indentation. - std::ostream& incindent (std::ostream& o); + ROBOPTIM_DLLAPI std::ostream& incindent (std::ostream& o); /// \brief Decrement the indentation. - std::ostream& decindent (std::ostream& o); + ROBOPTIM_DLLAPI std::ostream& decindent (std::ostream& o); /// \brief Reset the indentation. - std::ostream& resetindent (std::ostream& o); + ROBOPTIM_DLLAPI std::ostream& resetindent (std::ostream& o); /// \brief Print an end of line, then set the indentation. - std::ostream& iendl (std::ostream& o); + ROBOPTIM_DLLAPI std::ostream& iendl (std::ostream& o); /// \brief Increment the indentation, print an end of line, /// and set the indentation. - std::ostream& incendl (std::ostream& o); + ROBOPTIM_DLLAPI std::ostream& incendl (std::ostream& o); /// \brief Decrement the indentation, print an end of line, /// and set the indentation. - std::ostream& decendl (std::ostream& o); + ROBOPTIM_DLLAPI std::ostream& decendl (std::ostream& o); } #endif // !MISC_INDENT_HH diff --git a/include/roboptim/core/io.hh b/include/roboptim/core/io.hh index 98188a3..40f8f0f 100644 --- a/include/roboptim/core/io.hh +++ b/include/roboptim/core/io.hh @@ -21,7 +21,7 @@ # include <roboptim/core/debug.hh> # include <boost/numeric/ublas/io.hpp> -# include <boost/optional/optional_io.hpp> +//# include <boost/optional/optional_io.hpp> # include <boost/tuple/tuple_io.hpp> # include <boost/variant/detail/variant_io.hpp> diff --git a/include/roboptim/core/linear-function.hh b/include/roboptim/core/linear-function.hh index 73cbf19..84fd5b6 100644 --- a/include/roboptim/core/linear-function.hh +++ b/include/roboptim/core/linear-function.hh @@ -31,7 +31,7 @@ namespace roboptim /// \brief Define an abstract linear function. /// /// Inherit from this class when implementing linear functions. - class LinearFunction : public QuadraticFunction + class ROBOPTIM_DLLAPI LinearFunction : public QuadraticFunction { public: /// \brief Concrete class constructor should call this constructor. diff --git a/include/roboptim/core/numeric-linear-function.hh b/include/roboptim/core/numeric-linear-function.hh index 796803c..e70b9af 100644 --- a/include/roboptim/core/numeric-linear-function.hh +++ b/include/roboptim/core/numeric-linear-function.hh @@ -32,7 +32,7 @@ namespace roboptim /// Implement a linear function using the general formula: /// \f[f(x) = A x + b\f] /// where \f$A\f$ and \f$b\f$ are set when the class is instantiated. - class NumericLinearFunction : public LinearFunction + class ROBOPTIM_DLLAPI NumericLinearFunction : public LinearFunction { public: /// \brief Build a linear function from a matrix and a vector. diff --git a/include/roboptim/core/numeric-quadratic-function.hh b/include/roboptim/core/numeric-quadratic-function.hh index b42010d..2d07248 100644 --- a/include/roboptim/core/numeric-quadratic-function.hh +++ b/include/roboptim/core/numeric-quadratic-function.hh @@ -38,7 +38,7 @@ namespace roboptim /// where \f$A\f$ and \f$B\f$ are set when the class is instantiated. /// /// \note A is a symmetric matrix. - class NumericQuadraticFunction : public QuadraticFunction + class ROBOPTIM_DLLAPI NumericQuadraticFunction : public QuadraticFunction { public: /// \brief Symmetric matrix type. diff --git a/include/roboptim/core/portability.hh b/include/roboptim/core/portability.hh new file mode 100644 index 0000000..912f950 --- /dev/null +++ b/include/roboptim/core/portability.hh @@ -0,0 +1,42 @@ +// 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/>. + +#ifndef ROBOPTIM_CORE_PORTABILITY_HH +# define ROBOPTIM_CORE_PORTABILITY_HH + +// Handle portable symbol export. +// Defining manually which symbol should be exported is required +// under Windows whether MinGW or MSVC is used. +// +// The headers then have to be able to work in two different modes: +// - dllexport when one is building the library, +// - dllimport for clients using the library. +# ifdef _WIN32 +# define ROBOPTIM_DLLIMPORT __declspec(dllimport) +# define ROBOPTIM_DLLEXPORT __declspec(dllexport) +# else +# define ROBOPTIM_DLLIMPORT +# define ROBOPTIM_DLLEXPORT +# endif //! WIN32 + +# ifndef BUILDING_ROBOPTIM +# define ROBOPTIM_DLLAPI ROBOPTIM_DLLIMPORT +# else +# define ROBOPTIM_DLLAPI ROBOPTIM_DLLEXPORT +# endif //! BUILDING_ROBOPTIM_CORE + +#endif //! ROBOPTIM_CORE_PORTABILITY_HH diff --git a/include/roboptim/core/quadratic-function.hh b/include/roboptim/core/quadratic-function.hh index 9bf1725..84464de 100644 --- a/include/roboptim/core/quadratic-function.hh +++ b/include/roboptim/core/quadratic-function.hh @@ -32,7 +32,7 @@ namespace roboptim /// \brief Define an abstract quadratic function. /// /// Inherit from this class when implementing quadratic functions. - class QuadraticFunction : public TwiceDerivableFunction + class ROBOPTIM_DLLAPI QuadraticFunction : public TwiceDerivableFunction { public: /// \brief Concrete class constructor should call this constructor. diff --git a/include/roboptim/core/result-with-warnings.hh b/include/roboptim/core/result-with-warnings.hh index 9ede500..6ea8917 100644 --- a/include/roboptim/core/result-with-warnings.hh +++ b/include/roboptim/core/result-with-warnings.hh @@ -39,7 +39,7 @@ namespace roboptim /// /// A vector or warnings is provided in this result, otherwise the /// class behaves like Result. - class ResultWithWarnings : public Result + class ROBOPTIM_DLLAPI ResultWithWarnings : public Result { public: /// \brief Instantiate the class from an input/output size. diff --git a/include/roboptim/core/result.hh b/include/roboptim/core/result.hh index 71d4b4c..244e447 100644 --- a/include/roboptim/core/result.hh +++ b/include/roboptim/core/result.hh @@ -36,7 +36,7 @@ namespace roboptim /// found. /// It is a set of mutable fields representing the solution /// and its associated meta-information. - class Result + class ROBOPTIM_DLLAPI Result { public: /// \brief Import size type from Function class. @@ -83,7 +83,7 @@ namespace roboptim /// \param o output stream used for display /// \param r result to be displayed /// \return output stream - std::ostream& operator<< (std::ostream& o, const Result& r); + ROBOPTIM_DLLAPI std::ostream& operator<< (std::ostream& o, const Result& r); } // end of namespace roboptim #endif //! ROBOPTIM_CORE_RESULT_HH diff --git a/include/roboptim/core/solver-error.hh b/include/roboptim/core/solver-error.hh index 207680e..45e526c 100644 --- a/include/roboptim/core/solver-error.hh +++ b/include/roboptim/core/solver-error.hh @@ -31,7 +31,7 @@ namespace roboptim /// \brief Base exception class for solving errors. /// All other exceptions classes concerning the optimization /// process should inherits this class. - class SolverError : public std::runtime_error + class ROBOPTIM_DLLAPI SolverError : public std::runtime_error { public: /// \brief Instantiate an error from an error message. @@ -52,7 +52,7 @@ namespace roboptim /// \param o output stream used for display /// \param e error to be displayed /// \return output stream - std::ostream& operator<< (std::ostream& o, const SolverError& e); + ROBOPTIM_DLLAPI std::ostream& operator<< (std::ostream& o, const SolverError& e); } // end of namespace roboptim #endif //! ROBOPTIM_CORE_SOLVER_ERROR_HH diff --git a/include/roboptim/core/solver-warning.hh b/include/roboptim/core/solver-warning.hh index 949f8e1..f88aefc 100644 --- a/include/roboptim/core/solver-warning.hh +++ b/include/roboptim/core/solver-warning.hh @@ -31,7 +31,7 @@ namespace roboptim /// /// This class is mainly used to populate the warning vector of the /// ResultWithWarnings class. - class SolverWarning : public SolverError + class ROBOPTIM_DLLAPI SolverWarning : public SolverError { public: /// \brief Instantiate the class with a message. diff --git a/include/roboptim/core/sys.hh b/include/roboptim/core/sys.hh index f6f9fed..909f497 100644 --- a/include/roboptim/core/sys.hh +++ b/include/roboptim/core/sys.hh @@ -15,7 +15,9 @@ // You should have received a copy of the GNU Lesser General Public License // along with roboptim. If not, see <http://www.gnu.org/licenses/>. -# ifdef CWDEBUG +#include <roboptim/core/portability.hh> + +#ifdef CWDEBUG # ifndef _GNU_SOURCE # define _GNU_SOURCE # endif //! _GNU_SOURCE diff --git a/include/roboptim/core/twice-derivable-function.hh b/include/roboptim/core/twice-derivable-function.hh index 870c661..5847e77 100644 --- a/include/roboptim/core/twice-derivable-function.hh +++ b/include/roboptim/core/twice-derivable-function.hh @@ -50,7 +50,7 @@ namespace roboptim /// To avoid this costly representation, the function is split /// into \f$m\f$ \f$\mathbb{R}^n \rightarrow \mathbb{R}\f$ functions. /// See #DerivableFunction documentation for more information. - class TwiceDerivableFunction : public DerivableFunction + class ROBOPTIM_DLLAPI TwiceDerivableFunction : public DerivableFunction { public: /// \brief Hessian type. ----------------------------------------------------------------------- Summary of changes: ChangeLog | 30 ++++++++++++++ include/Makefile.am | 1 + include/roboptim/core/constant-function.hh | 2 +- include/roboptim/core/debug.hh | 6 +- include/roboptim/core/derivable-function.hh | 2 +- .../roboptim/core/finite-difference-gradient.hh | 10 ++-- include/roboptim/core/function.hh | 4 +- include/roboptim/core/generic-solver.hh | 6 +- include/roboptim/core/identity-function.hh | 2 +- include/roboptim/core/indent.hh | 14 +++--- include/roboptim/core/io.hh | 2 +- include/roboptim/core/linear-function.hh | 2 +- include/roboptim/core/numeric-linear-function.hh | 2 +- .../roboptim/core/numeric-quadratic-function.hh | 2 +- include/roboptim/core/portability.hh | 42 ++++++++++++++++++++ include/roboptim/core/quadratic-function.hh | 2 +- include/roboptim/core/result-with-warnings.hh | 2 +- include/roboptim/core/result.hh | 4 +- include/roboptim/core/solver-error.hh | 4 +- include/roboptim/core/solver-factory.hxx | 2 +- include/roboptim/core/solver-warning.hh | 2 +- include/roboptim/core/sys.hh | 4 +- include/roboptim/core/twice-derivable-function.hh | 2 +- 23 files changed, 112 insertions(+), 37 deletions(-) create mode 100644 include/roboptim/core/portability.hh hooks/post-receive -- roboptim |
From: Thomas M. <tho...@us...> - 2009-08-13 15:21:44
|
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". The branch, trajectory has been updated via f3f81b4dc599aed5f5427ac75d29141d1f327054 (commit) from 528faeec205f8e035f93e61a9c04463650cde983 (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 f3f81b4dc599aed5f5427ac75d29141d1f327054 Author: Thomas Moulard <tho...@gm...> Date: Fri Aug 14 00:20:53 2009 +0900 Fix orthogonal speed function name and clean code. * include/roboptim/trajectory/orthogonal-speed.hxx: Here. * tests/spline-time-optimization.stdout: Regenerate. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index adf6d85..45808ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-08-14 Thomas Moulard <tho...@gm...> + + Fix orthogonal speed function name and clean code. + * include/roboptim/trajectory/orthogonal-speed.hxx: Here. + * tests/spline-time-optimization.stdout: Regenerate. + 2009-08-13 Thomas Moulard <tho...@gm...> Make regular constraint add more robust. diff --git a/include/roboptim/trajectory/orthogonal-speed.hxx b/include/roboptim/trajectory/orthogonal-speed.hxx index 2603181..6aade93 100644 --- a/include/roboptim/trajectory/orthogonal-speed.hxx +++ b/include/roboptim/trajectory/orthogonal-speed.hxx @@ -85,7 +85,7 @@ namespace roboptim LimitOrthogonalSpeed<T>::LimitOrthogonalSpeed (StableTimePoint timePoint, const T& trajectory) throw () : DerivableFunction (trajectory.parameters ().size (), 1, - (boost::format ("frontal speed limit (%1%)") + (boost::format ("orthogonal speed limit (%1%)") % timePoint.getAlpha ()).str ()), timePoint_ (timePoint), trajectory_ (trajectory) @@ -135,11 +135,9 @@ namespace roboptim { const value_type t = (i + 1.) / (nConstraints + 1.); assert (t > 0. && t < 1.); - shared_ptr<LimitOrthogonalSpeed> speed + shared_ptr<DerivableFunction> speed (new LimitOrthogonalSpeed (t * tMax, trajectory)); - problem.addConstraint - (static_pointer_cast<DerivableFunction> (speed), - vRange); + problem.addConstraint (speed, vRange); } } } // end of namespace roboptim. diff --git a/tests/spline-time-optimization.stdout b/tests/spline-time-optimization.stdout index e69de29..4e047f6 100644 --- a/tests/spline-time-optimization.stdout +++ b/tests/spline-time-optimization.stdout @@ -0,0 +1,689 @@ +Problem: + Numeric linear function + A = [1,12]((-1,0,0,0,0,0,0,0,0,0,0,0)) + B = [1](0) + Argument's bounds: (0, inf), (0, 0), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (200, 200) + Argument's scales: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 + Number of constraints: 110 + Constraint 0 + speed limit (0.00900901) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](0.0614675) + + Constraint 1 + speed limit (0.018018) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](0.98348) + + Constraint 2 + speed limit (0.027027) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](4.97887) + + Constraint 3 + speed limit (0.036036) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](15.7357) + + Constraint 4 + speed limit (0.045045) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](38.4172) + + Constraint 5 + speed limit (0.0540541) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](79.6619) + + Constraint 6 + speed limit (0.0630631) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](147.583) + + Constraint 7 + speed limit (0.0720721) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](251.771) + + Constraint 8 + speed limit (0.0810811) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](403.288) + + Constraint 9 + speed limit (0.0900901) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](600.923) + + Constraint 10 + speed limit (0.0990991) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](811.142) + + Constraint 11 + speed limit (0.108108) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1020.9) + + Constraint 12 + speed limit (0.117117) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1219.87) + + Constraint 13 + speed limit (0.126126) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1399.2) + + Constraint 14 + speed limit (0.135135) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1551.52) + + Constraint 15 + speed limit (0.144144) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1670.92) + + Constraint 16 + speed limit (0.153153) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1752.98) + + Constraint 17 + speed limit (0.162162) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1794.74) + + Constraint 18 + speed limit (0.171171) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 19 + speed limit (0.18018) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 20 + speed limit (0.189189) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 21 + speed limit (0.198198) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 22 + speed limit (0.207207) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 23 + speed limit (0.216216) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 24 + speed limit (0.225225) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 25 + speed limit (0.234234) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 26 + speed limit (0.243243) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 27 + speed limit (0.252252) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 28 + speed limit (0.261261) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 29 + speed limit (0.27027) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 30 + speed limit (0.279279) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 31 + speed limit (0.288288) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 32 + speed limit (0.297297) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 33 + speed limit (0.306306) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 34 + speed limit (0.315315) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 35 + speed limit (0.324324) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 36 + speed limit (0.333333) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 37 + speed limit (0.342342) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 38 + speed limit (0.351351) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 39 + speed limit (0.36036) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 40 + speed limit (0.369369) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 41 + speed limit (0.378378) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 42 + speed limit (0.387387) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 43 + speed limit (0.396396) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 44 + speed limit (0.405405) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 45 + speed limit (0.414414) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 46 + speed limit (0.423423) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 47 + speed limit (0.432432) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 48 + speed limit (0.441441) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 49 + speed limit (0.45045) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 50 + speed limit (0.459459) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 51 + speed limit (0.468468) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 52 + speed limit (0.477477) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 53 + speed limit (0.486486) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 54 + speed limit (0.495495) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 55 + speed limit (0.504505) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 56 + speed limit (0.513514) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 57 + speed limit (0.522523) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 58 + speed limit (0.531532) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 59 + speed limit (0.540541) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 60 + speed limit (0.54955) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 61 + speed limit (0.558559) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 62 + speed limit (0.567568) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 63 + speed limit (0.576577) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 64 + speed limit (0.585586) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 65 + speed limit (0.594595) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 66 + speed limit (0.603604) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 67 + speed limit (0.612613) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 68 + speed limit (0.621622) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 69 + speed limit (0.630631) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 70 + speed limit (0.63964) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 71 + speed limit (0.648649) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 72 + speed limit (0.657658) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 73 + speed limit (0.666667) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 74 + speed limit (0.675676) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 75 + speed limit (0.684685) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 76 + speed limit (0.693694) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 77 + speed limit (0.702703) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 78 + speed limit (0.711712) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 79 + speed limit (0.720721) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 80 + speed limit (0.72973) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 81 + speed limit (0.738739) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 82 + speed limit (0.747748) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 83 + speed limit (0.756757) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 84 + speed limit (0.765766) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 85 + speed limit (0.774775) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 86 + speed limit (0.783784) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 87 + speed limit (0.792793) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 88 + speed limit (0.801802) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 89 + speed limit (0.810811) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 90 + speed limit (0.81982) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 91 + speed limit (0.828829) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1800) + + Constraint 92 + speed limit (0.837838) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1794.74) + + Constraint 93 + speed limit (0.846847) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1752.98) + + Constraint 94 + speed limit (0.855856) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1670.92) + + Constraint 95 + speed limit (0.864865) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1551.52) + + Constraint 96 + speed limit (0.873874) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1399.2) + + Constraint 97 + speed limit (0.882883) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1219.87) + + Constraint 98 + speed limit (0.891892) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](1020.9) + + Constraint 99 + speed limit (0.900901) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](811.142) + + Constraint 100 + speed limit (0.90991) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](600.923) + + Constraint 101 + speed limit (0.918919) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](403.288) + + Constraint 102 + speed limit (0.927928) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](251.771) + + Constraint 103 + speed limit (0.936937) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](147.583) + + Constraint 104 + speed limit (0.945946) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](79.6619) + + Constraint 105 + speed limit (0.954955) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](38.4172) + + Constraint 106 + speed limit (0.963964) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](15.7357) + + Constraint 107 + speed limit (0.972973) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](4.97887) + + Constraint 108 + speed limit (0.981982) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](0.98348) + + Constraint 109 + speed limit (0.990991) (derivable function) + Bounds: (-inf, 3612.5) + Scales: 1 + Initial value: [1](0.0614675) + + Starting point: [12](1,0,20,40,60,80,100,120,140,160,180,200) + Starting value: [1](-1) + Infinity value (for all functions): inf +CFSQP specific variables: + Nineq: 110 + Nineqn: 110 + Neq: 0 + Neqn: 0 + Mode: 100 + Iprint: 0 + Miter: 500 + Bigbnd: 1e+10 + Eps: 1e-08 + Epseqn: 1e-08 + Udelta: 1e-08 + 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) +Result: + Size (input, output): 12, 1 + X: [12](1.41708,1.93056e-33,20.1496,40.0176,60.0117,80.0059,100,119.994,139.988,159.982,179.85,200) + Value: [1](-1.41708) + Constraints values: [110](0.125287,2.0046,10.1483,32.0735,78.3046,162.372,300.815,513.177,822.01,1224.65,1652.09,2077.46,2479.49,2840.04,3144.04,3379.52,3537.61,3612.5,3612.5,3603.23,3595.68,3589.87,3585.77,3583.39,3582.72,3583.77,3586.54,3590.95,3595.47,3599.46,3602.91,3605.84,3608.24,3610.1,3611.43,3612.23,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.5,3612.23,3611.43,3610.1,3608.24,3605.84,3602.91,3599.46,3595.47,3590.95,3586.54,3583.77,3582.72,3583.39,3585.77,3589.87,3595.68,3603.23,3612.5,3612.5,3537.61,3379.52,3144.04,2840.04,2479.49,2077.46,1652.09,1224.65,822.01,513.177,300.815,162.372,78.3046,32.0735,10.1483,2.0046,0.125287) + Lambda: [110](0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.96365e-05,1.96365e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3.91583e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.96365e-05,1.96365e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3.91583e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.96364e-05,1.96367e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1) ----------------------------------------------------------------------- Summary of changes: ChangeLog | 6 + include/roboptim/trajectory/orthogonal-speed.hxx | 8 +- tests/spline-time-optimization.stdout | 689 ++++++++++++++++++++++ 3 files changed, 698 insertions(+), 5 deletions(-) hooks/post-receive -- roboptim |
From: Thomas M. <tho...@us...> - 2009-08-13 11:41: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". The branch, trajectory has been updated via 528faeec205f8e035f93e61a9c04463650cde983 (commit) from c45b6e23396f8037de03358a9d1fd585ced356cc (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 528faeec205f8e035f93e61a9c04463650cde983 Author: Thomas Moulard <tho...@gm...> Date: Thu Aug 13 20:40:51 2009 +0900 Make regular constraint add more robust. * include/roboptim/trajectory/frontal-speed.hxx, * include/roboptim/trajectory/limit-speed.hxx, * include/roboptim/trajectory/orthogonal-speed.hxx, * tests/spline-time-optimization.stdout: Make addToProblem methods more robust. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index ed2643a..adf6d85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-08-13 Thomas Moulard <tho...@gm...> + + Make regular constraint add more robust. + * include/roboptim/trajectory/frontal-speed.hxx, + * include/roboptim/trajectory/limit-speed.hxx, + * include/roboptim/trajectory/orthogonal-speed.hxx, + * tests/spline-time-optimization.stdout: Make addToProblem + methods more robust. + 2009-08-07 Thomas Moulard <tho...@gm...> Optimize. diff --git a/include/roboptim/trajectory/frontal-speed.hxx b/include/roboptim/trajectory/frontal-speed.hxx index 10756b9..dee6b47 100644 --- a/include/roboptim/trajectory/frontal-speed.hxx +++ b/include/roboptim/trajectory/frontal-speed.hxx @@ -133,15 +133,13 @@ namespace roboptim unsigned nConstraints) { using namespace boost; - if (nConstraints == 0) - return; - const value_type delta = 1. / nConstraints; - - for (double i = delta; i < 1. - delta; i += delta) + for (unsigned i = 0; i < nConstraints; ++i) { + const value_type t = (i + 1.) / (nConstraints + 1.); + assert (t > 0. && t < 1.); shared_ptr<LimitFrontalSpeed> speed - (new LimitFrontalSpeed (i * tMax, trajectory)); + (new LimitFrontalSpeed (t * tMax, trajectory)); problem.addConstraint (static_pointer_cast<DerivableFunction> (speed), vRange); diff --git a/include/roboptim/trajectory/limit-speed.hxx b/include/roboptim/trajectory/limit-speed.hxx index 3a5a3e0..85b3414 100644 --- a/include/roboptim/trajectory/limit-speed.hxx +++ b/include/roboptim/trajectory/limit-speed.hxx @@ -96,14 +96,12 @@ namespace roboptim unsigned nConstraints) { using namespace boost; - if (nConstraints == 0) - return; - const value_type delta = 1. / nConstraints; - - for (double i = delta; i < 1. - delta; i += delta) + for (unsigned i = 0; i < nConstraints; ++i) { - shared_ptr<LimitSpeed> speed (new LimitSpeed (i * tMax, trajectory)); + const value_type t = (i + 1.) / (nConstraints + 1.); + assert (t > 0. && t < 1.); + shared_ptr<LimitSpeed> speed (new LimitSpeed (t * tMax, trajectory)); problem.addConstraint (static_pointer_cast<DerivableFunction> (speed), vRange); diff --git a/include/roboptim/trajectory/orthogonal-speed.hxx b/include/roboptim/trajectory/orthogonal-speed.hxx index b7f3b4a..2603181 100644 --- a/include/roboptim/trajectory/orthogonal-speed.hxx +++ b/include/roboptim/trajectory/orthogonal-speed.hxx @@ -125,26 +125,23 @@ namespace roboptim template <typename F, typename CLIST> void LimitOrthogonalSpeed<T>::addToProblem (const T& trajectory, - Problem<F, CLIST>& problem, - typename Function::interval_t vRange, - unsigned nConstraints) + Problem<F, CLIST>& problem, + typename Function::interval_t vRange, + unsigned nConstraints) { using namespace boost; - if (nConstraints == 0) - return; - const value_type delta = 1. / nConstraints; - - for (double i = delta; i < 1. - delta; i += delta) + for (unsigned i = 0; i < nConstraints; ++i) { + const value_type t = (i + 1.) / (nConstraints + 1.); + assert (t > 0. && t < 1.); shared_ptr<LimitOrthogonalSpeed> speed - (new LimitOrthogonalSpeed (i * tMax, trajectory)); + (new LimitOrthogonalSpeed (t * tMax, trajectory)); problem.addConstraint (static_pointer_cast<DerivableFunction> (speed), vRange); } } - } // end of namespace roboptim. diff --git a/tests/spline-time-optimization.stdout b/tests/spline-time-optimization.stdout index b36205e..e69de29 100644 --- a/tests/spline-time-optimization.stdout +++ b/tests/spline-time-optimization.stdout @@ -1,683 +0,0 @@ -Problem: - Numeric linear function - A = [1,12]((-1,0,0,0,0,0,0,0,0,0,0,0)) - B = [1](0) - Argument's bounds: (0, inf), (0, 0), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (-inf, inf), (200, 200) - Argument's scales: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 - Number of constraints: 109 - Constraint 0 - speed limit (0.00909091) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](0.0637334) - - Constraint 1 - speed limit (0.0181818) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1.01973) - - Constraint 2 - speed limit (0.0272727) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](5.1624) - - Constraint 3 - speed limit (0.0363636) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](16.3157) - - Constraint 4 - speed limit (0.0454545) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](39.8333) - - Constraint 5 - speed limit (0.0545455) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](82.5984) - - Constraint 6 - speed limit (0.0636364) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](153.024) - - Constraint 7 - speed limit (0.0727273) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](261.052) - - Constraint 8 - speed limit (0.0818182) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](418.155) - - Constraint 9 - speed limit (0.0909091) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](619.753) - - Constraint 10 - speed limit (0.1) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](832.32) - - Constraint 11 - speed limit (0.109091) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1043.3) - - Constraint 12 - speed limit (0.118182) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1242.24) - - Constraint 13 - speed limit (0.127273) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1420.22) - - Constraint 14 - speed limit (0.136364) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1569.85) - - Constraint 15 - speed limit (0.145455) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1685.26) - - Constraint 16 - speed limit (0.154545) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1762.12) - - Constraint 17 - speed limit (0.163636) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1797.62) - - Constraint 18 - speed limit (0.172727) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 19 - speed limit (0.181818) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 20 - speed limit (0.190909) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 21 - speed limit (0.2) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 22 - speed limit (0.209091) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 23 - speed limit (0.218182) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 24 - speed limit (0.227273) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 25 - speed limit (0.236364) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 26 - speed limit (0.245455) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 27 - speed limit (0.254545) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 28 - speed limit (0.263636) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 29 - speed limit (0.272727) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 30 - speed limit (0.281818) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 31 - speed limit (0.290909) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 32 - speed limit (0.3) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 33 - speed limit (0.309091) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 34 - speed limit (0.318182) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 35 - speed limit (0.327273) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 36 - speed limit (0.336364) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 37 - speed limit (0.345455) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 38 - speed limit (0.354545) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 39 - speed limit (0.363636) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 40 - speed limit (0.372727) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 41 - speed limit (0.381818) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 42 - speed limit (0.390909) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 43 - speed limit (0.4) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 44 - speed limit (0.409091) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 45 - speed limit (0.418182) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 46 - speed limit (0.427273) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 47 - speed limit (0.436364) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 48 - speed limit (0.445455) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 49 - speed limit (0.454545) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 50 - speed limit (0.463636) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 51 - speed limit (0.472727) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 52 - speed limit (0.481818) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 53 - speed limit (0.490909) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 54 - speed limit (0.5) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 55 - speed limit (0.509091) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 56 - speed limit (0.518182) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 57 - speed limit (0.527273) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 58 - speed limit (0.536364) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 59 - speed limit (0.545455) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 60 - speed limit (0.554545) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 61 - speed limit (0.563636) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 62 - speed limit (0.572727) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 63 - speed limit (0.581818) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 64 - speed limit (0.590909) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 65 - speed limit (0.6) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 66 - speed limit (0.609091) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 67 - speed limit (0.618182) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 68 - speed limit (0.627273) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 69 - speed limit (0.636364) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 70 - speed limit (0.645455) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 71 - speed limit (0.654545) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 72 - speed limit (0.663636) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 73 - speed limit (0.672727) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 74 - speed limit (0.681818) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 75 - speed limit (0.690909) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 76 - speed limit (0.7) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 77 - speed limit (0.709091) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 78 - speed limit (0.718182) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 79 - speed limit (0.727273) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 80 - speed limit (0.736364) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 81 - speed limit (0.745455) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 82 - speed limit (0.754545) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 83 - speed limit (0.763636) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 84 - speed limit (0.772727) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 85 - speed limit (0.781818) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 86 - speed limit (0.790909) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 87 - speed limit (0.8) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 88 - speed limit (0.809091) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 89 - speed limit (0.818182) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 90 - speed limit (0.827273) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1800) - - Constraint 91 - speed limit (0.836364) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1797.62) - - Constraint 92 - speed limit (0.845455) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1762.12) - - Constraint 93 - speed limit (0.854545) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1685.26) - - Constraint 94 - speed limit (0.863636) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1569.85) - - Constraint 95 - speed limit (0.872727) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1420.22) - - Constraint 96 - speed limit (0.881818) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1242.24) - - Constraint 97 - speed limit (0.890909) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1043.3) - - Constraint 98 - speed limit (0.9) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](832.32) - - Constraint 99 - speed limit (0.909091) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](619.753) - - Constraint 100 - speed limit (0.918182) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](418.155) - - Constraint 101 - speed limit (0.927273) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](261.052) - - Constraint 102 - speed limit (0.936364) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](153.024) - - Constraint 103 - speed limit (0.945455) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](82.5984) - - Constraint 104 - speed limit (0.954545) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](39.8333) - - Constraint 105 - speed limit (0.963636) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](16.3157) - - Constraint 106 - speed limit (0.972727) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](5.1624) - - Constraint 107 - speed limit (0.981818) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](1.01973) - - Constraint 108 - speed limit (0.990909) (derivable function) - Bounds: (-inf, 3612.5) - Scales: 1 - Initial value: [1](0.0637334) - - Starting point: [12](1,0,20,40,60,80,100,120,140,160,180,200) - Starting value: [1](-1) - Infinity value (for all functions): inf -CFSQP specific variables: - Nineq: 109 - Nineqn: 109 - Neq: 0 - Neqn: 0 - Mode: 100 - Iprint: 0 - Miter: 500 - Bigbnd: 1e+10 - Eps: 1e-08 - Epseqn: 1e-08 - Udelta: 1e-08 - 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) -Result: - Size (input, output): 12, 1 - X: [12](1.41692,4.45554e-39,20.0686,40.0104,60.0077,80.0035,100,119.996,139.992,159.99,179.931,200) - Value: [1](-1.41692) - Constraints values: [109](0.128834,2.06134,10.4356,32.9815,80.5212,166.969,309.33,527.704,845.28,1252.69,1681.87,2107.31,2507.8,2865.24,3164.69,3394.32,3545.45,3612.5,3612.5,3608.42,3605.12,3602.6,3600.87,3599.92,3599.76,3600.37,3601.77,3603.83,3605.76,3607.46,3608.91,3610.11,3611.08,3611.8,3612.27,3612.5,3612.5,3612.45,3612.41,3612.38,3612.36,3612.35,3612.35,3612.35,3612.37,3612.39,3612.41,3612.43,3612.45,3612.47,3612.48,3612.49,3612.49,3612.5,3612.5,3612.5,3612.49,3612.49,3612.48,3612.47,3612.45,3612.43,3612.41,3612.39,3612.37,3612.35,3612.35,3612.35,3612.36,3612.38,3612.41,3612.45,3612.5,3612.5,3612.27,3611.8,3611.08,3610.11,3608.91,3607.46,3605.76,3603.83,3601.77,3600.37,3599.76,3599.92,3600.87,3602.6,3605.12,3608.42,3612.5,3612.5,3545.45,3394.32,3164.69,2865.24,2507.8,2107.31,1681.87,1252.69,845.28,527.704,309.33,166.969,80.5212,32.9815,10.4356,2.06134,0.128834) - Lambda: [109](0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2.60733e-05,1.31597e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.31596e-05,2.60734e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3.91812e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2.60734e-05,1.31595e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.31595e-05,2.60732e-05,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1) ----------------------------------------------------------------------- Summary of changes: ChangeLog | 9 + include/roboptim/trajectory/frontal-speed.hxx | 10 +- include/roboptim/trajectory/limit-speed.hxx | 10 +- include/roboptim/trajectory/orthogonal-speed.hxx | 17 +- tests/spline-time-optimization.stdout | 683 ---------------------- 5 files changed, 24 insertions(+), 705 deletions(-) hooks/post-receive -- roboptim |
From: Thomas M. <tho...@us...> - 2009-08-07 10:27:22
|
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". The branch, trajectory has been updated via c45b6e23396f8037de03358a9d1fd585ced356cc (commit) via b01b5849765e67833cdf09c435d51fc7d8f6a933 (commit) via ec52cd4e8386ecd09afc7d1f1446dde284a90922 (commit) from 2beaa3219af53d21f6fa7b960a43956f59670e83 (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 c45b6e23396f8037de03358a9d1fd585ced356cc Author: Thomas Moulard <tho...@gm...> Date: Fri Aug 7 19:26:26 2009 +0900 Optimize. * include/roboptim/trajectory/anthropomorphic-cost-function.hxx, * include/roboptim/trajectory/free-time-trajectory.hh: Optimize and enhance style. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 12268c6..ed2643a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,13 @@ 2009-08-07 Thomas Moulard <tho...@gm...> Optimize. + * include/roboptim/trajectory/anthropomorphic-cost-function.hxx, + * include/roboptim/trajectory/free-time-trajectory.hh: + Optimize and enhance style. + +2009-08-07 Thomas Moulard <tho...@gm...> + + Optimize. * include/roboptim/trajectory/frontal-speed.hxx, * include/roboptim/trajectory/orthogonal-speed.hxx: Optimize. diff --git a/include/roboptim/trajectory/anthropomorphic-cost-function.hxx b/include/roboptim/trajectory/anthropomorphic-cost-function.hxx index 89b15f7..b2b9f0c 100644 --- a/include/roboptim/trajectory/anthropomorphic-cost-function.hxx +++ b/include/roboptim/trajectory/anthropomorphic-cost-function.hxx @@ -71,10 +71,9 @@ namespace roboptim void operator () (const double& t) { + static Function::vector_t t_ (1); FrontalSpeed<T> frontalSpeed (traj_); OrthogonalSpeed<T> orthogonalSpeed (traj_); - - Function::vector_t t_ (1); t_[0] = t; const Function::value_type u1 = frontalSpeed.gradient (t_)[0]; const Function::value_type u2 = traj_.derivative (t, 2)[2]; @@ -102,16 +101,14 @@ namespace roboptim { res.clear (); - vector_t params = p; - - boost::scoped_ptr<T> updatedTrajectory (trajectory_.clone ()); - updatedTrajectory->setParameters (params); + static T updatedTrajectory = trajectory_; + updatedTrajectory.setParameters (p); const size_type nbDiscretizationPoints = 50; - detail::ComputeIntegral<T> ci (*updatedTrajectory, alpha_, alpha3_, res[0]); - foreach (updatedTrajectory->timeRange (), nbDiscretizationPoints, ci); + detail::ComputeIntegral<T> ci (updatedTrajectory, alpha_, alpha3_, res[0]); + foreach (updatedTrajectory.timeRange (), nbDiscretizationPoints, ci); - res[0] *= updatedTrajectory->length () / nbDiscretizationPoints; + res[0] *= updatedTrajectory.length () / nbDiscretizationPoints; } template <typename T> diff --git a/include/roboptim/trajectory/free-time-trajectory.hh b/include/roboptim/trajectory/free-time-trajectory.hh index 2e527ce..73fc586 100644 --- a/include/roboptim/trajectory/free-time-trajectory.hh +++ b/include/roboptim/trajectory/free-time-trajectory.hh @@ -17,6 +17,8 @@ #ifndef ROBOPTIM_TRAJECTORY_FREETIMETRAJECTORY_HH # define ROBOPTIM_TRAJECTORY_FREETIMETRAJECTORY_HH +# include <boost/numeric/ublas/vector_proxy.hpp> + # include <roboptim/trajectory/trajectory.hh> namespace roboptim @@ -129,10 +131,11 @@ namespace roboptim addScaleToParameters (const Function::vector_t& p, Function::value_type t) { + using namespace boost::numeric::ublas; + Function::vector_t res (p.size () + 1); res[0] = t; - for (unsigned i = 0; i < p.size (); ++i) - res[i + 1] = p[i]; + subrange (res, 1, p.size () + 1) = p; return res; } @@ -140,8 +143,7 @@ namespace roboptim removeScaleFromParameters (const Function::vector_t& p) { Function::vector_t res (p.size () - 1); - for (unsigned i = 1; i < p.size (); ++i) - res[i - 1] = p[i]; + res = subrange (p, 1, p.size ()); return res; } commit b01b5849765e67833cdf09c435d51fc7d8f6a933 Author: Thomas Moulard <tho...@gm...> Date: Fri Aug 7 17:43:43 2009 +0900 Optimize. * include/roboptim/trajectory/frontal-speed.hxx, * include/roboptim/trajectory/orthogonal-speed.hxx: Optimize. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index eb26f8c..12268c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-08-07 Thomas Moulard <tho...@gm...> + Optimize. + * include/roboptim/trajectory/frontal-speed.hxx, + * include/roboptim/trajectory/orthogonal-speed.hxx: Optimize. + +2009-08-07 Thomas Moulard <tho...@gm...> + Add analytical gradient for LimitOmega. * include/roboptim/trajectory/limit-omega.hxx: Here. diff --git a/include/roboptim/trajectory/frontal-speed.hxx b/include/roboptim/trajectory/frontal-speed.hxx index 9357f95..10756b9 100644 --- a/include/roboptim/trajectory/frontal-speed.hxx +++ b/include/roboptim/trajectory/frontal-speed.hxx @@ -91,7 +91,8 @@ namespace roboptim % timePoint.getAlpha ()).str ()), timePoint_ (timePoint), trajectory_ (trajectory) - {} + { + } template <typename T> LimitFrontalSpeed<T>::~LimitFrontalSpeed () throw () @@ -101,15 +102,12 @@ namespace roboptim void LimitFrontalSpeed<T>::impl_compute (result_t& res, const argument_t& p) const throw () { - using namespace boost::numeric::ublas; - res.clear (); - - boost::scoped_ptr<T> updatedTrajectory (trajectory_.clone ()); - updatedTrajectory->setParameters (p); + static T updatedTrajectory = trajectory_; + static FrontalSpeed<T> frontalSpeed (updatedTrajectory); + static vector_t t (1); - FrontalSpeed<T> frontalSpeed (*updatedTrajectory); - vector_t t (1); - t[0] = this->timePoint_.getTime (updatedTrajectory->timeRange ()); + updatedTrajectory.setParameters (p); + t[0] = this->timePoint_.getTime (updatedTrajectory.timeRange ()); res = frontalSpeed (t); } diff --git a/include/roboptim/trajectory/orthogonal-speed.hxx b/include/roboptim/trajectory/orthogonal-speed.hxx index bbcb020..b7f3b4a 100644 --- a/include/roboptim/trajectory/orthogonal-speed.hxx +++ b/include/roboptim/trajectory/orthogonal-speed.hxx @@ -99,16 +99,13 @@ namespace roboptim void LimitOrthogonalSpeed<T>::impl_compute (result_t& res, const argument_t& p) const throw () { - using namespace boost::numeric::ublas; - res.clear (); - - boost::scoped_ptr<T> updatedTrajectory (trajectory_.clone ()); - updatedTrajectory->setParameters (p); + static T updatedTrajectory = trajectory_; + static OrthogonalSpeed<T> orthogonalSpeed (updatedTrajectory); + static vector_t t (1); - OrthogonalSpeed<T> frontalSpeed (*updatedTrajectory); - vector_t t (1); - t[0] = this->timePoint_.getTime (updatedTrajectory->timeRange ()); - res = frontalSpeed (t); + updatedTrajectory.setParameters (p); + t[0] = this->timePoint_.getTime (updatedTrajectory.timeRange ()); + res = orthogonalSpeed (t); } template <typename T> commit ec52cd4e8386ecd09afc7d1f1446dde284a90922 Author: Thomas Moulard <tho...@gm...> Date: Fri Aug 7 17:19:03 2009 +0900 Add analytical gradient for LimitOmega. * include/roboptim/trajectory/limit-omega.hxx: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index ae941dd..eb26f8c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-08-07 Thomas Moulard <tho...@gm...> + + Add analytical gradient for LimitOmega. + * include/roboptim/trajectory/limit-omega.hxx: Here. + 2009-08-06 Thomas Moulard <tho...@gm...> Regenerate test case. diff --git a/include/roboptim/trajectory/limit-omega.hxx b/include/roboptim/trajectory/limit-omega.hxx index 6b0bca1..6e9afad 100644 --- a/include/roboptim/trajectory/limit-omega.hxx +++ b/include/roboptim/trajectory/limit-omega.hxx @@ -68,11 +68,9 @@ namespace roboptim void LimitOmega<T>::impl_compute (result_t& res, const argument_t& p) const throw () { - res.clear (); - - boost::scoped_ptr<T> updatedTrajectory (trajectory_.clone ()); - updatedTrajectory->setParameters (p); - res[0] = updatedTrajectory->derivative (timePoint_, 1)[2]; + static T updatedTrajectory = trajectory_; + updatedTrajectory.setParameters (p); + res[0] = updatedTrajectory.derivative (timePoint_, 1)[2]; } template <typename T> @@ -80,12 +78,10 @@ namespace roboptim LimitOmega<T>::impl_gradient (gradient_t& grad, const argument_t& p, size_type i) const throw () { - assert (i == 0); - grad.clear (); - - //FIXME: compute gradient analytically. - FiniteDifferenceGradient fdfunction (*this); - fdfunction.gradient (grad, p, 0); + using namespace boost::numeric::ublas; + static T updatedTrajectory = trajectory_; + updatedTrajectory.setParameters (p); + grad = column (updatedTrajectory.variationDerivWrtParam (timePoint_, 1), 0); } } // end of namespace roboptim. ----------------------------------------------------------------------- Summary of changes: ChangeLog | 18 ++++++++++++++++++ .../trajectory/anthropomorphic-cost-function.hxx | 15 ++++++--------- .../roboptim/trajectory/free-time-trajectory.hh | 10 ++++++---- include/roboptim/trajectory/frontal-speed.hxx | 16 +++++++--------- include/roboptim/trajectory/limit-omega.hxx | 18 +++++++----------- include/roboptim/trajectory/orthogonal-speed.hxx | 15 ++++++--------- 6 files changed, 50 insertions(+), 42 deletions(-) hooks/post-receive -- roboptim |
From: Thomas M. <tho...@us...> - 2009-08-06 11:53:19
|
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". The branch, trajectory has been updated via 2beaa3219af53d21f6fa7b960a43956f59670e83 (commit) via f15fb90f5aeb0262b307247ee62634b61554136b (commit) via e9a54e67b0b23d485001fcfb2817a7291164e474 (commit) via 321791490879daf730f3fdeca0066fe9e8bd5dbc (commit) via 3b4fb66ad11ca7a7d1caa129a8d450b698fb1c64 (commit) via 688a96642f62df945aedd6131f2a3fedcd691f57 (commit) from 11a7128df54cd55b4eae4dd1e4f4221c1f5b89c0 (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 2beaa3219af53d21f6fa7b960a43956f59670e83 Author: Thomas Moulard <tho...@gm...> Date: Thu Aug 6 20:52:41 2009 +0900 Regenerate test case. * tests/spline-optimization.stdout: Regenerate. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 9208859..ae941dd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-08-06 Thomas Moulard <tho...@gm...> + Regenerate test case. + * tests/spline-optimization.stdout: Regenerate. + +2009-08-06 Thomas Moulard <tho...@gm...> + Fix gradient checking. * tests/spline-optimization.cc: Here. diff --git a/tests/spline-optimization.stdout b/tests/spline-optimization.stdout index f8aa7e1..9f6fc15 100644 --- a/tests/spline-optimization.stdout +++ b/tests/spline-optimization.stdout @@ -121,104 +121,104 @@ plot '-' title 'before' with line e plot '-' title 'after' with line -0.000859 0.000859 -0.006873 0.006873 -0.023195 0.023195 -0.054981 0.054981 -0.107386 0.107386 -0.185562 0.185562 -0.294666 0.294666 -0.439852 0.439852 -0.626273 0.626273 -0.859085 0.859085 -1.143443 1.143443 -1.484499 1.484499 -1.887410 1.887410 -2.357330 2.357330 -2.899413 2.899413 -3.518813 3.518813 -4.220686 4.220686 -5.010185 5.010185 -5.892466 5.892466 -6.872682 6.872682 -7.953777 7.953777 -9.129843 9.129843 -10.392764 10.392764 -11.734421 11.734421 -13.146696 13.146696 -14.621471 14.621471 -16.150628 16.150628 -17.726049 17.726049 -19.339615 19.339615 -20.983210 20.983210 -22.648714 22.648714 -24.328010 24.328010 -26.012980 26.012980 -27.695505 27.695505 -29.367468 29.367468 -31.020750 31.020750 -32.647234 32.647234 -34.238801 34.238801 -35.787334 35.787334 -37.284714 37.284714 -38.725164 38.725164 -40.112270 40.112270 -41.451960 41.451960 -42.750161 42.750161 -44.012799 44.012799 -45.245801 45.245801 -46.455096 46.455096 -47.646609 47.646609 -48.826268 48.826268 +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 50.000000 50.000000 -51.173732 51.173732 -52.353391 52.353391 -53.544904 53.544904 -54.754199 54.754199 -55.987201 55.987201 -57.249839 57.249839 -58.548040 58.548040 -59.887730 59.887730 -61.274836 61.274836 -62.715286 62.715286 -64.212666 64.212666 -65.761199 65.761199 -67.352766 67.352766 -68.979250 68.979250 -70.632532 70.632532 -72.304495 72.304495 -73.987020 73.987020 -75.671990 75.671990 -77.351286 77.351286 -79.016790 79.016790 -80.660385 80.660385 -82.273951 82.273951 -83.849372 83.849372 -85.378529 85.378529 -86.853304 86.853304 -88.265579 88.265579 -89.607236 89.607236 -90.870157 90.870157 -92.046223 92.046223 -93.127318 93.127318 -94.107534 94.107534 -94.989815 94.989815 -95.779314 95.779314 -96.481187 96.481187 -97.100587 97.100587 -97.642670 97.642670 -98.112590 98.112590 -98.515501 98.515501 -98.856557 98.856557 -99.140915 99.140915 -99.373727 99.373727 -99.560148 99.560148 -99.705334 99.705334 -99.814438 99.814438 -99.892614 99.892614 -99.945019 99.945019 -99.976805 99.976805 -99.993127 99.993127 +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 e unset multiplot commit f15fb90f5aeb0262b307247ee62634b61554136b Author: Thomas Moulard <tho...@gm...> Date: Thu Aug 6 20:52:12 2009 +0900 Fix gradient checking. * tests/spline-optimization.cc: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 3f4f259..9208859 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-08-06 Thomas Moulard <tho...@gm...> + Fix gradient checking. + * tests/spline-optimization.cc: Here. + +2009-08-06 Thomas Moulard <tho...@gm...> + Fix test case. * tests/anthropomorphic-cost-function-case-2.cc, * tests/anthropomorphic-cost-function-case-3.cc, diff --git a/tests/spline-optimization.cc b/tests/spline-optimization.cc index e6035be..b3bca4c 100644 --- a/tests/spline-optimization.cc +++ b/tests/spline-optimization.cc @@ -93,18 +93,17 @@ int run_test () << plot_xy (spline); // Optimize. - discreteInterval_t costInterval (0., 4., 0.5); - SplineLength cost (spline, costInterval); + SplineLength cost (spline); // Check cost gradient. try { Function::vector_t x (params.size ()); x.clear (); - checkGradientAndThrow (cost, 0, x, 3e-3); + checkGradientAndThrow (cost, 0, x, 2e-3); x = params; - checkGradientAndThrow (cost, 0, x, 3e-3); + checkGradientAndThrow (cost, 0, x, 2e-3); } catch (BadGradient& bg) { commit e9a54e67b0b23d485001fcfb2817a7291164e474 Author: Thomas Moulard <tho...@gm...> Date: Thu Aug 6 20:51:36 2009 +0900 Fix test case. * tests/anthropomorphic-cost-function-case-2.cc, * tests/anthropomorphic-cost-function-case-3.cc, * tests/anthropomorphic-cost-function-case-4.cc, * tests/anthropomorphic-cost-function-case-5.cc: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index aa1d9db..3f4f259 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2009-08-06 Thomas Moulard <tho...@gm...> + Fix test case. + * tests/anthropomorphic-cost-function-case-2.cc, + * tests/anthropomorphic-cost-function-case-3.cc, + * tests/anthropomorphic-cost-function-case-4.cc, + * tests/anthropomorphic-cost-function-case-5.cc: Here. + +2009-08-06 Thomas Moulard <tho...@gm...> + Use new foreach variant. * include/roboptim/trajectory/spline-length.hh: Add number of discretization point as an optional argument. diff --git a/tests/anthropomorphic-cost-function-case-2.cc b/tests/anthropomorphic-cost-function-case-2.cc index 2b1d301..12f0b53 100644 --- a/tests/anthropomorphic-cost-function-case-2.cc +++ b/tests/anthropomorphic-cost-function-case-2.cc @@ -24,9 +24,9 @@ int run_test () const double initialY = 0.; const double initialTheta = M_PI / 2.; - const double finalX = 3.; - const double finalY = 3.; - const double finalTheta = M_PI/2.; + const double finalX = 1.; + const double finalY = 0.; + const double finalTheta = 0.; return optimize (initialX, initialY, diff --git a/tests/anthropomorphic-cost-function-case-3.cc b/tests/anthropomorphic-cost-function-case-3.cc index 2b1d301..bcd69ea 100644 --- a/tests/anthropomorphic-cost-function-case-3.cc +++ b/tests/anthropomorphic-cost-function-case-3.cc @@ -24,8 +24,8 @@ int run_test () const double initialY = 0.; const double initialTheta = M_PI / 2.; - const double finalX = 3.; - const double finalY = 3.; + const double finalX = 1.; + const double finalY = 0.; const double finalTheta = M_PI/2.; return optimize (initialX, diff --git a/tests/anthropomorphic-cost-function-case-4.cc b/tests/anthropomorphic-cost-function-case-4.cc index f7bd7c8..a555ef8 100644 --- a/tests/anthropomorphic-cost-function-case-4.cc +++ b/tests/anthropomorphic-cost-function-case-4.cc @@ -24,8 +24,8 @@ int run_test () const double initialY = 0.; const double initialTheta = M_PI / 2.; - const double finalX = 3.; - const double finalY = 3.; + const double finalX = 5.; + const double finalY = 0.; const double finalTheta = M_PI/2.; return optimize (initialX, diff --git a/tests/anthropomorphic-cost-function-case-5.cc b/tests/anthropomorphic-cost-function-case-5.cc index 2b1d301..de94e30 100644 --- a/tests/anthropomorphic-cost-function-case-5.cc +++ b/tests/anthropomorphic-cost-function-case-5.cc @@ -24,8 +24,8 @@ int run_test () const double initialY = 0.; const double initialTheta = M_PI / 2.; - const double finalX = 3.; - const double finalY = 3.; + const double finalX = 1.; + const double finalY = 1.; const double finalTheta = M_PI/2.; return optimize (initialX, commit 321791490879daf730f3fdeca0066fe9e8bd5dbc Author: Thomas Moulard <tho...@gm...> Date: Thu Aug 6 20:51:00 2009 +0900 Use new foreach variant. * include/roboptim/trajectory/spline-length.hh: Add number of discretization point as an optional argument. * src/spline-length.cc: Use new foreach. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index ca0c82b..aa1d9db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2009-08-06 Thomas Moulard <tho...@gm...> + Use new foreach variant. + * include/roboptim/trajectory/spline-length.hh: + Add number of discretization point as an optional argument. + * src/spline-length.cc: Use new foreach. + +2009-08-06 Thomas Moulard <tho...@gm...> + Use foreach variant. * include/roboptim/trajectory/anthropomorphic-cost-function.hxx: Here. diff --git a/include/roboptim/trajectory/spline-length.hh b/include/roboptim/trajectory/spline-length.hh index 2c27558..6015c24 100644 --- a/include/roboptim/trajectory/spline-length.hh +++ b/include/roboptim/trajectory/spline-length.hh @@ -17,6 +17,8 @@ #ifndef ROBOPTIM_TRAJECTORY_SPLINE_LENGTH_HH # define ROBOPTIM_TRAJECTORY_SPLINE_LENGTH_HH +# include <boost/optional/optional_fwd.hpp> + # include <roboptim/trajectory/fwd.hh> # include <roboptim/trajectory/spline.hh> # include <roboptim/trajectory/trajectory-cost.hh> @@ -43,8 +45,11 @@ namespace roboptim /// on a specific interval. The step associated to the interval controls /// the approximation precision. /// \param spline spline used for length computation - /// \param interval discrete interval on which the length is computed. - SplineLength (const Spline& spline, discreteInterval_t interval) throw (); + /// \param interval interval on which the length is computed. + /// \param nDiscretizationPoints number of discretization points + SplineLength (const Spline& spline, + const size_type nDiscretizationPoints = 100, + boost::optional<interval_t> interval = boost::none_t ()) throw (); virtual ~SplineLength () throw (); @@ -54,7 +59,9 @@ namespace roboptim private: /// \brief Interval on which the length is computed. - discreteInterval_t interval_; + interval_t interval_; + /// \brief Number of discretization points. + size_type nDiscretizationPoints_; }; /// \@ diff --git a/src/spline-length.cc b/src/spline-length.cc index beb43e7..7da42b2 100644 --- a/src/spline-length.cc +++ b/src/spline-length.cc @@ -16,6 +16,8 @@ // along with roboptim. If not, see <http://www.gnu.org/licenses/>. #include <boost/numeric/ublas/vector_expression.hpp> +#include <boost/optional.hpp> + #include <roboptim/trajectory/spline-length.hh> namespace roboptim @@ -64,10 +66,12 @@ namespace roboptim } SplineLength::SplineLength (const Spline& spline, - discreteInterval_t interval) + size_type nDiscretizationPoints, + boost::optional<interval_t> interval) throw () : TrajectoryCost<Spline> (spline, "spline length"), - interval_ (interval) + interval_ (interval ? *interval : spline.timeRange ()), + nDiscretizationPoints_ (nDiscretizationPoints) { } @@ -83,8 +87,11 @@ namespace roboptim traj.setParameters (p); SumLength sumlength (traj, res[0]); - foreach (interval_, sumlength); - res[0] *= getUpperBound (interval_) - getLowerBound (interval_); + foreach (interval_, nDiscretizationPoints_, sumlength); + + const value_type delta = + getUpperBound (interval_) - getLowerBound (interval_); + res[0] *= delta / nDiscretizationPoints_; res[0] /= 2.; } @@ -100,7 +107,9 @@ namespace roboptim traj.setParameters (p); SumLengthGrad sumlengthgrad (traj, grad); - foreach (interval_, sumlengthgrad); - grad *= getUpperBound (interval_) - getLowerBound (interval_); + foreach (interval_, nDiscretizationPoints_, sumlengthgrad); + const value_type delta = + getUpperBound (interval_) - getLowerBound (interval_); + grad *= delta / nDiscretizationPoints_; } } // end of namespace roboptim. commit 3b4fb66ad11ca7a7d1caa129a8d450b698fb1c64 Author: Thomas Moulard <tho...@gm...> Date: Thu Aug 6 20:49:42 2009 +0900 Use foreach variant. * include/roboptim/trajectory/anthropomorphic-cost-function.hxx: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 1c0bbac..ca0c82b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-08-06 Thomas Moulard <tho...@gm...> + Use foreach variant. + * include/roboptim/trajectory/anthropomorphic-cost-function.hxx: + Here. + +2009-08-06 Thomas Moulard <tho...@gm...> + Fix integral computation. * include/roboptim/trajectory/anthropomorphic-cost-function.hxx: * src/spline-length.cc: Fix integral computation. diff --git a/include/roboptim/trajectory/anthropomorphic-cost-function.hxx b/include/roboptim/trajectory/anthropomorphic-cost-function.hxx index 8d35e3c..89b15f7 100644 --- a/include/roboptim/trajectory/anthropomorphic-cost-function.hxx +++ b/include/roboptim/trajectory/anthropomorphic-cost-function.hxx @@ -107,13 +107,11 @@ namespace roboptim boost::scoped_ptr<T> updatedTrajectory (trajectory_.clone ()); updatedTrajectory->setParameters (params); - discreteInterval_t interval = - makeDiscreteInterval (updatedTrajectory->timeRange (), .1); - + const size_type nbDiscretizationPoints = 50; detail::ComputeIntegral<T> ci (*updatedTrajectory, alpha_, alpha3_, res[0]); - foreach (interval, ci); + foreach (updatedTrajectory->timeRange (), nbDiscretizationPoints, ci); - res *= updatedTrajectory->length (); + res[0] *= updatedTrajectory->length () / nbDiscretizationPoints; } template <typename T> commit 688a96642f62df945aedd6131f2a3fedcd691f57 Author: Thomas Moulard <tho...@gm...> Date: Thu Aug 6 18:49:16 2009 +0900 Fix integral computation. * include/roboptim/trajectory/anthropomorphic-cost-function.hxx: * src/spline-length.cc: Fix integral computation. * tests/anthropomorphic-cost-function-case-1.cc: Fix test case. * tests/spline-optimization.cc: Be less strict. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 6cff1a4..1c0bbac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2009-08-06 Thomas Moulard <tho...@gm...> + Fix integral computation. + * include/roboptim/trajectory/anthropomorphic-cost-function.hxx: + * src/spline-length.cc: Fix integral computation. + * tests/anthropomorphic-cost-function-case-1.cc: Fix test case. + * tests/spline-optimization.cc: Be less strict. + +2009-08-06 Thomas Moulard <tho...@gm...> + Split test case. * tests/Makefile.am: Split test case. * tests/anthropomorphic-cost-function-case-1.cc: New. diff --git a/include/roboptim/trajectory/anthropomorphic-cost-function.hxx b/include/roboptim/trajectory/anthropomorphic-cost-function.hxx index 3acdfa8..8d35e3c 100644 --- a/include/roboptim/trajectory/anthropomorphic-cost-function.hxx +++ b/include/roboptim/trajectory/anthropomorphic-cost-function.hxx @@ -112,6 +112,8 @@ namespace roboptim detail::ComputeIntegral<T> ci (*updatedTrajectory, alpha_, alpha3_, res[0]); foreach (interval, ci); + + res *= updatedTrajectory->length (); } template <typename T> diff --git a/src/spline-length.cc b/src/spline-length.cc index 181b501..beb43e7 100644 --- a/src/spline-length.cc +++ b/src/spline-length.cc @@ -84,6 +84,7 @@ namespace roboptim SumLength sumlength (traj, res[0]); foreach (interval_, sumlength); + res[0] *= getUpperBound (interval_) - getLowerBound (interval_); res[0] /= 2.; } @@ -100,5 +101,6 @@ namespace roboptim SumLengthGrad sumlengthgrad (traj, grad); foreach (interval_, sumlengthgrad); + grad *= getUpperBound (interval_) - getLowerBound (interval_); } } // end of namespace roboptim. diff --git a/tests/anthropomorphic-cost-function-case-1.cc b/tests/anthropomorphic-cost-function-case-1.cc index 2b1d301..76bd933 100644 --- a/tests/anthropomorphic-cost-function-case-1.cc +++ b/tests/anthropomorphic-cost-function-case-1.cc @@ -26,7 +26,7 @@ int run_test () const double finalX = 3.; const double finalY = 3.; - const double finalTheta = M_PI/2.; + const double finalTheta = -M_PI/2.; return optimize (initialX, initialY, diff --git a/tests/spline-optimization.cc b/tests/spline-optimization.cc index bb02b52..e6035be 100644 --- a/tests/spline-optimization.cc +++ b/tests/spline-optimization.cc @@ -101,10 +101,10 @@ int run_test () { Function::vector_t x (params.size ()); x.clear (); - checkGradientAndThrow (cost, 0, x, 2e-3); + checkGradientAndThrow (cost, 0, x, 3e-3); x = params; - checkGradientAndThrow (cost, 0, x, 2e-3); + checkGradientAndThrow (cost, 0, x, 3e-3); } catch (BadGradient& bg) { ----------------------------------------------------------------------- Summary of changes: ChangeLog | 39 ++++ .../trajectory/anthropomorphic-cost-function.hxx | 8 +- include/roboptim/trajectory/spline-length.hh | 13 +- src/spline-length.cc | 19 ++- tests/anthropomorphic-cost-function-case-1.cc | 2 +- tests/anthropomorphic-cost-function-case-2.cc | 6 +- tests/anthropomorphic-cost-function-case-3.cc | 4 +- tests/anthropomorphic-cost-function-case-4.cc | 4 +- tests/anthropomorphic-cost-function-case-5.cc | 4 +- tests/spline-optimization.cc | 3 +- tests/spline-optimization.stdout | 194 ++++++++++---------- 11 files changed, 176 insertions(+), 120 deletions(-) hooks/post-receive -- roboptim |
From: Thomas M. <tho...@us...> - 2009-08-06 11:17: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". The branch, core has been updated via 2ecc7e4aa1b2463b427210b6846d7d952101dc7b (commit) from 880a68de51983c5b8c5684b6635e5a8c1064d582 (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 2ecc7e4aa1b2463b427210b6846d7d952101dc7b Author: Thomas Moulard <tho...@gm...> Date: Thu Aug 6 20:16:34 2009 +0900 Add new variant of foreach method. * include/roboptim/core/function.hh: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 4c02ccf..e40f5f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-08-06 Thomas Moulard <tho...@gm...> + + Add new variant of foreach method. + * include/roboptim/core/function.hh: Here. + 2009-08-03 Thomas Moulard <tho...@gm...> Fix a probably bug in libcwd documentation. diff --git a/include/roboptim/core/function.hh b/include/roboptim/core/function.hh index 764ce46..6b0a8c4 100644 --- a/include/roboptim/core/function.hh +++ b/include/roboptim/core/function.hh @@ -227,7 +227,7 @@ namespace roboptim /// /// Call the functor to each discretization point of the discrete /// interval. - /// \param interval iterval on which the method iterates + /// \param interval interval on which the method iterates /// \param functor unary function that will be applied /// \tparam F functor type (has to satisfy the STL unary function concept) template <typename F> @@ -237,13 +237,47 @@ namespace roboptim const value_type delta = getUpperBound (interval) - getLowerBound (interval); assert (delta >= 0.); + assert (getStep (interval) > 0.); - value_type n = floor (delta / getStep (interval)); + value_type n = std::floor (delta / getStep (interval)); for (size_type i = 0; i <= n; ++i) { - const value_type t = + value_type t = getLowerBound (interval) + i * getStep (interval); + if (t > getUpperBound (interval)) + t = getUpperBound (interval); + assert (getLowerBound (interval) <= t + && t <= getUpperBound (interval)); + functor (t); + } + } + + /// \brief Iterate on an interval + /// + /// Call the functor regularly n times on an interval. + /// \param interval interval on which the method iterates + /// \param n number of discretization points + /// \param functor unary function that will be applied + /// \tparam F functor type (has to satisfy the STL unary function concept) + template <typename F> + static void foreach (const interval_t interval, + const size_type n, + F functor) + { + const value_type delta = + getUpperBound (interval) - getLowerBound (interval); + assert (delta >= 0.); + + if (!n) + return; + + for (size_type i = 0; i < n; ++i) + { + value_type t = + getLowerBound (interval) + i * (delta / (n - 1)); + if (t > getUpperBound (interval)) + t = getUpperBound (interval); assert (getLowerBound (interval) <= t && t <= getUpperBound (interval)); functor (t); ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 ++++ include/roboptim/core/function.hh | 40 ++++++++++++++++++++++++++++++++++-- 2 files changed, 42 insertions(+), 3 deletions(-) hooks/post-receive -- roboptim |