diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 09b2ebb..c8040e9 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.9.3","generation_timestamp":"2023-10-14T16:40:15","documenter_version":"1.1.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.9.3","generation_timestamp":"2023-10-14T16:43:54","documenter_version":"1.1.1"}} \ No newline at end of file diff --git a/dev/api/index.html b/dev/api/index.html index a919f38..9e2b041 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 820c792..840a5a3 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.