DotNet Reference

DotNet Reference

RegularLimit.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 RegularLimit : SearchLimit {
19  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
20 
21  internal RegularLimit(global::System.IntPtr cPtr, bool cMemoryOwn) : base(operations_research_constraint_solverPINVOKE.RegularLimit_SWIGUpcast(cPtr), cMemoryOwn) {
22  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
23  }
24 
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;
27  }
28 
29  protected override void Dispose(bool disposing) {
30  lock(this) {
31  if (swigCPtr.Handle != global::System.IntPtr.Zero) {
32  if (swigCMemOwn) {
33  swigCMemOwn = false;
35  }
36  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
37  }
38  base.Dispose(disposing);
39  }
40  }
41 
42  public RegularLimit(Solver s, long time, long branches, long failures, long solutions, bool smart_time_check, bool cumulative) : this(operations_research_constraint_solverPINVOKE.new_RegularLimit(Solver.getCPtr(s), time, branches, failures, solutions, smart_time_check, cumulative), true) {
43  }
44 
45  public override void Copy(SearchLimit limit) {
47  }
48 
49  public override SearchLimit MakeClone() {
50  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.RegularLimit_MakeClone(swigCPtr);
51  SearchLimit ret = (cPtr == global::System.IntPtr.Zero) ? null : new SearchLimit(cPtr, false);
52  return ret;
53  }
54 
57  RegularLimit ret = (cPtr == global::System.IntPtr.Zero) ? null : new RegularLimit(cPtr, false);
58  return ret;
59  }
60 
61  public override bool Check() {
63  return ret;
64  }
65 
66  public override void Init() {
68  }
69 
70  public override void ExitSearch() {
72  }
73 
74  public void UpdateLimits(long time, long branches, long failures, long solutions) {
75  operations_research_constraint_solverPINVOKE.RegularLimit_UpdateLimits(swigCPtr, time, branches, failures, solutions);
76  }
77 
78  public SWIGTYPE_p_absl__Duration DurationLimit() {
79  SWIGTYPE_p_absl__Duration ret = new SWIGTYPE_p_absl__Duration(operations_research_constraint_solverPINVOKE.RegularLimit_DurationLimit(swigCPtr), true);
80  return ret;
81  }
82 
83  public long WallTime() {
85  return ret;
86  }
87 
88  public long Branches() {
90  return ret;
91  }
92 
93  public long Failures() {
95  return ret;
96  }
97 
98  public long Solutions() {
100  return ret;
101  }
102 
103  public override bool IsUncheckedSolutionLimitReached() {
105  return ret;
106  }
107 
108  public override int ProgressPercent() {
110  return ret;
111  }
112 
113  public override string ToString() {
115  return ret;
116  }
117 
118  public SWIGTYPE_p_absl__Time AbsoluteSolverDeadline() {
119  SWIGTYPE_p_absl__Time ret = new SWIGTYPE_p_absl__Time(operations_research_constraint_solverPINVOKE.RegularLimit_AbsoluteSolverDeadline(swigCPtr), true);
120  return ret;
121  }
122 
123  public override void Accept(ModelVisitor visitor) {
125  }
126 
127 }
128 
129 }
long WallTime()
Definition: RegularLimit.cs:83
override bool IsUncheckedSolutionLimitReached()
override void ExitSearch()
Definition: RegularLimit.cs:70
SWIGTYPE_p_absl__Time AbsoluteSolverDeadline()
static global::System.IntPtr RegularLimit_SWIGUpcast(global::System.IntPtr jarg1)
void UpdateLimits(long time, long branches, long failures, long solutions)
Definition: RegularLimit.cs:74
static global::System.IntPtr RegularLimit_AbsoluteSolverDeadline(global::System.Runtime.InteropServices.HandleRef jarg1)
static void delete_RegularLimit(global::System.Runtime.InteropServices.HandleRef jarg1)
static void RegularLimit_Copy(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static bool RegularLimit_IsUncheckedSolutionLimitReached(global::System.Runtime.InteropServices.HandleRef jarg1)
Definition: Assignment.cs:11
Definition: SearchLimit.cs:18
long Solutions()
Definition: RegularLimit.cs:98
static long RegularLimit_WallTime(global::System.Runtime.InteropServices.HandleRef jarg1)
SWIGTYPE_p_absl__Duration DurationLimit()
Definition: RegularLimit.cs:78
Definition: ModelVisitor.cs:18
Definition: RegularLimit.cs:18
static void RegularLimit_Init(global::System.Runtime.InteropServices.HandleRef jarg1)
static string RegularLimit_ToString(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool RegularLimit_Check(global::System.Runtime.InteropServices.HandleRef jarg1)
override bool Check()
Definition: RegularLimit.cs:61
override void Accept(ModelVisitor visitor)
bool swigCMemOwn
Definition: BaseObject.cs:20
static void RegularLimit_UpdateLimits(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3, long jarg4, long jarg5)
static long RegularLimit_Branches(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr RegularLimit_MakeIdenticalClone(global::System.Runtime.InteropServices.HandleRef jarg1)
static void RegularLimit_ExitSearch(global::System.Runtime.InteropServices.HandleRef jarg1)
RegularLimit(Solver s, long time, long branches, long failures, long solutions, bool smart_time_check, bool cumulative)
Definition: RegularLimit.cs:42
static long RegularLimit_Failures(global::System.Runtime.InteropServices.HandleRef jarg1)
RegularLimit MakeIdenticalClone()
Definition: RegularLimit.cs:55
static global::System.IntPtr RegularLimit_DurationLimit(global::System.Runtime.InteropServices.HandleRef jarg1)
override void Dispose(bool disposing)
Definition: RegularLimit.cs:29
long Failures()
Definition: RegularLimit.cs:93
static int RegularLimit_ProgressPercent(global::System.Runtime.InteropServices.HandleRef jarg1)
static void RegularLimit_Accept(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
long Branches()
Definition: RegularLimit.cs:88
override SearchLimit MakeClone()
Definition: RegularLimit.cs:49
override int ProgressPercent()
override void Copy(SearchLimit limit)
Definition: RegularLimit.cs:45
override string ToString()
override void Init()
Definition: RegularLimit.cs:66
static long RegularLimit_Solutions(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr RegularLimit_MakeClone(global::System.Runtime.InteropServices.HandleRef jarg1)