Replies: 3 comments 7 replies
-
|
Note that I have introduced some labels for the function state!(ocp::OptimalControlModel, n::Dimension; labels::Vector{String}=_state_labels(n))
ocp.state_dimension = n
ocp.state_labels = labels
end
function control!(ocp::OptimalControlModel, m::Dimension; labels::Vector{String}=_control_labels(m))
ocp.control_dimension = m
ocp.control_labels = labels
endThe default values are ctindice(i::Integer) = '\u2080' + i
function ctindices(i::Integer)
s=""
for d ∈ digits(i)
s = ctindice(d) * s
end
return s
end
_state_labels(n::Dimension) = n==1 ? ["x"] : [ "x" * ctindices(i) for i ∈ range(1, n)]
_control_labels(m::Dimension) = m==1 ? ["u"] : [ "u" * ctindices(i) for i ∈ range(1, m)] |
Beta Was this translation helpful? Give feedback.
-
|
@ocots NB. Do the same for |
Beta Was this translation helpful? Give feedback.
-
|
Question: do you want me to create a new |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Could be interesting to use the functional description (see description below, still needs to be documented) as an IR (= intermediate representation) for the abstract description (see also below):
ocp, de facto using calls to the functional descriptionocp(rather than the type itself) to reimplement her own primitives (constraint...)Beta Was this translation helpful? Give feedback.
All reactions