-
Notifications
You must be signed in to change notification settings - Fork 25
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
NL Formulation #34
Open
k8culver
wants to merge
55
commits into
dwave-examples:main
Choose a base branch
from
k8culver:feature/nl-formulation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
NL Formulation #34
+802
−144
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…actual constraint value can be passed directly from app.py
Co-authored-by: Kate Culver <[email protected]>
Co-authored-by: Kate Culver <[email protected]>
Co-authored-by: Kate Culver <[email protected]>
Co-authored-by: Kate Culver <[email protected]>
Co-authored-by: Alexander Condello <[email protected]>
k8culver
force-pushed
the
feature/nl-formulation
branch
from
December 24, 2024 00:17
49815c3
to
4780226
Compare
k8culver
force-pushed
the
feature/nl-formulation
branch
from
December 24, 2024 00:25
4780226
to
d8e2cbd
Compare
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A continuation of @jlalbers work on the NL implementation. Fixed merge conflicts and integrated new features into both the NL and CQM formulations. Replaces PR #29
The NL model has changed quite a bit so please do a thorough review
Original Description:
"Nonlinear solver formulation and implementation for the employee scheduling demo. Update summary below:
Nonlinear formulation of the employee scheduling problem featured in the demo
Ability to select CQM or Nonlinear solver to run the demo
ModelParams dataclass to simplify passing of parameters to model creation/running functions
Update CQM manager constraint formulation so that max_consecutive_shifts can be passed directly to run_cqm instead of having to pass max_consecutive_shifts + 1
Add dwave-optimization>=0.3.0 to requirements.txt to allow scalar constant broadcasting
Requesting input on the following items:
Any other input on the formulation? After the formulation review I attempted to implement the array-based constraint for isolated days off as suggested, but the solver struggled with feasibility for this constraint even using long time limits so I reverted to the previous formulation. The only other change was boosting the objective value of preferred shifts from 2 to 100 which helped the solver assign more preferred shifts with less runtime.
Should we stick with the default time limit for NL or use some heuristic to calculate an appropriate one? I find that the NL solver struggles to find good solutions with the default time limit. I played around with using a heuristic assigning the time limit to the largest dimension of the assignments BinaryVariable but there might be a better way to do it. Currently the default time limit is used.
Should we allow the user to select a time limit when running the NL version? If so, should we also allow a time limit when running CQM? CQM performs well with the default time limit but NL struggles."