【问题标题】:How to access the content of the log file after using Pyomo to call a solver in NEOS server?在 NEOS 服务器中使用 Pyomo 调用求解器后如何访问日志文件的内容?
【发布时间】:2019-09-28 21:53:28
【问题描述】:

我正在使用 Pyomo 从 NEOS 服务器运行 BONMIN 求解器。但是,它返回一个简单的日志文件,没有任何有用的信息,例如迭代次数。你能告诉我我应该怎么做才能检索完整的日志文件吗? Pyomo中的代码如下:

opt_prob = pyomo.opt.SolverFactory(bonmin, solver_io = minlp)
opt_prob.options['max_iter']    = self.max_iter
opt_prob.options['tol']         = self.tol
solver_manager = pyomo.opt.SolverManagerFactory('neos')
results = solver_manager.solve(self.model, keepfiles=True, tee=True, opt=opt_prob)

现在的日志文件内容如下: Job 6915952 dispatched password: lBdrJjXS ---------- Begin Solver Output ----------- Condor submit: 'neos.submit' Condor submit: 'watchdog.submit' Job submitted to NEOS HTCondor pool.

【问题讨论】:

  • 这也是我的问题。

标签: using logfile pyomo neos-server


【解决方案1】:

不确定这个问题是否还需要回答,但是将日志文件保存在外部是否有帮助?

所以添加:

results = solver_manager.solve(self.model, keepfiles=True, tee=True, opt=opt_prob, logfile = "name.csv")

【讨论】:

    猜你喜欢
    • 2021-09-23
    • 2020-09-08
    • 1970-01-01
    • 2021-06-03
    • 2012-08-09
    • 1970-01-01
    • 2018-06-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多