Skip to content

Commit

Permalink
foo
Browse files Browse the repository at this point in the history
  • Loading branch information
ocots committed Dec 6, 2024
1 parent c2ce2b1 commit 73e838f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 4 additions & 0 deletions src/CTBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -326,4 +326,8 @@ export @def
export ct_repl, ct_repl_update_model
isdefined(Base, :active_repl) && ct_repl()

# load and save solution
export export_ocp_solution
export import_ocp_solution

end
9 changes: 3 additions & 6 deletions src/optimal_control_solution-type.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,10 @@ $(TYPEDFIELDS)
mult_control_box_upper::Union{Nothing, Function} = nothing
end

export export_ocp_solution
export import_ocp_solution

# placeholders (see extension CTBaseLoadSave)
function export_ocp_solution(args...; kwargs...)
error("Requires JLD2 and JSON3 packages")
function export_ocp_solution(args...; kwargs...)
throw(ExtensionError(:JLD2, :JSON3))
end
function import_ocp_solution(args...; kwargs...)
error("Requires JLD2 and JSON3 packages")
throw(ExtensionError(:JLD2, :JSON3))
end

0 comments on commit 73e838f

Please sign in to comment.