File tree 4 files changed +28
-4
lines changed
pyomo/contrib/mindtpy/tests
4 files changed +28
-4
lines changed Original file line number Diff line number Diff line change 56
56
QCP_model ._generate_model ()
57
57
extreme_model_list = [LP_model .model , QCP_model .model ]
58
58
59
- required_solvers = ('ipopt' , 'appsi_highs' )
59
+ if SolverFactory ('appsi_highs' ).available (exception_flag = False ) and SolverFactory (
60
+ 'appsi_highs'
61
+ ).version () >= (1 , 7 , 0 ):
62
+ required_solvers = ('ipopt' , 'appsi_highs' )
63
+ else :
64
+ required_solvers = ('ipopt' , 'glpk' )
60
65
if all (SolverFactory (s ).available (exception_flag = False ) for s in required_solvers ):
61
66
subsolvers_available = True
62
67
else :
Original file line number Diff line number Diff line change 23
23
from pyomo .environ import SolverFactory , value
24
24
from pyomo .opt import TerminationCondition
25
25
26
- required_solvers = ('ipopt' , 'appsi_highs' )
26
+ if SolverFactory ('appsi_highs' ).available (exception_flag = False ) and SolverFactory (
27
+ 'appsi_highs'
28
+ ).version () >= (1 , 7 , 0 ):
29
+ required_solvers = ('ipopt' , 'appsi_highs' )
30
+ else :
31
+ required_solvers = ('ipopt' , 'glpk' )
32
+
27
33
if all (SolverFactory (s ).available (exception_flag = False ) for s in required_solvers ):
28
34
subsolvers_available = True
29
35
else :
Original file line number Diff line number Diff line change 28
28
from pyomo .contrib .mindtpy .tests .feasibility_pump1 import FeasPump1
29
29
from pyomo .contrib .mindtpy .tests .feasibility_pump2 import FeasPump2
30
30
31
- required_solvers = ('ipopt' , 'appsi_highs' )
31
+ if SolverFactory ('appsi_highs' ).available (exception_flag = False ) and SolverFactory (
32
+ 'appsi_highs'
33
+ ).version () >= (1 , 7 , 0 ):
34
+ required_solvers = ('ipopt' , 'appsi_highs' )
35
+ else :
36
+ required_solvers = ('ipopt' , 'glpk' )
37
+
32
38
if all (SolverFactory (s ).available (exception_flag = False ) for s in required_solvers ):
33
39
subsolvers_available = True
34
40
else :
Original file line number Diff line number Diff line change 18
18
from pyomo .contrib .mindtpy .tests .MINLP_simple import SimpleMINLP as SimpleMINLP
19
19
20
20
model_list = [SimpleMINLP (grey_box = True )]
21
- required_solvers = ('cyipopt' , 'glpk' )
21
+
22
+ if SolverFactory ('appsi_highs' ).available (exception_flag = False ) and SolverFactory (
23
+ 'appsi_highs'
24
+ ).version () >= (1 , 7 , 0 ):
25
+ required_solvers = ('cyipopt' , 'appsi_highs' )
26
+ else :
27
+ required_solvers = ('cyipopt' , 'glpk' )
28
+
22
29
if all (SolverFactory (s ).available (exception_flag = False ) for s in required_solvers ):
23
30
subsolvers_available = True
24
31
else :
You can’t perform that action at this time.
0 commit comments