File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
pyomo/contrib/solver/solvers/knitro Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -203,6 +203,11 @@ def _get_items(self, item_type: type[ItemType]) -> Sequence[ItemType]:
203203
204204 @staticmethod
205205 def _get_solution_status (status : int ) -> SolutionStatus :
206+ """
207+ Map KNITRO status codes to Pyomo SolutionStatus values.
208+
209+ See https://www.artelys.com/app/docs/knitro/3_referenceManual/returnCodes.html
210+ """
206211 if status in {0 , - 100 }:
207212 return SolutionStatus .optimal
208213 elif - 101 >= status >= - 199 or - 400 >= status >= - 409 :
@@ -214,6 +219,11 @@ def _get_solution_status(status: int) -> SolutionStatus:
214219
215220 @staticmethod
216221 def _get_termination_condition (status : int ) -> TerminationCondition :
222+ """
223+ Map KNITRO status codes to Pyomo TerminationCondition values.
224+
225+ See https://www.artelys.com/app/docs/knitro/3_referenceManual/returnCodes.html
226+ """
217227 if status in {0 , - 100 }:
218228 return TerminationCondition .convergenceCriteriaSatisfied
219229 elif status == - 202 :
You can’t perform that action at this time.
0 commit comments