You can return the status of a search using the routing model's status method. Here's the Python code to print the status of a search:
print("Solver status: ", solver.status())
This prints an integer with the following meanings:
| Value | Description |
|---|---|
0 | ROUTING_NOT_SOLVED: Problem not solved yet. |
1 | ROUTING_SUCCESS: Problem solved successfully. |
2 | ROUTING_FAIL: No solution found to the problem. |
3 | ROUTING_FAIL_TIMEOUT: Time limit reached before finding a solution. |
4 | ROUTING_INVALID: Model, model parameters, or flags are not valid. |
--
You received this message because you are subscribed to the Google Groups "or-tools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to or-tools-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/or-tools-discuss/4bc3ea49-4a92-4445-a52d-ea27b839e298%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.