DotNet Reference

.Net Reference

Pack.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.2
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 Pack : Constraint {
19  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
20 
21  internal Pack(global::System.IntPtr cPtr, bool cMemoryOwn) : base(operations_research_constraint_solverPINVOKE.Pack_SWIGUpcast(cPtr), cMemoryOwn) {
22  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
23  }
24 
25  internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Pack 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  // Store list of delegates to avoid the GC to reclaim them.
43  private List<LongToLong> LongToLongCallbacks;
44  private List<LongLongToLong> LongLongToLongCallbacks;
45  // Ensure that the GC does not collect any IndexEvaluator1Callback set from C#
46  // as the underlying C++ class will only store a pointer to it (i.e. no ownership).
47  private LongToLong StoreLongToLong(LongToLong c) {
48  if (LongToLongCallbacks == null)
49  LongToLongCallbacks = new List<LongToLong>();
50  LongToLongCallbacks.Add(c);
51  return c;
52  }
53  private LongLongToLong StoreLongLongToLong(LongLongToLong c) {
54  if (LongLongToLongCallbacks == null)
55  LongLongToLongCallbacks = new List<LongLongToLong>();
56  LongLongToLongCallbacks.Add(c);
57  return c;
58  }
59 
60  public Pack(Solver s, IntVarVector vars, int number_of_bins) : this(operations_research_constraint_solverPINVOKE.new_Pack(Solver.getCPtr(s), IntVarVector.getCPtr(vars), number_of_bins), true) {
62  }
63 
64  public void AddWeightedSumLessOrEqualConstantDimension( long[] weights, long[] bounds) {
65  operations_research_constraint_solverPINVOKE.Pack_AddWeightedSumLessOrEqualConstantDimension__SWIG_0(swigCPtr, weights.Length, weights , bounds.Length, bounds );
66  }
67 
68  public void AddWeightedSumLessOrEqualConstantDimension( LongToLong weights, long[] bounds) {
69  operations_research_constraint_solverPINVOKE.Pack_AddWeightedSumLessOrEqualConstantDimension__SWIG_1(swigCPtr, StoreLongToLong(weights) , bounds.Length, bounds );
70  }
71 
72  public void AddWeightedSumLessOrEqualConstantDimension( LongLongToLong weights, long[] bounds) {
73  operations_research_constraint_solverPINVOKE.Pack_AddWeightedSumLessOrEqualConstantDimension__SWIG_2(swigCPtr, StoreLongLongToLong(weights) , bounds.Length, bounds );
74  }
75 
76  public void AddWeightedSumEqualVarDimension( long[] weights, IntVarVector loads) {
79  }
80 
84  }
85 
89  }
90 
91  public void AddWeightedSumOfAssignedDimension( long[] weights, IntVar cost_var) {
92  operations_research_constraint_solverPINVOKE.Pack_AddWeightedSumOfAssignedDimension(swigCPtr, weights.Length, weights , IntVar.getCPtr(cost_var));
93  }
94 
95  public void AddCountUsedBinDimension(IntVar count_var) {
97  }
98 
99  public void AddCountAssignedItemsDimension(IntVar count_var) {
101  }
102 
103  public override void Post() {
105  }
106 
107  public void ClearAll() {
109  }
110 
111  public void PropagateDelayed() {
113  }
114 
115  public override void InitialPropagateWrapper() {
117  }
118 
119  public void Propagate() {
121  }
122 
123  public void OneDomain(int var_index) {
125  }
126 
127  public override string ToString() {
129  return ret;
130  }
131 
132  public bool IsUndecided(int var_index, int bin_index) {
133  bool ret = operations_research_constraint_solverPINVOKE.Pack_IsUndecided(swigCPtr, var_index, bin_index);
134  return ret;
135  }
136 
137  public void SetImpossible(int var_index, int bin_index) {
139  }
140 
141  public void Assign(int var_index, int bin_index) {
142  operations_research_constraint_solverPINVOKE.Pack_Assign(swigCPtr, var_index, bin_index);
143  }
144 
145  public bool IsAssignedStatusKnown(int var_index) {
147  return ret;
148  }
149 
150  public bool IsPossible(int var_index, int bin_index) {
151  bool ret = operations_research_constraint_solverPINVOKE.Pack_IsPossible(swigCPtr, var_index, bin_index);
152  return ret;
153  }
154 
155  public IntVar AssignVar(int var_index, int bin_index) {
156  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.Pack_AssignVar(swigCPtr, var_index, bin_index);
157  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
158  return ret;
159  }
160 
161  public void SetAssigned(int var_index) {
163  }
164 
165  public void SetUnassigned(int var_index) {
167  }
168 
169  public void RemoveAllPossibleFromBin(int bin_index) {
171  }
172 
173  public void AssignAllPossibleToBin(int bin_index) {
175  }
176 
177  public void AssignFirstPossibleToBin(int bin_index) {
179  }
180 
181  public void AssignAllRemainingItems() {
183  }
184 
187  }
188 
189  public override void Accept(ModelVisitor visitor) {
191  }
192 
193 }
194 
195 }
Pack(Solver s, IntVarVector vars, int number_of_bins)
Definition: Pack.cs:60
Definition: IntVar.cs:18
delegate long LongToLong(long t)
static void Pack_SetAssigned(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
Definition: Pack.cs:18
void AssignAllPossibleToBin(int bin_index)
Definition: Pack.cs:173
bool IsPossible(int var_index, int bin_index)
Definition: Pack.cs:150
static void Pack_AddWeightedSumEqualVarDimension__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static bool Pack_IsAssignedStatusKnown(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
void RemoveAllPossibleFromBin(int bin_index)
Definition: Pack.cs:169
static void Pack_OneDomain(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static void Pack_Post(global::System.Runtime.InteropServices.HandleRef jarg1)
static void Pack_AddWeightedSumLessOrEqualConstantDimension__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, LongToLong jarg2, int length3, long[] jarg3)
static void Pack_AddWeightedSumLessOrEqualConstantDimension__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1, LongLongToLong jarg2, int length3, long[] jarg3)
void PropagateDelayed()
Definition: Pack.cs:111
override void Dispose(bool disposing)
Definition: Pack.cs:29
void AddWeightedSumLessOrEqualConstantDimension(long[] weights, long[] bounds)
Definition: Pack.cs:64
void AddWeightedSumLessOrEqualConstantDimension(LongToLong weights, long[] bounds)
Definition: Pack.cs:68
static bool Pending
void AddCountAssignedItemsDimension(IntVar count_var)
Definition: Pack.cs:99
static bool Pack_IsUndecided(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
static string Pack_ToString(global::System.Runtime.InteropServices.HandleRef jarg1)
void UnassignAllRemainingItems()
Definition: Pack.cs:185
static void Pack_InitialPropagateWrapper(global::System.Runtime.InteropServices.HandleRef jarg1)
static void Pack_AssignAllPossibleToBin(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
void Propagate()
Definition: Pack.cs:119
static void delete_Pack(global::System.Runtime.InteropServices.HandleRef jarg1)
static void Pack_UnassignAllRemainingItems(global::System.Runtime.InteropServices.HandleRef jarg1)
static void Pack_AddSumVariableWeightsLessOrEqualConstantDimension(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int length3, long[] jarg3)
void AddWeightedSumOfAssignedDimension(long[] weights, IntVar cost_var)
Definition: Pack.cs:91
void AssignAllRemainingItems()
Definition: Pack.cs:181
static global::System.IntPtr Pack_SWIGUpcast(global::System.IntPtr jarg1)
override string ToString()
Definition: Pack.cs:127
override void Accept(ModelVisitor visitor)
Definition: Pack.cs:189
static void Pack_Accept(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
Definition: ModelVisitor.cs:18
static void Pack_Propagate(global::System.Runtime.InteropServices.HandleRef jarg1)
using System
Definition: Program.cs:14
void OneDomain(int var_index)
Definition: Pack.cs:123
void SetAssigned(int var_index)
Definition: Pack.cs:161
static void Pack_AddWeightedSumEqualVarDimension__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, LongLongToLong jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static void Pack_RemoveAllPossibleFromBin(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
void SetImpossible(int var_index, int bin_index)
Definition: Pack.cs:137
void SetUnassigned(int var_index)
Definition: Pack.cs:165
bool IsAssignedStatusKnown(int var_index)
Definition: Pack.cs:145
static void Pack_SetImpossible(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
static void Pack_PropagateDelayed(global::System.Runtime.InteropServices.HandleRef jarg1)
void AddCountUsedBinDimension(IntVar count_var)
Definition: Pack.cs:95
bool swigCMemOwn
Definition: BaseObject.cs:20
static void Pack_AssignFirstPossibleToBin(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static void Pack_SetUnassigned(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static void Pack_AddWeightedSumLessOrEqualConstantDimension__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2, int length3, long[] jarg3)
static void Pack_AddCountUsedBinDimension(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void Pack_AssignAllRemainingItems(global::System.Runtime.InteropServices.HandleRef jarg1)
bool IsUndecided(int var_index, int bin_index)
Definition: Pack.cs:132
static void Pack_AddCountAssignedItemsDimension(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static bool Pack_IsPossible(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
void AddWeightedSumLessOrEqualConstantDimension(LongLongToLong weights, long[] bounds)
Definition: Pack.cs:72
void AddSumVariableWeightsLessOrEqualConstantDimension(IntVarVector usage, long[] capacity)
Definition: Pack.cs:86
static global::System.IntPtr Pack_AssignVar(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
IntVar AssignVar(int var_index, int bin_index)
Definition: Pack.cs:155
void AddWeightedSumEqualVarDimension(LongLongToLong weights, IntVarVector loads)
Definition: Pack.cs:81
override void InitialPropagateWrapper()
Definition: Pack.cs:115
void AssignFirstPossibleToBin(int bin_index)
Definition: Pack.cs:177
static void Pack_AddWeightedSumOfAssignedDimension(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static global::System.Exception Retrieve()
void Assign(int var_index, int bin_index)
Definition: Pack.cs:141
static void Pack_ClearAll(global::System.Runtime.InteropServices.HandleRef jarg1)
void ClearAll()
Definition: Pack.cs:107
override void Post()
Definition: Pack.cs:103
static void Pack_Assign(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
delegate long LongLongToLong(long t, long u)
void AddWeightedSumEqualVarDimension(long[] weights, IntVarVector loads)
Definition: Pack.cs:76