From 528df069f0bbf45c132693d5db266fecee7a6bdf Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Sat, 14 Oct 2023 13:25:28 +0000 Subject: [PATCH] build based on afed95f --- dev/.documenter-siteinfo.json | 2 +- dev/api/index.html | 30 +++++++++++++++--------------- dev/index.html | 2 +- dev/search_index.js | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index aed067f..7bea42d 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.9.3","generation_timestamp":"2023-10-14T03:52:43","documenter_version":"1.1.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.9.3","generation_timestamp":"2023-10-14T13:25:24","documenter_version":"1.1.1"}} \ No newline at end of file diff --git a/dev/api/index.html b/dev/api/index.html index 381d17b..6fc8245 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -1,7 +1,7 @@ -API · DisjunctiveProgramming.jl

API

DisjunctiveProgramming.BigMType
BigM <: AbstractReformulationMethod

A type for using the big-M reformulation approach for disjunctive constraints.

Fields

  • value::Float64: Big-M value (default = 1e9).
  • tight::Bool: Attempt to tighten the Big-M value (default = true)?
source
DisjunctiveProgramming.ConstraintDataType
ConstraintData{C <: JuMP.AbstractConstraint}

A type for storing constraint objects in GDPData and any meta-data they possess.

Fields

  • constraint::C: The constraint.
  • name::String: The name of the proposition.
source
DisjunctiveProgramming.DisjunctConstraintType
DisjunctConstraint

Used as a tag for constraints that will be used in disjunctions. This is done via the following syntax:

julia> @constraint(model, [constr_expr], DisjunctConstraint)
+API · DisjunctiveProgramming.jl

API

DisjunctiveProgramming.BigMType
BigM <: AbstractReformulationMethod

A type for using the big-M reformulation approach for disjunctive constraints.

Fields

  • value::Float64: Big-M value (default = 1e9).
  • tight::Bool: Attempt to tighten the Big-M value (default = true)?
source
DisjunctiveProgramming.ConstraintDataType
ConstraintData{C <: JuMP.AbstractConstraint}

A type for storing constraint objects in GDPData and any meta-data they possess.

Fields

  • constraint::C: The constraint.
  • name::String: The name of the proposition.
source
DisjunctiveProgramming.DisjunctConstraintType
DisjunctConstraint

Used as a tag for constraints that will be used in disjunctions. This is done via the following syntax:

julia> @constraint(model, [constr_expr], DisjunctConstraint)
 
-julia> @constraint(model, [constr_expr], DisjunctConstraint(lvref))

where lvref is a LogicalVariableRef that will ultimately be associated with the disjunct the constraint is added to. If no lvref is given, then one is generated when the disjunction is created.

source
DisjunctiveProgramming.DisjunctionType
Disjunction <: JuMP.AbstractConstraint

A type for a disjunctive constraint that is comprised of a collection of disjuncts of indicated by a unique LogicalVariableRef.

Fields

  • indicators::Vector{LogicalVariableRef}: The references to the logical variables

(indicators) that uniquely identify each disjunct in the disjunction.

  • nested::Bool: Is this disjunction nested within another disjunction?
source
DisjunctiveProgramming.HullType
Hull <: AbstractReformulationMethod

A type for using the convex hull reformulation approach for disjunctive constraints.

Fields

  • value::Float64: epsilon value for nonlinear hull reformulations (default = 1e-6).
source
DisjunctiveProgramming.LogicalVariableType
LogicalVariable <: JuMP.AbstractVariable

A variable type the logical variables associated with disjuncts in a Disjunction.

Fields

  • fix_value::Union{Nothing, Bool}: A fixed boolean value if there is one.
  • start_value::Union{Nothing, Bool}: An initial guess if there is one.
source
Base.getindexMethod
Base.getindex(map::JuMP.GenericReferenceMap, cref::DisjunctConstraintRef)

...

source
Base.getindexMethod
Base.getindex(map::JuMP.GenericReferenceMap, cref::DisjunctionRef)

...

source
Base.getindexMethod
Base.getindex(map::JuMP.GenericReferenceMap, cref::LogicalConstraintRef)

...

source
DisjunctiveProgramming.disjunctionFunction
disjunction(
+julia> @constraint(model, [constr_expr], DisjunctConstraint(lvref))

where lvref is a LogicalVariableRef that will ultimately be associated with the disjunct the constraint is added to. If no lvref is given, then one is generated when the disjunction is created.

source
DisjunctiveProgramming.DisjunctionType
Disjunction <: JuMP.AbstractConstraint

A type for a disjunctive constraint that is comprised of a collection of disjuncts of indicated by a unique LogicalVariableRef.

Fields

  • indicators::Vector{LogicalVariableRef}: The references to the logical variables

(indicators) that uniquely identify each disjunct in the disjunction.

  • nested::Bool: Is this disjunction nested within another disjunction?
source
DisjunctiveProgramming.HullType
Hull <: AbstractReformulationMethod

A type for using the convex hull reformulation approach for disjunctive constraints.

Fields

  • value::Float64: epsilon value for nonlinear hull reformulations (default = 1e-6).
source
DisjunctiveProgramming.LogicalVariableType
LogicalVariable <: JuMP.AbstractVariable

A variable type the logical variables associated with disjuncts in a Disjunction.

Fields

  • fix_value::Union{Nothing, Bool}: A fixed boolean value if there is one.
  • start_value::Union{Nothing, Bool}: An initial guess if there is one.
source
Base.getindexMethod
Base.getindex(map::JuMP.GenericReferenceMap, cref::DisjunctConstraintRef)

...

source
Base.getindexMethod
Base.getindex(map::JuMP.GenericReferenceMap, cref::DisjunctionRef)

...

source
Base.getindexMethod
Base.getindex(map::JuMP.GenericReferenceMap, cref::LogicalConstraintRef)

...

source
DisjunctiveProgramming.disjunctionFunction
disjunction(
     model::JuMP.Model, 
     disjunct_indicators::Vector{LogicalVariableRef}
     name::String = ""
@@ -10,11 +10,11 @@
     disjunct_indicators::Vector{LogicalVariableRef},
     nested_tag::DisjunctConstraint,
     name::String = ""
-)

Function to add a nested Disjunction to a GDPModel.

source
DisjunctiveProgramming.reformulate_modelMethod
reformulate_model(model::JuMP.Model, method::AbstractSolutionMethod)

Reformulate a GDPModel using the specified method. Prior to reformulation, all previous reformulation variables and constraints are deleted.

source
DisjunctiveProgramming.reformulate_modelMethod
reformulate_model(model::JuMP.Model, method::AbstractSolutionMethod)

Reformulate a GDPModel using the specified method. Prior to reformulation, all previous reformulation variables and constraints are deleted.

source
JuMP.add_constraintFunction
JuMP.add_constraint(
     model::JuMP.Model,
     con::_DisjunctConstraint,
     name::String = ""
-)::DisjunctConstraintRef

Extend JuMP.add_constraint to add a DisjunctConstraint to a GDPModel. The constraint is added to the GDPData in the .ext dictionary of the GDPModel.

source
JuMP.add_constraintMethod
function JuMP.add_constraint(
     model::JuMP.Model,
     c::JuMP.ScalarConstraint{<:F, S},
     name::String = ""
@@ -22,43 +22,43 @@
     model::JuMP.Model,
     c::JuMP.VectorConstraint{<:F, S, Shape},
     name::String = ""
-) where {F <: Union{Number, LogicalVariableRef, _LogicalExpr}, S, Shape}

Extend JuMP.add_constraint to allow creating logical cardinality constraints for a GDPModel with the @constraint macro.

source
JuMP.add_variableFunction
JuMP.add_variable(model::JuMP.Model, v::LogicalVariable, 
-                  name::String = "")::LogicalVariableRef

Extend JuMP.add_variable for LogicalVariables. This helps enable @variable(model, [var_expr], Logical).

source
JuMP.build_constraintMethod
JuMP.build_constraint(
+) where {F <: Union{Number, LogicalVariableRef, _LogicalExpr}, S, Shape}

Extend JuMP.add_constraint to allow creating logical cardinality constraints for a GDPModel with the @constraint macro.

source
JuMP.add_variableFunction
JuMP.add_variable(model::JuMP.Model, v::LogicalVariable, 
+                  name::String = "")::LogicalVariableRef

Extend JuMP.add_variable for LogicalVariables. This helps enable @variable(model, [var_expr], Logical).

source
JuMP.build_constraintMethod
JuMP.build_constraint(
     _error::Function, 
     func, 
     set::_MOI.AbstractScalarSet,
     tag::DisjunctConstraint
-)::_DisjunctConstraint

Extend JuMP.build_constraint to add constraints to disjuncts. This in combination with JuMP.add_constraint enables the use of @constraint(model, [name], constr_expr, tag), where tag is a DisjunctConstraint(::Type{LogicalVariableRef}). The user must specify the LogicalVariable to use as the indicator for the _DisjunctConstraint being created.

source
JuMP.build_constraintMethod
JuMP.build_constraint(
+)::_DisjunctConstraint

Extend JuMP.build_constraint to add constraints to disjuncts. This in combination with JuMP.add_constraint enables the use of @constraint(model, [name], constr_expr, tag), where tag is a DisjunctConstraint(::Type{LogicalVariableRef}). The user must specify the LogicalVariable to use as the indicator for the _DisjunctConstraint being created.

source
JuMP.build_constraintMethod
JuMP.build_constraint(
     _error::Function, 
     func, 
     set::MathOptInterface.Nonnegatives,
     tag::DisjunctConstraint
-)::_DisjunctConstraint

Extend JuMP.build_constraint to add VectorConstraints to disjuncts.

source
JuMP.build_constraintMethod
JuMP.build_constraint(
+)::_DisjunctConstraint

Extend JuMP.build_constraint to add VectorConstraints to disjuncts.

source
JuMP.build_constraintMethod
JuMP.build_constraint(
     _error::Function, 
     func, 
     set::MathOptInterface.Nonpositives,
     tag::DisjunctConstraint
-)::_DisjunctConstraint

Extend JuMP.build_constraint to add VectorConstraints to disjuncts.

source
JuMP.build_constraintMethod
JuMP.build_constraint(
+)::_DisjunctConstraint

Extend JuMP.build_constraint to add VectorConstraints to disjuncts.

source
JuMP.build_constraintMethod
JuMP.build_constraint(
     _error::Function, 
     func, 
     set::MathOptInterface.Zeros,
     tag::DisjunctConstraint
-)::_DisjunctConstraint

Extend JuMP.build_constraint to add VectorConstraints to disjuncts.

source
JuMP.build_constraintMethod
JuMP.build_constraint(
+)::_DisjunctConstraint

Extend JuMP.build_constraint to add VectorConstraints to disjuncts.

source
JuMP.build_constraintMethod
JuMP.build_constraint(
     _error::Function, 
     func, 
     set::Nonnegatives,
     tag::DisjunctConstraint
-)::_DisjunctConstraint

Extend JuMP.build_constraint to add VectorConstraints to disjuncts.

source
JuMP.build_constraintMethod
JuMP.build_constraint(
+)::_DisjunctConstraint

Extend JuMP.build_constraint to add VectorConstraints to disjuncts.

source
JuMP.build_constraintMethod
JuMP.build_constraint(
     _error::Function, 
     func, 
     set::Nonpositives,
     tag::DisjunctConstraint
-)::_DisjunctConstraint

Extend JuMP.build_constraint to add VectorConstraints to disjuncts.

source
JuMP.build_constraintMethod
JuMP.build_constraint(
+)::_DisjunctConstraint

Extend JuMP.build_constraint to add VectorConstraints to disjuncts.

source
JuMP.build_constraintMethod
JuMP.build_constraint(
     _error::Function, 
     func, 
     set::Zeros,
     tag::DisjunctConstraint
-)::_DisjunctConstraint

Extend JuMP.build_constraint to add VectorConstraints to disjuncts.

source
JuMP.build_constraintMethod
function JuMP.build_constraint(
+)::_DisjunctConstraint

Extend JuMP.build_constraint to add VectorConstraints to disjuncts.

source
JuMP.build_constraintMethod
function JuMP.build_constraint(
     _error::Function, 
     func::AbstractVector{T},
     set::S
@@ -69,5 +69,5 @@
     _error::Function, 
     func::_LogicalExpr,
     set::IsTrue
-)

Extend JuMP.build_constraint to add logical propositional constraints to a GDPModel. This in combination with JuMP.add_constraint enables the use of @constraint(model, [name], logical_expr in IsTrue()) to define a Boolean expression that must either be true or false.

source
JuMP.build_variableMethod
JuMP.build_variable(_error::Function, info::JuMP.VariableInfo, 
-                    ::Type{LogicalVariable})::LogicalVariable

Extend JuMP.build_variable to work with logical variables. This in combination with JuMP.add_variable enables the use of @variable(model, [var_expr], LogicalVariable).

source
JuMP.constraint_objectMethod
JuMP.constraint_object(cref::DisjunctConstraintRef)

Return the underlying constraint data for the constraint referenced by cref.

source
JuMP.constraint_objectMethod
JuMP.constraint_object(cref::DisjunctionRef)

Return the underlying constraint data for the constraint referenced by cref.

source
JuMP.constraint_objectMethod
JuMP.constraint_object(cref::LogicalConstraintRef)

Return the underlying constraint data for the constraint referenced by cref.

source
JuMP.deleteMethod
JuMP.delete(model::JuMP.Model, cref::DisjunctConstraintRef)

Delete a disjunct constraint from the GDP model.

source
JuMP.deleteMethod
JuMP.delete(model::JuMP.Model, cref::DisjunctionRef)

Delete a disjunction constraint from the GDP model.

source
JuMP.deleteMethod
JuMP.delete(model::JuMP.Model, cref::LogicalConstraintRef)

Delete a logical constraint from the GDP model.

source
JuMP.deleteMethod
JuMP.delete(model::JuMP.Model, vref::LogicalVariableRef)

Delete the logical variable associated with vref from the GDP model.

source
JuMP.fixMethod
JuMP.fix(vref::LogicalVariableRef, value::Bool)

Fix a logical variable to a value. Update the fixing constraint if one exists, otherwise create a new one.

source
JuMP.fix_valueMethod
JuMP.fix_value(vref::LogicalVariableRef)

Return the value to which a logical variable is fixed.

source
JuMP.indexMethod
JuMP.index(cref::DisjunctConstraintRef)

Return the index constraint associated with cref.

source
JuMP.indexMethod
JuMP.index(cref::DisjunctionRef)

Return the index constraint associated with cref.

source
JuMP.indexMethod
JuMP.index(cref::LogicalConstraintRef)

Return the index constraint associated with cref.

source
JuMP.indexMethod
JuMP.index(vref::LogicalVariableRef)

Return the index of logical variable that associated with vref.

source
JuMP.is_fixedMethod
JuMP.is_fixed(vref::LogicalVariableRef)

Return true if vref is a fixed variable. If true, the fixed value can be queried with fix_value.

source
JuMP.is_validMethod
JuMP.is_valid(model::JuMP.Model, cref::DisjunctConstraintRef)

Return true if cref refers to a valid constraint in the GDP model.

source
JuMP.is_validMethod
JuMP.is_valid(model::JuMP.Model, cref::DisjunctionRef)

Return true if cref refers to a valid constraint in the GDP model.

source
JuMP.is_validMethod
JuMP.is_valid(model::JuMP.Model, cref::LogicalConstraintRef)

Return true if cref refers to a valid constraint in the GDP model.

source
JuMP.is_validMethod
JuMP.is_valid(model::JuMP.Model, vref::LogicalVariableRef)

Return true if vref refers to a valid logical variable in GDP model.

source
JuMP.isequal_canonicalMethod
JuMP.isequal_canonical(v::LogicalVariableRef, w::LogicalVariableRef)

Return true if v and w refer to the same logical variable in the same GDP model.

source
JuMP.nameMethod
JuMP.name(cref::DisjunctConstraintRef)

Get a constraint's name attribute.

source
JuMP.nameMethod
JuMP.name(cref::DisjunctionRef)

Get a constraint's name attribute.

source
JuMP.nameMethod
JuMP.name(cref::LogicalConstraintRef)

Get a constraint's name attribute.

source
JuMP.nameMethod
JuMP.name(vref::LogicalVariableRef)

Get a logical variable's name attribute.

source
JuMP.owner_modelMethod
JuMP.owner_model(cref::DisjunctConstraintRef)

Return the model to which cref belongs.

source
JuMP.owner_modelMethod
JuMP.owner_model(cref::DisjunctionRef)

Return the model to which cref belongs.

source
JuMP.owner_modelMethod
JuMP.owner_model(cref::LogicalConstraintRef)

Return the model to which cref belongs.

source
JuMP.owner_modelMethod
JuMP.owner_model(vref::LogicalVariableRef)

Return the GDP model to which vref belongs.

source
JuMP.set_nameMethod
JuMP.set_name(cref::DisjunctConstraintRef, name::String)

Set a constraint's name attribute.

source
JuMP.set_nameMethod
JuMP.set_name(cref::DisjunctionRef, name::String)

Set a constraint's name attribute.

source
JuMP.set_nameMethod
JuMP.set_name(cref::LogicalConstraintRef, name::String)

Set a constraint's name attribute.

source
JuMP.set_nameMethod
JuMP.set_name(vref::LogicalVariableRef, name::String)

Set a logical variable's name attribute.

source
JuMP.set_start_valueMethod
JuMP.set_start_value(vref::LogicalVariableRef, value::Union{Nothing, Bool})

Set the start value of the logical variable vref.

Pass nothing to unset the start value.

source
JuMP.start_valueMethod
JuMP.start_value(vref::LogicalVariableRef)

Return the start value of the logical variable vref.

source
JuMP.unfixMethod
JuMP.unfix(vref::LogicalVariableRef)

Delete the fixed value of a logical variable.

source
+)

Extend JuMP.build_constraint to add logical propositional constraints to a GDPModel. This in combination with JuMP.add_constraint enables the use of @constraint(model, [name], logical_expr in IsTrue()) to define a Boolean expression that must either be true or false.

source
JuMP.build_variableMethod
JuMP.build_variable(_error::Function, info::JuMP.VariableInfo, 
+                    ::Type{LogicalVariable})::LogicalVariable

Extend JuMP.build_variable to work with logical variables. This in combination with JuMP.add_variable enables the use of @variable(model, [var_expr], LogicalVariable).

source
JuMP.constraint_objectMethod
JuMP.constraint_object(cref::DisjunctConstraintRef)

Return the underlying constraint data for the constraint referenced by cref.

source
JuMP.constraint_objectMethod
JuMP.constraint_object(cref::DisjunctionRef)

Return the underlying constraint data for the constraint referenced by cref.

source
JuMP.constraint_objectMethod
JuMP.constraint_object(cref::LogicalConstraintRef)

Return the underlying constraint data for the constraint referenced by cref.

source
JuMP.deleteMethod
JuMP.delete(model::JuMP.Model, cref::DisjunctConstraintRef)

Delete a disjunct constraint from the GDP model.

source
JuMP.deleteMethod
JuMP.delete(model::JuMP.Model, cref::DisjunctionRef)

Delete a disjunction constraint from the GDP model.

source
JuMP.deleteMethod
JuMP.delete(model::JuMP.Model, cref::LogicalConstraintRef)

Delete a logical constraint from the GDP model.

source
JuMP.deleteMethod
JuMP.delete(model::JuMP.Model, vref::LogicalVariableRef)

Delete the logical variable associated with vref from the GDP model.

source
JuMP.fixMethod
JuMP.fix(vref::LogicalVariableRef, value::Bool)

Fix a logical variable to a value. Update the fixing constraint if one exists, otherwise create a new one.

source
JuMP.fix_valueMethod
JuMP.fix_value(vref::LogicalVariableRef)

Return the value to which a logical variable is fixed.

source
JuMP.indexMethod
JuMP.index(cref::DisjunctConstraintRef)

Return the index constraint associated with cref.

source
JuMP.indexMethod
JuMP.index(cref::DisjunctionRef)

Return the index constraint associated with cref.

source
JuMP.indexMethod
JuMP.index(cref::LogicalConstraintRef)

Return the index constraint associated with cref.

source
JuMP.indexMethod
JuMP.index(vref::LogicalVariableRef)

Return the index of logical variable that associated with vref.

source
JuMP.is_fixedMethod
JuMP.is_fixed(vref::LogicalVariableRef)

Return true if vref is a fixed variable. If true, the fixed value can be queried with fix_value.

source
JuMP.is_validMethod
JuMP.is_valid(model::JuMP.Model, cref::DisjunctConstraintRef)

Return true if cref refers to a valid constraint in the GDP model.

source
JuMP.is_validMethod
JuMP.is_valid(model::JuMP.Model, cref::DisjunctionRef)

Return true if cref refers to a valid constraint in the GDP model.

source
JuMP.is_validMethod
JuMP.is_valid(model::JuMP.Model, cref::LogicalConstraintRef)

Return true if cref refers to a valid constraint in the GDP model.

source
JuMP.is_validMethod
JuMP.is_valid(model::JuMP.Model, vref::LogicalVariableRef)

Return true if vref refers to a valid logical variable in GDP model.

source
JuMP.isequal_canonicalMethod
JuMP.isequal_canonical(v::LogicalVariableRef, w::LogicalVariableRef)

Return true if v and w refer to the same logical variable in the same GDP model.

source
JuMP.nameMethod
JuMP.name(cref::DisjunctConstraintRef)

Get a constraint's name attribute.

source
JuMP.nameMethod
JuMP.name(cref::DisjunctionRef)

Get a constraint's name attribute.

source
JuMP.nameMethod
JuMP.name(cref::LogicalConstraintRef)

Get a constraint's name attribute.

source
JuMP.nameMethod
JuMP.name(vref::LogicalVariableRef)

Get a logical variable's name attribute.

source
JuMP.owner_modelMethod
JuMP.owner_model(cref::DisjunctConstraintRef)

Return the model to which cref belongs.

source
JuMP.owner_modelMethod
JuMP.owner_model(cref::DisjunctionRef)

Return the model to which cref belongs.

source
JuMP.owner_modelMethod
JuMP.owner_model(cref::LogicalConstraintRef)

Return the model to which cref belongs.

source
JuMP.owner_modelMethod
JuMP.owner_model(vref::LogicalVariableRef)

Return the GDP model to which vref belongs.

source
JuMP.set_nameMethod
JuMP.set_name(cref::DisjunctConstraintRef, name::String)

Set a constraint's name attribute.

source
JuMP.set_nameMethod
JuMP.set_name(cref::DisjunctionRef, name::String)

Set a constraint's name attribute.

source
JuMP.set_nameMethod
JuMP.set_name(cref::LogicalConstraintRef, name::String)

Set a constraint's name attribute.

source
JuMP.set_nameMethod
JuMP.set_name(vref::LogicalVariableRef, name::String)

Set a logical variable's name attribute.

source
JuMP.set_start_valueMethod
JuMP.set_start_value(vref::LogicalVariableRef, value::Union{Nothing, Bool})

Set the start value of the logical variable vref.

Pass nothing to unset the start value.

source
JuMP.start_valueMethod
JuMP.start_value(vref::LogicalVariableRef)

Return the start value of the logical variable vref.

source
JuMP.unfixMethod
JuMP.unfix(vref::LogicalVariableRef)

Delete the fixed value of a logical variable.

source
diff --git a/dev/index.html b/dev/index.html index 4a59f0f..574a7f5 100644 --- a/dev/index.html +++ b/dev/index.html @@ -82,4 +82,4 @@ # x[2]_Y[2] ≤ 20 # x[1]_Y[2] ≤ 20 # Y[1] binary -# Y[2] binary

Contributing

DisjunctiveProgramming is being actively developed and suggestions or other forms of contribution are encouraged. There are many ways to contribute to this package. Feel free to create an issue to address questions or provide feedback.

+# Y[2] binary

Contributing

DisjunctiveProgramming is being actively developed and suggestions or other forms of contribution are encouraged. There are many ways to contribute to this package. Feel free to create an issue to address questions or provide feedback.

diff --git a/dev/search_index.js b/dev/search_index.js index be5b326..6e10e33 100644 --- a/dev/search_index.js +++ b/dev/search_index.js @@ -1,3 +1,3 @@ var documenterSearchIndex = {"docs": -[{"location":"api/#API","page":"API","title":"API","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"Modules = [DisjunctiveProgramming]\nOrder = [:type, :function]","category":"page"},{"location":"api/#DisjunctiveProgramming.AbstractReformulationMethod","page":"API","title":"DisjunctiveProgramming.AbstractReformulationMethod","text":"AbstractReformulationMethod <: AbstractSolutionMethod\n\nAn abstract type for reformulation approaches used to solve GDPModels.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.AbstractSolutionMethod","page":"API","title":"DisjunctiveProgramming.AbstractSolutionMethod","text":"AbstractSolutionMethod\n\nAn abstract type for solution methods used to solve GDPModels.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.AtLeast","page":"API","title":"DisjunctiveProgramming.AtLeast","text":"AtLeast{T<:Union{Int,LogicalVariableRef}} <: JuMP.AbstractVectorSet\n\nConvenient alias for using _MOIAtLeast.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.AtMost","page":"API","title":"DisjunctiveProgramming.AtMost","text":"AtMost{T<:Union{Int,LogicalVariableRef}} <: JuMP.AbstractVectorSet\n\nConvenient alias for using _MOIAtMost.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.BigM","page":"API","title":"DisjunctiveProgramming.BigM","text":"BigM <: AbstractReformulationMethod\n\nA type for using the big-M reformulation approach for disjunctive constraints.\n\nFields\n\nvalue::Float64: Big-M value (default = 1e9).\ntight::Bool: Attempt to tighten the Big-M value (default = true)?\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.ConstraintData","page":"API","title":"DisjunctiveProgramming.ConstraintData","text":"ConstraintData{C <: JuMP.AbstractConstraint}\n\nA type for storing constraint objects in GDPData and any meta-data they possess.\n\nFields\n\nconstraint::C: The constraint.\nname::String: The name of the proposition.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.DisjunctConstraint","page":"API","title":"DisjunctiveProgramming.DisjunctConstraint","text":"DisjunctConstraint\n\nUsed as a tag for constraints that will be used in disjunctions. This is done via the following syntax:\n\njulia> @constraint(model, [constr_expr], DisjunctConstraint)\n\njulia> @constraint(model, [constr_expr], DisjunctConstraint(lvref))\n\nwhere lvref is a LogicalVariableRef that will ultimately be associated with the disjunct the constraint is added to. If no lvref is given, then one is generated when the disjunction is created.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.DisjunctConstraintIndex","page":"API","title":"DisjunctiveProgramming.DisjunctConstraintIndex","text":"DisjunctConstraintIndex\n\nA type for storing the index of a DisjunctConstraint.\n\nFields\n\nvalue::Int64: The index value.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.DisjunctConstraintRef","page":"API","title":"DisjunctiveProgramming.DisjunctConstraintRef","text":"DisjunctConstraintRef\n\nA type for looking up disjunctive constraints.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.Disjunction","page":"API","title":"DisjunctiveProgramming.Disjunction","text":"Disjunction <: JuMP.AbstractConstraint\n\nA type for a disjunctive constraint that is comprised of a collection of disjuncts of indicated by a unique LogicalVariableRef.\n\nFields\n\nindicators::Vector{LogicalVariableRef}: The references to the logical variables \n\n(indicators) that uniquely identify each disjunct in the disjunction.\n\nnested::Bool: Is this disjunction nested within another disjunction?\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.DisjunctionIndex","page":"API","title":"DisjunctiveProgramming.DisjunctionIndex","text":"DisjunctionIndex\n\nA type for storing the index of a Disjunction.\n\nFields\n\nvalue::Int64: The index value.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.DisjunctionRef","page":"API","title":"DisjunctiveProgramming.DisjunctionRef","text":"DisjunctionRef\n\nA type for looking up disjunctive constraints.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.Exactly","page":"API","title":"DisjunctiveProgramming.Exactly","text":"Exactly <: JuMP.AbstractVectorSet\n\nConvenient alias for using _MOIExactly.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.GDPData","page":"API","title":"DisjunctiveProgramming.GDPData","text":"GDPData\n\nThe core type for storing information in a GDPModel.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.Hull","page":"API","title":"DisjunctiveProgramming.Hull","text":"Hull <: AbstractReformulationMethod\n\nA type for using the convex hull reformulation approach for disjunctive constraints.\n\nFields\n\nvalue::Float64: epsilon value for nonlinear hull reformulations (default = 1e-6).\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.Indicator","page":"API","title":"DisjunctiveProgramming.Indicator","text":"Indicator <: AbstractReformulationMethod\n\nA type for using indicator constraint approach for linear disjunctive constraints.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.LogicalConstraintIndex","page":"API","title":"DisjunctiveProgramming.LogicalConstraintIndex","text":"LogicalConstraintIndex\n\nA type for storing the index of a logical constraint.\n\nFields\n\nvalue::Int64: The index value.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.LogicalConstraintRef","page":"API","title":"DisjunctiveProgramming.LogicalConstraintRef","text":"LogicalConstraintRef\n\nA type for looking up logical constraints.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.LogicalVariable","page":"API","title":"DisjunctiveProgramming.LogicalVariable","text":"LogicalVariable <: JuMP.AbstractVariable\n\nA variable type the logical variables associated with disjuncts in a Disjunction.\n\nFields\n\nfix_value::Union{Nothing, Bool}: A fixed boolean value if there is one.\nstart_value::Union{Nothing, Bool}: An initial guess if there is one.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.LogicalVariableData","page":"API","title":"DisjunctiveProgramming.LogicalVariableData","text":"LogicalVariableData\n\nA type for storing LogicalVariables and any meta-data they possess.\n\nFields\n\nvariable::LogicalVariable: The variable object.\nname::String: The name of the variable.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.LogicalVariableIndex","page":"API","title":"DisjunctiveProgramming.LogicalVariableIndex","text":"LogicalVariableIndex\n\nA type for storing the index of a LogicalVariable.\n\nFields\n\nvalue::Int64: The index value.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.LogicalVariableRef","page":"API","title":"DisjunctiveProgramming.LogicalVariableRef","text":"LogicalVariableRef\n\nA type for looking up logical variables.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming._MOIAtLeast","page":"API","title":"DisjunctiveProgramming._MOIAtLeast","text":"_MOIAtLeast <: _MOI.AbstractVectorSet\n\nMOI level set for AtLeast constraints, see AtLeast for recommended syntax.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming._MOIAtMost","page":"API","title":"DisjunctiveProgramming._MOIAtMost","text":"_MOIAtMost <: _MOI.AbstractVectorSet\n\nMOI level set for AtMost constraints, see AtMost for recommended syntax.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming._MOIExactly","page":"API","title":"DisjunctiveProgramming._MOIExactly","text":"_MOIExactly <: _MOI.AbstractVectorSet\n\nMOI level set for Exactly constraints, see Exactly for recommended syntax.\n\n\n\n\n\n","category":"type"},{"location":"api/#Base.getindex-Tuple{ReferenceMap, DisjunctConstraintRef}","page":"API","title":"Base.getindex","text":"Base.getindex(map::JuMP.GenericReferenceMap, cref::DisjunctConstraintRef)\n\n...\n\n\n\n\n\n","category":"method"},{"location":"api/#Base.getindex-Tuple{ReferenceMap, DisjunctionRef}","page":"API","title":"Base.getindex","text":"Base.getindex(map::JuMP.GenericReferenceMap, cref::DisjunctionRef)\n\n...\n\n\n\n\n\n","category":"method"},{"location":"api/#Base.getindex-Tuple{ReferenceMap, LogicalConstraintRef}","page":"API","title":"Base.getindex","text":"Base.getindex(map::JuMP.GenericReferenceMap, cref::LogicalConstraintRef)\n\n...\n\n\n\n\n\n","category":"method"},{"location":"api/#DisjunctiveProgramming.GDPModel-Tuple","page":"API","title":"DisjunctiveProgramming.GDPModel","text":"GDPModel([optimizer]; [kwargs...])::JuMP.Model\n\nThe core model object for building general disjunction programming models.\n\n\n\n\n\n","category":"method"},{"location":"api/#DisjunctiveProgramming.disjunction","page":"API","title":"DisjunctiveProgramming.disjunction","text":"disjunction(\n model::JuMP.Model, \n disjunct_indicators::Vector{LogicalVariableRef}\n name::String = \"\"\n)\n\nFunction to add a Disjunction to a GDPModel.\n\ndisjunction(\n model::JuMP.Model, \n disjunct_indicators::Vector{LogicalVariableRef},\n nested_tag::DisjunctConstraint,\n name::String = \"\"\n)\n\nFunction to add a nested Disjunction to a GDPModel.\n\n\n\n\n\n","category":"function"},{"location":"api/#DisjunctiveProgramming.disjunction_indicators-Tuple{DisjunctionRef}","page":"API","title":"DisjunctiveProgramming.disjunction_indicators","text":"disjunction_indicators(disjunction::DisjunctionRef)\n\nReturn LogicalVariableRefs associated with a disjunction.\n\n\n\n\n\n","category":"method"},{"location":"api/#DisjunctiveProgramming.gdp_data-Tuple{Model}","page":"API","title":"DisjunctiveProgramming.gdp_data","text":"gdp_data(model::JuMP.Model)::GDPData\n\nExtract the GDPData from a GDPModel.\n\n\n\n\n\n","category":"method"},{"location":"api/#DisjunctiveProgramming.is_gdp_model-Tuple{Model}","page":"API","title":"DisjunctiveProgramming.is_gdp_model","text":"is_gdp_model(model::JuMP.Model)::Bool\n\nReturn if model was created via the GDPModel constructor.\n\n\n\n\n\n","category":"method"},{"location":"api/#DisjunctiveProgramming.reformulate_model-Tuple{Model, AbstractSolutionMethod}","page":"API","title":"DisjunctiveProgramming.reformulate_model","text":"reformulate_model(model::JuMP.Model, method::AbstractSolutionMethod)\n\nReformulate a GDPModel using the specified method. Prior to reformulation, all previous reformulation variables and constraints are deleted.\n\n\n\n\n\n","category":"method"},{"location":"api/#DisjunctiveProgramming.to_cnf!-Tuple{Expr}","page":"API","title":"DisjunctiveProgramming.to_cnf!","text":"to_cnf!(expr::Expr)\n\nConvert an expression of symbolic Boolean variables and operators to CNF.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.add_constraint","page":"API","title":"JuMP.add_constraint","text":"JuMP.add_constraint(\n model::JuMP.Model,\n con::_DisjunctConstraint,\n name::String = \"\"\n)::DisjunctConstraintRef\n\nExtend JuMP.add_constraint to add a DisjunctConstraint to a GDPModel. The constraint is added to the GDPData in the .ext dictionary of the GDPModel.\n\n\n\n\n\n","category":"function"},{"location":"api/#JuMP.add_constraint-Union{Tuple{S}, Tuple{F}, Tuple{Model, ScalarConstraint{F, S}}, Tuple{Model, ScalarConstraint{F, S}, String}} where {F<:Union{LogicalVariableRef, GenericNonlinearExpr{LogicalVariableRef}}, S<:IsTrue}","page":"API","title":"JuMP.add_constraint","text":"function JuMP.add_constraint(\n model::JuMP.Model,\n c::JuMP.ScalarConstraint{<:F, S},\n name::String = \"\"\n) where {F <: Union{LogicalVariableRef, _LogicalExpr}, S}\n\nExtend JuMP.add_constraint to allow creating logical proposition constraints for a GDPModel with the @constraint macro.\n\nfunction JuMP.add_constraint(\n model::JuMP.Model,\n c::JuMP.VectorConstraint{<:F, S, Shape},\n name::String = \"\"\n) where {F <: Union{Number, LogicalVariableRef, _LogicalExpr}, S, Shape}\n\nExtend JuMP.add_constraint to allow creating logical cardinality constraints for a GDPModel with the @constraint macro.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.add_variable","page":"API","title":"JuMP.add_variable","text":"JuMP.add_variable(model::JuMP.Model, v::LogicalVariable, \n name::String = \"\")::LogicalVariableRef\n\nExtend JuMP.add_variable for LogicalVariables. This helps enable @variable(model, [var_expr], Logical).\n\n\n\n\n\n","category":"function"},{"location":"api/#JuMP.build_constraint-Tuple{Function, Any, MathOptInterface.AbstractScalarSet, DisjunctConstraint}","page":"API","title":"JuMP.build_constraint","text":"JuMP.build_constraint(\n _error::Function, \n func, \n set::_MOI.AbstractScalarSet,\n tag::DisjunctConstraint\n)::_DisjunctConstraint\n\nExtend JuMP.build_constraint to add constraints to disjuncts. This in combination with JuMP.add_constraint enables the use of @constraint(model, [name], constr_expr, tag), where tag is a DisjunctConstraint(::Type{LogicalVariableRef}). The user must specify the LogicalVariable to use as the indicator for the _DisjunctConstraint being created.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.build_constraint-Tuple{Function, Any, MathOptInterface.Nonnegatives, DisjunctConstraint}","page":"API","title":"JuMP.build_constraint","text":"JuMP.build_constraint(\n _error::Function, \n func, \n set::MathOptInterface.Nonnegatives,\n tag::DisjunctConstraint\n)::_DisjunctConstraint\n\nExtend JuMP.build_constraint to add VectorConstraints to disjuncts.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.build_constraint-Tuple{Function, Any, MathOptInterface.Nonpositives, DisjunctConstraint}","page":"API","title":"JuMP.build_constraint","text":"JuMP.build_constraint(\n _error::Function, \n func, \n set::MathOptInterface.Nonpositives,\n tag::DisjunctConstraint\n)::_DisjunctConstraint\n\nExtend JuMP.build_constraint to add VectorConstraints to disjuncts.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.build_constraint-Tuple{Function, Any, MathOptInterface.Zeros, DisjunctConstraint}","page":"API","title":"JuMP.build_constraint","text":"JuMP.build_constraint(\n _error::Function, \n func, \n set::MathOptInterface.Zeros,\n tag::DisjunctConstraint\n)::_DisjunctConstraint\n\nExtend JuMP.build_constraint to add VectorConstraints to disjuncts.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.build_constraint-Tuple{Function, Any, Nonnegatives, DisjunctConstraint}","page":"API","title":"JuMP.build_constraint","text":"JuMP.build_constraint(\n _error::Function, \n func, \n set::Nonnegatives,\n tag::DisjunctConstraint\n)::_DisjunctConstraint\n\nExtend JuMP.build_constraint to add VectorConstraints to disjuncts.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.build_constraint-Tuple{Function, Any, Nonpositives, DisjunctConstraint}","page":"API","title":"JuMP.build_constraint","text":"JuMP.build_constraint(\n _error::Function, \n func, \n set::Nonpositives,\n tag::DisjunctConstraint\n)::_DisjunctConstraint\n\nExtend JuMP.build_constraint to add VectorConstraints to disjuncts.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.build_constraint-Tuple{Function, Any, Zeros, DisjunctConstraint}","page":"API","title":"JuMP.build_constraint","text":"JuMP.build_constraint(\n _error::Function, \n func, \n set::Zeros,\n tag::DisjunctConstraint\n)::_DisjunctConstraint\n\nExtend JuMP.build_constraint to add VectorConstraints to disjuncts.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.build_constraint-Union{Tuple{S}, Tuple{T}, Tuple{Function, AbstractVector{T}, S}} where {T<:LogicalVariableRef, S<:Union{AtLeast, AtMost, Exactly}}","page":"API","title":"JuMP.build_constraint","text":"function JuMP.build_constraint(\n _error::Function, \n func::AbstractVector{T},\n set::S\n) where {T <: Union{LogicalVariableRef, _LogicalExpr}, S <: Union{Exactly, AtLeast, AtMost}}\n\nExtend JuMP.build_constraint to add logical cardinality constraints to a GDPModel. This in combination with JuMP.add_constraint enables the use of @constraint(model, [name], logical_expr in set), where set can be either of the following cardinality sets: AtLeast(n), AtMost(n), or Exactly(n).\n\nExample\n\nTo select exactly 1 logical variable Y to be true, do (the same can be done with AtLeast(n) and AtMost(n)):\n\nusing DisjunctiveProgramming\nmodel = GDPModel();\n@variable(model, Y[i = 1:2], LogicalVariable);\n@constraint(model, [Y[1], Y[2]] in Exactly(1));\n\nJuMP.build_constraint(\n _error::Function, \n func::_LogicalExpr,\n set::IsTrue\n)\n\nExtend JuMP.build_constraint to add logical propositional constraints to a GDPModel. This in combination with JuMP.add_constraint enables the use of @constraint(model, [name], logical_expr in IsTrue()) to define a Boolean expression that must either be true or false.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.build_variable-Tuple{Function, VariableInfo, Type{LogicalVariable}}","page":"API","title":"JuMP.build_variable","text":"JuMP.build_variable(_error::Function, info::JuMP.VariableInfo, \n ::Type{LogicalVariable})::LogicalVariable\n\nExtend JuMP.build_variable to work with logical variables. This in combination with JuMP.add_variable enables the use of @variable(model, [var_expr], LogicalVariable).\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.constraint_object-Tuple{DisjunctConstraintRef}","page":"API","title":"JuMP.constraint_object","text":"JuMP.constraint_object(cref::DisjunctConstraintRef)\n\nReturn the underlying constraint data for the constraint referenced by cref.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.constraint_object-Tuple{DisjunctionRef}","page":"API","title":"JuMP.constraint_object","text":"JuMP.constraint_object(cref::DisjunctionRef)\n\nReturn the underlying constraint data for the constraint referenced by cref.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.constraint_object-Tuple{LogicalConstraintRef}","page":"API","title":"JuMP.constraint_object","text":"JuMP.constraint_object(cref::LogicalConstraintRef)\n\nReturn the underlying constraint data for the constraint referenced by cref.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.delete-Tuple{Model, DisjunctConstraintRef}","page":"API","title":"JuMP.delete","text":"JuMP.delete(model::JuMP.Model, cref::DisjunctConstraintRef)\n\nDelete a disjunct constraint from the GDP model.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.delete-Tuple{Model, DisjunctionRef}","page":"API","title":"JuMP.delete","text":"JuMP.delete(model::JuMP.Model, cref::DisjunctionRef)\n\nDelete a disjunction constraint from the GDP model.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.delete-Tuple{Model, LogicalConstraintRef}","page":"API","title":"JuMP.delete","text":"JuMP.delete(model::JuMP.Model, cref::LogicalConstraintRef)\n\nDelete a logical constraint from the GDP model.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.delete-Tuple{Model, LogicalVariableRef}","page":"API","title":"JuMP.delete","text":"JuMP.delete(model::JuMP.Model, vref::LogicalVariableRef)\n\nDelete the logical variable associated with vref from the GDP model.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.fix-Tuple{LogicalVariableRef, Bool}","page":"API","title":"JuMP.fix","text":"JuMP.fix(vref::LogicalVariableRef, value::Bool)\n\nFix a logical variable to a value. Update the fixing constraint if one exists, otherwise create a new one.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.fix_value-Tuple{LogicalVariableRef}","page":"API","title":"JuMP.fix_value","text":"JuMP.fix_value(vref::LogicalVariableRef)\n\nReturn the value to which a logical variable is fixed.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.index-Tuple{DisjunctConstraintRef}","page":"API","title":"JuMP.index","text":"JuMP.index(cref::DisjunctConstraintRef)\n\nReturn the index constraint associated with cref.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.index-Tuple{DisjunctionRef}","page":"API","title":"JuMP.index","text":"JuMP.index(cref::DisjunctionRef)\n\nReturn the index constraint associated with cref.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.index-Tuple{LogicalConstraintRef}","page":"API","title":"JuMP.index","text":"JuMP.index(cref::LogicalConstraintRef)\n\nReturn the index constraint associated with cref.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.index-Tuple{LogicalVariableRef}","page":"API","title":"JuMP.index","text":"JuMP.index(vref::LogicalVariableRef)\n\nReturn the index of logical variable that associated with vref.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.is_fixed-Tuple{LogicalVariableRef}","page":"API","title":"JuMP.is_fixed","text":"JuMP.is_fixed(vref::LogicalVariableRef)\n\nReturn true if vref is a fixed variable. If true, the fixed value can be queried with fix_value.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.is_valid-Tuple{Model, DisjunctConstraintRef}","page":"API","title":"JuMP.is_valid","text":"JuMP.is_valid(model::JuMP.Model, cref::DisjunctConstraintRef)\n\nReturn true if cref refers to a valid constraint in the GDP model.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.is_valid-Tuple{Model, DisjunctionRef}","page":"API","title":"JuMP.is_valid","text":"JuMP.is_valid(model::JuMP.Model, cref::DisjunctionRef)\n\nReturn true if cref refers to a valid constraint in the GDP model.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.is_valid-Tuple{Model, LogicalConstraintRef}","page":"API","title":"JuMP.is_valid","text":"JuMP.is_valid(model::JuMP.Model, cref::LogicalConstraintRef)\n\nReturn true if cref refers to a valid constraint in the GDP model.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.is_valid-Tuple{Model, LogicalVariableRef}","page":"API","title":"JuMP.is_valid","text":"JuMP.is_valid(model::JuMP.Model, vref::LogicalVariableRef)\n\nReturn true if vref refers to a valid logical variable in GDP model.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.isequal_canonical-Tuple{LogicalVariableRef, LogicalVariableRef}","page":"API","title":"JuMP.isequal_canonical","text":"JuMP.isequal_canonical(v::LogicalVariableRef, w::LogicalVariableRef)\n\nReturn true if v and w refer to the same logical variable in the same GDP model.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.name-Tuple{DisjunctConstraintRef}","page":"API","title":"JuMP.name","text":"JuMP.name(cref::DisjunctConstraintRef)\n\nGet a constraint's name attribute.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.name-Tuple{DisjunctionRef}","page":"API","title":"JuMP.name","text":"JuMP.name(cref::DisjunctionRef)\n\nGet a constraint's name attribute.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.name-Tuple{LogicalConstraintRef}","page":"API","title":"JuMP.name","text":"JuMP.name(cref::LogicalConstraintRef)\n\nGet a constraint's name attribute.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.name-Tuple{LogicalVariableRef}","page":"API","title":"JuMP.name","text":"JuMP.name(vref::LogicalVariableRef)\n\nGet a logical variable's name attribute.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.owner_model-Tuple{DisjunctConstraintRef}","page":"API","title":"JuMP.owner_model","text":"JuMP.owner_model(cref::DisjunctConstraintRef)\n\nReturn the model to which cref belongs.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.owner_model-Tuple{DisjunctionRef}","page":"API","title":"JuMP.owner_model","text":"JuMP.owner_model(cref::DisjunctionRef)\n\nReturn the model to which cref belongs.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.owner_model-Tuple{LogicalConstraintRef}","page":"API","title":"JuMP.owner_model","text":"JuMP.owner_model(cref::LogicalConstraintRef)\n\nReturn the model to which cref belongs.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.owner_model-Tuple{LogicalVariableRef}","page":"API","title":"JuMP.owner_model","text":"JuMP.owner_model(vref::LogicalVariableRef)\n\nReturn the GDP model to which vref belongs.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.set_name-Tuple{DisjunctConstraintRef, String}","page":"API","title":"JuMP.set_name","text":"JuMP.set_name(cref::DisjunctConstraintRef, name::String)\n\nSet a constraint's name attribute.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.set_name-Tuple{DisjunctionRef, String}","page":"API","title":"JuMP.set_name","text":"JuMP.set_name(cref::DisjunctionRef, name::String)\n\nSet a constraint's name attribute.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.set_name-Tuple{LogicalConstraintRef, String}","page":"API","title":"JuMP.set_name","text":"JuMP.set_name(cref::LogicalConstraintRef, name::String)\n\nSet a constraint's name attribute.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.set_name-Tuple{LogicalVariableRef, String}","page":"API","title":"JuMP.set_name","text":"JuMP.set_name(vref::LogicalVariableRef, name::String)\n\nSet a logical variable's name attribute.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.set_start_value-Tuple{LogicalVariableRef, Union{Nothing, Bool}}","page":"API","title":"JuMP.set_start_value","text":"JuMP.set_start_value(vref::LogicalVariableRef, value::Union{Nothing, Bool})\n\nSet the start value of the logical variable vref.\n\nPass nothing to unset the start value.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.start_value-Tuple{LogicalVariableRef}","page":"API","title":"JuMP.start_value","text":"JuMP.start_value(vref::LogicalVariableRef)\n\nReturn the start value of the logical variable vref.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.unfix-Tuple{LogicalVariableRef}","page":"API","title":"JuMP.unfix","text":"JuMP.unfix(vref::LogicalVariableRef)\n\nDelete the fixed value of a logical variable.\n\n\n\n\n\n","category":"method"},{"location":"#DisjunctiveProgramming.jl","page":"Home","title":"DisjunctiveProgramming.jl","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Generalized Disjunctive Programming (GDP) extension to JuMP, based on the GDP modeling paradigm described in Perez and Grossmann, 2023.","category":"page"},{"location":"","page":"Home","title":"Home","text":"(Image: )","category":"page"},{"location":"","page":"Home","title":"Home","text":"(Image: codecov) (Image: Docs) (Image: Docs)","category":"page"},{"location":"#Installation","page":"Home","title":"Installation","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"using Pkg\nPkg.add(\"DisjunctiveProgramming\")","category":"page"},{"location":"#Model","page":"Home","title":"Model","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"A generalized disjunctive programming (GDP) model is created using GDPModel(), where the optimizer can be passed at model creation, along with other keyword arguments supported by JuMP Models. ","category":"page"},{"location":"","page":"Home","title":"Home","text":"using DisjunctiveProgramming\nusing HiGHS\n\nmodel = GDPModel(HiGHS.Optimizer)","category":"page"},{"location":"","page":"Home","title":"Home","text":"A GDPModel is a JuMP Model with a GDPData field in the model's .ext dictionary, which stores the following:","category":"page"},{"location":"","page":"Home","title":"Home","text":"Logical Variables: Indicator variables used for the various disjuncts involved in the model's disjunctions.\nLogical Constraints: Selector (cardinality) or proposition (Boolean) constraints describing the relationships between the logical variables.\nDisjunct Constraints: Constraints associated with each disjunct in the model.\nDisjunctions: Disjunction constraints.\nSolution Method: The reformulation technique or solution method. Currently supported methods include Big-M, Hull, and Indicator Constraints.\nReformulation Variables: List of JuMP variables created when reformulating a GDP model into a MIP model.\nReformulation Constraints: List of constraints created when reformulating a GDP model into a MIP model.\nReady to Optimize: Flag indicating if the model can be optimized.","category":"page"},{"location":"","page":"Home","title":"Home","text":"Additionally, the following mapping dictionaries are stored in GDPData:","category":"page"},{"location":"","page":"Home","title":"Home","text":"Indicator to Binary: Maps the Logical variables to their respective reformulated Binary variables.\nIndicator to Constraints: Maps the Logical variables to the disjunct constraints associated with them.","category":"page"},{"location":"","page":"Home","title":"Home","text":"A GDP Model's GDPData can be accessed via:","category":"page"},{"location":"","page":"Home","title":"Home","text":"data = gdp_data(model)","category":"page"},{"location":"#Logical-Variables","page":"Home","title":"Logical Variables","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Logical variables are JuMP AbstractVariables with two fields: fix_value and start_value. These can be optionally specified at variable creation. Logical variables are created with the @variable JuMP macro by adding the tag Logical as the last keyword argument. As with the regular @variable macro, variables can be named and indexed: ","category":"page"},{"location":"","page":"Home","title":"Home","text":"@variable(model, Y[1:3], Logical)","category":"page"},{"location":"#Logical-Constraints","page":"Home","title":"Logical Constraints","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Two types of logical constraints are supported:","category":"page"},{"location":"","page":"Home","title":"Home","text":"Selector or cardinality constraints: A subset of Logical variables is passed and Exactly, AtMost, or AtLeast n of these is allowed to be True. These constraints are specified with the func in set notation in MathOptInterface in a @constraint JuMP macro. It is not assumed that disjunctions have an Exactly(1) constraint enforced on their disjuncts upon creation. This constraint must be explicitly specified.\njulia @constraint(model, [Y[1], Y[2]] in Exactly(1))\nProposition or Boolean constraints: These describe the relationships between Logical variables via Boolean algebra. Supported logical operators include:\n∨ or logical_or (OR, typed with \\vee + tab).\n∧ or logical_and (AND, typed with \\wedge + tab).\n¬ or logical_not (NOT, typed with \\neg + tab).\n⟹ of implies (Implication, typed with \\Longrightarrow + tab).\n⇔ or iff (double implication or equivalence, typed with \\Leftrightarrow + tab).\nThe @constraint JuMP macro is used to create these constraints with the IsTrue set:\njulia @constraint(model, (Y[1] ⟹ Y[2]) in IsTrue())\nNote: The parenthesis in the example above around the implication clause are only required when the parent logical operator is ⟹ or ⇔ to avoid parsing errors.\nLogical propositions can be reformulated to IP constraints by automatic reformulation to Conjunctive Normal Form.","category":"page"},{"location":"#Disjunctions","page":"Home","title":"Disjunctions","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Disjunctions are built by first defining the constraints associated with each disjunct. This is done via the @constraint JuMP macro with the extra DisjunctConstraint tag specifying the Logical variable associated with the constraint:","category":"page"},{"location":"","page":"Home","title":"Home","text":"@variable(model, x)\n@constraint(model, x ≤ 100, DisjunctConstraint(Y[1]))\n@constraint(model, x ≥ 200, DisjunctConstraint(Y[2]))","category":"page"},{"location":"","page":"Home","title":"Home","text":"After all disjunct constraints associated with a disjunction have been defined, the disjunction is created with the @disjunction macro, where the disjunction is defined as a Vector of Logical variables associated with each disjunct:","category":"page"},{"location":"","page":"Home","title":"Home","text":"@disjunction(model, [Y[1], Y[2]])","category":"page"},{"location":"","page":"Home","title":"Home","text":"Disjunctions can be nested by passing an additional DisjunctConstraint tag. The Logical variable in the DisjunctConstraint tag specifies which disjunct, the nested disjunction belongs to:","category":"page"},{"location":"","page":"Home","title":"Home","text":"@disjunction(model, Y[1:2], DisjunctConstraint(Y[3]))","category":"page"},{"location":"","page":"Home","title":"Home","text":"Empty disjuncts are supported in GDP models. When used, the only constraints enforced on the model when the empty disjunct is selected are the global constraints and any other disjunction constraints defined.","category":"page"},{"location":"#MIP-Reformulations","page":"Home","title":"MIP Reformulations","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"The following reformulation methods are currently supported:","category":"page"},{"location":"","page":"Home","title":"Home","text":"Big-M: The BigM struct is created with the following optional arguments:\nvalue: Big-M value to use. Default: 1e9. Big-M values are currently global to the model. Constraint specific Big-M values can be supported in future releases.\ntighten: Boolean indicating if tightening the Big-M value should be attempted (currently supported only for linear disjunct constraints when variable bounds have been set or specified in the variable_bounds field). Default: true.\nvariable_bounds: Dictionary specifying the lower and upper bounds for each VariableRef (e.g., Dict(x => (lb, ub))). Default: populate when calling the reformulation method.\nHull: The Hull struct is created with the following optional arguments:\nvalue: ϵ value to use when reformulating quadratic or nonlinear constraints via the perspective function proposed by Furman, et al. [2020]. Default: 1e-6. ϵ values are currently global to the model. Constraint specific tolerances can be supported in future releases.\nvariable_bounds: Dictionary specifying the lower and upper bounds for each VariableRef (e.g., Dict(x => (lb, ub))). Default: populate when calling the reformulation method.\nIndicator: This method reformulates each disjunct constraint into an indicator constraint with the Boolean reformulation counterpart of the Logical variable used to define the disjunct constraint.","category":"page"},{"location":"#Release-Notes","page":"Home","title":"Release Notes","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Prior to v0.4.0, the package did not leverage the JuMP extension capabilities and was not as robust. For these earlier releases, refer to Perez, Joshi, and Grossmann, 2023 and the following JuliaCon 2022 Talk.","category":"page"},{"location":"#Example","page":"Home","title":"Example","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"The example below is from the Cornell University Computational Optimization Open Textbook.","category":"page"},{"location":"","page":"Home","title":"Home","text":"using DisjunctiveProgramming\nusing HiGHS\n\nm = GDPModel(HiGHS.Optimizer)\n@variable(m, 0 ≤ x[1:2] ≤ 20)\n@variable(m, Y[1:2], Logical)\n@constraint(m, [i = 1:2], [2,5][i] ≤ x[i] ≤ [6,9][i], DisjunctConstraint(Y[1]))\n@constraint(m, [i = 1:2], [8,10][i] ≤ x[i] ≤ [11,15][i], DisjunctConstraint(Y[2]))\n@disjunction(m, Y)\n@constraint(m, Y in Exactly(1)) #logical constraint\n@objective(m, Max, sum(x))\nprint(m)\n# Max x[1] + x[2]\n# Subject to\n# x[1] ≥ 0\n# x[2] ≥ 0\n# x[1] ≤ 20\n# x[2] ≤ 20\n\n##\noptimize!(m, method = BigM(100, false)) #specify M value and disable M-tightening\nprint(m)\n# Max x[1] + x[2]\n# Subject to\n# Y[1] + Y[2] = 1\n# x[1] - 100 Y[1] ≥ -98\n# x[2] - 100 Y[1] ≥ -95\n# x[1] - 100 Y[2] ≥ -92\n# x[2] - 100 Y[2] ≥ -90\n# x[1] + 100 Y[1] ≤ 106\n# x[2] + 100 Y[1] ≤ 109\n# x[1] + 100 Y[2] ≤ 111\n# x[2] + 100 Y[2] ≤ 115\n# x[1] ≥ 0\n# x[2] ≥ 0\n# x[1] ≤ 20\n# x[2] ≤ 20\n# Y[1] binary\n# Y[2] binary\n\n##\noptimize!(m, method = Hull())\nprint(m)\n# Max x[1] + x[2]\n# Subject to\n# -x[2] + x[2]_Y[1] + x[2]_Y[2] = 0\n# -x[1] + x[1]_Y[1] + x[1]_Y[2] = 0\n# Y[1] + Y[2] = 1\n# -2 Y[1] + x[1]_Y[1] ≥ 0\n# -5 Y[1] + x[2]_Y[1] ≥ 0\n# -8 Y[2] + x[1]_Y[2] ≥ 0\n# -10 Y[2] + x[2]_Y[2] ≥ 0\n# x[2]_Y[1]_lower_bound : -x[2]_Y[1] ≤ 0\n# x[2]_Y[1]_upper_bound : -20 Y[1] + x[2]_Y[1] ≤ 0\n# x[1]_Y[1]_lower_bound : -x[1]_Y[1] ≤ 0\n# x[1]_Y[1]_upper_bound : -20 Y[1] + x[1]_Y[1] ≤ 0\n# x[2]_Y[2]_lower_bound : -x[2]_Y[2] ≤ 0\n# x[2]_Y[2]_upper_bound : -20 Y[2] + x[2]_Y[2] ≤ 0\n# x[1]_Y[2]_lower_bound : -x[1]_Y[2] ≤ 0\n# x[1]_Y[2]_upper_bound : -20 Y[2] + x[1]_Y[2] ≤ 0\n# -6 Y[1] + x[1]_Y[1] ≤ 0\n# -9 Y[1] + x[2]_Y[1] ≤ 0\n# -11 Y[2] + x[1]_Y[2] ≤ 0\n# -15 Y[2] + x[2]_Y[2] ≤ 0\n# x[1] ≥ 0\n# x[2] ≥ 0\n# x[2]_Y[1] ≥ 0\n# x[1]_Y[1] ≥ 0\n# x[2]_Y[2] ≥ 0\n# x[1]_Y[2] ≥ 0\n# x[1] ≤ 20\n# x[2] ≤ 20\n# x[2]_Y[1] ≤ 20\n# x[1]_Y[1] ≤ 20\n# x[2]_Y[2] ≤ 20\n# x[1]_Y[2] ≤ 20\n# Y[1] binary\n# Y[2] binary","category":"page"},{"location":"#Contributing","page":"Home","title":"Contributing","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"DisjunctiveProgramming is being actively developed and suggestions or other forms of contribution are encouraged. There are many ways to contribute to this package. Feel free to create an issue to address questions or provide feedback.","category":"page"}] +[{"location":"api/#API","page":"API","title":"API","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"Modules = [DisjunctiveProgramming]\nOrder = [:type, :function]","category":"page"},{"location":"api/#DisjunctiveProgramming.AbstractReformulationMethod","page":"API","title":"DisjunctiveProgramming.AbstractReformulationMethod","text":"AbstractReformulationMethod <: AbstractSolutionMethod\n\nAn abstract type for reformulation approaches used to solve GDPModels.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.AbstractSolutionMethod","page":"API","title":"DisjunctiveProgramming.AbstractSolutionMethod","text":"AbstractSolutionMethod\n\nAn abstract type for solution methods used to solve GDPModels.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.AtLeast","page":"API","title":"DisjunctiveProgramming.AtLeast","text":"AtLeast{T<:Union{Int,LogicalVariableRef}} <: JuMP.AbstractVectorSet\n\nConvenient alias for using _MOIAtLeast.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.AtMost","page":"API","title":"DisjunctiveProgramming.AtMost","text":"AtMost{T<:Union{Int,LogicalVariableRef}} <: JuMP.AbstractVectorSet\n\nConvenient alias for using _MOIAtMost.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.BigM","page":"API","title":"DisjunctiveProgramming.BigM","text":"BigM <: AbstractReformulationMethod\n\nA type for using the big-M reformulation approach for disjunctive constraints.\n\nFields\n\nvalue::Float64: Big-M value (default = 1e9).\ntight::Bool: Attempt to tighten the Big-M value (default = true)?\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.ConstraintData","page":"API","title":"DisjunctiveProgramming.ConstraintData","text":"ConstraintData{C <: JuMP.AbstractConstraint}\n\nA type for storing constraint objects in GDPData and any meta-data they possess.\n\nFields\n\nconstraint::C: The constraint.\nname::String: The name of the proposition.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.DisjunctConstraint","page":"API","title":"DisjunctiveProgramming.DisjunctConstraint","text":"DisjunctConstraint\n\nUsed as a tag for constraints that will be used in disjunctions. This is done via the following syntax:\n\njulia> @constraint(model, [constr_expr], DisjunctConstraint)\n\njulia> @constraint(model, [constr_expr], DisjunctConstraint(lvref))\n\nwhere lvref is a LogicalVariableRef that will ultimately be associated with the disjunct the constraint is added to. If no lvref is given, then one is generated when the disjunction is created.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.DisjunctConstraintIndex","page":"API","title":"DisjunctiveProgramming.DisjunctConstraintIndex","text":"DisjunctConstraintIndex\n\nA type for storing the index of a DisjunctConstraint.\n\nFields\n\nvalue::Int64: The index value.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.DisjunctConstraintRef","page":"API","title":"DisjunctiveProgramming.DisjunctConstraintRef","text":"DisjunctConstraintRef\n\nA type for looking up disjunctive constraints.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.Disjunction","page":"API","title":"DisjunctiveProgramming.Disjunction","text":"Disjunction <: JuMP.AbstractConstraint\n\nA type for a disjunctive constraint that is comprised of a collection of disjuncts of indicated by a unique LogicalVariableRef.\n\nFields\n\nindicators::Vector{LogicalVariableRef}: The references to the logical variables \n\n(indicators) that uniquely identify each disjunct in the disjunction.\n\nnested::Bool: Is this disjunction nested within another disjunction?\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.DisjunctionIndex","page":"API","title":"DisjunctiveProgramming.DisjunctionIndex","text":"DisjunctionIndex\n\nA type for storing the index of a Disjunction.\n\nFields\n\nvalue::Int64: The index value.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.DisjunctionRef","page":"API","title":"DisjunctiveProgramming.DisjunctionRef","text":"DisjunctionRef\n\nA type for looking up disjunctive constraints.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.Exactly","page":"API","title":"DisjunctiveProgramming.Exactly","text":"Exactly <: JuMP.AbstractVectorSet\n\nConvenient alias for using _MOIExactly.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.GDPData","page":"API","title":"DisjunctiveProgramming.GDPData","text":"GDPData\n\nThe core type for storing information in a GDPModel.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.Hull","page":"API","title":"DisjunctiveProgramming.Hull","text":"Hull <: AbstractReformulationMethod\n\nA type for using the convex hull reformulation approach for disjunctive constraints.\n\nFields\n\nvalue::Float64: epsilon value for nonlinear hull reformulations (default = 1e-6).\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.Indicator","page":"API","title":"DisjunctiveProgramming.Indicator","text":"Indicator <: AbstractReformulationMethod\n\nA type for using indicator constraint approach for linear disjunctive constraints.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.LogicalConstraintIndex","page":"API","title":"DisjunctiveProgramming.LogicalConstraintIndex","text":"LogicalConstraintIndex\n\nA type for storing the index of a logical constraint.\n\nFields\n\nvalue::Int64: The index value.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.LogicalConstraintRef","page":"API","title":"DisjunctiveProgramming.LogicalConstraintRef","text":"LogicalConstraintRef\n\nA type for looking up logical constraints.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.LogicalVariable","page":"API","title":"DisjunctiveProgramming.LogicalVariable","text":"LogicalVariable <: JuMP.AbstractVariable\n\nA variable type the logical variables associated with disjuncts in a Disjunction.\n\nFields\n\nfix_value::Union{Nothing, Bool}: A fixed boolean value if there is one.\nstart_value::Union{Nothing, Bool}: An initial guess if there is one.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.LogicalVariableData","page":"API","title":"DisjunctiveProgramming.LogicalVariableData","text":"LogicalVariableData\n\nA type for storing LogicalVariables and any meta-data they possess.\n\nFields\n\nvariable::LogicalVariable: The variable object.\nname::String: The name of the variable.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.LogicalVariableIndex","page":"API","title":"DisjunctiveProgramming.LogicalVariableIndex","text":"LogicalVariableIndex\n\nA type for storing the index of a LogicalVariable.\n\nFields\n\nvalue::Int64: The index value.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming.LogicalVariableRef","page":"API","title":"DisjunctiveProgramming.LogicalVariableRef","text":"LogicalVariableRef\n\nA type for looking up logical variables.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming._MOIAtLeast","page":"API","title":"DisjunctiveProgramming._MOIAtLeast","text":"_MOIAtLeast <: _MOI.AbstractVectorSet\n\nMOI level set for AtLeast constraints, see AtLeast for recommended syntax.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming._MOIAtMost","page":"API","title":"DisjunctiveProgramming._MOIAtMost","text":"_MOIAtMost <: _MOI.AbstractVectorSet\n\nMOI level set for AtMost constraints, see AtMost for recommended syntax.\n\n\n\n\n\n","category":"type"},{"location":"api/#DisjunctiveProgramming._MOIExactly","page":"API","title":"DisjunctiveProgramming._MOIExactly","text":"_MOIExactly <: _MOI.AbstractVectorSet\n\nMOI level set for Exactly constraints, see Exactly for recommended syntax.\n\n\n\n\n\n","category":"type"},{"location":"api/#Base.getindex-Tuple{ReferenceMap, DisjunctConstraintRef}","page":"API","title":"Base.getindex","text":"Base.getindex(map::JuMP.GenericReferenceMap, cref::DisjunctConstraintRef)\n\n...\n\n\n\n\n\n","category":"method"},{"location":"api/#Base.getindex-Tuple{ReferenceMap, DisjunctionRef}","page":"API","title":"Base.getindex","text":"Base.getindex(map::JuMP.GenericReferenceMap, cref::DisjunctionRef)\n\n...\n\n\n\n\n\n","category":"method"},{"location":"api/#Base.getindex-Tuple{ReferenceMap, LogicalConstraintRef}","page":"API","title":"Base.getindex","text":"Base.getindex(map::JuMP.GenericReferenceMap, cref::LogicalConstraintRef)\n\n...\n\n\n\n\n\n","category":"method"},{"location":"api/#DisjunctiveProgramming.GDPModel-Tuple","page":"API","title":"DisjunctiveProgramming.GDPModel","text":"GDPModel([optimizer]; [kwargs...])::JuMP.Model\n\nThe core model object for building general disjunction programming models.\n\n\n\n\n\n","category":"method"},{"location":"api/#DisjunctiveProgramming.disjunction","page":"API","title":"DisjunctiveProgramming.disjunction","text":"disjunction(\n model::JuMP.Model, \n disjunct_indicators::Vector{LogicalVariableRef}\n name::String = \"\"\n)\n\nFunction to add a Disjunction to a GDPModel.\n\ndisjunction(\n model::JuMP.Model, \n disjunct_indicators::Vector{LogicalVariableRef},\n nested_tag::DisjunctConstraint,\n name::String = \"\"\n)\n\nFunction to add a nested Disjunction to a GDPModel.\n\n\n\n\n\n","category":"function"},{"location":"api/#DisjunctiveProgramming.disjunction_indicators-Tuple{DisjunctionRef}","page":"API","title":"DisjunctiveProgramming.disjunction_indicators","text":"disjunction_indicators(disjunction::DisjunctionRef)\n\nReturn LogicalVariableRefs associated with a disjunction.\n\n\n\n\n\n","category":"method"},{"location":"api/#DisjunctiveProgramming.gdp_data-Tuple{Model}","page":"API","title":"DisjunctiveProgramming.gdp_data","text":"gdp_data(model::JuMP.Model)::GDPData\n\nExtract the GDPData from a GDPModel.\n\n\n\n\n\n","category":"method"},{"location":"api/#DisjunctiveProgramming.is_gdp_model-Tuple{Model}","page":"API","title":"DisjunctiveProgramming.is_gdp_model","text":"is_gdp_model(model::JuMP.Model)::Bool\n\nReturn if model was created via the GDPModel constructor.\n\n\n\n\n\n","category":"method"},{"location":"api/#DisjunctiveProgramming.reformulate_model-Tuple{Model, AbstractSolutionMethod}","page":"API","title":"DisjunctiveProgramming.reformulate_model","text":"reformulate_model(model::JuMP.Model, method::AbstractSolutionMethod)\n\nReformulate a GDPModel using the specified method. Prior to reformulation, all previous reformulation variables and constraints are deleted.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.add_constraint","page":"API","title":"JuMP.add_constraint","text":"JuMP.add_constraint(\n model::JuMP.Model,\n con::_DisjunctConstraint,\n name::String = \"\"\n)::DisjunctConstraintRef\n\nExtend JuMP.add_constraint to add a DisjunctConstraint to a GDPModel. The constraint is added to the GDPData in the .ext dictionary of the GDPModel.\n\n\n\n\n\n","category":"function"},{"location":"api/#JuMP.add_constraint-Union{Tuple{S}, Tuple{F}, Tuple{Model, ScalarConstraint{F, S}}, Tuple{Model, ScalarConstraint{F, S}, String}} where {F<:Union{LogicalVariableRef, GenericNonlinearExpr{LogicalVariableRef}}, S<:IsTrue}","page":"API","title":"JuMP.add_constraint","text":"function JuMP.add_constraint(\n model::JuMP.Model,\n c::JuMP.ScalarConstraint{<:F, S},\n name::String = \"\"\n) where {F <: Union{LogicalVariableRef, _LogicalExpr}, S}\n\nExtend JuMP.add_constraint to allow creating logical proposition constraints for a GDPModel with the @constraint macro.\n\nfunction JuMP.add_constraint(\n model::JuMP.Model,\n c::JuMP.VectorConstraint{<:F, S, Shape},\n name::String = \"\"\n) where {F <: Union{Number, LogicalVariableRef, _LogicalExpr}, S, Shape}\n\nExtend JuMP.add_constraint to allow creating logical cardinality constraints for a GDPModel with the @constraint macro.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.add_variable","page":"API","title":"JuMP.add_variable","text":"JuMP.add_variable(model::JuMP.Model, v::LogicalVariable, \n name::String = \"\")::LogicalVariableRef\n\nExtend JuMP.add_variable for LogicalVariables. This helps enable @variable(model, [var_expr], Logical).\n\n\n\n\n\n","category":"function"},{"location":"api/#JuMP.build_constraint-Tuple{Function, Any, MathOptInterface.AbstractScalarSet, DisjunctConstraint}","page":"API","title":"JuMP.build_constraint","text":"JuMP.build_constraint(\n _error::Function, \n func, \n set::_MOI.AbstractScalarSet,\n tag::DisjunctConstraint\n)::_DisjunctConstraint\n\nExtend JuMP.build_constraint to add constraints to disjuncts. This in combination with JuMP.add_constraint enables the use of @constraint(model, [name], constr_expr, tag), where tag is a DisjunctConstraint(::Type{LogicalVariableRef}). The user must specify the LogicalVariable to use as the indicator for the _DisjunctConstraint being created.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.build_constraint-Tuple{Function, Any, MathOptInterface.Nonnegatives, DisjunctConstraint}","page":"API","title":"JuMP.build_constraint","text":"JuMP.build_constraint(\n _error::Function, \n func, \n set::MathOptInterface.Nonnegatives,\n tag::DisjunctConstraint\n)::_DisjunctConstraint\n\nExtend JuMP.build_constraint to add VectorConstraints to disjuncts.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.build_constraint-Tuple{Function, Any, MathOptInterface.Nonpositives, DisjunctConstraint}","page":"API","title":"JuMP.build_constraint","text":"JuMP.build_constraint(\n _error::Function, \n func, \n set::MathOptInterface.Nonpositives,\n tag::DisjunctConstraint\n)::_DisjunctConstraint\n\nExtend JuMP.build_constraint to add VectorConstraints to disjuncts.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.build_constraint-Tuple{Function, Any, MathOptInterface.Zeros, DisjunctConstraint}","page":"API","title":"JuMP.build_constraint","text":"JuMP.build_constraint(\n _error::Function, \n func, \n set::MathOptInterface.Zeros,\n tag::DisjunctConstraint\n)::_DisjunctConstraint\n\nExtend JuMP.build_constraint to add VectorConstraints to disjuncts.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.build_constraint-Tuple{Function, Any, Nonnegatives, DisjunctConstraint}","page":"API","title":"JuMP.build_constraint","text":"JuMP.build_constraint(\n _error::Function, \n func, \n set::Nonnegatives,\n tag::DisjunctConstraint\n)::_DisjunctConstraint\n\nExtend JuMP.build_constraint to add VectorConstraints to disjuncts.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.build_constraint-Tuple{Function, Any, Nonpositives, DisjunctConstraint}","page":"API","title":"JuMP.build_constraint","text":"JuMP.build_constraint(\n _error::Function, \n func, \n set::Nonpositives,\n tag::DisjunctConstraint\n)::_DisjunctConstraint\n\nExtend JuMP.build_constraint to add VectorConstraints to disjuncts.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.build_constraint-Tuple{Function, Any, Zeros, DisjunctConstraint}","page":"API","title":"JuMP.build_constraint","text":"JuMP.build_constraint(\n _error::Function, \n func, \n set::Zeros,\n tag::DisjunctConstraint\n)::_DisjunctConstraint\n\nExtend JuMP.build_constraint to add VectorConstraints to disjuncts.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.build_constraint-Union{Tuple{S}, Tuple{T}, Tuple{Function, AbstractVector{T}, S}} where {T<:LogicalVariableRef, S<:Union{AtLeast, AtMost, Exactly}}","page":"API","title":"JuMP.build_constraint","text":"function JuMP.build_constraint(\n _error::Function, \n func::AbstractVector{T},\n set::S\n) where {T <: Union{LogicalVariableRef, _LogicalExpr}, S <: Union{Exactly, AtLeast, AtMost}}\n\nExtend JuMP.build_constraint to add logical cardinality constraints to a GDPModel. This in combination with JuMP.add_constraint enables the use of @constraint(model, [name], logical_expr in set), where set can be either of the following cardinality sets: AtLeast(n), AtMost(n), or Exactly(n).\n\nExample\n\nTo select exactly 1 logical variable Y to be true, do (the same can be done with AtLeast(n) and AtMost(n)):\n\nusing DisjunctiveProgramming\nmodel = GDPModel();\n@variable(model, Y[i = 1:2], LogicalVariable);\n@constraint(model, [Y[1], Y[2]] in Exactly(1));\n\nJuMP.build_constraint(\n _error::Function, \n func::_LogicalExpr,\n set::IsTrue\n)\n\nExtend JuMP.build_constraint to add logical propositional constraints to a GDPModel. This in combination with JuMP.add_constraint enables the use of @constraint(model, [name], logical_expr in IsTrue()) to define a Boolean expression that must either be true or false.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.build_variable-Tuple{Function, VariableInfo, Type{LogicalVariable}}","page":"API","title":"JuMP.build_variable","text":"JuMP.build_variable(_error::Function, info::JuMP.VariableInfo, \n ::Type{LogicalVariable})::LogicalVariable\n\nExtend JuMP.build_variable to work with logical variables. This in combination with JuMP.add_variable enables the use of @variable(model, [var_expr], LogicalVariable).\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.constraint_object-Tuple{DisjunctConstraintRef}","page":"API","title":"JuMP.constraint_object","text":"JuMP.constraint_object(cref::DisjunctConstraintRef)\n\nReturn the underlying constraint data for the constraint referenced by cref.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.constraint_object-Tuple{DisjunctionRef}","page":"API","title":"JuMP.constraint_object","text":"JuMP.constraint_object(cref::DisjunctionRef)\n\nReturn the underlying constraint data for the constraint referenced by cref.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.constraint_object-Tuple{LogicalConstraintRef}","page":"API","title":"JuMP.constraint_object","text":"JuMP.constraint_object(cref::LogicalConstraintRef)\n\nReturn the underlying constraint data for the constraint referenced by cref.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.delete-Tuple{Model, DisjunctConstraintRef}","page":"API","title":"JuMP.delete","text":"JuMP.delete(model::JuMP.Model, cref::DisjunctConstraintRef)\n\nDelete a disjunct constraint from the GDP model.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.delete-Tuple{Model, DisjunctionRef}","page":"API","title":"JuMP.delete","text":"JuMP.delete(model::JuMP.Model, cref::DisjunctionRef)\n\nDelete a disjunction constraint from the GDP model.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.delete-Tuple{Model, LogicalConstraintRef}","page":"API","title":"JuMP.delete","text":"JuMP.delete(model::JuMP.Model, cref::LogicalConstraintRef)\n\nDelete a logical constraint from the GDP model.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.delete-Tuple{Model, LogicalVariableRef}","page":"API","title":"JuMP.delete","text":"JuMP.delete(model::JuMP.Model, vref::LogicalVariableRef)\n\nDelete the logical variable associated with vref from the GDP model.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.fix-Tuple{LogicalVariableRef, Bool}","page":"API","title":"JuMP.fix","text":"JuMP.fix(vref::LogicalVariableRef, value::Bool)\n\nFix a logical variable to a value. Update the fixing constraint if one exists, otherwise create a new one.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.fix_value-Tuple{LogicalVariableRef}","page":"API","title":"JuMP.fix_value","text":"JuMP.fix_value(vref::LogicalVariableRef)\n\nReturn the value to which a logical variable is fixed.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.index-Tuple{DisjunctConstraintRef}","page":"API","title":"JuMP.index","text":"JuMP.index(cref::DisjunctConstraintRef)\n\nReturn the index constraint associated with cref.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.index-Tuple{DisjunctionRef}","page":"API","title":"JuMP.index","text":"JuMP.index(cref::DisjunctionRef)\n\nReturn the index constraint associated with cref.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.index-Tuple{LogicalConstraintRef}","page":"API","title":"JuMP.index","text":"JuMP.index(cref::LogicalConstraintRef)\n\nReturn the index constraint associated with cref.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.index-Tuple{LogicalVariableRef}","page":"API","title":"JuMP.index","text":"JuMP.index(vref::LogicalVariableRef)\n\nReturn the index of logical variable that associated with vref.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.is_fixed-Tuple{LogicalVariableRef}","page":"API","title":"JuMP.is_fixed","text":"JuMP.is_fixed(vref::LogicalVariableRef)\n\nReturn true if vref is a fixed variable. If true, the fixed value can be queried with fix_value.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.is_valid-Tuple{Model, DisjunctConstraintRef}","page":"API","title":"JuMP.is_valid","text":"JuMP.is_valid(model::JuMP.Model, cref::DisjunctConstraintRef)\n\nReturn true if cref refers to a valid constraint in the GDP model.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.is_valid-Tuple{Model, DisjunctionRef}","page":"API","title":"JuMP.is_valid","text":"JuMP.is_valid(model::JuMP.Model, cref::DisjunctionRef)\n\nReturn true if cref refers to a valid constraint in the GDP model.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.is_valid-Tuple{Model, LogicalConstraintRef}","page":"API","title":"JuMP.is_valid","text":"JuMP.is_valid(model::JuMP.Model, cref::LogicalConstraintRef)\n\nReturn true if cref refers to a valid constraint in the GDP model.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.is_valid-Tuple{Model, LogicalVariableRef}","page":"API","title":"JuMP.is_valid","text":"JuMP.is_valid(model::JuMP.Model, vref::LogicalVariableRef)\n\nReturn true if vref refers to a valid logical variable in GDP model.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.isequal_canonical-Tuple{LogicalVariableRef, LogicalVariableRef}","page":"API","title":"JuMP.isequal_canonical","text":"JuMP.isequal_canonical(v::LogicalVariableRef, w::LogicalVariableRef)\n\nReturn true if v and w refer to the same logical variable in the same GDP model.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.name-Tuple{DisjunctConstraintRef}","page":"API","title":"JuMP.name","text":"JuMP.name(cref::DisjunctConstraintRef)\n\nGet a constraint's name attribute.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.name-Tuple{DisjunctionRef}","page":"API","title":"JuMP.name","text":"JuMP.name(cref::DisjunctionRef)\n\nGet a constraint's name attribute.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.name-Tuple{LogicalConstraintRef}","page":"API","title":"JuMP.name","text":"JuMP.name(cref::LogicalConstraintRef)\n\nGet a constraint's name attribute.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.name-Tuple{LogicalVariableRef}","page":"API","title":"JuMP.name","text":"JuMP.name(vref::LogicalVariableRef)\n\nGet a logical variable's name attribute.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.owner_model-Tuple{DisjunctConstraintRef}","page":"API","title":"JuMP.owner_model","text":"JuMP.owner_model(cref::DisjunctConstraintRef)\n\nReturn the model to which cref belongs.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.owner_model-Tuple{DisjunctionRef}","page":"API","title":"JuMP.owner_model","text":"JuMP.owner_model(cref::DisjunctionRef)\n\nReturn the model to which cref belongs.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.owner_model-Tuple{LogicalConstraintRef}","page":"API","title":"JuMP.owner_model","text":"JuMP.owner_model(cref::LogicalConstraintRef)\n\nReturn the model to which cref belongs.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.owner_model-Tuple{LogicalVariableRef}","page":"API","title":"JuMP.owner_model","text":"JuMP.owner_model(vref::LogicalVariableRef)\n\nReturn the GDP model to which vref belongs.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.set_name-Tuple{DisjunctConstraintRef, String}","page":"API","title":"JuMP.set_name","text":"JuMP.set_name(cref::DisjunctConstraintRef, name::String)\n\nSet a constraint's name attribute.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.set_name-Tuple{DisjunctionRef, String}","page":"API","title":"JuMP.set_name","text":"JuMP.set_name(cref::DisjunctionRef, name::String)\n\nSet a constraint's name attribute.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.set_name-Tuple{LogicalConstraintRef, String}","page":"API","title":"JuMP.set_name","text":"JuMP.set_name(cref::LogicalConstraintRef, name::String)\n\nSet a constraint's name attribute.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.set_name-Tuple{LogicalVariableRef, String}","page":"API","title":"JuMP.set_name","text":"JuMP.set_name(vref::LogicalVariableRef, name::String)\n\nSet a logical variable's name attribute.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.set_start_value-Tuple{LogicalVariableRef, Union{Nothing, Bool}}","page":"API","title":"JuMP.set_start_value","text":"JuMP.set_start_value(vref::LogicalVariableRef, value::Union{Nothing, Bool})\n\nSet the start value of the logical variable vref.\n\nPass nothing to unset the start value.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.start_value-Tuple{LogicalVariableRef}","page":"API","title":"JuMP.start_value","text":"JuMP.start_value(vref::LogicalVariableRef)\n\nReturn the start value of the logical variable vref.\n\n\n\n\n\n","category":"method"},{"location":"api/#JuMP.unfix-Tuple{LogicalVariableRef}","page":"API","title":"JuMP.unfix","text":"JuMP.unfix(vref::LogicalVariableRef)\n\nDelete the fixed value of a logical variable.\n\n\n\n\n\n","category":"method"},{"location":"#DisjunctiveProgramming.jl","page":"Home","title":"DisjunctiveProgramming.jl","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Generalized Disjunctive Programming (GDP) extension to JuMP, based on the GDP modeling paradigm described in Perez and Grossmann, 2023.","category":"page"},{"location":"","page":"Home","title":"Home","text":"(Image: )","category":"page"},{"location":"","page":"Home","title":"Home","text":"(Image: codecov) (Image: Docs) (Image: Docs)","category":"page"},{"location":"#Installation","page":"Home","title":"Installation","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"using Pkg\nPkg.add(\"DisjunctiveProgramming\")","category":"page"},{"location":"#Model","page":"Home","title":"Model","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"A generalized disjunctive programming (GDP) model is created using GDPModel(), where the optimizer can be passed at model creation, along with other keyword arguments supported by JuMP Models. ","category":"page"},{"location":"","page":"Home","title":"Home","text":"using DisjunctiveProgramming\nusing HiGHS\n\nmodel = GDPModel(HiGHS.Optimizer)","category":"page"},{"location":"","page":"Home","title":"Home","text":"A GDPModel is a JuMP Model with a GDPData field in the model's .ext dictionary, which stores the following:","category":"page"},{"location":"","page":"Home","title":"Home","text":"Logical Variables: Indicator variables used for the various disjuncts involved in the model's disjunctions.\nLogical Constraints: Selector (cardinality) or proposition (Boolean) constraints describing the relationships between the logical variables.\nDisjunct Constraints: Constraints associated with each disjunct in the model.\nDisjunctions: Disjunction constraints.\nSolution Method: The reformulation technique or solution method. Currently supported methods include Big-M, Hull, and Indicator Constraints.\nReformulation Variables: List of JuMP variables created when reformulating a GDP model into a MIP model.\nReformulation Constraints: List of constraints created when reformulating a GDP model into a MIP model.\nReady to Optimize: Flag indicating if the model can be optimized.","category":"page"},{"location":"","page":"Home","title":"Home","text":"Additionally, the following mapping dictionaries are stored in GDPData:","category":"page"},{"location":"","page":"Home","title":"Home","text":"Indicator to Binary: Maps the Logical variables to their respective reformulated Binary variables.\nIndicator to Constraints: Maps the Logical variables to the disjunct constraints associated with them.","category":"page"},{"location":"","page":"Home","title":"Home","text":"A GDP Model's GDPData can be accessed via:","category":"page"},{"location":"","page":"Home","title":"Home","text":"data = gdp_data(model)","category":"page"},{"location":"#Logical-Variables","page":"Home","title":"Logical Variables","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Logical variables are JuMP AbstractVariables with two fields: fix_value and start_value. These can be optionally specified at variable creation. Logical variables are created with the @variable JuMP macro by adding the tag Logical as the last keyword argument. As with the regular @variable macro, variables can be named and indexed: ","category":"page"},{"location":"","page":"Home","title":"Home","text":"@variable(model, Y[1:3], Logical)","category":"page"},{"location":"#Logical-Constraints","page":"Home","title":"Logical Constraints","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Two types of logical constraints are supported:","category":"page"},{"location":"","page":"Home","title":"Home","text":"Selector or cardinality constraints: A subset of Logical variables is passed and Exactly, AtMost, or AtLeast n of these is allowed to be True. These constraints are specified with the func in set notation in MathOptInterface in a @constraint JuMP macro. It is not assumed that disjunctions have an Exactly(1) constraint enforced on their disjuncts upon creation. This constraint must be explicitly specified.\njulia @constraint(model, [Y[1], Y[2]] in Exactly(1))\nProposition or Boolean constraints: These describe the relationships between Logical variables via Boolean algebra. Supported logical operators include:\n∨ or logical_or (OR, typed with \\vee + tab).\n∧ or logical_and (AND, typed with \\wedge + tab).\n¬ or logical_not (NOT, typed with \\neg + tab).\n⟹ of implies (Implication, typed with \\Longrightarrow + tab).\n⇔ or iff (double implication or equivalence, typed with \\Leftrightarrow + tab).\nThe @constraint JuMP macro is used to create these constraints with the IsTrue set:\njulia @constraint(model, (Y[1] ⟹ Y[2]) in IsTrue())\nNote: The parenthesis in the example above around the implication clause are only required when the parent logical operator is ⟹ or ⇔ to avoid parsing errors.\nLogical propositions can be reformulated to IP constraints by automatic reformulation to Conjunctive Normal Form.","category":"page"},{"location":"#Disjunctions","page":"Home","title":"Disjunctions","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Disjunctions are built by first defining the constraints associated with each disjunct. This is done via the @constraint JuMP macro with the extra DisjunctConstraint tag specifying the Logical variable associated with the constraint:","category":"page"},{"location":"","page":"Home","title":"Home","text":"@variable(model, x)\n@constraint(model, x ≤ 100, DisjunctConstraint(Y[1]))\n@constraint(model, x ≥ 200, DisjunctConstraint(Y[2]))","category":"page"},{"location":"","page":"Home","title":"Home","text":"After all disjunct constraints associated with a disjunction have been defined, the disjunction is created with the @disjunction macro, where the disjunction is defined as a Vector of Logical variables associated with each disjunct:","category":"page"},{"location":"","page":"Home","title":"Home","text":"@disjunction(model, [Y[1], Y[2]])","category":"page"},{"location":"","page":"Home","title":"Home","text":"Disjunctions can be nested by passing an additional DisjunctConstraint tag. The Logical variable in the DisjunctConstraint tag specifies which disjunct, the nested disjunction belongs to:","category":"page"},{"location":"","page":"Home","title":"Home","text":"@disjunction(model, Y[1:2], DisjunctConstraint(Y[3]))","category":"page"},{"location":"","page":"Home","title":"Home","text":"Empty disjuncts are supported in GDP models. When used, the only constraints enforced on the model when the empty disjunct is selected are the global constraints and any other disjunction constraints defined.","category":"page"},{"location":"#MIP-Reformulations","page":"Home","title":"MIP Reformulations","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"The following reformulation methods are currently supported:","category":"page"},{"location":"","page":"Home","title":"Home","text":"Big-M: The BigM struct is created with the following optional arguments:\nvalue: Big-M value to use. Default: 1e9. Big-M values are currently global to the model. Constraint specific Big-M values can be supported in future releases.\ntighten: Boolean indicating if tightening the Big-M value should be attempted (currently supported only for linear disjunct constraints when variable bounds have been set or specified in the variable_bounds field). Default: true.\nvariable_bounds: Dictionary specifying the lower and upper bounds for each VariableRef (e.g., Dict(x => (lb, ub))). Default: populate when calling the reformulation method.\nHull: The Hull struct is created with the following optional arguments:\nvalue: ϵ value to use when reformulating quadratic or nonlinear constraints via the perspective function proposed by Furman, et al. [2020]. Default: 1e-6. ϵ values are currently global to the model. Constraint specific tolerances can be supported in future releases.\nvariable_bounds: Dictionary specifying the lower and upper bounds for each VariableRef (e.g., Dict(x => (lb, ub))). Default: populate when calling the reformulation method.\nIndicator: This method reformulates each disjunct constraint into an indicator constraint with the Boolean reformulation counterpart of the Logical variable used to define the disjunct constraint.","category":"page"},{"location":"#Release-Notes","page":"Home","title":"Release Notes","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Prior to v0.4.0, the package did not leverage the JuMP extension capabilities and was not as robust. For these earlier releases, refer to Perez, Joshi, and Grossmann, 2023 and the following JuliaCon 2022 Talk.","category":"page"},{"location":"#Example","page":"Home","title":"Example","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"The example below is from the Cornell University Computational Optimization Open Textbook.","category":"page"},{"location":"","page":"Home","title":"Home","text":"using DisjunctiveProgramming\nusing HiGHS\n\nm = GDPModel(HiGHS.Optimizer)\n@variable(m, 0 ≤ x[1:2] ≤ 20)\n@variable(m, Y[1:2], Logical)\n@constraint(m, [i = 1:2], [2,5][i] ≤ x[i] ≤ [6,9][i], DisjunctConstraint(Y[1]))\n@constraint(m, [i = 1:2], [8,10][i] ≤ x[i] ≤ [11,15][i], DisjunctConstraint(Y[2]))\n@disjunction(m, Y)\n@constraint(m, Y in Exactly(1)) #logical constraint\n@objective(m, Max, sum(x))\nprint(m)\n# Max x[1] + x[2]\n# Subject to\n# x[1] ≥ 0\n# x[2] ≥ 0\n# x[1] ≤ 20\n# x[2] ≤ 20\n\n##\noptimize!(m, method = BigM(100, false)) #specify M value and disable M-tightening\nprint(m)\n# Max x[1] + x[2]\n# Subject to\n# Y[1] + Y[2] = 1\n# x[1] - 100 Y[1] ≥ -98\n# x[2] - 100 Y[1] ≥ -95\n# x[1] - 100 Y[2] ≥ -92\n# x[2] - 100 Y[2] ≥ -90\n# x[1] + 100 Y[1] ≤ 106\n# x[2] + 100 Y[1] ≤ 109\n# x[1] + 100 Y[2] ≤ 111\n# x[2] + 100 Y[2] ≤ 115\n# x[1] ≥ 0\n# x[2] ≥ 0\n# x[1] ≤ 20\n# x[2] ≤ 20\n# Y[1] binary\n# Y[2] binary\n\n##\noptimize!(m, method = Hull())\nprint(m)\n# Max x[1] + x[2]\n# Subject to\n# -x[2] + x[2]_Y[1] + x[2]_Y[2] = 0\n# -x[1] + x[1]_Y[1] + x[1]_Y[2] = 0\n# Y[1] + Y[2] = 1\n# -2 Y[1] + x[1]_Y[1] ≥ 0\n# -5 Y[1] + x[2]_Y[1] ≥ 0\n# -8 Y[2] + x[1]_Y[2] ≥ 0\n# -10 Y[2] + x[2]_Y[2] ≥ 0\n# x[2]_Y[1]_lower_bound : -x[2]_Y[1] ≤ 0\n# x[2]_Y[1]_upper_bound : -20 Y[1] + x[2]_Y[1] ≤ 0\n# x[1]_Y[1]_lower_bound : -x[1]_Y[1] ≤ 0\n# x[1]_Y[1]_upper_bound : -20 Y[1] + x[1]_Y[1] ≤ 0\n# x[2]_Y[2]_lower_bound : -x[2]_Y[2] ≤ 0\n# x[2]_Y[2]_upper_bound : -20 Y[2] + x[2]_Y[2] ≤ 0\n# x[1]_Y[2]_lower_bound : -x[1]_Y[2] ≤ 0\n# x[1]_Y[2]_upper_bound : -20 Y[2] + x[1]_Y[2] ≤ 0\n# -6 Y[1] + x[1]_Y[1] ≤ 0\n# -9 Y[1] + x[2]_Y[1] ≤ 0\n# -11 Y[2] + x[1]_Y[2] ≤ 0\n# -15 Y[2] + x[2]_Y[2] ≤ 0\n# x[1] ≥ 0\n# x[2] ≥ 0\n# x[2]_Y[1] ≥ 0\n# x[1]_Y[1] ≥ 0\n# x[2]_Y[2] ≥ 0\n# x[1]_Y[2] ≥ 0\n# x[1] ≤ 20\n# x[2] ≤ 20\n# x[2]_Y[1] ≤ 20\n# x[1]_Y[1] ≤ 20\n# x[2]_Y[2] ≤ 20\n# x[1]_Y[2] ≤ 20\n# Y[1] binary\n# Y[2] binary","category":"page"},{"location":"#Contributing","page":"Home","title":"Contributing","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"DisjunctiveProgramming is being actively developed and suggestions or other forms of contribution are encouraged. There are many ways to contribute to this package. Feel free to create an issue to address questions or provide feedback.","category":"page"}] }