Closed makansij closed 1 year ago
The solver is integral All floats are rounder to 0.
Asked so many times :-(
If its been "Asked so many times" then maybe there should be a warning message. Perhaps that's a feature request.
It is documented in many places. On the devsite guide.
Obviously, we are failing.
Le lun. 12 juin 2023, 16:42, Jordan Makansi @.***> a écrit :
If its been "Asked so many times" then maybe there should be a warning message. Perhaps that's a feature request.
— Reply to this email directly, view it on GitHub https://github.com/google/or-tools/issues/3820#issuecomment-1587489269, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACUPL3JT4OI6VUNXMEAV5LDXK4TGFANCNFSM6AAAAAAZCY7LVM . You are receiving this because you were assigned.Message ID: @.***>
What version of OR-Tools and what language are you using? Language: Python
Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi) Routing Solver
What operating system (Linux, Windows, ...) and version? MacOSX Monterey
What did you do? I tried solving the Hamiltonian Path Problem (AKA "open TSP"). I followed directions here: https://developers.google.com/optimization/routing/routing_tasks about how to modify the distance matrix of this example: https://developers.google.com/optimization/routing/vrp#model I adapted it to my own problem and ran the following example shown below, which is intended to solve Hamiltonian path problem, with arbitrary start/end vertices.
What did you expect to see I expected to see a non-zero objective function value.
What did you see instead? The objective is 0:
It doesn't seem to be computing the distance between consecutive indices correctly:
routing.GetArcCostForVehicle(previous_index, index, vehicle_id)
returns0
regardless of the inputs provided.Is this the expected behavior? From what I can tell, my callback should compute the distance correctly. What else can I do to get the correct distance of the route?