22 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
this, cPtr);
25 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(
RegularLimit 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(RegularLimit 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 RegularLimit(Solver s, SWIGTYPE_p_absl__Duration time,
long branches,
long failures,
long solutions,
bool smart_time_check,
bool cumulative) : this(operations_research_constraint_solverPINVOKE.new_RegularLimit(Solver.getCPtr(s), SWIGTYPE_p_absl__Duration.getCPtr(time), branches, failures, solutions, smart_time_check, cumulative), true) {
56 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending)
throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
57 SwigDirectorConnect();
76 public override bool CheckWithOffset(SWIGTYPE_p_absl__Duration offset) {
82 public override void Init() {
90 public void UpdateLimits(SWIGTYPE_p_absl__Duration time,
long branches,
long failures,
long solutions) {
130 public override void Install() {
138 private void SwigDirectorConnect() {
139 if (SwigDerivedClassHasMethod(
"ToString", swigMethodTypes0))
141 if (SwigDerivedClassHasMethod(
"EnterSearch", swigMethodTypes1))
143 if (SwigDerivedClassHasMethod(
"RestartSearch", swigMethodTypes2))
145 if (SwigDerivedClassHasMethod(
"ExitSearch", swigMethodTypes3))
147 if (SwigDerivedClassHasMethod(
"BeginNextDecision", swigMethodTypes4))
149 if (SwigDerivedClassHasMethod(
"EndNextDecision", swigMethodTypes5))
151 if (SwigDerivedClassHasMethod(
"ApplyDecision", swigMethodTypes6))
153 if (SwigDerivedClassHasMethod(
"RefuteDecision", swigMethodTypes7))
155 if (SwigDerivedClassHasMethod(
"AfterDecision", swigMethodTypes8))
157 if (SwigDerivedClassHasMethod(
"BeginFail", swigMethodTypes9))
159 if (SwigDerivedClassHasMethod(
"EndFail", swigMethodTypes10))
161 if (SwigDerivedClassHasMethod(
"BeginInitialPropagation", swigMethodTypes11))
163 if (SwigDerivedClassHasMethod(
"EndInitialPropagation", swigMethodTypes12))
165 if (SwigDerivedClassHasMethod(
"AcceptSolution", swigMethodTypes13))
167 if (SwigDerivedClassHasMethod(
"AtSolution", swigMethodTypes14))
169 if (SwigDerivedClassHasMethod(
"NoMoreSolutions", swigMethodTypes15))
171 if (SwigDerivedClassHasMethod(
"LocalOptimum", swigMethodTypes16))
173 if (SwigDerivedClassHasMethod(
"AcceptDelta", swigMethodTypes17))
175 if (SwigDerivedClassHasMethod(
"AcceptNeighbor", swigMethodTypes18))
177 if (SwigDerivedClassHasMethod(
"AcceptUncheckedNeighbor", swigMethodTypes19))
179 if (SwigDerivedClassHasMethod(
"IsUncheckedSolutionLimitReached", swigMethodTypes20))
181 if (SwigDerivedClassHasMethod(
"PeriodicCheck", swigMethodTypes21))
183 if (SwigDerivedClassHasMethod(
"ProgressPercent", swigMethodTypes22))
185 if (SwigDerivedClassHasMethod(
"Accept", swigMethodTypes23))
187 if (SwigDerivedClassHasMethod(
"Install", swigMethodTypes24))
189 if (SwigDerivedClassHasMethod(
"CheckWithOffset", swigMethodTypes25))
191 if (SwigDerivedClassHasMethod(
"Init", swigMethodTypes26))
193 if (SwigDerivedClassHasMethod(
"Copy", swigMethodTypes27))
195 if (SwigDerivedClassHasMethod(
"MakeClone", swigMethodTypes28))
197 operations_research_constraint_solverPINVOKE.
RegularLimit_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);
200 private bool SwigDerivedClassHasMethod(
string methodName, global::System.Type[] methodTypes) {
201 global::System.Reflection.MethodInfo[] methodInfos = this.GetType().GetMethods(
202 global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance);
203 foreach (global::System.Reflection.MethodInfo methodInfo in methodInfos) {
204 if (methodInfo.DeclaringType ==
null)
207 if (methodInfo.Name != methodName)
210 var parameters = methodInfo.GetParameters();
211 if (parameters.Length != methodTypes.Length)
214 bool parametersMatch =
true;
215 for (var i = 0; i < parameters.Length; i++) {
216 if (parameters[i].ParameterType != methodTypes[i]) {
217 parametersMatch =
false;
222 if (!parametersMatch)
225 if (methodInfo.IsVirtual && (methodInfo.DeclaringType.IsSubclassOf(typeof(RegularLimit))) &&
226 methodInfo.DeclaringType != methodInfo.GetBaseDefinition().DeclaringType) {
234 private string SwigDirectorMethodToString() {
238 private void SwigDirectorMethodEnterSearch() {
242 private void SwigDirectorMethodRestartSearch() {
246 private void SwigDirectorMethodExitSearch() {
250 private void SwigDirectorMethodBeginNextDecision(global::System.IntPtr b) {
251 BeginNextDecision((b == global::System.IntPtr.Zero) ?
null :
new DecisionBuilder(b,
false));
254 private void SwigDirectorMethodEndNextDecision(global::System.IntPtr b, global::System.IntPtr d) {
255 EndNextDecision((b == global::System.IntPtr.Zero) ?
null :
new DecisionBuilder(b,
false), (d == global::System.IntPtr.Zero) ?
null :
new Decision(d,
false));
258 private void SwigDirectorMethodApplyDecision(global::System.IntPtr d) {
259 ApplyDecision((d == global::System.IntPtr.Zero) ?
null :
new Decision(d,
false));
262 private void SwigDirectorMethodRefuteDecision(global::System.IntPtr d) {
263 RefuteDecision((d == global::System.IntPtr.Zero) ?
null :
new Decision(d,
false));
266 private void SwigDirectorMethodAfterDecision(global::System.IntPtr d,
bool apply) {
267 AfterDecision((d == global::System.IntPtr.Zero) ?
null :
new Decision(d,
false), apply);
270 private void SwigDirectorMethodBeginFail() {
274 private void SwigDirectorMethodEndFail() {
278 private void SwigDirectorMethodBeginInitialPropagation() {
282 private void SwigDirectorMethodEndInitialPropagation() {
286 private bool SwigDirectorMethodAcceptSolution() {
290 private bool SwigDirectorMethodAtSolution() {
294 private void SwigDirectorMethodNoMoreSolutions() {
298 private bool SwigDirectorMethodLocalOptimum() {
302 private bool SwigDirectorMethodAcceptDelta(global::System.IntPtr delta, global::System.IntPtr deltadelta) {
303 return AcceptDelta((delta == global::System.IntPtr.Zero) ?
null :
new Assignment(delta,
false), (deltadelta == global::System.IntPtr.Zero) ?
null :
new Assignment(deltadelta,
false));
306 private void SwigDirectorMethodAcceptNeighbor() {
310 private void SwigDirectorMethodAcceptUncheckedNeighbor() {
314 private bool SwigDirectorMethodIsUncheckedSolutionLimitReached() {
318 private void SwigDirectorMethodPeriodicCheck() {
322 private int SwigDirectorMethodProgressPercent() {
326 private void SwigDirectorMethodAccept(global::System.IntPtr visitor) {
327 Accept((visitor == global::System.IntPtr.Zero) ?
null :
new ModelVisitor(visitor,
false));
330 private void SwigDirectorMethodInstall() {
334 private bool SwigDirectorMethodCheckWithOffset(global::System.IntPtr offset) {
338 private void SwigDirectorMethodInit() {
342 private void SwigDirectorMethodCopy(global::System.IntPtr limit) {
343 Copy((limit == global::System.IntPtr.Zero) ?
null :
new SearchLimit(limit,
false));
346 private global::System.IntPtr SwigDirectorMethodMakeClone() {
347 return SearchLimit.getCPtr(
MakeClone()).Handle;
410 private static global::System.Type[] swigMethodTypes0 =
new global::System.Type[] { };
411 private static global::System.Type[] swigMethodTypes1 =
new global::System.Type[] { };
412 private static global::System.Type[] swigMethodTypes2 =
new global::System.Type[] { };
413 private static global::System.Type[] swigMethodTypes3 =
new global::System.Type[] { };
414 private static global::System.Type[] swigMethodTypes4 =
new global::System.Type[] { typeof(DecisionBuilder) };
415 private static global::System.Type[] swigMethodTypes5 =
new global::System.Type[] { typeof(DecisionBuilder), typeof(Decision) };
416 private static global::System.Type[] swigMethodTypes6 =
new global::System.Type[] { typeof(Decision) };
417 private static global::System.Type[] swigMethodTypes7 =
new global::System.Type[] { typeof(Decision) };
418 private static global::System.Type[] swigMethodTypes8 =
new global::System.Type[] { typeof(Decision), typeof(
bool) };
419 private static global::System.Type[] swigMethodTypes9 =
new global::System.Type[] { };
420 private static global::System.Type[] swigMethodTypes10 =
new global::System.Type[] { };
421 private static global::System.Type[] swigMethodTypes11 =
new global::System.Type[] { };
422 private static global::System.Type[] swigMethodTypes12 =
new global::System.Type[] { };
423 private static global::System.Type[] swigMethodTypes13 =
new global::System.Type[] { };
424 private static global::System.Type[] swigMethodTypes14 =
new global::System.Type[] { };
425 private static global::System.Type[] swigMethodTypes15 =
new global::System.Type[] { };
426 private static global::System.Type[] swigMethodTypes16 =
new global::System.Type[] { };
427 private static global::System.Type[] swigMethodTypes17 =
new global::System.Type[] { typeof(Assignment), typeof(Assignment) };
428 private static global::System.Type[] swigMethodTypes18 =
new global::System.Type[] { };
429 private static global::System.Type[] swigMethodTypes19 =
new global::System.Type[] { };
430 private static global::System.Type[] swigMethodTypes20 =
new global::System.Type[] { };
431 private static global::System.Type[] swigMethodTypes21 =
new global::System.Type[] { };
432 private static global::System.Type[] swigMethodTypes22 =
new global::System.Type[] { };
433 private static global::System.Type[] swigMethodTypes23 =
new global::System.Type[] { typeof(ModelVisitor) };
434 private static global::System.Type[] swigMethodTypes24 =
new global::System.Type[] { };
435 private static global::System.Type[] swigMethodTypes25 =
new global::System.Type[] { typeof(SWIGTYPE_p_absl__Duration) };
436 private static global::System.Type[] swigMethodTypes26 =
new global::System.Type[] { };
437 private static global::System.Type[] swigMethodTypes27 =
new global::System.Type[] { typeof(SearchLimit) };
438 private static global::System.Type[] swigMethodTypes28 =
new global::System.Type[] { };