22 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
this, cPtr);
25 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(
SearchLimit obj) {
26 return (obj ==
null) ?
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero) : obj.swigCPtr;
29 internal static global::System.Runtime.InteropServices.HandleRef swigRelease(SearchLimit obj) {
32 throw new global::System.ApplicationException(
"Cannot release ownership as memory is not owned");
33 global::System.Runtime.InteropServices.HandleRef ptr = obj.swigCPtr;
34 obj.swigCMemOwn =
false;
38 return new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
42 protected override void Dispose(
bool disposing) {
44 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
49 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
51 base.Dispose(disposing);
55 public SearchLimit(Solver s) : this(operations_research_constraint_solverPINVOKE.new_SearchLimit(Solver.getCPtr(s)), true) {
56 SwigDirectorConnect();
75 public virtual void Init() {
110 public override void Install() {
114 private void SwigDirectorConnect() {
115 if (SwigDerivedClassHasMethod(
"ToString", swigMethodTypes0))
117 if (SwigDerivedClassHasMethod(
"EnterSearch", swigMethodTypes1))
119 if (SwigDerivedClassHasMethod(
"RestartSearch", swigMethodTypes2))
121 if (SwigDerivedClassHasMethod(
"ExitSearch", swigMethodTypes3))
123 if (SwigDerivedClassHasMethod(
"BeginNextDecision", swigMethodTypes4))
125 if (SwigDerivedClassHasMethod(
"EndNextDecision", swigMethodTypes5))
127 if (SwigDerivedClassHasMethod(
"ApplyDecision", swigMethodTypes6))
129 if (SwigDerivedClassHasMethod(
"RefuteDecision", swigMethodTypes7))
131 if (SwigDerivedClassHasMethod(
"AfterDecision", swigMethodTypes8))
133 if (SwigDerivedClassHasMethod(
"BeginFail", swigMethodTypes9))
135 if (SwigDerivedClassHasMethod(
"EndFail", swigMethodTypes10))
137 if (SwigDerivedClassHasMethod(
"BeginInitialPropagation", swigMethodTypes11))
139 if (SwigDerivedClassHasMethod(
"EndInitialPropagation", swigMethodTypes12))
141 if (SwigDerivedClassHasMethod(
"AcceptSolution", swigMethodTypes13))
143 if (SwigDerivedClassHasMethod(
"AtSolution", swigMethodTypes14))
145 if (SwigDerivedClassHasMethod(
"NoMoreSolutions", swigMethodTypes15))
147 if (SwigDerivedClassHasMethod(
"LocalOptimum", swigMethodTypes16))
149 if (SwigDerivedClassHasMethod(
"AcceptDelta", swigMethodTypes17))
151 if (SwigDerivedClassHasMethod(
"AcceptNeighbor", swigMethodTypes18))
153 if (SwigDerivedClassHasMethod(
"AcceptUncheckedNeighbor", swigMethodTypes19))
155 if (SwigDerivedClassHasMethod(
"IsUncheckedSolutionLimitReached", swigMethodTypes20))
157 if (SwigDerivedClassHasMethod(
"PeriodicCheck", swigMethodTypes21))
159 if (SwigDerivedClassHasMethod(
"ProgressPercent", swigMethodTypes22))
161 if (SwigDerivedClassHasMethod(
"Accept", swigMethodTypes23))
163 if (SwigDerivedClassHasMethod(
"Install", swigMethodTypes24))
165 if (SwigDerivedClassHasMethod(
"CheckWithOffset", swigMethodTypes25))
167 if (SwigDerivedClassHasMethod(
"Init", swigMethodTypes26))
169 if (SwigDerivedClassHasMethod(
"Copy", swigMethodTypes27))
171 if (SwigDerivedClassHasMethod(
"MakeClone", swigMethodTypes28))
173 operations_research_constraint_solverPINVOKE.
SearchLimit_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4, swigDelegate5, swigDelegate6, swigDelegate7, swigDelegate8, swigDelegate9, swigDelegate10, swigDelegate11, swigDelegate12, swigDelegate13, swigDelegate14, swigDelegate15, swigDelegate16, swigDelegate17, swigDelegate18, swigDelegate19, swigDelegate20, swigDelegate21, swigDelegate22, swigDelegate23, swigDelegate24, swigDelegate25, swigDelegate26, swigDelegate27, swigDelegate28);
176 private bool SwigDerivedClassHasMethod(
string methodName, global::System.Type[] methodTypes) {
177 global::System.Reflection.MethodInfo[] methodInfos = this.GetType().GetMethods(
178 global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance);
179 foreach (global::System.Reflection.MethodInfo methodInfo in methodInfos) {
180 if (methodInfo.DeclaringType ==
null)
183 if (methodInfo.Name != methodName)
186 var parameters = methodInfo.GetParameters();
187 if (parameters.Length != methodTypes.Length)
190 bool parametersMatch =
true;
191 for (var i = 0; i < parameters.Length; i++) {
192 if (parameters[i].ParameterType != methodTypes[i]) {
193 parametersMatch =
false;
198 if (!parametersMatch)
201 if (methodInfo.IsVirtual && (methodInfo.DeclaringType.IsSubclassOf(typeof(SearchLimit))) &&
202 methodInfo.DeclaringType != methodInfo.GetBaseDefinition().DeclaringType) {
210 private string SwigDirectorMethodToString() {
214 private void SwigDirectorMethodEnterSearch() {
218 private void SwigDirectorMethodRestartSearch() {
222 private void SwigDirectorMethodExitSearch() {
226 private void SwigDirectorMethodBeginNextDecision(global::System.IntPtr b) {
227 BeginNextDecision((b == global::System.IntPtr.Zero) ?
null :
new DecisionBuilder(b,
false));
230 private void SwigDirectorMethodEndNextDecision(global::System.IntPtr b, global::System.IntPtr d) {
231 EndNextDecision((b == global::System.IntPtr.Zero) ?
null :
new DecisionBuilder(b,
false), (d == global::System.IntPtr.Zero) ?
null :
new Decision(d,
false));
234 private void SwigDirectorMethodApplyDecision(global::System.IntPtr d) {
235 ApplyDecision((d == global::System.IntPtr.Zero) ?
null :
new Decision(d,
false));
238 private void SwigDirectorMethodRefuteDecision(global::System.IntPtr d) {
239 RefuteDecision((d == global::System.IntPtr.Zero) ?
null :
new Decision(d,
false));
242 private void SwigDirectorMethodAfterDecision(global::System.IntPtr d,
bool apply) {
243 AfterDecision((d == global::System.IntPtr.Zero) ?
null :
new Decision(d,
false), apply);
246 private void SwigDirectorMethodBeginFail() {
250 private void SwigDirectorMethodEndFail() {
254 private void SwigDirectorMethodBeginInitialPropagation() {
258 private void SwigDirectorMethodEndInitialPropagation() {
262 private bool SwigDirectorMethodAcceptSolution() {
266 private bool SwigDirectorMethodAtSolution() {
270 private void SwigDirectorMethodNoMoreSolutions() {
274 private bool SwigDirectorMethodLocalOptimum() {
278 private bool SwigDirectorMethodAcceptDelta(global::System.IntPtr delta, global::System.IntPtr deltadelta) {
279 return AcceptDelta((delta == global::System.IntPtr.Zero) ?
null :
new Assignment(delta,
false), (deltadelta == global::System.IntPtr.Zero) ?
null :
new Assignment(deltadelta,
false));
282 private void SwigDirectorMethodAcceptNeighbor() {
286 private void SwigDirectorMethodAcceptUncheckedNeighbor() {
290 private bool SwigDirectorMethodIsUncheckedSolutionLimitReached() {
294 private void SwigDirectorMethodPeriodicCheck() {
298 private int SwigDirectorMethodProgressPercent() {
302 private void SwigDirectorMethodAccept(global::System.IntPtr visitor) {
303 Accept((visitor == global::System.IntPtr.Zero) ?
null :
new ModelVisitor(visitor,
false));
306 private void SwigDirectorMethodInstall() {
310 private bool SwigDirectorMethodCheckWithOffset(global::System.IntPtr offset) {
314 private void SwigDirectorMethodInit() {
318 private void SwigDirectorMethodCopy(global::System.IntPtr limit) {
319 Copy((limit == global::System.IntPtr.Zero) ?
null :
new SearchLimit(limit,
false));
322 private global::System.IntPtr SwigDirectorMethodMakeClone() {
323 return SearchLimit.getCPtr(
MakeClone()).Handle;
386 private static global::System.Type[] swigMethodTypes0 =
new global::System.Type[] { };
387 private static global::System.Type[] swigMethodTypes1 =
new global::System.Type[] { };
388 private static global::System.Type[] swigMethodTypes2 =
new global::System.Type[] { };
389 private static global::System.Type[] swigMethodTypes3 =
new global::System.Type[] { };
390 private static global::System.Type[] swigMethodTypes4 =
new global::System.Type[] { typeof(DecisionBuilder) };
391 private static global::System.Type[] swigMethodTypes5 =
new global::System.Type[] { typeof(DecisionBuilder), typeof(Decision) };
392 private static global::System.Type[] swigMethodTypes6 =
new global::System.Type[] { typeof(Decision) };
393 private static global::System.Type[] swigMethodTypes7 =
new global::System.Type[] { typeof(Decision) };
394 private static global::System.Type[] swigMethodTypes8 =
new global::System.Type[] { typeof(Decision), typeof(
bool) };
395 private static global::System.Type[] swigMethodTypes9 =
new global::System.Type[] { };
396 private static global::System.Type[] swigMethodTypes10 =
new global::System.Type[] { };
397 private static global::System.Type[] swigMethodTypes11 =
new global::System.Type[] { };
398 private static global::System.Type[] swigMethodTypes12 =
new global::System.Type[] { };
399 private static global::System.Type[] swigMethodTypes13 =
new global::System.Type[] { };
400 private static global::System.Type[] swigMethodTypes14 =
new global::System.Type[] { };
401 private static global::System.Type[] swigMethodTypes15 =
new global::System.Type[] { };
402 private static global::System.Type[] swigMethodTypes16 =
new global::System.Type[] { };
403 private static global::System.Type[] swigMethodTypes17 =
new global::System.Type[] { typeof(Assignment), typeof(Assignment) };
404 private static global::System.Type[] swigMethodTypes18 =
new global::System.Type[] { };
405 private static global::System.Type[] swigMethodTypes19 =
new global::System.Type[] { };
406 private static global::System.Type[] swigMethodTypes20 =
new global::System.Type[] { };
407 private static global::System.Type[] swigMethodTypes21 =
new global::System.Type[] { };
408 private static global::System.Type[] swigMethodTypes22 =
new global::System.Type[] { };
409 private static global::System.Type[] swigMethodTypes23 =
new global::System.Type[] { typeof(ModelVisitor) };
410 private static global::System.Type[] swigMethodTypes24 =
new global::System.Type[] { };
411 private static global::System.Type[] swigMethodTypes25 =
new global::System.Type[] { typeof(SWIGTYPE_p_absl__Duration) };
412 private static global::System.Type[] swigMethodTypes26 =
new global::System.Type[] { };
413 private static global::System.Type[] swigMethodTypes27 =
new global::System.Type[] { typeof(SearchLimit) };
414 private static global::System.Type[] swigMethodTypes28 =
new global::System.Type[] { };