diff --git a/pyoptsparse/pyALPSO/pyALPSO.py b/pyoptsparse/pyALPSO/pyALPSO.py index 2362a6ad..6268618c 100644 --- a/pyoptsparse/pyALPSO/pyALPSO.py +++ b/pyoptsparse/pyALPSO/pyALPSO.py @@ -192,9 +192,7 @@ def objconfunc(x): self.optProb.comm.bcast(-1, root=0) # Store Results - sol_inform = {} - sol_inform["value"] = None - sol_inform["text"] = None + sol_inform = {"value": "", "text": ""} # Create the optimization solution sol = self._createSolution(optTime, sol_inform, opt_f, opt_x) diff --git a/pyoptsparse/pyCONMIN/pyCONMIN.py b/pyoptsparse/pyCONMIN/pyCONMIN.py index 7d010a50..9261a0a6 100644 --- a/pyoptsparse/pyCONMIN/pyCONMIN.py +++ b/pyoptsparse/pyCONMIN/pyCONMIN.py @@ -241,9 +241,7 @@ def cnmngrad(n1, n2, x, f, g, ct, df, a, ic, nac): self.optProb.comm.bcast(-1, root=0) # Store Results - sol_inform = {} - sol_inform["value"] = None - sol_inform["text"] = None + sol_inform = {"value": "", "text": ""} # Create the optimization solution sol = self._createSolution(optTime, sol_inform, ff, xs) diff --git a/pyoptsparse/pyNSGA2/pyNSGA2.py b/pyoptsparse/pyNSGA2/pyNSGA2.py index 9ed871ec..6b0cc302 100644 --- a/pyoptsparse/pyNSGA2/pyNSGA2.py +++ b/pyoptsparse/pyNSGA2/pyNSGA2.py @@ -181,9 +181,7 @@ def objconfunc(nreal, nobj, ncon, x, f, g): self.optProb.comm.bcast(-1, root=0) # Store Results - sol_inform = {} - sol_inform["value"] = None - sol_inform["text"] = None + sol_inform = {"value": "", "text": ""} xstar = [0.0] * n for i in range(n): diff --git a/pyoptsparse/pyParOpt/ParOpt.py b/pyoptsparse/pyParOpt/ParOpt.py index f08e33b4..e0e15be4 100644 --- a/pyoptsparse/pyParOpt/ParOpt.py +++ b/pyoptsparse/pyParOpt/ParOpt.py @@ -235,9 +235,7 @@ def evalObjConGradient(self, x, g, A): # Create the optimization solution. Note that the signs on the multipliers # are switch since ParOpt uses a formulation with c(x) >= 0, while pyOpt # uses g(x) = -c(x) <= 0. Therefore the multipliers are reversed. - sol_inform = {} - sol_inform["value"] = None - sol_inform["text"] = None + sol_inform = {"value": "", "text": ""} # If number of constraints is zero, ParOpt returns z as None. # Thus if there is no constraints, should pass an empty list