timefold-solver icon indicating copy to clipboard operation
timefold-solver copied to clipboard

api: SolverManager should move from problemId to jobId.

Open rsynek opened this issue 2 years ago • 2 comments

The SolverManager requires a user to provide a problemId to start solving. Quickstarts meanwhile move to a jobId - a unique identifier generated by the solver process. This inconsistency should be addressed in the SolverManager

Advantages:

  • lower entry barrier by not having to provide an identifier
  • fewer generics: SolverManager<MySolution> vs. SolverManager<MySolution, Long>

This is a backward-incompatible change and thus it should be introduced no sooner than in Timefold solver 2.0.0.

rsynek avatar Jun 14 '23 07:06 rsynek

I'm using the problemIds that are calculated in user code (And based on the problems variables), to ensure that I'm not ever running the same problem twice. My current solution to this is checking the current status for a given problem ID before starting the solving.

With this change I'll need to maintain a list of problemIds to jobIds which reduces the flexibility.

Has this been taken into account? Perhaps my solution is not the best way to manage this?

Inlustra avatar Sep 07 '23 11:09 Inlustra

@Inlustra Thank you for the feedback. This is not to be implemented any time soon, rather a placeholder for some time in the future; which is when we'll actually think it through. Your feedback will be useful when the time comes.

Right now, I wouldn't worry about this issue too much.

triceo avatar Sep 07 '23 11:09 triceo