Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ocots committed Aug 25, 2024
1 parent 8c6c4d0 commit 13ba723
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/CTDirectExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ $(TYPEDSIGNATURES)
Export OCP solution in JSON format
"""
# +++ redo this, start with basics
function CTDirect.export_ocp_solution(sol::OptimalControlSolution; filename_prefix="solution")
# +++ redo this, start with basics
open(filename_prefix * ".json", "w") do io
#JSON3.pretty(io, CTDirect.OCPDiscreteSolution(sol))
end
Expand All @@ -45,8 +45,8 @@ $(TYPEDSIGNATURES)
Read OCP solution in JSON format
"""
# +++ add constructor from json blob
function CTDirect.import_ocp_solution(filename_prefix="solution")
# +++ add constructor from json blob
json_string = read(filename_prefix * ".json", String)
return OptimalControlSolution(JSON3.read(json_string))
end
Expand Down

0 comments on commit 13ba723

Please sign in to comment.