One thing I noticed is that you've set time windows to be empty, but
then you say:
```
// Add time window constraints for each vehicle start node.
for (int i = 0; i < data.VehicleNumber; ++i)
{
long index = routing.Start(i);
timeDimension.CumulVar(index).SetRange(data.TimeWindows[0, 0], data.TimeWindows[0, 1]);
}
```
not sure why that isn't throwing an error of some sort.
Second, you are allowing at most one iteration:
```
searchParameters.SolutionLimit = 1;
searchParameters.TimeLimit = new Google.Protobuf.WellKnownTypes.Duration() { Seconds = TimeSpan.FromDays(1).Seconds};
```
One second is probably fine, but I believe solution limit = 1 means
just run the solver for one iteration, which might not produce a
solution.
Hope that helps,
James
On Mon, Aug 30, 2021 at 10:48:18AM -0700, Jens Magnus Mogensen wrote:
> Hey James
>
> This is a link to my
> gist:
https://gist.github.com/JensMagnus/89da3036b1bd7e99cf1bcd5667a66ff7
> Its the same as the example from the developers page, but I've modified it
> to accept some sort of DTO that matches the Google Matrix API response and
> then it proceeds to build the matrix. Here's the data I've been testing
> with, in a 8x8 grid.
>
> 0 16 4 9 15 14 8 24
> 16 0 13 21 15 15 11 16
> 4 13 0 11 12 11 4 20
> 10 22 12 0 15 13 14 22
> 15 15 12 13 0 1 14 10
> 14 15 11 12 1 0 13 10
> 8 11 5 13 14 13 0 18
> 25 18 21 21 11 11 19 0
>
> I've attempted to change the vehicle(s) from 1 to 8 to no avail.
>
> Notes:
>
> - The time matrix is overridden (DataModel), so that it uses my time
> matrix instead of the 16,0 example I gave.
> - I don't have any time constraints added to ease the possibility for a
> > <
https://groups.google.com/d/msgid/or-tools-discuss/240d583b-3d5f-40fe-ab50-9c58e2442b78n%40googlegroups.com?utm_medium=email&utm_source=footer>
> > .
> >
> >
>
> --
> 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/341e2ed0-3328-4754-8e80-380eb3903c75n%40googlegroups.com.
--
James E. Marca
Activimetrics LLC