Comments (2)
Can you illustrate what you mean with having logical expressions as the arguments? Is this to avoid defining a Boolean variable for the logical expression and using that Boolean in the cardinality constraint?
Yes, this could potentially avoid adding unnecessary Boolean variables. Instead of
model = GDPModel()
@variable(model, y[1:2], Logical)
@variable(model, w, Logical)
@constraint(model, w == y[1] ⟹ y[2] := true)
@constraint(model, [w, y[1]] in AtMost(1))
we could do
model = GDPModel()
@variable(model, y[1:2], Logical)
@constraint(model, [y[1] ⟹ y[2], y[1]] in AtMost(1))
Of course, I know reformulating this might lead to extra Boolean variables anyways, but this is certainty a lot more convenient/concise for the user.
from disjunctiveprogramming.jl.
Can you illustrate what you mean with having logical expressions as the arguments? Is this to avoid defining a Boolean variable for the logical expression and using that Boolean in the cardinality constraint?
from disjunctiveprogramming.jl.
Related Issues (20)
- Have `@disjunction` automatically add exactly one constraints with a keyword argument HOT 10
- Add a short alias for `LogicalVariable`
- Replace DisjunctConstraint with Disjunct
- Support the new `:=` logical constraint syntax used by JuMP HOT 1
- Generalize to `AbstractModel`s
- Restore `JuMP.` prefixes HOT 2
- Add printing for references
- Support `JuMP.value` for `LogicalVariableRef`
- Support Methods to Query and Modify Disjunct Constraints
- Add Summarizing Printing Methods
- Update the disjunction macro to use new JuMP extension API HOT 3
- Disjunct constraints cannot contain binary or integer variables. HOT 17
- Is it possible to save a Logical variable if I have a disjunction of merely two alternatives? HOT 6
- Having a set of logical variables Y, is it possible to constraint them all to be equal? HOT 7
- Handle printing empty disjuncts HOT 1
- Error ... is not a valid logical variable reference. HOT 2
- [Documentation Request] What does `@disjunction(model, Y, exactly1=false)` actually do? HOT 15
- Is it possible to use this package to optimize the selection of indices for a vector? HOT 2
- Support cardinality clauses within more complex logic HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from disjunctiveprogramming.jl.