Good afternoon,
I tried to link Pyomo with AMPL but I’m not able to do it. First I have downloaded pyomo , then I have dowloaded AMPL libraries (i.e. conopt , I got license) but when I add the solver as:
solver = pyo.SolverFactory('conopt',executable="/Applications/AMPL/conopt", solve_io="nl")
opt = SolverFactory(solver)
opt.options['halt_on_ampl_error'] = 'yes'
opt.options['max_iter'] =40000
solver_manager = SolverManagerFactory('serial')
results = solver_manager.solve(model, opt=opt, tee=**True**, timelimit=**None**)
it appears:
ERROR: Unexpected exception while loading model:
Attempting to use an unavailable solver.
The SolverFactory was unable to create the solver
"<pyomo.solvers.plugins.solvers.CONOPT.CONOPT object at 0x7fccb07432e0>"
and returned an UnknownSolver object. This error is raised at the point
where the UnknownSolver object was used as if it were valid (by calling
method "solve").
The original solver was created with the following parameters:
executable: <pyomo.solvers.plugins.solvers.CONOPT.CONOPT object at 0x7fccb07432e0>
type: <pyomo.solvers.plugins.solvers.CONOPT.CONOPT object at 0x7fccb07432e0>
_args: () options: {'halt_on_ampl_error': 'yes', 'max_iter': 40000}
I have also copy the license on the python folders