InfiniteOpt.jl
InfiniteOpt.jl copied to clipboard
DNMY: Support Domain Restriction Inversions
This adds the invert_logic keyword argument to DomainRestrictions such that the restrictions denote the logical compliment of the conditions given. This is an experiment to see if we should implement this.
For example:
using InfiniteOpt
model = InfiniteModel()
@infinite_parameter(model, t in [0, 1])
@variable(model, y(t))
@constraint(model, y^2 <= 9, DomainRestrictions(t => 0.5, invert_logic = true)) # enforce constraint for every t != 0.5
Update: #167 is probably the better solution.
Codecov Report
Merging #166 (6c13bd9) into master (d4c0ab8) will increase coverage by
0.00%. The diff coverage is100.00%.
@@ Coverage Diff @@
## master #166 +/- ##
=======================================
Coverage 99.78% 99.78%
=======================================
Files 32 32
Lines 6522 6555 +33
=======================================
+ Hits 6508 6541 +33
Misses 14 14
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/TranscriptionOpt/transcribe.jl | 99.71% <100.00%> (+<0.01%) |
:arrow_up: |
| src/constraints.jl | 100.00% <100.00%> (ø) |
|
| src/datatypes.jl | 100.00% <100.00%> (ø) |
|
| src/show.jl | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update d4c0ab8...6c13bd9. Read the comment docs.