irlc.ex04.continuous_time_model.ContiniousTimeSymbolicModel
- class irlc.ex04.continuous_time_model.ContiniousTimeSymbolicModel(cost=None, simple_bounds=None)[source]
Continious time symbolic model. See (Her21, Section 11.3) for a top-level description.
This model represents the top-level description of the physical system as a differential equation
> dx/dt = f(x, u, t)
and a cost-function defined as an integral:
> Cost = g(x(t0), x(tf), t0, tf) + int_t0^tf g(x, u, t) dt
and bounds on x, u and t.
In this description both x and u are vectors.
The overall idea is that you write a new model by editing the def sym_f function. Add a symbolic expression here, and the class will automatically convert it into a numpy function, and allow e.g. the discrete model to compute derivatives.
Methods
__init__
([cost, simple_bounds])animate_rollout
(x0, u_fun, t0, tF[, ...])close
()guess
()render
(x[, mode])reset
()set_simple_bounds
(bounds)simple_bounds
()Simple inequality constraints (i.e.
simulate
(x0, u_fun, t0, tF[, N_steps, method])Defaults to RK4 simulation of the trajectory from x0, u0, t0 to tf, see (Her21, Algorithm 18) Method can be either 'rk4' or 'euler'
sym_c
(x, u, t)Compute Lagrange term in cost function
sym_cf
(t0, tF, x0, xF)Compute Mayer term in cost function
sym_f
(x, u[, t])sym_g
(t0, tF, x0, xF)Boundary constraints
sym_h
(x, u, t)Dynamical path constraint of the form: (See (Kel17, Eq.(1.3)))
Attributes
action_labels
action_size
action_space
observation_space
state_labels
state_size