我一直在尝试使用 cplex 和 pyomo 来解决一些 LP,但是在运行时我发现了以下错误消息
[ 0.00] Setting up Pyomo environment
[ 0.00] Applying Pyomo preprocessing actions
[ 0.00] Creating model
[ 0.02] Applying solver
The license for this version of CPLEX has expired.
ERROR: "[base]/site-packages/pyomo/opt/base/solvers.py", 568, solve
Solver (cplex) returned non-zero return code (64)
ERROR: "[base]/site-packages/pyomo/opt/base/solvers.py", 571, solve
See the solver log above for diagnostic information.
[ 0.03] Pyomo Finished
ERROR: Unexpected exception while running model:
Solver (cplex) did not exit normally
此外,我意识到在终端中键入“cplex”时,答案是
The license for this version of CPLEX has expired.
不过我只是下载了 Cplex 的学术版
- IBM ILOG CPLEX 优化工作室 12.7
求解器在使用 oplide 运行 OPL 模型时工作,在运行求解器附带的示例时使用 python。
在安装此版本之前,我卸载了以前的 cplex。我不知道如何使它工作,我希望你能指导我。