跳至主内容
框架 无框架

类IloCplex::UserCutCallbackI

定义文件: ilcplex/ilocplexi.h
IloCplex::UserCutCallbackI的映射IloCplex::UserCutCallbackIIloCplex::UserCutCallbackIIloCplex::ControlCallbackIIloCplex::MIPCallbackIIloCplex::MIPInfoCallbackIIloCplex::OptimizationCallbackIIloCplex::CallbackI

这是一个高级班。 高级课程通常要求对 CPLEX 使用的算法有深刻的理解。 因而它们会提高应用程序中错误行为的风险,而这种行为可能难以调试。 因此,团队鼓励您仔细考虑是否可以用其他类来完成同样的任务。

类 "IloCplex::UserCutCallbackI的实例代表应用程序中用户编写的回调,该应用程序使用 "IloCplex的实例求解 MIP,同时生成用户切分以收紧 LP 松弛。 IloCplex会在解决每个节点 LP 后调用用户编写的回调。 在 "UserCutCallbackI实例中添加的限制条件必须是真正的限制条件,即省略这些限制条件不会影响模型的可行区域。

另请参阅:

方法概要
protected voidabortCutLoop()
protected IloConstraintadd(IloConstraint con, IloCplex::CutManagement purgeable=UseCutForce)
protected IloConstraintaddLocal(IloConstraint con)
protected Callback::TypegetType() const
protected IloBoolisAfterCutLoop() const
从 "ControlCallbackI继承的方法
getDownPseudoCost, getDownPseudoCost, getFeasibilities, getFeasibilities, getFeasibility, getFeasibility, getFeasibility, getFeasibility, getLB, getLB, getLBs, getLBs, getNodeData, getNodeId, getObjValue, getSlack, getSlacks, getUB, getUB, getUBs, getUBs, getUpPseudoCost, getUpPseudoCost, getValue, getValue, getValue, getValues, getValues, isSOSFeasible, isSOSFeasible, setNodeData
从 "MIPCallbackI继承的方法
getCurrentNodeDepth, getObjCoef, getObjCoef, getObjCoefs, getObjCoefs, getType, getUserThreads, MIPCallbackI
从 "MIPInfoCallbackI继承的方法
getBestObjValue, getCutoff, getDirection, getDirection, getIncumbentObjValue, getIncumbentSlack, getIncumbentSlacks, getIncumbentValue, getIncumbentValue, getIncumbentValue, getIncumbentValues, getIncumbentValues, getMIPRelativeGap, getMyThreadNum, getNcuts, getNiterations, getNiterations64, getNnodes, getNnodes64, getNremainingNodes, getNremainingNodes64, getPriority, getPriority, getQuality, getType, hasIncumbent, MIPInfoCallbackI
从 "OptimizationCallbackI继承的方法
getModel, getNcols, getNQCs, getNrows
从 "CallbackI继承的方法
abort, duplicateCallback, getCplexTime, getDetTime, getEndDetTime, getEndTime, getEnv, getStartDetTime, getStartTime, getType, main
方法详细信息

abortCutLoop

protected voidabortCutLoop()

退出分割环并继续进行分支。


添加

保护 'IloConstraint'增加(IloConstraint'忽悠, 'IloCplex::CutManagement'可清洗=使用切割力)

此方法为 "con指定的约束条件在当前节点 LP 子问题中添加切分。 这种切割必须在全球范围内有效。 增加的切口必须是线性的。 通过回溯无法将其删除。

Select the value of purgeable from the symbolic values of the enumeration IloCplex::CutManagement. 根据 "purgeable的值,CPLEX 会在某些情况下删除分支和切分。

参数:

忽悠

作为切割添加的约束条件。 该方法(与 "IloCplex::add相反)会创建参数 "con的深度副本;也就是说,"con的后续修改不会修改已添加的约束。

可清洗

一个值,指定 CPLEX 何时或是否可以移除此剪切。

返回:

例程总是返回 "con


addLocal

protectedIloConstraint addLocal(IloConstraint con)

此方法为参数 "con指定的约束条件的当前节点 LP 子问题添加局部切分。 IloCplex管理本地切分的方式是,只有当 CPLEX 正在处理该子树的节点时,它才会激活;换句话说,添加的切分是本地的。 增加的切口必须是线性的。

参数:

忽悠

作为切割添加的约束条件。 该方法(与 "IloCplex::add相反)会创建参数 "con的深度副本;也就是说,"con的后续修改不会修改已添加的约束。

返回:

例程总是返回 "con


isAfterCutLoop

protectedIloBool isAfterCutLoop() const

如果回调是在 CPLEX 停止生成切分并最后一次调用回调后调用的,则此方法返回 "IloTrue。 如果回调是从 CPLEX 在搜索树的每个节点执行的剪切循环中调用的,则该方法返回 "IloFalse


getType

protectedCallback::Type getType() const

此方法返回调用回调对象的回调类型。