File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -858,7 +858,9 @@ function postProcess!(n;kwargs...)
858
858
n. r. ocp. tst = n. r. ocp. tctr
859
859
end
860
860
861
+ stateDataExists = false
861
862
if n. r. ocp. status== :Optimal || (! n. s. mpc. onlyOptimal && n. s. mpc. on && isequal (n. mpc. v. evalNum,1 ))
863
+ stateDataExists = true
862
864
if (! isequal (n. r. ocp. status,:Optimal ) && n. s. mpc. on && isequal (n. mpc. v. evalNum,1 ))
863
865
warn (" There is no previous :Optimal solution to use since isequal(n.mpc.v.evalNum,1). \n
864
866
Attemting to extract: " ,n. r. ocp. status," solution. \n
@@ -944,7 +946,7 @@ function postProcess!(n;kwargs...)
944
946
end
945
947
end
946
948
end
947
- if n. s. ocp. save
949
+ if n. s. ocp. save && stateDataExists
948
950
push! (n. r. ocp. dfs,dvs2dfs (n))
949
951
push! (n. r. ocp. dfsCon,con2dfs (n))
950
952
if n. s. ocp. interpolationOn
You can’t perform that action at this time.
0 commit comments