30 Assert.NotNull(manager);
33 Assert.NotNull(routing);
41 return Math.Abs(toNode - fromNode);
63 Assert.NotNull(manager);
66 Assert.NotNull(routing);
68 long[][] matrix =
new long[][] {
69 new long[] { 1, 1, 1, 1, 1 },
new long[] { 1, 1, 1, 1, 1 },
new long[] { 1, 1, 1, 1, 1 },
70 new long[] { 1, 1, 1, 1, 1 },
new long[] { 1, 1, 1, 1, 1 },
89 Assert.NotNull(manager);
92 Assert.NotNull(routing);
100 return Math.Abs(toNode - fromNode);
117 Assert.NotNull(manager);
120 Assert.NotNull(routing);
122 long[][] matrix =
new long[][] {
123 new long[] { 1, 1, 1, 1, 1 },
new long[] { 1, 1, 1, 1, 1 },
new long[] { 1, 1, 1, 1, 1 },
124 new long[] { 1, 1, 1, 1, 1 },
new long[] { 1, 1, 1, 1, 1 },
145 Assert.NotNull(manager);
148 Assert.NotNull(routing);
150 long[] vector = { 1, 1, 1, 1, 1 };
168 Assert.NotNull(manager);
171 Assert.NotNull(routing);
197 Assert.NotNull(manager);
200 Assert.NotNull(routing);
202 long[] vector =
new long[] { 1, 1, 1, 1, 1 };
225 Assert.NotNull(boundCost);
226 Assert.Equal(0, boundCost.
bound);
227 Assert.Equal(0, boundCost.
cost);
230 Assert.NotNull(boundCost);
231 Assert.Equal(97, boundCost.
bound);
232 Assert.Equal(101, boundCost.
cost);
243 Assert.NotNull(manager);
246 Assert.NotNull(routing);
254 return Math.Abs(toNode - fromNode);
256 Assert.True(routing.
AddDimension(transitIndex, 100, 100,
true,
"Dimension"));
265 Assert.NotNull(manager);
268 Assert.NotNull(routing);
276 return Math.Abs(toNode - fromNode);
278 Assert.True(routing.
AddDimension(transitIndex, 100, 100,
true,
"Dimension"));
282 Assert.NotNull(boundCost);
284 foreach (
int v
in Enumerable.Range(0, manager.GetNumberOfVehicles()).ToArray())
286 dimension.SetSoftSpanUpperBoundForVehicle(boundCost, v);
287 BoundCost bc = dimension.GetSoftSpanUpperBoundForVehicle(v);
289 Assert.Equal(97, bc.
bound);
290 Assert.Equal(43, bc.
cost);
292 Assert.True(dimension.HasSoftSpanUpperBounds());
300 Assert.NotNull(manager);
303 Assert.NotNull(routing);
311 return Math.Abs(toNode - fromNode);
313 Assert.True(routing.
AddDimension(transitIndex, 100, 100,
true,
"Dimension"));
317 Assert.NotNull(boundCost);
319 foreach (
int v
in Enumerable.Range(0, manager.GetNumberOfVehicles()).ToArray())
321 dimension.SetQuadraticCostSoftSpanUpperBoundForVehicle(boundCost, v);
322 BoundCost bc = dimension.GetQuadraticCostSoftSpanUpperBoundForVehicle(v);
324 Assert.Equal(97, bc.
bound);
325 Assert.Equal(43, bc.
cost);
327 Assert.True(dimension.HasQuadraticCostSoftSpanUpperBounds());