15 using System.Collections;
16 using System.Collections.Generic;
19 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
22 internal RoutingModel(global::System.IntPtr cPtr,
bool cMemoryOwn) {
24 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
this, cPtr);
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;
37 global::System.GC.SuppressFinalize(
this);
40 protected virtual void Dispose(
bool disposing) {
42 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
47 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
53 private List<LongToLong> unaryTransitCallbacks;
55 if (unaryTransitCallbacks ==
null)
56 unaryTransitCallbacks =
new List<LongToLong>();
57 unaryTransitCallbacks.Add(c);
61 private List<LongLongToLong> transitCallbacks;
63 if (transitCallbacks ==
null)
64 transitCallbacks =
new List<LongLongToLong>();
65 transitCallbacks.Add(c);
69 private List<VoidToVoid> solutionCallbacks;
71 if (solutionCallbacks ==
null)
72 solutionCallbacks =
new List<VoidToVoid>();
73 solutionCallbacks.Add(c);
121 public bool AddDimension(
int evaluator_index,
long slack_max,
long capacity,
bool fix_start_cumul_to_zero,
string name) {
157 public bool AddVectorDimension(
long[] values,
long capacity,
bool fix_start_cumul_to_zero,
string name) {
224 if (cPtr != global::System.IntPtr.Zero) {
226 int[] outArray =
new int[tmpVector.
Count];
227 tmpVector.
CopyTo(outArray);
236 if (cPtr != global::System.IntPtr.Zero) {
238 long[] outArray =
new long[tmpVector.
Count];
239 tmpVector.
CopyTo(outArray);
364 if (cPtr != global::System.IntPtr.Zero) {
366 long[] outArray =
new long[tmpVector.
Count];
367 tmpVector.
CopyTo(outArray);
376 if (cPtr != global::System.IntPtr.Zero) {
378 long[] outArray =
new long[tmpVector.
Count];
379 tmpVector.
CopyTo(outArray);
474 IntVar ret = (cPtr == global::System.IntPtr.Zero) ?
null :
new IntVar(cPtr,
false);
524 , ignore_inactive_indices);
534 , ignore_inactive_indices, close_routes,
Assignment.getCPtr(assignment));
585 public long End(
int vehicle) {
629 IntVar ret = (cPtr == global::System.IntPtr.Zero) ?
null :
new IntVar(cPtr,
false);
635 IntVar ret = (cPtr == global::System.IntPtr.Zero) ?
null :
new IntVar(cPtr,
false);
641 IntVar ret = (cPtr == global::System.IntPtr.Zero) ?
null :
new IntVar(cPtr,
false);
647 IntVar ret = (cPtr == global::System.IntPtr.Zero) ?
null :
new IntVar(cPtr,
false);
653 IntVar ret = (cPtr == global::System.IntPtr.Zero) ?
null :
new IntVar(cPtr,
false);
713 if (cPtr != global::System.IntPtr.Zero) {
715 int[] outArray =
new int[tmpVector.
Count];
716 tmpVector.
CopyTo(outArray);
735 Solver ret = (cPtr == global::System.IntPtr.Zero) ?
null :
new Solver(cPtr,
false);