DotNet Reference

.Net Reference

RoutingModel.cs
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // <auto-generated />
3 //
4 // This file was automatically generated by SWIG (http://www.swig.org).
5 // Version 4.0.2
6 //
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
10 
12 
13 using System;
14 using System.Runtime.InteropServices;
15 using System.Collections;
16 using System.Collections.Generic;
17 
18 public partial class RoutingModel : global::System.IDisposable {
19  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
20  protected bool swigCMemOwn;
21 
22  internal RoutingModel(global::System.IntPtr cPtr, bool cMemoryOwn) {
23  swigCMemOwn = cMemoryOwn;
24  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
25  }
26 
27  internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RoutingModel obj) {
28  return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
29  }
30 
31  ~RoutingModel() {
32  Dispose(false);
33  }
34 
35  public void Dispose() {
36  Dispose(true);
37  global::System.GC.SuppressFinalize(this);
38  }
39 
40  protected virtual void Dispose(bool disposing) {
41  lock(this) {
42  if (swigCPtr.Handle != global::System.IntPtr.Zero) {
43  if (swigCMemOwn) {
44  swigCMemOwn = false;
46  }
47  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
48  }
49  }
50  }
51 
52  // Keep reference to delegate to avoid GC to collect them early.
53  private List<LongToLong> unaryTransitCallbacks;
54  private LongToLong StoreLongToLong(LongToLong c) {
55  if (unaryTransitCallbacks == null)
56  unaryTransitCallbacks = new List<LongToLong>();
57  unaryTransitCallbacks.Add(c);
58  return c;
59  }
60 
61  private List<LongLongToLong> transitCallbacks;
62  private LongLongToLong StoreLongLongToLong(LongLongToLong c) {
63  if (transitCallbacks == null)
64  transitCallbacks = new List<LongLongToLong>();
65  transitCallbacks.Add(c);
66  return c;
67  }
68 
69  private List<VoidToVoid> solutionCallbacks;
70  private VoidToVoid StoreVoidToVoid(VoidToVoid c) {
71  if (solutionCallbacks == null)
72  solutionCallbacks = new List<VoidToVoid>();
73  solutionCallbacks.Add(c);
74  return c;
75  }
76 
77  public partial class VehicleTypeContainer : global::System.IDisposable {
78  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
79  protected bool swigCMemOwn;
80 
81  internal VehicleTypeContainer(global::System.IntPtr cPtr, bool cMemoryOwn) {
82  swigCMemOwn = cMemoryOwn;
83  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
84  }
85 
86  internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VehicleTypeContainer obj) {
87  return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
88  }
89 
91  Dispose(false);
92  }
93 
94  public void Dispose() {
95  Dispose(true);
96  global::System.GC.SuppressFinalize(this);
97  }
98 
99  protected virtual void Dispose(bool disposing) {
100  lock(this) {
101  if (swigCPtr.Handle != global::System.IntPtr.Zero) {
102  if (swigCMemOwn) {
103  swigCMemOwn = false;
105  }
106  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
107  }
108  }
109  }
110 
111  public partial class VehicleClassEntry : global::System.IDisposable {
112  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
113  protected bool swigCMemOwn;
114 
115  internal VehicleClassEntry(global::System.IntPtr cPtr, bool cMemoryOwn) {
116  swigCMemOwn = cMemoryOwn;
117  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
118  }
119 
120  internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VehicleClassEntry obj) {
121  return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
122  }
123 
124  ~VehicleClassEntry() {
125  Dispose(false);
126  }
127 
128  public void Dispose() {
129  Dispose(true);
130  global::System.GC.SuppressFinalize(this);
131  }
132 
133  protected virtual void Dispose(bool disposing) {
134  lock(this) {
135  if (swigCPtr.Handle != global::System.IntPtr.Zero) {
136  if (swigCMemOwn) {
137  swigCMemOwn = false;
139  }
140  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
141  }
142  }
143  }
144 
145  public int vehicle_class {
146  set {
148  }
149  get {
151  return ret;
152  }
153  }
154 
155  public long fixed_cost {
156  set {
158  }
159  get {
161  return ret;
162  }
163  }
164 
165  public VehicleClassEntry() : this(operations_research_constraint_solverPINVOKE.new_RoutingModel_VehicleTypeContainer_VehicleClassEntry(), true) {
166  }
167 
168  }
169 
170  public int NumTypes() {
172  return ret;
173  }
174 
175  public int Type(int vehicle) {
177  return ret;
178  }
179 
181  set {
183  }
184  get {
186  IntVector ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVector(cPtr, false);
187  return ret;
188  }
189  }
190 
191  public SWIGTYPE_p_std__vectorT_std__setT_operations_research__RoutingModel__VehicleTypeContainer__VehicleClassEntry_t_t sorted_vehicle_classes_per_type {
192  set {
193  operations_research_constraint_solverPINVOKE.RoutingModel_VehicleTypeContainer_sorted_vehicle_classes_per_type_set(swigCPtr, SWIGTYPE_p_std__vectorT_std__setT_operations_research__RoutingModel__VehicleTypeContainer__VehicleClassEntry_t_t.getCPtr(value));
194  }
195  get {
197  SWIGTYPE_p_std__vectorT_std__setT_operations_research__RoutingModel__VehicleTypeContainer__VehicleClassEntry_t_t ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_std__vectorT_std__setT_operations_research__RoutingModel__VehicleTypeContainer__VehicleClassEntry_t_t(cPtr, false);
198  return ret;
199  }
200  }
201 
202  public SWIGTYPE_p_std__vectorT_std__dequeT_int_t_t vehicles_per_vehicle_class {
203  set {
204  operations_research_constraint_solverPINVOKE.RoutingModel_VehicleTypeContainer_vehicles_per_vehicle_class_set(swigCPtr, SWIGTYPE_p_std__vectorT_std__dequeT_int_t_t.getCPtr(value));
205  }
206  get {
208  SWIGTYPE_p_std__vectorT_std__dequeT_int_t_t ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_std__vectorT_std__dequeT_int_t_t(cPtr, false);
209  return ret;
210  }
211  }
212 
213  public VehicleTypeContainer() : this(operations_research_constraint_solverPINVOKE.new_RoutingModel_VehicleTypeContainer(), true) {
214  }
215 
216  }
217 
218  public static long kNoPenalty {
219  get {
221  return ret;
222  }
223  }
224 
225  public static int kNoDisjunction {
226  get {
228  }
229 
230  }
231 
232  public static int kNoDimension {
233  get {
235  }
236 
237  }
238 
239  public RoutingModel(RoutingIndexManager index_manager) : this(operations_research_constraint_solverPINVOKE.new_RoutingModel__SWIG_0(RoutingIndexManager.getCPtr(index_manager)), true) {
241  }
242 
243  public RoutingModel(RoutingIndexManager index_manager, Google.OrTools.ConstraintSolver.RoutingModelParameters parameters) : this(operations_research_constraint_solverPINVOKE.new_RoutingModel__SWIG_1(RoutingIndexManager.getCPtr(index_manager), parameters.CalculateSize(), ProtoHelper.ProtoToByteArray(parameters)), true) {
245  }
246 
247  public int RegisterUnaryTransitCallback( LongToLong callback) {
248  int ret = operations_research_constraint_solverPINVOKE.RoutingModel_RegisterUnaryTransitCallback(swigCPtr, StoreLongToLong(callback) );
249  return ret;
250  }
251 
254  return ret;
255  }
256 
257  public int RegisterTransitCallback( LongLongToLong callback) {
258  int ret = operations_research_constraint_solverPINVOKE.RoutingModel_RegisterTransitCallback(swigCPtr, StoreLongLongToLong(callback) );
259  return ret;
260  }
261 
263  int ret = operations_research_constraint_solverPINVOKE.RoutingModel_RegisterPositiveTransitCallback(swigCPtr, StoreLongLongToLong(callback) );
264  return ret;
265  }
266 
267  public bool AddDimension(int evaluator_index, long slack_max, long capacity, bool fix_start_cumul_to_zero, string name) {
268  bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_AddDimension(swigCPtr, evaluator_index, slack_max, capacity, fix_start_cumul_to_zero, name);
270  return ret;
271  }
272 
273  public bool AddDimensionWithVehicleTransits( int[] evaluator_indices, long slack_max, long capacity, bool fix_start_cumul_to_zero, string name) {
274  bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_AddDimensionWithVehicleTransits(swigCPtr, evaluator_indices.Length, evaluator_indices , slack_max, capacity, fix_start_cumul_to_zero, name);
276  return ret;
277  }
278 
279  public bool AddDimensionWithVehicleCapacity(int evaluator_index, long slack_max, long[] vehicle_capacities, bool fix_start_cumul_to_zero, string name) {
280  bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_AddDimensionWithVehicleCapacity(swigCPtr, evaluator_index, slack_max, vehicle_capacities.Length, vehicle_capacities , fix_start_cumul_to_zero, name);
282  return ret;
283  }
284 
285  public bool AddDimensionWithVehicleTransitAndCapacity( int[] evaluator_indices, long slack_max, long[] vehicle_capacities, bool fix_start_cumul_to_zero, string name) {
286  bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_AddDimensionWithVehicleTransitAndCapacity(swigCPtr, evaluator_indices.Length, evaluator_indices , slack_max, vehicle_capacities.Length, vehicle_capacities , fix_start_cumul_to_zero, name);
288  return ret;
289  }
290 
291  public bool AddConstantDimensionWithSlack(long value, long capacity, long slack_max, bool fix_start_cumul_to_zero, string name) {
292  bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_AddConstantDimensionWithSlack(swigCPtr, value, capacity, slack_max, fix_start_cumul_to_zero, name);
294  return ret;
295  }
296 
297  public bool AddConstantDimension(long value, long capacity, bool fix_start_cumul_to_zero, string name) {
298  bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_AddConstantDimension(swigCPtr, value, capacity, fix_start_cumul_to_zero, name);
300  return ret;
301  }
302 
303  public bool AddVectorDimension( long[] values, long capacity, bool fix_start_cumul_to_zero, string name) {
304  bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_AddVectorDimension(swigCPtr, values.Length, values , capacity, fix_start_cumul_to_zero, name);
306  return ret;
307  }
308 
310  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_MakePathSpansAndTotalSlacks(swigCPtr, RoutingDimension.getCPtr(dimension), IntVarVector.getCPtr(spans), IntVarVector.getCPtr(total_slacks));
311  Constraint ret = (cPtr == global::System.IntPtr.Zero) ? null : new Constraint(cPtr, false);
313  return ret;
314  }
315 
316  public bool HasDimension(string dimension_name) {
317  bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_HasDimension(swigCPtr, dimension_name);
319  return ret;
320  }
321 
322  public RoutingDimension GetDimensionOrDie(string dimension_name) {
325  return ret;
326  }
327 
328  public RoutingDimension GetMutableDimension(string dimension_name) {
330  RoutingDimension ret = (cPtr == global::System.IntPtr.Zero) ? null : new RoutingDimension(cPtr, false);
332  return ret;
333  }
334 
335  public void SetPrimaryConstrainedDimension(string dimension_name) {
338  }
339 
342  return ret;
343  }
344 
345  public int AddDisjunction( long[] indices, long penalty, long max_cardinality) {
346  return operations_research_constraint_solverPINVOKE.RoutingModel_AddDisjunction__SWIG_0(swigCPtr, indices.Length, indices , penalty, max_cardinality);
347 }
348 
349  public int AddDisjunction( long[] indices, long penalty) {
350  return operations_research_constraint_solverPINVOKE.RoutingModel_AddDisjunction__SWIG_1(swigCPtr, indices.Length, indices , penalty);
351 }
352 
353  public int AddDisjunction( long[] indices) {
355 }
356 
357  public int[] GetDisjunctionIndices(long index) {
359  IntVector tmpVector = null;
360  if (cPtr != global::System.IntPtr.Zero) {
361  tmpVector = new IntVector(cPtr, true);
362  int[] outArray = new int[tmpVector.Count];
363  tmpVector.CopyTo(outArray);
364  return outArray;
365  }
366  return null;
367 }
368 
369  public long[] GetDisjunctionIndices(int index) {
371  Int64Vector tmpVector = null;
372  if (cPtr != global::System.IntPtr.Zero) {
373  tmpVector = new Int64Vector(cPtr, true);
374  long[] outArray = new long[tmpVector.Count];
375  tmpVector.CopyTo(outArray);
376  return outArray;
377  }
378  return null;
379 }
380 
381  public long GetDisjunctionPenalty(int index) {
383  return ret;
384  }
385 
386  public long GetDisjunctionMaxCardinality(int index) {
388  return ret;
389  }
390 
391  public int GetNumberOfDisjunctions() {
393  return ret;
394  }
395 
398  }
399 
400  public void AddSoftSameVehicleConstraint( long[] indices, long cost) {
402  }
403 
404  public void SetAllowedVehiclesForIndex( int[] vehicles, long index) {
406  }
407 
408  public bool IsVehicleAllowedForIndex(int vehicle, long index) {
410  return ret;
411  }
412 
413  public void AddPickupAndDelivery(long pickup, long delivery) {
415  }
416 
417  public void AddPickupAndDeliverySets(int pickup_disjunction, int delivery_disjunction) {
418  operations_research_constraint_solverPINVOKE.RoutingModel_AddPickupAndDeliverySets(swigCPtr, pickup_disjunction, delivery_disjunction);
419  }
420 
421  public void SetPickupAndDeliveryPolicyOfAllVehicles(int policy) {
423  }
424 
425  public void SetPickupAndDeliveryPolicyOfVehicle(int policy, int vehicle) {
427  }
428 
429  public int GetPickupAndDeliveryPolicyOfVehicle(int vehicle) {
431  return ret;
432  }
433 
434  public int GetNumOfSingletonNodes() {
436  return ret;
437  }
438 
439  public void SetVisitType(long index, int type, int type_policy) {
441  }
442 
443  public int GetVisitType(long index) {
445  return ret;
446  }
447 
448  public int[] GetSingleNodesOfType(int type) {
450  IntVector tmpVector = null;
451  if (cPtr != global::System.IntPtr.Zero) {
452  tmpVector = new IntVector(cPtr, true);
453  int[] outArray = new int[tmpVector.Count];
454  tmpVector.CopyTo(outArray);
455  return outArray;
456  }
457  return null;
458 }
459 
460  public int[] GetPairIndicesOfType(int type) {
462  IntVector tmpVector = null;
463  if (cPtr != global::System.IntPtr.Zero) {
464  tmpVector = new IntVector(cPtr, true);
465  int[] outArray = new int[tmpVector.Count];
466  tmpVector.CopyTo(outArray);
467  return outArray;
468  }
469  return null;
470 }
471 
472  public int GetVisitTypePolicy(long index) {
474  return ret;
475  }
476 
477  public int GetNumberOfVisitTypes() {
479  return ret;
480  }
481 
482  public void AddRequiredTypeAlternativesWhenAddingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives) {
483  operations_research_constraint_solverPINVOKE.RoutingModel_AddRequiredTypeAlternativesWhenAddingType(swigCPtr, dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t.getCPtr(required_type_alternatives));
485  }
486 
487  public void AddRequiredTypeAlternativesWhenRemovingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives) {
488  operations_research_constraint_solverPINVOKE.RoutingModel_AddRequiredTypeAlternativesWhenRemovingType(swigCPtr, dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t.getCPtr(required_type_alternatives));
490  }
491 
492  public SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetRequiredTypeAlternativesWhenAddingType(int type) {
493  SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t ret = new SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t(operations_research_constraint_solverPINVOKE.RoutingModel_GetRequiredTypeAlternativesWhenAddingType(swigCPtr, type), false);
494  return ret;
495  }
496 
497  public SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetRequiredTypeAlternativesWhenRemovingType(int type) {
498  SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t ret = new SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t(operations_research_constraint_solverPINVOKE.RoutingModel_GetRequiredTypeAlternativesWhenRemovingType(swigCPtr, type), false);
499  return ret;
500  }
501 
502  public long UnperformedPenalty(long var_index) {
504  return ret;
505  }
506 
507  public long UnperformedPenaltyOrValue(long default_value, long var_index) {
508  long ret = operations_research_constraint_solverPINVOKE.RoutingModel_UnperformedPenaltyOrValue(swigCPtr, default_value, var_index);
509  return ret;
510  }
511 
512  public long GetDepot() {
514  return ret;
515  }
516 
517  public void SetMaximumNumberOfActiveVehicles(int max_active_vehicles) {
519  }
520 
523  return ret;
524  }
525 
526  public void SetArcCostEvaluatorOfAllVehicles(int evaluator_index) {
528  }
529 
530  public void SetArcCostEvaluatorOfVehicle(int evaluator_index, int vehicle) {
532  }
533 
534  public void SetFixedCostOfAllVehicles(long cost) {
536  }
537 
538  public void SetFixedCostOfVehicle(long cost, int vehicle) {
540  }
541 
542  public long GetFixedCostOfVehicle(int vehicle) {
544  return ret;
545  }
546 
547  public void SetAmortizedCostFactorsOfAllVehicles(long linear_cost_factor, long quadratic_cost_factor) {
548  operations_research_constraint_solverPINVOKE.RoutingModel_SetAmortizedCostFactorsOfAllVehicles(swigCPtr, linear_cost_factor, quadratic_cost_factor);
549  }
550 
551  public void SetAmortizedCostFactorsOfVehicle(long linear_cost_factor, long quadratic_cost_factor, int vehicle) {
552  operations_research_constraint_solverPINVOKE.RoutingModel_SetAmortizedCostFactorsOfVehicle(swigCPtr, linear_cost_factor, quadratic_cost_factor, vehicle);
553  }
554 
557  Int64Vector tmpVector = null;
558  if (cPtr != global::System.IntPtr.Zero) {
559  tmpVector = new Int64Vector(cPtr, true);
560  long[] outArray = new long[tmpVector.Count];
561  tmpVector.CopyTo(outArray);
562  return outArray;
563  }
564  return null;
565 }
566 
569  Int64Vector tmpVector = null;
570  if (cPtr != global::System.IntPtr.Zero) {
571  tmpVector = new Int64Vector(cPtr, true);
572  long[] outArray = new long[tmpVector.Count];
573  tmpVector.CopyTo(outArray);
574  return outArray;
575  }
576  return null;
577 }
578 
579  public void ConsiderEmptyRouteCostsForVehicle(bool consider_costs, int vehicle) {
581  }
582 
583  public bool AreEmptyRouteCostsConsideredForVehicle(int vehicle) {
585  return ret;
586  }
587 
588  public void SetFirstSolutionEvaluator( LongLongToLong evaluator) {
590  }
591 
592  public void AddLocalSearchOperator(LocalSearchOperator ls_operator) {
594  }
595 
596  public void AddSearchMonitor(SearchMonitor monitor) {
598  }
599 
600  public void AddAtSolutionCallback( VoidToVoid callback) {
602  }
603 
606  }
607 
610  }
611 
612  public void AddWeightedVariableMinimizedByFinalizer(IntVar var, long cost) {
614  }
615 
616  public void AddVariableTargetToFinalizer(IntVar var, long target) {
618  }
619 
620  public void CloseModel() {
622  }
623 
625  operations_research_constraint_solverPINVOKE.RoutingModel_CloseModelWithParameters(swigCPtr, search_parameters.CalculateSize(), ProtoHelper.ProtoToByteArray(search_parameters));
626  }
627 
628  public Assignment Solve(Assignment assignment) {
630  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
631  return ret;
632  }
633 
634  public Assignment Solve() {
636  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
637  return ret;
638  }
639 
641  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_SolveWithParameters(swigCPtr, search_parameters.CalculateSize(), ProtoHelper.ProtoToByteArray(search_parameters));
642  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
643  return ret;
644  }
645 
647  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_SolveFromAssignmentWithParameters(swigCPtr, Assignment.getCPtr(assignment), search_parameters.CalculateSize(), ProtoHelper.ProtoToByteArray(search_parameters));
648  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
649  return ret;
650  }
651 
652  public void SetAssignmentFromOtherModelAssignment(Assignment target_assignment, RoutingModel source_model, Assignment source_assignment) {
653  operations_research_constraint_solverPINVOKE.RoutingModel_SetAssignmentFromOtherModelAssignment(swigCPtr, Assignment.getCPtr(target_assignment), RoutingModel.getCPtr(source_model), Assignment.getCPtr(source_assignment));
654  }
655 
656  public long ComputeLowerBound() {
658  return ret;
659  }
660 
661  public int GetStatus() {
663  return ret;
664  }
665 
666  public IntVar ApplyLocks( long[] locks) {
667  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_ApplyLocks(swigCPtr, locks.Length, locks );
668  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
669  return ret;
670  }
671 
672  public bool ApplyLocksToAllVehicles( long[][] locks, bool close_routes) {
674  locks.GetLength(0),
675  NestedArrayHelper.GetArraySecondSize(locks),
676  NestedArrayHelper.GetFlatArray(locks)
677 , close_routes);
678  return ret;
679  }
680 
683  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
684  return ret;
685  }
686 
689  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
690  return ret;
691  }
692 
693  public bool WriteAssignment(string file_name) {
696  return ret;
697  }
698 
699  public Assignment ReadAssignment(string file_name) {
701  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
703  return ret;
704  }
705 
708  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
710  return ret;
711  }
712 
713  public Assignment ReadAssignmentFromRoutes( long[][] routes, bool ignore_inactive_indices) {
715  routes.GetLength(0),
716  NestedArrayHelper.GetArraySecondSize(routes),
717  NestedArrayHelper.GetFlatArray(routes)
718 , ignore_inactive_indices);
719  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
720  return ret;
721  }
722 
723  public bool RoutesToAssignment( long[][] routes, bool ignore_inactive_indices, bool close_routes, Assignment assignment) {
725  routes.GetLength(0),
726  NestedArrayHelper.GetArraySecondSize(routes),
727  NestedArrayHelper.GetFlatArray(routes)
728 , ignore_inactive_indices, close_routes, Assignment.getCPtr(assignment));
729  return ret;
730  }
731 
732  public void AssignmentToRoutes(Assignment assignment, long[][] routes) {
734  routes.GetLength(0),
735  NestedArrayHelper.GetArraySecondSize(routes),
736  NestedArrayHelper.GetFlatArray(routes)
737 );
739  }
740 
743  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
745  return ret;
746  }
747 
750  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
752  return ret;
753  }
754 
755  public void AddToAssignment(IntVar var) {
757  }
758 
759  public void AddIntervalToAssignment(IntervalVar interval) {
761  }
762 
765  }
766 
767  public long Start(int vehicle) {
769  return ret;
770  }
771 
772  public long End(int vehicle) {
774  return ret;
775  }
776 
777  public bool IsStart(long index) {
779  return ret;
780  }
781 
782  public bool IsEnd(long index) {
784  return ret;
785  }
786 
787  public int VehicleIndex(int index) {
789  return ret;
790  }
791 
792  public long Next(Assignment assignment, long index) {
793  long ret = operations_research_constraint_solverPINVOKE.RoutingModel_Next(swigCPtr, Assignment.getCPtr(assignment), index);
795  return ret;
796  }
797 
798  public bool IsVehicleUsed(Assignment assignment, int vehicle) {
799  bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_IsVehicleUsed(swigCPtr, Assignment.getCPtr(assignment), vehicle);
801  return ret;
802  }
803 
804  public IntVarVector Nexts() {
806  return ret;
807  }
808 
811  return ret;
812  }
813 
814  public IntVar NextVar(long index) {
816  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
817  return ret;
818  }
819 
820  public IntVar ActiveVar(long index) {
822  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
823  return ret;
824  }
825 
826  public IntVar ActiveVehicleVar(int vehicle) {
828  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
829  return ret;
830  }
831 
832  public IntVar VehicleCostsConsideredVar(int vehicle) {
834  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
835  return ret;
836  }
837 
838  public IntVar VehicleVar(long index) {
840  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
841  return ret;
842  }
843 
844  public IntVar CostVar() {
846  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
847  return ret;
848  }
849 
850  public long GetArcCostForVehicle(long from_index, long to_index, long vehicle) {
851  long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetArcCostForVehicle(swigCPtr, from_index, to_index, vehicle);
852  return ret;
853  }
854 
857  return ret;
858  }
859 
860  public long GetHomogeneousCost(long from_index, long to_index) {
861  long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetHomogeneousCost(swigCPtr, from_index, to_index);
862  return ret;
863  }
864 
865  public long GetArcCostForFirstSolution(long from_index, long to_index) {
867  return ret;
868  }
869 
870  public long GetArcCostForClass(long from_index, long to_index, long cost_class_index) {
871  long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetArcCostForClass(swigCPtr, from_index, to_index, cost_class_index);
872  return ret;
873  }
874 
875  public int GetCostClassIndexOfVehicle(long vehicle) {
877 }
878 
879  public bool HasVehicleWithCostClassIndex(int cost_class_index) {
881  return ret;
882  }
883 
884  public int GetCostClassesCount() {
886  return ret;
887  }
888 
891  return ret;
892  }
893 
894  public int GetVehicleClassIndexOfVehicle(long vehicle) {
896 }
897 
898  public int GetVehicleClassesCount() {
900  return ret;
901  }
902 
903  public int[] GetSameVehicleIndicesOfIndex(int node) {
905  IntVector tmpVector = null;
906  if (cPtr != global::System.IntPtr.Zero) {
907  tmpVector = new IntVector(cPtr, true);
908  int[] outArray = new int[tmpVector.Count];
909  tmpVector.CopyTo(outArray);
910  return outArray;
911  }
912  return null;
913 }
914 
917  return ret;
918  }
919 
920  public bool ArcIsMoreConstrainedThanArc(long from, long to1, long to2) {
922  return ret;
923  }
924 
925  public string DebugOutputAssignment(Assignment solution_assignment, string dimension_to_print) {
926  string ret = operations_research_constraint_solverPINVOKE.RoutingModel_DebugOutputAssignment(swigCPtr, Assignment.getCPtr(solution_assignment), dimension_to_print);
928  return ret;
929  }
930 
931  public Solver solver() {
933  Solver ret = (cPtr == global::System.IntPtr.Zero) ? null : new Solver(cPtr, false);
934  return ret;
935  }
936 
937  public bool CheckLimit() {
939  return ret;
940  }
941 
942  public int Nodes() {
944  return ret;
945  }
946 
947  public int Vehicles() {
949  return ret;
950  }
951 
952  public long Size() {
954  return ret;
955  }
956 
958  long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetNumberOfDecisionsInFirstSolution(swigCPtr, search_parameters.CalculateSize(), ProtoHelper.ProtoToByteArray(search_parameters));
959  return ret;
960  }
961 
963  long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetNumberOfRejectsInFirstSolution(swigCPtr, search_parameters.CalculateSize(), ProtoHelper.ProtoToByteArray(search_parameters));
964  return ret;
965  }
966 
967  public bool IsMatchingModel() {
969  return ret;
970  }
971 
973  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_MakeGuidedSlackFinalizer(swigCPtr, RoutingDimension.getCPtr(dimension), StoreLongToLong(initializer) );
974  DecisionBuilder ret = (cPtr == global::System.IntPtr.Zero) ? null : new DecisionBuilder(cPtr, false);
975  return ret;
976  }
977 
980  DecisionBuilder ret = (cPtr == global::System.IntPtr.Zero) ? null : new DecisionBuilder(cPtr, false);
981  return ret;
982  }
983 
984  // Status
990 
991  // PickupAndDeliveryPolicy
995 
996  // VisitTypePolicy
1001 
1002 }
1003 
1004 }
Assignment MutablePreAssignment()
Assignment SolveFromAssignmentWithParameters(Assignment assignment, Google.OrTools.ConstraintSolver.RoutingSearchParameters search_parameters)
IntVar VehicleVar(long index)
IntVar CostVar()
static bool RoutingModel_CheckLimit(global::System.Runtime.InteropServices.HandleRef jarg1)
static void delete_RoutingModel(global::System.Runtime.InteropServices.HandleRef jarg1)
int NumTypes()
Definition: IntVar.cs:18
bool RoutesToAssignment(long[][] routes, bool ignore_inactive_indices, bool close_routes, Assignment assignment)
void SetFirstSolutionEvaluator(LongLongToLong evaluator)
static void RoutingModel_SetVisitType(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, int jarg3, int jarg4)
static void RoutingModel_AddLocalSearchFilter(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static int RoutingModel_PICKUP_AND_DELIVERY_FIFO_get()
long GetNumberOfDecisionsInFirstSolution(Google.OrTools.ConstraintSolver.RoutingSearchParameters search_parameters)
static bool RoutingModel_AddConstantDimensionWithSlack(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3, long jarg4, bool jarg5, string jarg6)
void Dispose()
Definition: RoutingModel.cs:35
static global::System.IntPtr RoutingModel_GetDimensionOrDie(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2)
bool AddVectorDimension(long[] values, long capacity, bool fix_start_cumul_to_zero, string name)
static void RoutingModel_SetPrimaryConstrainedDimension(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2)
static long RoutingModel_GetDepot(global::System.Runtime.InteropServices.HandleRef jarg1)
static int RoutingModel_ADDED_TYPE_REMOVED_FROM_VEHICLE_get()
delegate long LongToLong(long t)
static readonly int ROUTING_FAIL_TIMEOUT
static readonly int TYPE_ON_VEHICLE_UP_TO_VISIT
static int kNoDimension
static void RoutingModel_SetAmortizedCostFactorsOfVehicle(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3, int jarg4)
static global::System.IntPtr RoutingModel_Solve__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
void SetArcCostEvaluatorOfAllVehicles(int evaluator_index)
static void RoutingModel_AddSearchMonitor(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static int RoutingModel_VehicleIndex(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
bool HasDimension(string dimension_name)
static global::System.IntPtr RoutingModel_PreAssignment(global::System.Runtime.InteropServices.HandleRef jarg1)
static void RoutingModel_SetAssignmentFromOtherModelAssignment(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, global::System.Runtime.InteropServices.HandleRef jarg4)
void AddLocalSearchOperator(LocalSearchOperator ls_operator)
static long RoutingModel_GetNumberOfDecisionsInFirstSolution(global::System.Runtime.InteropServices.HandleRef jarg1, int search_parameters_size, byte[] jarg2)
static int RoutingModel_Vehicles(global::System.Runtime.InteropServices.HandleRef jarg1)
long End(int vehicle)
static int RoutingModel_GetNonZeroCostClassesCount(global::System.Runtime.InteropServices.HandleRef jarg1)
int GetVehicleClassIndexOfVehicle(long vehicle)
static global::System.IntPtr RoutingModel_GetRequiredTypeAlternativesWhenRemovingType(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static global::System.IntPtr RoutingModel_GetVehicleTypeContainer(global::System.Runtime.InteropServices.HandleRef jarg1)
static void RoutingModel_AddRequiredTypeAlternativesWhenAddingType(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static long RoutingModel_GetArcCostForFirstSolution(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3)
static long RoutingModel_GetHomogeneousCost(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3)
static void RoutingModel_SetFirstSolutionEvaluator(global::System.Runtime.InteropServices.HandleRef jarg1, LongLongToLong jarg2)
static void RoutingModel_SetAmortizedCostFactorsOfAllVehicles(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3)
static global::System.IntPtr RoutingModel_CompactAndCheckAssignment(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static bool RoutingModel_AddVectorDimension(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2, long jarg3, bool jarg4, string jarg5)
static global::System.IntPtr RoutingModel_MakePathSpansAndTotalSlacks(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, global::System.Runtime.InteropServices.HandleRef jarg4)
static int RoutingModel_Nodes(global::System.Runtime.InteropServices.HandleRef jarg1)
void AddVariableMinimizedByFinalizer(IntVar var)
SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetRequiredTypeAlternativesWhenAddingType(int type)
virtual void Dispose(bool disposing)
Definition: RoutingModel.cs:99
long GetDisjunctionMaxCardinality(int index)
long[] GetAmortizedLinearCostFactorOfVehicles()
int GetCostClassIndexOfVehicle(long vehicle)
int GetStatus()
static int RoutingModel_GetVisitTypePolicy(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
void SetPrimaryConstrainedDimension(string dimension_name)
bool AddConstantDimensionWithSlack(long value, long capacity, long slack_max, bool fix_start_cumul_to_zero, string name)
static string RoutingModel_GetPrimaryConstrainedDimension(global::System.Runtime.InteropServices.HandleRef jarg1)
delegate void VoidToVoid()
static global::System.IntPtr RoutingModel_GetSingleNodesOfType(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
IntVar ActiveVar(long index)
static global::System.IntPtr RoutingModel_Nexts(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool RoutingModel_HasVehicleWithCostClassIndex(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static global::System.IntPtr RoutingModel_ApplyLocks(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2)
static int RoutingModel_kNoDimension_get()
static bool RoutingModel_CostsAreHomogeneousAcrossVehicles(global::System.Runtime.InteropServices.HandleRef jarg1)
static void RoutingModel_AddVariableMinimizedByFinalizer(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
int GetPickupAndDeliveryPolicyOfVehicle(int vehicle)
static int RoutingModel_AddDisjunction__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2, long jarg3)
static bool Pending
static int RoutingModel_GetMaximumNumberOfActiveVehicles(global::System.Runtime.InteropServices.HandleRef jarg1)
static void RoutingModel_AddWeightedVariableMinimizedByFinalizer(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, long jarg3)
SWIGTYPE_p_std__vectorT_std__dequeT_int_t_t? vehicles_per_vehicle_class
static global::System.IntPtr RoutingModel_GetDisjunctionIndices__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static long RoutingModel_Next(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, long jarg3)
static void RoutingModel_CloseModel(global::System.Runtime.InteropServices.HandleRef jarg1)
int Count
Assignment ReadAssignment(string file_name)
static void RoutingModel_VehicleTypeContainer_sorted_vehicle_classes_per_type_set(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static bool RoutingModel_IsStart(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static string RoutingModel_DebugOutputAssignment(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, string jarg3)
static void RoutingModel_AddAtSolutionCallback(global::System.Runtime.InteropServices.HandleRef jarg1, VoidToVoid jarg2)
static global::System.IntPtr RoutingModel_VehicleVar(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
int[] GetSingleNodesOfType(int type)
static byte[] ProtoToByteArray(IMessage message)
Definition: ProtoHelper.cs:22
IntVar ActiveVehicleVar(int vehicle)
RoutingModel(RoutingIndexManager index_manager, Google.OrTools.ConstraintSolver.RoutingModelParameters parameters)
static int RoutingModel_ROUTING_SUCCESS_get()
void ConsiderEmptyRouteCostsForVehicle(bool consider_costs, int vehicle)
static global::System.IntPtr RoutingModel_RestoreAssignment(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
void SetPickupAndDeliveryPolicyOfAllVehicles(int policy)
static void RoutingModel_ConsiderEmptyRouteCostsForVehicle(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2, int jarg3)
Parameters which have to be set when creating a RoutingModel.
void AddPickupAndDelivery(long pickup, long delivery)
void SetAllowedVehiclesForIndex(int[] vehicles, long index)
void CloseModelWithParameters(Google.OrTools.ConstraintSolver.RoutingSearchParameters search_parameters)
long GetNumberOfRejectsInFirstSolution(Google.OrTools.ConstraintSolver.RoutingSearchParameters search_parameters)
static long RoutingModel_UnperformedPenalty(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static long RoutingModel_Size(global::System.Runtime.InteropServices.HandleRef jarg1)
void AssignmentToRoutes(Assignment assignment, long[][] routes)
static void RoutingModel_SetMaximumNumberOfActiveVehicles(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static void RoutingModel_AddVariableTargetToFinalizer(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, long jarg3)
static void delete_RoutingModel_VehicleTypeContainer(global::System.Runtime.InteropServices.HandleRef jarg1)
Definition: RoutingModel.cs:77
bool swigCMemOwn
Definition: RoutingModel.cs:20
int GetVisitTypePolicy(long index)
static readonly int ADDED_TYPE_REMOVED_FROM_VEHICLE
int Nodes()
void AddVariableTargetToFinalizer(IntVar var, long target)
virtual void Dispose(bool disposing)
SWIGTYPE_p_std__vectorT_std__setT_operations_research__RoutingModel__VehicleTypeContainer__VehicleClassEntry_t_t? sorted_vehicle_classes_per_type
void SetFixedCostOfAllVehicles(long cost)
Assignment CompactAndCheckAssignment(Assignment assignment)
static void RoutingModel_SetPickupAndDeliveryPolicyOfAllVehicles(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
int GetNumOfSingletonNodes()
static void RoutingModel_IgnoreDisjunctionsAlreadyForcedToZero(global::System.Runtime.InteropServices.HandleRef jarg1)
long GetDepot()
IntVarVector Nexts()
long Start(int vehicle)
static bool RoutingModel_AddConstantDimension(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3, bool jarg4, string jarg5)
static void RoutingModel_VehicleTypeContainer_VehicleClassEntry_vehicle_class_set(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
long Size()
static int RoutingModel_GetNumOfSingletonNodes(global::System.Runtime.InteropServices.HandleRef jarg1)
void SetAmortizedCostFactorsOfVehicle(long linear_cost_factor, long quadratic_cost_factor, int vehicle)
int[] GetPairIndicesOfType(int type)
RoutingModel.VehicleTypeContainer GetVehicleTypeContainer()
long UnperformedPenaltyOrValue(long default_value, long var_index)
using System
Definition: Program.cs:14
Definition: RoutingModel.cs:18
bool IsMatchingModel()
IntVar ApplyLocks(long[] locks)
static bool RoutingModel_AddDimensionWithVehicleCapacity(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, long jarg3, int length4, long[] jarg4, bool jarg5, string jarg6)
static long RoutingModel_VehicleTypeContainer_VehicleClassEntry_fixed_cost_get(global::System.Runtime.InteropServices.HandleRef jarg1)
long GetArcCostForClass(long from_index, long to_index, long cost_class_index)
static void RoutingModel_SetAllowedVehiclesForIndex(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, int[] jarg2, long jarg3)
static int RoutingModel_VehicleTypeContainer_VehicleClassEntry_vehicle_class_get(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr RoutingModel_solver(global::System.Runtime.InteropServices.HandleRef jarg1)
static readonly int ROUTING_NOT_SOLVED
long UnperformedPenalty(long var_index)
static int RoutingModel_PICKUP_AND_DELIVERY_LIFO_get()
static global::System.IntPtr RoutingModel_GetRequiredTypeAlternativesWhenAddingType(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static global::System.IntPtr RoutingModel_SolveWithParameters(global::System.Runtime.InteropServices.HandleRef jarg1, int search_parameters_size, byte[] jarg2)
void SetFixedCostOfVehicle(long cost, int vehicle)
void SetPickupAndDeliveryPolicyOfVehicle(int policy, int vehicle)
static global::System.IntPtr RoutingModel_SolveFromAssignmentWithParameters(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int search_parameters_size, byte[] jarg3)
int GetNonZeroCostClassesCount()
static int RoutingModel_PICKUP_AND_DELIVERY_NO_ORDER_get()
static bool RoutingModel_ArcIsMoreConstrainedThanArc(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3, long jarg4)
static bool RoutingModel_WriteAssignment(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2)
bool CheckLimit()
static global::System.IntPtr RoutingModel_VehicleCostsConsideredVar(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
void SetAssignmentFromOtherModelAssignment(Assignment target_assignment, RoutingModel source_model, Assignment source_assignment)
static void RoutingModel_VehicleTypeContainer_VehicleClassEntry_fixed_cost_set(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
bool AreEmptyRouteCostsConsideredForVehicle(int vehicle)
static long RoutingModel_GetDisjunctionPenalty(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static int RoutingModel_ROUTING_NOT_SOLVED_get()
static bool RoutingModel_AddDimensionWithVehicleTransitAndCapacity(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, int[] jarg2, long jarg3, int length4, long[] jarg4, bool jarg5, string jarg6)
static int RoutingModel_ROUTING_INVALID_get()
int[] GetSameVehicleIndicesOfIndex(int node)
void AddSearchMonitor(SearchMonitor monitor)
static void RoutingModel_VehicleTypeContainer_vehicles_per_vehicle_class_set(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
DecisionBuilder MakeGuidedSlackFinalizer(RoutingDimension dimension, LongToLong initializer)
bool AddDimensionWithVehicleTransits(int[] evaluator_indices, long slack_max, long capacity, bool fix_start_cumul_to_zero, string name)
IntVector? type_index_of_vehicle
static int kNoDisjunction
static global::System.IntPtr RoutingModel_VehicleTypeContainer_sorted_vehicle_classes_per_type_get(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr RoutingModel_GetPairIndicesOfType(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static void RoutingModel_AddVariableMaximizedByFinalizer(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static long RoutingModel_End(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static bool RoutingModel_AddDimension(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, long jarg3, long jarg4, bool jarg5, string jarg6)
static bool RoutingModel_ApplyLocksToAllVehicles(global::System.Runtime.InteropServices.HandleRef jarg1, int len2_1, int[] len2_2, long[] jarg2, bool jarg3)
int GetNumberOfDisjunctions()
static int RoutingModel_RegisterUnaryTransitCallback(global::System.Runtime.InteropServices.HandleRef jarg1, LongToLong jarg2)
static global::System.IntPtr RoutingModel_ActiveVehicleVar(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static long RoutingModel_GetArcCostForVehicle(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3, long jarg4)
void AddRequiredTypeAlternativesWhenAddingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives)
int RegisterPositiveUnaryTransitCallback(LongToLong callback)
static void RoutingModel_SetArcCostEvaluatorOfVehicle(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
void SetArcCostEvaluatorOfVehicle(int evaluator_index, int vehicle)
static global::System.IntPtr RoutingModel_MakeGuidedSlackFinalizer(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, LongToLong jarg3)
void CloseModel()
long[] GetAmortizedQuadraticCostFactorOfVehicles()
bool ApplyLocksToAllVehicles(long[][] locks, bool close_routes)
bool IsEnd(long index)
void CopyTo(int[] array)
long[] GetDisjunctionIndices(int index)
long GetArcCostForFirstSolution(long from_index, long to_index)
int AddDisjunction(long[] indices)
static long RoutingModel_GetArcCostForClass(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3, long jarg4)
int RegisterPositiveTransitCallback(LongLongToLong callback)
static readonly int PICKUP_AND_DELIVERY_NO_ORDER
void SetAmortizedCostFactorsOfAllVehicles(long linear_cost_factor, long quadratic_cost_factor)
static global::System.IntPtr RoutingModel_GetMutableDimension(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2)
bool CostsAreHomogeneousAcrossVehicles()
static int RoutingModel_AddDisjunction__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2)
static int RoutingModel_GetStatus(global::System.Runtime.InteropServices.HandleRef jarg1)
RoutingDimension GetDimensionOrDie(string dimension_name)
int VehicleIndex(int index)
Assignment Solve()
static bool RoutingModel_AddDimensionWithVehicleTransits(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, int[] jarg2, long jarg3, long jarg4, bool jarg5, string jarg6)
int GetCostClassesCount()
static readonly int PICKUP_AND_DELIVERY_FIFO
int GetMaximumNumberOfActiveVehicles()
static int RoutingModel_GetCostClassesCount(global::System.Runtime.InteropServices.HandleRef jarg1)
Definition: IntervalVar.cs:18
void IgnoreDisjunctionsAlreadyForcedToZero()
static int RoutingModel_ROUTING_FAIL_TIMEOUT_get()
static int RoutingModel_GetNumberOfVisitTypes(global::System.Runtime.InteropServices.HandleRef jarg1)
static void RoutingModel_AssignmentToRoutes(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int len3_1, int[] len3_2, long[] jarg3)
void AddAtSolutionCallback(VoidToVoid callback)
static void RoutingModel_SetArcCostEvaluatorOfAllVehicles(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
Assignment CompactAssignment(Assignment assignment)
static readonly int TYPE_ADDED_TO_VEHICLE
static readonly int TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED
static void RoutingModel_AddIntervalToAssignment(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static int RoutingModel_AddDisjunction__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2, long jarg3, long jarg4)
static global::System.IntPtr RoutingModel_GetAmortizedLinearCostFactorOfVehicles(global::System.Runtime.InteropServices.HandleRef jarg1)
Assignment ReadAssignmentFromRoutes(long[][] routes, bool ignore_inactive_indices)
RoutingModel(RoutingIndexManager index_manager)
void AddIntervalToAssignment(IntervalVar interval)
bool HasVehicleWithCostClassIndex(int cost_class_index)
bool swigCMemOwn
Definition: RoutingModel.cs:79
static global::System.IntPtr RoutingModel_ActiveVar(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
IntVar VehicleCostsConsideredVar(int vehicle)
bool IsVehicleAllowedForIndex(int vehicle, long index)
long GetDisjunctionPenalty(int index)
int GetVisitType(long index)
VehicleTypeContainer()
IntVar NextVar(long index)
void AddPickupAndDeliverySets(int pickup_disjunction, int delivery_disjunction)
void AddSoftSameVehicleConstraint(long[] indices, long cost)
static long RoutingModel_UnperformedPenaltyOrValue(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3)
static global::System.IntPtr RoutingModel_GetDisjunctionIndices__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
int RegisterUnaryTransitCallback(LongToLong callback)
static bool RoutingModel_IsMatchingModel(global::System.Runtime.InteropServices.HandleRef jarg1)
void AddToAssignment(IntVar var)
static long RoutingModel_kNoPenalty_get()
static global::System.IntPtr RoutingModel_CostVar(global::System.Runtime.InteropServices.HandleRef jarg1)
bool IsVehicleUsed(Assignment assignment, int vehicle)
bool swigCMemOwn
long GetFixedCostOfVehicle(int vehicle)
static bool RoutingModel_IsVehicleUsed(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int jarg3)
static int RoutingModel_TYPE_ON_VEHICLE_UP_TO_VISIT_get()
static void RoutingModel_AddLocalSearchOperator(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr RoutingModel_VehicleTypeContainer_type_index_of_vehicle_get(global::System.Runtime.InteropServices.HandleRef jarg1)
int GetNumberOfVisitTypes()
static int RoutingModel_GetVehicleClassesCount(global::System.Runtime.InteropServices.HandleRef jarg1)
int AddDisjunction(long[] indices, long penalty)
static void RoutingModel_VehicleTypeContainer_type_index_of_vehicle_set(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static int RoutingModel_GetVehicleClassIndexOfVehicle(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static global::System.IntPtr RoutingModel_GetSameVehicleIndicesOfIndex(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
bool AddDimension(int evaluator_index, long slack_max, long capacity, bool fix_start_cumul_to_zero, string name)
static int RoutingModel_RegisterPositiveUnaryTransitCallback(global::System.Runtime.InteropServices.HandleRef jarg1, LongToLong jarg2)
void AddLocalSearchFilter(LocalSearchFilter filter)
static readonly int ROUTING_INVALID
static long RoutingModel_GetNumberOfRejectsInFirstSolution(global::System.Runtime.InteropServices.HandleRef jarg1, int search_parameters_size, byte[] jarg2)
void CopyTo(long[] array)
static int RoutingModel_GetNumberOfDisjunctions(global::System.Runtime.InteropServices.HandleRef jarg1)
static long RoutingModel_GetDisjunctionMaxCardinality(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static bool RoutingModel_HasDimension(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2)
void AddRequiredTypeAlternativesWhenRemovingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives)
Assignment PreAssignment()
static int RoutingModel_TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED_get()
int Type(int vehicle)
Definition: Assignment.cs:18
static int RoutingModel_GetPickupAndDeliveryPolicyOfVehicle(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
int GetVehicleClassesCount()
static void RoutingModel_CloseModelWithParameters(global::System.Runtime.InteropServices.HandleRef jarg1, int search_parameters_size, byte[] jarg2)
VehicleClassEntry()
static void delete_RoutingModel_VehicleTypeContainer_VehicleClassEntry(global::System.Runtime.InteropServices.HandleRef jarg1)
static long kNoPenalty
bool AddDimensionWithVehicleTransitAndCapacity(int[] evaluator_indices, long slack_max, long[] vehicle_capacities, bool fix_start_cumul_to_zero, string name)
static readonly int ROUTING_SUCCESS
bool ArcIsMoreConstrainedThanArc(long from, long to1, long to2)
static global::System.IntPtr RoutingModel_Solve__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1)
bool IsStart(long index)
static void RoutingModel_AddToAssignment(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
IntVarVector VehicleVars()
static int RoutingModel_RegisterPositiveTransitCallback(global::System.Runtime.InteropServices.HandleRef jarg1, LongLongToLong jarg2)
static long RoutingModel_GetFixedCostOfVehicle(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
int vehicle_class
bool AddDimensionWithVehicleCapacity(int evaluator_index, long slack_max, long[] vehicle_capacities, bool fix_start_cumul_to_zero, string name)
static int RoutingModel_GetCostClassIndexOfVehicle(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
void Dispose()
void AddVariableMaximizedByFinalizer(IntVar var)
long GetHomogeneousCost(long from_index, long to_index)
int AddDisjunction(long[] indices, long penalty, long max_cardinality)
static void RoutingModel_SetPickupAndDeliveryPolicyOfVehicle(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
void SetMaximumNumberOfActiveVehicles(int max_active_vehicles)
static long RoutingModel_Start(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static global::System.IntPtr RoutingModel_VehicleTypeContainer_vehicles_per_vehicle_class_get(global::System.Runtime.InteropServices.HandleRef jarg1)
static readonly int ROUTING_FAIL
bool AddConstantDimension(long value, long capacity, bool fix_start_cumul_to_zero, string name)
DecisionBuilder MakeSelfDependentDimensionFinalizer(RoutingDimension dimension)
void Dispose()
Definition: RoutingModel.cs:94
static global::System.IntPtr RoutingModel_MutablePreAssignment(global::System.Runtime.InteropServices.HandleRef jarg1)
static int RoutingModel_ROUTING_FAIL_get()
static void RoutingModel_SetFixedCostOfAllVehicles(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static void RoutingModel_SetFixedCostOfVehicle(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, int jarg3)
Solver solver()
int Vehicles()
static global::System.IntPtr RoutingModel_NextVar(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
int[] GetDisjunctionIndices(long index)
static global::System.IntPtr RoutingModel_GetAmortizedQuadraticCostFactorOfVehicles(global::System.Runtime.InteropServices.HandleRef jarg1)
Definition: ProtoHelper.cs:21
Constraint MakePathSpansAndTotalSlacks(RoutingDimension dimension, IntVarVector spans, IntVarVector total_slacks)
static void RoutingModel_AddPickupAndDelivery(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3)
static global::System.IntPtr RoutingModel_ReadAssignment(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2)
Assignment RestoreAssignment(Assignment solution)
long ComputeLowerBound()
bool WriteAssignment(string file_name)
static int RoutingModel_kNoDisjunction_get()
static global::System.Exception Retrieve()
int RegisterTransitCallback(LongLongToLong callback)
static long RoutingModel_ComputeLowerBound(global::System.Runtime.InteropServices.HandleRef jarg1)
virtual void Dispose(bool disposing)
Definition: RoutingModel.cs:40
static int RoutingModel_RegisterTransitCallback(global::System.Runtime.InteropServices.HandleRef jarg1, LongLongToLong jarg2)
static bool RoutingModel_AreEmptyRouteCostsConsideredForVehicle(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
long Next(Assignment assignment, long index)
static void RoutingModel_AddSoftSameVehicleConstraint(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2, long jarg3)
string GetPrimaryConstrainedDimension()
static global::System.IntPtr RoutingModel_VehicleVars(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool RoutingModel_RoutesToAssignment(global::System.Runtime.InteropServices.HandleRef jarg1, int len2_1, int[] len2_2, long[] jarg2, bool jarg3, bool jarg4, global::System.Runtime.InteropServices.HandleRef jarg5)
int Count
static global::System.IntPtr RoutingModel_ReadAssignmentFromRoutes(global::System.Runtime.InteropServices.HandleRef jarg1, int len2_1, int[] len2_2, long[] jarg2, bool jarg3)
static global::System.IntPtr RoutingModel_CompactAssignment(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static int RoutingModel_VehicleTypeContainer_Type(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetRequiredTypeAlternativesWhenRemovingType(int type)
long GetArcCostForVehicle(long from_index, long to_index, long vehicle)
static int RoutingModel_TYPE_ADDED_TO_VEHICLE_get()
long fixed_cost
Assignment SolveWithParameters(Google.OrTools.ConstraintSolver.RoutingSearchParameters search_parameters)
static readonly int PICKUP_AND_DELIVERY_LIFO
Assignment Solve(Assignment assignment)
static bool RoutingModel_IsEnd(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static int RoutingModel_VehicleTypeContainer_NumTypes(global::System.Runtime.InteropServices.HandleRef jarg1)
RoutingDimension GetMutableDimension(string dimension_name)
string DebugOutputAssignment(Assignment solution_assignment, string dimension_to_print)
void AddWeightedVariableMinimizedByFinalizer(IntVar var, long cost)
static void RoutingModel_AddRequiredTypeAlternativesWhenRemovingType(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static bool RoutingModel_IsVehicleAllowedForIndex(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, long jarg3)
static global::System.IntPtr RoutingModel_MakeSelfDependentDimensionFinalizer(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
delegate long LongLongToLong(long t, long u)
Parameters defining the search used to solve vehicle routing problems.
static void RoutingModel_AddPickupAndDeliverySets(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
void SetVisitType(long index, int type, int type_policy)
static int RoutingModel_GetVisitType(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)