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

feat: stateful integer #125

Merged
merged 7 commits into from
Feb 4, 2025
Merged

feat: stateful integer #125

merged 7 commits into from
Feb 4, 2025

Conversation

ImkoMarijnissen
Copy link
Contributor

A well-known concept in CP is variables which are automatically updated to their previous values by the solver.

This PR (based on this PR) aims to implement these variables by creating a new trail for changes to these stateful variables. Upon backtracking, these changes are undone.

As a potential application area, I have implemented it in the LinearLeq propagator such that it does not have to recalculate the incremental state from scratch.

@ImkoMarijnissen ImkoMarijnissen added the enhancement New feature or request label Dec 16, 2024
Copy link
Contributor

@maartenflippo maartenflippo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only gripe now is the name. The name StatefulAssignment and StatefulTrail and StatefulInt is not super clear. Perhaps TrailedInt, IntTrail, TrailedIntAssignment are better?

@maartenflippo maartenflippo merged commit 31fef92 into develop Feb 4, 2025
4 checks passed
@maartenflippo maartenflippo deleted the feat/backtrackable-int branch February 4, 2025 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants