如何使JuMP(使用cplex)日志进度静音?

时间:2019-04-24 07:17:41

标签: julia cplex julia-jump

如何使JuMP日志进度静音? 我想禁止使用模型作为CPLEX的JuMP输出。

1 个答案:

答案 0 :(得分:1)

我不知道您使用的是哪个版本的JuMP,但我认为您需要做的就是将<!DOCTYPE html> <head> <meta http-equiv="refresh" content="0; url=https://example.com/copy/index.html"> <link rel="canonical" href="https://example.com/copy/index.html"> </head> 选项传递给Cplex求解器。

在v0.19之前,它应该类似于

CPX_PARAM_SCRIND = 0

从v0.19开始,诸如此类

m = Model( solver=CplexSolver(CPX_PARAM_SCRIND = 0, ...other options ) )

请注意,在较新版本的Cplex中,从const SOLVER = CPLEX.Optimizer(CPX_PARAM_SCRIND = 0, ...other options ) # to create an optimizer object # OR while creating your model m = Model(with_optimizer(CPLEX.Optimizer, CPX_PARAM_SCRIND=0, ...other options)) seems to be renamedCPX_PARAM_SCRIND,我不知道CPXPARAM_ScreenOutput如何处理这种情况或是否需要处理。在新版本中,您可能仍然可以直接使用CPLEX.jl选项。

如果这些方法不起作用,则可能要尝试直接在Julia中重定向CPX_PARAM_SCRIND

stdout