graphhopper/jsprit

Bug createStateId with activity.getJob() inside StateUpdater

JO-WTF opened this issue · 1 comments

I believe this is indeed a bug.
@lazaronixon used a workaround to get rid of the error but the problem exists.

Take the JobAndActivityDependenciesExample.java as an example, if I add one-line code as following in line 91, the error occurs:

stateManager.putProblemState(stateManager.createStateId(((JobActivity) activity).getJob().getId()),VehicleRoute.class,route);

The problem seems to be related with activity.getJob(). If I use the following code instead, the error is gone:

stateManager.putProblemState(stateManager.createStateId(((JobActivity) activity).getName()),VehicleRoute.class,route);

I assume the problem didn't exist in older versions when stateFactory was used to create stateId as there are several successful examples such as:
https://github.com/jsprit/playground/blob/master/src/stackoverflow/Stackoverflow_RelatedJobs_13_and_21_inSameRoute.java#L77

Originally posted by @JO-WTF in #269 (comment)

Hi @JO-WTF ,

have you found out anything new on the subject in the meantime?