Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace copy! by a constructor #192

Closed
ocots opened this issue Aug 6, 2024 · 2 comments
Closed

Replace copy! by a constructor #192

ocots opened this issue Aug 6, 2024 · 2 comments
Assignees

Comments

@ocots
Copy link
Member

ocots commented Aug 6, 2024

copy!(sol, ocp) # +++ use constructor with ocp as argument instead of this ?

Use the OptimalControlSolution constructor when available in the future release.

function OptimalControlSolution(ocp::OptimalControlModel;
    state::Function,
    control::Function,
    objective::ctNumber,
    costate::Union{Nothing, Function}=nothing,
    times::Union{Nothing, TimesDisc}=nothing,
    variable::Union{Nothing, Variable}=nothing,
    iterations::Union{Nothing, Integer}=nothing,
    stopping::Union{Nothing, Symbol}=nothing,
    message::Union{Nothing, String}=nothing,
    success::Union{Nothing, Bool}=nothing,
    infos::Dict{Symbol, Any}=Dict{Symbol, Any}())::OptimalControlSolution

...

end
@ocots
Copy link
Member Author

ocots commented Aug 7, 2024

The constructor should require a variable if the problem is NonFixed.

@PierreMartinon
Copy link
Member

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants