Please note that starting with version 11.0.2, the Gurobi Interactive Shell has been deprecated.
Previous: Interactive Shell Tutorial: Changing Parameters
The Gurobi shell allows you to work with multiple models simultaneously. For example...
gurobi> a = read("/opt/gurobi1103/linux64/examples/data/p0033")
Read MPS format model from file /opt/gurobi1001/linux64/examples/data/p0033.mps
Reading time = 0.00 seconds
P0033: 16 rows, 33 columns, 98 nonzeros
gurobi> b = read("/opt/gurobi1103/linux64/examples/data/stein9")
Read MPS format model from file /opt/gurobi1103/linux64/examples/data/stein9.mps
Reading time = 0.00 seconds
STEIN9: 13 rows, 9 columns, 45 nonzeros
The models() command gives a list of all active models.
gurobi> models() Currently loaded models: a : <gurobi.Model MIP instance P0033: 16 constrs, 33 vars, Parameter changes: LogFile=gurobi.log> b : <gurobi.Model MIP instance STEIN9: 13 constrs, 9 vars, Parameter changes: LogFile=gurobi.log>
Note that parameters can be set for a particular model with the Model.setParam() method or the Model.Params class, or they can be changed for all models in the Gurobi shell by using the global setParam() method.
Further information
Comments
0 comments
Article is closed for comments.