我正在使用PySCIPOpt,这是一个用于SCIP ILP求解器的Python库。我想限制优化时间。我在 SCIP 文档中发现这可以使用 SCIPsetRealParam(scip, "limits/time", 600)
来完成。
但是如何从PySCIPOpt Python接口完成呢?
简单:
m = pyscipopt.Model()
m.setParam('limits/time', 600)