File tree 1 file changed +4
-15
lines changed
1 file changed +4
-15
lines changed Original file line number Diff line number Diff line change @@ -113,29 +113,18 @@ We can export (or save) the solution in a Julia `.jld2` data file and reload it
113
113
114
114
``` @example main
115
115
using JLD2
116
- using JSON3 # hide
117
-
118
- using Suppressor # hide
119
- @suppress_err begin # hide
120
- export_ocp_solution(sol; filename_prefix="my_solution")
121
- end # hide
122
-
123
- sol_jld = import_ocp_solution(ocp; filename_prefix="my_solution")
124
-
116
+ export_ocp_solution(sol; filename="my_solution")
117
+ sol_jld = import_ocp_solution(ocp; filename="my_solution")
125
118
println("Objective from computed solution: ", objective(sol))
126
119
println("Objective from imported solution: ", objective(sol_jld))
127
120
```
128
121
129
122
### JSON
130
123
131
124
``` @example main
132
- # load additional modules
133
125
using JSON3
134
-
135
- export_ocp_solution(sol; filename_prefix="my_solution", format=:JSON)
136
-
137
- sol_json = import_ocp_solution(ocp; filename_prefix="my_solution", format=:JSON)
138
-
126
+ export_ocp_solution(sol; filename="my_solution", format=:JSON)
127
+ sol_json = import_ocp_solution(ocp; filename="my_solution", format=:JSON)
139
128
println("Objective from computed solution: ", objective(sol))
140
129
println("Objective from imported solution: ", objective(sol_json))
141
130
```
You can’t perform that action at this time.
0 commit comments