Skip to content

Releases: control-toolbox/CTBase.jl

v0.7.12

31 Mar 20:35
Compare
Choose a tag to compare
  • Fix bug from ct_repl
  • Fix warning from plots

v0.7.9

28 Jul 03:47
Compare
Choose a tag to compare

Fix warning message: "replacing docs"

v0.7.0

20 May 16:48
Compare
Choose a tag to compare

Big update:

  • More checks for the user when defining an OptimalControlModel with the functional methods. However, need to improve the tests since we want minimal tests. Too defensive for the moment.

  • Remove MakeDescription. The usage now is the following:

function solve(description::Symbol...)
    method = getFullDescription(description, list_of_methods)
    ...
end
  • functions.jl: a Variable argument have been added, see the doc (which may need to be updated). You can always give the complete list of arguments when calling a function, that is you can pass an empty variable even if the problem is not variable dependent. Pass v = Real[] as the empty variable.

  • No more scalar / vectorial usage. Only autonomous / nonautonomous and variable dependent or not.

julia> ocp = Model()
julia> ocp = Model(autonomous=false)
julia> ocp = Model(autonomous=false, variable=true)
  • The fields initial_time and final_time of an OptimalControlModel are always set when the function time! is called. Either it is a Real if the associated time is fixed or an Index if it is free. If tf = Index(2) for instance, it means that tf is the second component of the variable.

  • You can check the dependences or else with:

is_min(ocp)
is_max(ocp)
is_time_independent(ocp)
is_variable_dependent(ocp)
  • Now, use dynamics! to set the dynamics.

  • Box constraints for the variable and others are available now:

julia> (ξl, ξ, ξu), (ηl, η, ηu), (ψl, ψ, ψu), (ϕl, ϕ, ϕu), (θl, θ, θu),
    (ul, uind, uu), (xl, xind, xu), (vl, vind, vu) = nlp_constraints(ocp)
  • You can define you OptimalControlModel in an abstract way, close to Mathematics!
@def o begin
    t  [ 0, 1 ], time
    x  R², state
    u  R, control
    r = x₁
    v = x₂
    w = r + 2v
    r(0) == 0,    (1)
    v(0) == 1,    (♡)
    (t) == [ v(t), w(t)^2 ]
    ( u(t)^2 + x₁(t) )  min
end
  • You can use plot! to plot a second solution over a first one. You can also pass an option to plot the norm of the control. Useful for orbital transfers for instance. The doc is not yet up to date.

  • New print of an ocp showing the abstract form if possible and showing a table summarizing what is set or not.

┌───────┬───────┬─────────┬──────────┬──────────┬───────────┬─────────────┐
│ times │ state │ control │ variable │ dynamics │ objective │ constraints │
├───────┼───────┼─────────┼──────────┼──────────┼───────────┼─────────────┤
│    ✅ │    ✅ │      ❌ │       ✅ │       ✅ │        ❌ │          ✅ │
└───────┴───────┴─────────┴──────────┴──────────┴───────────┴─────────────┘
  • A new interactive ct REPL is introduced to define pleasantly your ocp. For the moment, you need:
using CTBase
CTBase.__init_repl()
>
ct>
  • A new function to copy data from an OptimalControlProblem to an OptimalControlSolution is provided. It is useful to keep track of some data for plots for instance.

v0.6.0

04 Apr 19:02
Compare
Choose a tag to compare
  • model getters removed
  • state_labels -> state_names
  • control_labels -> control_names
  • add unit tests

v0.5.1

21 Mar 10:08
Compare
Choose a tag to compare
  • fix bug lb, ub
  • replace Model constructor
function Model(; time_dependence=_ocp_time_dependence(), dimension_usage=_ocp_dimension_usage()) 
    return OptimalControlModel{time_dependence, dimension_usage}()
end
  • rename dimension_usage instead of scalar_vectorial

v0.5.0

20 Mar 17:04
Compare
Choose a tag to compare
  • Box constraints
  • Move CtParser to CTBase
  • rm AbstractTrees
  • add label for time
  • add ylim handling in plots when small gap between min and max

v0.4.0

01 Mar 16:26
Compare
Choose a tag to compare

New OptimalControlSolution and associated plot.

v0.3.2

25 Feb 12:18
Compare
Choose a tag to compare

Scalar / vectorial usage added for the functions and the optimal control model.

v0.3.0

21 Feb 15:55
Compare
Choose a tag to compare

add scalar/vectorial usage

v0.2.0

19 Feb 12:30
Compare
Choose a tag to compare

Merge ControlToolboxTools and CTBase