DotNet Reference

DotNet 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.1
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 static long kNoPenalty {
78  get {
80  return ret;
81  }
82  }
83 
84  public static int kNoDisjunction {
85  get {
87  }
88 
89  }
90 
91  public static int kNoDimension {
92  get {
94  }
95 
96  }
97 
98  public RoutingModel(RoutingIndexManager index_manager) : this(operations_research_constraint_solverPINVOKE.new_RoutingModel__SWIG_0(RoutingIndexManager.getCPtr(index_manager)), true) {
100  }
101 
102  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) {
104  }
105 
106  public int RegisterUnaryTransitCallback( LongToLong callback) {
107  int ret = operations_research_constraint_solverPINVOKE.RoutingModel_RegisterUnaryTransitCallback(swigCPtr, StoreLongToLong(callback) );
108  return ret;
109  }
110 
113  return ret;
114  }
115 
116  public int RegisterTransitCallback( LongLongToLong callback) {
117  int ret = operations_research_constraint_solverPINVOKE.RoutingModel_RegisterTransitCallback(swigCPtr, StoreLongLongToLong(callback) );
118  return ret;
119  }
120 
122  int ret = operations_research_constraint_solverPINVOKE.RoutingModel_RegisterPositiveTransitCallback(swigCPtr, StoreLongLongToLong(callback) );
123  return ret;
124  }
125 
126  public bool AddDimension(int evaluator_index, long slack_max, long capacity, bool fix_start_cumul_to_zero, string name) {
127  bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_AddDimension(swigCPtr, evaluator_index, slack_max, capacity, fix_start_cumul_to_zero, name);
129  return ret;
130  }
131 
132  public bool AddDimensionWithVehicleTransits( int[] evaluator_indices, long slack_max, long capacity, bool fix_start_cumul_to_zero, string name) {
133  bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_AddDimensionWithVehicleTransits(swigCPtr, evaluator_indices.Length, evaluator_indices , slack_max, capacity, fix_start_cumul_to_zero, name);
135  return ret;
136  }
137 
138  public bool AddDimensionWithVehicleCapacity(int evaluator_index, long slack_max, long[] vehicle_capacities, bool fix_start_cumul_to_zero, string name) {
139  bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_AddDimensionWithVehicleCapacity(swigCPtr, evaluator_index, slack_max, vehicle_capacities.Length, vehicle_capacities , fix_start_cumul_to_zero, name);
141  return ret;
142  }
143 
144  public bool AddDimensionWithVehicleTransitAndCapacity( int[] evaluator_indices, long slack_max, long[] vehicle_capacities, bool fix_start_cumul_to_zero, string name) {
145  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);
147  return ret;
148  }
149 
150  public bool AddConstantDimensionWithSlack(long value, long capacity, long slack_max, bool fix_start_cumul_to_zero, string name) {
151  bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_AddConstantDimensionWithSlack(swigCPtr, value, capacity, slack_max, fix_start_cumul_to_zero, name);
153  return ret;
154  }
155 
156  public bool AddConstantDimension(long value, long capacity, bool fix_start_cumul_to_zero, string name) {
157  bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_AddConstantDimension(swigCPtr, value, capacity, fix_start_cumul_to_zero, name);
159  return ret;
160  }
161 
162  public bool AddVectorDimension( long[] values, long capacity, bool fix_start_cumul_to_zero, string name) {
163  bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_AddVectorDimension(swigCPtr, values.Length, values , capacity, fix_start_cumul_to_zero, name);
165  return ret;
166  }
167 
169  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_MakePathSpansAndTotalSlacks(swigCPtr, RoutingDimension.getCPtr(dimension), IntVarVector.getCPtr(spans), IntVarVector.getCPtr(total_slacks));
170  Constraint ret = (cPtr == global::System.IntPtr.Zero) ? null : new Constraint(cPtr, false);
172  return ret;
173  }
174 
175  public bool HasDimension(string dimension_name) {
176  bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_HasDimension(swigCPtr, dimension_name);
178  return ret;
179  }
180 
181  public RoutingDimension GetDimensionOrDie(string dimension_name) {
184  return ret;
185  }
186 
187  public RoutingDimension GetMutableDimension(string dimension_name) {
188  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_GetMutableDimension(swigCPtr, dimension_name);
189  RoutingDimension ret = (cPtr == global::System.IntPtr.Zero) ? null : new RoutingDimension(cPtr, false);
191  return ret;
192  }
193 
194  public void SetPrimaryConstrainedDimension(string dimension_name) {
197  }
198 
201  return ret;
202  }
203 
204  public int AddDisjunction( long[] indices, long penalty, long max_cardinality) {
205  return operations_research_constraint_solverPINVOKE.RoutingModel_AddDisjunction__SWIG_0(swigCPtr, indices.Length, indices , penalty, max_cardinality);
206 }
207 
208  public int AddDisjunction( long[] indices, long penalty) {
209  return operations_research_constraint_solverPINVOKE.RoutingModel_AddDisjunction__SWIG_1(swigCPtr, indices.Length, indices , penalty);
210 }
211 
212  public int AddDisjunction( long[] indices) {
214 }
215 
216  public int[] GetDisjunctionIndices(long index) {
218  CpIntVector tmpVector = null;
219  if (cPtr != global::System.IntPtr.Zero) {
220  tmpVector = new CpIntVector(cPtr, true);
221  int[] outArray = new int[tmpVector.Count];
222  tmpVector.CopyTo(outArray);
223  return outArray;
224  }
225  return null;
226 }
227 
228  public long[] GetDisjunctionIndices(int index) {
230  CpInt64Vector tmpVector = null;
231  if (cPtr != global::System.IntPtr.Zero) {
232  tmpVector = new CpInt64Vector(cPtr, true);
233  long[] outArray = new long[tmpVector.Count];
234  tmpVector.CopyTo(outArray);
235  return outArray;
236  }
237  return null;
238 }
239 
240  public long GetDisjunctionPenalty(int index) {
242  return ret;
243  }
244 
245  public long GetDisjunctionMaxCardinality(int index) {
247  return ret;
248  }
249 
250  public int GetNumberOfDisjunctions() {
252  return ret;
253  }
254 
257  }
258 
259  public void AddSoftSameVehicleConstraint( long[] indices, long cost) {
261  }
262 
263  public void SetAllowedVehiclesForIndex( int[] vehicles, long index) {
265  }
266 
267  public bool IsVehicleAllowedForIndex(int vehicle, long index) {
269  return ret;
270  }
271 
272  public void AddPickupAndDelivery(long pickup, long delivery) {
274  }
275 
276  public void AddPickupAndDeliverySets(int pickup_disjunction, int delivery_disjunction) {
277  operations_research_constraint_solverPINVOKE.RoutingModel_AddPickupAndDeliverySets(swigCPtr, pickup_disjunction, delivery_disjunction);
278  }
279 
280  public void SetPickupAndDeliveryPolicyOfAllVehicles(int policy) {
282  }
283 
284  public void SetPickupAndDeliveryPolicyOfVehicle(int policy, int vehicle) {
286  }
287 
288  public int GetPickupAndDeliveryPolicyOfVehicle(int vehicle) {
290  return ret;
291  }
292 
293  public int GetNumOfSingletonNodes() {
295  return ret;
296  }
297 
298  public void SetVisitType(long index, int type) {
300  }
301 
302  public int GetVisitType(long index) {
304  return ret;
305  }
306 
307  public int GetNumberOfVisitTypes() {
309  return ret;
310  }
311 
312  public long UnperformedPenalty(long var_index) {
314  return ret;
315  }
316 
317  public long UnperformedPenaltyOrValue(long default_value, long var_index) {
318  long ret = operations_research_constraint_solverPINVOKE.RoutingModel_UnperformedPenaltyOrValue(swigCPtr, default_value, var_index);
319  return ret;
320  }
321 
322  public long GetDepot() {
324  return ret;
325  }
326 
327  public void SetArcCostEvaluatorOfAllVehicles(int evaluator_index) {
329  }
330 
331  public void SetArcCostEvaluatorOfVehicle(int evaluator_index, int vehicle) {
333  }
334 
335  public void SetFixedCostOfAllVehicles(long cost) {
337  }
338 
339  public void SetFixedCostOfVehicle(long cost, int vehicle) {
341  }
342 
343  public long GetFixedCostOfVehicle(int vehicle) {
345  return ret;
346  }
347 
348  public void SetAmortizedCostFactorsOfAllVehicles(long linear_cost_factor, long quadratic_cost_factor) {
349  operations_research_constraint_solverPINVOKE.RoutingModel_SetAmortizedCostFactorsOfAllVehicles(swigCPtr, linear_cost_factor, quadratic_cost_factor);
350  }
351 
352  public void SetAmortizedCostFactorsOfVehicle(long linear_cost_factor, long quadratic_cost_factor, int vehicle) {
353  operations_research_constraint_solverPINVOKE.RoutingModel_SetAmortizedCostFactorsOfVehicle(swigCPtr, linear_cost_factor, quadratic_cost_factor, vehicle);
354  }
355 
358  CpInt64Vector tmpVector = null;
359  if (cPtr != global::System.IntPtr.Zero) {
360  tmpVector = new CpInt64Vector(cPtr, true);
361  long[] outArray = new long[tmpVector.Count];
362  tmpVector.CopyTo(outArray);
363  return outArray;
364  }
365  return null;
366 }
367 
370  CpInt64Vector tmpVector = null;
371  if (cPtr != global::System.IntPtr.Zero) {
372  tmpVector = new CpInt64Vector(cPtr, true);
373  long[] outArray = new long[tmpVector.Count];
374  tmpVector.CopyTo(outArray);
375  return outArray;
376  }
377  return null;
378 }
379 
380  public void ConsiderEmptyRouteCostsForVehicle(bool consider_costs, int vehicle) {
382  }
383 
384  public bool AreEmptyRouteCostsConsideredForVehicle(int vehicle) {
386  return ret;
387  }
388 
389  public void SetFirstSolutionEvaluator( LongLongToLong evaluator) {
391  }
392 
393  public void AddLocalSearchOperator(LocalSearchOperator ls_operator) {
395  }
396 
397  public void AddSearchMonitor(SearchMonitor monitor) {
399  }
400 
401  public void AddAtSolutionCallback( VoidToVoid callback) {
403  }
404 
407  }
408 
411  }
412 
413  public void AddWeightedVariableMinimizedByFinalizer(IntVar var, long cost) {
415  }
416 
417  public void AddVariableTargetToFinalizer(IntVar var, long target) {
419  }
420 
421  public void CloseModel() {
423  }
424 
426  operations_research_constraint_solverPINVOKE.RoutingModel_CloseModelWithParameters(swigCPtr, search_parameters.CalculateSize(), ProtoHelper.ProtoToByteArray(search_parameters));
427  }
428 
429  public Assignment Solve(Assignment assignment) {
430  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_Solve__SWIG_0(swigCPtr, Assignment.getCPtr(assignment));
431  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
432  return ret;
433  }
434 
435  public Assignment Solve() {
436  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_Solve__SWIG_1(swigCPtr);
437  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
438  return ret;
439  }
440 
442  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_SolveWithParameters(swigCPtr, search_parameters.CalculateSize(), ProtoHelper.ProtoToByteArray(search_parameters));
443  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
444  return ret;
445  }
446 
448  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_SolveFromAssignmentWithParameters(swigCPtr, Assignment.getCPtr(assignment), search_parameters.CalculateSize(), ProtoHelper.ProtoToByteArray(search_parameters));
449  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
450  return ret;
451  }
452 
453  public void SetAssignmentFromOtherModelAssignment(Assignment target_assignment, RoutingModel source_model, Assignment source_assignment) {
454  operations_research_constraint_solverPINVOKE.RoutingModel_SetAssignmentFromOtherModelAssignment(swigCPtr, Assignment.getCPtr(target_assignment), RoutingModel.getCPtr(source_model), Assignment.getCPtr(source_assignment));
455  }
456 
457  public long ComputeLowerBound() {
459  return ret;
460  }
461 
462  public int GetStatus() {
464  return ret;
465  }
466 
467  public IntVar ApplyLocks( long[] locks) {
468  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_ApplyLocks(swigCPtr, locks.Length, locks );
469  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
470  return ret;
471  }
472 
473  public bool ApplyLocksToAllVehicles( long[][] locks, bool close_routes) {
475  locks.GetLength(0),
476  NestedArrayHelper.GetArraySecondSize(locks),
477  NestedArrayHelper.GetFlatArray(locks)
478 , close_routes);
479  return ret;
480  }
481 
483  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_PreAssignment(swigCPtr);
484  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
485  return ret;
486  }
487 
490  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
491  return ret;
492  }
493 
494  public bool WriteAssignment(string file_name) {
497  return ret;
498  }
499 
500  public Assignment ReadAssignment(string file_name) {
501  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_ReadAssignment(swigCPtr, file_name);
502  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
504  return ret;
505  }
506 
508  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_RestoreAssignment(swigCPtr, Assignment.getCPtr(solution));
509  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
511  return ret;
512  }
513 
514  public Assignment ReadAssignmentFromRoutes( long[][] routes, bool ignore_inactive_indices) {
516  routes.GetLength(0),
517  NestedArrayHelper.GetArraySecondSize(routes),
518  NestedArrayHelper.GetFlatArray(routes)
519 , ignore_inactive_indices);
520  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
521  return ret;
522  }
523 
524  public bool RoutesToAssignment( long[][] routes, bool ignore_inactive_indices, bool close_routes, Assignment assignment) {
526  routes.GetLength(0),
527  NestedArrayHelper.GetArraySecondSize(routes),
528  NestedArrayHelper.GetFlatArray(routes)
529 , ignore_inactive_indices, close_routes, Assignment.getCPtr(assignment));
530  return ret;
531  }
532 
533  public void AssignmentToRoutes(Assignment assignment, long[][] routes) {
535  routes.GetLength(0),
536  NestedArrayHelper.GetArraySecondSize(routes),
537  NestedArrayHelper.GetFlatArray(routes)
538 );
540  }
541 
543  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_CompactAssignment(swigCPtr, Assignment.getCPtr(assignment));
544  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
546  return ret;
547  }
548 
550  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_CompactAndCheckAssignment(swigCPtr, Assignment.getCPtr(assignment));
551  Assignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Assignment(cPtr, false);
553  return ret;
554  }
555 
556  public void AddToAssignment(IntVar var) {
558  }
559 
560  public void AddIntervalToAssignment(IntervalVar interval) {
562  }
563 
566  }
567 
568  public long Start(int vehicle) {
570  return ret;
571  }
572 
573  public long End(int vehicle) {
575  return ret;
576  }
577 
578  public bool IsStart(long index) {
580  return ret;
581  }
582 
583  public bool IsEnd(long index) {
585  return ret;
586  }
587 
588  public int VehicleIndex(int index) {
590  return ret;
591  }
592 
593  public long Next(Assignment assignment, long index) {
594  long ret = operations_research_constraint_solverPINVOKE.RoutingModel_Next(swigCPtr, Assignment.getCPtr(assignment), index);
596  return ret;
597  }
598 
599  public bool IsVehicleUsed(Assignment assignment, int vehicle) {
600  bool ret = operations_research_constraint_solverPINVOKE.RoutingModel_IsVehicleUsed(swigCPtr, Assignment.getCPtr(assignment), vehicle);
602  return ret;
603  }
604 
605  public IntVarVector Nexts() {
607  return ret;
608  }
609 
612  return ret;
613  }
614 
615  public IntVar NextVar(long index) {
616  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_NextVar(swigCPtr, index);
617  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
618  return ret;
619  }
620 
621  public IntVar ActiveVar(long index) {
622  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_ActiveVar(swigCPtr, index);
623  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
624  return ret;
625  }
626 
627  public IntVar VehicleCostsConsideredVar(int vehicle) {
628  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_VehicleCostsConsideredVar(swigCPtr, vehicle);
629  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
630  return ret;
631  }
632 
633  public IntVar VehicleVar(long index) {
634  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_VehicleVar(swigCPtr, index);
635  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
636  return ret;
637  }
638 
639  public IntVar CostVar() {
640  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_CostVar(swigCPtr);
641  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
642  return ret;
643  }
644 
645  public long GetArcCostForVehicle(long from_index, long to_index, long vehicle) {
646  long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetArcCostForVehicle(swigCPtr, from_index, to_index, vehicle);
647  return ret;
648  }
649 
652  return ret;
653  }
654 
655  public long GetHomogeneousCost(long from_index, long to_index) {
656  long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetHomogeneousCost(swigCPtr, from_index, to_index);
657  return ret;
658  }
659 
660  public long GetArcCostForFirstSolution(long from_index, long to_index) {
662  return ret;
663  }
664 
665  public long GetArcCostForClass(long from_index, long to_index, long cost_class_index) {
666  long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetArcCostForClass(swigCPtr, from_index, to_index, cost_class_index);
667  return ret;
668  }
669 
670  public int GetCostClassIndexOfVehicle(long vehicle) {
672 }
673 
674  public bool HasVehicleWithCostClassIndex(int cost_class_index) {
676  return ret;
677  }
678 
679  public int GetCostClassesCount() {
681  return ret;
682  }
683 
686  return ret;
687  }
688 
689  public int GetVehicleClassIndexOfVehicle(long vehicle) {
691 }
692 
693  public int GetVehicleClassesCount() {
695  return ret;
696  }
697 
698  public int[] GetSameVehicleIndicesOfIndex(int node) {
700  CpIntVector tmpVector = null;
701  if (cPtr != global::System.IntPtr.Zero) {
702  tmpVector = new CpIntVector(cPtr, true);
703  int[] outArray = new int[tmpVector.Count];
704  tmpVector.CopyTo(outArray);
705  return outArray;
706  }
707  return null;
708 }
709 
710  public bool ArcIsMoreConstrainedThanArc(long from, long to1, long to2) {
712  return ret;
713  }
714 
715  public string DebugOutputAssignment(Assignment solution_assignment, string dimension_to_print) {
716  string ret = operations_research_constraint_solverPINVOKE.RoutingModel_DebugOutputAssignment(swigCPtr, Assignment.getCPtr(solution_assignment), dimension_to_print);
718  return ret;
719  }
720 
721  public Solver solver() {
722  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_solver(swigCPtr);
723  Solver ret = (cPtr == global::System.IntPtr.Zero) ? null : new Solver(cPtr, false);
724  return ret;
725  }
726 
727  public bool CheckLimit() {
729  return ret;
730  }
731 
732  public int Nodes() {
734  return ret;
735  }
736 
737  public int Vehicles() {
739  return ret;
740  }
741 
742  public long Size() {
744  return ret;
745  }
746 
748  long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetNumberOfDecisionsInFirstSolution(swigCPtr, search_parameters.CalculateSize(), ProtoHelper.ProtoToByteArray(search_parameters));
749  return ret;
750  }
751 
753  long ret = operations_research_constraint_solverPINVOKE.RoutingModel_GetNumberOfRejectsInFirstSolution(swigCPtr, search_parameters.CalculateSize(), ProtoHelper.ProtoToByteArray(search_parameters));
754  return ret;
755  }
756 
757  public bool IsMatchingModel() {
759  return ret;
760  }
761 
763  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RoutingModel_MakeGuidedSlackFinalizer(swigCPtr, RoutingDimension.getCPtr(dimension), StoreLongToLong(initializer) );
764  DecisionBuilder ret = (cPtr == global::System.IntPtr.Zero) ? null : new DecisionBuilder(cPtr, false);
765  return ret;
766  }
767 
770  DecisionBuilder ret = (cPtr == global::System.IntPtr.Zero) ? null : new DecisionBuilder(cPtr, false);
771  return ret;
772  }
773 
774  // Status
780 
781  // PickupAndDeliveryPolicy
785 
786 }
787 
788 }
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)
Definition: IntVar.cs:18
bool RoutesToAssignment(long[][] routes, bool ignore_inactive_indices, bool close_routes, Assignment assignment)
void SetFirstSolutionEvaluator(LongLongToLong evaluator)
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)
delegate long LongToLong(long t)
static readonly int ROUTING_FAIL_TIMEOUT
static int kNoDimension
Definition: RoutingModel.cs:91
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 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)
long GetDisjunctionMaxCardinality(int index)
long[] GetAmortizedLinearCostFactorOfVehicles()
int GetCostClassIndexOfVehicle(long vehicle)
static void RoutingModel_SetVisitType(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, int jarg3)
int GetStatus()
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()
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 void RoutingModel_AddWeightedVariableMinimizedByFinalizer(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, long jarg3)
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)
Assignment ReadAssignment(string file_name)
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)
static byte[] ProtoToByteArray(IMessage message)
Definition: ProtoHelper.cs:21
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)
Definition: Assignment.cs:11
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.
Definition: IntVarVector.cs:18
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_AddVariableTargetToFinalizer(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, long jarg3)
bool swigCMemOwn
Definition: RoutingModel.cs:20
int Nodes()
void AddVariableTargetToFinalizer(IntVar var, long target)
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)
long Size()
static int RoutingModel_GetNumOfSingletonNodes(global::System.Runtime.InteropServices.HandleRef jarg1)
void SetAmortizedCostFactorsOfVehicle(long linear_cost_factor, long quadratic_cost_factor, int vehicle)
Definition: KInt64Vector.cs:11
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)
long GetArcCostForClass(long from_index, long to_index, long cost_class_index)
void SetVisitType(long index, int type)
static void RoutingModel_SetAllowedVehiclesForIndex(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, int[] jarg2, long jarg3)
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_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)
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)
DecisionBuilder MakeGuidedSlackFinalizer(RoutingDimension dimension, LongToLong initializer)
bool AddDimensionWithVehicleTransits(int[] evaluator_indices, long slack_max, long capacity, bool fix_start_cumul_to_zero, string name)
static int kNoDisjunction
Definition: RoutingModel.cs:84
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 long RoutingModel_GetArcCostForVehicle(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3, long jarg4)
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)
Definition: CpIntVector.cs:113
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 Count
Definition: CpIntVector.cs:101
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 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)
Definition: RoutingModel.cs:98
void AddIntervalToAssignment(IntervalVar interval)
bool HasVehicleWithCostClassIndex(int cost_class_index)
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)
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)
long GetFixedCostOfVehicle(int vehicle)
static bool RoutingModel_IsVehicleUsed(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int jarg3)
static void RoutingModel_AddLocalSearchOperator(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
int GetNumberOfVisitTypes()
static int RoutingModel_GetVehicleClassesCount(global::System.Runtime.InteropServices.HandleRef jarg1)
int AddDisjunction(long[] indices, long penalty)
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)
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)
Definition: CpIntVector.cs:18
Assignment PreAssignment()
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)
static long kNoPenalty
Definition: RoutingModel.cs:77
bool AddDimensionWithVehicleTransitAndCapacity(int[] evaluator_indices, long slack_max, long[] vehicle_capacities, bool fix_start_cumul_to_zero, string name)
Definition: KInt64Vector.cs:11
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)
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 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)
static long RoutingModel_Start(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static readonly int ROUTING_FAIL
bool AddConstantDimension(long value, long capacity, bool fix_start_cumul_to_zero, string name)
DecisionBuilder MakeSelfDependentDimensionFinalizer(RoutingDimension dimension)
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()
void CopyTo(long[] array)
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:19
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)
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)
long GetArcCostForVehicle(long from_index, long to_index, long vehicle)
int Count
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)
RoutingDimension GetMutableDimension(string dimension_name)
string DebugOutputAssignment(Assignment solution_assignment, string dimension_to_print)
void AddWeightedVariableMinimizedByFinalizer(IntVar var, long cost)
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)
static int RoutingModel_GetVisitType(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)