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

Add decision_variable_dependency to represent polynomial dependency between decision variables #257

Merged
merged 6 commits into from
Dec 25, 2024

Conversation

termoshtt
Copy link
Collaborator

@termoshtt termoshtt commented Dec 24, 2024

Ready for binary encoding of integer variables.

  • When an integer variable $x \in [0, 3]$ is binary encoded as $x = b_1 + 2 b_2$ with $b_1, b_2 \in {0, 1}$, $x$ will disappear from objective function and constraints.
  • Thus, $x$ is not passed to solver which only solve with $b_1$ and $b_2$. So we have to reconstruct $x$ from $b_1$ and $b_2$, but how?
  • decision_variable_dependency field in ommx.v1.Instance stores this relation, i.e. $x = b_1 + 2 b_2$ as a set of the ID of $x$ and a polynomial $b_1 + 2 b_2$.

@termoshtt termoshtt self-assigned this Dec 24, 2024
@termoshtt termoshtt added the proto Changes in protobuf schema label Dec 24, 2024
@termoshtt termoshtt changed the title Add decision variable dependency to Instance and ParametricInstance Add decision_variable_dependency to represent polynomial dependency between decision variables Dec 24, 2024
@termoshtt termoshtt force-pushed the decision-variable-dependence branch from 0e59021 to 7e6de9e Compare December 24, 2024 12:42
@termoshtt
Copy link
Collaborator Author

More comprehensive test for evaluate dependency will be done when implementing log-encoding.

@termoshtt termoshtt marked this pull request as ready for review December 25, 2024 02:10
@termoshtt termoshtt merged commit 2754571 into main Dec 25, 2024
28 checks passed
@termoshtt termoshtt deleted the decision-variable-dependence branch December 25, 2024 02:12
@termoshtt termoshtt mentioned this pull request Dec 25, 2024
termoshtt added a commit that referenced this pull request Dec 25, 2024
Second step of binary encoding support succeeding to #257. This PR
enables substituting $x = f(y, z, ...)$ into $g(x, y, z, ...)$ yielding
a function not depends on $x$: $g(f(y, z, ...), y, z, ...)$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proto Changes in protobuf schema
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant