When using pyomo, the solver is indicated as:
opt = SolverFactory('solver_name')
solver_name can be any supported solvers as cbc gurobit etc.
However, pyomo also allows to call gams as it was a solver.
For example, to use cplex trough gams we should use:
opt = SolverFactory('gams')
opt.options['solver'] = 'cplex'
However, when gams is specified as solver for pyomo, MOS fails to recognize that pyomo has to be used and not gams directly.
I suppose that the kernel.system is set to gams instead of pyomo. I couldn’t track the error entirely but I tried the following in the containerized demo example:
opt = SolverFactory('gurobi')
I got an error in the file mos-compute/mos/compute/kernel/pyomo.py because I didn’t have gurobi solver installed
opt = SolverFactory('gams')
opt.options['solver'] = 'cplex'
I got an error in the file mos-compute/mos/compute/kernel/gams.py because it could not import gams package (that pyomo does not require to be installed)
Obviating that I did not have gurobi installed, it seems clear that MOS is not able to recognize that it should let pyomo call gams and tries to call it directly.
When using pyomo, the solver is indicated as:
opt = SolverFactory('solver_name')solver_name can be any supported solvers as cbc gurobit etc.
However, pyomo also allows to call gams as it was a solver.
For example, to use cplex trough gams we should use:
However, when gams is specified as solver for pyomo, MOS fails to recognize that pyomo has to be used and not gams directly.
I suppose that the kernel.system is set to gams instead of pyomo. I couldn’t track the error entirely but I tried the following in the containerized demo example:
opt = SolverFactory('gurobi')I got an error in the file mos-compute/mos/compute/kernel/pyomo.py because I didn’t have gurobi solver installed
I got an error in the file mos-compute/mos/compute/kernel/gams.py because it could not import gams package (that pyomo does not require to be installed)
Obviating that I did not have gurobi installed, it seems clear that MOS is not able to recognize that it should let pyomo call gams and tries to call it directly.