Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNMY: Support Domain Restriction Inversions #166

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pulsipher
Copy link
Collaborator

@pulsipher pulsipher commented Sep 28, 2021

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
Copy link

codecov bot commented Sep 28, 2021

Codecov Report

Merging #166 (6c13bd9) into master (d4c0ab8) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           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%) ⬆️
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 data
Powered by Codecov. Last update d4c0ab8...6c13bd9. Read the comment docs.

@pulsipher pulsipher changed the title Support Domain Restriction Inversions DNMY: Support Domain Restriction Inversions Sep 28, 2021
@pulsipher pulsipher marked this pull request as draft March 2, 2022 22:48
@pulsipher pulsipher added the modeling Something to do with our infinite model capabilities label Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
modeling Something to do with our infinite model capabilities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant