Skip to content

Commit

Permalink
Ipuch's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
EveCharbie committed Apr 29, 2024
1 parent c2769ed commit e14ae09
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,13 @@ built-in continuity constraints), and parameters (p = optimization variables def
The state continuity constraints implementation may vary depending on the transcription of the problem (implicit vs explicit, direct multiple shooting vs direct collocations).

The cost function can include Mayer terms (function evaluated at one node, the default is the last node) and Lagrange terms (functions integrated over the duration of the phase).
The Lagrange terms are computed as
The Lagrange terms are computed by default as EulerForward Integrals:
```python
L = sum((current_cost - cost_target)**2 * dt * weight)
L = 0
for i in range(n_shooting):
L += weight * sum((evaluated_cost[:, i] - target_cost[:, i])**2 * dt)
```
Where `weight` is by default 1 and `target_cost` is by default 0. For more advanced approximations, see QuadratureRule section. They can be used to evaluate more accurately the Lagrange terms of the cost function.
The optimization variables can be subject to equality and/or inequality constraints.

# A first practical example
Expand Down

0 comments on commit e14ae09

Please sign in to comment.