Load / save OCP solution moved from CTDirect to CTBase #312
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CTBaseLoadSave
with weakdeps JLD2 and JSON3, adds 2 functionsimport_ocp_solution
andexport_ocp_solution
that allow to load and save OCP solutions. JLD2 format (binary) uses a functional solution while JSON3 format (text) uses a discrete solution.optimal-control-solution-types.jl
but could be moved anywhere.test-solution.jl
. Note that the JSON format requires the OCP solution to have a time grid (there is currently no default grid, just nothing).optimal-control-solution-setters.jl
. This one is used by CTDirect and the import function when using JSON format. It would also be used to import any solution in vector form. Note: the original is still present inCTDirect
and will be removed when this version ofCTBase
is released.