API Reference

DisjunctiveAlgorithms.AbstractAlgorithmAttribute — Type
AbstractAlgorithmAttribute <: MOI.AbstractOptimizerAttribute

A super-type for algorithm-specific optimizer attributes. Each algorithm declares MOI.supports for the attributes it consumes and documents them in its docstring.

source
DisjunctiveAlgorithms.Algorithm — Type
Algorithm() <: MOI.AbstractOptimizerAttribute

The algorithm the optimizer runs. Defaults to LOA.

Example

julia> set_attribute(model, DisjunctiveAlgorithms.Algorithm(),
           DisjunctiveAlgorithms.LOA())
source
DisjunctiveAlgorithms.BatchedSubproblems — Type
BatchedSubproblems()

SubproblemMethod value that solves a vector of indicator combinations as one block-diagonal NLP through the nlp_solver: each combination gets its own copy of the variables and rows, and the objective is the sum of the copies' objectives. The copies do not interact, so the stacked solution is the sequential one; what changes is that the solver sees one large, regular problem, which is what GPU evaluators and factorizations need to pay off. A single combination is a batch of one. A batch whose joint solve fails (one infeasible copy makes the whole stack infeasible) falls back to the sequential path copy by copy, so the results match the default method exactly.

source
DisjunctiveAlgorithms.CombinationSource — Type
CombinationSource() <: AbstractAlgorithmAttribute -> Any

Where the extra combinations of a MultiGenerationSize iteration come from. The default nothing reads the master's solution pool (result indices past 1), and only without a pool re-solves the master behind no-good cuts. The experimental sources in combination_sources.jl need nothing from the solver: Neighborhood, LPRounding, RandomCombinations, and CutoffResolve. A source extends _candidate_combinations.

source
DisjunctiveAlgorithms.CutoffResolve — Type
CutoffResolve(; tolerance = 0.05)

CombinationSource that re-solves the master behind no-good cuts like the default, but with the master objective capped at the current optimum plus tolerance (relative) and the last solution as a warm start, so each re-solve is a small warm MILP. Still one master solve per extra combination.

source
DisjunctiveAlgorithms.IterationTimeLimit — Type
IterationTimeLimit() <: AbstractAlgorithmAttribute -> Float64

Seconds allotted to the solve loop. Defaults to Inf. The overall budget is the standard MOI.TimeLimitSec attribute.

source
DisjunctiveAlgorithms.LOA — Type
LOA()

LOA implements logic-based outer approximation (Turkay and Grossmann 1996): a MILP master keeps the linear rows exactly, gates each disjunct's rows on its indicator, and accumulates OA cuts from NLP subproblems solved at fixed indicator combinations. The set-covering pass of Turkay and Grossmann (1996, Appendix D), restricted to the nonlinear disjuncts as in GDPopt (Chen, Johnson, Siirola and Grossmann 2018), initializes it with combinations that activate every nonlinear disjunct once; SetCoverProblem picks the covering problem. The OA bound is only valid on convex problems, so convergence reports LOCALLY_SOLVED, never OPTIMAL.

Supported optimizer attributes

source
DisjunctiveAlgorithms.LPRounding — Type
LPRounding(; seed = 0)

CombinationSource that samples combinations from the master's LP relaxation: integrality is dropped on a copy of the master, the LP is solved, and each disjunction's active disjunct is drawn with probability proportional to the relaxed value of its activation. One LP per iteration, informed by every cut in the master. The LP solve is not counted in MasterSolveCount.

source
DisjunctiveAlgorithms.LogicOnlyCover — Type
LogicOnlyCover() <: AbstractSetCover

The covering problem of Turkay and Grossmann (1996, Appendix D): the disjunct binaries under the exactly-one and propositional rows only.

source
DisjunctiveAlgorithms.MasterCover — Type
MasterCover() <: AbstractSetCover

The MILP master with the covering objective swapped in, as Pyomo's GDPopt does (Chen, Johnson, Siirola and Grossmann 2018), so the initial combinations also satisfy the linear rows and their NLPs are far less often infeasible.

source
DisjunctiveAlgorithms.MasterReformulation — Type
MasterReformulation() <: AbstractAlgorithmAttribute -> String

How linear disjunct rows enter the master: "indicator" (constraint gated by the binary) or "bigm" (rows relaxed by M_Value * (1 - z), tighter for solvers that cannot strengthen indicators, e.g. with presolve disabled). Defaults to "indicator".

source
DisjunctiveAlgorithms.MultiGenerationSize — Type
MultiGenerationSize() <: AbstractAlgorithmAttribute -> Int

Indicator combinations evaluated per master solve in the main loop (multi-generation cuts). Defaults to 1, plain LOA. Extra combinations come from the master's solution pool when the mip_solver exposes one through MOI.ResultCount (Gurobi with PoolSolutions), as many as it holds up to this size, and otherwise from re-solving the master behind a no-good cut per combination already taken. All of them go through _solve_nlps, one stacked NLP under BatchedSubproblems, and every result adds its cuts before the next master solve.

source
DisjunctiveAlgorithms.NLPSolveCount — Type
NLPSolveCount() <: MOI.AbstractModelAttribute -> Int

Indicator combinations evaluated by NLP subproblems in the last optimize!; a stacked batch of k counts k.

source
DisjunctiveAlgorithms.NLPSolveTime — Type
NLPSolveTime() <: MOI.AbstractModelAttribute -> Float64

Seconds spent inside NLP subproblem solves in the last optimize!, feasibility restoration and stacked batches included.

source
DisjunctiveAlgorithms.Neighborhood — Type
Neighborhood(; around = :proposal)

CombinationSource made of every combination that differs from the master's proposal (or from the incumbent, around = :incumbent) in exactly one disjunction's choice. Free: no solver call. A disjunction of m disjuncts contributes m - 1 neighbors; when there are more than asked for, an evenly spaced subset over the disjunctions is taken.

source
DisjunctiveAlgorithms.Optimizer — Type
Optimizer(nlp_solver, mip_solver = nlp_solver)

Solver for models containing DisjunctiveProgramming.DisjunctionSet constraints. nlp_solver and mip_solver are optimizer factories as accepted by MOI.instantiate. The algorithm (default LOA) is selected with the Algorithm attribute and configured through the attributes it documents. A new optimizer starts with a 3600 second MOI.TimeLimitSec safety limit; set it to nothing for no limit.

Example

julia> model = GDPModel(() -> DisjunctiveAlgorithms.Optimizer(
           Ipopt.Optimizer, HiGHS.Optimizer));

julia> optimize!(model, gdp_method = Direct())
source
DisjunctiveAlgorithms.SetCoverIterationLimit — Type
SetCoverIterationLimit() <: AbstractAlgorithmAttribute -> Int

Set-covering initialization iterations: each solves the logic-only cover MIP over the indicators and one NLP, until every nonlinear disjunct has been active in a feasible NLP. Defaults to 8.

source
DisjunctiveAlgorithms.SubproblemMethod — Type
SubproblemMethod() <: AbstractAlgorithmAttribute -> Any

How the NLP subproblems are built and solved. The default nothing builds one MOI model from the nlp_solver and rewrites its binary fixes and disjunct rows per combination. A method object routes the subproblems elsewhere (e.g. a structure-preserving transcription of the original model): it must extend _build_subproblem and _solve_nlp on its type, and may extend _check_nlp_support. _solve_nlp must return (; combination, point, objective, feasible, status) with point indexed by this optimizer's variable indices.

source
DisjunctiveAlgorithms.UseNLPF — Type
UseNLPF() <: AbstractAlgorithmAttribute -> Bool

Solve a slacked feasibility NLP when the primary NLP is infeasible, so its point still seeds OA cuts. Defaults to true.

source