From 9bebac61b68e8210383b28eb1341f6ac206fdca7 Mon Sep 17 00:00:00 2001 From: "Stephen J. Maher" Date: Fri, 2 Oct 2026 11:32:51 +0100 Subject: [PATCH 1/3] extends solverstatuscodes to include locally optimal and infeasible --- ipet/Key.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ipet/Key.py b/ipet/Key.py index c408435..90218ff 100644 --- a/ipet/Key.py +++ b/ipet/Key.py @@ -97,6 +97,7 @@ class SolverStatusCodes: - found the optimal solution - found, that the problem was infeasible + - found a locally optimal solution or a locally infeasible point (no proof of global optimality or infeasibility) - hit a limit of memory, time or nodes, or it could have simply been cancelled by the user @@ -110,6 +111,8 @@ class SolverStatusCodes: MemoryLimit = 3 NodeLimit = 4 GapLimit = 5 + LocallyOptimal = 6 + LocallyInfeasible = 7 Unbounded = 110 InfOrUnbounded = 120 Interrupted = 1000 @@ -173,6 +176,8 @@ def getWorstStatus(*args): SolverStatusCodes.Crashed : ProblemStatusCodes.FailAbort, SolverStatusCodes.Infeasible : ProblemStatusCodes.Ok, SolverStatusCodes.Optimal : ProblemStatusCodes.Ok, + SolverStatusCodes.LocallyOptimal : ProblemStatusCodes.Ok, + SolverStatusCodes.LocallyInfeasible : ProblemStatusCodes.Ok, SolverStatusCodes.Unbounded : ProblemStatusCodes.Ok, SolverStatusCodes.InfOrUnbounded : ProblemStatusCodes.Ok, SolverStatusCodes.TimeLimit : ProblemStatusCodes.TimeLimit, From 0031a0a0163da13523b84f7ac6d26c76d38267a4 Mon Sep 17 00:00:00 2001 From: "Stephen J. Maher" Date: Fri, 2 Oct 2026 11:33:21 +0100 Subject: [PATCH 2/3] adds CONOPT parser --- ipet/parsing/ReaderManager.py | 6 ++- ipet/parsing/Solver.py | 92 ++++++++++++++++++++++++++++++++++- test/SolverTest.py | 69 +++++++++++++++++++++++++- 3 files changed, 163 insertions(+), 4 deletions(-) diff --git a/ipet/parsing/ReaderManager.py b/ipet/parsing/ReaderManager.py index 0a631a5..d89316b 100644 --- a/ipet/parsing/ReaderManager.py +++ b/ipet/parsing/ReaderManager.py @@ -23,7 +23,8 @@ from ipet.concepts.Manager import Manager from ipet.concepts.IPETNode import IpetNode from ipet.parsing.Solver import SCIPSolver, CbcSolver, XpressSolver, GurobiSolver, \ - CplexSolver, FiberSCIPSolver, MatlabSolver, MosekSolver, MipclSolver, NuoptSolver, SasSolver + CplexSolver, FiberSCIPSolver, MatlabSolver, MosekSolver, MipclSolver, NuoptSolver, SasSolver, \ + ConoptSolver from ipet.misc import misc # CbcSolver, CouenneSolver, \ # XpressSolver, GurobiSolver, CplexSolver @@ -79,7 +80,8 @@ def addSolvers(self): MosekSolver(), MipclSolver(), NuoptSolver(), - SasSolver() + SasSolver(), + ConoptSolver() ]: self.addSolver(s) diff --git a/ipet/parsing/Solver.py b/ipet/parsing/Solver.py index afed555..4e2b132 100644 --- a/ipet/parsing/Solver.py +++ b/ipet/parsing/Solver.py @@ -41,7 +41,8 @@ class Solver(): codes_nobound = set( [Key.SolverStatusCodes.Crashed, Key.SolverStatusCodes.Readerror, - Key.SolverStatusCodes.Infeasible] + Key.SolverStatusCodes.Infeasible, + Key.SolverStatusCodes.LocallyInfeasible] ) def __init__(self, @@ -1097,3 +1098,92 @@ class SasSolver(Solver): def __init__(self, **kw): super(SasSolver, self).__init__(**kw) + +class ConoptSolver(Solver): + '''Solver class for CONOPT + + Data is read from the "Solving Statistics" block(s). If a log contains + several solves, status and objective are taken from the last block, + iterations and time are summed and memory is the maximum over all blocks. + ''' + + solverId = "CONOPT" + recognition_expr = re.compile(r"^\s*C O N O P T\s+version") + version_expr = re.compile(r"^\s*C O N O P T\s+version (\S+)") + primalbound_expr = re.compile(r"^ Objective Value\s+(\S+)") + + statistics_expr = re.compile(r"^ Solving Statistics") + modelstatus_expr = re.compile(r"^ Model Status\s+(\d+)") + solverstatus_expr = re.compile(r"^ Solver Status\s+(\d+)") + iterations_expr = re.compile(r"^ Iteration Count\s+(\d+)") + time_expr = re.compile(r"^ CONOPT time Total\s+(\S+) seconds") + memmaxused_expr = re.compile(r"^ Memory: Max used =\s+(\S+) Mbytes") + memallocated_expr = re.compile(r"^ Total Allocated =\s+(\S+) Mbytes") + + # GAMS model status codes (used if the solver status is 1, NORMAL COMPLETION) + modelstatusmap = {1 : Key.SolverStatusCodes.Optimal, # OPTIMAL + 2 : Key.SolverStatusCodes.LocallyOptimal, # LOCALLY OPTIMAL + 15 : Key.SolverStatusCodes.Optimal, # SOLVED UNIQUE + 16 : Key.SolverStatusCodes.Optimal, # SOLVED + 3 : Key.SolverStatusCodes.Unbounded, # UNBOUNDED + 18 : Key.SolverStatusCodes.Unbounded, # UNBOUNDED - NO SOLUTION + 4 : Key.SolverStatusCodes.Infeasible, # INFEASIBLE + 5 : Key.SolverStatusCodes.LocallyInfeasible, # LOCALLY INFEASIBLE + 19 : Key.SolverStatusCodes.Infeasible # INFEASIBLE - NO SOLUTION + } + + # GAMS solver status codes, all others are treated as crashes + solverstatuscodemap = {2 : Key.SolverStatusCodes.NodeLimit, # ITERATION INTERRUPT + 3 : Key.SolverStatusCodes.TimeLimit, # RESOURCE INTERRUPT + 8 : Key.SolverStatusCodes.Interrupted # USER INTERRUPT + } + + def __init__(self, **kw): + super(ConoptSolver, self).__init__(**kw) + + def reset(self): + Solver.reset(self) + self.inStatistics = False + self.modelstatus = None + + def readLine(self, line : str): + if self.statistics_expr.match(line): + self.inStatistics = True + elif self.recognition_expr.match(line): + self.inStatistics = False + self.extractVersion(line) + elif self.inStatistics: + Solver.readLine(self, line) + + def extractStatus(self, line : str): + m = self.modelstatus_expr.match(line) + if m: + self.modelstatus = int(m.group(1)) + return + + m = self.solverstatus_expr.match(line) + if m: + solverstatus = int(m.group(1)) + if solverstatus == 1: + status = self.modelstatusmap.get(self.modelstatus, Key.SolverStatusCodes.Crashed) + else: + status = self.solverstatuscodemap.get(solverstatus, Key.SolverStatusCodes.Crashed) + self.addData(Key.SolverStatus, status) + + def addSum(self, line : str, expr, key : str, datatype : type = float): + m = expr.match(line) + if m: + self.addData(key, (self.getData(key) or 0) + datatype(m.group(1))) + + def addMax(self, line : str, expr, key : str): + m = expr.match(line) + if m: + value = float(m.group(1)) + previous = self.getData(key) + self.addData(key, value if previous is None else max(previous, value)) + + def extractOptionalInformation(self, line : str): + self.addSum(line, self.iterations_expr, "Iterations", int) + self.addSum(line, self.time_expr, Key.SolvingTime) + self.addMax(line, self.memmaxused_expr, "MemoryMaxUsed") + self.addMax(line, self.memallocated_expr, "MemoryAllocated") diff --git a/test/SolverTest.py b/test/SolverTest.py index caa5d89..17d8253 100644 --- a/test/SolverTest.py +++ b/test/SolverTest.py @@ -5,7 +5,8 @@ ''' import unittest import os -from ipet.parsing.Solver import SCIPSolver, GurobiSolver, CplexSolver, CbcSolver, XpressSolver, MipclSolver +from ipet.parsing.Solver import SCIPSolver, GurobiSolver, CplexSolver, CbcSolver, XpressSolver, MipclSolver, \ + ConoptSolver from ipet import Key DATADIR = os.path.join(os.path.dirname(__file__), "data") @@ -604,6 +605,71 @@ class SolverTest(unittest.TestCase): Key.SolverStatus: Key.SolverStatusCodes.MemoryLimit }, { Key.PrimalBound: 1e+20, Key.DualBound: 13.0} ], + "conopt439-tutorial" : [ { + Key.Solver: "CONOPT", + Key.Version: "4.39.0", + "Iterations": 5, + Key.SolverStatus: Key.SolverStatusCodes.LocallyOptimal }, { + Key.PrimalBound: 0.572942971858, + Key.SolvingTime: 0.001, + "MemoryMaxUsed": 0.02} ], + "conopt439-const01" : [ { + Key.Solver: "CONOPT", + Key.Version: "4.39.0", + "Iterations": 1, + Key.SolverStatus: Key.SolverStatusCodes.Optimal }, { + Key.PrimalBound: 15.0, + Key.SolvingTime: 0.001, + "MemoryMaxUsed": 0.02} ], + "conopt439-const12" : [ { + Key.Solver: "CONOPT", + Key.Version: "4.39.0", + "Iterations": 0, + Key.SolverStatus: Key.SolverStatusCodes.Infeasible }, { + Key.PrimalBound: 8.0, + Key.SolvingTime: 0.0, + "MemoryMaxUsed": 0.01} ], + # const12 with the model status changed to LOCALLY INFEASIBLE (no sample log reports it) + "conopt439-const12-localinf" : [ { + Key.Solver: "CONOPT", + Key.Version: "4.39.0", + "Iterations": 0, + Key.SolverStatus: Key.SolverStatusCodes.LocallyInfeasible }, { + Key.PrimalBound: 8.0, + Key.SolvingTime: 0.0, + "MemoryMaxUsed": 0.01} ], + "conopt439-largeres1" : [ { + Key.Solver: "CONOPT", + Key.Version: "4.39.0", + "Iterations": 0, + Key.SolverStatus: Key.SolverStatusCodes.Crashed }, { + Key.PrimalBound: 0.0, + Key.SolvingTime: 0.0, + "MemoryMaxUsed": 0.0} ], + "conopt439-pinadd" : [ { + Key.Solver: "CONOPT", + Key.Version: "4.39.0", + "Iterations": 36, + Key.SolverStatus: Key.SolverStatusCodes.LocallyOptimal }, { + Key.PrimalBound: 1386.235482826, + Key.SolvingTime: 0.018, + "MemoryMaxUsed": 0.21} ], + "conopt439-mono07" : [ { + Key.Solver: "CONOPT", + Key.Version: "4.39.0", + "Iterations": 6, + Key.SolverStatus: Key.SolverStatusCodes.Infeasible }, { + Key.PrimalBound: 1000000000000000.0, + Key.SolvingTime: 0.004, + "MemoryMaxUsed": 0.02} ], + "conopt439-leastsq" : [ { + Key.Solver: "CONOPT", + Key.Version: "4.39.0", + "Iterations": None, + Key.SolverStatus: Key.SolverStatusCodes.Crashed }, { + Key.PrimalBound: None, + Key.SolvingTime: None, + "MemoryMaxUsed": None} ], } solvers = [] @@ -615,6 +681,7 @@ def setUp(self): self.solvers.append([CbcSolver(), "CBC"]) self.solvers.append([XpressSolver(), "XPRESS"]) self.solvers.append([MipclSolver(), "MIPCL"]) + self.solvers.append([ConoptSolver(), "CONOPT"]) self.activeSolver = self.solvers[0][SOLVER] def tearDown(self): From c3c043d8f5cbd6801d64cf7f306add63046782f5 Mon Sep 17 00:00:00 2001 From: "Stephen J. Maher" Date: Fri, 2 Oct 2026 11:40:30 +0100 Subject: [PATCH 3/3] adds conopt test files --- test/data/conopt439-const01.out | 60 +++ test/data/conopt439-const12-localinf.out | 56 +++ test/data/conopt439-const12.out | 56 +++ test/data/conopt439-largeres1.out | 38 ++ test/data/conopt439-leastsq.out | 21 + test/data/conopt439-mono07.out | 515 +++++++++++++++++++++++ test/data/conopt439-pinadd.out | 307 ++++++++++++++ test/data/conopt439-tutorial.out | 60 +++ 8 files changed, 1113 insertions(+) create mode 100644 test/data/conopt439-const01.out create mode 100644 test/data/conopt439-const12-localinf.out create mode 100644 test/data/conopt439-const12.out create mode 100644 test/data/conopt439-largeres1.out create mode 100644 test/data/conopt439-leastsq.out create mode 100644 test/data/conopt439-mono07.out create mode 100644 test/data/conopt439-pinadd.out create mode 100644 test/data/conopt439-tutorial.out diff --git a/test/data/conopt439-const01.out b/test/data/conopt439-const01.out new file mode 100644 index 0000000..ce947c6 --- /dev/null +++ b/test/data/conopt439-const01.out @@ -0,0 +1,60 @@ + + + C O N O P T version 4.39.0 + Copyright (C) GAMS Software GmbH + GAMS Development Corporation + + Will use up to 4 threads. + + + ** No valid license -- continue in small-scale demo mode. + Contact GAMS at sales@gams.com to purchase a license. + + ** Cannot open option file 'const01.opt'. + + The user model has 2 constraints and 4 variables + with 6 Jacobian elements, 4 of which are nonlinear. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 0 0 5.0000000000E+00 (Input point) + + The pre-triangular part of the model has 0 constraints and 3 variables. + The post-triangular part of the model has 2 constraints and 1 variables. + + Preprocessed model is empty. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 0.0000000000E+00 (Full preprocessed model) + 0.0000000000E+00 (After scaling) + + ** Feasible solution. Value of objective = 15.0000000000 + + Iter Phase Ninf Objective RGmax NSB Step InItr MX OK + 1 4 1.5000000000E+01 0.0E+00 0 + + ** Optimal solution. There are no superbasic variables. + + + CONOPT has finished optimizing. + Model status = 1 + Solver status = 1 + Iteration count= 1 + Objective value= 15.000000000000000 + + Solving Statistics + ------------------ + Model Status 1 OPTIMAL + Solver Status 1 NORMAL COMPLETION + Iteration Count 1 + Objective Value 1.500000000000E+01 + + CONOPT time Total 1.000E-03 seconds + of which: Function evaluations 0.00 =0.% + 1st Derivative evaluations 0.00 =0.% + Interval derivative evals 0.00 =0.% + + Memory: Max used = 0.02 Mbytes + Total Allocated = 0.02 Mbytes + + + End of const01 example. Return code= 0 diff --git a/test/data/conopt439-const12-localinf.out b/test/data/conopt439-const12-localinf.out new file mode 100644 index 0000000..3b0dfb9 --- /dev/null +++ b/test/data/conopt439-const12-localinf.out @@ -0,0 +1,56 @@ + + + C O N O P T version 4.39.0 + Copyright (C) GAMS Software GmbH + GAMS Development Corporation + + Will use up to 4 threads. + + + ** No valid license -- continue in small-scale demo mode. + Contact GAMS at sales@gams.com to purchase a license. + + ** Cannot open option file 'const12.opt'. + + The user model has 2 constraints and 3 variables + with 5 Jacobian elements, 3 of which are nonlinear. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 0 0 1.5108256238E+00 (Input point) + + ** An equation in the pre-triangular part of the model cannot + be solved because the infeasibility is positive after all + variables in the constraint have been moved to best bound. + Some bounds may have been derived from other constraints. + + + The pre-triangular part of the model has 1 constraints and 3 variables. + The post-triangular part of the model has 1 constraints and 0 variables. + + ** Infeasible solution. The Preprocessor has determined that the model + is infeasible. + + + CONOPT has finished optimizing. + Model status = 4 + Solver status = 1 + Iteration count= 0 + Objective value= 8.0000000000000000 + + Solving Statistics + ------------------ + Model Status 5 LOCALLY INFEASIBLE + Solver Status 1 NORMAL COMPLETION + Iteration Count 0 + Objective Value 8.000000000000E+00 + + CONOPT time Total 0.00 seconds + of which: Function evaluations 0.00 =0.% + 1st Derivative evaluations 0.00 =0.% + Interval derivative evals 0.00 =0.% + + Memory: Max used = 0.01 Mbytes + Total Allocated = 0.01 Mbytes + + + End of const12 example. Return code= 0 diff --git a/test/data/conopt439-const12.out b/test/data/conopt439-const12.out new file mode 100644 index 0000000..f6c78e2 --- /dev/null +++ b/test/data/conopt439-const12.out @@ -0,0 +1,56 @@ + + + C O N O P T version 4.39.0 + Copyright (C) GAMS Software GmbH + GAMS Development Corporation + + Will use up to 4 threads. + + + ** No valid license -- continue in small-scale demo mode. + Contact GAMS at sales@gams.com to purchase a license. + + ** Cannot open option file 'const12.opt'. + + The user model has 2 constraints and 3 variables + with 5 Jacobian elements, 3 of which are nonlinear. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 0 0 1.5108256238E+00 (Input point) + + ** An equation in the pre-triangular part of the model cannot + be solved because the infeasibility is positive after all + variables in the constraint have been moved to best bound. + Some bounds may have been derived from other constraints. + + + The pre-triangular part of the model has 1 constraints and 3 variables. + The post-triangular part of the model has 1 constraints and 0 variables. + + ** Infeasible solution. The Preprocessor has determined that the model + is infeasible. + + + CONOPT has finished optimizing. + Model status = 4 + Solver status = 1 + Iteration count= 0 + Objective value= 8.0000000000000000 + + Solving Statistics + ------------------ + Model Status 4 INFEASIBLE + Solver Status 1 NORMAL COMPLETION + Iteration Count 0 + Objective Value 8.000000000000E+00 + + CONOPT time Total 0.00 seconds + of which: Function evaluations 0.00 =0.% + 1st Derivative evaluations 0.00 =0.% + Interval derivative evals 0.00 =0.% + + Memory: Max used = 0.01 Mbytes + Total Allocated = 0.01 Mbytes + + + End of const12 example. Return code= 0 diff --git a/test/data/conopt439-largeres1.out b/test/data/conopt439-largeres1.out new file mode 100644 index 0000000..908d4ba --- /dev/null +++ b/test/data/conopt439-largeres1.out @@ -0,0 +1,38 @@ + + + C O N O P T version 4.39.0 + Copyright (C) GAMS Software GmbH + GAMS Development Corporation + + Will use up to 4 threads. + + + ** No valid license -- continue in small-scale demo mode. + Contact GAMS at sales@gams.com to purchase a license. + + ** Cannot open option file 'largeres.opt'. + + ** Function value overflow in the initial point. + + + Solving Statistics + ------------------ + Model Status 13 NO SOLUTION + Solver Status 13 ERROR SYSTEM FAILURE + Iteration Count 0 + Objective Value 0.000000000000E+00 + + CONOPT time Total 0.00 seconds + of which: Function evaluations 0.00 =0.% + 1st Derivative evaluations 0.00 =0.% + + Memory: Max used = 0.00 Mbytes + Total Allocated = 0.00 Mbytes + + +CONOPT has finished Optimizing +Model status = 13 +Solver status = 13 +Iteration count = 0 +Objective value = 0.000000 +After solving. COI_Error =400 diff --git a/test/data/conopt439-leastsq.out b/test/data/conopt439-leastsq.out new file mode 100644 index 0000000..eb14824 --- /dev/null +++ b/test/data/conopt439-leastsq.out @@ -0,0 +1,21 @@ + + + C O N O P T version 4.39.0 + Copyright (C) GAMS Software GmbH + GAMS Development Corporation + + Will use up to 4 threads. + + + ** No valid license -- continue in small-scale demo mode. + Contact GAMS at sales@gams.com to purchase a license. + + + ** Limits for Demo Version Exceeded. + + The demo limits for nonlinear programs are: + + 1000 variables + 1000 constraints + +End of Least Squares Example 1. Return code =110 diff --git a/test/data/conopt439-mono07.out b/test/data/conopt439-mono07.out new file mode 100644 index 0000000..73f53b3 --- /dev/null +++ b/test/data/conopt439-mono07.out @@ -0,0 +1,515 @@ + + + C O N O P T version 4.39.0 + Copyright (C) GAMS Software GmbH + GAMS Development Corporation + + Will use up to 4 threads. + + + ** No valid license -- continue in small-scale demo mode. + Contact GAMS at sales@gams.com to purchase a license. + + ** Cannot open option file 'Mono07.opt'. + + The user model has 1 constraints and 1 variables + with 1 Jacobian elements, 1 of which are nonlinear. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 0 0 2.5000000000E+00 (Input point) + + ** An equation in the pre-triangular part of the model cannot + be solved because the critical variable has reached 'Infinity'. + Largest legal value (Lim_Variable) is 1.00E+15 + + + The pre-triangular part of the model has 1 constraints and variables. + + ** Infeasible solution. The Preprocessor has determined that the model + is infeasible. + + + CONOPT has finished optimizing. + Model status = 4 + Solver status = 1 + Iteration count= 0 + Objective value= -1000000000000000.0 + + Solving Statistics + ------------------ + Model Status 4 INFEASIBLE + Solver Status 1 NORMAL COMPLETION + Iteration Count 0 + Objective Value -1.000000000000E+15 + + CONOPT time Total 1.000E-03 seconds + of which: Function evaluations 0.00 =0.% + 1st Derivative evaluations 0.00 =0.% + Interval derivative evals 0.00 =0.% + + Memory: Max used = 0.01 Mbytes + Total Allocated = 0.01 Mbytes + + + End of Mono07 example case 1 . Return code= 0 + + + C O N O P T version 4.39.0 + Copyright (C) GAMS Software GmbH + GAMS Development Corporation + + Will use up to 4 threads. + + + ** No valid license -- continue in small-scale demo mode. + Contact GAMS at sales@gams.com to purchase a license. + + ** Cannot open option file 'Mono07.opt'. + + The user model has 1 constraints and 1 variables + with 1 Jacobian elements, 1 of which are nonlinear. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 0 0 2.5000000000E-01 (Input point) + + The pre-triangular part of the model has 1 constraints and variables. + + Preprocessed model is empty. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 0.0000000000E+00 (Full preprocessed model) + 0.0000000000E+00 (After scaling) + + ** Feasible solution. Value of objective = 1.09861228867 + + Iter Phase Ninf Objective RGmax NSB Step InItr MX OK + 1 4 1.0986122887E+00 0.0E+00 0 + + ** Optimal solution. Reduced gradient less than tolerance. + + + CONOPT has finished optimizing. + Model status = 1 + Solver status = 1 + Iteration count= 1 + Objective value= 1.0986122886681091 + + Solving Statistics + ------------------ + Model Status 1 OPTIMAL + Solver Status 1 NORMAL COMPLETION + Iteration Count 1 + Objective Value 1.098612288668E+00 + + CONOPT time Total 1.000E-03 seconds + of which: Function evaluations 0.00 =0.% + 1st Derivative evaluations 0.00 =0.% + Interval derivative evals 0.00 =0.% + + Memory: Max used = 0.02 Mbytes + Total Allocated = 0.02 Mbytes + + + End of Mono07 example case 2 . Return code= 0 + + + C O N O P T version 4.39.0 + Copyright (C) GAMS Software GmbH + GAMS Development Corporation + + Will use up to 4 threads. + + + ** No valid license -- continue in small-scale demo mode. + Contact GAMS at sales@gams.com to purchase a license. + + ** Cannot open option file 'Mono07.opt'. + + The user model has 1 constraints and 1 variables + with 1 Jacobian elements, 1 of which are nonlinear. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 0 0 6.0000000000E-01 (Input point) + + ** An equation in the pre-triangular part of the model cannot + be solved because the critical variable has reached 'Infinity'. + Largest legal value (Lim_Variable) is 1.00E+15 + + + The pre-triangular part of the model has 1 constraints and variables. + + ** Infeasible solution. The Preprocessor has determined that the model + is infeasible. + + + CONOPT has finished optimizing. + Model status = 4 + Solver status = 1 + Iteration count= 0 + Objective value= 1000000000000000.0 + + Solving Statistics + ------------------ + Model Status 4 INFEASIBLE + Solver Status 1 NORMAL COMPLETION + Iteration Count 0 + Objective Value 1.000000000000E+15 + + CONOPT time Total 0.00 seconds + of which: Function evaluations 0.00 =0.% + 1st Derivative evaluations 0.00 =0.% + Interval derivative evals 0.00 =0.% + + Memory: Max used = 0.01 Mbytes + Total Allocated = 0.01 Mbytes + + + End of Mono07 example case 3 . Return code= 0 + + + C O N O P T version 4.39.0 + Copyright (C) GAMS Software GmbH + GAMS Development Corporation + + Will use up to 4 threads. + + + ** No valid license -- continue in small-scale demo mode. + Contact GAMS at sales@gams.com to purchase a license. + + ** Cannot open option file 'Mono07.opt'. + + The user model has 1 constraints and 1 variables + with 1 Jacobian elements, 1 of which are nonlinear. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 0 0 2.5000000000E+00 (Input point) + + ** An equation in the pre-triangular part of the model cannot + be solved because the critical variable has reached 'Infinity'. + Largest legal value (Lim_Variable) is 1.00E+15 + + + The pre-triangular part of the model has 1 constraints and variables. + + ** Infeasible solution. The Preprocessor has determined that the model + is infeasible. + + + CONOPT has finished optimizing. + Model status = 4 + Solver status = 1 + Iteration count= 0 + Objective value= -1000000000000000.0 + + Solving Statistics + ------------------ + Model Status 4 INFEASIBLE + Solver Status 1 NORMAL COMPLETION + Iteration Count 0 + Objective Value -1.000000000000E+15 + + CONOPT time Total 0.00 seconds + of which: Function evaluations 0.00 =0.% + 1st Derivative evaluations 0.00 =0.% + Interval derivative evals 0.00 =0.% + + Memory: Max used = 0.01 Mbytes + Total Allocated = 0.01 Mbytes + + + End of Mono07 example case 4 . Return code= 0 + + + C O N O P T version 4.39.0 + Copyright (C) GAMS Software GmbH + GAMS Development Corporation + + Will use up to 4 threads. + + + ** No valid license -- continue in small-scale demo mode. + Contact GAMS at sales@gams.com to purchase a license. + + ** Cannot open option file 'Mono07.opt'. + + The user model has 1 constraints and 1 variables + with 1 Jacobian elements, 1 of which are nonlinear. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 0 0 0.0000000000E+00 (Input point) + + The pre-triangular part of the model has 1 constraints and 0 variables. + + Preprocessed model has no constraints and 1 variables. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 0.0000000000E+00 (Full preprocessed model) + 0.0000000000E+00 (After scaling) + + ** Feasible solution. Value of objective = 0.00000000000 + + Iter Phase Ninf Objective RGmax NSB Step InItr MX OK + 1 4 1.0986122887E+00 1.0E+00 1 1.0E+00 1 T T + 2 3 1.0986122887E+00 0.0E+00 0 + + ** Optimal solution. There are no superbasic variables. + + + CONOPT has finished optimizing. + Model status = 1 + Solver status = 1 + Iteration count= 2 + Objective value= 1.0986122886681091 + + Solving Statistics + ------------------ + Model Status 1 OPTIMAL + Solver Status 1 NORMAL COMPLETION + Iteration Count 2 + Objective Value 1.098612288668E+00 + + CONOPT time Total 1.000E-03 seconds + of which: Function evaluations 0.00 =0.% + 1st Derivative evaluations 0.00 =0.% + Interval derivative evals 0.00 =0.% + + Memory: Max used = 0.02 Mbytes + Total Allocated = 0.02 Mbytes + + + End of Mono07 example case 5 . Return code= 0 + + + C O N O P T version 4.39.0 + Copyright (C) GAMS Software GmbH + GAMS Development Corporation + + Will use up to 4 threads. + + + ** No valid license -- continue in small-scale demo mode. + Contact GAMS at sales@gams.com to purchase a license. + + ** Cannot open option file 'Mono07.opt'. + + The user model has 1 constraints and 1 variables + with 1 Jacobian elements, 1 of which are nonlinear. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 0 0 0.0000000000E+00 (Input point) + + The pre-triangular part of the model has 1 constraints and 0 variables. + + Preprocessed model has no constraints and 1 variables. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 0.0000000000E+00 (Full preprocessed model) + 0.0000000000E+00 (After scaling) + + ** Feasible solution. Value of objective = 1.000000000000E+15 + + Iter Phase Ninf Objective RGmax NSB Step InItr MX OK + 1 4 1.0000000000E+15 0.0E+00 0 + + ** Unbounded solution. A variable has reached 'Infinity'. + Largest legal value (Lim_Variable) is 1.00E+15 + + + CONOPT has finished optimizing. + Model status = 3 + Solver status = 1 + Iteration count= 1 + Objective value= 1000000000000000.0 + + Solving Statistics + ------------------ + Model Status 3 UNBOUNDED + Solver Status 1 NORMAL COMPLETION + Iteration Count 1 + Objective Value 1.000000000000E+15 + + CONOPT time Total 0.00 seconds + of which: Function evaluations 0.00 =0.% + 1st Derivative evaluations 0.00 =0.% + Interval derivative evals 0.00 =0.% + + Memory: Max used = 0.02 Mbytes + Total Allocated = 0.02 Mbytes + + + End of Mono07 example case 6 . Return code= 0 + + + C O N O P T version 4.39.0 + Copyright (C) GAMS Software GmbH + GAMS Development Corporation + + Will use up to 4 threads. + + + ** No valid license -- continue in small-scale demo mode. + Contact GAMS at sales@gams.com to purchase a license. + + ** Cannot open option file 'Mono07.opt'. + + The user model has 1 constraints and 1 variables + with 1 Jacobian elements, 1 of which are nonlinear. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 0 0 0.0000000000E+00 (Input point) + + The pre-triangular part of the model has 1 constraints and 0 variables. + + Preprocessed model has no constraints and 1 variables. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 0.0000000000E+00 (Full preprocessed model) + 0.0000000000E+00 (After scaling) + + ** Feasible solution. Value of objective = -1.000000000000E+15 + + Iter Phase Ninf Objective RGmax NSB Step InItr MX OK + 1 4 1.0000000000E+15 1.0E+00 1 + + ** Unbounded solution. A variable has reached 'Infinity'. + Largest legal value (Lim_Variable) is 1.00E+15 + + + CONOPT has finished optimizing. + Model status = 3 + Solver status = 1 + Iteration count= 1 + Objective value= 1000000000000000.0 + + Solving Statistics + ------------------ + Model Status 3 UNBOUNDED + Solver Status 1 NORMAL COMPLETION + Iteration Count 1 + Objective Value 1.000000000000E+15 + + CONOPT time Total 0.00 seconds + of which: Function evaluations 0.00 =0.% + 1st Derivative evaluations 0.00 =0.% + Interval derivative evals 0.00 =0.% + + Memory: Max used = 0.02 Mbytes + Total Allocated = 0.02 Mbytes + + + End of Mono07 example case 7 . Return code= 0 + + + C O N O P T version 4.39.0 + Copyright (C) GAMS Software GmbH + GAMS Development Corporation + + Will use up to 4 threads. + + + ** No valid license -- continue in small-scale demo mode. + Contact GAMS at sales@gams.com to purchase a license. + + ** Cannot open option file 'Mono07.opt'. + + The user model has 1 constraints and 1 variables + with 1 Jacobian elements, 1 of which are nonlinear. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 0 0 2.5000000000E-01 (Input point) + + The pre-triangular part of the model has 1 constraints and 0 variables. + + Preprocessed model has no constraints and 1 variables. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 0.0000000000E+00 (Full preprocessed model) + 0.0000000000E+00 (After scaling) + + ** Feasible solution. Value of objective = 1.09861228867 + + Iter Phase Ninf Objective RGmax NSB Step InItr MX OK + 1 4 1.0000000000E+15 1.0E+00 1 + + ** Unbounded solution. A variable has reached 'Infinity'. + Largest legal value (Lim_Variable) is 1.00E+15 + + + CONOPT has finished optimizing. + Model status = 3 + Solver status = 1 + Iteration count= 1 + Objective value= 1000000000000000.0 + + Solving Statistics + ------------------ + Model Status 3 UNBOUNDED + Solver Status 1 NORMAL COMPLETION + Iteration Count 1 + Objective Value 1.000000000000E+15 + + CONOPT time Total 1.000E-03 seconds + of which: Function evaluations 0.00 =0.% + 1st Derivative evaluations 0.00 =0.% + Interval derivative evals 0.00 =0.% + + Memory: Max used = 0.02 Mbytes + Total Allocated = 0.02 Mbytes + + + End of Mono07 example case 8 . Return code= 0 + + + C O N O P T version 4.39.0 + Copyright (C) GAMS Software GmbH + GAMS Development Corporation + + Will use up to 4 threads. + + + ** No valid license -- continue in small-scale demo mode. + Contact GAMS at sales@gams.com to purchase a license. + + ** Cannot open option file 'Mono07.opt'. + + The user model has 1 constraints and 1 variables + with 1 Jacobian elements, 1 of which are nonlinear. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 0 0 6.0000000000E-01 (Input point) + + ** An equation in the pre-triangular part of the model cannot + be solved because the critical variable has reached 'Infinity'. + Largest legal value (Lim_Variable) is 1.00E+15 + + + The pre-triangular part of the model has 1 constraints and variables. + + ** Infeasible solution. The Preprocessor has determined that the model + is infeasible. + + + CONOPT has finished optimizing. + Model status = 4 + Solver status = 1 + Iteration count= 0 + Objective value= 1000000000000000.0 + + Solving Statistics + ------------------ + Model Status 4 INFEASIBLE + Solver Status 1 NORMAL COMPLETION + Iteration Count 0 + Objective Value 1.000000000000E+15 + + CONOPT time Total 0.00 seconds + of which: Function evaluations 0.00 =0.% + 1st Derivative evaluations 0.00 =0.% + Interval derivative evals 0.00 =0.% + + Memory: Max used = 0.01 Mbytes + Total Allocated = 0.01 Mbytes + + + End of Mono07 example case 9 . Return code= 0 diff --git a/test/data/conopt439-pinadd.out b/test/data/conopt439-pinadd.out new file mode 100644 index 0000000..b13258a --- /dev/null +++ b/test/data/conopt439-pinadd.out @@ -0,0 +1,307 @@ + + + C O N O P T version 4.39.0 + Copyright (C) GAMS Software GmbH + GAMS Development Corporation + + Will use up to 4 threads. + + + ** No valid license -- continue in small-scale demo mode. + Contact GAMS at sales@gams.com to purchase a license. + + ** Cannot open option file 'pindyck.opt'. + + The user model has 97 constraints and 112 variables + with 332 Jacobian elements, 80 of which are nonlinear. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 0 0 2.3689109220E+03 (Input point) + + The post-triangular part of the model has 33 constraints and 32 variables. + There are 16 definitional constraints and defined variables. + + Preprocessed model has 48 constraints and 64 variables + with 194 Jacobian elements, 89 of which are nonlinear. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 1.5633022645E+01 (Full preprocessed model) + 2.0750526564E+00 (After scaling) + 6.9212073228E-02 (After adjusting individual variables) + + ** Feasible solution. Value of objective = 1112.18591481 + + Iter Phase Ninf Objective RGmax NSB Step InItr MX OK + 6 4 1.1704862854E+03 1.4E-07 16 1.0E+00 1 F T + 7 4 1.1704862854E+03 5.7E-08 16 + + ** Optimal solution. Reduced gradient less than tolerance. + + +CONOPT has finished Optimizing +Model status = 2 +Solver status = 1 +Iteration count = 7 +Objective value = 1170.486285 +Saving primal solution and status information for T = 16 + + Solving Statistics + ------------------ + Model Status 2 LOCALLY OPTIMAL + Solver Status 1 NORMAL COMPLETION + Iteration Count 7 + Objective Value 1.170486285436E+03 + + CONOPT time Total 6.000E-03 seconds + of which: Function evaluations 0.00 =0.% + 1st Derivative evaluations 1.000E-03 =1.7E+01% + + Memory: Max used = 0.18 Mbytes + Total Allocated = 0.24 Mbytes + +After solving. COI_Error =0 + + + C O N O P T version 4.39.0 + Copyright (C) GAMS Software GmbH + GAMS Development Corporation + + Will use up to 4 threads. + + + ** No valid license -- continue in small-scale demo mode. + Contact GAMS at sales@gams.com to purchase a license. + + ** Cannot open option file 'pindyck.opt'. + + The user model has 103 constraints and 119 variables + with 353 Jacobian elements, 85 of which are nonlinear. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 0 0 4.9005632973E+01 (Input point) + + The post-triangular part of the model has 35 constraints and 34 variables. + There are 17 definitional constraints and defined variables. + + Preprocessed model has 51 constraints and 68 variables + with 210 Jacobian elements, 98 of which are nonlinear. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 1.1245613434E+00 (Full preprocessed model) + 1.4057016793E-01 (After scaling) + 1.7108358505E-02 (After adjusting individual variables) + + ** Feasible solution. Value of objective = 1208.83953893 + + Iter Phase Ninf Objective RGmax NSB Step InItr MX OK + 6 4 1.2258643407E+03 5.7E-05 17 1.0E+00 4 F T + 8 4 1.2258643407E+03 2.6E-08 17 + + ** Optimal solution. Reduced gradient less than tolerance. + + +CONOPT has finished Optimizing +Model status = 2 +Solver status = 1 +Iteration count = 8 +Objective value = 1225.864341 +Saving primal solution and status information for T = 17 + + Solving Statistics + ------------------ + Model Status 2 LOCALLY OPTIMAL + Solver Status 1 NORMAL COMPLETION + Iteration Count 8 + Objective Value 1.225864340738E+03 + + CONOPT time Total 3.000E-03 seconds + of which: Function evaluations 0.00 =0.% + 1st Derivative evaluations 1.000E-03 =3.3E+01% + + Memory: Max used = 0.18 Mbytes + Total Allocated = 0.23 Mbytes + + + + C O N O P T version 4.39.0 + Copyright (C) GAMS Software GmbH + GAMS Development Corporation + + Will use up to 4 threads. + + + ** No valid license -- continue in small-scale demo mode. + Contact GAMS at sales@gams.com to purchase a license. + + ** Cannot open option file 'pindyck.opt'. + + The user model has 109 constraints and 126 variables + with 374 Jacobian elements, 90 of which are nonlinear. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 0 0 5.0522721440E+01 (Input point) + + The post-triangular part of the model has 37 constraints and 36 variables. + There are 18 definitional constraints and defined variables. + + Preprocessed model has 54 constraints and 72 variables + with 227 Jacobian elements, 109 of which are nonlinear. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 1.1400190443E+00 (Full preprocessed model) + 1.4250238054E-01 (After scaling) + 1.7092765527E-02 (After adjusting individual variables) + + ** Feasible solution. Value of objective = 1264.43892645 + + Iter Phase Ninf Objective RGmax NSB Step InItr MX OK + 6 4 1.2802843540E+03 1.9E-05 18 1.0E+00 4 F T + 7 4 1.2802843540E+03 6.6E-08 18 + + ** Optimal solution. Reduced gradient less than tolerance. + + +CONOPT has finished Optimizing +Model status = 2 +Solver status = 1 +Iteration count = 7 +Objective value = 1280.284354 +Saving primal solution and status information for T = 18 + + Solving Statistics + ------------------ + Model Status 2 LOCALLY OPTIMAL + Solver Status 1 NORMAL COMPLETION + Iteration Count 7 + Objective Value 1.280284354019E+03 + + CONOPT time Total 3.000E-03 seconds + of which: Function evaluations 0.00 =0.% + 1st Derivative evaluations 0.00 =0.% + + Memory: Max used = 0.19 Mbytes + Total Allocated = 0.23 Mbytes + + + + C O N O P T version 4.39.0 + Copyright (C) GAMS Software GmbH + GAMS Development Corporation + + Will use up to 4 threads. + + + ** No valid license -- continue in small-scale demo mode. + Contact GAMS at sales@gams.com to purchase a license. + + ** Cannot open option file 'pindyck.opt'. + + The user model has 115 constraints and 133 variables + with 395 Jacobian elements, 95 of which are nonlinear. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 0 0 5.2068736060E+01 (Input point) + + The post-triangular part of the model has 39 constraints and 38 variables. + There are 19 definitional constraints and defined variables. + + Preprocessed model has 57 constraints and 76 variables + with 244 Jacobian elements, 119 of which are nonlinear. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 1.1555167500E+00 (Full preprocessed model) + 1.4443959375E-01 (After scaling) + 1.7076374638E-02 (After adjusting individual variables) + + ** Feasible solution. Value of objective = 1318.14087491 + + Iter Phase Ninf Objective RGmax NSB Step InItr MX OK + 6 4 1.3337424507E+03 5.5E-05 19 1.0E+00 4 F T + 7 4 1.3337424507E+03 6.9E-08 19 + + ** Optimal solution. Reduced gradient less than tolerance. + + +CONOPT has finished Optimizing +Model status = 2 +Solver status = 1 +Iteration count = 7 +Objective value = 1333.742451 +Saving primal solution and status information for T = 19 + + Solving Statistics + ------------------ + Model Status 2 LOCALLY OPTIMAL + Solver Status 1 NORMAL COMPLETION + Iteration Count 7 + Objective Value 1.333742450705E+03 + + CONOPT time Total 3.000E-03 seconds + of which: Function evaluations 0.00 =0.% + 1st Derivative evaluations 1.000E-03 =3.3E+01% + + Memory: Max used = 0.20 Mbytes + Total Allocated = 0.25 Mbytes + + + + C O N O P T version 4.39.0 + Copyright (C) GAMS Software GmbH + GAMS Development Corporation + + Will use up to 4 threads. + + + ** No valid license -- continue in small-scale demo mode. + Contact GAMS at sales@gams.com to purchase a license. + + ** Cannot open option file 'pindyck.opt'. + + The user model has 121 constraints and 140 variables + with 416 Jacobian elements, 100 of which are nonlinear. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 0 0 5.3643294976E+01 (Input point) + + The post-triangular part of the model has 41 constraints and 40 variables. + There are 20 definitional constraints and defined variables. + + Preprocessed model has 60 constraints and 80 variables + with 262 Jacobian elements, 131 of which are nonlinear. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 1.1710525116E+00 (Full preprocessed model) + 1.4638156395E-01 (After scaling) + 1.7058937480E-02 (After adjusting individual variables) + + ** Feasible solution. Value of objective = 1370.88092958 + + Iter Phase Ninf Objective RGmax NSB Step InItr MX OK + 6 4 1.3862354828E+03 7.9E-05 20 1.0E+00 5 F T + 7 4 1.3862354828E+03 7.1E-08 20 + + ** Optimal solution. Reduced gradient less than tolerance. + + +CONOPT has finished Optimizing +Model status = 2 +Solver status = 1 +Iteration count = 7 +Objective value = 1386.235483 + + Solving Statistics + ------------------ + Model Status 2 LOCALLY OPTIMAL + Solver Status 1 NORMAL COMPLETION + Iteration Count 7 + Objective Value 1.386235482826E+03 + + CONOPT time Total 3.000E-03 seconds + of which: Function evaluations 0.00 =0.% + 1st Derivative evaluations 0.00 =0.% + + Memory: Max used = 0.21 Mbytes + Total Allocated = 0.26 Mbytes + + +End of Pinadd Model. Return code=0 diff --git a/test/data/conopt439-tutorial.out b/test/data/conopt439-tutorial.out new file mode 100644 index 0000000..7fd5eeb --- /dev/null +++ b/test/data/conopt439-tutorial.out @@ -0,0 +1,60 @@ + + + C O N O P T version 4.39.0 + Copyright (C) GAMS Software GmbH + GAMS Development Corporation + + Will use up to 4 threads. + + + ** No valid license -- continue in small-scale demo mode. + Contact GAMS at sales@gams.com to purchase a license. + + ** Cannot open option file 'tutorial.opt'. + + The user model has 3 constraints and 4 variables + with 9 Jacobian elements, 4 of which are nonlinear. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 0 0 4.8771929825E+00 (Input point) + + The post-triangular part of the model has 2 constraints and 1 variables. + + Preprocessed model has 1 constraints and 3 variables + with 3 Jacobian elements, 2 of which are nonlinear. + + Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK + 8.7719298246E-01 (Full preprocessed model) + 8.7719298246E-01 (After scaling) + 0.0000000000E+00 (After adjusting individual variables) + + ** Feasible solution. Value of objective = 0.469652200677 + + Iter Phase Ninf Objective RGmax NSB Step InItr MX OK + 1 3 5.6913410976E-01 4.5E-01 2 4.2E-01 1 F T + 5 4 5.7294297132E-01 9.4E-10 2 + + ** Optimal solution. Reduced gradient less than tolerance. + + +CONOPT has finished Optimizing +Model status = 2 +Solver status = 1 +Iteration count = 5 +Objective value = 0.572943 + + Solving Statistics + ------------------ + Model Status 2 LOCALLY OPTIMAL + Solver Status 1 NORMAL COMPLETION + Iteration Count 5 + Objective Value 5.729429718580E-01 + + CONOPT time Total 1.000E-03 seconds + of which: Function evaluations 0.00 =0.% + 1st Derivative evaluations 0.00 =0.% + + Memory: Max used = 0.02 Mbytes + Total Allocated = 0.02 Mbytes + +After solving. COI_Error =0