pyomeca / bioptim

An optimization framework that links CasADi, Ipopt, ACADOS and biorbd for Optimal Control Problem
MIT License
91 stars 46 forks source link

Lagrange objective should be calculated at each integration steps #249

Open pariterre opened 3 years ago

pariterre commented 3 years ago

Currently the objective Lagrange functions (and constraint for MINIMIZE) are only computed at the nodes (as for the continuity constraints. However, this approximation may gets ugly if the function is highly nonlinear and the shooting nodes are spread apart.

A solution would be to use the intermediate points of the integration (for ERK at least).

pariterre commented 3 years ago

Also this integration should be optional (the current behavior should be available) and the type of integration should be accessible (Piecewise constant, Trapezoïdal, etc.)

pariterre commented 2 years ago

@Ipuch Check what happens in COLLOCATION

Ipuch commented 1 year ago

It's the same with COLLOCATION. As an intermediate way, one could use #458, trapezoidal integration instead of rectangle integration.