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) {
329  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_GetMutableDimension(swigCPtr, 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) {
449  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_GetSingleNodesOfType(swigCPtr, 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) {
461  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_GetPairIndicesOfType(swigCPtr, 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 
484  IntVector tmpVector = null;
485  if (cPtr != global::System.IntPtr.Zero) {
486  tmpVector = new IntVector(cPtr, true);
487  int[] outArray = new int[tmpVector.Count];
488  tmpVector.CopyTo(outArray);
489  return outArray;
490  }
491  return null;
492 }
493 
494  public void AddRequiredTypeAlternativesWhenAddingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives) {
495  operations_research_constraint_solverPINVOKE.RoutingModel_AddRequiredTypeAlternativesWhenAddingType(swigCPtr, dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t.getCPtr(required_type_alternatives));
497  }
498 
499  public void AddRequiredTypeAlternativesWhenRemovingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives) {
500  operations_research_constraint_solverPINVOKE.RoutingModel_AddRequiredTypeAlternativesWhenRemovingType(swigCPtr, dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t.getCPtr(required_type_alternatives));
502  }
503 
504  public SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetRequiredTypeAlternativesWhenAddingType(int type) {
505  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);
506  return ret;
507  }
508 
509  public SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetRequiredTypeAlternativesWhenRemovingType(int type) {
510  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);
511  return ret;
512  }
513 
514  public long UnperformedPenalty(long var_index) {
516  return ret;
517  }
518 
519  public long UnperformedPenaltyOrValue(long default_value, long var_index) {
520  long ret = operations_research_constraint_solverPINVOKE.RoutingModel_UnperformedPenaltyOrValue(swigCPtr, default_value, var_index);
521  return ret;
522  }
523 
524  public long GetDepot() {
526  return ret;
527  }
528 
529  public void SetMaximumNumberOfActiveVehicles(int max_active_vehicles) {
531  }
532 
535  return ret;
536  }
537 
538  public void SetArcCostEvaluatorOfAllVehicles(int evaluator_index) {
540  }
541 
542  public void SetArcCostEvaluatorOfVehicle(int evaluator_index, int vehicle) {
544  }
545 
546  public void SetFixedCostOfAllVehicles(long cost) {
548  }
549 
550  public void SetFixedCostOfVehicle(long cost, int vehicle) {
552  }
553 
554  public long GetFixedCostOfVehicle(int vehicle) {
556  return ret;
557  }
558 
559  public void SetAmortizedCostFactorsOfAllVehicles(long linear_cost_factor, long quadratic_cost_factor) {
560  operations_research_constraint_solverPINVOKE.RoutingModel_SetAmortizedCostFactorsOfAllVehicles(swigCPtr, linear_cost_factor, quadratic_cost_factor);
561  }
562 
563  public void SetAmortizedCostFactorsOfVehicle(long linear_cost_factor, long quadratic_cost_factor, int vehicle) {
564  operations_research_constraint_solverPINVOKE.RoutingModel_SetAmortizedCostFactorsOfVehicle(swigCPtr, linear_cost_factor, quadratic_cost_factor, vehicle);
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 
581  Int64Vector tmpVector = null;
582  if (cPtr != global::System.IntPtr.Zero) {
583  tmpVector = new Int64Vector(cPtr, true);
584  long[] outArray = new long[tmpVector.Count];
585  tmpVector.CopyTo(outArray);
586  return outArray;
587  }
588  return null;
589 }
590 
591  public void ConsiderEmptyRouteCostsForVehicle(bool consider_costs, int vehicle) {
593  }
594 
595  public bool AreEmptyRouteCostsConsideredForVehicle(int vehicle) {
597  return ret;
598  }
599 
600  public void SetFirstSolutionEvaluator( LongLongToLong evaluator) {
602  }
603 
604  public void AddLocalSearchOperator(LocalSearchOperator ls_operator) {
606  }
607 
608  public void AddSearchMonitor(SearchMonitor monitor) {
610  }
611 
612  public void AddAtSolutionCallback( VoidToVoid callback) {
614  }
615 
618  }
619 
622  }
623 
624  public void AddWeightedVariableMinimizedByFinalizer(IntVar var, long cost) {
626  }
627 
628  public void AddVariableTargetToFinalizer(IntVar var, long target) {
630  }
631 
632  public void CloseModel() {
634  }
635 
637  operations_research_constraint_solverPINVOKE.RoutingModel_CloseModelWithParameters(swigCPtr, search_parameters.CalculateSize(), ProtoHelper.ProtoToByteArray(search_parameters));
638  }
639 
640  public Assignment Solve(Assignment assignment) {
641  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_Solve__SWIG_0(swigCPtr, Assignment.getCPtr(assignment));
642  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
643  return ret;
644  }
645 
646  public Assignment Solve() {
647  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_Solve__SWIG_1(swigCPtr);
648  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
649  return ret;
650  }
651 
653  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_SolveWithParameters(swigCPtr, search_parameters.CalculateSize(), ProtoHelper.ProtoToByteArray(search_parameters));
654  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
655  return ret;
656  }
657 
659  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_SolveFromAssignmentWithParameters(swigCPtr, Assignment.getCPtr(assignment), search_parameters.CalculateSize(), ProtoHelper.ProtoToByteArray(search_parameters));
660  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
661  return ret;
662  }
663 
664  public void SetAssignmentFromOtherModelAssignment(Assignment target_assignment, RoutingModel source_model, Assignment source_assignment) {
665  operations_research_constraint_solverPINVOKE.RoutingModel_SetAssignmentFromOtherModelAssignment(swigCPtr, Assignment.getCPtr(target_assignment), RoutingModel.getCPtr(source_model), Assignment.getCPtr(source_assignment));
666  }
667 
668  public long ComputeLowerBound() {
670  return ret;
671  }
672 
673  public int GetStatus() {
675  return ret;
676  }
677 
678  public IntVar ApplyLocks( long[] locks) {
679  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_ApplyLocks(swigCPtr, locks.Length, locks );
680  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
681  return ret;
682  }
683 
684  public bool ApplyLocksToAllVehicles( long[][] locks, bool close_routes) {
686  locks.GetLength(0),
687  NestedArrayHelper.GetArraySecondSize(locks),
688  NestedArrayHelper.GetFlatArray(locks)
689 , close_routes);
690  return ret;
691  }
692 
694  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_PreAssignment(swigCPtr);
695  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
696  return ret;
697  }
698 
701  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
702  return ret;
703  }
704 
705  public bool WriteAssignment(string file_name) {
708  return ret;
709  }
710 
711  public Assignment ReadAssignment(string file_name) {
712  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_ReadAssignment(swigCPtr, file_name);
713  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
715  return ret;
716  }
717 
719  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_RestoreAssignment(swigCPtr, Assignment.getCPtr(solution));
720  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
722  return ret;
723  }
724 
725  public Assignment ReadAssignmentFromRoutes( long[][] routes, bool ignore_inactive_indices) {
727  routes.GetLength(0),
728  NestedArrayHelper.GetArraySecondSize(routes),
729  NestedArrayHelper.GetFlatArray(routes)
730 , ignore_inactive_indices);
731  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
732  return ret;
733  }
734 
735  public bool RoutesToAssignment( long[][] routes, bool ignore_inactive_indices, bool close_routes, Assignment assignment) {
737  routes.GetLength(0),
738  NestedArrayHelper.GetArraySecondSize(routes),
739  NestedArrayHelper.GetFlatArray(routes)
740 , ignore_inactive_indices, close_routes, Assignment.getCPtr(assignment));
741  return ret;
742  }
743 
744  public void AssignmentToRoutes(Assignment assignment, long[][] routes) {
746  routes.GetLength(0),
747  NestedArrayHelper.GetArraySecondSize(routes),
748  NestedArrayHelper.GetFlatArray(routes)
749 );
751  }
752 
754  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_CompactAssignment(swigCPtr, Assignment.getCPtr(assignment));
755  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
757  return ret;
758  }
759 
761  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_CompactAndCheckAssignment(swigCPtr, Assignment.getCPtr(assignment));
762  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
764  return ret;
765  }
766 
767  public void AddToAssignment(IntVar var) {
769  }
770 
771  public void AddIntervalToAssignment(IntervalVar interval) {
773  }
774 
777  }
778 
779  public long Start(int vehicle) {
781  return ret;
782  }
783 
784  public long End(int vehicle) {
786  return ret;
787  }
788 
789  public bool IsStart(long index) {
791  return ret;
792  }
793 
794  public bool IsEnd(long index) {
796  return ret;
797  }
798 
799  public int VehicleIndex(int index) {
801  return ret;
802  }
803 
804  public long Next(Assignment assignment, long index) {
805  long ret = operations_research_constraint_solverPINVOKE.RoutingModel_Next(swigCPtr, Assignment.getCPtr(assignment), index);
807  return ret;
808  }
809 
810  public bool IsVehicleUsed(Assignment assignment, int vehicle) {
811  bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_IsVehicleUsed(swigCPtr, Assignment.getCPtr(assignment), vehicle);
813  return ret;
814  }
815 
816  public IntVarVector Nexts() {
818  return ret;
819  }
820 
823  return ret;
824  }
825 
826  public IntVar NextVar(long index) {
827  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_NextVar(swigCPtr, index);
828  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
829  return ret;
830  }
831 
832  public IntVar ActiveVar(long index) {
833  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_ActiveVar(swigCPtr, index);
834  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
835  return ret;
836  }
837 
838  public IntVar ActiveVehicleVar(int vehicle) {
839  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_ActiveVehicleVar(swigCPtr, vehicle);
840  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
841  return ret;
842  }
843 
844  public IntVar VehicleCostsConsideredVar(int vehicle) {
845  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_VehicleCostsConsideredVar(swigCPtr, vehicle);
846  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
847  return ret;
848  }
849 
850  public IntVar VehicleVar(long index) {
851  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_VehicleVar(swigCPtr, index);
852  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
853  return ret;
854  }
855 
856  public IntVar CostVar() {
857  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_CostVar(swigCPtr);
858  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
859  return ret;
860  }
861 
862  public long GetArcCostForVehicle(long from_index, long to_index, long vehicle) {
863  long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetArcCostForVehicle(swigCPtr, from_index, to_index, vehicle);
864  return ret;
865  }
866 
869  return ret;
870  }
871 
872  public long GetHomogeneousCost(long from_index, long to_index) {
873  long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetHomogeneousCost(swigCPtr, from_index, to_index);
874  return ret;
875  }
876 
877  public long GetArcCostForFirstSolution(long from_index, long to_index) {
879  return ret;
880  }
881 
882  public long GetArcCostForClass(long from_index, long to_index, long cost_class_index) {
883  long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetArcCostForClass(swigCPtr, from_index, to_index, cost_class_index);
884  return ret;
885  }
886 
887  public int GetCostClassIndexOfVehicle(long vehicle) {
889 }
890 
891  public bool HasVehicleWithCostClassIndex(int cost_class_index) {
893  return ret;
894  }
895 
896  public int GetCostClassesCount() {
898  return ret;
899  }
900 
903  return ret;
904  }
905 
906  public int GetVehicleClassIndexOfVehicle(long vehicle) {
908 }
909 
910  public int GetVehicleClassesCount() {
912  return ret;
913  }
914 
915  public int[] GetSameVehicleIndicesOfIndex(int node) {
917  IntVector tmpVector = null;
918  if (cPtr != global::System.IntPtr.Zero) {
919  tmpVector = new IntVector(cPtr, true);
920  int[] outArray = new int[tmpVector.Count];
921  tmpVector.CopyTo(outArray);
922  return outArray;
923  }
924  return null;
925 }
926 
929  return ret;
930  }
931 
932  public bool ArcIsMoreConstrainedThanArc(long from, long to1, long to2) {
934  return ret;
935  }
936 
937  public string DebugOutputAssignment(Assignment solution_assignment, string dimension_to_print) {
938  string ret = operations_research_constraint_solverPINVOKE.RoutingModel_DebugOutputAssignment(swigCPtr, Assignment.getCPtr(solution_assignment), dimension_to_print);
940  return ret;
941  }
942 
943  public Solver solver() {
944  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_solver(swigCPtr);
945  Solver ret = (cPtr == global::System.IntPtr.Zero) ? null : new Solver(cPtr, false);
946  return ret;
947  }
948 
949  public bool CheckLimit() {
951  return ret;
952  }
953 
954  public int Nodes() {
956  return ret;
957  }
958 
959  public int Vehicles() {
961  return ret;
962  }
963 
964  public long Size() {
966  return ret;
967  }
968 
970  long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetNumberOfDecisionsInFirstSolution(swigCPtr, search_parameters.CalculateSize(), ProtoHelper.ProtoToByteArray(search_parameters));
971  return ret;
972  }
973 
975  long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetNumberOfRejectsInFirstSolution(swigCPtr, search_parameters.CalculateSize(), ProtoHelper.ProtoToByteArray(search_parameters));
976  return ret;
977  }
978 
979  public bool IsMatchingModel() {
981  return ret;
982  }
983 
985  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_MakeGuidedSlackFinalizer(swigCPtr, RoutingDimension.getCPtr(dimension), StoreLongToLong(initializer) );
986  DecisionBuilder ret = (cPtr == global::System.IntPtr.Zero) ? null : new DecisionBuilder(cPtr, false);
987  return ret;
988  }
989 
992  DecisionBuilder ret = (cPtr == global::System.IntPtr.Zero) ? null : new DecisionBuilder(cPtr, false);
993  return ret;
994  }
995 
996  // Status
1002 
1003  // PickupAndDeliveryPolicy
1007 
1008  // VisitTypePolicy
1013 
1014 }
1015 
1016 }
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:21
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)
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)
static global::System.IntPtr RoutingModel_GetTopologicallySortedVisitTypes(global::System.Runtime.InteropServices.HandleRef jarg1)
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:20
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)
int[] GetTopologicallySortedVisitTypes()
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)