13public class ModelBuilderHelper : global::System.IDisposable {
19 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
this, cPtr);
22 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(
ModelBuilderHelper obj) {
23 return (obj ==
null) ?
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero) : obj.swigCPtr;
26 internal static global::System.Runtime.InteropServices.HandleRef swigRelease(
ModelBuilderHelper obj) {
29 throw new global::System.ApplicationException(
"Cannot release ownership as memory is not owned");
30 global::System.Runtime.InteropServices.HandleRef ptr = obj.swigCPtr;
31 obj.swigCMemOwn =
false;
35 return new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
39 ~ModelBuilderHelper() {
45 global::System.GC.SuppressFinalize(
this);
48 protected virtual void Dispose(
bool disposing) {
50 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
55 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
61 operations_research_model_builderPINVOKE.ModelBuilderHelper_OverwriteModel(swigCPtr,
ModelBuilderHelper.getCPtr(other_helper));
122 public void SetVarName(
int var_index,
string name) {
147 public string VarName(
int var_index) {
175 if (cPtr != global::System.IntPtr.Zero) {
177 double[] outArray =
new double[tmpVector.
Count];
178 tmpVector.
CopyTo(outArray);
185 global::System.IntPtr cPtr = operations_research_model_builderPINVOKE.ModelBuilderHelper_ConstraintVarIndices(swigCPtr, ct_index);
187 if (cPtr != global::System.IntPtr.Zero) {
189 int[] outArray =
new int[tmpVector.
Count];
190 tmpVector.
CopyTo(outArray);
197 operations_research_model_builderPINVOKE.ModelBuilderHelper_AddConstraintTerm(swigCPtr, ct_index, var_index, coeff);
263 if (cPtr != global::System.IntPtr.Zero) {
265 double[] outArray =
new double[tmpVector.
Count];
266 tmpVector.
CopyTo(outArray);
273 global::System.IntPtr cPtr = operations_research_model_builderPINVOKE.ModelBuilderHelper_EnforcedConstraintVarIndices(swigCPtr, ct_index);
275 if (cPtr != global::System.IntPtr.Zero) {
277 int[] outArray =
new int[tmpVector.
Count];
278 tmpVector.
CopyTo(outArray);
285 operations_research_model_builderPINVOKE.ModelBuilderHelper_AddEnforcedConstraintTerm(swigCPtr, ct_index, var_index, coeff);
331 public string Name() {
336 public void SetName(
string name) {
367 public void AddHint(
int var_index,
double var_value) {