-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from psrenergy/px/indicator
Add support for indicator variables
- Loading branch information
Showing
15 changed files
with
283 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,34 @@ | ||
const INDICATOR_EQ_ONE{T} = MOI.Indicator{MOI.ACTIVATE_ON_ONE,EQ{T}} | ||
const INDICATOR_LT_ONE{T} = MOI.Indicator{MOI.ACTIVATE_ON_ONE,LT{T}} | ||
const INDICATOR_GT_ONE{T} = MOI.Indicator{MOI.ACTIVATE_ON_ONE,GT{T}} | ||
const INDICATOR_Interval_ONE{T} = MOI.Indicator{MOI.ACTIVATE_ON_ONE,MOI.Interval{T}} | ||
const INDICATOR_EQ_ZERO{T} = MOI.Indicator{MOI.ACTIVATE_ON_ZERO,EQ{T}} | ||
const INDICATOR_LT_ZERO{T} = MOI.Indicator{MOI.ACTIVATE_ON_ZERO,LT{T}} | ||
const INDICATOR_GT_ZERO{T} = MOI.Indicator{MOI.ACTIVATE_ON_ZERO,GT{T}} | ||
const INDICATOR_Interval_ZERO{T} = MOI.Indicator{MOI.ACTIVATE_ON_ZERO,MOI.Interval{T}} | ||
|
||
MOIU.@model( | ||
PreQUBOModel, # Name of model | ||
(MOI.Integer, MOI.ZeroOne), # untyped scalar sets | ||
(EQ, LT, GT), # typed scalar sets | ||
(), # untyped vector sets | ||
(MOI.SOS1,), # typed vector sets | ||
(VI,), # untyped scalar functions | ||
(SAF, SQF), # typed scalar functions | ||
(MOI.VectorOfVariables,), # untyped vector functions | ||
(), # typed vector functions | ||
false, # is optimizer? | ||
PreQUBOModel, # Name of model | ||
(MOI.Integer, MOI.ZeroOne), # untyped scalar sets | ||
(EQ, LT, GT), # typed scalar sets | ||
(), # untyped vector sets | ||
( # typed vector sets | ||
MOI.SOS1, | ||
INDICATOR_EQ_ONE, | ||
INDICATOR_LT_ONE, | ||
INDICATOR_GT_ONE, | ||
INDICATOR_Interval_ONE, | ||
INDICATOR_EQ_ZERO, | ||
INDICATOR_LT_ZERO, | ||
INDICATOR_GT_ZERO, | ||
INDICATOR_Interval_ZERO, | ||
), | ||
(VI,), # untyped scalar functions | ||
(SAF, SQF), # typed scalar functions | ||
(MOI.VectorOfVariables,), # untyped vector functions | ||
( # typed vector functions | ||
MOI.VectorAffineFunction, | ||
MOI.VectorQuadraticFunction, | ||
), | ||
false, # is optimizer? | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.