本文整理汇总了Python中pyscipopt.Model.includeSepa方法的典型用法代码示例。如果您正苦于以下问题:Python Model.includeSepa方法的具体用法?Python Model.includeSepa怎么用?Python Model.includeSepa使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyscipopt.Model
的用法示例。
在下文中一共展示了Model.includeSepa方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: model
# 需要导入模块: from pyscipopt import Model [as 别名]
# 或者: from pyscipopt.Model import includeSepa [as 别名]
def model():
# create solver instance
s = Model()
# include separator
sepa = GMI()
s.includeSepa(sepa, "python_gmi", "generates gomory mixed integer cuts", priority = 1000, freq = 1)
# turn off presolve
s.setPresolve(SCIP_PARAMSETTING.OFF)
# turn off heuristics
s.setHeuristics(SCIP_PARAMSETTING.OFF)
# turn off propagation
s.setIntParam("propagating/maxrounds", 0)
s.setIntParam("propagating/maxroundsroot", 0)
# turn off some cuts
s.setIntParam("separating/strongcg/freq", -1)
s.setIntParam("separating/gomory/freq", -1)
s.setIntParam("separating/aggregation/freq", -1)
s.setIntParam("separating/mcf/freq", -1)
s.setIntParam("separating/closecuts/freq", -1)
s.setIntParam("separating/clique/freq", -1)
s.setIntParam("separating/zerohalf/freq", -1)
# only two rounds of cuts
s.setIntParam("separating/maxroundsroot", 2)
return s