-
Notifications
You must be signed in to change notification settings - Fork 77
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
Bug: 'Vehicle routing with capacity and time windows' python demo sometimes raises run-time, also I wanted to try it for my dataset and I followed the instruction but it didn't give me the ID #629
Comments
What was the RuntimeError raised, and on what dataset? What is your Python version? Additionally, all problems passed to |
Python 3.10.15, I tried all three datasets,
here is the error.
Getting route plan has failed.
500: Internal Server Error
Code: unknown
Error id: ----
about my own dataset:
I used
curl -X POST -H 'Content-Type:application/json'
http://localhost:8080/route-plans ***@***.***_output.json
combined_output.json is my dataset
Best regards,
…On Fri, Nov 15, 2024 at 12:47 PM Christopher Chianelli < ***@***.***> wrote:
What was the RuntimeError raised, and on what dataset? What is your Python
version? Additionally, all problems passed to /route-plans endpoint in
the vehicle routing quickstart share the same ID: 'ID'. To pass a custom
dataset, pass it directly to the /route-plans endpoint (which would
return the constant string 'ID'). To get the best solution found so far,
use /route-plans/ID.
—
Reply to this email directly, view it on GitHub
<#629 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALRC2GVU4V2A3JMMYFB6DQ32AXUOXAVCNFSM6AAAAABR3AZIQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZYG4ZTQNZVGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Was this in your logs?
This appears to be a rare bug that occurs when fetching a best solution; the error does not occur during solving (and it finishes solving in the background). My best guess is that a new best solution is found when the old best solution is being converted to JSON, and that inadvertently updates the objects of the old best solution during conversion. When sending a dataset to curl -X POST -H 'Content-Type:application/json' http://localhost:8080/route-plans -d @combined_output.json |
Thanks,
I tried
(myenv3.10) (myenv)
***@***.***:~/Downloads/timefold-quickstarts/python/vehicle-routing$
curl -X POST -H 'Content-Type:application/json'
http://localhost:8080/route-plans -d @combined_output.json
but still I don't have ID.
and could you please give me a hint after having the ID what is the script
to run
Thank you so much.
…On Fri, Nov 15, 2024 at 4:18 PM Christopher Chianelli < ***@***.***> wrote:
Was this in your logs?
File ".../type_adapter.py", line 339, in dump_python
return self.serializer.to_python(
File ".../python/vehicle-routing/src/vehicle_routing/domain.py", line 130, in arrival_time
return (self.visits[-1].departure_time +
TypeError: unsupported operand type(s) for +: 'NoneType' and 'datetime.timedelta'
This appears to be a rare bug that occurs when fetching a best solution;
the error does not occur during solving (and it finishes solving in the
background). My best guess is that a new best solution is found when the
old best solution is being converted to JSON, and that inadvertently
updates the objects of the old best solution during conversion.
When sending a dataset to route-plans, you need to send the JSON as the
body, which can be specified with -d:
curl -X POST -H 'Content-Type:application/json' http://localhost:8080/route-plans -d @combined_output.json
—
Reply to this email directly, view it on GitHub
<#629 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALRC2GTNHGH4VSLDF3IFUMT2AYNFFAVCNFSM6AAAAABR3AZIQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZZGMZTSNZYGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
The ID is always 'ID'. To get the output, run
(taken from the REST API page) |
Thank you so much for your help. |
Hi again!
I have this after trying to solve it,
curl -X 'GET' \T' \
'http://localhost:8080/route-plans/ID' \
-H 'accept: application/json'
{"name":"demo_data_carer","southWestCorner":[53.2,-9.2],"northEastCorner":[53.4,-8.9],"vehicles":[],"visits":[],"solverStatus":"NOT_SOLVING","totalDrivingTimeSeconds":0}
I am using all the basics in timefold-quickstarts, and I defined the
dataset to be feasible, but it didn't solve it.
Could you please give me some hint of why?
Bests,
Hoda
…On Fri, Nov 15, 2024 at 7:27 PM Christopher Chianelli < ***@***.***> wrote:
The ID is always 'ID'. To get the output, run
curl -X 'GET' \
'http://localhost:8080/route-plans/ID' \
-H 'accept: application/json'
(taken from the REST API page)
—
Reply to this email directly, view it on GitHub
<#629 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALRC2GRORRFANVOGT6WLUVL2AZDJTAVCNFSM6AAAAABR3AZIQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZZG43TCNBWGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Describe the bug
Describe the issue you are experiencing here.
Tell us what you were trying to do and what happened.
Expected behavior
Describe clearly and concisely what you expected to happen.
Actual behavior
Describe clearly and concisely what actually happened.
To Reproduce
Link to a small reproducer or attach an archive containing the reproducer to the issue.
Alternatively, provide clear and concise steps to reproduce the behavior.
Environment
Timefold Solver Version or Git ref:
Output of
java -version
:Output of
uname -a
orver
:Additional information
Provide any and all other information which might be relevant to the issue.
The text was updated successfully, but these errors were encountered: