Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
ModelCache.cs
Go to the documentation of this file.
1//------------------------------------------------------------------------------
2// <auto-generated />
3//
4// This file was automatically generated by SWIG (https://www.swig.org).
5// Version 4.2.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
13using System;
14using System.Runtime.InteropServices;
15using System.Collections;
16using System.Collections.Generic;
17
18public partial class ModelCache : global::System.IDisposable {
19 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
20 protected bool swigCMemOwn;
21
22 internal ModelCache(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(ModelCache obj) {
28 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
29 }
30
31 internal static global::System.Runtime.InteropServices.HandleRef swigRelease(ModelCache obj) {
32 if (obj != null) {
33 if (!obj.swigCMemOwn)
34 throw new global::System.ApplicationException("Cannot release ownership as memory is not owned");
35 global::System.Runtime.InteropServices.HandleRef ptr = obj.swigCPtr;
36 obj.swigCMemOwn = false;
37 obj.Dispose();
38 return ptr;
39 } else {
40 return new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
41 }
42 }
43
44 ~ModelCache() {
45 Dispose(false);
46 }
47
48 public void Dispose() {
49 Dispose(true);
50 global::System.GC.SuppressFinalize(this);
51 }
52
53 protected virtual void Dispose(bool disposing) {
54 lock(this) {
55 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
56 if (swigCMemOwn) {
57 swigCMemOwn = false;
59 }
60 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
61 }
62 }
63 }
64
65 public virtual void Clear() {
66 operations_research_constraint_solverPINVOKE.ModelCache_Clear(swigCPtr);
67 }
68
69 public virtual Constraint FindVoidConstraint(int type) {
70 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.ModelCache_FindVoidConstraint(swigCPtr, type);
71 Constraint ret = (cPtr == global::System.IntPtr.Zero) ? null : new Constraint(cPtr, false);
72 return ret;
73 }
74
75 public virtual void InsertVoidConstraint(Constraint ct, int type) {
77 }
78
79 public virtual Constraint FindVarConstantConstraint(IntVar var, long value, int type) {
80 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.ModelCache_FindVarConstantConstraint(swigCPtr, IntVar.getCPtr(var), value, type);
81 Constraint ret = (cPtr == global::System.IntPtr.Zero) ? null : new Constraint(cPtr, false);
82 return ret;
83 }
84
85 public virtual void InsertVarConstantConstraint(Constraint ct, IntVar var, long value, int type) {
87 }
88
89 public virtual Constraint FindVarConstantConstantConstraint(IntVar var, long value1, long value2, int type) {
90 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.ModelCache_FindVarConstantConstantConstraint(swigCPtr, IntVar.getCPtr(var), value1, value2, type);
91 Constraint ret = (cPtr == global::System.IntPtr.Zero) ? null : new Constraint(cPtr, false);
92 return ret;
93 }
94
95 public virtual void InsertVarConstantConstantConstraint(Constraint ct, IntVar var, long value1, long value2, int type) {
97 }
98
99 public virtual Constraint FindExprExprConstraint(IntExpr expr1, IntExpr expr2, int type) {
100 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.ModelCache_FindExprExprConstraint(swigCPtr, IntExpr.getCPtr(expr1), IntExpr.getCPtr(expr2), type);
101 Constraint ret = (cPtr == global::System.IntPtr.Zero) ? null : new Constraint(cPtr, false);
102 return ret;
103 }
104
105 public virtual void InsertExprExprConstraint(Constraint ct, IntExpr expr1, IntExpr expr2, int type) {
106 operations_research_constraint_solverPINVOKE.ModelCache_InsertExprExprConstraint(swigCPtr, Constraint.getCPtr(ct), IntExpr.getCPtr(expr1), IntExpr.getCPtr(expr2), type);
108
109 public virtual IntExpr FindExprExpression(IntExpr expr, int type) {
110 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.ModelCache_FindExprExpression(swigCPtr, IntExpr.getCPtr(expr), type);
111 IntExpr ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntExpr(cPtr, false);
112 return ret;
113 }
114
115 public virtual void InsertExprExpression(IntExpr expression, IntExpr expr, int type) {
116 operations_research_constraint_solverPINVOKE.ModelCache_InsertExprExpression(swigCPtr, IntExpr.getCPtr(expression), IntExpr.getCPtr(expr), type);
118
119 public virtual IntExpr FindExprConstantExpression(IntExpr expr, long value, int type) {
120 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.ModelCache_FindExprConstantExpression(swigCPtr, IntExpr.getCPtr(expr), value, type);
121 IntExpr ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntExpr(cPtr, false);
122 return ret;
123 }
124
125 public virtual void InsertExprConstantExpression(IntExpr expression, IntExpr var, long value, int type) {
126 operations_research_constraint_solverPINVOKE.ModelCache_InsertExprConstantExpression(swigCPtr, IntExpr.getCPtr(expression), IntExpr.getCPtr(var), value, type);
128
129 public virtual IntExpr FindExprExprExpression(IntExpr var1, IntExpr var2, int type) {
130 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.ModelCache_FindExprExprExpression(swigCPtr, IntExpr.getCPtr(var1), IntExpr.getCPtr(var2), type);
131 IntExpr ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntExpr(cPtr, false);
132 return ret;
133 }
134
135 public virtual void InsertExprExprExpression(IntExpr expression, IntExpr var1, IntExpr var2, int type) {
136 operations_research_constraint_solverPINVOKE.ModelCache_InsertExprExprExpression(swigCPtr, IntExpr.getCPtr(expression), IntExpr.getCPtr(var1), IntExpr.getCPtr(var2), type);
138
139 public virtual IntExpr FindExprExprConstantExpression(IntExpr var1, IntExpr var2, long constant, int type) {
140 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.ModelCache_FindExprExprConstantExpression(swigCPtr, IntExpr.getCPtr(var1), IntExpr.getCPtr(var2), constant, type);
141 IntExpr ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntExpr(cPtr, false);
142 return ret;
143 }
144
145 public virtual void InsertExprExprConstantExpression(IntExpr expression, IntExpr var1, IntExpr var2, long constant, int type) {
146 operations_research_constraint_solverPINVOKE.ModelCache_InsertExprExprConstantExpression(swigCPtr, IntExpr.getCPtr(expression), IntExpr.getCPtr(var1), IntExpr.getCPtr(var2), constant, type);
148
149 public virtual IntExpr FindVarConstantConstantExpression(IntVar var, long value1, long value2, int type) {
150 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.ModelCache_FindVarConstantConstantExpression(swigCPtr, IntVar.getCPtr(var), value1, value2, type);
151 IntExpr ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntExpr(cPtr, false);
152 return ret;
153 }
154
155 public virtual void InsertVarConstantConstantExpression(IntExpr expression, IntVar var, long value1, long value2, int type) {
156 operations_research_constraint_solverPINVOKE.ModelCache_InsertVarConstantConstantExpression(swigCPtr, IntExpr.getCPtr(expression), IntVar.getCPtr(var), value1, value2, type);
158
159 public virtual IntExpr FindVarConstantArrayExpression(IntVar var, long[] values, int type) {
160 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.ModelCache_FindVarConstantArrayExpression(swigCPtr, IntVar.getCPtr(var), values.Length, values , type);
161 IntExpr ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntExpr(cPtr, false);
162 return ret;
163 }
164
165 public virtual void InsertVarConstantArrayExpression(IntExpr expression, IntVar var, long[] values, int type) {
166 operations_research_constraint_solverPINVOKE.ModelCache_InsertVarConstantArrayExpression(swigCPtr, IntExpr.getCPtr(expression), IntVar.getCPtr(var), values.Length, values , type);
168
169 public virtual IntExpr FindVarArrayExpression(IntVarVector vars, int type) {
170 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.ModelCache_FindVarArrayExpression(swigCPtr, IntVarVector.getCPtr(vars), type);
171 IntExpr ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntExpr(cPtr, false);
173 return ret;
174 }
175
176 public virtual void InsertVarArrayExpression(IntExpr expression, IntVarVector vars, int type) {
182 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.ModelCache_FindVarArrayConstantArrayExpression(swigCPtr, IntVarVector.getCPtr(vars), values.Length, values , type);
183 IntExpr ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntExpr(cPtr, false);
185 return ret;
186 }
187
188 public virtual void InsertVarArrayConstantArrayExpression(IntExpr expression, IntVarVector var, long[] values, int type) {
189 operations_research_constraint_solverPINVOKE.ModelCache_InsertVarArrayConstantArrayExpression(swigCPtr, IntExpr.getCPtr(expression), IntVarVector.getCPtr(var), values.Length, values , type);
194 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.ModelCache_FindVarArrayConstantExpression(swigCPtr, IntVarVector.getCPtr(vars), value, type);
195 IntExpr ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntExpr(cPtr, false);
197 return ret;
198 }
199
200 public virtual void InsertVarArrayConstantExpression(IntExpr expression, IntVarVector var, long value, int type) {
206 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.ModelCache_solver(swigCPtr);
207 Solver ret = (cPtr == global::System.IntPtr.Zero) ? null : new Solver(cPtr, false);
208 return ret;
209 }
210
211 // VoidConstraintType
216 // VarConstantConstraintType
223 // VarConstantConstantConstraintType
227 // ExprExprConstraintType
236 // ExprExpressionType
242 // ExprExprExpressionType
255 // ExprExprConstantExpressionType
259 // ExprConstantExpressionType
272 // VarConstantConstantExpressionType
276 // VarConstantArrayExpressionType
280 // VarArrayConstantArrayExpressionType
284 // VarArrayExpressionType
290 // VarArrayConstantExpressionType
295
296}
virtual void InsertVarConstantArrayExpression(IntExpr expression, IntVar var, long[] values, int type)
virtual void InsertVarArrayConstantArrayExpression(IntExpr expression, IntVarVector var, long[] values, int type)
static readonly int VAR_CONSTANT_GREATER_OR_EQUAL
static readonly int VAR_ARRAY_MAX
VarArrayExpressionType.
virtual IntExpr FindVarArrayConstantExpression(IntVarVector vars, long value, int type)
static readonly int EXPR_CONSTANT_IS_GREATER_OR_EQUAL
virtual void InsertVarArrayConstantExpression(IntExpr expression, IntVarVector var, long value, int type)
virtual IntExpr FindExprConstantExpression(IntExpr expr, long value, int type)
virtual void InsertExprConstantExpression(IntExpr expression, IntExpr var, long value, int type)
virtual void InsertVarConstantConstantConstraint(Constraint ct, IntVar var, long value1, long value2, int type)
Definition ModelCache.cs:97
static readonly int VAR_ARRAY_CONSTANT_ARRAY_SCAL_PROD
VarArrayConstantArrayExpressionType.
static readonly int VAR_CONSTANT_EQUALITY
VarConstantConstraintType.
virtual IntExpr FindVarConstantArrayExpression(IntVar var, long[] values, int type)
virtual Constraint FindVoidConstraint(int type)
Definition ModelCache.cs:71
virtual Constraint FindVarConstantConstantConstraint(IntVar var, long value1, long value2, int type)
Definition ModelCache.cs:91
virtual IntExpr FindExprExpression(IntExpr expr, int type)
virtual void InsertExprExprExpression(IntExpr expression, IntExpr var1, IntExpr var2, int type)
static readonly int VOID_FALSE_CONSTRAINT
VoidConstraintType.
static readonly int VAR_ARRAY_CONSTANT_INDEX
VarArrayConstantExpressionType.
virtual Constraint FindExprExprConstraint(IntExpr expr1, IntExpr expr2, int type)
static readonly int VAR_ARRAY_CONSTANT_ARRAY_EXPRESSION_MAX
virtual void InsertVarArrayExpression(IntExpr expression, IntVarVector vars, int type)
static readonly int EXPR_EXPR_CONSTANT_EXPRESSION_MAX
static readonly int EXPR_CONSTANT_DIFFERENCE
ExprConstantExpressionType.
virtual IntExpr FindVarArrayExpression(IntVarVector vars, int type)
static readonly int EXPR_EXPR_CONSTANT_CONDITIONAL
ExprExprConstantExpressionType.
virtual IntExpr FindExprExprExpression(IntExpr var1, IntExpr var2, int type)
static readonly int VAR_CONSTANT_CONSTANT_EXPRESSION_MAX
virtual void InsertExprExprConstraint(Constraint ct, IntExpr expr1, IntExpr expr2, int type)
virtual IntExpr FindVarConstantConstantExpression(IntVar var, long value1, long value2, int type)
static readonly int EXPR_EXPR_DIFFERENCE
ExprExprExpressionType.
static readonly int VAR_ARRAY_CONSTANT_EXPRESSION_MAX
static readonly int VAR_CONSTANT_CONSTANT_CONSTRAINT_MAX
virtual Constraint FindVarConstantConstraint(IntVar var, long value, int type)
Definition ModelCache.cs:81
static readonly int EXPR_OPPOSITE
ExprExpressionType.
virtual void InsertVoidConstraint(Constraint ct, int type)
Definition ModelCache.cs:77
static readonly int VAR_CONSTANT_CONSTRAINT_MAX
virtual void InsertVarConstantConstantExpression(IntExpr expression, IntVar var, long value1, long value2, int type)
static readonly int VAR_CONSTANT_CONSTANT_SEMI_CONTINUOUS
VarConstantConstantExpressionType.
static readonly int EXPR_CONSTANT_EXPRESSION_MAX
virtual void InsertExprExpression(IntExpr expression, IntExpr expr, int type)
static readonly int EXPR_CONSTANT_IS_LESS_OR_EQUAL
static readonly int EXPR_EXPR_EQUALITY
ExprExprConstraintType.
virtual IntExpr FindVarArrayConstantArrayExpression(IntVarVector vars, long[] values, int type)
static readonly int VAR_CONSTANT_CONSTANT_BETWEEN
VarConstantConstantConstraintType.
static readonly int VAR_CONSTANT_ARRAY_ELEMENT
VarConstantArrayExpressionType.
static readonly int VAR_CONSTANT_ARRAY_EXPRESSION_MAX
virtual void InsertExprExprConstantExpression(IntExpr expression, IntExpr var1, IntExpr var2, long constant, int type)
virtual IntExpr FindExprExprConstantExpression(IntExpr var1, IntExpr var2, long constant, int type)
virtual void InsertVarConstantConstraint(Constraint ct, IntVar var, long value, int type)
Definition ModelCache.cs:87
static global::System.IntPtr ModelCache_FindVoidConstraint(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static void ModelCache_InsertVarConstantConstantConstraint(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, long jarg4, long jarg5, int jarg6)
static global::System.IntPtr ModelCache_FindVarConstantConstantConstraint(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, long jarg3, long jarg4, int jarg5)
static void ModelCache_InsertVarConstantArrayExpression(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, int length4, long[] jarg4, int jarg5)
static void ModelCache_InsertExprExprConstantExpression(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, global::System.Runtime.InteropServices.HandleRef jarg4, long jarg5, int jarg6)
static void ModelCache_InsertExprExpression(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, int jarg4)
static void ModelCache_InsertVarArrayExpression(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, int jarg4)
static void ModelCache_InsertExprExprConstraint(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, global::System.Runtime.InteropServices.HandleRef jarg4, int jarg5)
static void delete_ModelCache(global::System.Runtime.InteropServices.HandleRef jarg1)
static void ModelCache_InsertVarConstantConstantExpression(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, long jarg4, long jarg5, int jarg6)
static global::System.IntPtr ModelCache_FindVarConstantConstantExpression(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, long jarg3, long jarg4, int jarg5)
static global::System.IntPtr ModelCache_FindExprConstantExpression(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, long jarg3, int jarg4)
static void ModelCache_InsertVarConstantConstraint(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, long jarg4, int jarg5)
static global::System.IntPtr ModelCache_FindVarConstantConstraint(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, long jarg3, int jarg4)
static global::System.IntPtr ModelCache_FindVarArrayConstantExpression(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, long jarg3, int jarg4)
static void ModelCache_InsertVoidConstraint(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int jarg3)
static void ModelCache_InsertVarArrayConstantArrayExpression(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, int length4, long[] jarg4, int jarg5)
static void ModelCache_InsertExprConstantExpression(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, long jarg4, int jarg5)
static global::System.IntPtr ModelCache_FindVarConstantArrayExpression(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int length3, long[] jarg3, int jarg4)
static global::System.IntPtr ModelCache_solver(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr ModelCache_FindExprExprConstraint(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, int jarg4)
static void ModelCache_InsertExprExprExpression(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, global::System.Runtime.InteropServices.HandleRef jarg4, int jarg5)
static global::System.IntPtr ModelCache_FindVarArrayExpression(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int jarg3)
static void ModelCache_InsertVarArrayConstantExpression(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, long jarg4, int jarg5)
static global::System.IntPtr ModelCache_FindExprExpression(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int jarg3)
static global::System.IntPtr ModelCache_FindExprExprConstantExpression(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, long jarg4, int jarg5)
static global::System.IntPtr ModelCache_FindVarArrayConstantArrayExpression(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int length3, long[] jarg3, int jarg4)
static global::System.IntPtr ModelCache_FindExprExprExpression(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, int jarg4)