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

Cse wv #403

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

Cse wv #403

wants to merge 7 commits into from

Conversation

Wout4
Copy link
Collaborator

@Wout4 Wout4 commented Aug 25, 2023

first version, not extensively tested. TODO: decompose globals

@JoD
Copy link
Collaborator

JoD commented Sep 15, 2023

As I understand it now: when creating new reification variables, the code checks whether there already is a variable for the reified expression based on its string representation, and returns that one instead. Makes sense.

  • is the representation unique for non-equivalent expressions? E.g., if we have a variable called "1", is x >= 1 represented differently when 1 is the name of the variable or a numeric value.
  • is the representation canonical? E.g., do x + y >= 1 and y + x >= 1 have the same representation? This case can be covered by lexicographically ordering the subexpressions of the sum at creation time, which is basically the only thing we need to do (for all commutative expressions).
  • the dictionary is passed around a lot, and is initialized in different spots. It's hard to have any guarantee about what's going to be in the dictionary at any timepoint. Would it make sense to have a global dictionary instead?

# Conflicts:
#	cpmpy/transformations/decompose_global.py
#	cpmpy/transformations/linearize.py
#	cpmpy/transformations/reification.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants