-
Notifications
You must be signed in to change notification settings - Fork 606
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
jsprit does not seem to generate reproducible results #156
Comments
according to these test 5f0fee3 Thus as long as anyone prove the opposite (with a proper test case), I assume it can generates reproducible results. |
I thought it's normal behavior and it's because of the nature of the problem... E.g. if I run Jsprit for 2 minutes, it produces a solution that's (e.g.) 95% of the theoretical best result. If I repeat the same test, I may get a significantly different result after 2 minutes. Why? Because search space is inhomogeneous and huge. |
If you take a time value as termination criterion, you can hardly Am 24/04/15 um 17:49 schrieb levelibeeka:
|
I think I got the same results when I used iterations as termination result, but I cannot prove it at this moment. |
I would estimate the average number of iteration that can be done in two minutes and adapt the termination criterion accordingly. @real time planning: interesting. can you give me some more information about your setup? just to find out why jsprit generate so many different solutions |
As I just tested with However, you need to make sure that you always start the algorithm with the exact same random seed. |
jsprit use this as default random number generator: |
and 4711L as seed |
If you run the a new algorithm over and over again within the same jvm, you need to make sure each algorithm run gets a new number generator. I will check how and whether it is possible. |
Well, the situation was that we wanted to continuously generate up to date results using Jsprit as our vehicles are moving, to accommodate to traffic conditions, delays, etc. 'and 4711L as seed': so are you saying that our problem was caused by our custom constraints, and the solutions we got were actually valid? |
It is hard to judge without knowing your problem. But when vehicles are Am 24/04/15 um 18:13 schrieb levelibeeka:
|
If you do not run the algorithms concurrently, you can just reset the RandomNumberGenerator.reset(). Otherwise,i.e. in case of concurrent calculations, to ensure reproducibility each algorithm requires an own random number generator. I will check this. |
When using multiple threads, results are still not reproducible. |
I am getting the same issue, I am using a separate random instance every time with a single vrp, in a controlled environment (fixed number of iterations, 100, with BestInsertsion Search Strategy). I am getting different results with each run. |
this can be a pain sometimes thus it should be changed
The text was updated successfully, but these errors were encountered: