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

Unify @PlanningId usage across quickstarts #86

Closed
mcimbora opened this issue Jul 14, 2023 · 1 comment · Fixed by #296
Closed

Unify @PlanningId usage across quickstarts #86

mcimbora opened this issue Jul 14, 2023 · 1 comment · Fixed by #296
Assignees
Labels
enhancement New feature or request

Comments

@mcimbora
Copy link

@PlanningId usage is a bit inconsistent across the quickstarts, use it on all problem fact & entity classes.

13.1. @PlanningId
For some functionality (such as multithreaded solving and real-time planning), Timefold needs to map problem facts and planning entities to an ID. Timefold uses that ID to rebase a move from one thread's solution state to another's.
To enable such functionality, specify the @PlanningId annotation on the identification field or getter method, for example on the database ID:

Current status:

timefold-quickstarts/use-cases/employee-scheduling - @PlanningId defined both on planning entity and problem facts
timefold-quickstarts/use-cases/food-packaging - @PlanningId defined on a single planning entity, not on problem facts
timefold-quickstarts/use-cases/facility-location - @PlanningId not used at all

@mcimbora mcimbora added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Jul 14, 2023
@mcimbora mcimbora self-assigned this Jul 14, 2023
@ge0ffrey
Copy link
Contributor

ge0ffrey commented Jul 19, 2023

Potentially related info:

For the quickstarts that switched to UI-has-full-solution-state (school timetabling and vehicle routing* currently), we've also changed the ID type to String. All quickstarts will sooner or later be refactored accordingly.
That new approach has no database, so no need to keep that ID as a number.

Motivation: most users want to reuse their own ID for input data such as an employee (name is not unique and often obfuscated) and that ID type can be anything from a number to an UUID. String always fits.

@pieterdeschepper pieterdeschepper self-assigned this Feb 19, 2024
@triceo triceo linked a pull request Feb 19, 2024 that will close this issue
9 tasks
triceo added a commit that referenced this issue Feb 20, 2024
This is to resolve
#86

---------

Co-authored-by: Lukáš Petrovický <[email protected]>
@triceo triceo closed this as completed Feb 20, 2024
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 a pull request may close this issue.

4 participants