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 void CloseVisitTypes() {
479  }
480 
481  public int GetNumberOfVisitTypes() {
483  return ret;
484  }
485 
486  public void AddHardTypeIncompatibility(int type1, int type2) {
488  }
489 
490  public void AddTemporalTypeIncompatibility(int type1, int type2) {
492  }
493 
494  public SWIGTYPE_p_absl__flat_hash_setT_int_t GetTemporalTypeIncompatibilitiesOfType(int type) {
495  SWIGTYPE_p_absl__flat_hash_setT_int_t ret = new SWIGTYPE_p_absl__flat_hash_setT_int_t(operations_research_constraint_solverPINVOKE.RoutingModel_GetTemporalTypeIncompatibilitiesOfType(swigCPtr, type), false);
496  return ret;
497  }
498 
501  return ret;
502  }
503 
506  return ret;
507  }
508 
509  public void AddRequiredTypeAlternativesWhenAddingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives) {
510  operations_research_constraint_solverPINVOKE.RoutingModel_AddRequiredTypeAlternativesWhenAddingType(swigCPtr, dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t.getCPtr(required_type_alternatives));
512  }
513 
514  public void AddRequiredTypeAlternativesWhenRemovingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives) {
515  operations_research_constraint_solverPINVOKE.RoutingModel_AddRequiredTypeAlternativesWhenRemovingType(swigCPtr, dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t.getCPtr(required_type_alternatives));
517  }
518 
519  public SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetSameVehicleRequiredTypeAlternativesOfType(int type) {
520  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_GetSameVehicleRequiredTypeAlternativesOfType(swigCPtr, type), false);
521  return ret;
522  }
523 
524  public SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetRequiredTypeAlternativesWhenAddingType(int type) {
525  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);
526  return ret;
527  }
528 
529  public SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetRequiredTypeAlternativesWhenRemovingType(int type) {
530  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);
531  return ret;
532  }
533 
536  return ret;
537  }
538 
541  return ret;
542  }
543 
544  public long UnperformedPenalty(long var_index) {
546  return ret;
547  }
548 
549  public long UnperformedPenaltyOrValue(long default_value, long var_index) {
550  long ret = operations_research_constraint_solverPINVOKE.RoutingModel_UnperformedPenaltyOrValue(swigCPtr, default_value, var_index);
551  return ret;
552  }
553 
554  public long GetDepot() {
556  return ret;
557  }
558 
559  public void SetMaximumNumberOfActiveVehicles(int max_active_vehicles) {
561  }
562 
565  return ret;
566  }
567 
568  public void SetArcCostEvaluatorOfAllVehicles(int evaluator_index) {
570  }
571 
572  public void SetArcCostEvaluatorOfVehicle(int evaluator_index, int vehicle) {
574  }
575 
576  public void SetFixedCostOfAllVehicles(long cost) {
578  }
579 
580  public void SetFixedCostOfVehicle(long cost, int vehicle) {
582  }
583 
584  public long GetFixedCostOfVehicle(int vehicle) {
586  return ret;
587  }
588 
589  public void SetAmortizedCostFactorsOfAllVehicles(long linear_cost_factor, long quadratic_cost_factor) {
590  operations_research_constraint_solverPINVOKE.RoutingModel_SetAmortizedCostFactorsOfAllVehicles(swigCPtr, linear_cost_factor, quadratic_cost_factor);
591  }
592 
593  public void SetAmortizedCostFactorsOfVehicle(long linear_cost_factor, long quadratic_cost_factor, int vehicle) {
594  operations_research_constraint_solverPINVOKE.RoutingModel_SetAmortizedCostFactorsOfVehicle(swigCPtr, linear_cost_factor, quadratic_cost_factor, vehicle);
595  }
596 
599  Int64Vector tmpVector = null;
600  if (cPtr != global::System.IntPtr.Zero) {
601  tmpVector = new Int64Vector(cPtr, true);
602  long[] outArray = new long[tmpVector.Count];
603  tmpVector.CopyTo(outArray);
604  return outArray;
605  }
606  return null;
607 }
608 
611  Int64Vector tmpVector = null;
612  if (cPtr != global::System.IntPtr.Zero) {
613  tmpVector = new Int64Vector(cPtr, true);
614  long[] outArray = new long[tmpVector.Count];
615  tmpVector.CopyTo(outArray);
616  return outArray;
617  }
618  return null;
619 }
620 
621  public void ConsiderEmptyRouteCostsForVehicle(bool consider_costs, int vehicle) {
623  }
624 
625  public bool AreEmptyRouteCostsConsideredForVehicle(int vehicle) {
627  return ret;
628  }
629 
630  public void SetFirstSolutionEvaluator( LongLongToLong evaluator) {
632  }
633 
634  public void AddLocalSearchOperator(LocalSearchOperator ls_operator) {
636  }
637 
638  public void AddSearchMonitor(SearchMonitor monitor) {
640  }
641 
642  public void AddAtSolutionCallback( VoidToVoid callback) {
644  }
645 
648  }
649 
652  }
653 
654  public void AddWeightedVariableMinimizedByFinalizer(IntVar var, long cost) {
656  }
657 
658  public void AddVariableTargetToFinalizer(IntVar var, long target) {
660  }
661 
662  public void CloseModel() {
664  }
665 
667  operations_research_constraint_solverPINVOKE.RoutingModel_CloseModelWithParameters(swigCPtr, search_parameters.CalculateSize(), ProtoHelper.ProtoToByteArray(search_parameters));
668  }
669 
670  public Assignment Solve(Assignment assignment) {
672  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
673  return ret;
674  }
675 
676  public Assignment Solve() {
678  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
679  return ret;
680  }
681 
683  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_SolveWithParameters(swigCPtr, search_parameters.CalculateSize(), ProtoHelper.ProtoToByteArray(search_parameters));
684  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
685  return ret;
686  }
687 
689  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_SolveFromAssignmentWithParameters(swigCPtr, Assignment.getCPtr(assignment), search_parameters.CalculateSize(), ProtoHelper.ProtoToByteArray(search_parameters));
690  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
691  return ret;
692  }
693 
694  public void SetAssignmentFromOtherModelAssignment(Assignment target_assignment, RoutingModel source_model, Assignment source_assignment) {
695  operations_research_constraint_solverPINVOKE.RoutingModel_SetAssignmentFromOtherModelAssignment(swigCPtr, Assignment.getCPtr(target_assignment), RoutingModel.getCPtr(source_model), Assignment.getCPtr(source_assignment));
696  }
697 
698  public long ComputeLowerBound() {
700  return ret;
701  }
702 
703  public int GetStatus() {
705  return ret;
706  }
707 
708  public IntVar ApplyLocks( long[] locks) {
709  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_ApplyLocks(swigCPtr, locks.Length, locks );
710  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
711  return ret;
712  }
713 
714  public bool ApplyLocksToAllVehicles( long[][] locks, bool close_routes) {
716  locks.GetLength(0),
717  NestedArrayHelper.GetArraySecondSize(locks),
718  NestedArrayHelper.GetFlatArray(locks)
719 , close_routes);
720  return ret;
721  }
722 
725  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
726  return ret;
727  }
728 
731  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
732  return ret;
733  }
734 
735  public bool WriteAssignment(string file_name) {
738  return ret;
739  }
740 
741  public Assignment ReadAssignment(string file_name) {
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 Assignment ReadAssignmentFromRoutes( long[][] routes, bool ignore_inactive_indices) {
757  routes.GetLength(0),
758  NestedArrayHelper.GetArraySecondSize(routes),
759  NestedArrayHelper.GetFlatArray(routes)
760 , ignore_inactive_indices);
761  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
762  return ret;
763  }
764 
765  public bool RoutesToAssignment( long[][] routes, bool ignore_inactive_indices, bool close_routes, Assignment assignment) {
767  routes.GetLength(0),
768  NestedArrayHelper.GetArraySecondSize(routes),
769  NestedArrayHelper.GetFlatArray(routes)
770 , ignore_inactive_indices, close_routes, Assignment.getCPtr(assignment));
771  return ret;
772  }
773 
774  public void AssignmentToRoutes(Assignment assignment, long[][] routes) {
776  routes.GetLength(0),
777  NestedArrayHelper.GetArraySecondSize(routes),
778  NestedArrayHelper.GetFlatArray(routes)
779 );
781  }
782 
785  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
787  return ret;
788  }
789 
792  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
794  return ret;
795  }
796 
797  public void AddToAssignment(IntVar var) {
799  }
800 
801  public void AddIntervalToAssignment(IntervalVar interval) {
803  }
804 
807  }
808 
809  public long Start(int vehicle) {
811  return ret;
812  }
813 
814  public long End(int vehicle) {
816  return ret;
817  }
818 
819  public bool IsStart(long index) {
821  return ret;
822  }
823 
824  public bool IsEnd(long index) {
826  return ret;
827  }
828 
829  public int VehicleIndex(int index) {
831  return ret;
832  }
833 
834  public long Next(Assignment assignment, long index) {
835  long ret = operations_research_constraint_solverPINVOKE.RoutingModel_Next(swigCPtr, Assignment.getCPtr(assignment), index);
837  return ret;
838  }
839 
840  public bool IsVehicleUsed(Assignment assignment, int vehicle) {
841  bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_IsVehicleUsed(swigCPtr, Assignment.getCPtr(assignment), vehicle);
843  return ret;
844  }
845 
846  public IntVarVector Nexts() {
848  return ret;
849  }
850 
853  return ret;
854  }
855 
856  public IntVar NextVar(long index) {
858  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
859  return ret;
860  }
861 
862  public IntVar ActiveVar(long index) {
864  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
865  return ret;
866  }
867 
868  public IntVar ActiveVehicleVar(int vehicle) {
870  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
871  return ret;
872  }
873 
874  public IntVar VehicleCostsConsideredVar(int vehicle) {
876  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
877  return ret;
878  }
879 
880  public IntVar VehicleVar(long index) {
882  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
883  return ret;
884  }
885 
886  public IntVar CostVar() {
888  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
889  return ret;
890  }
891 
892  public long GetArcCostForVehicle(long from_index, long to_index, long vehicle) {
893  long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetArcCostForVehicle(swigCPtr, from_index, to_index, vehicle);
894  return ret;
895  }
896 
899  return ret;
900  }
901 
902  public long GetHomogeneousCost(long from_index, long to_index) {
903  long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetHomogeneousCost(swigCPtr, from_index, to_index);
904  return ret;
905  }
906 
907  public long GetArcCostForFirstSolution(long from_index, long to_index) {
909  return ret;
910  }
911 
912  public long GetArcCostForClass(long from_index, long to_index, long cost_class_index) {
913  long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetArcCostForClass(swigCPtr, from_index, to_index, cost_class_index);
914  return ret;
915  }
916 
917  public int GetCostClassIndexOfVehicle(long vehicle) {
919 }
920 
921  public bool HasVehicleWithCostClassIndex(int cost_class_index) {
923  return ret;
924  }
925 
926  public int GetCostClassesCount() {
928  return ret;
929  }
930 
933  return ret;
934  }
935 
936  public int GetVehicleClassIndexOfVehicle(long vehicle) {
938 }
939 
940  public int GetVehicleClassesCount() {
942  return ret;
943  }
944 
945  public int[] GetSameVehicleIndicesOfIndex(int node) {
947  IntVector tmpVector = null;
948  if (cPtr != global::System.IntPtr.Zero) {
949  tmpVector = new IntVector(cPtr, true);
950  int[] outArray = new int[tmpVector.Count];
951  tmpVector.CopyTo(outArray);
952  return outArray;
953  }
954  return null;
955 }
956 
959  return ret;
960  }
961 
962  public bool ArcIsMoreConstrainedThanArc(long from, long to1, long to2) {
964  return ret;
965  }
966 
967  public string DebugOutputAssignment(Assignment solution_assignment, string dimension_to_print) {
968  string ret = operations_research_constraint_solverPINVOKE.RoutingModel_DebugOutputAssignment(swigCPtr, Assignment.getCPtr(solution_assignment), dimension_to_print);
970  return ret;
971  }
972 
973  public Solver solver() {
975  Solver ret = (cPtr == global::System.IntPtr.Zero) ? null : new Solver(cPtr, false);
976  return ret;
977  }
978 
979  public bool CheckLimit() {
981  return ret;
982  }
983 
984  public int Nodes() {
986  return ret;
987  }
988 
989  public int Vehicles() {
991  return ret;
992  }
993 
994  public long Size() {
996  return ret;
997  }
998 
1000  long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetNumberOfDecisionsInFirstSolution(swigCPtr, search_parameters.CalculateSize(), ProtoHelper.ProtoToByteArray(search_parameters));
1001  return ret;
1002  }
1003 
1005  long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetNumberOfRejectsInFirstSolution(swigCPtr, search_parameters.CalculateSize(), ProtoHelper.ProtoToByteArray(search_parameters));
1006  return ret;
1007  }
1008 
1009  public bool IsMatchingModel() {
1011  return ret;
1012  }
1013 
1015  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_MakeGuidedSlackFinalizer(swigCPtr, RoutingDimension.getCPtr(dimension), StoreLongToLong(initializer) );
1016  DecisionBuilder ret = (cPtr == global::System.IntPtr.Zero) ? null : new DecisionBuilder(cPtr, false);
1017  return ret;
1018  }
1019 
1022  DecisionBuilder ret = (cPtr == global::System.IntPtr.Zero) ? null : new DecisionBuilder(cPtr, false);
1023  return ret;
1024  }
1025 
1026  // Status
1032 
1033  // PickupAndDeliveryPolicy
1037 
1038  // VisitTypePolicy
1043 
1044 }
1045 
1046 }
void AddTemporalTypeIncompatibility(int type1, int type2)
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)
bool HasHardTypeIncompatibilities()
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 global::System.IntPtr RoutingModel_GetSameVehicleRequiredTypeAlternativesOfType(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
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)
static bool RoutingModel_HasTemporalTypeRequirements(global::System.Runtime.InteropServices.HandleRef jarg1)
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)
SWIGTYPE_p_absl__flat_hash_setT_int_t GetTemporalTypeIncompatibilitiesOfType(int type)
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)
static bool RoutingModel_HasTemporalTypeIncompatibilities(global::System.Runtime.InteropServices.HandleRef jarg1)
void SetArcCostEvaluatorOfVehicle(int evaluator_index, int vehicle)
bool HasTemporalTypeIncompatibilities()
static global::System.IntPtr RoutingModel_MakeGuidedSlackFinalizer(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, LongToLong jarg3)
static global::System.IntPtr RoutingModel_GetTemporalTypeIncompatibilitiesOfType(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
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)
void AddHardTypeIncompatibility(int type1, int type2)
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
bool HasSameVehicleTypeRequirements()
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)
static bool RoutingModel_HasSameVehicleTypeRequirements(global::System.Runtime.InteropServices.HandleRef jarg1)
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)
void CloseVisitTypes()
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 bool RoutingModel_HasHardTypeIncompatibilities(global::System.Runtime.InteropServices.HandleRef jarg1)
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)
SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetSameVehicleRequiredTypeAlternativesOfType(int type)
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 void RoutingModel_AddHardTypeIncompatibility(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
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)
static void RoutingModel_CloseVisitTypes(global::System.Runtime.InteropServices.HandleRef jarg1)
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)
bool HasTemporalTypeRequirements()
static int RoutingModel_VehicleTypeContainer_NumTypes(global::System.Runtime.InteropServices.HandleRef jarg1)
RoutingDimension GetMutableDimension(string dimension_name)
static void RoutingModel_AddTemporalTypeIncompatibility(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
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)