Getting started

Solve finite horizon multi-stage deterministic decision problems
DynaProg provides a flexible tool to solve a finite horizon multi-stage deterministic decision problem, which is a problem where a decision must be made at each stage for a system that evolves through a finite number of stages, minimizing the total cost incurred.
This class of problems is described by a dynamic system and a cost function.
The dynamic system usually takes the form:
x_(k+1) = f(x_k, u_k), for k = 0,1,...,N-1,
where
The cost function takes the form:
J(x_0,u_0,...,u_(N-1)) = g_N(x_N) + SUM(from k=0 to N-1) of g(x_k, u_k),
where
Obtaining the optimal solution of this optimization problem is therefore to obtain the minimum total cost
J^*(x_0) = MIN over (u_k, k=0, ..., N-1) of J(x_0,u_0,...,u_{N-1})
and the optimal control sequence u*_0, ..., u*_(N-1) that minimizes it.
With DynaProg, you can model the dynamic system and a cost function as a MATLAB function in an m-file, and easily obtain the optimal solution, without having to develop your own implementation of a Dynamic Programming algorithm.
Additionally, you can specify constraints on the state and control variables and/or add an exogenous input which can influence the system dynamics.

Set up a basic problem

Set up and solve a basic problem with DynaProg.

Specify contraints on the state and control variables

Use unfeasibilities in your system to add constraints on the state and control variables.

Specify a terminal cost

Use a custom function to define a terminal cost.

Handle exogenous inputs

Consider an exogenous input influencing the system dynamics.

Use additional inputs

Use additional inputs to your model to avoid repeating evaluations.

Use additional outputs

Return additional simulation outputs.

Splitting the model function

Speed up the solution for complex models by splitting the system and cost function.

Troubleshooting your model and Safe Mode

Speed up the solution for complex models by splitting the system and cost function.
Contact: federico.miretti@polito.it