Skip to content

Commit 33976af

Browse files
authored
[Utilities] add all indicator constraints in Model (#2618)
1 parent 16782b2 commit 33976af

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/Utilities/model.jl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,17 @@ const LessThanIndicatorOne{T} =
771771
const LessThanIndicatorZero{T} =
772772
MOI.Indicator{MOI.ACTIVATE_ON_ZERO,MOI.LessThan{T}}
773773

774+
const GreaterThanIndicatorOne{T} =
775+
MOI.Indicator{MOI.ACTIVATE_ON_ONE,MOI.GreaterThan{T}}
776+
777+
const GreaterThanIndicatorZero{T} =
778+
MOI.Indicator{MOI.ACTIVATE_ON_ZERO,MOI.GreaterThan{T}}
779+
780+
const EqualToIndicatorOne{T} = MOI.Indicator{MOI.ACTIVATE_ON_ONE,MOI.EqualTo{T}}
781+
782+
const EqualToIndicatorZero{T} =
783+
MOI.Indicator{MOI.ACTIVATE_ON_ZERO,MOI.EqualTo{T}}
784+
774785
@model(
775786
Model,
776787
(MOI.ZeroOne, MOI.Integer),
@@ -824,6 +835,10 @@ const LessThanIndicatorZero{T} =
824835
MOI.SOS2,
825836
LessThanIndicatorOne,
826837
LessThanIndicatorZero,
838+
GreaterThanIndicatorOne,
839+
GreaterThanIndicatorZero,
840+
EqualToIndicatorOne,
841+
EqualToIndicatorZero,
827842
MOI.Table,
828843
MOI.BinPacking,
829844
MOI.HyperRectangle,

0 commit comments

Comments
 (0)