OR-Tools  8.1
linear_solver_python_wrap.cc
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 4.0.2
4  *
5  * This file is not intended to be easily readable and contains a number of
6  * coding conventions designed to improve portability and efficiency. Do not make
7  * changes to this file unless you know what you are doing--modify the SWIG
8  * interface file instead.
9  * ----------------------------------------------------------------------------- */
10 
11 
12 #ifndef SWIGPYTHON
13 #define SWIGPYTHON
14 #endif
15 
16 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
17 
18 
19 #ifdef __cplusplus
20 /* SwigValueWrapper is described in swig.swg */
21 template<typename T> class SwigValueWrapper {
22  struct SwigMovePointer {
23  T *ptr;
24  SwigMovePointer(T *p) : ptr(p) { }
25  ~SwigMovePointer() { delete ptr; }
26  SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
27  } pointer;
28  SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
29  SwigValueWrapper(const SwigValueWrapper<T>& rhs);
30 public:
31  SwigValueWrapper() : pointer(0) { }
32  SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
33  operator T&() const { return *pointer.ptr; }
34  T *operator&() { return pointer.ptr; }
35 };
36 
37 template <typename T> T SwigValueInit() {
38  return T();
39 }
40 #endif
41 
42 /* -----------------------------------------------------------------------------
43  * This section contains generic SWIG labels for method/variable
44  * declarations/attributes, and other compiler dependent labels.
45  * ----------------------------------------------------------------------------- */
46 
47 /* template workaround for compilers that cannot correctly implement the C++ standard */
48 #ifndef SWIGTEMPLATEDISAMBIGUATOR
49 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
50 # define SWIGTEMPLATEDISAMBIGUATOR template
51 # elif defined(__HP_aCC)
52 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
53 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
54 # define SWIGTEMPLATEDISAMBIGUATOR template
55 # else
56 # define SWIGTEMPLATEDISAMBIGUATOR
57 # endif
58 #endif
59 
60 /* inline attribute */
61 #ifndef SWIGINLINE
62 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
63 # define SWIGINLINE inline
64 # else
65 # define SWIGINLINE
66 # endif
67 #endif
68 
69 /* attribute recognised by some compilers to avoid 'unused' warnings */
70 #ifndef SWIGUNUSED
71 # if defined(__GNUC__)
72 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
73 # define SWIGUNUSED __attribute__ ((__unused__))
74 # else
75 # define SWIGUNUSED
76 # endif
77 # elif defined(__ICC)
78 # define SWIGUNUSED __attribute__ ((__unused__))
79 # else
80 # define SWIGUNUSED
81 # endif
82 #endif
83 
84 #ifndef SWIG_MSC_UNSUPPRESS_4505
85 # if defined(_MSC_VER)
86 # pragma warning(disable : 4505) /* unreferenced local function has been removed */
87 # endif
88 #endif
89 
90 #ifndef SWIGUNUSEDPARM
91 # ifdef __cplusplus
92 # define SWIGUNUSEDPARM(p)
93 # else
94 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
95 # endif
96 #endif
97 
98 /* internal SWIG method */
99 #ifndef SWIGINTERN
100 # define SWIGINTERN static SWIGUNUSED
101 #endif
102 
103 /* internal inline SWIG method */
104 #ifndef SWIGINTERNINLINE
105 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
106 #endif
107 
108 /* exporting methods */
109 #if defined(__GNUC__)
110 # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
111 # ifndef GCC_HASCLASSVISIBILITY
112 # define GCC_HASCLASSVISIBILITY
113 # endif
114 # endif
115 #endif
116 
117 #ifndef SWIGEXPORT
118 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
119 # if defined(STATIC_LINKED)
120 # define SWIGEXPORT
121 # else
122 # define SWIGEXPORT __declspec(dllexport)
123 # endif
124 # else
125 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
126 # define SWIGEXPORT __attribute__ ((visibility("default")))
127 # else
128 # define SWIGEXPORT
129 # endif
130 # endif
131 #endif
132 
133 /* calling conventions for Windows */
134 #ifndef SWIGSTDCALL
135 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
136 # define SWIGSTDCALL __stdcall
137 # else
138 # define SWIGSTDCALL
139 # endif
140 #endif
141 
142 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
143 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
144 # define _CRT_SECURE_NO_DEPRECATE
145 #endif
146 
147 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
148 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
149 # define _SCL_SECURE_NO_DEPRECATE
150 #endif
151 
152 /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
153 #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
154 # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
155 #endif
156 
157 /* Intel's compiler complains if a variable which was never initialised is
158  * cast to void, which is a common idiom which we use to indicate that we
159  * are aware a variable isn't used. So we just silence that warning.
160  * See: https://github.com/swig/swig/issues/192 for more discussion.
161  */
162 #ifdef __INTEL_COMPILER
163 # pragma warning disable 592
164 #endif
165 
166 
167 #if defined(__GNUC__) && defined(_WIN32) && !defined(SWIG_PYTHON_NO_HYPOT_WORKAROUND)
168 /* Workaround for '::hypot' has not been declared', see https://bugs.python.org/issue11566 */
169 # include <math.h>
170 #endif
171 
172 #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
173 /* Use debug wrappers with the Python release dll */
174 # undef _DEBUG
175 # include <Python.h>
176 # define _DEBUG 1
177 #else
178 # include <Python.h>
179 #endif
180 
181 /* -----------------------------------------------------------------------------
182  * swigrun.swg
183  *
184  * This file contains generic C API SWIG runtime support for pointer
185  * type checking.
186  * ----------------------------------------------------------------------------- */
187 
188 /* This should only be incremented when either the layout of swig_type_info changes,
189  or for whatever reason, the runtime changes incompatibly */
190 #define SWIG_RUNTIME_VERSION "4"
191 
192 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
193 #ifdef SWIG_TYPE_TABLE
194 # define SWIG_QUOTE_STRING(x) #x
195 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
196 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
197 #else
198 # define SWIG_TYPE_TABLE_NAME
199 #endif
200 
201 /*
202  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
203  creating a static or dynamic library from the SWIG runtime code.
204  In 99.9% of the cases, SWIG just needs to declare them as 'static'.
205 
206  But only do this if strictly necessary, ie, if you have problems
207  with your compiler or suchlike.
208 */
209 
210 #ifndef SWIGRUNTIME
211 # define SWIGRUNTIME SWIGINTERN
212 #endif
213 
214 #ifndef SWIGRUNTIMEINLINE
215 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
216 #endif
217 
218 /* Generic buffer size */
219 #ifndef SWIG_BUFFER_SIZE
220 # define SWIG_BUFFER_SIZE 1024
221 #endif
222 
223 /* Flags for pointer conversions */
224 #define SWIG_POINTER_DISOWN 0x1
225 #define SWIG_CAST_NEW_MEMORY 0x2
226 #define SWIG_POINTER_NO_NULL 0x4
227 
228 /* Flags for new pointer objects */
229 #define SWIG_POINTER_OWN 0x1
230 
231 
232 /*
233  Flags/methods for returning states.
234 
235  The SWIG conversion methods, as ConvertPtr, return an integer
236  that tells if the conversion was successful or not. And if not,
237  an error code can be returned (see swigerrors.swg for the codes).
238 
239  Use the following macros/flags to set or process the returning
240  states.
241 
242  In old versions of SWIG, code such as the following was usually written:
243 
244  if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
245  // success code
246  } else {
247  //fail code
248  }
249 
250  Now you can be more explicit:
251 
252  int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
253  if (SWIG_IsOK(res)) {
254  // success code
255  } else {
256  // fail code
257  }
258 
259  which is the same really, but now you can also do
260 
261  Type *ptr;
262  int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
263  if (SWIG_IsOK(res)) {
264  // success code
265  if (SWIG_IsNewObj(res) {
266  ...
267  delete *ptr;
268  } else {
269  ...
270  }
271  } else {
272  // fail code
273  }
274 
275  I.e., now SWIG_ConvertPtr can return new objects and you can
276  identify the case and take care of the deallocation. Of course that
277  also requires SWIG_ConvertPtr to return new result values, such as
278 
279  int SWIG_ConvertPtr(obj, ptr,...) {
280  if (<obj is ok>) {
281  if (<need new object>) {
282  *ptr = <ptr to new allocated object>;
283  return SWIG_NEWOBJ;
284  } else {
285  *ptr = <ptr to old object>;
286  return SWIG_OLDOBJ;
287  }
288  } else {
289  return SWIG_BADOBJ;
290  }
291  }
292 
293  Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
294  more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
295  SWIG errors code.
296 
297  Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
298  allows to return the 'cast rank', for example, if you have this
299 
300  int food(double)
301  int fooi(int);
302 
303  and you call
304 
305  food(1) // cast rank '1' (1 -> 1.0)
306  fooi(1) // cast rank '0'
307 
308  just use the SWIG_AddCast()/SWIG_CheckState()
309 */
310 
311 #define SWIG_OK (0)
312 #define SWIG_ERROR (-1)
313 #define SWIG_IsOK(r) (r >= 0)
314 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
315 
316 /* The CastRankLimit says how many bits are used for the cast rank */
317 #define SWIG_CASTRANKLIMIT (1 << 8)
318 /* The NewMask denotes the object was created (using new/malloc) */
319 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
320 /* The TmpMask is for in/out typemaps that use temporal objects */
321 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
322 /* Simple returning values */
323 #define SWIG_BADOBJ (SWIG_ERROR)
324 #define SWIG_OLDOBJ (SWIG_OK)
325 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
326 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
327 /* Check, add and del mask methods */
328 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
329 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
330 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
331 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
332 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
333 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
334 
335 /* Cast-Rank Mode */
336 #if defined(SWIG_CASTRANK_MODE)
337 # ifndef SWIG_TypeRank
338 # define SWIG_TypeRank unsigned long
339 # endif
340 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
341 # define SWIG_MAXCASTRANK (2)
342 # endif
343 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
344 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
345 SWIGINTERNINLINE int SWIG_AddCast(int r) {
346  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
347 }
349  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
350 }
351 #else /* no cast-rank mode */
352 # define SWIG_AddCast(r) (r)
353 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
354 #endif
355 
356 
357 #include <string.h>
358 
359 #ifdef __cplusplus
360 extern "C" {
361 #endif
362 
363 typedef void *(*swig_converter_func)(void *, int *);
364 typedef struct swig_type_info *(*swig_dycast_func)(void **);
365 
366 /* Structure to store information on one type */
367 typedef struct swig_type_info {
368  const char *name; /* mangled name of this type */
369  const char *str; /* human readable name of this type */
370  swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
371  struct swig_cast_info *cast; /* linked list of types that can cast into this type */
372  void *clientdata; /* language specific type data */
373  int owndata; /* flag if the structure owns the clientdata */
375 
376 /* Structure to store a type and conversion function used for casting */
377 typedef struct swig_cast_info {
378  swig_type_info *type; /* pointer to type that is equivalent to this type */
379  swig_converter_func converter; /* function to cast the void pointers */
380  struct swig_cast_info *next; /* pointer to next cast in linked list */
381  struct swig_cast_info *prev; /* pointer to the previous cast */
383 
384 /* Structure used to store module information
385  * Each module generates one structure like this, and the runtime collects
386  * all of these structures and stores them in a circularly linked list.*/
387 typedef struct swig_module_info {
388  swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
389  size_t size; /* Number of types in this module */
390  struct swig_module_info *next; /* Pointer to next element in circularly linked list */
391  swig_type_info **type_initial; /* Array of initially generated type structures */
392  swig_cast_info **cast_initial; /* Array of initially generated casting structures */
393  void *clientdata; /* Language specific module data */
395 
396 /*
397  Compare two type names skipping the space characters, therefore
398  "char*" == "char *" and "Class<int>" == "Class<int >", etc.
399 
400  Return 0 when the two name types are equivalent, as in
401  strncmp, but skipping ' '.
402 */
403 SWIGRUNTIME int
404 SWIG_TypeNameComp(const char *f1, const char *l1,
405  const char *f2, const char *l2) {
406  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
407  while ((*f1 == ' ') && (f1 != l1)) ++f1;
408  while ((*f2 == ' ') && (f2 != l2)) ++f2;
409  if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
410  }
411  return (int)((l1 - f1) - (l2 - f2));
412 }
413 
414 /*
415  Check type equivalence in a name list like <name1>|<name2>|...
416  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
417 */
418 SWIGRUNTIME int
419 SWIG_TypeCmp(const char *nb, const char *tb) {
420  int equiv = 1;
421  const char* te = tb + strlen(tb);
422  const char* ne = nb;
423  while (equiv != 0 && *ne) {
424  for (nb = ne; *ne; ++ne) {
425  if (*ne == '|') break;
426  }
427  equiv = SWIG_TypeNameComp(nb, ne, tb, te);
428  if (*ne) ++ne;
429  }
430  return equiv;
431 }
432 
433 /*
434  Check type equivalence in a name list like <name1>|<name2>|...
435  Return 0 if not equal, 1 if equal
436 */
437 SWIGRUNTIME int
438 SWIG_TypeEquiv(const char *nb, const char *tb) {
439  return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
440 }
441 
442 /*
443  Check the typename
444 */
446 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
447  if (ty) {
448  swig_cast_info *iter = ty->cast;
449  while (iter) {
450  if (strcmp(iter->type->name, c) == 0) {
451  if (iter == ty->cast)
452  return iter;
453  /* Move iter to the top of the linked list */
454  iter->prev->next = iter->next;
455  if (iter->next)
456  iter->next->prev = iter->prev;
457  iter->next = ty->cast;
458  iter->prev = 0;
459  if (ty->cast) ty->cast->prev = iter;
460  ty->cast = iter;
461  return iter;
462  }
463  iter = iter->next;
464  }
465  }
466  return 0;
467 }
468 
469 /*
470  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
471 */
474  if (ty) {
475  swig_cast_info *iter = ty->cast;
476  while (iter) {
477  if (iter->type == from) {
478  if (iter == ty->cast)
479  return iter;
480  /* Move iter to the top of the linked list */
481  iter->prev->next = iter->next;
482  if (iter->next)
483  iter->next->prev = iter->prev;
484  iter->next = ty->cast;
485  iter->prev = 0;
486  if (ty->cast) ty->cast->prev = iter;
487  ty->cast = iter;
488  return iter;
489  }
490  iter = iter->next;
491  }
492  }
493  return 0;
494 }
495 
496 /*
497  Cast a pointer up an inheritance hierarchy
498 */
499 SWIGRUNTIMEINLINE void *
500 SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
501  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
502 }
503 
504 /*
505  Dynamic pointer casting. Down an inheritance hierarchy
506 */
509  swig_type_info *lastty = ty;
510  if (!ty || !ty->dcast) return ty;
511  while (ty && (ty->dcast)) {
512  ty = (*ty->dcast)(ptr);
513  if (ty) lastty = ty;
514  }
515  return lastty;
516 }
517 
518 /*
519  Return the name associated with this type
520 */
521 SWIGRUNTIMEINLINE const char *
523  return ty->name;
524 }
525 
526 /*
527  Return the pretty name associated with this type,
528  that is an unmangled type name in a form presentable to the user.
529 */
530 SWIGRUNTIME const char *
532  /* The "str" field contains the equivalent pretty names of the
533  type, separated by vertical-bar characters. We choose
534  to print the last name, as it is often (?) the most
535  specific. */
536  if (!type) return NULL;
537  if (type->str != NULL) {
538  const char *last_name = type->str;
539  const char *s;
540  for (s = type->str; *s; s++)
541  if (*s == '|') last_name = s+1;
542  return last_name;
543  }
544  else
545  return type->name;
546 }
547 
548 /*
549  Set the clientdata field for a type
550 */
551 SWIGRUNTIME void
553  swig_cast_info *cast = ti->cast;
554  /* if (ti->clientdata == clientdata) return; */
555  ti->clientdata = clientdata;
556 
557  while (cast) {
558  if (!cast->converter) {
559  swig_type_info *tc = cast->type;
560  if (!tc->clientdata) {
562  }
563  }
564  cast = cast->next;
565  }
566 }
567 SWIGRUNTIME void
570  ti->owndata = 1;
571 }
572 
573 /*
574  Search for a swig_type_info structure only by mangled name
575  Search is a O(log #types)
576 
577  We start searching at module start, and finish searching when start == end.
578  Note: if start == end at the beginning of the function, we go all the way around
579  the circular list.
580 */
583  swig_module_info *end,
584  const char *name) {
585  swig_module_info *iter = start;
586  do {
587  if (iter->size) {
588  size_t l = 0;
589  size_t r = iter->size - 1;
590  do {
591  /* since l+r >= 0, we can (>> 1) instead (/ 2) */
592  size_t i = (l + r) >> 1;
593  const char *iname = iter->types[i]->name;
594  if (iname) {
595  int compare = strcmp(name, iname);
596  if (compare == 0) {
597  return iter->types[i];
598  } else if (compare < 0) {
599  if (i) {
600  r = i - 1;
601  } else {
602  break;
603  }
604  } else if (compare > 0) {
605  l = i + 1;
606  }
607  } else {
608  break; /* should never happen */
609  }
610  } while (l <= r);
611  }
612  iter = iter->next;
613  } while (iter != end);
614  return 0;
615 }
616 
617 /*
618  Search for a swig_type_info structure for either a mangled name or a human readable name.
619  It first searches the mangled names of the types, which is a O(log #types)
620  If a type is not found it then searches the human readable names, which is O(#types).
621 
622  We start searching at module start, and finish searching when start == end.
623  Note: if start == end at the beginning of the function, we go all the way around
624  the circular list.
625 */
628  swig_module_info *end,
629  const char *name) {
630  /* STEP 1: Search the name field using binary search */
631  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
632  if (ret) {
633  return ret;
634  } else {
635  /* STEP 2: If the type hasn't been found, do a complete search
636  of the str field (the human readable name) */
637  swig_module_info *iter = start;
638  do {
639  size_t i = 0;
640  for (; i < iter->size; ++i) {
641  if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
642  return iter->types[i];
643  }
644  iter = iter->next;
645  } while (iter != end);
646  }
647 
648  /* neither found a match */
649  return 0;
650 }
651 
652 /*
653  Pack binary data into a string
654 */
655 SWIGRUNTIME char *
656 SWIG_PackData(char *c, void *ptr, size_t sz) {
657  static const char hex[17] = "0123456789abcdef";
658  const unsigned char *u = (unsigned char *) ptr;
659  const unsigned char *eu = u + sz;
660  for (; u != eu; ++u) {
661  unsigned char uu = *u;
662  *(c++) = hex[(uu & 0xf0) >> 4];
663  *(c++) = hex[uu & 0xf];
664  }
665  return c;
666 }
667 
668 /*
669  Unpack binary data from a string
670 */
671 SWIGRUNTIME const char *
672 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
673  unsigned char *u = (unsigned char *) ptr;
674  const unsigned char *eu = u + sz;
675  for (; u != eu; ++u) {
676  char d = *(c++);
677  unsigned char uu;
678  if ((d >= '0') && (d <= '9'))
679  uu = (unsigned char)((d - '0') << 4);
680  else if ((d >= 'a') && (d <= 'f'))
681  uu = (unsigned char)((d - ('a'-10)) << 4);
682  else
683  return (char *) 0;
684  d = *(c++);
685  if ((d >= '0') && (d <= '9'))
686  uu |= (unsigned char)(d - '0');
687  else if ((d >= 'a') && (d <= 'f'))
688  uu |= (unsigned char)(d - ('a'-10));
689  else
690  return (char *) 0;
691  *u = uu;
692  }
693  return c;
694 }
695 
696 /*
697  Pack 'void *' into a string buffer.
698 */
699 SWIGRUNTIME char *
700 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
701  char *r = buff;
702  if ((2*sizeof(void *) + 2) > bsz) return 0;
703  *(r++) = '_';
704  r = SWIG_PackData(r,&ptr,sizeof(void *));
705  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
706  strcpy(r,name);
707  return buff;
708 }
709 
710 SWIGRUNTIME const char *
711 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
712  if (*c != '_') {
713  if (strcmp(c,"NULL") == 0) {
714  *ptr = (void *) 0;
715  return name;
716  } else {
717  return 0;
718  }
719  }
720  return SWIG_UnpackData(++c,ptr,sizeof(void *));
721 }
722 
723 SWIGRUNTIME char *
724 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
725  char *r = buff;
726  size_t lname = (name ? strlen(name) : 0);
727  if ((2*sz + 2 + lname) > bsz) return 0;
728  *(r++) = '_';
729  r = SWIG_PackData(r,ptr,sz);
730  if (lname) {
731  strncpy(r,name,lname+1);
732  } else {
733  *r = 0;
734  }
735  return buff;
736 }
737 
738 SWIGRUNTIME const char *
739 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
740  if (*c != '_') {
741  if (strcmp(c,"NULL") == 0) {
742  memset(ptr,0,sz);
743  return name;
744  } else {
745  return 0;
746  }
747  }
748  return SWIG_UnpackData(++c,ptr,sz);
749 }
750 
751 #ifdef __cplusplus
752 }
753 #endif
754 
755 /* Errors in SWIG */
756 #define SWIG_UnknownError -1
757 #define SWIG_IOError -2
758 #define SWIG_RuntimeError -3
759 #define SWIG_IndexError -4
760 #define SWIG_TypeError -5
761 #define SWIG_DivisionByZero -6
762 #define SWIG_OverflowError -7
763 #define SWIG_SyntaxError -8
764 #define SWIG_ValueError -9
765 #define SWIG_SystemError -10
766 #define SWIG_AttributeError -11
767 #define SWIG_MemoryError -12
768 #define SWIG_NullReferenceError -13
769 
770 
771 
772 /* Compatibility macros for Python 3 */
773 #if PY_VERSION_HEX >= 0x03000000
774 
775 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
776 #define PyInt_Check(x) PyLong_Check(x)
777 #define PyInt_AsLong(x) PyLong_AsLong(x)
778 #define PyInt_FromLong(x) PyLong_FromLong(x)
779 #define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
780 #define PyString_Check(name) PyBytes_Check(name)
781 #define PyString_FromString(x) PyUnicode_FromString(x)
782 #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
783 #define PyString_AsString(str) PyBytes_AsString(str)
784 #define PyString_Size(str) PyBytes_Size(str)
785 #define PyString_InternFromString(key) PyUnicode_InternFromString(key)
786 #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
787 #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
788 #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
789 
790 #endif
791 
792 #ifndef Py_TYPE
793 # define Py_TYPE(op) ((op)->ob_type)
794 #endif
795 
796 /* SWIG APIs for compatibility of both Python 2 & 3 */
797 
798 #if PY_VERSION_HEX >= 0x03000000
799 # define SWIG_Python_str_FromFormat PyUnicode_FromFormat
800 #else
801 # define SWIG_Python_str_FromFormat PyString_FromFormat
802 #endif
803 
804 
805 /* Warning: This function will allocate a new string in Python 3,
806  * so please call SWIG_Python_str_DelForPy3(x) to free the space.
807  */
808 SWIGINTERN char*
810 {
811 #if PY_VERSION_HEX >= 0x03030000
812  return (char *)PyUnicode_AsUTF8(str);
813 #elif PY_VERSION_HEX >= 0x03000000
814  char *newstr = 0;
815  str = PyUnicode_AsUTF8String(str);
816  if (str) {
817  char *cstr;
818  Py_ssize_t len;
819  if (PyBytes_AsStringAndSize(str, &cstr, &len) != -1) {
820  newstr = (char *) malloc(len+1);
821  if (newstr)
822  memcpy(newstr, cstr, len+1);
823  }
824  Py_XDECREF(str);
825  }
826  return newstr;
827 #else
828  return PyString_AsString(str);
829 #endif
830 }
831 
832 #if PY_VERSION_HEX >= 0x03030000 || PY_VERSION_HEX < 0x03000000
833 # define SWIG_Python_str_DelForPy3(x)
834 #else
835 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
836 #endif
837 
838 
839 SWIGINTERN PyObject*
841 {
842 #if PY_VERSION_HEX >= 0x03000000
843  return PyUnicode_FromString(c);
844 #else
845  return PyString_FromString(c);
846 #endif
847 }
848 
849 #ifndef PyObject_DEL
850 # define PyObject_DEL PyObject_Del
851 #endif
852 
853 // SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user
854 // interface files check for it.
855 # define SWIGPY_USE_CAPSULE
856 # define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
857 
858 #if PY_VERSION_HEX < 0x03020000
859 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
860 #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
861 #define Py_hash_t long
862 #endif
863 
864 /* -----------------------------------------------------------------------------
865  * error manipulation
866  * ----------------------------------------------------------------------------- */
867 
868 SWIGRUNTIME PyObject*
870  PyObject* type = 0;
871  switch(code) {
872  case SWIG_MemoryError:
873  type = PyExc_MemoryError;
874  break;
875  case SWIG_IOError:
876  type = PyExc_IOError;
877  break;
878  case SWIG_RuntimeError:
879  type = PyExc_RuntimeError;
880  break;
881  case SWIG_IndexError:
882  type = PyExc_IndexError;
883  break;
884  case SWIG_TypeError:
885  type = PyExc_TypeError;
886  break;
887  case SWIG_DivisionByZero:
888  type = PyExc_ZeroDivisionError;
889  break;
890  case SWIG_OverflowError:
891  type = PyExc_OverflowError;
892  break;
893  case SWIG_SyntaxError:
894  type = PyExc_SyntaxError;
895  break;
896  case SWIG_ValueError:
897  type = PyExc_ValueError;
898  break;
899  case SWIG_SystemError:
900  type = PyExc_SystemError;
901  break;
902  case SWIG_AttributeError:
903  type = PyExc_AttributeError;
904  break;
905  default:
906  type = PyExc_RuntimeError;
907  }
908  return type;
909 }
910 
911 
912 SWIGRUNTIME void
913 SWIG_Python_AddErrorMsg(const char* mesg)
914 {
915  PyObject *type = 0;
916  PyObject *value = 0;
917  PyObject *traceback = 0;
918 
919  if (PyErr_Occurred())
920  PyErr_Fetch(&type, &value, &traceback);
921  if (value) {
922  PyObject *old_str = PyObject_Str(value);
923  const char *tmp = SWIG_Python_str_AsChar(old_str);
924  PyErr_Clear();
925  Py_XINCREF(type);
926  if (tmp)
927  PyErr_Format(type, "%s %s", tmp, mesg);
928  else
929  PyErr_Format(type, "%s", mesg);
931  Py_DECREF(old_str);
932  Py_DECREF(value);
933  } else {
934  PyErr_SetString(PyExc_RuntimeError, mesg);
935  }
936 }
937 
938 SWIGRUNTIME int
940 {
941  PyObject *error;
942  if (obj)
943  return 0;
944  error = PyErr_Occurred();
945  return error && PyErr_GivenExceptionMatches(error, PyExc_TypeError);
946 }
947 
948 SWIGRUNTIME void
950 {
951  if (SWIG_Python_TypeErrorOccurred(NULL)) {
952  /* Use existing TypeError to preserve stacktrace and enhance with given message */
953  PyObject *newvalue;
954  PyObject *type = NULL, *value = NULL, *traceback = NULL;
955  PyErr_Fetch(&type, &value, &traceback);
956 #if PY_VERSION_HEX >= 0x03000000
957  newvalue = PyUnicode_FromFormat("%S\nAdditional information:\n%s", value, message);
958 #else
959  newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message);
960 #endif
961  Py_XDECREF(value);
962  PyErr_Restore(type, newvalue, traceback);
963  } else {
964  /* Raise TypeError using given message */
965  PyErr_SetString(PyExc_TypeError, message);
966  }
967 }
968 
969 #if defined(SWIG_PYTHON_NO_THREADS)
970 # if defined(SWIG_PYTHON_THREADS)
971 # undef SWIG_PYTHON_THREADS
972 # endif
973 #endif
974 #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
975 # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
976 # define SWIG_PYTHON_USE_GIL
977 # endif
978 # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
979 # ifndef SWIG_PYTHON_INITIALIZE_THREADS
980 # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
981 # endif
982 # ifdef __cplusplus /* C++ code */
983  class SWIG_Python_Thread_Block {
984  bool status;
985  PyGILState_STATE state;
986  public:
987  void end() { if (status) { PyGILState_Release(state); status = false;} }
988  SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
989  ~SWIG_Python_Thread_Block() { end(); }
990  };
991  class SWIG_Python_Thread_Allow {
992  bool status;
993  PyThreadState *save;
994  public:
995  void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
996  SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
997  ~SWIG_Python_Thread_Allow() { end(); }
998  };
999 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
1000 # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
1001 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
1002 # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
1003 # else /* C code */
1004 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
1005 # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
1006 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
1007 # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
1008 # endif
1009 # else /* Old thread way, not implemented, user must provide it */
1010 # if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
1011 # define SWIG_PYTHON_INITIALIZE_THREADS
1012 # endif
1013 # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
1014 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1015 # endif
1016 # if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
1017 # define SWIG_PYTHON_THREAD_END_BLOCK
1018 # endif
1019 # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
1020 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1021 # endif
1022 # if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
1023 # define SWIG_PYTHON_THREAD_END_ALLOW
1024 # endif
1025 # endif
1026 #else /* No thread support */
1027 # define SWIG_PYTHON_INITIALIZE_THREADS
1028 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1029 # define SWIG_PYTHON_THREAD_END_BLOCK
1030 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1031 # define SWIG_PYTHON_THREAD_END_ALLOW
1032 #endif
1033 
1034 /* -----------------------------------------------------------------------------
1035  * Python API portion that goes into the runtime
1036  * ----------------------------------------------------------------------------- */
1037 
1038 #ifdef __cplusplus
1039 extern "C" {
1040 #endif
1041 
1042 /* -----------------------------------------------------------------------------
1043  * Constant declarations
1044  * ----------------------------------------------------------------------------- */
1045 
1046 /* Constant Types */
1047 #define SWIG_PY_POINTER 4
1048 #define SWIG_PY_BINARY 5
1049 
1050 /* Constant information structure */
1051 typedef struct swig_const_info {
1052  int type;
1053  const char *name;
1054  long lvalue;
1055  double dvalue;
1056  void *pvalue;
1059 
1060 #ifdef __cplusplus
1061 }
1062 #endif
1063 
1064 
1065 /* -----------------------------------------------------------------------------
1066  * pyrun.swg
1067  *
1068  * This file contains the runtime support for Python modules
1069  * and includes code for managing global variables and pointer
1070  * type checking.
1071  *
1072  * ----------------------------------------------------------------------------- */
1073 
1074 #if PY_VERSION_HEX < 0x02070000 /* 2.7.0 */
1075 # error "This version of SWIG only supports Python >= 2.7"
1076 #endif
1077 
1078 #if PY_VERSION_HEX >= 0x03000000 && PY_VERSION_HEX < 0x03020000
1079 # error "This version of SWIG only supports Python 3 >= 3.2"
1080 #endif
1081 
1082 /* Common SWIG API */
1083 
1084 /* for raw pointers */
1085 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1086 #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
1087 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1088 
1089 #ifdef SWIGPYTHON_BUILTIN
1090 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
1091 #else
1092 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1093 #endif
1094 
1095 #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1096 
1097 #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
1098 #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
1099 #define swig_owntype int
1100 
1101 /* for raw packed data */
1102 #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1103 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1104 
1105 /* for class or struct pointers */
1106 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1107 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1108 
1109 /* for C or C++ function pointers */
1110 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1111 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
1112 
1113 /* for C++ member pointers, ie, member methods */
1114 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1115 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1116 
1117 
1118 /* Runtime API */
1119 
1120 #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
1121 #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
1122 #define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
1123 
1124 #define SWIG_SetErrorObj SWIG_Python_SetErrorObj
1125 #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
1126 #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
1127 #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1128 #define SWIG_fail goto fail
1129 
1130 
1131 /* Runtime API implementation */
1132 
1133 /* Error manipulation */
1134 
1135 SWIGINTERN void
1136 SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1138  PyErr_SetObject(errtype, obj);
1139  Py_DECREF(obj);
1141 }
1142 
1143 SWIGINTERN void
1144 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
1146  PyErr_SetString(errtype, msg);
1148 }
1149 
1150 #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1151 
1152 /* Set a constant value */
1153 
1154 #if defined(SWIGPYTHON_BUILTIN)
1155 
1156 SWIGINTERN void
1157 SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
1158  PyObject *s = PyString_InternFromString(key);
1159  PyList_Append(seq, s);
1160  Py_DECREF(s);
1161 }
1162 
1163 SWIGINTERN void
1164 SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
1165  PyDict_SetItemString(d, name, obj);
1166  Py_DECREF(obj);
1167  if (public_interface)
1168  SwigPyBuiltin_AddPublicSymbol(public_interface, name);
1169 }
1170 
1171 #else
1172 
1173 SWIGINTERN void
1174 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
1175  PyDict_SetItemString(d, name, obj);
1176  Py_DECREF(obj);
1177 }
1178 
1179 #endif
1180 
1181 /* Append a value to the result obj */
1182 
1183 SWIGINTERN PyObject*
1184 SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1185  if (!result) {
1186  result = obj;
1187  } else if (result == Py_None) {
1188  Py_DECREF(result);
1189  result = obj;
1190  } else {
1191  if (!PyList_Check(result)) {
1192  PyObject *o2 = result;
1193  result = PyList_New(1);
1194  PyList_SetItem(result, 0, o2);
1195  }
1196  PyList_Append(result,obj);
1197  Py_DECREF(obj);
1198  }
1199  return result;
1200 }
1201 
1202 /* Unpack the argument tuple */
1203 
1204 SWIGINTERN Py_ssize_t
1205 SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1206 {
1207  if (!args) {
1208  if (!min && !max) {
1209  return 1;
1210  } else {
1211  PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
1212  name, (min == max ? "" : "at least "), (int)min);
1213  return 0;
1214  }
1215  }
1216  if (!PyTuple_Check(args)) {
1217  if (min <= 1 && max >= 1) {
1218  Py_ssize_t i;
1219  objs[0] = args;
1220  for (i = 1; i < max; ++i) {
1221  objs[i] = 0;
1222  }
1223  return 2;
1224  }
1225  PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
1226  return 0;
1227  } else {
1228  Py_ssize_t l = PyTuple_GET_SIZE(args);
1229  if (l < min) {
1230  PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1231  name, (min == max ? "" : "at least "), (int)min, (int)l);
1232  return 0;
1233  } else if (l > max) {
1234  PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1235  name, (min == max ? "" : "at most "), (int)max, (int)l);
1236  return 0;
1237  } else {
1238  Py_ssize_t i;
1239  for (i = 0; i < l; ++i) {
1240  objs[i] = PyTuple_GET_ITEM(args, i);
1241  }
1242  for (; l < max; ++l) {
1243  objs[l] = 0;
1244  }
1245  return i + 1;
1246  }
1247  }
1248 }
1249 
1250 SWIGINTERN int
1251 SWIG_Python_CheckNoKeywords(PyObject *kwargs, const char *name) {
1252  int no_kwargs = 1;
1253  if (kwargs) {
1254  assert(PyDict_Check(kwargs));
1255  if (PyDict_Size(kwargs) > 0) {
1256  PyErr_Format(PyExc_TypeError, "%s() does not take keyword arguments", name);
1257  no_kwargs = 0;
1258  }
1259  }
1260  return no_kwargs;
1261 }
1262 
1263 /* A functor is a function object with one single object argument */
1264 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
1265 
1266 /*
1267  Helper for static pointer initialization for both C and C++ code, for example
1268  static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
1269 */
1270 #ifdef __cplusplus
1271 #define SWIG_STATIC_POINTER(var) var
1272 #else
1273 #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
1274 #endif
1275 
1276 /* -----------------------------------------------------------------------------
1277  * Pointer declarations
1278  * ----------------------------------------------------------------------------- */
1279 
1280 /* Flags for new pointer objects */
1281 #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
1282 #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1283 
1284 #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
1285 
1286 #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
1287 #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
1288 
1289 #ifdef __cplusplus
1290 extern "C" {
1291 #endif
1292 
1293 /* The python void return value */
1294 
1295 SWIGRUNTIMEINLINE PyObject *
1297 {
1298  PyObject *none = Py_None;
1299  Py_INCREF(none);
1300  return none;
1301 }
1302 
1303 /* SwigPyClientData */
1304 
1305 typedef struct {
1306  PyObject *klass;
1307  PyObject *newraw;
1308  PyObject *newargs;
1309  PyObject *destroy;
1310  int delargs;
1311  int implicitconv;
1312  PyTypeObject *pytype;
1314 
1315 SWIGRUNTIMEINLINE int
1317 {
1319  int fail = data ? data->implicitconv : 0;
1320  if (fail)
1321  PyErr_SetString(PyExc_TypeError, "Implicit conversion is prohibited for explicit constructors.");
1322  return fail;
1323 }
1324 
1325 SWIGRUNTIMEINLINE PyObject *
1327  SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
1328  PyObject *klass = data ? data->klass : 0;
1329  return (klass ? klass : PyExc_RuntimeError);
1330 }
1331 
1332 
1334 SwigPyClientData_New(PyObject* obj)
1335 {
1336  if (!obj) {
1337  return 0;
1338  } else {
1340  /* the klass element */
1341  data->klass = obj;
1342  Py_INCREF(data->klass);
1343  /* the newraw method and newargs arguments used to create a new raw instance */
1344  if (PyClass_Check(obj)) {
1345  data->newraw = 0;
1346  data->newargs = obj;
1347  Py_INCREF(obj);
1348  } else {
1349  data->newraw = PyObject_GetAttrString(data->klass, "__new__");
1350  if (data->newraw) {
1351  Py_INCREF(data->newraw);
1352  data->newargs = PyTuple_New(1);
1353  PyTuple_SetItem(data->newargs, 0, obj);
1354  } else {
1355  data->newargs = obj;
1356  }
1357  Py_INCREF(data->newargs);
1358  }
1359  /* the destroy method, aka as the C++ delete method */
1360  data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
1361  if (PyErr_Occurred()) {
1362  PyErr_Clear();
1363  data->destroy = 0;
1364  }
1365  if (data->destroy) {
1366  int flags;
1367  Py_INCREF(data->destroy);
1368  flags = PyCFunction_GET_FLAGS(data->destroy);
1369  data->delargs = !(flags & (METH_O));
1370  } else {
1371  data->delargs = 0;
1372  }
1373  data->implicitconv = 0;
1374  data->pytype = 0;
1375  return data;
1376  }
1377 }
1378 
1379 SWIGRUNTIME void
1381  Py_XDECREF(data->newraw);
1382  Py_XDECREF(data->newargs);
1383  Py_XDECREF(data->destroy);
1384 }
1385 
1386 /* =============== SwigPyObject =====================*/
1387 
1388 typedef struct {
1389  PyObject_HEAD
1390  void *ptr;
1391  swig_type_info *ty;
1392  int own;
1393  PyObject *next;
1394 #ifdef SWIGPYTHON_BUILTIN
1395  PyObject *dict;
1396 #endif
1397 } SwigPyObject;
1398 
1399 
1400 #ifdef SWIGPYTHON_BUILTIN
1401 
1402 SWIGRUNTIME PyObject *
1403 SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
1404 {
1405  SwigPyObject *sobj = (SwigPyObject *)v;
1406 
1407  if (!sobj->dict)
1408  sobj->dict = PyDict_New();
1409 
1410  Py_INCREF(sobj->dict);
1411  return sobj->dict;
1412 }
1413 
1414 #endif
1415 
1416 SWIGRUNTIME PyObject *
1418 {
1419  return PyLong_FromVoidPtr(v->ptr);
1420 }
1421 
1422 SWIGRUNTIME PyObject *
1423 SwigPyObject_format(const char* fmt, SwigPyObject *v)
1424 {
1425  PyObject *res = NULL;
1426  PyObject *args = PyTuple_New(1);
1427  if (args) {
1428  if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
1429  PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
1430  if (ofmt) {
1431 #if PY_VERSION_HEX >= 0x03000000
1432  res = PyUnicode_Format(ofmt,args);
1433 #else
1434  res = PyString_Format(ofmt,args);
1435 #endif
1436  Py_DECREF(ofmt);
1437  }
1438  Py_DECREF(args);
1439  }
1440  }
1441  return res;
1442 }
1443 
1444 SWIGRUNTIME PyObject *
1446 {
1447  return SwigPyObject_format("%o",v);
1448 }
1449 
1450 SWIGRUNTIME PyObject *
1452 {
1453  return SwigPyObject_format("%x",v);
1454 }
1455 
1456 SWIGRUNTIME PyObject *
1458 {
1459  const char *name = SWIG_TypePrettyName(v->ty);
1460  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
1461  if (v->next) {
1462  PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
1463 # if PY_VERSION_HEX >= 0x03000000
1464  PyObject *joined = PyUnicode_Concat(repr, nrep);
1465  Py_DecRef(repr);
1466  Py_DecRef(nrep);
1467  repr = joined;
1468 # else
1469  PyString_ConcatAndDel(&repr,nrep);
1470 # endif
1471  }
1472  return repr;
1473 }
1474 
1475 /* We need a version taking two PyObject* parameters so it's a valid
1476  * PyCFunction to use in swigobject_methods[]. */
1477 SWIGRUNTIME PyObject *
1478 SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
1479 {
1480  return SwigPyObject_repr((SwigPyObject*)v);
1481 }
1482 
1483 SWIGRUNTIME int
1485 {
1486  void *i = v->ptr;
1487  void *j = w->ptr;
1488  return (i < j) ? -1 : ((i > j) ? 1 : 0);
1489 }
1490 
1491 /* Added for Python 3.x, would it also be useful for Python 2.x? */
1492 SWIGRUNTIME PyObject*
1494 {
1495  PyObject* res;
1496  if( op != Py_EQ && op != Py_NE ) {
1497  Py_INCREF(Py_NotImplemented);
1498  return Py_NotImplemented;
1499  }
1500  res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
1501  return res;
1502 }
1503 
1504 
1505 SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
1506 
1507 #ifdef SWIGPYTHON_BUILTIN
1508 static swig_type_info *SwigPyObject_stype = 0;
1509 SWIGRUNTIME PyTypeObject*
1510 SwigPyObject_type(void) {
1511  SwigPyClientData *cd;
1512  assert(SwigPyObject_stype);
1513  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
1514  assert(cd);
1515  assert(cd->pytype);
1516  return cd->pytype;
1517 }
1518 #else
1519 SWIGRUNTIME PyTypeObject*
1521  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
1522  return type;
1523 }
1524 #endif
1525 
1527 SwigPyObject_Check(PyObject *op) {
1528 #ifdef SWIGPYTHON_BUILTIN
1529  PyTypeObject *target_tp = SwigPyObject_type();
1530  if (PyType_IsSubtype(op->ob_type, target_tp))
1531  return 1;
1532  return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
1533 #else
1534  return (Py_TYPE(op) == SwigPyObject_type())
1535  || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
1536 #endif
1537 }
1538 
1539 SWIGRUNTIME PyObject *
1540 SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
1541 
1542 SWIGRUNTIME void
1544 {
1545  SwigPyObject *sobj = (SwigPyObject *) v;
1546  PyObject *next = sobj->next;
1547  if (sobj->own == SWIG_POINTER_OWN) {
1548  swig_type_info *ty = sobj->ty;
1549  SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
1550  PyObject *destroy = data ? data->destroy : 0;
1551  if (destroy) {
1552  /* destroy is always a VARARGS method */
1553  PyObject *res;
1554 
1555  /* PyObject_CallFunction() has the potential to silently drop
1556  the active exception. In cases of unnamed temporary
1557  variable or where we just finished iterating over a generator
1558  StopIteration will be active right now, and this needs to
1559  remain true upon return from SwigPyObject_dealloc. So save
1560  and restore. */
1561 
1562  PyObject *type = NULL, *value = NULL, *traceback = NULL;
1563  PyErr_Fetch(&type, &value, &traceback);
1564 
1565  if (data->delargs) {
1566  /* we need to create a temporary object to carry the destroy operation */
1567  PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
1568  res = SWIG_Python_CallFunctor(destroy, tmp);
1569  Py_DECREF(tmp);
1570  } else {
1571  PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1572  PyObject *mself = PyCFunction_GET_SELF(destroy);
1573  res = ((*meth)(mself, v));
1574  }
1575  if (!res)
1576  PyErr_WriteUnraisable(destroy);
1577 
1578  PyErr_Restore(type, value, traceback);
1579 
1580  Py_XDECREF(res);
1581  }
1582 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1583  else {
1584  const char *name = SWIG_TypePrettyName(ty);
1585  printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
1586  }
1587 #endif
1588  }
1589  Py_XDECREF(next);
1590  PyObject_DEL(v);
1591 }
1592 
1593 SWIGRUNTIME PyObject*
1594 SwigPyObject_append(PyObject* v, PyObject* next)
1595 {
1596  SwigPyObject *sobj = (SwigPyObject *) v;
1597  if (!SwigPyObject_Check(next)) {
1598  PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
1599  return NULL;
1600  }
1601  sobj->next = next;
1602  Py_INCREF(next);
1603  return SWIG_Py_Void();
1604 }
1605 
1606 SWIGRUNTIME PyObject*
1607 SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1608 {
1609  SwigPyObject *sobj = (SwigPyObject *) v;
1610  if (sobj->next) {
1611  Py_INCREF(sobj->next);
1612  return sobj->next;
1613  } else {
1614  return SWIG_Py_Void();
1615  }
1616 }
1617 
1618 SWIGINTERN PyObject*
1619 SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1620 {
1621  SwigPyObject *sobj = (SwigPyObject *)v;
1622  sobj->own = 0;
1623  return SWIG_Py_Void();
1624 }
1625 
1626 SWIGINTERN PyObject*
1627 SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1628 {
1629  SwigPyObject *sobj = (SwigPyObject *)v;
1630  sobj->own = SWIG_POINTER_OWN;
1631  return SWIG_Py_Void();
1632 }
1633 
1634 SWIGINTERN PyObject*
1635 SwigPyObject_own(PyObject *v, PyObject *args)
1636 {
1637  PyObject *val = 0;
1638  if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) {
1639  return NULL;
1640  } else {
1641  SwigPyObject *sobj = (SwigPyObject *)v;
1642  PyObject *obj = PyBool_FromLong(sobj->own);
1643  if (val) {
1644  if (PyObject_IsTrue(val)) {
1645  SwigPyObject_acquire(v,args);
1646  } else {
1647  SwigPyObject_disown(v,args);
1648  }
1649  }
1650  return obj;
1651  }
1652 }
1653 
1654 static PyMethodDef
1656  {"disown", SwigPyObject_disown, METH_NOARGS, "releases ownership of the pointer"},
1657  {"acquire", SwigPyObject_acquire, METH_NOARGS, "acquires ownership of the pointer"},
1658  {"own", SwigPyObject_own, METH_VARARGS, "returns/sets ownership of the pointer"},
1659  {"append", SwigPyObject_append, METH_O, "appends another 'this' object"},
1660  {"next", SwigPyObject_next, METH_NOARGS, "returns the next 'this' object"},
1661  {"__repr__",SwigPyObject_repr2, METH_NOARGS, "returns object representation"},
1662  {0, 0, 0, 0}
1663 };
1664 
1665 SWIGRUNTIME PyTypeObject*
1667  static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1668 
1669  static PyNumberMethods SwigPyObject_as_number = {
1670  (binaryfunc)0, /*nb_add*/
1671  (binaryfunc)0, /*nb_subtract*/
1672  (binaryfunc)0, /*nb_multiply*/
1673  /* nb_divide removed in Python 3 */
1674 #if PY_VERSION_HEX < 0x03000000
1675  (binaryfunc)0, /*nb_divide*/
1676 #endif
1677  (binaryfunc)0, /*nb_remainder*/
1678  (binaryfunc)0, /*nb_divmod*/
1679  (ternaryfunc)0,/*nb_power*/
1680  (unaryfunc)0, /*nb_negative*/
1681  (unaryfunc)0, /*nb_positive*/
1682  (unaryfunc)0, /*nb_absolute*/
1683  (inquiry)0, /*nb_nonzero*/
1684  0, /*nb_invert*/
1685  0, /*nb_lshift*/
1686  0, /*nb_rshift*/
1687  0, /*nb_and*/
1688  0, /*nb_xor*/
1689  0, /*nb_or*/
1690 #if PY_VERSION_HEX < 0x03000000
1691  0, /*nb_coerce*/
1692 #endif
1693  (unaryfunc)SwigPyObject_long, /*nb_int*/
1694 #if PY_VERSION_HEX < 0x03000000
1695  (unaryfunc)SwigPyObject_long, /*nb_long*/
1696 #else
1697  0, /*nb_reserved*/
1698 #endif
1699  (unaryfunc)0, /*nb_float*/
1700 #if PY_VERSION_HEX < 0x03000000
1701  (unaryfunc)SwigPyObject_oct, /*nb_oct*/
1702  (unaryfunc)SwigPyObject_hex, /*nb_hex*/
1703 #endif
1704 #if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
1705  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
1706 #elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
1707  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
1708 #else
1709  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
1710 #endif
1711  };
1712 
1713  static PyTypeObject swigpyobject_type;
1714  static int type_init = 0;
1715  if (!type_init) {
1716  const PyTypeObject tmp = {
1717 #if PY_VERSION_HEX >= 0x03000000
1718  PyVarObject_HEAD_INIT(NULL, 0)
1719 #else
1720  PyObject_HEAD_INIT(NULL)
1721  0, /* ob_size */
1722 #endif
1723  "SwigPyObject", /* tp_name */
1724  sizeof(SwigPyObject), /* tp_basicsize */
1725  0, /* tp_itemsize */
1726  (destructor)SwigPyObject_dealloc, /* tp_dealloc */
1727  0, /* tp_print */
1728  (getattrfunc)0, /* tp_getattr */
1729  (setattrfunc)0, /* tp_setattr */
1730 #if PY_VERSION_HEX >= 0x03000000
1731  0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
1732 #else
1733  (cmpfunc)SwigPyObject_compare, /* tp_compare */
1734 #endif
1735  (reprfunc)SwigPyObject_repr, /* tp_repr */
1736  &SwigPyObject_as_number, /* tp_as_number */
1737  0, /* tp_as_sequence */
1738  0, /* tp_as_mapping */
1739  (hashfunc)0, /* tp_hash */
1740  (ternaryfunc)0, /* tp_call */
1741  0, /* tp_str */
1742  PyObject_GenericGetAttr, /* tp_getattro */
1743  0, /* tp_setattro */
1744  0, /* tp_as_buffer */
1745  Py_TPFLAGS_DEFAULT, /* tp_flags */
1746  swigobject_doc, /* tp_doc */
1747  0, /* tp_traverse */
1748  0, /* tp_clear */
1749  (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
1750  0, /* tp_weaklistoffset */
1751  0, /* tp_iter */
1752  0, /* tp_iternext */
1753  swigobject_methods, /* tp_methods */
1754  0, /* tp_members */
1755  0, /* tp_getset */
1756  0, /* tp_base */
1757  0, /* tp_dict */
1758  0, /* tp_descr_get */
1759  0, /* tp_descr_set */
1760  0, /* tp_dictoffset */
1761  0, /* tp_init */
1762  0, /* tp_alloc */
1763  0, /* tp_new */
1764  0, /* tp_free */
1765  0, /* tp_is_gc */
1766  0, /* tp_bases */
1767  0, /* tp_mro */
1768  0, /* tp_cache */
1769  0, /* tp_subclasses */
1770  0, /* tp_weaklist */
1771  0, /* tp_del */
1772  0, /* tp_version_tag */
1773 #if PY_VERSION_HEX >= 0x03040000
1774  0, /* tp_finalize */
1775 #endif
1776 #if PY_VERSION_HEX >= 0x03080000
1777  0, /* tp_vectorcall */
1778 #endif
1779 #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
1780  0, /* tp_print */
1781 #endif
1782 #ifdef COUNT_ALLOCS
1783  0, /* tp_allocs */
1784  0, /* tp_frees */
1785  0, /* tp_maxalloc */
1786  0, /* tp_prev */
1787  0 /* tp_next */
1788 #endif
1789  };
1790  swigpyobject_type = tmp;
1791  type_init = 1;
1792  if (PyType_Ready(&swigpyobject_type) < 0)
1793  return NULL;
1794  }
1795  return &swigpyobject_type;
1796 }
1797 
1798 SWIGRUNTIME PyObject *
1799 SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
1800 {
1801  SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
1802  if (sobj) {
1803  sobj->ptr = ptr;
1804  sobj->ty = ty;
1805  sobj->own = own;
1806  sobj->next = 0;
1807  }
1808  return (PyObject *)sobj;
1809 }
1810 
1811 /* -----------------------------------------------------------------------------
1812  * Implements a simple Swig Packed type, and use it instead of string
1813  * ----------------------------------------------------------------------------- */
1814 
1815 typedef struct {
1816  PyObject_HEAD
1817  void *pack;
1818  swig_type_info *ty;
1819  size_t size;
1820 } SwigPyPacked;
1821 
1822 SWIGRUNTIME PyObject *
1824 {
1825  char result[SWIG_BUFFER_SIZE];
1826  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
1827  return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
1828  } else {
1829  return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
1830  }
1831 }
1832 
1833 SWIGRUNTIME PyObject *
1835 {
1836  char result[SWIG_BUFFER_SIZE];
1837  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
1838  return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
1839  } else {
1840  return SWIG_Python_str_FromChar(v->ty->name);
1841  }
1842 }
1843 
1844 SWIGRUNTIME int
1846 {
1847  size_t i = v->size;
1848  size_t j = w->size;
1849  int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
1850  return s ? s : strncmp((const char *)v->pack, (const char *)w->pack, 2*v->size);
1851 }
1852 
1853 SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
1854 
1855 SWIGRUNTIME PyTypeObject*
1857  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
1858  return type;
1859 }
1860 
1862 SwigPyPacked_Check(PyObject *op) {
1863  return ((op)->ob_type == SwigPyPacked_TypeOnce())
1864  || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
1865 }
1866 
1867 SWIGRUNTIME void
1869 {
1870  if (SwigPyPacked_Check(v)) {
1871  SwigPyPacked *sobj = (SwigPyPacked *) v;
1872  free(sobj->pack);
1873  }
1874  PyObject_DEL(v);
1875 }
1876 
1877 SWIGRUNTIME PyTypeObject*
1879  static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
1880  static PyTypeObject swigpypacked_type;
1881  static int type_init = 0;
1882  if (!type_init) {
1883  const PyTypeObject tmp = {
1884 #if PY_VERSION_HEX>=0x03000000
1885  PyVarObject_HEAD_INIT(NULL, 0)
1886 #else
1887  PyObject_HEAD_INIT(NULL)
1888  0, /* ob_size */
1889 #endif
1890  "SwigPyPacked", /* tp_name */
1891  sizeof(SwigPyPacked), /* tp_basicsize */
1892  0, /* tp_itemsize */
1893  (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
1894  0, /* tp_print */
1895  (getattrfunc)0, /* tp_getattr */
1896  (setattrfunc)0, /* tp_setattr */
1897 #if PY_VERSION_HEX>=0x03000000
1898  0, /* tp_reserved in 3.0.1 */
1899 #else
1900  (cmpfunc)SwigPyPacked_compare, /* tp_compare */
1901 #endif
1902  (reprfunc)SwigPyPacked_repr, /* tp_repr */
1903  0, /* tp_as_number */
1904  0, /* tp_as_sequence */
1905  0, /* tp_as_mapping */
1906  (hashfunc)0, /* tp_hash */
1907  (ternaryfunc)0, /* tp_call */
1908  (reprfunc)SwigPyPacked_str, /* tp_str */
1909  PyObject_GenericGetAttr, /* tp_getattro */
1910  0, /* tp_setattro */
1911  0, /* tp_as_buffer */
1912  Py_TPFLAGS_DEFAULT, /* tp_flags */
1913  swigpacked_doc, /* tp_doc */
1914  0, /* tp_traverse */
1915  0, /* tp_clear */
1916  0, /* tp_richcompare */
1917  0, /* tp_weaklistoffset */
1918  0, /* tp_iter */
1919  0, /* tp_iternext */
1920  0, /* tp_methods */
1921  0, /* tp_members */
1922  0, /* tp_getset */
1923  0, /* tp_base */
1924  0, /* tp_dict */
1925  0, /* tp_descr_get */
1926  0, /* tp_descr_set */
1927  0, /* tp_dictoffset */
1928  0, /* tp_init */
1929  0, /* tp_alloc */
1930  0, /* tp_new */
1931  0, /* tp_free */
1932  0, /* tp_is_gc */
1933  0, /* tp_bases */
1934  0, /* tp_mro */
1935  0, /* tp_cache */
1936  0, /* tp_subclasses */
1937  0, /* tp_weaklist */
1938  0, /* tp_del */
1939  0, /* tp_version_tag */
1940 #if PY_VERSION_HEX >= 0x03040000
1941  0, /* tp_finalize */
1942 #endif
1943 #if PY_VERSION_HEX >= 0x03080000
1944  0, /* tp_vectorcall */
1945 #endif
1946 #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
1947  0, /* tp_print */
1948 #endif
1949 #ifdef COUNT_ALLOCS
1950  0, /* tp_allocs */
1951  0, /* tp_frees */
1952  0, /* tp_maxalloc */
1953  0, /* tp_prev */
1954  0 /* tp_next */
1955 #endif
1956  };
1957  swigpypacked_type = tmp;
1958  type_init = 1;
1959  if (PyType_Ready(&swigpypacked_type) < 0)
1960  return NULL;
1961  }
1962  return &swigpypacked_type;
1963 }
1964 
1965 SWIGRUNTIME PyObject *
1966 SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
1967 {
1968  SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
1969  if (sobj) {
1970  void *pack = malloc(size);
1971  if (pack) {
1972  memcpy(pack, ptr, size);
1973  sobj->pack = pack;
1974  sobj->ty = ty;
1975  sobj->size = size;
1976  } else {
1977  PyObject_DEL((PyObject *) sobj);
1978  sobj = 0;
1979  }
1980  }
1981  return (PyObject *) sobj;
1982 }
1983 
1985 SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
1986 {
1987  if (SwigPyPacked_Check(obj)) {
1988  SwigPyPacked *sobj = (SwigPyPacked *)obj;
1989  if (sobj->size != size) return 0;
1990  memcpy(ptr, sobj->pack, size);
1991  return sobj->ty;
1992  } else {
1993  return 0;
1994  }
1995 }
1996 
1997 /* -----------------------------------------------------------------------------
1998  * pointers/data manipulation
1999  * ----------------------------------------------------------------------------- */
2000 
2001 static PyObject *Swig_This_global = NULL;
2002 
2003 SWIGRUNTIME PyObject *
2005 {
2006  if (Swig_This_global == NULL)
2008  return Swig_This_global;
2009 }
2010 
2011 /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
2012 
2013 /* TODO: I don't know how to implement the fast getset in Python 3 right now */
2014 #if PY_VERSION_HEX>=0x03000000
2015 #define SWIG_PYTHON_SLOW_GETSET_THIS
2016 #endif
2017 
2019 SWIG_Python_GetSwigThis(PyObject *pyobj)
2020 {
2021  PyObject *obj;
2022 
2023  if (SwigPyObject_Check(pyobj))
2024  return (SwigPyObject *) pyobj;
2025 
2026 #ifdef SWIGPYTHON_BUILTIN
2027  (void)obj;
2028 # ifdef PyWeakref_CheckProxy
2029  if (PyWeakref_CheckProxy(pyobj)) {
2030  pyobj = PyWeakref_GET_OBJECT(pyobj);
2031  if (pyobj && SwigPyObject_Check(pyobj))
2032  return (SwigPyObject*) pyobj;
2033  }
2034 # endif
2035  return NULL;
2036 #else
2037 
2038  obj = 0;
2039 
2040 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2041  if (PyInstance_Check(pyobj)) {
2042  obj = _PyInstance_Lookup(pyobj, SWIG_This());
2043  } else {
2044  PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
2045  if (dictptr != NULL) {
2046  PyObject *dict = *dictptr;
2047  obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
2048  } else {
2049 #ifdef PyWeakref_CheckProxy
2050  if (PyWeakref_CheckProxy(pyobj)) {
2051  PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
2052  return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
2053  }
2054 #endif
2055  obj = PyObject_GetAttr(pyobj,SWIG_This());
2056  if (obj) {
2057  Py_DECREF(obj);
2058  } else {
2059  if (PyErr_Occurred()) PyErr_Clear();
2060  return 0;
2061  }
2062  }
2063  }
2064 #else
2065  obj = PyObject_GetAttr(pyobj,SWIG_This());
2066  if (obj) {
2067  Py_DECREF(obj);
2068  } else {
2069  if (PyErr_Occurred()) PyErr_Clear();
2070  return 0;
2071  }
2072 #endif
2073  if (obj && !SwigPyObject_Check(obj)) {
2074  /* a PyObject is called 'this', try to get the 'real this'
2075  SwigPyObject from it */
2076  return SWIG_Python_GetSwigThis(obj);
2077  }
2078  return (SwigPyObject *)obj;
2079 #endif
2080 }
2081 
2082 /* Acquire a pointer value */
2083 
2084 SWIGRUNTIME int
2085 SWIG_Python_AcquirePtr(PyObject *obj, int own) {
2086  if (own == SWIG_POINTER_OWN) {
2088  if (sobj) {
2089  int oldown = sobj->own;
2090  sobj->own = own;
2091  return oldown;
2092  }
2093  }
2094  return 0;
2095 }
2096 
2097 /* Convert a pointer value */
2098 
2099 SWIGRUNTIME int
2100 SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
2101  int res;
2102  SwigPyObject *sobj;
2103  int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
2104 
2105  if (!obj)
2106  return SWIG_ERROR;
2107  if (obj == Py_None && !implicit_conv) {
2108  if (ptr)
2109  *ptr = 0;
2111  }
2112 
2113  res = SWIG_ERROR;
2114 
2115  sobj = SWIG_Python_GetSwigThis(obj);
2116  if (own)
2117  *own = 0;
2118  while (sobj) {
2119  void *vptr = sobj->ptr;
2120  if (ty) {
2121  swig_type_info *to = sobj->ty;
2122  if (to == ty) {
2123  /* no type cast needed */
2124  if (ptr) *ptr = vptr;
2125  break;
2126  } else {
2127  swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2128  if (!tc) {
2129  sobj = (SwigPyObject *)sobj->next;
2130  } else {
2131  if (ptr) {
2132  int newmemory = 0;
2133  *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2134  if (newmemory == SWIG_CAST_NEW_MEMORY) {
2135  assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
2136  if (own)
2137  *own = *own | SWIG_CAST_NEW_MEMORY;
2138  }
2139  }
2140  break;
2141  }
2142  }
2143  } else {
2144  if (ptr) *ptr = vptr;
2145  break;
2146  }
2147  }
2148  if (sobj) {
2149  if (own)
2150  *own = *own | sobj->own;
2151  if (flags & SWIG_POINTER_DISOWN) {
2152  sobj->own = 0;
2153  }
2154  res = SWIG_OK;
2155  } else {
2156  if (implicit_conv) {
2157  SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
2158  if (data && !data->implicitconv) {
2159  PyObject *klass = data->klass;
2160  if (klass) {
2161  PyObject *impconv;
2162  data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
2163  impconv = SWIG_Python_CallFunctor(klass, obj);
2164  data->implicitconv = 0;
2165  if (PyErr_Occurred()) {
2166  PyErr_Clear();
2167  impconv = 0;
2168  }
2169  if (impconv) {
2170  SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
2171  if (iobj) {
2172  void *vptr;
2173  res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2174  if (SWIG_IsOK(res)) {
2175  if (ptr) {
2176  *ptr = vptr;
2177  /* transfer the ownership to 'ptr' */
2178  iobj->own = 0;
2179  res = SWIG_AddCast(res);
2180  res = SWIG_AddNewMask(res);
2181  } else {
2182  res = SWIG_AddCast(res);
2183  }
2184  }
2185  }
2186  Py_DECREF(impconv);
2187  }
2188  }
2189  }
2190  if (!SWIG_IsOK(res) && obj == Py_None) {
2191  if (ptr)
2192  *ptr = 0;
2193  if (PyErr_Occurred())
2194  PyErr_Clear();
2195  res = SWIG_OK;
2196  }
2197  }
2198  }
2199  return res;
2200 }
2201 
2202 /* Convert a function ptr value */
2203 
2204 SWIGRUNTIME int
2205 SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
2206  if (!PyCFunction_Check(obj)) {
2207  return SWIG_ConvertPtr(obj, ptr, ty, 0);
2208  } else {
2209  void *vptr = 0;
2210  swig_cast_info *tc;
2211 
2212  /* here we get the method pointer for callbacks */
2213  const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2214  const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
2215  if (desc)
2216  desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2217  if (!desc)
2218  return SWIG_ERROR;
2219  tc = SWIG_TypeCheck(desc,ty);
2220  if (tc) {
2221  int newmemory = 0;
2222  *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2223  assert(!newmemory); /* newmemory handling not yet implemented */
2224  } else {
2225  return SWIG_ERROR;
2226  }
2227  return SWIG_OK;
2228  }
2229 }
2230 
2231 /* Convert a packed pointer value */
2232 
2233 SWIGRUNTIME int
2234 SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
2235  swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
2236  if (!to) return SWIG_ERROR;
2237  if (ty) {
2238  if (to != ty) {
2239  /* check type cast? */
2240  swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2241  if (!tc) return SWIG_ERROR;
2242  }
2243  }
2244  return SWIG_OK;
2245 }
2246 
2247 /* -----------------------------------------------------------------------------
2248  * Create a new pointer object
2249  * ----------------------------------------------------------------------------- */
2250 
2251 /*
2252  Create a new instance object, without calling __init__, and set the
2253  'this' attribute.
2254 */
2255 
2256 SWIGRUNTIME PyObject*
2258 {
2259  PyObject *inst = 0;
2260  PyObject *newraw = data->newraw;
2261  if (newraw) {
2262  inst = PyObject_Call(newraw, data->newargs, NULL);
2263  if (inst) {
2264 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2265  PyObject **dictptr = _PyObject_GetDictPtr(inst);
2266  if (dictptr != NULL) {
2267  PyObject *dict = *dictptr;
2268  if (dict == NULL) {
2269  dict = PyDict_New();
2270  *dictptr = dict;
2271  PyDict_SetItem(dict, SWIG_This(), swig_this);
2272  }
2273  }
2274 #else
2275  if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) {
2276  Py_DECREF(inst);
2277  inst = 0;
2278  }
2279 #endif
2280  }
2281  } else {
2282 #if PY_VERSION_HEX >= 0x03000000
2283  PyObject *empty_args = PyTuple_New(0);
2284  if (empty_args) {
2285  PyObject *empty_kwargs = PyDict_New();
2286  if (empty_kwargs) {
2287  inst = ((PyTypeObject *)data->newargs)->tp_new((PyTypeObject *)data->newargs, empty_args, empty_kwargs);
2288  Py_DECREF(empty_kwargs);
2289  if (inst) {
2290  if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) {
2291  Py_DECREF(inst);
2292  inst = 0;
2293  } else {
2294  Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
2295  }
2296  }
2297  }
2298  Py_DECREF(empty_args);
2299  }
2300 #else
2301  PyObject *dict = PyDict_New();
2302  if (dict) {
2303  PyDict_SetItem(dict, SWIG_This(), swig_this);
2304  inst = PyInstance_NewRaw(data->newargs, dict);
2305  Py_DECREF(dict);
2306  }
2307 #endif
2308  }
2309  return inst;
2310 }
2311 
2312 SWIGRUNTIME int
2313 SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2314 {
2315 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2316  PyObject **dictptr = _PyObject_GetDictPtr(inst);
2317  if (dictptr != NULL) {
2318  PyObject *dict = *dictptr;
2319  if (dict == NULL) {
2320  dict = PyDict_New();
2321  *dictptr = dict;
2322  }
2323  return PyDict_SetItem(dict, SWIG_This(), swig_this);
2324  }
2325 #endif
2326  return PyObject_SetAttr(inst, SWIG_This(), swig_this);
2327 }
2328 
2329 
2330 SWIGINTERN PyObject *
2332  PyObject *obj[2];
2333  if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
2334  return NULL;
2335  } else {
2336  SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2337  if (sthis) {
2338  SwigPyObject_append((PyObject*) sthis, obj[1]);
2339  } else {
2340  if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0)
2341  return NULL;
2342  }
2343  return SWIG_Py_Void();
2344  }
2345 }
2346 
2347 /* Create a new pointer object */
2348 
2349 SWIGRUNTIME PyObject *
2350 SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
2351  SwigPyClientData *clientdata;
2352  PyObject * robj;
2353  int own;
2354 
2355  if (!ptr)
2356  return SWIG_Py_Void();
2357 
2358  clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
2359  own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2360  if (clientdata && clientdata->pytype) {
2361  SwigPyObject *newobj;
2362  if (flags & SWIG_BUILTIN_TP_INIT) {
2363  newobj = (SwigPyObject*) self;
2364  if (newobj->ptr) {
2365  PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
2366  while (newobj->next)
2367  newobj = (SwigPyObject *) newobj->next;
2368  newobj->next = next_self;
2369  newobj = (SwigPyObject *)next_self;
2370 #ifdef SWIGPYTHON_BUILTIN
2371  newobj->dict = 0;
2372 #endif
2373  }
2374  } else {
2375  newobj = PyObject_New(SwigPyObject, clientdata->pytype);
2376 #ifdef SWIGPYTHON_BUILTIN
2377  newobj->dict = 0;
2378 #endif
2379  }
2380  if (newobj) {
2381  newobj->ptr = ptr;
2382  newobj->ty = type;
2383  newobj->own = own;
2384  newobj->next = 0;
2385  return (PyObject*) newobj;
2386  }
2387  return SWIG_Py_Void();
2388  }
2389 
2390  assert(!(flags & SWIG_BUILTIN_TP_INIT));
2391 
2392  robj = SwigPyObject_New(ptr, type, own);
2393  if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2394  PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2395  Py_DECREF(robj);
2396  robj = inst;
2397  }
2398  return robj;
2399 }
2400 
2401 /* Create a new packed object */
2402 
2403 SWIGRUNTIMEINLINE PyObject *
2404 SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
2405  return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
2406 }
2407 
2408 /* -----------------------------------------------------------------------------*
2409  * Get type list
2410  * -----------------------------------------------------------------------------*/
2411 
2412 #ifdef SWIG_LINK_RUNTIME
2413 void *SWIG_ReturnGlobalTypeList(void *);
2414 #endif
2415 
2418  static void *type_pointer = (void *)0;
2419  /* first check if module already created */
2420  if (!type_pointer) {
2421 #ifdef SWIG_LINK_RUNTIME
2422  type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
2423 #else
2424  type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
2425  if (PyErr_Occurred()) {
2426  PyErr_Clear();
2427  type_pointer = (void *)0;
2428  }
2429 #endif
2430  }
2431  return (swig_module_info *) type_pointer;
2432 }
2433 
2434 SWIGRUNTIME void
2436 {
2437  swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
2438  swig_type_info **types = swig_module->types;
2439  size_t i;
2440  for (i =0; i < swig_module->size; ++i) {
2441  swig_type_info *ty = types[i];
2442  if (ty->owndata) {
2444  if (data) SwigPyClientData_Del(data);
2445  }
2446  }
2447  Py_DECREF(SWIG_This());
2448  Swig_This_global = NULL;
2449 }
2450 
2451 SWIGRUNTIME void
2453 #if PY_VERSION_HEX >= 0x03000000
2454  /* Add a dummy module object into sys.modules */
2455  PyObject *module = PyImport_AddModule("swig_runtime_data" SWIG_RUNTIME_VERSION);
2456 #else
2457  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
2458  PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
2459 #endif
2460  PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
2461  if (pointer && module) {
2462  PyModule_AddObject(module, "type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
2463  } else {
2464  Py_XDECREF(pointer);
2465  }
2466 }
2467 
2468 /* The python cached type query */
2469 SWIGRUNTIME PyObject *
2471  static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2472  return cache;
2473 }
2474 
2476 SWIG_Python_TypeQuery(const char *type)
2477 {
2478  PyObject *cache = SWIG_Python_TypeCache();
2479  PyObject *key = SWIG_Python_str_FromChar(type);
2480  PyObject *obj = PyDict_GetItem(cache, key);
2481  swig_type_info *descriptor;
2482  if (obj) {
2483  descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
2484  } else {
2486  descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2487  if (descriptor) {
2488  obj = PyCapsule_New((void*) descriptor, NULL, NULL);
2489  PyDict_SetItem(cache, key, obj);
2490  Py_DECREF(obj);
2491  }
2492  }
2493  Py_DECREF(key);
2494  return descriptor;
2495 }
2496 
2497 /*
2498  For backward compatibility only
2499 */
2500 #define SWIG_POINTER_EXCEPTION 0
2501 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
2502 #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
2503 
2504 SWIGRUNTIME int
2505 SWIG_Python_AddErrMesg(const char* mesg, int infront)
2506 {
2507  if (PyErr_Occurred()) {
2508  PyObject *type = 0;
2509  PyObject *value = 0;
2510  PyObject *traceback = 0;
2511  PyErr_Fetch(&type, &value, &traceback);
2512  if (value) {
2513  PyObject *old_str = PyObject_Str(value);
2514  const char *tmp = SWIG_Python_str_AsChar(old_str);
2515  const char *errmesg = tmp ? tmp : "Invalid error message";
2516  Py_XINCREF(type);
2517  PyErr_Clear();
2518  if (infront) {
2519  PyErr_Format(type, "%s %s", mesg, errmesg);
2520  } else {
2521  PyErr_Format(type, "%s %s", errmesg, mesg);
2522  }
2524  Py_DECREF(old_str);
2525  }
2526  return 1;
2527  } else {
2528  return 0;
2529  }
2530 }
2531 
2532 SWIGRUNTIME int
2534 {
2535  if (PyErr_Occurred()) {
2536  /* add information about failing argument */
2537  char mesg[256];
2538  PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
2539  return SWIG_Python_AddErrMesg(mesg, 1);
2540  } else {
2541  return 0;
2542  }
2543 }
2544 
2545 SWIGRUNTIMEINLINE const char *
2546 SwigPyObject_GetDesc(PyObject *self)
2547 {
2548  SwigPyObject *v = (SwigPyObject *)self;
2549  swig_type_info *ty = v ? v->ty : 0;
2550  return ty ? ty->str : "";
2551 }
2552 
2553 SWIGRUNTIME void
2554 SWIG_Python_TypeError(const char *type, PyObject *obj)
2555 {
2556  if (type) {
2557 #if defined(SWIG_COBJECT_TYPES)
2558  if (obj && SwigPyObject_Check(obj)) {
2559  const char *otype = (const char *) SwigPyObject_GetDesc(obj);
2560  if (otype) {
2561  PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
2562  type, otype);
2563  return;
2564  }
2565  } else
2566 #endif
2567  {
2568  const char *otype = (obj ? obj->ob_type->tp_name : 0);
2569  if (otype) {
2570  PyObject *str = PyObject_Str(obj);
2571  const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
2572  if (cstr) {
2573  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
2574  type, otype, cstr);
2576  } else {
2577  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
2578  type, otype);
2579  }
2580  Py_XDECREF(str);
2581  return;
2582  }
2583  }
2584  PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
2585  } else {
2586  PyErr_Format(PyExc_TypeError, "unexpected type is received");
2587  }
2588 }
2589 
2590 
2591 /* Convert a pointer value, signal an exception on a type mismatch */
2592 SWIGRUNTIME void *
2593 SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
2594  void *result;
2595  if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
2596  PyErr_Clear();
2597 #if SWIG_POINTER_EXCEPTION
2598  if (flags) {
2600  SWIG_Python_ArgFail(argnum);
2601  }
2602 #endif
2603  }
2604  return result;
2605 }
2606 
2607 #ifdef SWIGPYTHON_BUILTIN
2608 SWIGRUNTIME int
2609 SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
2610  PyTypeObject *tp = obj->ob_type;
2611  PyObject *descr;
2612  PyObject *encoded_name;
2613  descrsetfunc f;
2614  int res = -1;
2615 
2616 # ifdef Py_USING_UNICODE
2617  if (PyString_Check(name)) {
2618  name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
2619  if (!name)
2620  return -1;
2621  } else if (!PyUnicode_Check(name))
2622 # else
2623  if (!PyString_Check(name))
2624 # endif
2625  {
2626  PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
2627  return -1;
2628  } else {
2629  Py_INCREF(name);
2630  }
2631 
2632  if (!tp->tp_dict) {
2633  if (PyType_Ready(tp) < 0)
2634  goto done;
2635  }
2636 
2637  descr = _PyType_Lookup(tp, name);
2638  f = NULL;
2639  if (descr != NULL)
2640  f = descr->ob_type->tp_descr_set;
2641  if (!f) {
2642  if (PyString_Check(name)) {
2643  encoded_name = name;
2644  Py_INCREF(name);
2645  } else {
2646  encoded_name = PyUnicode_AsUTF8String(name);
2647  if (!encoded_name)
2648  return -1;
2649  }
2650  PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
2651  Py_DECREF(encoded_name);
2652  } else {
2653  res = f(descr, obj, value);
2654  }
2655 
2656  done:
2657  Py_DECREF(name);
2658  return res;
2659 }
2660 #endif
2661 
2662 
2663 #ifdef __cplusplus
2664 }
2665 #endif
2666 
2667 
2668 
2669 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
2670 
2671 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
2672 
2673 
2674 
2675 #ifdef __cplusplus
2676 extern "C" {
2677 #endif
2678 
2679 /* Method creation and docstring support functions */
2680 
2681 SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name);
2682 SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);
2683 SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);
2684 
2685 #ifdef __cplusplus
2686 }
2687 #endif
2688 
2689 
2690  #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0)
2691 
2692 
2693 /* -------- TYPES TABLE (BEGIN) -------- */
2694 
2695 #define SWIGTYPE_p_char swig_types[0]
2696 #define SWIGTYPE_p_int swig_types[1]
2697 #define SWIGTYPE_p_long swig_types[2]
2698 #define SWIGTYPE_p_operations_research__MPConstraint swig_types[3]
2699 #define SWIGTYPE_p_operations_research__MPModelExportOptions swig_types[4]
2700 #define SWIGTYPE_p_operations_research__MPModelRequest swig_types[5]
2701 #define SWIGTYPE_p_operations_research__MPObjective swig_types[6]
2702 #define SWIGTYPE_p_operations_research__MPSolver swig_types[7]
2703 #define SWIGTYPE_p_operations_research__MPSolverParameters swig_types[8]
2704 #define SWIGTYPE_p_operations_research__MPVariable swig_types[9]
2705 #define SWIGTYPE_p_short swig_types[10]
2706 #define SWIGTYPE_p_signed_char swig_types[11]
2707 #define SWIGTYPE_p_std__ostream swig_types[12]
2708 #define SWIGTYPE_p_unsigned_char swig_types[13]
2709 #define SWIGTYPE_p_unsigned_int swig_types[14]
2710 #define SWIGTYPE_p_unsigned_long swig_types[15]
2711 #define SWIGTYPE_p_unsigned_short swig_types[16]
2713 static swig_module_info swig_module = {swig_types, 17, 0, 0, 0, 0};
2714 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2715 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2716 
2717 /* -------- TYPES TABLE (END) -------- */
2718 
2719 #ifdef SWIG_TypeQuery
2720 # undef SWIG_TypeQuery
2721 #endif
2722 #define SWIG_TypeQuery SWIG_Python_TypeQuery
2723 
2724 /*-----------------------------------------------
2725  @(target):= _pywraplp.so
2726  ------------------------------------------------*/
2727 #if PY_VERSION_HEX >= 0x03000000
2728 # define SWIG_init PyInit__pywraplp
2729 
2730 #else
2731 # define SWIG_init init_pywraplp
2732 
2733 #endif
2734 #define SWIG_name "_pywraplp"
2735 
2736 #define SWIGVERSION 0x040002
2737 #define SWIG_VERSION SWIGVERSION
2738 
2739 
2740 #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
2741 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
2742 
2743 
2744 #include <stdexcept>
2745 
2746 
2747 namespace swig {
2748  class SwigPtr_PyObject {
2749  protected:
2750  PyObject *_obj;
2751 
2752  public:
2754  {
2755  }
2756 
2758  {
2760  Py_XINCREF(_obj);
2762  }
2763 
2764  SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
2765  {
2766  if (initial_ref) {
2768  Py_XINCREF(_obj);
2770  }
2771  }
2772 
2774  {
2776  Py_XINCREF(item._obj);
2777  Py_XDECREF(_obj);
2778  _obj = item._obj;
2780  return *this;
2781  }
2782 
2784  {
2786  Py_XDECREF(_obj);
2788  }
2789 
2790  operator PyObject *() const
2791  {
2792  return _obj;
2793  }
2794 
2795  PyObject *operator->() const
2796  {
2797  return _obj;
2798  }
2799  };
2800 }
2801 
2802 
2803 namespace swig {
2804  struct SwigVar_PyObject : SwigPtr_PyObject {
2805  SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
2806 
2808  {
2809  Py_XDECREF(_obj);
2810  _obj = obj;
2811  return *this;
2812  }
2813  };
2814 }
2815 
2816 
2817 #include <cstdint>
2818 #include <string>
2819 #include <vector>
2820 
2821 #include "ortools/base/basictypes.h"
2822 
2823 
2824 #include <stdint.h> // Use the C99 official header
2825 
2826 
2827 #define SWIGWORDSIZE64
2828 #ifndef LONG_MAX
2829 #include <limits.h>
2830 #endif
2831 #if (__WORDSIZE == 32) || (LONG_MAX == INT_MAX)
2832 # error "SWIG wrapped code invalid in 32 bit architecture, regenerate code using -DSWIGWORDSIZE32"
2833 #endif
2834 
2835 
2836 #include <string>
2837 
2838 
2839 #include "ortools/base/python-swig.h"
2840 
2841 
2844 #include "ortools/linear_solver/model_exporter_swig_helper.h"
2846 
2847 
2848 template<>
2849 bool PyObjAs(PyObject *py_obj, operations_research::MPConstraint** b) {
2850  return SWIG_ConvertPtr(py_obj, reinterpret_cast<void**>(b),
2852  SWIG_POINTER_EXCEPTION) >= 0;
2853 }
2854 
2855 
2857  return SWIG_NewPointerObj(SWIG_as_voidptr(obj),
2859  0 | 0);
2860 }
2861 
2862 bool CanConvertToMPConstraint(PyObject *py_obj) {
2864  return PyObjAs(py_obj, &tmp);
2865 }
2866 
2867 
2868 template<>
2869 bool PyObjAs(PyObject *py_obj, operations_research::MPVariable** b) {
2870  return SWIG_ConvertPtr(py_obj, reinterpret_cast<void**>(b),
2872  SWIG_POINTER_EXCEPTION) >= 0;
2873 }
2874 
2875 
2877  return SWIG_NewPointerObj(SWIG_as_voidptr(obj),
2879  0 | 0);
2880 }
2881 
2882 bool CanConvertToMPVariable(PyObject *py_obj) {
2884  return PyObjAs(py_obj, &tmp);
2885 }
2886 
2887 
2888 SWIGINTERNINLINE PyObject*
2890 {
2891  return PyInt_FromLong((long) value);
2892 }
2893 
2894 
2897 {
2898  static int init = 0;
2899  static swig_type_info* info = 0;
2900  if (!init) {
2901  info = SWIG_TypeQuery("_p_char");
2902  init = 1;
2903  }
2904  return info;
2905 }
2906 
2907 
2908 SWIGINTERN int
2909 SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
2910 {
2911 #if PY_VERSION_HEX>=0x03000000
2912 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
2913  if (PyBytes_Check(obj))
2914 #else
2915  if (PyUnicode_Check(obj))
2916 #endif
2917 #else
2918  if (PyString_Check(obj))
2919 #endif
2920  {
2921  char *cstr; Py_ssize_t len;
2922  int ret = SWIG_OK;
2923 #if PY_VERSION_HEX>=0x03000000
2924 #if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
2925  if (!alloc && cptr) {
2926  /* We can't allow converting without allocation, since the internal
2927  representation of string in Python 3 is UCS-2/UCS-4 but we require
2928  a UTF-8 representation.
2929  TODO(bhy) More detailed explanation */
2930  return SWIG_RuntimeError;
2931  }
2932  obj = PyUnicode_AsUTF8String(obj);
2933  if (!obj)
2934  return SWIG_TypeError;
2935  if (alloc)
2936  *alloc = SWIG_NEWOBJ;
2937 #endif
2938  if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1)
2939  return SWIG_TypeError;
2940 #else
2941  if (PyString_AsStringAndSize(obj, &cstr, &len) == -1)
2942  return SWIG_TypeError;
2943 #endif
2944  if (cptr) {
2945  if (alloc) {
2946  if (*alloc == SWIG_NEWOBJ) {
2947  *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
2948  *alloc = SWIG_NEWOBJ;
2949  } else {
2950  *cptr = cstr;
2951  *alloc = SWIG_OLDOBJ;
2952  }
2953  } else {
2954 #if PY_VERSION_HEX>=0x03000000
2955 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
2956  *cptr = PyBytes_AsString(obj);
2957 #else
2958  assert(0); /* Should never reach here with Unicode strings in Python 3 */
2959 #endif
2960 #else
2961  *cptr = SWIG_Python_str_AsChar(obj);
2962  if (!*cptr)
2963  ret = SWIG_TypeError;
2964 #endif
2965  }
2966  }
2967  if (psize) *psize = len + 1;
2968 #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
2969  Py_XDECREF(obj);
2970 #endif
2971  return ret;
2972  } else {
2973 #if defined(SWIG_PYTHON_2_UNICODE)
2974 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
2975 #error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
2976 #endif
2977 #if PY_VERSION_HEX<0x03000000
2978  if (PyUnicode_Check(obj)) {
2979  char *cstr; Py_ssize_t len;
2980  if (!alloc && cptr) {
2981  return SWIG_RuntimeError;
2982  }
2983  obj = PyUnicode_AsUTF8String(obj);
2984  if (!obj)
2985  return SWIG_TypeError;
2986  if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
2987  if (cptr) {
2988  if (alloc) *alloc = SWIG_NEWOBJ;
2989  *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
2990  }
2991  if (psize) *psize = len + 1;
2992 
2993  Py_XDECREF(obj);
2994  return SWIG_OK;
2995  } else {
2996  Py_XDECREF(obj);
2997  }
2998  }
2999 #endif
3000 #endif
3001 
3002  swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3003  if (pchar_descriptor) {
3004  void* vptr = 0;
3005  if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
3006  if (cptr) *cptr = (char *) vptr;
3007  if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
3008  if (alloc) *alloc = SWIG_OLDOBJ;
3009  return SWIG_OK;
3010  }
3011  }
3012  }
3013  return SWIG_TypeError;
3014 }
3015 
3016 
3017 SWIGINTERN int
3018 SWIG_AsPtr_std_string (PyObject * obj, std::string **val)
3019 {
3020  char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ;
3021  if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) {
3022  if (buf) {
3023  if (val) *val = new std::string(buf, size - 1);
3024  if (alloc == SWIG_NEWOBJ) delete[] buf;
3025  return SWIG_NEWOBJ;
3026  } else {
3027  if (val) *val = 0;
3028  return SWIG_OLDOBJ;
3029  }
3030  } else {
3031  static int init = 0;
3032  static swig_type_info* descriptor = 0;
3033  if (!init) {
3034  descriptor = SWIG_TypeQuery("std::string" " *");
3035  init = 1;
3036  }
3037  if (descriptor) {
3038  std::string *vptr;
3039  int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0);
3040  if (SWIG_IsOK(res) && val) *val = vptr;
3041  return res;
3042  }
3043  }
3044  return SWIG_ERROR;
3045 }
3046 
3047 
3048 #include <limits.h>
3049 #if !defined(SWIG_NO_LLONG_MAX)
3050 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
3051 # define LLONG_MAX __LONG_LONG_MAX__
3052 # define LLONG_MIN (-LLONG_MAX - 1LL)
3053 # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
3054 # endif
3055 #endif
3056 
3057 
3058 SWIGINTERN int
3059 SWIG_AsVal_double (PyObject *obj, double *val)
3060 {
3061  int res = SWIG_TypeError;
3062  if (PyFloat_Check(obj)) {
3063  if (val) *val = PyFloat_AsDouble(obj);
3064  return SWIG_OK;
3065 #if PY_VERSION_HEX < 0x03000000
3066  } else if (PyInt_Check(obj)) {
3067  if (val) *val = (double) PyInt_AsLong(obj);
3068  return SWIG_OK;
3069 #endif
3070  } else if (PyLong_Check(obj)) {
3071  double v = PyLong_AsDouble(obj);
3072  if (!PyErr_Occurred()) {
3073  if (val) *val = v;
3074  return SWIG_OK;
3075  } else {
3076  PyErr_Clear();
3077  }
3078  }
3079 #ifdef SWIG_PYTHON_CAST_MODE
3080  {
3081  int dispatch = 0;
3082  double d = PyFloat_AsDouble(obj);
3083  if (!PyErr_Occurred()) {
3084  if (val) *val = d;
3085  return SWIG_AddCast(SWIG_OK);
3086  } else {
3087  PyErr_Clear();
3088  }
3089  if (!dispatch) {
3090  long v = PyLong_AsLong(obj);
3091  if (!PyErr_Occurred()) {
3092  if (val) *val = v;
3094  } else {
3095  PyErr_Clear();
3096  }
3097  }
3098  }
3099 #endif
3100  return res;
3101 }
3102 
3103 
3104 #include <float.h>
3105 
3106 
3107 #include <math.h>
3108 
3109 
3110 SWIGINTERNINLINE int
3111 SWIG_CanCastAsInteger(double *d, double min, double max) {
3112  double x = *d;
3113  if ((min <= x && x <= max)) {
3114  double fx = floor(x);
3115  double cx = ceil(x);
3116  double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
3117  if ((errno == EDOM) || (errno == ERANGE)) {
3118  errno = 0;
3119  } else {
3120  double summ, reps, diff;
3121  if (rd < x) {
3122  diff = x - rd;
3123  } else if (rd > x) {
3124  diff = rd - x;
3125  } else {
3126  return 1;
3127  }
3128  summ = rd + x;
3129  reps = diff/summ;
3130  if (reps < 8*DBL_EPSILON) {
3131  *d = rd;
3132  return 1;
3133  }
3134  }
3135  }
3136  return 0;
3137 }
3138 
3139 
3140 SWIGINTERN int
3141 SWIG_AsVal_long (PyObject *obj, long* val)
3142 {
3143 #if PY_VERSION_HEX < 0x03000000
3144  if (PyInt_Check(obj)) {
3145  if (val) *val = PyInt_AsLong(obj);
3146  return SWIG_OK;
3147  } else
3148 #endif
3149  if (PyLong_Check(obj)) {
3150  long v = PyLong_AsLong(obj);
3151  if (!PyErr_Occurred()) {
3152  if (val) *val = v;
3153  return SWIG_OK;
3154  } else {
3155  PyErr_Clear();
3156  return SWIG_OverflowError;
3157  }
3158  }
3159 #ifdef SWIG_PYTHON_CAST_MODE
3160  {
3161  int dispatch = 0;
3162  long v = PyInt_AsLong(obj);
3163  if (!PyErr_Occurred()) {
3164  if (val) *val = v;
3165  return SWIG_AddCast(SWIG_OK);
3166  } else {
3167  PyErr_Clear();
3168  }
3169  if (!dispatch) {
3170  double d;
3171  int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3172  if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
3173  if (val) *val = (long)(d);
3174  return res;
3175  }
3176  }
3177  }
3178 #endif
3179  return SWIG_TypeError;
3180 }
3181 
3182 
3183 SWIGINTERN int
3184 SWIG_AsVal_int (PyObject * obj, int *val)
3185 {
3186  long v;
3187  int res = SWIG_AsVal_long (obj, &v);
3188  if (SWIG_IsOK(res)) {
3189  if ((v < INT_MIN || v > INT_MAX)) {
3190  return SWIG_OverflowError;
3191  } else {
3192  if (val) *val = static_cast< int >(v);
3193  }
3194  }
3195  return res;
3196 }
3197 
3198 
3199 SWIGINTERNINLINE PyObject*
3201 {
3202  return PyBool_FromLong(value ? 1 : 0);
3203 }
3204 
3205 
3206 SWIGINTERN int
3207 SWIG_AsVal_bool (PyObject *obj, bool *val)
3208 {
3209  int r;
3210  if (!PyBool_Check(obj))
3211  return SWIG_ERROR;
3212  r = PyObject_IsTrue(obj);
3213  if (r == -1)
3214  return SWIG_ERROR;
3215  if (val) *val = r ? true : false;
3216  return SWIG_OK;
3217 }
3218 
3219 
3220  #define SWIG_From_double PyFloat_FromDouble
3221 
3222 
3223  #define SWIG_From_long PyInt_FromLong
3224 
3226  std::string error_message;
3227  self->LoadModelFromProto(input_model, &error_message);
3228  return error_message;
3229  }
3230 
3231 SWIGINTERNINLINE PyObject *
3232 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
3233 {
3234  if (carray) {
3235  if (size > INT_MAX) {
3236  swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3237  return pchar_descriptor ?
3238  SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
3239  } else {
3240 #if PY_VERSION_HEX >= 0x03000000
3241 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3242  return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
3243 #else
3244  return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape");
3245 #endif
3246 #else
3247  return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
3248 #endif
3249  }
3250  } else {
3251  return SWIG_Py_Void();
3252  }
3253 }
3254 
3255 
3256 SWIGINTERNINLINE PyObject *
3257 SWIG_From_std_string (const std::string& s)
3258 {
3259  return SWIG_FromCharPtrAndSize(s.data(), s.size());
3260 }
3261 
3263  return self->LoadSolutionFromProto(response, tolerance).ok();
3264  }
3267  options.obfuscate = obfuscated;
3269  self->ExportModelToProto(&model);
3270  return ExportModelAsLpFormat(model, options).value_or("");
3271  }
3274  options.obfuscate = obfuscated;
3276  self->ExportModelToProto(&model);
3277  return ExportModelAsMpsFormat(model, options).value_or("");
3278  }
3279 SWIGINTERN void operations_research_MPSolver_SetHint(operations_research::MPSolver *self,std::vector< operations_research::MPVariable * > const &variables,std::vector< double > const &values){
3280  if (variables.size() != values.size()) {
3281  LOG(FATAL) << "Different number of variables and values when setting "
3282  << "hint.";
3283  }
3284  std::vector<std::pair<const operations_research::MPVariable*, double> >
3285  hint(variables.size());
3286  for (int i = 0; i < variables.size(); ++i) {
3287  hint[i] = std::make_pair(variables[i], values[i]);
3288  }
3289  self->SetHint(hint);
3290  }
3292  return self->SetNumThreads(num_theads).ok();
3293  }
3300  return self->name();
3301  }
3303  return self->name();
3304  }
3317 #ifdef __cplusplus
3318 extern "C" {
3319 #endif
3320 SWIGINTERN PyObject *_wrap_new_Solver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3321  PyObject *resultobj = 0;
3322  std::string *arg1 = 0 ;
3324  int res1 = SWIG_OLDOBJ ;
3325  int val2 ;
3326  int ecode2 = 0 ;
3327  PyObject *swig_obj[2] ;
3328  operations_research::MPSolver *result = 0 ;
3329 
3330  if (!SWIG_Python_UnpackTuple(args, "new_Solver", 2, 2, swig_obj)) SWIG_fail;
3331  {
3332  std::string *ptr = (std::string *)0;
3333  res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr);
3334  if (!SWIG_IsOK(res1)) {
3335  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Solver" "', argument " "1"" of type '" "std::string const &""'");
3336  }
3337  if (!ptr) {
3338  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Solver" "', argument " "1"" of type '" "std::string const &""'");
3339  }
3340  arg1 = ptr;
3341  }
3342  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
3343  if (!SWIG_IsOK(ecode2)) {
3344  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Solver" "', argument " "2"" of type '" "operations_research::MPSolver::OptimizationProblemType""'");
3345  }
3346  arg2 = static_cast< operations_research::MPSolver::OptimizationProblemType >(val2);
3347  result = (operations_research::MPSolver *)new operations_research::MPSolver((std::string const &)*arg1,arg2);
3349  if (SWIG_IsNewObj(res1)) delete arg1;
3350  return resultobj;
3351 fail:
3352  if (SWIG_IsNewObj(res1)) delete arg1;
3353  return NULL;
3354 }
3355 
3356 
3357 SWIGINTERN PyObject *_wrap_delete_Solver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3358  PyObject *resultobj = 0;
3360  void *argp1 = 0 ;
3361  int res1 = 0 ;
3362  PyObject *swig_obj[1] ;
3363 
3364  if (!args) SWIG_fail;
3365  swig_obj[0] = args;
3367  if (!SWIG_IsOK(res1)) {
3368  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Solver" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
3369  }
3370  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
3371  delete arg1;
3372  resultobj = SWIG_Py_Void();
3373  return resultobj;
3374 fail:
3375  return NULL;
3376 }
3377 
3378 
3379 SWIGINTERN PyObject *_wrap_Solver_CreateSolver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3380  PyObject *resultobj = 0;
3381  std::string *arg1 = 0 ;
3382  int res1 = SWIG_OLDOBJ ;
3383  PyObject *swig_obj[1] ;
3384  operations_research::MPSolver *result = 0 ;
3385 
3386  if (!args) SWIG_fail;
3387  swig_obj[0] = args;
3388  {
3389  std::string *ptr = (std::string *)0;
3390  res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr);
3391  if (!SWIG_IsOK(res1)) {
3392  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_CreateSolver" "', argument " "1"" of type '" "std::string const &""'");
3393  }
3394  if (!ptr) {
3395  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Solver_CreateSolver" "', argument " "1"" of type '" "std::string const &""'");
3396  }
3397  arg1 = ptr;
3398  }
3399  result = (operations_research::MPSolver *)operations_research::MPSolver::CreateSolver((std::string const &)*arg1);
3401  if (SWIG_IsNewObj(res1)) delete arg1;
3402  return resultobj;
3403 fail:
3404  if (SWIG_IsNewObj(res1)) delete arg1;
3405  return NULL;
3406 }
3407 
3408 
3409 SWIGINTERN PyObject *_wrap_Solver_SupportsProblemType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3410  PyObject *resultobj = 0;
3412  int val1 ;
3413  int ecode1 = 0 ;
3414  PyObject *swig_obj[1] ;
3415  bool result;
3416 
3417  if (!args) SWIG_fail;
3418  swig_obj[0] = args;
3419  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
3420  if (!SWIG_IsOK(ecode1)) {
3421  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Solver_SupportsProblemType" "', argument " "1"" of type '" "operations_research::MPSolver::OptimizationProblemType""'");
3422  }
3423  arg1 = static_cast< operations_research::MPSolver::OptimizationProblemType >(val1);
3425  resultobj = SWIG_From_bool(static_cast< bool >(result));
3426  return resultobj;
3427 fail:
3428  return NULL;
3429 }
3430 
3431 
3432 SWIGINTERN PyObject *_wrap_Solver_Clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3433  PyObject *resultobj = 0;
3435  void *argp1 = 0 ;
3436  int res1 = 0 ;
3437  PyObject *swig_obj[1] ;
3438 
3439  if (!args) SWIG_fail;
3440  swig_obj[0] = args;
3441  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
3442  if (!SWIG_IsOK(res1)) {
3443  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_Clear" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
3444  }
3445  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
3446  (arg1)->Clear();
3447  resultobj = SWIG_Py_Void();
3448  return resultobj;
3449 fail:
3450  return NULL;
3451 }
3452 
3453 
3454 SWIGINTERN PyObject *_wrap_Solver_NumVariables(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3455  PyObject *resultobj = 0;
3457  void *argp1 = 0 ;
3458  int res1 = 0 ;
3459  PyObject *swig_obj[1] ;
3460  int result;
3461 
3462  if (!args) SWIG_fail;
3463  swig_obj[0] = args;
3464  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
3465  if (!SWIG_IsOK(res1)) {
3466  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_NumVariables" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
3467  }
3468  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
3469  result = (int)((operations_research::MPSolver const *)arg1)->NumVariables();
3470  resultobj = SWIG_From_int(static_cast< int >(result));
3471  return resultobj;
3472 fail:
3473  return NULL;
3474 }
3475 
3476 
3477 SWIGINTERN PyObject *_wrap_Solver_variables(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3478  PyObject *resultobj = 0;
3480  void *argp1 = 0 ;
3481  int res1 = 0 ;
3482  PyObject *swig_obj[1] ;
3483  std::vector< operations_research::MPVariable * > *result = 0 ;
3484 
3485  if (!args) SWIG_fail;
3486  swig_obj[0] = args;
3487  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
3488  if (!SWIG_IsOK(res1)) {
3489  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_variables" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
3490  }
3491  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
3492  result = (std::vector< operations_research::MPVariable * > *) &((operations_research::MPSolver const *)arg1)->variables();
3493  {
3494  resultobj = vector_output_helper(result, &FromObjectMPVariable);
3495  }
3496  return resultobj;
3497 fail:
3498  return NULL;
3499 }
3500 
3501 
3502 SWIGINTERN PyObject *_wrap_Solver_LookupVariable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3503  PyObject *resultobj = 0;
3505  std::string *arg2 = 0 ;
3506  void *argp1 = 0 ;
3507  int res1 = 0 ;
3508  int res2 = SWIG_OLDOBJ ;
3509  PyObject *swig_obj[2] ;
3510  operations_research::MPVariable *result = 0 ;
3511 
3512  if (!SWIG_Python_UnpackTuple(args, "Solver_LookupVariable", 2, 2, swig_obj)) SWIG_fail;
3513  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
3514  if (!SWIG_IsOK(res1)) {
3515  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_LookupVariable" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
3516  }
3517  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
3518  {
3519  std::string *ptr = (std::string *)0;
3520  res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr);
3521  if (!SWIG_IsOK(res2)) {
3522  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Solver_LookupVariable" "', argument " "2"" of type '" "std::string const &""'");
3523  }
3524  if (!ptr) {
3525  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Solver_LookupVariable" "', argument " "2"" of type '" "std::string const &""'");
3526  }
3527  arg2 = ptr;
3528  }
3529  result = (operations_research::MPVariable *)((operations_research::MPSolver const *)arg1)->LookupVariableOrNull((std::string const &)*arg2);
3531  if (SWIG_IsNewObj(res2)) delete arg2;
3532  return resultobj;
3533 fail:
3534  if (SWIG_IsNewObj(res2)) delete arg2;
3535  return NULL;
3536 }
3537 
3538 
3539 SWIGINTERN PyObject *_wrap_Solver_Var(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3540  PyObject *resultobj = 0;
3542  double arg2 ;
3543  double arg3 ;
3544  bool arg4 ;
3545  std::string *arg5 = 0 ;
3546  void *argp1 = 0 ;
3547  int res1 = 0 ;
3548  double val2 ;
3549  int ecode2 = 0 ;
3550  double val3 ;
3551  int ecode3 = 0 ;
3552  bool val4 ;
3553  int ecode4 = 0 ;
3554  int res5 = SWIG_OLDOBJ ;
3555  PyObject *swig_obj[5] ;
3556  operations_research::MPVariable *result = 0 ;
3557 
3558  if (!SWIG_Python_UnpackTuple(args, "Solver_Var", 5, 5, swig_obj)) SWIG_fail;
3559  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
3560  if (!SWIG_IsOK(res1)) {
3561  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_Var" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
3562  }
3563  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
3564  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
3565  if (!SWIG_IsOK(ecode2)) {
3566  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Solver_Var" "', argument " "2"" of type '" "double""'");
3567  }
3568  arg2 = static_cast< double >(val2);
3569  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
3570  if (!SWIG_IsOK(ecode3)) {
3571  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Solver_Var" "', argument " "3"" of type '" "double""'");
3572  }
3573  arg3 = static_cast< double >(val3);
3574  ecode4 = SWIG_AsVal_bool(swig_obj[3], &val4);
3575  if (!SWIG_IsOK(ecode4)) {
3576  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Solver_Var" "', argument " "4"" of type '" "bool""'");
3577  }
3578  arg4 = static_cast< bool >(val4);
3579  {
3580  std::string *ptr = (std::string *)0;
3581  res5 = SWIG_AsPtr_std_string(swig_obj[4], &ptr);
3582  if (!SWIG_IsOK(res5)) {
3583  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Solver_Var" "', argument " "5"" of type '" "std::string const &""'");
3584  }
3585  if (!ptr) {
3586  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Solver_Var" "', argument " "5"" of type '" "std::string const &""'");
3587  }
3588  arg5 = ptr;
3589  }
3590  result = (operations_research::MPVariable *)(arg1)->MakeVar(arg2,arg3,arg4,(std::string const &)*arg5);
3592  if (SWIG_IsNewObj(res5)) delete arg5;
3593  return resultobj;
3594 fail:
3595  if (SWIG_IsNewObj(res5)) delete arg5;
3596  return NULL;
3597 }
3598 
3599 
3600 SWIGINTERN PyObject *_wrap_Solver_NumVar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3601  PyObject *resultobj = 0;
3603  double arg2 ;
3604  double arg3 ;
3605  std::string *arg4 = 0 ;
3606  void *argp1 = 0 ;
3607  int res1 = 0 ;
3608  double val2 ;
3609  int ecode2 = 0 ;
3610  double val3 ;
3611  int ecode3 = 0 ;
3612  int res4 = SWIG_OLDOBJ ;
3613  PyObject *swig_obj[4] ;
3614  operations_research::MPVariable *result = 0 ;
3615 
3616  if (!SWIG_Python_UnpackTuple(args, "Solver_NumVar", 4, 4, swig_obj)) SWIG_fail;
3617  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
3618  if (!SWIG_IsOK(res1)) {
3619  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_NumVar" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
3620  }
3621  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
3622  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
3623  if (!SWIG_IsOK(ecode2)) {
3624  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Solver_NumVar" "', argument " "2"" of type '" "double""'");
3625  }
3626  arg2 = static_cast< double >(val2);
3627  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
3628  if (!SWIG_IsOK(ecode3)) {
3629  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Solver_NumVar" "', argument " "3"" of type '" "double""'");
3630  }
3631  arg3 = static_cast< double >(val3);
3632  {
3633  std::string *ptr = (std::string *)0;
3634  res4 = SWIG_AsPtr_std_string(swig_obj[3], &ptr);
3635  if (!SWIG_IsOK(res4)) {
3636  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Solver_NumVar" "', argument " "4"" of type '" "std::string const &""'");
3637  }
3638  if (!ptr) {
3639  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Solver_NumVar" "', argument " "4"" of type '" "std::string const &""'");
3640  }
3641  arg4 = ptr;
3642  }
3643  result = (operations_research::MPVariable *)(arg1)->MakeNumVar(arg2,arg3,(std::string const &)*arg4);
3645  if (SWIG_IsNewObj(res4)) delete arg4;
3646  return resultobj;
3647 fail:
3648  if (SWIG_IsNewObj(res4)) delete arg4;
3649  return NULL;
3650 }
3651 
3652 
3653 SWIGINTERN PyObject *_wrap_Solver_IntVar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3654  PyObject *resultobj = 0;
3656  double arg2 ;
3657  double arg3 ;
3658  std::string *arg4 = 0 ;
3659  void *argp1 = 0 ;
3660  int res1 = 0 ;
3661  double val2 ;
3662  int ecode2 = 0 ;
3663  double val3 ;
3664  int ecode3 = 0 ;
3665  int res4 = SWIG_OLDOBJ ;
3666  PyObject *swig_obj[4] ;
3667  operations_research::MPVariable *result = 0 ;
3668 
3669  if (!SWIG_Python_UnpackTuple(args, "Solver_IntVar", 4, 4, swig_obj)) SWIG_fail;
3670  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
3671  if (!SWIG_IsOK(res1)) {
3672  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_IntVar" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
3673  }
3674  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
3675  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
3676  if (!SWIG_IsOK(ecode2)) {
3677  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Solver_IntVar" "', argument " "2"" of type '" "double""'");
3678  }
3679  arg2 = static_cast< double >(val2);
3680  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
3681  if (!SWIG_IsOK(ecode3)) {
3682  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Solver_IntVar" "', argument " "3"" of type '" "double""'");
3683  }
3684  arg3 = static_cast< double >(val3);
3685  {
3686  std::string *ptr = (std::string *)0;
3687  res4 = SWIG_AsPtr_std_string(swig_obj[3], &ptr);
3688  if (!SWIG_IsOK(res4)) {
3689  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Solver_IntVar" "', argument " "4"" of type '" "std::string const &""'");
3690  }
3691  if (!ptr) {
3692  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Solver_IntVar" "', argument " "4"" of type '" "std::string const &""'");
3693  }
3694  arg4 = ptr;
3695  }
3696  result = (operations_research::MPVariable *)(arg1)->MakeIntVar(arg2,arg3,(std::string const &)*arg4);
3698  if (SWIG_IsNewObj(res4)) delete arg4;
3699  return resultobj;
3700 fail:
3701  if (SWIG_IsNewObj(res4)) delete arg4;
3702  return NULL;
3703 }
3704 
3705 
3706 SWIGINTERN PyObject *_wrap_Solver_BoolVar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3707  PyObject *resultobj = 0;
3709  std::string *arg2 = 0 ;
3710  void *argp1 = 0 ;
3711  int res1 = 0 ;
3712  int res2 = SWIG_OLDOBJ ;
3713  PyObject *swig_obj[2] ;
3714  operations_research::MPVariable *result = 0 ;
3715 
3716  if (!SWIG_Python_UnpackTuple(args, "Solver_BoolVar", 2, 2, swig_obj)) SWIG_fail;
3717  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
3718  if (!SWIG_IsOK(res1)) {
3719  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_BoolVar" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
3720  }
3721  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
3722  {
3723  std::string *ptr = (std::string *)0;
3724  res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr);
3725  if (!SWIG_IsOK(res2)) {
3726  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Solver_BoolVar" "', argument " "2"" of type '" "std::string const &""'");
3727  }
3728  if (!ptr) {
3729  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Solver_BoolVar" "', argument " "2"" of type '" "std::string const &""'");
3730  }
3731  arg2 = ptr;
3732  }
3733  result = (operations_research::MPVariable *)(arg1)->MakeBoolVar((std::string const &)*arg2);
3735  if (SWIG_IsNewObj(res2)) delete arg2;
3736  return resultobj;
3737 fail:
3738  if (SWIG_IsNewObj(res2)) delete arg2;
3739  return NULL;
3740 }
3741 
3742 
3743 SWIGINTERN PyObject *_wrap_Solver_NumConstraints(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3744  PyObject *resultobj = 0;
3746  void *argp1 = 0 ;
3747  int res1 = 0 ;
3748  PyObject *swig_obj[1] ;
3749  int result;
3750 
3751  if (!args) SWIG_fail;
3752  swig_obj[0] = args;
3753  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
3754  if (!SWIG_IsOK(res1)) {
3755  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_NumConstraints" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
3756  }
3757  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
3758  result = (int)((operations_research::MPSolver const *)arg1)->NumConstraints();
3759  resultobj = SWIG_From_int(static_cast< int >(result));
3760  return resultobj;
3761 fail:
3762  return NULL;
3763 }
3764 
3765 
3766 SWIGINTERN PyObject *_wrap_Solver_constraints(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3767  PyObject *resultobj = 0;
3769  void *argp1 = 0 ;
3770  int res1 = 0 ;
3771  PyObject *swig_obj[1] ;
3772  std::vector< operations_research::MPConstraint * > *result = 0 ;
3773 
3774  if (!args) SWIG_fail;
3775  swig_obj[0] = args;
3776  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
3777  if (!SWIG_IsOK(res1)) {
3778  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_constraints" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
3779  }
3780  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
3781  result = (std::vector< operations_research::MPConstraint * > *) &((operations_research::MPSolver const *)arg1)->constraints();
3782  {
3783  resultobj = vector_output_helper(result, &FromObjectMPConstraint);
3784  }
3785  return resultobj;
3786 fail:
3787  return NULL;
3788 }
3789 
3790 
3791 SWIGINTERN PyObject *_wrap_Solver_LookupConstraint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3792  PyObject *resultobj = 0;
3794  std::string *arg2 = 0 ;
3795  void *argp1 = 0 ;
3796  int res1 = 0 ;
3797  int res2 = SWIG_OLDOBJ ;
3798  PyObject *swig_obj[2] ;
3799  operations_research::MPConstraint *result = 0 ;
3800 
3801  if (!SWIG_Python_UnpackTuple(args, "Solver_LookupConstraint", 2, 2, swig_obj)) SWIG_fail;
3802  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
3803  if (!SWIG_IsOK(res1)) {
3804  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_LookupConstraint" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
3805  }
3806  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
3807  {
3808  std::string *ptr = (std::string *)0;
3809  res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr);
3810  if (!SWIG_IsOK(res2)) {
3811  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Solver_LookupConstraint" "', argument " "2"" of type '" "std::string const &""'");
3812  }
3813  if (!ptr) {
3814  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Solver_LookupConstraint" "', argument " "2"" of type '" "std::string const &""'");
3815  }
3816  arg2 = ptr;
3817  }
3818  result = (operations_research::MPConstraint *)((operations_research::MPSolver const *)arg1)->LookupConstraintOrNull((std::string const &)*arg2);
3820  if (SWIG_IsNewObj(res2)) delete arg2;
3821  return resultobj;
3822 fail:
3823  if (SWIG_IsNewObj(res2)) delete arg2;
3824  return NULL;
3825 }
3826 
3827 
3828 SWIGINTERN PyObject *_wrap_Solver_Constraint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
3829  PyObject *resultobj = 0;
3831  double arg2 ;
3832  double arg3 ;
3833  void *argp1 = 0 ;
3834  int res1 = 0 ;
3835  double val2 ;
3836  int ecode2 = 0 ;
3837  double val3 ;
3838  int ecode3 = 0 ;
3839  operations_research::MPConstraint *result = 0 ;
3840 
3841  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
3842  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
3843  if (!SWIG_IsOK(res1)) {
3844  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_Constraint" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
3845  }
3846  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
3847  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
3848  if (!SWIG_IsOK(ecode2)) {
3849  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Solver_Constraint" "', argument " "2"" of type '" "double""'");
3850  }
3851  arg2 = static_cast< double >(val2);
3852  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
3853  if (!SWIG_IsOK(ecode3)) {
3854  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Solver_Constraint" "', argument " "3"" of type '" "double""'");
3855  }
3856  arg3 = static_cast< double >(val3);
3857  result = (operations_research::MPConstraint *)(arg1)->MakeRowConstraint(arg2,arg3);
3859  return resultobj;
3860 fail:
3861  return NULL;
3862 }
3863 
3864 
3865 SWIGINTERN PyObject *_wrap_Solver_Constraint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
3866  PyObject *resultobj = 0;
3868  void *argp1 = 0 ;
3869  int res1 = 0 ;
3870  operations_research::MPConstraint *result = 0 ;
3871 
3872  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
3873  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
3874  if (!SWIG_IsOK(res1)) {
3875  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_Constraint" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
3876  }
3877  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
3878  result = (operations_research::MPConstraint *)(arg1)->MakeRowConstraint();
3880  return resultobj;
3881 fail:
3882  return NULL;
3883 }
3884 
3885 
3886 SWIGINTERN PyObject *_wrap_Solver_Constraint__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
3887  PyObject *resultobj = 0;
3889  double arg2 ;
3890  double arg3 ;
3891  std::string *arg4 = 0 ;
3892  void *argp1 = 0 ;
3893  int res1 = 0 ;
3894  double val2 ;
3895  int ecode2 = 0 ;
3896  double val3 ;
3897  int ecode3 = 0 ;
3898  int res4 = SWIG_OLDOBJ ;
3899  operations_research::MPConstraint *result = 0 ;
3900 
3901  if ((nobjs < 4) || (nobjs > 4)) SWIG_fail;
3902  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
3903  if (!SWIG_IsOK(res1)) {
3904  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_Constraint" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
3905  }
3906  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
3907  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
3908  if (!SWIG_IsOK(ecode2)) {
3909  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Solver_Constraint" "', argument " "2"" of type '" "double""'");
3910  }
3911  arg2 = static_cast< double >(val2);
3912  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
3913  if (!SWIG_IsOK(ecode3)) {
3914  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Solver_Constraint" "', argument " "3"" of type '" "double""'");
3915  }
3916  arg3 = static_cast< double >(val3);
3917  {
3918  std::string *ptr = (std::string *)0;
3919  res4 = SWIG_AsPtr_std_string(swig_obj[3], &ptr);
3920  if (!SWIG_IsOK(res4)) {
3921  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Solver_Constraint" "', argument " "4"" of type '" "std::string const &""'");
3922  }
3923  if (!ptr) {
3924  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Solver_Constraint" "', argument " "4"" of type '" "std::string const &""'");
3925  }
3926  arg4 = ptr;
3927  }
3928  result = (operations_research::MPConstraint *)(arg1)->MakeRowConstraint(arg2,arg3,(std::string const &)*arg4);
3930  if (SWIG_IsNewObj(res4)) delete arg4;
3931  return resultobj;
3932 fail:
3933  if (SWIG_IsNewObj(res4)) delete arg4;
3934  return NULL;
3935 }
3936 
3937 
3938 SWIGINTERN PyObject *_wrap_Solver_Constraint__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
3939  PyObject *resultobj = 0;
3941  std::string *arg2 = 0 ;
3942  void *argp1 = 0 ;
3943  int res1 = 0 ;
3944  int res2 = SWIG_OLDOBJ ;
3945  operations_research::MPConstraint *result = 0 ;
3946 
3947  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
3948  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
3949  if (!SWIG_IsOK(res1)) {
3950  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_Constraint" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
3951  }
3952  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
3953  {
3954  std::string *ptr = (std::string *)0;
3955  res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr);
3956  if (!SWIG_IsOK(res2)) {
3957  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Solver_Constraint" "', argument " "2"" of type '" "std::string const &""'");
3958  }
3959  if (!ptr) {
3960  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Solver_Constraint" "', argument " "2"" of type '" "std::string const &""'");
3961  }
3962  arg2 = ptr;
3963  }
3964  result = (operations_research::MPConstraint *)(arg1)->MakeRowConstraint((std::string const &)*arg2);
3966  if (SWIG_IsNewObj(res2)) delete arg2;
3967  return resultobj;
3968 fail:
3969  if (SWIG_IsNewObj(res2)) delete arg2;
3970  return NULL;
3971 }
3972 
3973 
3974 SWIGINTERN PyObject *_wrap_Solver_Constraint(PyObject *self, PyObject *args) {
3975  Py_ssize_t argc;
3976  PyObject *argv[5] = {
3977  0
3978  };
3979 
3980  if (!(argc = SWIG_Python_UnpackTuple(args, "Solver_Constraint", 0, 4, argv))) SWIG_fail;
3981  --argc;
3982  if (argc == 1) {
3983  int _v;
3984  void *vptr = 0;
3985  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_operations_research__MPSolver, 0);
3986  _v = SWIG_CheckState(res);
3987  if (_v) {
3988  return _wrap_Solver_Constraint__SWIG_1(self, argc, argv);
3989  }
3990  }
3991  if (argc == 2) {
3992  int _v;
3993  void *vptr = 0;
3994  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_operations_research__MPSolver, 0);
3995  _v = SWIG_CheckState(res);
3996  if (_v) {
3997  int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
3998  _v = SWIG_CheckState(res);
3999  if (_v) {
4000  return _wrap_Solver_Constraint__SWIG_3(self, argc, argv);
4001  }
4002  }
4003  }
4004  if (argc == 3) {
4005  int _v;
4006  void *vptr = 0;
4007  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_operations_research__MPSolver, 0);
4008  _v = SWIG_CheckState(res);
4009  if (_v) {
4010  {
4011  int res = SWIG_AsVal_double(argv[1], NULL);
4012  _v = SWIG_CheckState(res);
4013  }
4014  if (_v) {
4015  {
4016  int res = SWIG_AsVal_double(argv[2], NULL);
4017  _v = SWIG_CheckState(res);
4018  }
4019  if (_v) {
4020  return _wrap_Solver_Constraint__SWIG_0(self, argc, argv);
4021  }
4022  }
4023  }
4024  }
4025  if (argc == 4) {
4026  int _v;
4027  void *vptr = 0;
4028  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_operations_research__MPSolver, 0);
4029  _v = SWIG_CheckState(res);
4030  if (_v) {
4031  {
4032  int res = SWIG_AsVal_double(argv[1], NULL);
4033  _v = SWIG_CheckState(res);
4034  }
4035  if (_v) {
4036  {
4037  int res = SWIG_AsVal_double(argv[2], NULL);
4038  _v = SWIG_CheckState(res);
4039  }
4040  if (_v) {
4041  int res = SWIG_AsPtr_std_string(argv[3], (std::string**)(0));
4042  _v = SWIG_CheckState(res);
4043  if (_v) {
4044  return _wrap_Solver_Constraint__SWIG_2(self, argc, argv);
4045  }
4046  }
4047  }
4048  }
4049  }
4050 
4051 fail:
4052  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Solver_Constraint'.\n"
4053  " Possible C/C++ prototypes are:\n"
4054  " operations_research::MPSolver::MakeRowConstraint(double,double)\n"
4055  " operations_research::MPSolver::MakeRowConstraint()\n"
4056  " operations_research::MPSolver::MakeRowConstraint(double,double,std::string const &)\n"
4057  " operations_research::MPSolver::MakeRowConstraint(std::string const &)\n");
4058  return 0;
4059 }
4060 
4061 
4062 SWIGINTERN PyObject *_wrap_Solver_Objective(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4063  PyObject *resultobj = 0;
4065  void *argp1 = 0 ;
4066  int res1 = 0 ;
4067  PyObject *swig_obj[1] ;
4068  operations_research::MPObjective *result = 0 ;
4069 
4070  if (!args) SWIG_fail;
4071  swig_obj[0] = args;
4072  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4073  if (!SWIG_IsOK(res1)) {
4074  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_Objective" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
4075  }
4076  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4077  result = (operations_research::MPObjective *)(arg1)->MutableObjective();
4079  return resultobj;
4080 fail:
4081  return NULL;
4082 }
4083 
4084 
4085 SWIGINTERN PyObject *_wrap_Solver_Solve__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
4086  PyObject *resultobj = 0;
4088  void *argp1 = 0 ;
4089  int res1 = 0 ;
4091 
4092  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
4093  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4094  if (!SWIG_IsOK(res1)) {
4095  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_Solve" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
4096  }
4097  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4099  resultobj = SWIG_From_int(static_cast< int >(result));
4100  return resultobj;
4101 fail:
4102  return NULL;
4103 }
4104 
4105 
4106 SWIGINTERN PyObject *_wrap_Solver_Solve__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
4107  PyObject *resultobj = 0;
4110  void *argp1 = 0 ;
4111  int res1 = 0 ;
4112  void *argp2 = 0 ;
4113  int res2 = 0 ;
4115 
4116  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
4117  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4118  if (!SWIG_IsOK(res1)) {
4119  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_Solve" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
4120  }
4121  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4122  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_operations_research__MPSolverParameters, 0 | 0);
4123  if (!SWIG_IsOK(res2)) {
4124  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Solver_Solve" "', argument " "2"" of type '" "operations_research::MPSolverParameters const &""'");
4125  }
4126  if (!argp2) {
4127  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Solver_Solve" "', argument " "2"" of type '" "operations_research::MPSolverParameters const &""'");
4128  }
4129  arg2 = reinterpret_cast< operations_research::MPSolverParameters * >(argp2);
4131  resultobj = SWIG_From_int(static_cast< int >(result));
4132  return resultobj;
4133 fail:
4134  return NULL;
4135 }
4136 
4137 
4138 SWIGINTERN PyObject *_wrap_Solver_Solve(PyObject *self, PyObject *args) {
4139  Py_ssize_t argc;
4140  PyObject *argv[3] = {
4141  0
4142  };
4143 
4144  if (!(argc = SWIG_Python_UnpackTuple(args, "Solver_Solve", 0, 2, argv))) SWIG_fail;
4145  --argc;
4146  if (argc == 1) {
4147  int _v;
4148  void *vptr = 0;
4149  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_operations_research__MPSolver, 0);
4150  _v = SWIG_CheckState(res);
4151  if (_v) {
4152  return _wrap_Solver_Solve__SWIG_0(self, argc, argv);
4153  }
4154  }
4155  if (argc == 2) {
4156  int _v;
4157  void *vptr = 0;
4158  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_operations_research__MPSolver, 0);
4159  _v = SWIG_CheckState(res);
4160  if (_v) {
4162  _v = SWIG_CheckState(res);
4163  if (_v) {
4164  return _wrap_Solver_Solve__SWIG_1(self, argc, argv);
4165  }
4166  }
4167  }
4168 
4169 fail:
4170  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Solver_Solve'.\n"
4171  " Possible C/C++ prototypes are:\n"
4172  " operations_research::MPSolver::Solve()\n"
4173  " operations_research::MPSolver::Solve(operations_research::MPSolverParameters const &)\n");
4174  return 0;
4175 }
4176 
4177 
4178 SWIGINTERN PyObject *_wrap_Solver_ComputeConstraintActivities(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4179  PyObject *resultobj = 0;
4181  void *argp1 = 0 ;
4182  int res1 = 0 ;
4183  PyObject *swig_obj[1] ;
4184  std::vector< double > result;
4185 
4186  if (!args) SWIG_fail;
4187  swig_obj[0] = args;
4188  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4189  if (!SWIG_IsOK(res1)) {
4190  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_ComputeConstraintActivities" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
4191  }
4192  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4193  result = ((operations_research::MPSolver const *)arg1)->ComputeConstraintActivities();
4194  {
4195  resultobj = vector_output_helper(&result, &PyFloat_FromDouble);
4196  }
4197  return resultobj;
4198 fail:
4199  return NULL;
4200 }
4201 
4202 
4203 SWIGINTERN PyObject *_wrap_Solver_VerifySolution(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4204  PyObject *resultobj = 0;
4206  double arg2 ;
4207  bool arg3 ;
4208  void *argp1 = 0 ;
4209  int res1 = 0 ;
4210  double val2 ;
4211  int ecode2 = 0 ;
4212  bool val3 ;
4213  int ecode3 = 0 ;
4214  PyObject *swig_obj[3] ;
4215  bool result;
4216 
4217  if (!SWIG_Python_UnpackTuple(args, "Solver_VerifySolution", 3, 3, swig_obj)) SWIG_fail;
4218  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4219  if (!SWIG_IsOK(res1)) {
4220  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_VerifySolution" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
4221  }
4222  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4223  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
4224  if (!SWIG_IsOK(ecode2)) {
4225  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Solver_VerifySolution" "', argument " "2"" of type '" "double""'");
4226  }
4227  arg2 = static_cast< double >(val2);
4228  ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3);
4229  if (!SWIG_IsOK(ecode3)) {
4230  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Solver_VerifySolution" "', argument " "3"" of type '" "bool""'");
4231  }
4232  arg3 = static_cast< bool >(val3);
4233  result = (bool)((operations_research::MPSolver const *)arg1)->VerifySolution(arg2,arg3);
4234  resultobj = SWIG_From_bool(static_cast< bool >(result));
4235  return resultobj;
4236 fail:
4237  return NULL;
4238 }
4239 
4240 
4241 SWIGINTERN PyObject *_wrap_Solver_InterruptSolve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4242  PyObject *resultobj = 0;
4244  void *argp1 = 0 ;
4245  int res1 = 0 ;
4246  PyObject *swig_obj[1] ;
4247  bool result;
4248 
4249  if (!args) SWIG_fail;
4250  swig_obj[0] = args;
4251  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4252  if (!SWIG_IsOK(res1)) {
4253  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_InterruptSolve" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
4254  }
4255  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4256  result = (bool)(arg1)->InterruptSolve();
4257  resultobj = SWIG_From_bool(static_cast< bool >(result));
4258  return resultobj;
4259 fail:
4260  return NULL;
4261 }
4262 
4263 
4264 SWIGINTERN PyObject *_wrap_Solver_FillSolutionResponseProto(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4265  PyObject *resultobj = 0;
4268  void *argp1 = 0 ;
4269  int res1 = 0 ;
4270  PyObject *swig_obj[2] ;
4271 
4272  if (!SWIG_Python_UnpackTuple(args, "Solver_FillSolutionResponseProto", 2, 2, swig_obj)) SWIG_fail;
4273  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4274  if (!SWIG_IsOK(res1)) {
4275  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_FillSolutionResponseProto" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
4276  }
4277  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4278  {
4280  PyObject* const pyresult = PyObject_CallMethod(
4281  swig_obj[1], const_cast<char*>("SerializeToString"), nullptr);
4282  if (pyresult != nullptr) {
4283  char* buffer = nullptr;
4284  Py_ssize_t length = 0;
4285  int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
4286  if (buffer != nullptr) {
4287  arg2->ParseFromArray(buffer, length);
4288  }
4289  Py_DECREF(pyresult);
4290  }
4291  }
4292  ((operations_research::MPSolver const *)arg1)->FillSolutionResponseProto(arg2);
4293  resultobj = SWIG_Py_Void();
4294  {
4295  std::string encoded_protobuf;
4296  arg2->SerializeToString(&encoded_protobuf);
4297 
4298  PyObject* const python_encoded_protobuf =
4299  PyBytes_FromStringAndSize(encoded_protobuf.c_str(),
4300  encoded_protobuf.size());
4301 
4302 
4303 
4304 
4305 
4306  if (python_encoded_protobuf != nullptr) {
4307  PyObject* const result = PyObject_CallMethod(
4308  swig_obj[1], const_cast<char*>("ParseFromString"),
4309  const_cast<char*>("(O)"), python_encoded_protobuf);
4310  Py_DECREF(python_encoded_protobuf);
4311  if (result != nullptr) {
4312  Py_DECREF(result);
4313  }
4314  }
4315  }
4316  {
4317  delete arg2;
4318  }
4319  return resultobj;
4320 fail:
4321  {
4322  delete arg2;
4323  }
4324  return NULL;
4325 }
4326 
4327 
4328 SWIGINTERN PyObject *_wrap_Solver_SolveWithProto(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4329  PyObject *resultobj = 0;
4332  void *argp1 = 0 ;
4333  int res1 = 0 ;
4334  PyObject *swig_obj[2] ;
4335 
4336  if (!SWIG_Python_UnpackTuple(args, "Solver_SolveWithProto", 2, 2, swig_obj)) SWIG_fail;
4337  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_operations_research__MPModelRequest, 0 | 0);
4338  if (!SWIG_IsOK(res1)) {
4339  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_SolveWithProto" "', argument " "1"" of type '" "operations_research::MPModelRequest const &""'");
4340  }
4341  if (!argp1) {
4342  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Solver_SolveWithProto" "', argument " "1"" of type '" "operations_research::MPModelRequest const &""'");
4343  }
4344  arg1 = reinterpret_cast< operations_research::MPModelRequest * >(argp1);
4345  {
4347  PyObject* const pyresult = PyObject_CallMethod(
4348  swig_obj[1], const_cast<char*>("SerializeToString"), nullptr);
4349  if (pyresult != nullptr) {
4350  char* buffer = nullptr;
4351  Py_ssize_t length = 0;
4352  int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
4353  if (buffer != nullptr) {
4354  arg2->ParseFromArray(buffer, length);
4355  }
4356  Py_DECREF(pyresult);
4357  }
4358  }
4360  resultobj = SWIG_Py_Void();
4361  {
4362  std::string encoded_protobuf;
4363  arg2->SerializeToString(&encoded_protobuf);
4364 
4365  PyObject* const python_encoded_protobuf =
4366  PyBytes_FromStringAndSize(encoded_protobuf.c_str(),
4367  encoded_protobuf.size());
4368 
4369 
4370 
4371 
4372 
4373  if (python_encoded_protobuf != nullptr) {
4374  PyObject* const result = PyObject_CallMethod(
4375  swig_obj[1], const_cast<char*>("ParseFromString"),
4376  const_cast<char*>("(O)"), python_encoded_protobuf);
4377  Py_DECREF(python_encoded_protobuf);
4378  if (result != nullptr) {
4379  Py_DECREF(result);
4380  }
4381  }
4382  }
4383  {
4384  delete arg2;
4385  }
4386  return resultobj;
4387 fail:
4388  {
4389  delete arg2;
4390  }
4391  return NULL;
4392 }
4393 
4394 
4395 SWIGINTERN PyObject *_wrap_Solver_ExportModelToProto(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4396  PyObject *resultobj = 0;
4399  void *argp1 = 0 ;
4400  int res1 = 0 ;
4401  PyObject *swig_obj[2] ;
4402 
4403  if (!SWIG_Python_UnpackTuple(args, "Solver_ExportModelToProto", 2, 2, swig_obj)) SWIG_fail;
4404  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4405  if (!SWIG_IsOK(res1)) {
4406  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_ExportModelToProto" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
4407  }
4408  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4409  {
4411  PyObject* const pyresult = PyObject_CallMethod(
4412  swig_obj[1], const_cast<char*>("SerializeToString"), nullptr);
4413  if (pyresult != nullptr) {
4414  char* buffer = nullptr;
4415  Py_ssize_t length = 0;
4416  int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
4417  if (buffer != nullptr) {
4418  arg2->ParseFromArray(buffer, length);
4419  }
4420  Py_DECREF(pyresult);
4421  }
4422  }
4423  ((operations_research::MPSolver const *)arg1)->ExportModelToProto(arg2);
4424  resultobj = SWIG_Py_Void();
4425  {
4426  std::string encoded_protobuf;
4427  arg2->SerializeToString(&encoded_protobuf);
4428 
4429  PyObject* const python_encoded_protobuf =
4430  PyBytes_FromStringAndSize(encoded_protobuf.c_str(),
4431  encoded_protobuf.size());
4432 
4433 
4434 
4435 
4436 
4437  if (python_encoded_protobuf != nullptr) {
4438  PyObject* const result = PyObject_CallMethod(
4439  swig_obj[1], const_cast<char*>("ParseFromString"),
4440  const_cast<char*>("(O)"), python_encoded_protobuf);
4441  Py_DECREF(python_encoded_protobuf);
4442  if (result != nullptr) {
4443  Py_DECREF(result);
4444  }
4445  }
4446  }
4447  {
4448  delete arg2;
4449  }
4450  return resultobj;
4451 fail:
4452  {
4453  delete arg2;
4454  }
4455  return NULL;
4456 }
4457 
4458 
4460  PyObject *resultobj = 0;
4462  std::string *arg2 = 0 ;
4463  void *argp1 = 0 ;
4464  int res1 = 0 ;
4465  int res2 = SWIG_OLDOBJ ;
4466  PyObject *swig_obj[2] ;
4467  bool result;
4468 
4469  if (!SWIG_Python_UnpackTuple(args, "Solver_SetSolverSpecificParametersAsString", 2, 2, swig_obj)) SWIG_fail;
4470  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4471  if (!SWIG_IsOK(res1)) {
4472  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_SetSolverSpecificParametersAsString" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
4473  }
4474  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4475  {
4476  std::string *ptr = (std::string *)0;
4477  res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr);
4478  if (!SWIG_IsOK(res2)) {
4479  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Solver_SetSolverSpecificParametersAsString" "', argument " "2"" of type '" "std::string const &""'");
4480  }
4481  if (!ptr) {
4482  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Solver_SetSolverSpecificParametersAsString" "', argument " "2"" of type '" "std::string const &""'");
4483  }
4484  arg2 = ptr;
4485  }
4486  result = (bool)(arg1)->SetSolverSpecificParametersAsString((std::string const &)*arg2);
4487  resultobj = SWIG_From_bool(static_cast< bool >(result));
4488  if (SWIG_IsNewObj(res2)) delete arg2;
4489  return resultobj;
4490 fail:
4491  if (SWIG_IsNewObj(res2)) delete arg2;
4492  return NULL;
4493 }
4494 
4495 
4496 SWIGINTERN PyObject *_wrap_Solver_infinity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4497  PyObject *resultobj = 0;
4498  double result;
4499 
4500  if (!SWIG_Python_UnpackTuple(args, "Solver_infinity", 0, 0, 0)) SWIG_fail;
4501  result = (double)operations_research::MPSolver::infinity();
4502  resultobj = SWIG_From_double(static_cast< double >(result));
4503  return resultobj;
4504 fail:
4505  return NULL;
4506 }
4507 
4508 
4509 SWIGINTERN PyObject *_wrap_Solver_EnableOutput(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4510  PyObject *resultobj = 0;
4512  void *argp1 = 0 ;
4513  int res1 = 0 ;
4514  PyObject *swig_obj[1] ;
4515 
4516  if (!args) SWIG_fail;
4517  swig_obj[0] = args;
4518  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4519  if (!SWIG_IsOK(res1)) {
4520  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_EnableOutput" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
4521  }
4522  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4523  (arg1)->EnableOutput();
4524  resultobj = SWIG_Py_Void();
4525  return resultobj;
4526 fail:
4527  return NULL;
4528 }
4529 
4530 
4531 SWIGINTERN PyObject *_wrap_Solver_SuppressOutput(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4532  PyObject *resultobj = 0;
4534  void *argp1 = 0 ;
4535  int res1 = 0 ;
4536  PyObject *swig_obj[1] ;
4537 
4538  if (!args) SWIG_fail;
4539  swig_obj[0] = args;
4540  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4541  if (!SWIG_IsOK(res1)) {
4542  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_SuppressOutput" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
4543  }
4544  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4545  (arg1)->SuppressOutput();
4546  resultobj = SWIG_Py_Void();
4547  return resultobj;
4548 fail:
4549  return NULL;
4550 }
4551 
4552 
4553 SWIGINTERN PyObject *_wrap_Solver_iterations(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4554  PyObject *resultobj = 0;
4556  void *argp1 = 0 ;
4557  int res1 = 0 ;
4558  PyObject *swig_obj[1] ;
4559  int64 result;
4560 
4561  if (!args) SWIG_fail;
4562  swig_obj[0] = args;
4563  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4564  if (!SWIG_IsOK(res1)) {
4565  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_iterations" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
4566  }
4567  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4568  result = (int64)((operations_research::MPSolver const *)arg1)->iterations();
4569  resultobj = SWIG_From_long(static_cast< long >(result));
4570  return resultobj;
4571 fail:
4572  return NULL;
4573 }
4574 
4575 
4576 SWIGINTERN PyObject *_wrap_Solver_nodes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4577  PyObject *resultobj = 0;
4579  void *argp1 = 0 ;
4580  int res1 = 0 ;
4581  PyObject *swig_obj[1] ;
4582  int64 result;
4583 
4584  if (!args) SWIG_fail;
4585  swig_obj[0] = args;
4586  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4587  if (!SWIG_IsOK(res1)) {
4588  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_nodes" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
4589  }
4590  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4591  result = (int64)((operations_research::MPSolver const *)arg1)->nodes();
4592  resultobj = SWIG_From_long(static_cast< long >(result));
4593  return resultobj;
4594 fail:
4595  return NULL;
4596 }
4597 
4598 
4599 SWIGINTERN PyObject *_wrap_Solver_ComputeExactConditionNumber(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4600  PyObject *resultobj = 0;
4602  void *argp1 = 0 ;
4603  int res1 = 0 ;
4604  PyObject *swig_obj[1] ;
4605  double result;
4606 
4607  if (!args) SWIG_fail;
4608  swig_obj[0] = args;
4609  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4610  if (!SWIG_IsOK(res1)) {
4611  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_ComputeExactConditionNumber" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
4612  }
4613  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4614  result = (double)((operations_research::MPSolver const *)arg1)->ComputeExactConditionNumber();
4615  resultobj = SWIG_From_double(static_cast< double >(result));
4616  return resultobj;
4617 fail:
4618  return NULL;
4619 }
4620 
4621 
4622 SWIGINTERN PyObject *_wrap_Solver_NextSolution(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4623  PyObject *resultobj = 0;
4625  void *argp1 = 0 ;
4626  int res1 = 0 ;
4627  PyObject *swig_obj[1] ;
4628  bool result;
4629 
4630  if (!args) SWIG_fail;
4631  swig_obj[0] = args;
4632  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4633  if (!SWIG_IsOK(res1)) {
4634  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_NextSolution" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
4635  }
4636  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4637  result = (bool)(arg1)->NextSolution();
4638  resultobj = SWIG_From_bool(static_cast< bool >(result));
4639  return resultobj;
4640 fail:
4641  return NULL;
4642 }
4643 
4644 
4645 SWIGINTERN PyObject *_wrap_Solver_set_time_limit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4646  PyObject *resultobj = 0;
4648  int64 arg2 ;
4649  void *argp1 = 0 ;
4650  int res1 = 0 ;
4651  long val2 ;
4652  int ecode2 = 0 ;
4653  PyObject *swig_obj[2] ;
4654 
4655  if (!SWIG_Python_UnpackTuple(args, "Solver_set_time_limit", 2, 2, swig_obj)) SWIG_fail;
4656  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4657  if (!SWIG_IsOK(res1)) {
4658  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_set_time_limit" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
4659  }
4660  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4661  ecode2 = SWIG_AsVal_long(swig_obj[1], &val2);
4662  if (!SWIG_IsOK(ecode2)) {
4663  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Solver_set_time_limit" "', argument " "2"" of type '" "int64""'");
4664  }
4665  arg2 = static_cast< int64 >(val2);
4666  (arg1)->set_time_limit(arg2);
4667  resultobj = SWIG_Py_Void();
4668  return resultobj;
4669 fail:
4670  return NULL;
4671 }
4672 
4673 
4674 SWIGINTERN PyObject *_wrap_Solver_wall_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4675  PyObject *resultobj = 0;
4677  void *argp1 = 0 ;
4678  int res1 = 0 ;
4679  PyObject *swig_obj[1] ;
4680  int64 result;
4681 
4682  if (!args) SWIG_fail;
4683  swig_obj[0] = args;
4684  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4685  if (!SWIG_IsOK(res1)) {
4686  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_wall_time" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
4687  }
4688  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4689  result = (int64)((operations_research::MPSolver const *)arg1)->wall_time();
4690  resultobj = SWIG_From_long(static_cast< long >(result));
4691  return resultobj;
4692 fail:
4693  return NULL;
4694 }
4695 
4696 
4697 SWIGINTERN PyObject *_wrap_Solver_SetGurobiLibraryPath(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4698  PyObject *resultobj = 0;
4699  std::string *arg1 = 0 ;
4700  int res1 = SWIG_OLDOBJ ;
4701  PyObject *swig_obj[1] ;
4702 
4703  if (!args) SWIG_fail;
4704  swig_obj[0] = args;
4705  {
4706  std::string *ptr = (std::string *)0;
4707  res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr);
4708  if (!SWIG_IsOK(res1)) {
4709  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_SetGurobiLibraryPath" "', argument " "1"" of type '" "std::string const &""'");
4710  }
4711  if (!ptr) {
4712  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Solver_SetGurobiLibraryPath" "', argument " "1"" of type '" "std::string const &""'");
4713  }
4714  arg1 = ptr;
4715  }
4716  operations_research::MPSolver::SetGurobiLibraryPath((std::string const &)*arg1);
4717  resultobj = SWIG_Py_Void();
4718  if (SWIG_IsNewObj(res1)) delete arg1;
4719  return resultobj;
4720 fail:
4721  if (SWIG_IsNewObj(res1)) delete arg1;
4722  return NULL;
4723 }
4724 
4725 
4726 SWIGINTERN PyObject *_wrap_Solver_LoadModelFromProto(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4727  PyObject *resultobj = 0;
4730  void *argp1 = 0 ;
4731  int res1 = 0 ;
4732  PyObject *swig_obj[2] ;
4733  std::string result;
4734 
4735  if (!SWIG_Python_UnpackTuple(args, "Solver_LoadModelFromProto", 2, 2, swig_obj)) SWIG_fail;
4736  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4737  if (!SWIG_IsOK(res1)) {
4738  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_LoadModelFromProto" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
4739  }
4740  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4741  {
4743  PyObject* const pyresult = PyObject_CallMethod(
4744  swig_obj[1], const_cast<char*>("SerializeToString"), nullptr);
4745  if (pyresult != nullptr) {
4746  char* buffer = nullptr;
4747  Py_ssize_t length = 0;
4748  int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
4749  if (buffer != nullptr) {
4750  arg2->ParseFromArray(buffer, length);
4751  }
4752  Py_DECREF(pyresult);
4753  }
4754  }
4756  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
4757  {
4758  delete arg2;
4759  }
4760  return resultobj;
4761 fail:
4762  {
4763  delete arg2;
4764  }
4765  return NULL;
4766 }
4767 
4768 
4769 SWIGINTERN PyObject *_wrap_Solver_LoadSolutionFromProto__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
4770  PyObject *resultobj = 0;
4773  double arg3 ;
4774  void *argp1 = 0 ;
4775  int res1 = 0 ;
4776  double val3 ;
4777  int ecode3 = 0 ;
4778  bool result;
4779 
4780  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
4781  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4782  if (!SWIG_IsOK(res1)) {
4783  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_LoadSolutionFromProto" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
4784  }
4785  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4786  {
4788  PyObject* const pyresult = PyObject_CallMethod(
4789  swig_obj[1], const_cast<char*>("SerializeToString"), nullptr);
4790  if (pyresult != nullptr) {
4791  char* buffer = nullptr;
4792  Py_ssize_t length = 0;
4793  int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
4794  if (buffer != nullptr) {
4795  arg2->ParseFromArray(buffer, length);
4796  }
4797  Py_DECREF(pyresult);
4798  }
4799  }
4800  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
4801  if (!SWIG_IsOK(ecode3)) {
4802  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Solver_LoadSolutionFromProto" "', argument " "3"" of type '" "double""'");
4803  }
4804  arg3 = static_cast< double >(val3);
4806  resultobj = SWIG_From_bool(static_cast< bool >(result));
4807  {
4808  delete arg2;
4809  }
4810  return resultobj;
4811 fail:
4812  {
4813  delete arg2;
4814  }
4815  return NULL;
4816 }
4817 
4818 
4819 SWIGINTERN PyObject *_wrap_Solver_LoadSolutionFromProto__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
4820  PyObject *resultobj = 0;
4823  void *argp1 = 0 ;
4824  int res1 = 0 ;
4825  bool result;
4826 
4827  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
4828  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4829  if (!SWIG_IsOK(res1)) {
4830  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_LoadSolutionFromProto" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
4831  }
4832  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4833  {
4835  PyObject* const pyresult = PyObject_CallMethod(
4836  swig_obj[1], const_cast<char*>("SerializeToString"), nullptr);
4837  if (pyresult != nullptr) {
4838  char* buffer = nullptr;
4839  Py_ssize_t length = 0;
4840  int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
4841  if (buffer != nullptr) {
4842  arg2->ParseFromArray(buffer, length);
4843  }
4844  Py_DECREF(pyresult);
4845  }
4846  }
4848  resultobj = SWIG_From_bool(static_cast< bool >(result));
4849  {
4850  delete arg2;
4851  }
4852  return resultobj;
4853 fail:
4854  {
4855  delete arg2;
4856  }
4857  return NULL;
4858 }
4859 
4860 
4861 SWIGINTERN PyObject *_wrap_Solver_LoadSolutionFromProto(PyObject *self, PyObject *args) {
4862  Py_ssize_t argc;
4863  PyObject *argv[4] = {
4864  0
4865  };
4866 
4867  if (!(argc = SWIG_Python_UnpackTuple(args, "Solver_LoadSolutionFromProto", 0, 3, argv))) SWIG_fail;
4868  --argc;
4869  if (argc == 2) {
4870  int _v;
4871  void *vptr = 0;
4872  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_operations_research__MPSolver, 0);
4873  _v = SWIG_CheckState(res);
4874  if (_v) {
4875  {
4876  bool ok = false;
4877  PyObject* const module = PyImport_ImportModule("ortools.linear_solver.linear_solver_pb2");
4878  if (module != nullptr) {
4879  PyObject* const dict = PyModule_GetDict(module);
4880  if (dict != nullptr) {
4881  PyObject* const clss = PyDict_GetItemString(dict, "MPSolutionResponse");
4882  if (clss != nullptr) {
4883  if (PyObject_IsInstance(argv[1], clss)) {
4884  ok = true;
4885  }
4886  }
4887  }
4888  Py_DECREF(module);
4889  }
4890  _v = ok ? 1 : 0;
4891  }
4892  if (_v) {
4893  return _wrap_Solver_LoadSolutionFromProto__SWIG_1(self, argc, argv);
4894  }
4895  }
4896  }
4897  if (argc == 3) {
4898  int _v;
4899  void *vptr = 0;
4900  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_operations_research__MPSolver, 0);
4901  _v = SWIG_CheckState(res);
4902  if (_v) {
4903  {
4904  bool ok = false;
4905  PyObject* const module = PyImport_ImportModule("ortools.linear_solver.linear_solver_pb2");
4906  if (module != nullptr) {
4907  PyObject* const dict = PyModule_GetDict(module);
4908  if (dict != nullptr) {
4909  PyObject* const clss = PyDict_GetItemString(dict, "MPSolutionResponse");
4910  if (clss != nullptr) {
4911  if (PyObject_IsInstance(argv[1], clss)) {
4912  ok = true;
4913  }
4914  }
4915  }
4916  Py_DECREF(module);
4917  }
4918  _v = ok ? 1 : 0;
4919  }
4920  if (_v) {
4921  {
4922  int res = SWIG_AsVal_double(argv[2], NULL);
4923  _v = SWIG_CheckState(res);
4924  }
4925  if (_v) {
4926  return _wrap_Solver_LoadSolutionFromProto__SWIG_0(self, argc, argv);
4927  }
4928  }
4929  }
4930  }
4931 
4932 fail:
4933  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Solver_LoadSolutionFromProto'.\n"
4934  " Possible C/C++ prototypes are:\n"
4935  " operations_research::MPSolver::LoadSolutionFromProto(operations_research::MPSolutionResponse const &,double)\n"
4936  " operations_research::MPSolver::LoadSolutionFromProto(operations_research::MPSolutionResponse const &)\n");
4937  return 0;
4938 }
4939 
4940 
4941 SWIGINTERN PyObject *_wrap_Solver_ExportModelAsLpFormat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4942  PyObject *resultobj = 0;
4944  bool arg2 ;
4945  void *argp1 = 0 ;
4946  int res1 = 0 ;
4947  bool val2 ;
4948  int ecode2 = 0 ;
4949  PyObject *swig_obj[2] ;
4950  std::string result;
4951 
4952  if (!SWIG_Python_UnpackTuple(args, "Solver_ExportModelAsLpFormat", 2, 2, swig_obj)) SWIG_fail;
4953  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4954  if (!SWIG_IsOK(res1)) {
4955  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_ExportModelAsLpFormat" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
4956  }
4957  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4958  ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
4959  if (!SWIG_IsOK(ecode2)) {
4960  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Solver_ExportModelAsLpFormat" "', argument " "2"" of type '" "bool""'");
4961  }
4962  arg2 = static_cast< bool >(val2);
4964  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
4965  return resultobj;
4966 fail:
4967  return NULL;
4968 }
4969 
4970 
4971 SWIGINTERN PyObject *_wrap_Solver_ExportModelAsMpsFormat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4972  PyObject *resultobj = 0;
4974  bool arg2 ;
4975  bool arg3 ;
4976  void *argp1 = 0 ;
4977  int res1 = 0 ;
4978  bool val2 ;
4979  int ecode2 = 0 ;
4980  bool val3 ;
4981  int ecode3 = 0 ;
4982  PyObject *swig_obj[3] ;
4983  std::string result;
4984 
4985  if (!SWIG_Python_UnpackTuple(args, "Solver_ExportModelAsMpsFormat", 3, 3, swig_obj)) SWIG_fail;
4986  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4987  if (!SWIG_IsOK(res1)) {
4988  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_ExportModelAsMpsFormat" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
4989  }
4990  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4991  ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
4992  if (!SWIG_IsOK(ecode2)) {
4993  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Solver_ExportModelAsMpsFormat" "', argument " "2"" of type '" "bool""'");
4994  }
4995  arg2 = static_cast< bool >(val2);
4996  ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3);
4997  if (!SWIG_IsOK(ecode3)) {
4998  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Solver_ExportModelAsMpsFormat" "', argument " "3"" of type '" "bool""'");
4999  }
5000  arg3 = static_cast< bool >(val3);
5001  result = operations_research_MPSolver_ExportModelAsMpsFormat(arg1,arg2,arg3);
5002  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
5003  return resultobj;
5004 fail:
5005  return NULL;
5006 }
5007 
5008 
5009 SWIGINTERN PyObject *_wrap_Solver_SetHint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5010  PyObject *resultobj = 0;
5012  std::vector< operations_research::MPVariable * > *arg2 = 0 ;
5013  std::vector< double > *arg3 = 0 ;
5014  void *argp1 = 0 ;
5015  int res1 = 0 ;
5016  std::vector< operations_research::MPVariable * > temp2 ;
5017  std::vector< double > temp3 ;
5018  PyObject *swig_obj[3] ;
5019 
5020  if (!SWIG_Python_UnpackTuple(args, "Solver_SetHint", 3, 3, swig_obj)) SWIG_fail;
5021  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
5022  if (!SWIG_IsOK(res1)) {
5023  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_SetHint" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
5024  }
5025  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
5026  {
5027  if (!vector_input_helper(swig_obj[1], &temp2, PyObjAs<operations_research::MPVariable*>)) {
5028  if (!PyErr_Occurred())
5029  SWIG_Error(SWIG_TypeError, "sequence(operations_research::MPVariable*) expected");
5030  return NULL;
5031  }
5032  arg2 = &temp2;
5033  }
5034  {
5035  if (!vector_input_helper(swig_obj[2], &temp3, PyObjAs<double>)) {
5036  if (!PyErr_Occurred())
5037  SWIG_Error(SWIG_TypeError, "sequence(double) expected");
5038  return NULL;
5039  }
5040  arg3 = &temp3;
5041  }
5042  operations_research_MPSolver_SetHint(arg1,(std::vector< operations_research::MPVariable * > const &)*arg2,(std::vector< double > const &)*arg3);
5043  resultobj = SWIG_Py_Void();
5044  return resultobj;
5045 fail:
5046  return NULL;
5047 }
5048 
5049 
5050 SWIGINTERN PyObject *_wrap_Solver_SetNumThreads(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5051  PyObject *resultobj = 0;
5053  int arg2 ;
5054  void *argp1 = 0 ;
5055  int res1 = 0 ;
5056  int val2 ;
5057  int ecode2 = 0 ;
5058  PyObject *swig_obj[2] ;
5059  bool result;
5060 
5061  if (!SWIG_Python_UnpackTuple(args, "Solver_SetNumThreads", 2, 2, swig_obj)) SWIG_fail;
5062  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
5063  if (!SWIG_IsOK(res1)) {
5064  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_SetNumThreads" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
5065  }
5066  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
5067  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
5068  if (!SWIG_IsOK(ecode2)) {
5069  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Solver_SetNumThreads" "', argument " "2"" of type '" "int""'");
5070  }
5071  arg2 = static_cast< int >(val2);
5072  result = (bool)operations_research_MPSolver_SetNumThreads(arg1,arg2);
5073  resultobj = SWIG_From_bool(static_cast< bool >(result));
5074  return resultobj;
5075 fail:
5076  return NULL;
5077 }
5078 
5079 
5080 SWIGINTERN PyObject *_wrap_Solver_Infinity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5081  PyObject *resultobj = 0;
5082  double result;
5083 
5084  if (!SWIG_Python_UnpackTuple(args, "Solver_Infinity", 0, 0, 0)) SWIG_fail;
5085  result = (double)operations_research_MPSolver_Infinity();
5086  resultobj = SWIG_From_double(static_cast< double >(result));
5087  return resultobj;
5088 fail:
5089  return NULL;
5090 }
5091 
5092 
5093 SWIGINTERN PyObject *_wrap_Solver_SetTimeLimit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5094  PyObject *resultobj = 0;
5096  int64 arg2 ;
5097  void *argp1 = 0 ;
5098  int res1 = 0 ;
5099  long val2 ;
5100  int ecode2 = 0 ;
5101  PyObject *swig_obj[2] ;
5102 
5103  if (!SWIG_Python_UnpackTuple(args, "Solver_SetTimeLimit", 2, 2, swig_obj)) SWIG_fail;
5104  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
5105  if (!SWIG_IsOK(res1)) {
5106  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_SetTimeLimit" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
5107  }
5108  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
5109  ecode2 = SWIG_AsVal_long(swig_obj[1], &val2);
5110  if (!SWIG_IsOK(ecode2)) {
5111  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Solver_SetTimeLimit" "', argument " "2"" of type '" "int64""'");
5112  }
5113  arg2 = static_cast< int64 >(val2);
5115  resultobj = SWIG_Py_Void();
5116  return resultobj;
5117 fail:
5118  return NULL;
5119 }
5120 
5121 
5122 SWIGINTERN PyObject *_wrap_Solver_WallTime(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5123  PyObject *resultobj = 0;
5125  void *argp1 = 0 ;
5126  int res1 = 0 ;
5127  PyObject *swig_obj[1] ;
5128  int64 result;
5129 
5130  if (!args) SWIG_fail;
5131  swig_obj[0] = args;
5132  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
5133  if (!SWIG_IsOK(res1)) {
5134  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_WallTime" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
5135  }
5136  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
5138  resultobj = SWIG_From_long(static_cast< long >(result));
5139  return resultobj;
5140 fail:
5141  return NULL;
5142 }
5143 
5144 
5145 SWIGINTERN PyObject *_wrap_Solver_Iterations(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5146  PyObject *resultobj = 0;
5148  void *argp1 = 0 ;
5149  int res1 = 0 ;
5150  PyObject *swig_obj[1] ;
5151  int64 result;
5152 
5153  if (!args) SWIG_fail;
5154  swig_obj[0] = args;
5155  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
5156  if (!SWIG_IsOK(res1)) {
5157  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_Iterations" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
5158  }
5159  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
5161  resultobj = SWIG_From_long(static_cast< long >(result));
5162  return resultobj;
5163 fail:
5164  return NULL;
5165 }
5166 
5167 
5168 SWIGINTERN PyObject *Solver_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5169  PyObject *obj;
5170  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
5172  return SWIG_Py_Void();
5173 }
5174 
5175 SWIGINTERN PyObject *Solver_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5176  return SWIG_Python_InitShadowInstance(args);
5177 }
5178 
5179 SWIGINTERN PyObject *_wrap___lshift____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
5180  PyObject *resultobj = 0;
5181  std::ostream *arg1 = 0 ;
5183  void *argp1 = 0 ;
5184  int res1 = 0 ;
5185  int val2 ;
5186  int ecode2 = 0 ;
5187  std::ostream *result = 0 ;
5188 
5189  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
5190  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_std__ostream, 0 );
5191  if (!SWIG_IsOK(res1)) {
5192  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__lshift__" "', argument " "1"" of type '" "std::ostream &""'");
5193  }
5194  if (!argp1) {
5195  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__lshift__" "', argument " "1"" of type '" "std::ostream &""'");
5196  }
5197  arg1 = reinterpret_cast< std::ostream * >(argp1);
5198  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
5199  if (!SWIG_IsOK(ecode2)) {
5200  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "__lshift__" "', argument " "2"" of type '" "operations_research::MPSolver::OptimizationProblemType""'");
5201  }
5202  arg2 = static_cast< operations_research::MPSolver::OptimizationProblemType >(val2);
5203  result = (std::ostream *) &operations_research::operator <<(*arg1,arg2);
5204  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__ostream, 0 | 0 );
5205  return resultobj;
5206 fail:
5207  PyErr_Clear();
5208  Py_INCREF(Py_NotImplemented);
5209  return Py_NotImplemented;
5210 }
5211 
5212 
5213 SWIGINTERN PyObject *_wrap___lshift____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
5214  PyObject *resultobj = 0;
5215  std::ostream *arg1 = 0 ;
5217  void *argp1 = 0 ;
5218  int res1 = 0 ;
5219  int val2 ;
5220  int ecode2 = 0 ;
5221  std::ostream *result = 0 ;
5222 
5223  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
5224  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_std__ostream, 0 );
5225  if (!SWIG_IsOK(res1)) {
5226  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__lshift__" "', argument " "1"" of type '" "std::ostream &""'");
5227  }
5228  if (!argp1) {
5229  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__lshift__" "', argument " "1"" of type '" "std::ostream &""'");
5230  }
5231  arg1 = reinterpret_cast< std::ostream * >(argp1);
5232  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
5233  if (!SWIG_IsOK(ecode2)) {
5234  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "__lshift__" "', argument " "2"" of type '" "operations_research::MPSolver::ResultStatus""'");
5235  }
5236  arg2 = static_cast< operations_research::MPSolver::ResultStatus >(val2);
5237  result = (std::ostream *) &operations_research::operator <<(*arg1,arg2);
5238  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__ostream, 0 | 0 );
5239  return resultobj;
5240 fail:
5241  PyErr_Clear();
5242  Py_INCREF(Py_NotImplemented);
5243  return Py_NotImplemented;
5244 }
5245 
5246 
5247 SWIGINTERN PyObject *_wrap___lshift__(PyObject *self, PyObject *args) {
5248  Py_ssize_t argc;
5249  PyObject *argv[3] = {
5250  0
5251  };
5252 
5253  if (!(argc = SWIG_Python_UnpackTuple(args, "__lshift__", 0, 2, argv))) SWIG_fail;
5254  --argc;
5255  if (argc == 2) {
5256  int _v;
5257  void *vptr = 0;
5258  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__ostream, SWIG_POINTER_NO_NULL);
5259  _v = SWIG_CheckState(res);
5260  if (_v) {
5261  {
5262  int res = SWIG_AsVal_int(argv[1], NULL);
5263  _v = SWIG_CheckState(res);
5264  }
5265  if (_v) {
5266  return _wrap___lshift____SWIG_0(self, argc, argv);
5267  }
5268  }
5269  }
5270  if (argc == 2) {
5271  int _v;
5272  void *vptr = 0;
5273  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__ostream, SWIG_POINTER_NO_NULL);
5274  _v = SWIG_CheckState(res);
5275  if (_v) {
5276  {
5277  int res = SWIG_AsVal_int(argv[1], NULL);
5278  _v = SWIG_CheckState(res);
5279  }
5280  if (_v) {
5281  return _wrap___lshift____SWIG_1(self, argc, argv);
5282  }
5283  }
5284  }
5285 
5286 fail:
5287  Py_INCREF(Py_NotImplemented);
5288  return Py_NotImplemented;
5289 }
5290 
5291 
5292 SWIGINTERN PyObject *_wrap_Objective_Clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5293  PyObject *resultobj = 0;
5295  void *argp1 = 0 ;
5296  int res1 = 0 ;
5297  PyObject *swig_obj[1] ;
5298 
5299  if (!args) SWIG_fail;
5300  swig_obj[0] = args;
5301  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPObjective, 0 | 0 );
5302  if (!SWIG_IsOK(res1)) {
5303  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Objective_Clear" "', argument " "1"" of type '" "operations_research::MPObjective *""'");
5304  }
5305  arg1 = reinterpret_cast< operations_research::MPObjective * >(argp1);
5306  (arg1)->Clear();
5307  resultobj = SWIG_Py_Void();
5308  return resultobj;
5309 fail:
5310  return NULL;
5311 }
5312 
5313 
5314 SWIGINTERN PyObject *_wrap_Objective_SetCoefficient(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5315  PyObject *resultobj = 0;
5318  double arg3 ;
5319  void *argp1 = 0 ;
5320  int res1 = 0 ;
5321  double val3 ;
5322  int ecode3 = 0 ;
5323  PyObject *swig_obj[3] ;
5324 
5325  if (!SWIG_Python_UnpackTuple(args, "Objective_SetCoefficient", 3, 3, swig_obj)) SWIG_fail;
5326  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPObjective, 0 | 0 );
5327  if (!SWIG_IsOK(res1)) {
5328  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Objective_SetCoefficient" "', argument " "1"" of type '" "operations_research::MPObjective *""'");
5329  }
5330  arg1 = reinterpret_cast< operations_research::MPObjective * >(argp1);
5331  {
5332  if (!PyObjAs(swig_obj[1], &arg2)) SWIG_fail;
5333  }
5334  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
5335  if (!SWIG_IsOK(ecode3)) {
5336  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Objective_SetCoefficient" "', argument " "3"" of type '" "double""'");
5337  }
5338  arg3 = static_cast< double >(val3);
5339  (arg1)->SetCoefficient((operations_research::MPVariable const *)arg2,arg3);
5340  resultobj = SWIG_Py_Void();
5341  return resultobj;
5342 fail:
5343  return NULL;
5344 }
5345 
5346 
5347 SWIGINTERN PyObject *_wrap_Objective_GetCoefficient(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5348  PyObject *resultobj = 0;
5351  void *argp1 = 0 ;
5352  int res1 = 0 ;
5353  PyObject *swig_obj[2] ;
5354  double result;
5355 
5356  if (!SWIG_Python_UnpackTuple(args, "Objective_GetCoefficient", 2, 2, swig_obj)) SWIG_fail;
5357  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPObjective, 0 | 0 );
5358  if (!SWIG_IsOK(res1)) {
5359  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Objective_GetCoefficient" "', argument " "1"" of type '" "operations_research::MPObjective const *""'");
5360  }
5361  arg1 = reinterpret_cast< operations_research::MPObjective * >(argp1);
5362  {
5363  if (!PyObjAs(swig_obj[1], &arg2)) SWIG_fail;
5364  }
5365  result = (double)((operations_research::MPObjective const *)arg1)->GetCoefficient((operations_research::MPVariable const *)arg2);
5366  resultobj = SWIG_From_double(static_cast< double >(result));
5367  return resultobj;
5368 fail:
5369  return NULL;
5370 }
5371 
5372 
5373 SWIGINTERN PyObject *_wrap_Objective_SetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5374  PyObject *resultobj = 0;
5376  double arg2 ;
5377  void *argp1 = 0 ;
5378  int res1 = 0 ;
5379  double val2 ;
5380  int ecode2 = 0 ;
5381  PyObject *swig_obj[2] ;
5382 
5383  if (!SWIG_Python_UnpackTuple(args, "Objective_SetOffset", 2, 2, swig_obj)) SWIG_fail;
5384  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPObjective, 0 | 0 );
5385  if (!SWIG_IsOK(res1)) {
5386  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Objective_SetOffset" "', argument " "1"" of type '" "operations_research::MPObjective *""'");
5387  }
5388  arg1 = reinterpret_cast< operations_research::MPObjective * >(argp1);
5389  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
5390  if (!SWIG_IsOK(ecode2)) {
5391  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Objective_SetOffset" "', argument " "2"" of type '" "double""'");
5392  }
5393  arg2 = static_cast< double >(val2);
5394  (arg1)->SetOffset(arg2);
5395  resultobj = SWIG_Py_Void();
5396  return resultobj;
5397 fail:
5398  return NULL;
5399 }
5400 
5401 
5402 SWIGINTERN PyObject *_wrap_Objective_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5403  PyObject *resultobj = 0;
5405  void *argp1 = 0 ;
5406  int res1 = 0 ;
5407  PyObject *swig_obj[1] ;
5408  double result;
5409 
5410  if (!args) SWIG_fail;
5411  swig_obj[0] = args;
5412  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPObjective, 0 | 0 );
5413  if (!SWIG_IsOK(res1)) {
5414  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Objective_offset" "', argument " "1"" of type '" "operations_research::MPObjective const *""'");
5415  }
5416  arg1 = reinterpret_cast< operations_research::MPObjective * >(argp1);
5417  result = (double)((operations_research::MPObjective const *)arg1)->offset();
5418  resultobj = SWIG_From_double(static_cast< double >(result));
5419  return resultobj;
5420 fail:
5421  return NULL;
5422 }
5423 
5424 
5425 SWIGINTERN PyObject *_wrap_Objective_SetOptimizationDirection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5426  PyObject *resultobj = 0;
5428  bool arg2 ;
5429  void *argp1 = 0 ;
5430  int res1 = 0 ;
5431  bool val2 ;
5432  int ecode2 = 0 ;
5433  PyObject *swig_obj[2] ;
5434 
5435  if (!SWIG_Python_UnpackTuple(args, "Objective_SetOptimizationDirection", 2, 2, swig_obj)) SWIG_fail;
5436  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPObjective, 0 | 0 );
5437  if (!SWIG_IsOK(res1)) {
5438  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Objective_SetOptimizationDirection" "', argument " "1"" of type '" "operations_research::MPObjective *""'");
5439  }
5440  arg1 = reinterpret_cast< operations_research::MPObjective * >(argp1);
5441  ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
5442  if (!SWIG_IsOK(ecode2)) {
5443  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Objective_SetOptimizationDirection" "', argument " "2"" of type '" "bool""'");
5444  }
5445  arg2 = static_cast< bool >(val2);
5446  (arg1)->SetOptimizationDirection(arg2);
5447  resultobj = SWIG_Py_Void();
5448  return resultobj;
5449 fail:
5450  return NULL;
5451 }
5452 
5453 
5454 SWIGINTERN PyObject *_wrap_Objective_SetMinimization(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5455  PyObject *resultobj = 0;
5457  void *argp1 = 0 ;
5458  int res1 = 0 ;
5459  PyObject *swig_obj[1] ;
5460 
5461  if (!args) SWIG_fail;
5462  swig_obj[0] = args;
5463  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPObjective, 0 | 0 );
5464  if (!SWIG_IsOK(res1)) {
5465  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Objective_SetMinimization" "', argument " "1"" of type '" "operations_research::MPObjective *""'");
5466  }
5467  arg1 = reinterpret_cast< operations_research::MPObjective * >(argp1);
5468  (arg1)->SetMinimization();
5469  resultobj = SWIG_Py_Void();
5470  return resultobj;
5471 fail:
5472  return NULL;
5473 }
5474 
5475 
5476 SWIGINTERN PyObject *_wrap_Objective_SetMaximization(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5477  PyObject *resultobj = 0;
5479  void *argp1 = 0 ;
5480  int res1 = 0 ;
5481  PyObject *swig_obj[1] ;
5482 
5483  if (!args) SWIG_fail;
5484  swig_obj[0] = args;
5485  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPObjective, 0 | 0 );
5486  if (!SWIG_IsOK(res1)) {
5487  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Objective_SetMaximization" "', argument " "1"" of type '" "operations_research::MPObjective *""'");
5488  }
5489  arg1 = reinterpret_cast< operations_research::MPObjective * >(argp1);
5490  (arg1)->SetMaximization();
5491  resultobj = SWIG_Py_Void();
5492  return resultobj;
5493 fail:
5494  return NULL;
5495 }
5496 
5497 
5498 SWIGINTERN PyObject *_wrap_Objective_maximization(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5499  PyObject *resultobj = 0;
5501  void *argp1 = 0 ;
5502  int res1 = 0 ;
5503  PyObject *swig_obj[1] ;
5504  bool result;
5505 
5506  if (!args) SWIG_fail;
5507  swig_obj[0] = args;
5508  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPObjective, 0 | 0 );
5509  if (!SWIG_IsOK(res1)) {
5510  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Objective_maximization" "', argument " "1"" of type '" "operations_research::MPObjective const *""'");
5511  }
5512  arg1 = reinterpret_cast< operations_research::MPObjective * >(argp1);
5513  result = (bool)((operations_research::MPObjective const *)arg1)->maximization();
5514  resultobj = SWIG_From_bool(static_cast< bool >(result));
5515  return resultobj;
5516 fail:
5517  return NULL;
5518 }
5519 
5520 
5521 SWIGINTERN PyObject *_wrap_Objective_minimization(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5522  PyObject *resultobj = 0;
5524  void *argp1 = 0 ;
5525  int res1 = 0 ;
5526  PyObject *swig_obj[1] ;
5527  bool result;
5528 
5529  if (!args) SWIG_fail;
5530  swig_obj[0] = args;
5531  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPObjective, 0 | 0 );
5532  if (!SWIG_IsOK(res1)) {
5533  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Objective_minimization" "', argument " "1"" of type '" "operations_research::MPObjective const *""'");
5534  }
5535  arg1 = reinterpret_cast< operations_research::MPObjective * >(argp1);
5536  result = (bool)((operations_research::MPObjective const *)arg1)->minimization();
5537  resultobj = SWIG_From_bool(static_cast< bool >(result));
5538  return resultobj;
5539 fail:
5540  return NULL;
5541 }
5542 
5543 
5544 SWIGINTERN PyObject *_wrap_Objective_Value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5545  PyObject *resultobj = 0;
5547  void *argp1 = 0 ;
5548  int res1 = 0 ;
5549  PyObject *swig_obj[1] ;
5550  double result;
5551 
5552  if (!args) SWIG_fail;
5553  swig_obj[0] = args;
5554  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPObjective, 0 | 0 );
5555  if (!SWIG_IsOK(res1)) {
5556  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Objective_Value" "', argument " "1"" of type '" "operations_research::MPObjective const *""'");
5557  }
5558  arg1 = reinterpret_cast< operations_research::MPObjective * >(argp1);
5559  result = (double)((operations_research::MPObjective const *)arg1)->Value();
5560  resultobj = SWIG_From_double(static_cast< double >(result));
5561  return resultobj;
5562 fail:
5563  return NULL;
5564 }
5565 
5566 
5567 SWIGINTERN PyObject *_wrap_Objective_BestBound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5568  PyObject *resultobj = 0;
5570  void *argp1 = 0 ;
5571  int res1 = 0 ;
5572  PyObject *swig_obj[1] ;
5573  double result;
5574 
5575  if (!args) SWIG_fail;
5576  swig_obj[0] = args;
5577  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPObjective, 0 | 0 );
5578  if (!SWIG_IsOK(res1)) {
5579  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Objective_BestBound" "', argument " "1"" of type '" "operations_research::MPObjective const *""'");
5580  }
5581  arg1 = reinterpret_cast< operations_research::MPObjective * >(argp1);
5582  result = (double)((operations_research::MPObjective const *)arg1)->BestBound();
5583  resultobj = SWIG_From_double(static_cast< double >(result));
5584  return resultobj;
5585 fail:
5586  return NULL;
5587 }
5588 
5589 
5590 SWIGINTERN PyObject *_wrap_Objective_Offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5591  PyObject *resultobj = 0;
5593  void *argp1 = 0 ;
5594  int res1 = 0 ;
5595  PyObject *swig_obj[1] ;
5596  double result;
5597 
5598  if (!args) SWIG_fail;
5599  swig_obj[0] = args;
5600  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPObjective, 0 | 0 );
5601  if (!SWIG_IsOK(res1)) {
5602  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Objective_Offset" "', argument " "1"" of type '" "operations_research::MPObjective const *""'");
5603  }
5604  arg1 = reinterpret_cast< operations_research::MPObjective * >(argp1);
5606  resultobj = SWIG_From_double(static_cast< double >(result));
5607  return resultobj;
5608 fail:
5609  return NULL;
5610 }
5611 
5612 
5613 SWIGINTERN PyObject *_wrap_delete_Objective(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5614  PyObject *resultobj = 0;
5616  void *argp1 = 0 ;
5617  int res1 = 0 ;
5618  PyObject *swig_obj[1] ;
5619 
5620  if (!args) SWIG_fail;
5621  swig_obj[0] = args;
5623  if (!SWIG_IsOK(res1)) {
5624  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Objective" "', argument " "1"" of type '" "operations_research::MPObjective *""'");
5625  }
5626  arg1 = reinterpret_cast< operations_research::MPObjective * >(argp1);
5627  delete arg1;
5628  resultobj = SWIG_Py_Void();
5629  return resultobj;
5630 fail:
5631  return NULL;
5632 }
5633 
5634 
5635 SWIGINTERN PyObject *Objective_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5636  PyObject *obj;
5637  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
5639  return SWIG_Py_Void();
5640 }
5641 
5642 SWIGINTERN PyObject *_wrap_Variable_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5643  PyObject *resultobj = 0;
5645  void *argp1 = 0 ;
5646  int res1 = 0 ;
5647  PyObject *swig_obj[1] ;
5648  std::string *result = 0 ;
5649 
5650  if (!args) SWIG_fail;
5651  swig_obj[0] = args;
5652  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
5653  if (!SWIG_IsOK(res1)) {
5654  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_name" "', argument " "1"" of type '" "operations_research::MPVariable const *""'");
5655  }
5656  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
5657  result = (std::string *) &((operations_research::MPVariable const *)arg1)->name();
5658  resultobj = SWIG_From_std_string(static_cast< std::string >(*result));
5659  return resultobj;
5660 fail:
5661  return NULL;
5662 }
5663 
5664 
5665 SWIGINTERN PyObject *_wrap_Variable_SetInteger(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5666  PyObject *resultobj = 0;
5668  bool arg2 ;
5669  void *argp1 = 0 ;
5670  int res1 = 0 ;
5671  bool val2 ;
5672  int ecode2 = 0 ;
5673  PyObject *swig_obj[2] ;
5674 
5675  if (!SWIG_Python_UnpackTuple(args, "Variable_SetInteger", 2, 2, swig_obj)) SWIG_fail;
5676  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
5677  if (!SWIG_IsOK(res1)) {
5678  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_SetInteger" "', argument " "1"" of type '" "operations_research::MPVariable *""'");
5679  }
5680  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
5681  ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
5682  if (!SWIG_IsOK(ecode2)) {
5683  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Variable_SetInteger" "', argument " "2"" of type '" "bool""'");
5684  }
5685  arg2 = static_cast< bool >(val2);
5686  (arg1)->SetInteger(arg2);
5687  resultobj = SWIG_Py_Void();
5688  return resultobj;
5689 fail:
5690  return NULL;
5691 }
5692 
5693 
5694 SWIGINTERN PyObject *_wrap_Variable_integer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5695  PyObject *resultobj = 0;
5697  void *argp1 = 0 ;
5698  int res1 = 0 ;
5699  PyObject *swig_obj[1] ;
5700  bool result;
5701 
5702  if (!args) SWIG_fail;
5703  swig_obj[0] = args;
5704  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
5705  if (!SWIG_IsOK(res1)) {
5706  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_integer" "', argument " "1"" of type '" "operations_research::MPVariable const *""'");
5707  }
5708  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
5709  result = (bool)((operations_research::MPVariable const *)arg1)->integer();
5710  resultobj = SWIG_From_bool(static_cast< bool >(result));
5711  return resultobj;
5712 fail:
5713  return NULL;
5714 }
5715 
5716 
5717 SWIGINTERN PyObject *_wrap_Variable_solution_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5718  PyObject *resultobj = 0;
5720  void *argp1 = 0 ;
5721  int res1 = 0 ;
5722  PyObject *swig_obj[1] ;
5723  double result;
5724 
5725  if (!args) SWIG_fail;
5726  swig_obj[0] = args;
5727  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
5728  if (!SWIG_IsOK(res1)) {
5729  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_solution_value" "', argument " "1"" of type '" "operations_research::MPVariable const *""'");
5730  }
5731  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
5732  result = (double)((operations_research::MPVariable const *)arg1)->solution_value();
5733  resultobj = SWIG_From_double(static_cast< double >(result));
5734  return resultobj;
5735 fail:
5736  return NULL;
5737 }
5738 
5739 
5740 SWIGINTERN PyObject *_wrap_Variable_index(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5741  PyObject *resultobj = 0;
5743  void *argp1 = 0 ;
5744  int res1 = 0 ;
5745  PyObject *swig_obj[1] ;
5746  int result;
5747 
5748  if (!args) SWIG_fail;
5749  swig_obj[0] = args;
5750  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
5751  if (!SWIG_IsOK(res1)) {
5752  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_index" "', argument " "1"" of type '" "operations_research::MPVariable const *""'");
5753  }
5754  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
5755  result = (int)((operations_research::MPVariable const *)arg1)->index();
5756  resultobj = SWIG_From_int(static_cast< int >(result));
5757  return resultobj;
5758 fail:
5759  return NULL;
5760 }
5761 
5762 
5763 SWIGINTERN PyObject *_wrap_Variable_lb(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5764  PyObject *resultobj = 0;
5766  void *argp1 = 0 ;
5767  int res1 = 0 ;
5768  PyObject *swig_obj[1] ;
5769  double result;
5770 
5771  if (!args) SWIG_fail;
5772  swig_obj[0] = args;
5773  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
5774  if (!SWIG_IsOK(res1)) {
5775  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_lb" "', argument " "1"" of type '" "operations_research::MPVariable const *""'");
5776  }
5777  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
5778  result = (double)((operations_research::MPVariable const *)arg1)->lb();
5779  resultobj = SWIG_From_double(static_cast< double >(result));
5780  return resultobj;
5781 fail:
5782  return NULL;
5783 }
5784 
5785 
5786 SWIGINTERN PyObject *_wrap_Variable_ub(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5787  PyObject *resultobj = 0;
5789  void *argp1 = 0 ;
5790  int res1 = 0 ;
5791  PyObject *swig_obj[1] ;
5792  double result;
5793 
5794  if (!args) SWIG_fail;
5795  swig_obj[0] = args;
5796  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
5797  if (!SWIG_IsOK(res1)) {
5798  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_ub" "', argument " "1"" of type '" "operations_research::MPVariable const *""'");
5799  }
5800  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
5801  result = (double)((operations_research::MPVariable const *)arg1)->ub();
5802  resultobj = SWIG_From_double(static_cast< double >(result));
5803  return resultobj;
5804 fail:
5805  return NULL;
5806 }
5807 
5808 
5809 SWIGINTERN PyObject *_wrap_Variable_SetBounds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5810  PyObject *resultobj = 0;
5812  double arg2 ;
5813  double arg3 ;
5814  void *argp1 = 0 ;
5815  int res1 = 0 ;
5816  double val2 ;
5817  int ecode2 = 0 ;
5818  double val3 ;
5819  int ecode3 = 0 ;
5820  PyObject *swig_obj[3] ;
5821 
5822  if (!SWIG_Python_UnpackTuple(args, "Variable_SetBounds", 3, 3, swig_obj)) SWIG_fail;
5823  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
5824  if (!SWIG_IsOK(res1)) {
5825  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_SetBounds" "', argument " "1"" of type '" "operations_research::MPVariable *""'");
5826  }
5827  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
5828  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
5829  if (!SWIG_IsOK(ecode2)) {
5830  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Variable_SetBounds" "', argument " "2"" of type '" "double""'");
5831  }
5832  arg2 = static_cast< double >(val2);
5833  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
5834  if (!SWIG_IsOK(ecode3)) {
5835  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Variable_SetBounds" "', argument " "3"" of type '" "double""'");
5836  }
5837  arg3 = static_cast< double >(val3);
5838  (arg1)->SetBounds(arg2,arg3);
5839  resultobj = SWIG_Py_Void();
5840  return resultobj;
5841 fail:
5842  return NULL;
5843 }
5844 
5845 
5846 SWIGINTERN PyObject *_wrap_Variable_reduced_cost(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5847  PyObject *resultobj = 0;
5849  void *argp1 = 0 ;
5850  int res1 = 0 ;
5851  PyObject *swig_obj[1] ;
5852  double result;
5853 
5854  if (!args) SWIG_fail;
5855  swig_obj[0] = args;
5856  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
5857  if (!SWIG_IsOK(res1)) {
5858  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_reduced_cost" "', argument " "1"" of type '" "operations_research::MPVariable const *""'");
5859  }
5860  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
5861  result = (double)((operations_research::MPVariable const *)arg1)->reduced_cost();
5862  resultobj = SWIG_From_double(static_cast< double >(result));
5863  return resultobj;
5864 fail:
5865  return NULL;
5866 }
5867 
5868 
5869 SWIGINTERN PyObject *_wrap_Variable_basis_status(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5870  PyObject *resultobj = 0;
5872  void *argp1 = 0 ;
5873  int res1 = 0 ;
5874  PyObject *swig_obj[1] ;
5876 
5877  if (!args) SWIG_fail;
5878  swig_obj[0] = args;
5879  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
5880  if (!SWIG_IsOK(res1)) {
5881  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_basis_status" "', argument " "1"" of type '" "operations_research::MPVariable const *""'");
5882  }
5883  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
5884  result = (operations_research::MPSolver::BasisStatus)((operations_research::MPVariable const *)arg1)->basis_status();
5885  resultobj = SWIG_From_int(static_cast< int >(result));
5886  return resultobj;
5887 fail:
5888  return NULL;
5889 }
5890 
5891 
5892 SWIGINTERN PyObject *_wrap_Variable_branching_priority(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5893  PyObject *resultobj = 0;
5895  void *argp1 = 0 ;
5896  int res1 = 0 ;
5897  PyObject *swig_obj[1] ;
5898  int result;
5899 
5900  if (!args) SWIG_fail;
5901  swig_obj[0] = args;
5902  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
5903  if (!SWIG_IsOK(res1)) {
5904  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_branching_priority" "', argument " "1"" of type '" "operations_research::MPVariable const *""'");
5905  }
5906  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
5907  result = (int)((operations_research::MPVariable const *)arg1)->branching_priority();
5908  resultobj = SWIG_From_int(static_cast< int >(result));
5909  return resultobj;
5910 fail:
5911  return NULL;
5912 }
5913 
5914 
5915 SWIGINTERN PyObject *_wrap_Variable_SetBranchingPriority(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5916  PyObject *resultobj = 0;
5918  int arg2 ;
5919  void *argp1 = 0 ;
5920  int res1 = 0 ;
5921  int val2 ;
5922  int ecode2 = 0 ;
5923  PyObject *swig_obj[2] ;
5924 
5925  if (!SWIG_Python_UnpackTuple(args, "Variable_SetBranchingPriority", 2, 2, swig_obj)) SWIG_fail;
5926  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
5927  if (!SWIG_IsOK(res1)) {
5928  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_SetBranchingPriority" "', argument " "1"" of type '" "operations_research::MPVariable *""'");
5929  }
5930  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
5931  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
5932  if (!SWIG_IsOK(ecode2)) {
5933  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Variable_SetBranchingPriority" "', argument " "2"" of type '" "int""'");
5934  }
5935  arg2 = static_cast< int >(val2);
5936  (arg1)->SetBranchingPriority(arg2);
5937  resultobj = SWIG_Py_Void();
5938  return resultobj;
5939 fail:
5940  return NULL;
5941 }
5942 
5943 
5944 SWIGINTERN PyObject *_wrap_Variable___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5945  PyObject *resultobj = 0;
5947  void *argp1 = 0 ;
5948  int res1 = 0 ;
5949  PyObject *swig_obj[1] ;
5950  std::string result;
5951 
5952  if (!args) SWIG_fail;
5953  swig_obj[0] = args;
5954  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
5955  if (!SWIG_IsOK(res1)) {
5956  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable___str__" "', argument " "1"" of type '" "operations_research::MPVariable *""'");
5957  }
5958  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
5960  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
5961  return resultobj;
5962 fail:
5963  return NULL;
5964 }
5965 
5966 
5967 SWIGINTERN PyObject *_wrap_Variable___repr__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5968  PyObject *resultobj = 0;
5970  void *argp1 = 0 ;
5971  int res1 = 0 ;
5972  PyObject *swig_obj[1] ;
5973  std::string result;
5974 
5975  if (!args) SWIG_fail;
5976  swig_obj[0] = args;
5977  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
5978  if (!SWIG_IsOK(res1)) {
5979  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable___repr__" "', argument " "1"" of type '" "operations_research::MPVariable *""'");
5980  }
5981  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
5983  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
5984  return resultobj;
5985 fail:
5986  return NULL;
5987 }
5988 
5989 
5990 SWIGINTERN PyObject *_wrap_Variable_SolutionValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5991  PyObject *resultobj = 0;
5993  void *argp1 = 0 ;
5994  int res1 = 0 ;
5995  PyObject *swig_obj[1] ;
5996  double result;
5997 
5998  if (!args) SWIG_fail;
5999  swig_obj[0] = args;
6000  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
6001  if (!SWIG_IsOK(res1)) {
6002  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_SolutionValue" "', argument " "1"" of type '" "operations_research::MPVariable const *""'");
6003  }
6004  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
6006  resultobj = SWIG_From_double(static_cast< double >(result));
6007  return resultobj;
6008 fail:
6009  return NULL;
6010 }
6011 
6012 
6013 SWIGINTERN PyObject *_wrap_Variable_Integer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6014  PyObject *resultobj = 0;
6016  void *argp1 = 0 ;
6017  int res1 = 0 ;
6018  PyObject *swig_obj[1] ;
6019  bool result;
6020 
6021  if (!args) SWIG_fail;
6022  swig_obj[0] = args;
6023  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
6024  if (!SWIG_IsOK(res1)) {
6025  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_Integer" "', argument " "1"" of type '" "operations_research::MPVariable const *""'");
6026  }
6027  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
6029  resultobj = SWIG_From_bool(static_cast< bool >(result));
6030  return resultobj;
6031 fail:
6032  return NULL;
6033 }
6034 
6035 
6036 SWIGINTERN PyObject *_wrap_Variable_Lb(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6037  PyObject *resultobj = 0;
6039  void *argp1 = 0 ;
6040  int res1 = 0 ;
6041  PyObject *swig_obj[1] ;
6042  double result;
6043 
6044  if (!args) SWIG_fail;
6045  swig_obj[0] = args;
6046  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
6047  if (!SWIG_IsOK(res1)) {
6048  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_Lb" "', argument " "1"" of type '" "operations_research::MPVariable const *""'");
6049  }
6050  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
6052  resultobj = SWIG_From_double(static_cast< double >(result));
6053  return resultobj;
6054 fail:
6055  return NULL;
6056 }
6057 
6058 
6059 SWIGINTERN PyObject *_wrap_Variable_Ub(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6060  PyObject *resultobj = 0;
6062  void *argp1 = 0 ;
6063  int res1 = 0 ;
6064  PyObject *swig_obj[1] ;
6065  double result;
6066 
6067  if (!args) SWIG_fail;
6068  swig_obj[0] = args;
6069  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
6070  if (!SWIG_IsOK(res1)) {
6071  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_Ub" "', argument " "1"" of type '" "operations_research::MPVariable const *""'");
6072  }
6073  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
6075  resultobj = SWIG_From_double(static_cast< double >(result));
6076  return resultobj;
6077 fail:
6078  return NULL;
6079 }
6080 
6081 
6082 SWIGINTERN PyObject *_wrap_Variable_SetLb(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6083  PyObject *resultobj = 0;
6085  double arg2 ;
6086  void *argp1 = 0 ;
6087  int res1 = 0 ;
6088  double val2 ;
6089  int ecode2 = 0 ;
6090  PyObject *swig_obj[2] ;
6091 
6092  if (!SWIG_Python_UnpackTuple(args, "Variable_SetLb", 2, 2, swig_obj)) SWIG_fail;
6093  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
6094  if (!SWIG_IsOK(res1)) {
6095  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_SetLb" "', argument " "1"" of type '" "operations_research::MPVariable *""'");
6096  }
6097  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
6098  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
6099  if (!SWIG_IsOK(ecode2)) {
6100  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Variable_SetLb" "', argument " "2"" of type '" "double""'");
6101  }
6102  arg2 = static_cast< double >(val2);
6104  resultobj = SWIG_Py_Void();
6105  return resultobj;
6106 fail:
6107  return NULL;
6108 }
6109 
6110 
6111 SWIGINTERN PyObject *_wrap_Variable_SetUb(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6112  PyObject *resultobj = 0;
6114  double arg2 ;
6115  void *argp1 = 0 ;
6116  int res1 = 0 ;
6117  double val2 ;
6118  int ecode2 = 0 ;
6119  PyObject *swig_obj[2] ;
6120 
6121  if (!SWIG_Python_UnpackTuple(args, "Variable_SetUb", 2, 2, swig_obj)) SWIG_fail;
6122  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
6123  if (!SWIG_IsOK(res1)) {
6124  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_SetUb" "', argument " "1"" of type '" "operations_research::MPVariable *""'");
6125  }
6126  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
6127  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
6128  if (!SWIG_IsOK(ecode2)) {
6129  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Variable_SetUb" "', argument " "2"" of type '" "double""'");
6130  }
6131  arg2 = static_cast< double >(val2);
6133  resultobj = SWIG_Py_Void();
6134  return resultobj;
6135 fail:
6136  return NULL;
6137 }
6138 
6139 
6140 SWIGINTERN PyObject *_wrap_Variable_ReducedCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6141  PyObject *resultobj = 0;
6143  void *argp1 = 0 ;
6144  int res1 = 0 ;
6145  PyObject *swig_obj[1] ;
6146  double result;
6147 
6148  if (!args) SWIG_fail;
6149  swig_obj[0] = args;
6150  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
6151  if (!SWIG_IsOK(res1)) {
6152  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_ReducedCost" "', argument " "1"" of type '" "operations_research::MPVariable const *""'");
6153  }
6154  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
6156  resultobj = SWIG_From_double(static_cast< double >(result));
6157  return resultobj;
6158 fail:
6159  return NULL;
6160 }
6161 
6162 
6163 SWIGINTERN PyObject *_wrap_delete_Variable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6164  PyObject *resultobj = 0;
6166  void *argp1 = 0 ;
6167  int res1 = 0 ;
6168  PyObject *swig_obj[1] ;
6169 
6170  if (!args) SWIG_fail;
6171  swig_obj[0] = args;
6173  if (!SWIG_IsOK(res1)) {
6174  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Variable" "', argument " "1"" of type '" "operations_research::MPVariable *""'");
6175  }
6176  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
6177  delete arg1;
6178  resultobj = SWIG_Py_Void();
6179  return resultobj;
6180 fail:
6181  return NULL;
6182 }
6183 
6184 
6185 SWIGINTERN PyObject *Variable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6186  PyObject *obj;
6187  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
6189  return SWIG_Py_Void();
6190 }
6191 
6192 SWIGINTERN PyObject *_wrap_Constraint_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6193  PyObject *resultobj = 0;
6195  void *argp1 = 0 ;
6196  int res1 = 0 ;
6197  PyObject *swig_obj[1] ;
6198  std::string *result = 0 ;
6199 
6200  if (!args) SWIG_fail;
6201  swig_obj[0] = args;
6202  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6203  if (!SWIG_IsOK(res1)) {
6204  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_name" "', argument " "1"" of type '" "operations_research::MPConstraint const *""'");
6205  }
6206  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6207  result = (std::string *) &((operations_research::MPConstraint const *)arg1)->name();
6208  resultobj = SWIG_From_std_string(static_cast< std::string >(*result));
6209  return resultobj;
6210 fail:
6211  return NULL;
6212 }
6213 
6214 
6215 SWIGINTERN PyObject *_wrap_Constraint_Clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6216  PyObject *resultobj = 0;
6218  void *argp1 = 0 ;
6219  int res1 = 0 ;
6220  PyObject *swig_obj[1] ;
6221 
6222  if (!args) SWIG_fail;
6223  swig_obj[0] = args;
6224  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6225  if (!SWIG_IsOK(res1)) {
6226  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_Clear" "', argument " "1"" of type '" "operations_research::MPConstraint *""'");
6227  }
6228  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6229  (arg1)->Clear();
6230  resultobj = SWIG_Py_Void();
6231  return resultobj;
6232 fail:
6233  return NULL;
6234 }
6235 
6236 
6237 SWIGINTERN PyObject *_wrap_Constraint_SetCoefficient(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6238  PyObject *resultobj = 0;
6241  double arg3 ;
6242  void *argp1 = 0 ;
6243  int res1 = 0 ;
6244  double val3 ;
6245  int ecode3 = 0 ;
6246  PyObject *swig_obj[3] ;
6247 
6248  if (!SWIG_Python_UnpackTuple(args, "Constraint_SetCoefficient", 3, 3, swig_obj)) SWIG_fail;
6249  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6250  if (!SWIG_IsOK(res1)) {
6251  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_SetCoefficient" "', argument " "1"" of type '" "operations_research::MPConstraint *""'");
6252  }
6253  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6254  {
6255  if (!PyObjAs(swig_obj[1], &arg2)) SWIG_fail;
6256  }
6257  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
6258  if (!SWIG_IsOK(ecode3)) {
6259  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Constraint_SetCoefficient" "', argument " "3"" of type '" "double""'");
6260  }
6261  arg3 = static_cast< double >(val3);
6262  (arg1)->SetCoefficient((operations_research::MPVariable const *)arg2,arg3);
6263  resultobj = SWIG_Py_Void();
6264  return resultobj;
6265 fail:
6266  return NULL;
6267 }
6268 
6269 
6270 SWIGINTERN PyObject *_wrap_Constraint_GetCoefficient(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6271  PyObject *resultobj = 0;
6274  void *argp1 = 0 ;
6275  int res1 = 0 ;
6276  PyObject *swig_obj[2] ;
6277  double result;
6278 
6279  if (!SWIG_Python_UnpackTuple(args, "Constraint_GetCoefficient", 2, 2, swig_obj)) SWIG_fail;
6280  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6281  if (!SWIG_IsOK(res1)) {
6282  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_GetCoefficient" "', argument " "1"" of type '" "operations_research::MPConstraint const *""'");
6283  }
6284  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6285  {
6286  if (!PyObjAs(swig_obj[1], &arg2)) SWIG_fail;
6287  }
6288  result = (double)((operations_research::MPConstraint const *)arg1)->GetCoefficient((operations_research::MPVariable const *)arg2);
6289  resultobj = SWIG_From_double(static_cast< double >(result));
6290  return resultobj;
6291 fail:
6292  return NULL;
6293 }
6294 
6295 
6296 SWIGINTERN PyObject *_wrap_Constraint_lb(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6297  PyObject *resultobj = 0;
6299  void *argp1 = 0 ;
6300  int res1 = 0 ;
6301  PyObject *swig_obj[1] ;
6302  double result;
6303 
6304  if (!args) SWIG_fail;
6305  swig_obj[0] = args;
6306  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6307  if (!SWIG_IsOK(res1)) {
6308  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_lb" "', argument " "1"" of type '" "operations_research::MPConstraint const *""'");
6309  }
6310  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6311  result = (double)((operations_research::MPConstraint const *)arg1)->lb();
6312  resultobj = SWIG_From_double(static_cast< double >(result));
6313  return resultobj;
6314 fail:
6315  return NULL;
6316 }
6317 
6318 
6319 SWIGINTERN PyObject *_wrap_Constraint_ub(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6320  PyObject *resultobj = 0;
6322  void *argp1 = 0 ;
6323  int res1 = 0 ;
6324  PyObject *swig_obj[1] ;
6325  double result;
6326 
6327  if (!args) SWIG_fail;
6328  swig_obj[0] = args;
6329  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6330  if (!SWIG_IsOK(res1)) {
6331  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_ub" "', argument " "1"" of type '" "operations_research::MPConstraint const *""'");
6332  }
6333  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6334  result = (double)((operations_research::MPConstraint const *)arg1)->ub();
6335  resultobj = SWIG_From_double(static_cast< double >(result));
6336  return resultobj;
6337 fail:
6338  return NULL;
6339 }
6340 
6341 
6342 SWIGINTERN PyObject *_wrap_Constraint_SetBounds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6343  PyObject *resultobj = 0;
6345  double arg2 ;
6346  double arg3 ;
6347  void *argp1 = 0 ;
6348  int res1 = 0 ;
6349  double val2 ;
6350  int ecode2 = 0 ;
6351  double val3 ;
6352  int ecode3 = 0 ;
6353  PyObject *swig_obj[3] ;
6354 
6355  if (!SWIG_Python_UnpackTuple(args, "Constraint_SetBounds", 3, 3, swig_obj)) SWIG_fail;
6356  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6357  if (!SWIG_IsOK(res1)) {
6358  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_SetBounds" "', argument " "1"" of type '" "operations_research::MPConstraint *""'");
6359  }
6360  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6361  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
6362  if (!SWIG_IsOK(ecode2)) {
6363  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Constraint_SetBounds" "', argument " "2"" of type '" "double""'");
6364  }
6365  arg2 = static_cast< double >(val2);
6366  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
6367  if (!SWIG_IsOK(ecode3)) {
6368  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Constraint_SetBounds" "', argument " "3"" of type '" "double""'");
6369  }
6370  arg3 = static_cast< double >(val3);
6371  (arg1)->SetBounds(arg2,arg3);
6372  resultobj = SWIG_Py_Void();
6373  return resultobj;
6374 fail:
6375  return NULL;
6376 }
6377 
6378 
6379 SWIGINTERN PyObject *_wrap_Constraint_set_is_lazy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6380  PyObject *resultobj = 0;
6382  bool arg2 ;
6383  void *argp1 = 0 ;
6384  int res1 = 0 ;
6385  bool val2 ;
6386  int ecode2 = 0 ;
6387  PyObject *swig_obj[2] ;
6388 
6389  if (!SWIG_Python_UnpackTuple(args, "Constraint_set_is_lazy", 2, 2, swig_obj)) SWIG_fail;
6390  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6391  if (!SWIG_IsOK(res1)) {
6392  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_set_is_lazy" "', argument " "1"" of type '" "operations_research::MPConstraint *""'");
6393  }
6394  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6395  ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
6396  if (!SWIG_IsOK(ecode2)) {
6397  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Constraint_set_is_lazy" "', argument " "2"" of type '" "bool""'");
6398  }
6399  arg2 = static_cast< bool >(val2);
6400  (arg1)->set_is_lazy(arg2);
6401  resultobj = SWIG_Py_Void();
6402  return resultobj;
6403 fail:
6404  return NULL;
6405 }
6406 
6407 
6408 SWIGINTERN PyObject *_wrap_Constraint_index(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6409  PyObject *resultobj = 0;
6411  void *argp1 = 0 ;
6412  int res1 = 0 ;
6413  PyObject *swig_obj[1] ;
6414  int result;
6415 
6416  if (!args) SWIG_fail;
6417  swig_obj[0] = args;
6418  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6419  if (!SWIG_IsOK(res1)) {
6420  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_index" "', argument " "1"" of type '" "operations_research::MPConstraint const *""'");
6421  }
6422  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6423  result = (int)((operations_research::MPConstraint const *)arg1)->index();
6424  resultobj = SWIG_From_int(static_cast< int >(result));
6425  return resultobj;
6426 fail:
6427  return NULL;
6428 }
6429 
6430 
6431 SWIGINTERN PyObject *_wrap_Constraint_dual_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6432  PyObject *resultobj = 0;
6434  void *argp1 = 0 ;
6435  int res1 = 0 ;
6436  PyObject *swig_obj[1] ;
6437  double result;
6438 
6439  if (!args) SWIG_fail;
6440  swig_obj[0] = args;
6441  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6442  if (!SWIG_IsOK(res1)) {
6443  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_dual_value" "', argument " "1"" of type '" "operations_research::MPConstraint const *""'");
6444  }
6445  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6446  result = (double)((operations_research::MPConstraint const *)arg1)->dual_value();
6447  resultobj = SWIG_From_double(static_cast< double >(result));
6448  return resultobj;
6449 fail:
6450  return NULL;
6451 }
6452 
6453 
6454 SWIGINTERN PyObject *_wrap_Constraint_basis_status(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6455  PyObject *resultobj = 0;
6457  void *argp1 = 0 ;
6458  int res1 = 0 ;
6459  PyObject *swig_obj[1] ;
6461 
6462  if (!args) SWIG_fail;
6463  swig_obj[0] = args;
6464  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6465  if (!SWIG_IsOK(res1)) {
6466  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_basis_status" "', argument " "1"" of type '" "operations_research::MPConstraint const *""'");
6467  }
6468  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6469  result = (operations_research::MPSolver::BasisStatus)((operations_research::MPConstraint const *)arg1)->basis_status();
6470  resultobj = SWIG_From_int(static_cast< int >(result));
6471  return resultobj;
6472 fail:
6473  return NULL;
6474 }
6475 
6476 
6477 SWIGINTERN PyObject *_wrap_Constraint_Lb(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6478  PyObject *resultobj = 0;
6480  void *argp1 = 0 ;
6481  int res1 = 0 ;
6482  PyObject *swig_obj[1] ;
6483  double result;
6484 
6485  if (!args) SWIG_fail;
6486  swig_obj[0] = args;
6487  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6488  if (!SWIG_IsOK(res1)) {
6489  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_Lb" "', argument " "1"" of type '" "operations_research::MPConstraint const *""'");
6490  }
6491  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6493  resultobj = SWIG_From_double(static_cast< double >(result));
6494  return resultobj;
6495 fail:
6496  return NULL;
6497 }
6498 
6499 
6500 SWIGINTERN PyObject *_wrap_Constraint_Ub(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6501  PyObject *resultobj = 0;
6503  void *argp1 = 0 ;
6504  int res1 = 0 ;
6505  PyObject *swig_obj[1] ;
6506  double result;
6507 
6508  if (!args) SWIG_fail;
6509  swig_obj[0] = args;
6510  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6511  if (!SWIG_IsOK(res1)) {
6512  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_Ub" "', argument " "1"" of type '" "operations_research::MPConstraint const *""'");
6513  }
6514  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6516  resultobj = SWIG_From_double(static_cast< double >(result));
6517  return resultobj;
6518 fail:
6519  return NULL;
6520 }
6521 
6522 
6523 SWIGINTERN PyObject *_wrap_Constraint_SetLb(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6524  PyObject *resultobj = 0;
6526  double arg2 ;
6527  void *argp1 = 0 ;
6528  int res1 = 0 ;
6529  double val2 ;
6530  int ecode2 = 0 ;
6531  PyObject *swig_obj[2] ;
6532 
6533  if (!SWIG_Python_UnpackTuple(args, "Constraint_SetLb", 2, 2, swig_obj)) SWIG_fail;
6534  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6535  if (!SWIG_IsOK(res1)) {
6536  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_SetLb" "', argument " "1"" of type '" "operations_research::MPConstraint *""'");
6537  }
6538  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6539  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
6540  if (!SWIG_IsOK(ecode2)) {
6541  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Constraint_SetLb" "', argument " "2"" of type '" "double""'");
6542  }
6543  arg2 = static_cast< double >(val2);
6545  resultobj = SWIG_Py_Void();
6546  return resultobj;
6547 fail:
6548  return NULL;
6549 }
6550 
6551 
6552 SWIGINTERN PyObject *_wrap_Constraint_SetUb(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6553  PyObject *resultobj = 0;
6555  double arg2 ;
6556  void *argp1 = 0 ;
6557  int res1 = 0 ;
6558  double val2 ;
6559  int ecode2 = 0 ;
6560  PyObject *swig_obj[2] ;
6561 
6562  if (!SWIG_Python_UnpackTuple(args, "Constraint_SetUb", 2, 2, swig_obj)) SWIG_fail;
6563  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6564  if (!SWIG_IsOK(res1)) {
6565  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_SetUb" "', argument " "1"" of type '" "operations_research::MPConstraint *""'");
6566  }
6567  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6568  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
6569  if (!SWIG_IsOK(ecode2)) {
6570  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Constraint_SetUb" "', argument " "2"" of type '" "double""'");
6571  }
6572  arg2 = static_cast< double >(val2);
6574  resultobj = SWIG_Py_Void();
6575  return resultobj;
6576 fail:
6577  return NULL;
6578 }
6579 
6580 
6581 SWIGINTERN PyObject *_wrap_Constraint_DualValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6582  PyObject *resultobj = 0;
6584  void *argp1 = 0 ;
6585  int res1 = 0 ;
6586  PyObject *swig_obj[1] ;
6587  double result;
6588 
6589  if (!args) SWIG_fail;
6590  swig_obj[0] = args;
6591  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6592  if (!SWIG_IsOK(res1)) {
6593  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_DualValue" "', argument " "1"" of type '" "operations_research::MPConstraint const *""'");
6594  }
6595  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6597  resultobj = SWIG_From_double(static_cast< double >(result));
6598  return resultobj;
6599 fail:
6600  return NULL;
6601 }
6602 
6603 
6604 SWIGINTERN PyObject *_wrap_delete_Constraint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6605  PyObject *resultobj = 0;
6607  void *argp1 = 0 ;
6608  int res1 = 0 ;
6609  PyObject *swig_obj[1] ;
6610 
6611  if (!args) SWIG_fail;
6612  swig_obj[0] = args;
6614  if (!SWIG_IsOK(res1)) {
6615  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Constraint" "', argument " "1"" of type '" "operations_research::MPConstraint *""'");
6616  }
6617  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6618  delete arg1;
6619  resultobj = SWIG_Py_Void();
6620  return resultobj;
6621 fail:
6622  return NULL;
6623 }
6624 
6625 
6626 SWIGINTERN PyObject *Constraint_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6627  PyObject *obj;
6628  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
6630  return SWIG_Py_Void();
6631 }
6632 
6634  SWIG_Error(SWIG_AttributeError,"Variable MPSolverParameters_kDefaultRelativeMipGap is read-only.");
6635  return 1;
6636 }
6637 
6638 
6640  PyObject *pyobj = 0;
6641 
6643  return pyobj;
6644 }
6645 
6646 
6648  SWIG_Error(SWIG_AttributeError,"Variable MPSolverParameters_kDefaultPrimalTolerance is read-only.");
6649  return 1;
6650 }
6651 
6652 
6654  PyObject *pyobj = 0;
6655 
6657  return pyobj;
6658 }
6659 
6660 
6662  SWIG_Error(SWIG_AttributeError,"Variable MPSolverParameters_kDefaultDualTolerance is read-only.");
6663  return 1;
6664 }
6665 
6666 
6668  PyObject *pyobj = 0;
6669 
6671  return pyobj;
6672 }
6673 
6674 
6676  SWIG_Error(SWIG_AttributeError,"Variable MPSolverParameters_kDefaultPresolve is read-only.");
6677  return 1;
6678 }
6679 
6680 
6682  PyObject *pyobj = 0;
6683 
6685  return pyobj;
6686 }
6687 
6688 
6690  SWIG_Error(SWIG_AttributeError,"Variable MPSolverParameters_kDefaultIncrementality is read-only.");
6691  return 1;
6692 }
6693 
6694 
6696  PyObject *pyobj = 0;
6697 
6699  return pyobj;
6700 }
6701 
6702 
6703 SWIGINTERN PyObject *_wrap_new_MPSolverParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6704  PyObject *resultobj = 0;
6706 
6707  if (!SWIG_Python_UnpackTuple(args, "new_MPSolverParameters", 0, 0, 0)) SWIG_fail;
6710  return resultobj;
6711 fail:
6712  return NULL;
6713 }
6714 
6715 
6716 SWIGINTERN PyObject *_wrap_MPSolverParameters_SetDoubleParam(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6717  PyObject *resultobj = 0;
6720  double arg3 ;
6721  void *argp1 = 0 ;
6722  int res1 = 0 ;
6723  int val2 ;
6724  int ecode2 = 0 ;
6725  double val3 ;
6726  int ecode3 = 0 ;
6727  PyObject *swig_obj[3] ;
6728 
6729  if (!SWIG_Python_UnpackTuple(args, "MPSolverParameters_SetDoubleParam", 3, 3, swig_obj)) SWIG_fail;
6730  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolverParameters, 0 | 0 );
6731  if (!SWIG_IsOK(res1)) {
6732  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MPSolverParameters_SetDoubleParam" "', argument " "1"" of type '" "operations_research::MPSolverParameters *""'");
6733  }
6734  arg1 = reinterpret_cast< operations_research::MPSolverParameters * >(argp1);
6735  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
6736  if (!SWIG_IsOK(ecode2)) {
6737  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MPSolverParameters_SetDoubleParam" "', argument " "2"" of type '" "operations_research::MPSolverParameters::DoubleParam""'");
6738  }
6739  arg2 = static_cast< operations_research::MPSolverParameters::DoubleParam >(val2);
6740  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
6741  if (!SWIG_IsOK(ecode3)) {
6742  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MPSolverParameters_SetDoubleParam" "', argument " "3"" of type '" "double""'");
6743  }
6744  arg3 = static_cast< double >(val3);
6745  (arg1)->SetDoubleParam(arg2,arg3);
6746  resultobj = SWIG_Py_Void();
6747  return resultobj;
6748 fail:
6749  return NULL;
6750 }
6751 
6752 
6753 SWIGINTERN PyObject *_wrap_MPSolverParameters_SetIntegerParam(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6754  PyObject *resultobj = 0;
6757  int arg3 ;
6758  void *argp1 = 0 ;
6759  int res1 = 0 ;
6760  int val2 ;
6761  int ecode2 = 0 ;
6762  int val3 ;
6763  int ecode3 = 0 ;
6764  PyObject *swig_obj[3] ;
6765 
6766  if (!SWIG_Python_UnpackTuple(args, "MPSolverParameters_SetIntegerParam", 3, 3, swig_obj)) SWIG_fail;
6767  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolverParameters, 0 | 0 );
6768  if (!SWIG_IsOK(res1)) {
6769  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MPSolverParameters_SetIntegerParam" "', argument " "1"" of type '" "operations_research::MPSolverParameters *""'");
6770  }
6771  arg1 = reinterpret_cast< operations_research::MPSolverParameters * >(argp1);
6772  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
6773  if (!SWIG_IsOK(ecode2)) {
6774  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MPSolverParameters_SetIntegerParam" "', argument " "2"" of type '" "operations_research::MPSolverParameters::IntegerParam""'");
6775  }
6776  arg2 = static_cast< operations_research::MPSolverParameters::IntegerParam >(val2);
6777  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
6778  if (!SWIG_IsOK(ecode3)) {
6779  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MPSolverParameters_SetIntegerParam" "', argument " "3"" of type '" "int""'");
6780  }
6781  arg3 = static_cast< int >(val3);
6782  (arg1)->SetIntegerParam(arg2,arg3);
6783  resultobj = SWIG_Py_Void();
6784  return resultobj;
6785 fail:
6786  return NULL;
6787 }
6788 
6789 
6790 SWIGINTERN PyObject *_wrap_MPSolverParameters_GetDoubleParam(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6791  PyObject *resultobj = 0;
6794  void *argp1 = 0 ;
6795  int res1 = 0 ;
6796  int val2 ;
6797  int ecode2 = 0 ;
6798  PyObject *swig_obj[2] ;
6799  double result;
6800 
6801  if (!SWIG_Python_UnpackTuple(args, "MPSolverParameters_GetDoubleParam", 2, 2, swig_obj)) SWIG_fail;
6802  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolverParameters, 0 | 0 );
6803  if (!SWIG_IsOK(res1)) {
6804  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MPSolverParameters_GetDoubleParam" "', argument " "1"" of type '" "operations_research::MPSolverParameters const *""'");
6805  }
6806  arg1 = reinterpret_cast< operations_research::MPSolverParameters * >(argp1);
6807  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
6808  if (!SWIG_IsOK(ecode2)) {
6809  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MPSolverParameters_GetDoubleParam" "', argument " "2"" of type '" "operations_research::MPSolverParameters::DoubleParam""'");
6810  }
6811  arg2 = static_cast< operations_research::MPSolverParameters::DoubleParam >(val2);
6812  result = (double)((operations_research::MPSolverParameters const *)arg1)->GetDoubleParam(arg2);
6813  resultobj = SWIG_From_double(static_cast< double >(result));
6814  return resultobj;
6815 fail:
6816  return NULL;
6817 }
6818 
6819 
6820 SWIGINTERN PyObject *_wrap_MPSolverParameters_GetIntegerParam(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6821  PyObject *resultobj = 0;
6824  void *argp1 = 0 ;
6825  int res1 = 0 ;
6826  int val2 ;
6827  int ecode2 = 0 ;
6828  PyObject *swig_obj[2] ;
6829  int result;
6830 
6831  if (!SWIG_Python_UnpackTuple(args, "MPSolverParameters_GetIntegerParam", 2, 2, swig_obj)) SWIG_fail;
6832  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolverParameters, 0 | 0 );
6833  if (!SWIG_IsOK(res1)) {
6834  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MPSolverParameters_GetIntegerParam" "', argument " "1"" of type '" "operations_research::MPSolverParameters const *""'");
6835  }
6836  arg1 = reinterpret_cast< operations_research::MPSolverParameters * >(argp1);
6837  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
6838  if (!SWIG_IsOK(ecode2)) {
6839  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MPSolverParameters_GetIntegerParam" "', argument " "2"" of type '" "operations_research::MPSolverParameters::IntegerParam""'");
6840  }
6841  arg2 = static_cast< operations_research::MPSolverParameters::IntegerParam >(val2);
6842  result = (int)((operations_research::MPSolverParameters const *)arg1)->GetIntegerParam(arg2);
6843  resultobj = SWIG_From_int(static_cast< int >(result));
6844  return resultobj;
6845 fail:
6846  return NULL;
6847 }
6848 
6849 
6850 SWIGINTERN PyObject *_wrap_delete_MPSolverParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6851  PyObject *resultobj = 0;
6853  void *argp1 = 0 ;
6854  int res1 = 0 ;
6855  PyObject *swig_obj[1] ;
6856 
6857  if (!args) SWIG_fail;
6858  swig_obj[0] = args;
6860  if (!SWIG_IsOK(res1)) {
6861  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MPSolverParameters" "', argument " "1"" of type '" "operations_research::MPSolverParameters *""'");
6862  }
6863  arg1 = reinterpret_cast< operations_research::MPSolverParameters * >(argp1);
6864  delete arg1;
6865  resultobj = SWIG_Py_Void();
6866  return resultobj;
6867 fail:
6868  return NULL;
6869 }
6870 
6871 
6872 SWIGINTERN PyObject *MPSolverParameters_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6873  PyObject *obj;
6874  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
6876  return SWIG_Py_Void();
6877 }
6878 
6879 SWIGINTERN PyObject *MPSolverParameters_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6880  return SWIG_Python_InitShadowInstance(args);
6881 }
6882 
6883 SWIGINTERN PyObject *_wrap_new_ModelExportOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6884  PyObject *resultobj = 0;
6886 
6887  if (!SWIG_Python_UnpackTuple(args, "new_ModelExportOptions", 0, 0, 0)) SWIG_fail;
6890  return resultobj;
6891 fail:
6892  return NULL;
6893 }
6894 
6895 
6896 SWIGINTERN PyObject *_wrap_delete_ModelExportOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6897  PyObject *resultobj = 0;
6899  void *argp1 = 0 ;
6900  int res1 = 0 ;
6901  PyObject *swig_obj[1] ;
6902 
6903  if (!args) SWIG_fail;
6904  swig_obj[0] = args;
6906  if (!SWIG_IsOK(res1)) {
6907  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ModelExportOptions" "', argument " "1"" of type '" "operations_research::MPModelExportOptions *""'");
6908  }
6909  arg1 = reinterpret_cast< operations_research::MPModelExportOptions * >(argp1);
6910  delete arg1;
6911  resultobj = SWIG_Py_Void();
6912  return resultobj;
6913 fail:
6914  return NULL;
6915 }
6916 
6917 
6918 SWIGINTERN PyObject *ModelExportOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6919  PyObject *obj;
6920  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
6922  return SWIG_Py_Void();
6923 }
6924 
6925 SWIGINTERN PyObject *ModelExportOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6926  return SWIG_Python_InitShadowInstance(args);
6927 }
6928 
6929 SWIGINTERN PyObject *_wrap_ExportModelAsLpFormat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
6930  PyObject *resultobj = 0;
6933  void *argp2 = 0 ;
6934  int res2 = 0 ;
6935  std::string result;
6936 
6937  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
6938  {
6940  PyObject* const pyresult = PyObject_CallMethod(
6941  swig_obj[0], const_cast<char*>("SerializeToString"), nullptr);
6942  if (pyresult != nullptr) {
6943  char* buffer = nullptr;
6944  Py_ssize_t length = 0;
6945  int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
6946  if (buffer != nullptr) {
6947  arg1->ParseFromArray(buffer, length);
6948  }
6949  Py_DECREF(pyresult);
6950  }
6951  }
6952  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_operations_research__MPModelExportOptions, 0 | 0);
6953  if (!SWIG_IsOK(res2)) {
6954  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExportModelAsLpFormat" "', argument " "2"" of type '" "operations_research::MPModelExportOptions const &""'");
6955  }
6956  if (!argp2) {
6957  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExportModelAsLpFormat" "', argument " "2"" of type '" "operations_research::MPModelExportOptions const &""'");
6958  }
6959  arg2 = reinterpret_cast< operations_research::MPModelExportOptions * >(argp2);
6960  result = operations_research::ExportModelAsLpFormatReturnString((operations_research::MPModelProto const &)*arg1,(operations_research::MPModelExportOptions const &)*arg2);
6961  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
6962  {
6963  delete arg1;
6964  }
6965  return resultobj;
6966 fail:
6967  {
6968  delete arg1;
6969  }
6970  return NULL;
6971 }
6972 
6973 
6974 SWIGINTERN PyObject *_wrap_ExportModelAsLpFormat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
6975  PyObject *resultobj = 0;
6977  std::string result;
6978 
6979  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
6980  {
6982  PyObject* const pyresult = PyObject_CallMethod(
6983  swig_obj[0], const_cast<char*>("SerializeToString"), nullptr);
6984  if (pyresult != nullptr) {
6985  char* buffer = nullptr;
6986  Py_ssize_t length = 0;
6987  int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
6988  if (buffer != nullptr) {
6989  arg1->ParseFromArray(buffer, length);
6990  }
6991  Py_DECREF(pyresult);
6992  }
6993  }
6994  result = operations_research::ExportModelAsLpFormatReturnString((operations_research::MPModelProto const &)*arg1);
6995  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
6996  {
6997  delete arg1;
6998  }
6999  return resultobj;
7000 fail:
7001  {
7002  delete arg1;
7003  }
7004  return NULL;
7005 }
7006 
7007 
7008 SWIGINTERN PyObject *_wrap_ExportModelAsLpFormat(PyObject *self, PyObject *args) {
7009  Py_ssize_t argc;
7010  PyObject *argv[3] = {
7011  0
7012  };
7013 
7014  if (!(argc = SWIG_Python_UnpackTuple(args, "ExportModelAsLpFormat", 0, 2, argv))) SWIG_fail;
7015  --argc;
7016  if (argc == 1) {
7017  int _v;
7018  {
7019  bool ok = false;
7020  PyObject* const module = PyImport_ImportModule("ortools.linear_solver.linear_solver_pb2");
7021  if (module != nullptr) {
7022  PyObject* const dict = PyModule_GetDict(module);
7023  if (dict != nullptr) {
7024  PyObject* const clss = PyDict_GetItemString(dict, "MPModelProto");
7025  if (clss != nullptr) {
7026  if (PyObject_IsInstance(argv[0], clss)) {
7027  ok = true;
7028  }
7029  }
7030  }
7031  Py_DECREF(module);
7032  }
7033  _v = ok ? 1 : 0;
7034  }
7035  if (_v) {
7036  return _wrap_ExportModelAsLpFormat__SWIG_1(self, argc, argv);
7037  }
7038  }
7039  if (argc == 2) {
7040  int _v;
7041  {
7042  bool ok = false;
7043  PyObject* const module = PyImport_ImportModule("ortools.linear_solver.linear_solver_pb2");
7044  if (module != nullptr) {
7045  PyObject* const dict = PyModule_GetDict(module);
7046  if (dict != nullptr) {
7047  PyObject* const clss = PyDict_GetItemString(dict, "MPModelProto");
7048  if (clss != nullptr) {
7049  if (PyObject_IsInstance(argv[0], clss)) {
7050  ok = true;
7051  }
7052  }
7053  }
7054  Py_DECREF(module);
7055  }
7056  _v = ok ? 1 : 0;
7057  }
7058  if (_v) {
7060  _v = SWIG_CheckState(res);
7061  if (_v) {
7062  return _wrap_ExportModelAsLpFormat__SWIG_0(self, argc, argv);
7063  }
7064  }
7065  }
7066 
7067 fail:
7068  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'ExportModelAsLpFormat'.\n"
7069  " Possible C/C++ prototypes are:\n"
7070  " operations_research::ExportModelAsLpFormatReturnString(operations_research::MPModelProto const &,operations_research::MPModelExportOptions const &)\n"
7071  " operations_research::ExportModelAsLpFormatReturnString(operations_research::MPModelProto const &)\n");
7072  return 0;
7073 }
7074 
7075 
7076 SWIGINTERN PyObject *_wrap_ExportModelAsMpsFormat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
7077  PyObject *resultobj = 0;
7080  void *argp2 = 0 ;
7081  int res2 = 0 ;
7082  std::string result;
7083 
7084  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
7085  {
7087  PyObject* const pyresult = PyObject_CallMethod(
7088  swig_obj[0], const_cast<char*>("SerializeToString"), nullptr);
7089  if (pyresult != nullptr) {
7090  char* buffer = nullptr;
7091  Py_ssize_t length = 0;
7092  int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
7093  if (buffer != nullptr) {
7094  arg1->ParseFromArray(buffer, length);
7095  }
7096  Py_DECREF(pyresult);
7097  }
7098  }
7099  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_operations_research__MPModelExportOptions, 0 | 0);
7100  if (!SWIG_IsOK(res2)) {
7101  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExportModelAsMpsFormat" "', argument " "2"" of type '" "operations_research::MPModelExportOptions const &""'");
7102  }
7103  if (!argp2) {
7104  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExportModelAsMpsFormat" "', argument " "2"" of type '" "operations_research::MPModelExportOptions const &""'");
7105  }
7106  arg2 = reinterpret_cast< operations_research::MPModelExportOptions * >(argp2);
7107  result = operations_research::ExportModelAsMpsFormatReturnString((operations_research::MPModelProto const &)*arg1,(operations_research::MPModelExportOptions const &)*arg2);
7108  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
7109  {
7110  delete arg1;
7111  }
7112  return resultobj;
7113 fail:
7114  {
7115  delete arg1;
7116  }
7117  return NULL;
7118 }
7119 
7120 
7121 SWIGINTERN PyObject *_wrap_ExportModelAsMpsFormat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
7122  PyObject *resultobj = 0;
7124  std::string result;
7125 
7126  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
7127  {
7129  PyObject* const pyresult = PyObject_CallMethod(
7130  swig_obj[0], const_cast<char*>("SerializeToString"), nullptr);
7131  if (pyresult != nullptr) {
7132  char* buffer = nullptr;
7133  Py_ssize_t length = 0;
7134  int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
7135  if (buffer != nullptr) {
7136  arg1->ParseFromArray(buffer, length);
7137  }
7138  Py_DECREF(pyresult);
7139  }
7140  }
7141  result = operations_research::ExportModelAsMpsFormatReturnString((operations_research::MPModelProto const &)*arg1);
7142  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
7143  {
7144  delete arg1;
7145  }
7146  return resultobj;
7147 fail:
7148  {
7149  delete arg1;
7150  }
7151  return NULL;
7152 }
7153 
7154 
7155 SWIGINTERN PyObject *_wrap_ExportModelAsMpsFormat(PyObject *self, PyObject *args) {
7156  Py_ssize_t argc;
7157  PyObject *argv[3] = {
7158  0
7159  };
7160 
7161  if (!(argc = SWIG_Python_UnpackTuple(args, "ExportModelAsMpsFormat", 0, 2, argv))) SWIG_fail;
7162  --argc;
7163  if (argc == 1) {
7164  int _v;
7165  {
7166  bool ok = false;
7167  PyObject* const module = PyImport_ImportModule("ortools.linear_solver.linear_solver_pb2");
7168  if (module != nullptr) {
7169  PyObject* const dict = PyModule_GetDict(module);
7170  if (dict != nullptr) {
7171  PyObject* const clss = PyDict_GetItemString(dict, "MPModelProto");
7172  if (clss != nullptr) {
7173  if (PyObject_IsInstance(argv[0], clss)) {
7174  ok = true;
7175  }
7176  }
7177  }
7178  Py_DECREF(module);
7179  }
7180  _v = ok ? 1 : 0;
7181  }
7182  if (_v) {
7183  return _wrap_ExportModelAsMpsFormat__SWIG_1(self, argc, argv);
7184  }
7185  }
7186  if (argc == 2) {
7187  int _v;
7188  {
7189  bool ok = false;
7190  PyObject* const module = PyImport_ImportModule("ortools.linear_solver.linear_solver_pb2");
7191  if (module != nullptr) {
7192  PyObject* const dict = PyModule_GetDict(module);
7193  if (dict != nullptr) {
7194  PyObject* const clss = PyDict_GetItemString(dict, "MPModelProto");
7195  if (clss != nullptr) {
7196  if (PyObject_IsInstance(argv[0], clss)) {
7197  ok = true;
7198  }
7199  }
7200  }
7201  Py_DECREF(module);
7202  }
7203  _v = ok ? 1 : 0;
7204  }
7205  if (_v) {
7207  _v = SWIG_CheckState(res);
7208  if (_v) {
7209  return _wrap_ExportModelAsMpsFormat__SWIG_0(self, argc, argv);
7210  }
7211  }
7212  }
7213 
7214 fail:
7215  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'ExportModelAsMpsFormat'.\n"
7216  " Possible C/C++ prototypes are:\n"
7217  " operations_research::ExportModelAsMpsFormatReturnString(operations_research::MPModelProto const &,operations_research::MPModelExportOptions const &)\n"
7218  " operations_research::ExportModelAsMpsFormatReturnString(operations_research::MPModelProto const &)\n");
7219  return 0;
7220 }
7221 
7222 
7223 SWIGINTERN PyObject *_wrap_FindErrorInModelProto(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7224  PyObject *resultobj = 0;
7226  PyObject *swig_obj[1] ;
7227  std::string result;
7228 
7229  if (!args) SWIG_fail;
7230  swig_obj[0] = args;
7231  {
7233  PyObject* const pyresult = PyObject_CallMethod(
7234  swig_obj[0], const_cast<char*>("SerializeToString"), nullptr);
7235  if (pyresult != nullptr) {
7236  char* buffer = nullptr;
7237  Py_ssize_t length = 0;
7238  int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
7239  if (buffer != nullptr) {
7240  arg1->ParseFromArray(buffer, length);
7241  }
7242  Py_DECREF(pyresult);
7243  }
7244  }
7246  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
7247  {
7248  delete arg1;
7249  }
7250  return resultobj;
7251 fail:
7252  {
7253  delete arg1;
7254  }
7255  return NULL;
7256 }
7257 
7258 
7259 static PyMethodDef SwigMethods[] = {
7260  { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
7261  { "new_Solver", _wrap_new_Solver, METH_VARARGS, " Create a solver with the given name and underlying solver backend."},
7262  { "delete_Solver", _wrap_delete_Solver, METH_O, NULL},
7263  { "Solver_CreateSolver", _wrap_Solver_CreateSolver, METH_O, "\n"
7264  "Recommended factory method to create a MPSolver instance, especially in\n"
7265  "non C++ languages.\n"
7266  "\n"
7267  "It returns a newly created solver instance if successful, or a nullptr\n"
7268  "otherwise. This can occur if the relevant interface is not linked in, or if\n"
7269  "a needed license is not accessible for commercial solvers.\n"
7270  "\n"
7271  "Ownership of the solver is passed on to the caller of this method.\n"
7272  "It will accept both string names of the OptimizationProblemType enum, as\n"
7273  "well as a short version (i.e. \"SCIP_MIXED_INTEGER_PROGRAMMING\" or \"SCIP\").\n"
7274  "\n"
7275  "solver_id is case insensitive, and the following names are supported:\n"
7276  " - CLP_LINEAR_PROGRAMMING or CLP\n"
7277  " - CBC_MIXED_INTEGER_PROGRAMMING or CBC\n"
7278  " - GLOP_LINEAR_PROGRAMMING or GLOP\n"
7279  " - BOP_INTEGER_PROGRAMMING or BOP\n"
7280  " - SAT_INTEGER_PROGRAMMING or SAT or CP_SAT\n"
7281  " - SCIP_MIXED_INTEGER_PROGRAMMING or SCIP\n"
7282  " - GUROBI_LINEAR_PROGRAMMING or GUROBI_LP\n"
7283  " - GUROBI_MIXED_INTEGER_PROGRAMMING or GUROBI or GUROBI_MIP\n"
7284  " - CPLEX_LINEAR_PROGRAMMING or CPLEX_LP\n"
7285  " - CPLEX_MIXED_INTEGER_PROGRAMMING or CPLEX or CPLEX_MIP\n"
7286  " - XPRESS_LINEAR_PROGRAMMING or XPRESS_LP\n"
7287  " - XPRESS_MIXED_INTEGER_PROGRAMMING or XPRESS or XPRESS_MIP\n"
7288  " - GLPK_LINEAR_PROGRAMMING or GLPK_LP\n"
7289  " - GLPK_MIXED_INTEGER_PROGRAMMING or GLPK or GLPK_MIP\n"
7290  ""},
7291  { "Solver_SupportsProblemType", _wrap_Solver_SupportsProblemType, METH_O, "\n"
7292  "Whether the given problem type is supported (this will depend on the\n"
7293  "targets that you linked).\n"
7294  ""},
7295  { "Solver_Clear", _wrap_Solver_Clear, METH_O, "\n"
7296  "Clears the objective (including the optimization direction), all variables\n"
7297  "and constraints. All the other properties of the MPSolver (like the time\n"
7298  "limit) are kept untouched.\n"
7299  ""},
7300  { "Solver_NumVariables", _wrap_Solver_NumVariables, METH_O, " Returns the number of variables."},
7301  { "Solver_variables", _wrap_Solver_variables, METH_O, "\n"
7302  "Returns the array of variables handled by the MPSolver. (They are listed in\n"
7303  "the order in which they were created.)\n"
7304  ""},
7305  { "Solver_LookupVariable", _wrap_Solver_LookupVariable, METH_VARARGS, "\n"
7306  "Looks up a variable by name, and returns nullptr if it does not exist. The\n"
7307  "first call has a O(n) complexity, as the variable name index is lazily\n"
7308  "created upon first use. Will crash if variable names are not unique.\n"
7309  ""},
7310  { "Solver_Var", _wrap_Solver_Var, METH_VARARGS, "\n"
7311  "Creates a variable with the given bounds, integrality requirement and\n"
7312  "name. Bounds can be finite or +/- MPSolver::infinity(). The MPSolver owns\n"
7313  "the variable (i.e. the returned pointer is borrowed). Variable names are\n"
7314  "optional. If you give an empty name, name() will auto-generate one for you\n"
7315  "upon request.\n"
7316  ""},
7317  { "Solver_NumVar", _wrap_Solver_NumVar, METH_VARARGS, " Creates a continuous variable."},
7318  { "Solver_IntVar", _wrap_Solver_IntVar, METH_VARARGS, " Creates an integer variable."},
7319  { "Solver_BoolVar", _wrap_Solver_BoolVar, METH_VARARGS, " Creates a boolean variable."},
7320  { "Solver_NumConstraints", _wrap_Solver_NumConstraints, METH_O, " Returns the number of constraints."},
7321  { "Solver_constraints", _wrap_Solver_constraints, METH_O, "\n"
7322  "Returns the array of constraints handled by the MPSolver.\n"
7323  "\n"
7324  "They are listed in the order in which they were created.\n"
7325  ""},
7326  { "Solver_LookupConstraint", _wrap_Solver_LookupConstraint, METH_VARARGS, "\n"
7327  " Looks up a constraint by name, and returns nullptr if it does not exist.\n"
7328  "\n"
7329  "The first call has a O(n) complexity, as the constraint name index is\n"
7330  "lazily created upon first use. Will crash if constraint names are not\n"
7331  "unique.\n"
7332  ""},
7333  { "Solver_Constraint", _wrap_Solver_Constraint, METH_VARARGS, "\n"
7334  "*Overload 1:*\n"
7335  "\n"
7336  "Creates a linear constraint with given bounds.\n"
7337  "\n"
7338  "Bounds can be finite or +/- MPSolver::infinity(). The MPSolver class\n"
7339  "assumes ownership of the constraint.\n"
7340  "\n"
7341  ":rtype: :py:class:`MPConstraint`\n"
7342  ":return: a pointer to the newly created constraint.\n"
7343  "\n"
7344  "|\n"
7345  "\n"
7346  "*Overload 2:*\n"
7347  " Creates a constraint with -infinity and +infinity bounds.\n"
7348  "\n"
7349  "|\n"
7350  "\n"
7351  "*Overload 3:*\n"
7352  " Creates a named constraint with given bounds.\n"
7353  "\n"
7354  "|\n"
7355  "\n"
7356  "*Overload 4:*\n"
7357  " Creates a named constraint with -infinity and +infinity bounds.\n"
7358  ""},
7359  { "Solver_Objective", _wrap_Solver_Objective, METH_O, " Returns the mutable objective object."},
7360  { "Solver_Solve", _wrap_Solver_Solve, METH_VARARGS, "\n"
7361  "*Overload 1:*\n"
7362  "Solves the problem using the default parameter values.\n"
7363  "\n"
7364  "|\n"
7365  "\n"
7366  "*Overload 2:*\n"
7367  "Solves the problem using the specified parameter values.\n"
7368  ""},
7369  { "Solver_ComputeConstraintActivities", _wrap_Solver_ComputeConstraintActivities, METH_O, "\n"
7370  "Advanced usage: compute the \"activities\" of all constraints, which are the\n"
7371  "sums of their linear terms. The activities are returned in the same order\n"
7372  "as constraints(), which is the order in which constraints were added; but\n"
7373  "you can also use MPConstraint::index() to get a constraint's index.\n"
7374  ""},
7375  { "Solver_VerifySolution", _wrap_Solver_VerifySolution, METH_VARARGS, "\n"
7376  "Advanced usage: Verifies the *correctness* of the solution.\n"
7377  "\n"
7378  "It verifies that all variables must be within their domains, all\n"
7379  "constraints must be satisfied, and the reported objective value must be\n"
7380  "accurate.\n"
7381  "\n"
7382  "Usage:\n"
7383  "- This can only be called after Solve() was called.\n"
7384  "- \"tolerance\" is interpreted as an absolute error threshold.\n"
7385  "- For the objective value only, if the absolute error is too large,\n"
7386  " the tolerance is interpreted as a relative error threshold instead.\n"
7387  "- If \"log_errors\" is true, every single violation will be logged.\n"
7388  "- If \"tolerance\" is negative, it will be set to infinity().\n"
7389  "\n"
7390  "Most users should just set the --verify_solution flag and not bother using\n"
7391  "this method directly.\n"
7392  ""},
7393  { "Solver_InterruptSolve", _wrap_Solver_InterruptSolve, METH_O, "\n"
7394  " Interrupts the Solve() execution to terminate processing if possible.\n"
7395  "\n"
7396  "If the underlying interface supports interruption; it does that and returns\n"
7397  "true regardless of whether there's an ongoing Solve() or not. The Solve()\n"
7398  "call may still linger for a while depending on the conditions. If\n"
7399  "interruption is not supported; returns false and does nothing.\n"
7400  ""},
7401  { "Solver_FillSolutionResponseProto", _wrap_Solver_FillSolutionResponseProto, METH_VARARGS, " Encodes the current solution in a solution response protocol buffer."},
7402  { "Solver_SolveWithProto", _wrap_Solver_SolveWithProto, METH_VARARGS, "\n"
7403  "Solves the model encoded by a MPModelRequest protocol buffer and fills the\n"
7404  "solution encoded as a MPSolutionResponse.\n"
7405  "\n"
7406  "Note(user): This creates a temporary MPSolver and destroys it at the end.\n"
7407  "If you want to keep the MPSolver alive (for debugging, or for incremental\n"
7408  "solving), you should write another version of this function that creates\n"
7409  "the MPSolver object on the heap and returns it.\n"
7410  "\n"
7411  "Note(pawell): This attempts to first use `DirectlySolveProto()` (if\n"
7412  "implemented). Consequently, this most likely does *not* override any of\n"
7413  "the default parameters of the underlying solver. This behavior *differs*\n"
7414  "from `MPSolver::Solve()` which by default sets the feasibility tolerance\n"
7415  "and the gap limit (as of 2020/02/11, to 1e-7 and 0.0001, respectively).\n"
7416  ""},
7417  { "Solver_ExportModelToProto", _wrap_Solver_ExportModelToProto, METH_VARARGS, " Exports model to protocol buffer."},
7418  { "Solver_SetSolverSpecificParametersAsString", _wrap_Solver_SetSolverSpecificParametersAsString, METH_VARARGS, "\n"
7419  "Advanced usage: pass solver specific parameters in text format.\n"
7420  "\n"
7421  "The format is solver-specific and is the same as the corresponding solver\n"
7422  "configuration file format. Returns true if the operation was successful.\n"
7423  ""},
7424  { "Solver_infinity", _wrap_Solver_infinity, METH_NOARGS, "\n"
7425  "Infinity.\n"
7426  "\n"
7427  "You can use -MPSolver::infinity() for negative infinity.\n"
7428  ""},
7429  { "Solver_EnableOutput", _wrap_Solver_EnableOutput, METH_O, " Enables solver logging."},
7430  { "Solver_SuppressOutput", _wrap_Solver_SuppressOutput, METH_O, " Suppresses solver logging."},
7431  { "Solver_iterations", _wrap_Solver_iterations, METH_O, " Returns the number of simplex iterations."},
7432  { "Solver_nodes", _wrap_Solver_nodes, METH_O, "\n"
7433  "Returns the number of branch-and-bound nodes evaluated during the solve.\n"
7434  "\n"
7435  "Only available for discrete problems.\n"
7436  ""},
7437  { "Solver_ComputeExactConditionNumber", _wrap_Solver_ComputeExactConditionNumber, METH_O, "\n"
7438  " Advanced usage: computes the exact condition number of the current scaled\n"
7439  "basis: L1norm(B) * L1norm(inverse(B)), where B is the scaled basis.\n"
7440  "\n"
7441  "This method requires that a basis exists: it should be called after Solve.\n"
7442  "It is only available for continuous problems. It is implemented for GLPK\n"
7443  "but not CLP because CLP does not provide the API for doing it.\n"
7444  "\n"
7445  "The condition number measures how well the constraint matrix is conditioned\n"
7446  "and can be used to predict whether numerical issues will arise during the\n"
7447  "solve: the model is declared infeasible whereas it is feasible (or\n"
7448  "vice-versa), the solution obtained is not optimal or violates some\n"
7449  "constraints, the resolution is slow because of repeated singularities.\n"
7450  "\n"
7451  "The rule of thumb to interpret the condition number kappa is:\n"
7452  " - o kappa <= 1e7: virtually no chance of numerical issues\n"
7453  " - o 1e7 < kappa <= 1e10: small chance of numerical issues\n"
7454  " - o 1e10 < kappa <= 1e13: medium chance of numerical issues\n"
7455  " - o kappa > 1e13: high chance of numerical issues\n"
7456  "\n"
7457  "The computation of the condition number depends on the quality of the LU\n"
7458  "decomposition, so it is not very accurate when the matrix is ill\n"
7459  "conditioned.\n"
7460  ""},
7461  { "Solver_NextSolution", _wrap_Solver_NextSolution, METH_O, "\n"
7462  "Some solvers (MIP only, not LP) can produce multiple solutions to the\n"
7463  "problem. Returns true when another solution is available, and updates the\n"
7464  "MPVariable* objects to make the new solution queryable. Call only after\n"
7465  "calling solve.\n"
7466  "\n"
7467  "The optimality properties of the additional solutions found, and whether or\n"
7468  "not the solver computes them ahead of time or when NextSolution() is called\n"
7469  "is solver specific.\n"
7470  "\n"
7471  "As of 2020-02-10, only Gurobi and SCIP support NextSolution(), see\n"
7472  "linear_solver_interfaces_test for an example of how to configure these\n"
7473  "solvers for multiple solutions. Other solvers return false unconditionally.\n"
7474  ""},
7475  { "Solver_set_time_limit", _wrap_Solver_set_time_limit, METH_VARARGS, NULL},
7476  { "Solver_wall_time", _wrap_Solver_wall_time, METH_O, NULL},
7477  { "Solver_SetGurobiLibraryPath", _wrap_Solver_SetGurobiLibraryPath, METH_O, NULL},
7478  { "Solver_LoadModelFromProto", _wrap_Solver_LoadModelFromProto, METH_VARARGS, NULL},
7479  { "Solver_LoadSolutionFromProto", _wrap_Solver_LoadSolutionFromProto, METH_VARARGS, NULL},
7480  { "Solver_ExportModelAsLpFormat", _wrap_Solver_ExportModelAsLpFormat, METH_VARARGS, NULL},
7481  { "Solver_ExportModelAsMpsFormat", _wrap_Solver_ExportModelAsMpsFormat, METH_VARARGS, NULL},
7482  { "Solver_SetHint", _wrap_Solver_SetHint, METH_VARARGS, "\n"
7483  "Set a hint for solution.\n"
7484  "\n"
7485  "If a feasible or almost-feasible solution to the problem is already known,\n"
7486  "it may be helpful to pass it to the solver so that it can be used. A\n"
7487  "solver that supports this feature will try to use this information to\n"
7488  "create its initial feasible solution.\n"
7489  "\n"
7490  "Note that it may not always be faster to give a hint like this to the\n"
7491  "solver. There is also no guarantee that the solver will use this hint or\n"
7492  "try to return a solution \"close\" to this assignment in case of multiple\n"
7493  "optimal solutions.\n"
7494  ""},
7495  { "Solver_SetNumThreads", _wrap_Solver_SetNumThreads, METH_VARARGS, " Sets the number of threads to be used by the solver."},
7496  { "Solver_Infinity", _wrap_Solver_Infinity, METH_NOARGS, NULL},
7497  { "Solver_SetTimeLimit", _wrap_Solver_SetTimeLimit, METH_VARARGS, NULL},
7498  { "Solver_WallTime", _wrap_Solver_WallTime, METH_O, NULL},
7499  { "Solver_Iterations", _wrap_Solver_Iterations, METH_O, NULL},
7500  { "Solver_swigregister", Solver_swigregister, METH_O, NULL},
7501  { "Solver_swiginit", Solver_swiginit, METH_VARARGS, NULL},
7502  { "__lshift__", _wrap___lshift__, METH_VARARGS, NULL},
7503  { "Objective_Clear", _wrap_Objective_Clear, METH_O, "\n"
7504  " Clears the offset, all variables and coefficients, and the optimization\n"
7505  "direction.\n"
7506  ""},
7507  { "Objective_SetCoefficient", _wrap_Objective_SetCoefficient, METH_VARARGS, "\n"
7508  "Sets the coefficient of the variable in the objective.\n"
7509  "\n"
7510  "If the variable does not belong to the solver, the function just returns,\n"
7511  "or crashes in non-opt mode.\n"
7512  ""},
7513  { "Objective_GetCoefficient", _wrap_Objective_GetCoefficient, METH_VARARGS, "\n"
7514  " Gets the coefficient of a given variable in the objective\n"
7515  "\n"
7516  "It returns 0 if the variable does not appear in the objective).\n"
7517  ""},
7518  { "Objective_SetOffset", _wrap_Objective_SetOffset, METH_VARARGS, " Sets the constant term in the objective."},
7519  { "Objective_offset", _wrap_Objective_offset, METH_O, " Gets the constant term in the objective."},
7520  { "Objective_SetOptimizationDirection", _wrap_Objective_SetOptimizationDirection, METH_VARARGS, " Sets the optimization direction (maximize: true or minimize: false)."},
7521  { "Objective_SetMinimization", _wrap_Objective_SetMinimization, METH_O, " Sets the optimization direction to minimize."},
7522  { "Objective_SetMaximization", _wrap_Objective_SetMaximization, METH_O, " Sets the optimization direction to maximize."},
7523  { "Objective_maximization", _wrap_Objective_maximization, METH_O, " Is the optimization direction set to maximize?"},
7524  { "Objective_minimization", _wrap_Objective_minimization, METH_O, " Is the optimization direction set to minimize?"},
7525  { "Objective_Value", _wrap_Objective_Value, METH_O, "\n"
7526  "Returns the objective value of the best solution found so far.\n"
7527  "\n"
7528  "It is the optimal objective value if the problem has been solved to\n"
7529  "optimality.\n"
7530  "\n"
7531  "Note: the objective value may be slightly different than what you could\n"
7532  "compute yourself using ``MPVariable::solution_value();`` please use the\n"
7533  "--verify_solution flag to gain confidence about the numerical stability of\n"
7534  "your solution.\n"
7535  ""},
7536  { "Objective_BestBound", _wrap_Objective_BestBound, METH_O, "\n"
7537  "Returns the best objective bound.\n"
7538  "\n"
7539  "In case of minimization, it is a lower bound on the objective value of the\n"
7540  "optimal integer solution. Only available for discrete problems.\n"
7541  ""},
7542  { "Objective_Offset", _wrap_Objective_Offset, METH_O, NULL},
7543  { "delete_Objective", _wrap_delete_Objective, METH_O, NULL},
7544  { "Objective_swigregister", Objective_swigregister, METH_O, NULL},
7545  { "Variable_name", _wrap_Variable_name, METH_O, " Returns the name of the variable."},
7546  { "Variable_SetInteger", _wrap_Variable_SetInteger, METH_VARARGS, " Sets the integrality requirement of the variable."},
7547  { "Variable_integer", _wrap_Variable_integer, METH_O, " Returns the integrality requirement of the variable."},
7548  { "Variable_solution_value", _wrap_Variable_solution_value, METH_O, "\n"
7549  "Returns the value of the variable in the current solution.\n"
7550  "\n"
7551  "If the variable is integer, then the value will always be an integer (the\n"
7552  "underlying solver handles floating-point values only, but this function\n"
7553  "automatically rounds it to the nearest integer; see: man 3 round).\n"
7554  ""},
7555  { "Variable_index", _wrap_Variable_index, METH_O, " Returns the index of the variable in the MPSolver::variables_."},
7556  { "Variable_lb", _wrap_Variable_lb, METH_O, " Returns the lower bound."},
7557  { "Variable_ub", _wrap_Variable_ub, METH_O, " Returns the upper bound."},
7558  { "Variable_SetBounds", _wrap_Variable_SetBounds, METH_VARARGS, " Sets both the lower and upper bounds."},
7559  { "Variable_reduced_cost", _wrap_Variable_reduced_cost, METH_O, "\n"
7560  "Advanced usage: returns the reduced cost of the variable in the current\n"
7561  "solution (only available for continuous problems).\n"
7562  ""},
7563  { "Variable_basis_status", _wrap_Variable_basis_status, METH_O, "\n"
7564  "Advanced usage: returns the basis status of the variable in the current\n"
7565  "solution (only available for continuous problems).\n"
7566  "\n"
7567  "See also: MPSolver::BasisStatus.\n"
7568  ""},
7569  { "Variable_branching_priority", _wrap_Variable_branching_priority, METH_O, "\n"
7570  "Advanced usage: Certain MIP solvers (e.g. Gurobi or SCIP) allow you to set\n"
7571  "a per-variable priority for determining which variable to branch on.\n"
7572  "\n"
7573  "A value of 0 is treated as default, and is equivalent to not setting the\n"
7574  "branching priority. The solver looks first to branch on fractional\n"
7575  "variables in higher priority levels. As of 2019-05, only Gurobi and SCIP\n"
7576  "support setting branching priority; all other solvers will simply ignore\n"
7577  "this annotation.\n"
7578  ""},
7579  { "Variable_SetBranchingPriority", _wrap_Variable_SetBranchingPriority, METH_VARARGS, NULL},
7580  { "Variable___str__", _wrap_Variable___str__, METH_O, NULL},
7581  { "Variable___repr__", _wrap_Variable___repr__, METH_O, NULL},
7582  { "Variable_SolutionValue", _wrap_Variable_SolutionValue, METH_O, NULL},
7583  { "Variable_Integer", _wrap_Variable_Integer, METH_O, NULL},
7584  { "Variable_Lb", _wrap_Variable_Lb, METH_O, NULL},
7585  { "Variable_Ub", _wrap_Variable_Ub, METH_O, NULL},
7586  { "Variable_SetLb", _wrap_Variable_SetLb, METH_VARARGS, NULL},
7587  { "Variable_SetUb", _wrap_Variable_SetUb, METH_VARARGS, NULL},
7588  { "Variable_ReducedCost", _wrap_Variable_ReducedCost, METH_O, NULL},
7589  { "delete_Variable", _wrap_delete_Variable, METH_O, NULL},
7590  { "Variable_swigregister", Variable_swigregister, METH_O, NULL},
7591  { "Constraint_name", _wrap_Constraint_name, METH_O, " Returns the name of the constraint."},
7592  { "Constraint_Clear", _wrap_Constraint_Clear, METH_O, " Clears all variables and coefficients. Does not clear the bounds."},
7593  { "Constraint_SetCoefficient", _wrap_Constraint_SetCoefficient, METH_VARARGS, "\n"
7594  "Sets the coefficient of the variable on the constraint.\n"
7595  "\n"
7596  "If the variable does not belong to the solver, the function just returns,\n"
7597  "or crashes in non-opt mode.\n"
7598  ""},
7599  { "Constraint_GetCoefficient", _wrap_Constraint_GetCoefficient, METH_VARARGS, "\n"
7600  "Gets the coefficient of a given variable on the constraint (which is 0 if\n"
7601  "the variable does not appear in the constraint).\n"
7602  ""},
7603  { "Constraint_lb", _wrap_Constraint_lb, METH_O, " Returns the lower bound."},
7604  { "Constraint_ub", _wrap_Constraint_ub, METH_O, " Returns the upper bound."},
7605  { "Constraint_SetBounds", _wrap_Constraint_SetBounds, METH_VARARGS, " Sets both the lower and upper bounds."},
7606  { "Constraint_set_is_lazy", _wrap_Constraint_set_is_lazy, METH_VARARGS, "\n"
7607  "Advanced usage: sets the constraint \"laziness\".\n"
7608  "\n"
7609  "**This is only supported for SCIP and has no effect on other\n"
7610  "solvers.**\n"
7611  "\n"
7612  "When **laziness** is true, the constraint is only considered by the Linear\n"
7613  "Programming solver if its current solution violates the constraint. In this\n"
7614  "case, the constraint is definitively added to the problem. This may be\n"
7615  "useful in some MIP problems, and may have a dramatic impact on performance.\n"
7616  "\n"
7617  "For more info see: http://tinyurl.com/lazy-constraints.\n"
7618  ""},
7619  { "Constraint_index", _wrap_Constraint_index, METH_O, " Returns the index of the constraint in the MPSolver::constraints_."},
7620  { "Constraint_dual_value", _wrap_Constraint_dual_value, METH_O, "\n"
7621  "Advanced usage: returns the dual value of the constraint in the current\n"
7622  "solution (only available for continuous problems).\n"
7623  ""},
7624  { "Constraint_basis_status", _wrap_Constraint_basis_status, METH_O, "\n"
7625  "Advanced usage: returns the basis status of the constraint.\n"
7626  "\n"
7627  "It is only available for continuous problems).\n"
7628  "\n"
7629  "Note that if a constraint \"linear_expression in [lb, ub]\" is transformed\n"
7630  "into \"linear_expression + slack = 0\" with slack in [-ub, -lb], then this\n"
7631  "status is the same as the status of the slack variable with AT_UPPER_BOUND\n"
7632  "and AT_LOWER_BOUND swapped.\n"
7633  "\n"
7634  "See also: MPSolver::BasisStatus.\n"
7635  ""},
7636  { "Constraint_Lb", _wrap_Constraint_Lb, METH_O, NULL},
7637  { "Constraint_Ub", _wrap_Constraint_Ub, METH_O, NULL},
7638  { "Constraint_SetLb", _wrap_Constraint_SetLb, METH_VARARGS, NULL},
7639  { "Constraint_SetUb", _wrap_Constraint_SetUb, METH_VARARGS, NULL},
7640  { "Constraint_DualValue", _wrap_Constraint_DualValue, METH_O, NULL},
7641  { "delete_Constraint", _wrap_delete_Constraint, METH_O, NULL},
7642  { "Constraint_swigregister", Constraint_swigregister, METH_O, NULL},
7643  { "new_MPSolverParameters", _wrap_new_MPSolverParameters, METH_NOARGS, " The constructor sets all parameters to their default value."},
7644  { "MPSolverParameters_SetDoubleParam", _wrap_MPSolverParameters_SetDoubleParam, METH_VARARGS, " Sets a double parameter to a specific value."},
7645  { "MPSolverParameters_SetIntegerParam", _wrap_MPSolverParameters_SetIntegerParam, METH_VARARGS, " Sets a integer parameter to a specific value."},
7646  { "MPSolverParameters_GetDoubleParam", _wrap_MPSolverParameters_GetDoubleParam, METH_VARARGS, " Returns the value of a double parameter."},
7647  { "MPSolverParameters_GetIntegerParam", _wrap_MPSolverParameters_GetIntegerParam, METH_VARARGS, " Returns the value of an integer parameter."},
7648  { "delete_MPSolverParameters", _wrap_delete_MPSolverParameters, METH_O, NULL},
7649  { "MPSolverParameters_swigregister", MPSolverParameters_swigregister, METH_O, NULL},
7650  { "MPSolverParameters_swiginit", MPSolverParameters_swiginit, METH_VARARGS, NULL},
7651  { "new_ModelExportOptions", _wrap_new_ModelExportOptions, METH_NOARGS, NULL},
7652  { "delete_ModelExportOptions", _wrap_delete_ModelExportOptions, METH_O, NULL},
7653  { "ModelExportOptions_swigregister", ModelExportOptions_swigregister, METH_O, NULL},
7654  { "ModelExportOptions_swiginit", ModelExportOptions_swiginit, METH_VARARGS, NULL},
7655  { "ExportModelAsLpFormat", _wrap_ExportModelAsLpFormat, METH_VARARGS, NULL},
7656  { "ExportModelAsMpsFormat", _wrap_ExportModelAsMpsFormat, METH_VARARGS, NULL},
7657  { "FindErrorInModelProto", _wrap_FindErrorInModelProto, METH_O, NULL},
7658  { NULL, NULL, 0, NULL }
7659 };
7660 
7661 static PyMethodDef SwigMethods_proxydocs[] = {
7662  { NULL, NULL, 0, NULL }
7663 };
7664 
7665 
7666 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
7667 
7668 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
7669 static swig_type_info _swigt__p_int = {"_p_int", "int *|int_least32_t *|int32 *|int32_t *", 0, 0, (void*)0, 0};
7670 static swig_type_info _swigt__p_long = {"_p_long", "intptr_t *|int_least64_t *|int_fast32_t *|int_fast64_t *|int64 *|int64_t *|long *|int_fast16_t *|intmax_t *", 0, 0, (void*)0, 0};
7671 static swig_type_info _swigt__p_operations_research__MPConstraint = {"_p_operations_research__MPConstraint", "operations_research::MPConstraint *", 0, 0, (void*)0, 0};
7672 static swig_type_info _swigt__p_operations_research__MPModelExportOptions = {"_p_operations_research__MPModelExportOptions", "operations_research::MPModelExportOptions *", 0, 0, (void*)0, 0};
7673 static swig_type_info _swigt__p_operations_research__MPModelRequest = {"_p_operations_research__MPModelRequest", "operations_research::MPModelRequest *", 0, 0, (void*)0, 0};
7674 static swig_type_info _swigt__p_operations_research__MPObjective = {"_p_operations_research__MPObjective", "operations_research::MPObjective *", 0, 0, (void*)0, 0};
7675 static swig_type_info _swigt__p_operations_research__MPSolver = {"_p_operations_research__MPSolver", "operations_research::MPSolver *", 0, 0, (void*)0, 0};
7676 static swig_type_info _swigt__p_operations_research__MPSolverParameters = {"_p_operations_research__MPSolverParameters", "operations_research::MPSolverParameters *", 0, 0, (void*)0, 0};
7677 static swig_type_info _swigt__p_operations_research__MPVariable = {"_p_operations_research__MPVariable", "operations_research::MPVariable *", 0, 0, (void*)0, 0};
7678 static swig_type_info _swigt__p_short = {"_p_short", "int16 *|short *|int_least16_t *|int16_t *", 0, 0, (void*)0, 0};
7679 static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "signed char *|int8 *|int_least8_t *|int_fast8_t *|int8_t *", 0, 0, (void*)0, 0};
7680 static swig_type_info _swigt__p_std__ostream = {"_p_std__ostream", "std::ostream *", 0, 0, (void*)0, 0};
7681 static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|uint8 *|uint_least8_t *|uint_fast8_t *|uint8_t *", 0, 0, (void*)0, 0};
7682 static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "uint_least32_t *|uint32 *|uint32_t *|unsigned int *", 0, 0, (void*)0, 0};
7683 static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "uintptr_t *|uint_least64_t *|uint_fast32_t *|uint_fast64_t *|uint64 *|uint64_t *|unsigned long *|uint_fast16_t *|uintmax_t *", 0, 0, (void*)0, 0};
7684 static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "uint16 *|unsigned short *|uint_least16_t *|uint16_t *", 0, 0, (void*)0, 0};
7685 
7687  &_swigt__p_char,
7688  &_swigt__p_int,
7689  &_swigt__p_long,
7697  &_swigt__p_short,
7704 };
7705 
7706 static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
7707 static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
7708 static swig_cast_info _swigc__p_long[] = { {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
7716 static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}};
7717 static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}};
7718 static swig_cast_info _swigc__p_std__ostream[] = { {&_swigt__p_std__ostream, 0, 0, 0},{0, 0, 0, 0}};
7719 static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
7720 static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
7721 static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
7723 
7726  _swigc__p_int,
7742 };
7743 
7744 
7745 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
7746 
7748 {0, 0, 0, 0.0, 0, 0}};
7749 
7750 #ifdef __cplusplus
7751 }
7752 #endif
7753 /* -----------------------------------------------------------------------------
7754  * Type initialization:
7755  * This problem is tough by the requirement that no dynamic
7756  * memory is used. Also, since swig_type_info structures store pointers to
7757  * swig_cast_info structures and swig_cast_info structures store pointers back
7758  * to swig_type_info structures, we need some lookup code at initialization.
7759  * The idea is that swig generates all the structures that are needed.
7760  * The runtime then collects these partially filled structures.
7761  * The SWIG_InitializeModule function takes these initial arrays out of
7762  * swig_module, and does all the lookup, filling in the swig_module.types
7763  * array with the correct data and linking the correct swig_cast_info
7764  * structures together.
7765  *
7766  * The generated swig_type_info structures are assigned statically to an initial
7767  * array. We just loop through that array, and handle each type individually.
7768  * First we lookup if this type has been already loaded, and if so, use the
7769  * loaded structure instead of the generated one. Then we have to fill in the
7770  * cast linked list. The cast data is initially stored in something like a
7771  * two-dimensional array. Each row corresponds to a type (there are the same
7772  * number of rows as there are in the swig_type_initial array). Each entry in
7773  * a column is one of the swig_cast_info structures for that type.
7774  * The cast_initial array is actually an array of arrays, because each row has
7775  * a variable number of columns. So to actually build the cast linked list,
7776  * we find the array of casts associated with the type, and loop through it
7777  * adding the casts to the list. The one last trick we need to do is making
7778  * sure the type pointer in the swig_cast_info struct is correct.
7779  *
7780  * First off, we lookup the cast->type name to see if it is already loaded.
7781  * There are three cases to handle:
7782  * 1) If the cast->type has already been loaded AND the type we are adding
7783  * casting info to has not been loaded (it is in this module), THEN we
7784  * replace the cast->type pointer with the type pointer that has already
7785  * been loaded.
7786  * 2) If BOTH types (the one we are adding casting info to, and the
7787  * cast->type) are loaded, THEN the cast info has already been loaded by
7788  * the previous module so we just ignore it.
7789  * 3) Finally, if cast->type has not already been loaded, then we add that
7790  * swig_cast_info to the linked list (because the cast->type) pointer will
7791  * be correct.
7792  * ----------------------------------------------------------------------------- */
7793 
7794 #ifdef __cplusplus
7795 extern "C" {
7796 #if 0
7797 } /* c-mode */
7798 #endif
7799 #endif
7800 
7801 #if 0
7802 #define SWIGRUNTIME_DEBUG
7803 #endif
7804 
7805 
7806 SWIGRUNTIME void
7807 SWIG_InitializeModule(void *clientdata) {
7808  size_t i;
7809  swig_module_info *module_head, *iter;
7810  int init;
7811 
7812  /* check to see if the circular list has been setup, if not, set it up */
7813  if (swig_module.next==0) {
7814  /* Initialize the swig_module */
7818  init = 1;
7819  } else {
7820  init = 0;
7821  }
7822 
7823  /* Try and load any already created modules */
7824  module_head = SWIG_GetModule(clientdata);
7825  if (!module_head) {
7826  /* This is the first module loaded for this interpreter */
7827  /* so set the swig module into the interpreter */
7828  SWIG_SetModule(clientdata, &swig_module);
7829  } else {
7830  /* the interpreter has loaded a SWIG module, but has it loaded this one? */
7831  iter=module_head;
7832  do {
7833  if (iter==&swig_module) {
7834  /* Our module is already in the list, so there's nothing more to do. */
7835  return;
7836  }
7837  iter=iter->next;
7838  } while (iter!= module_head);
7839 
7840  /* otherwise we must add our module into the list */
7841  swig_module.next = module_head->next;
7842  module_head->next = &swig_module;
7843  }
7844 
7845  /* When multiple interpreters are used, a module could have already been initialized in
7846  a different interpreter, but not yet have a pointer in this interpreter.
7847  In this case, we do not want to continue adding types... everything should be
7848  set up already */
7849  if (init == 0) return;
7850 
7851  /* Now work on filling in swig_module.types */
7852 #ifdef SWIGRUNTIME_DEBUG
7853  printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
7854 #endif
7855  for (i = 0; i < swig_module.size; ++i) {
7856  swig_type_info *type = 0;
7857  swig_type_info *ret;
7858  swig_cast_info *cast;
7859 
7860 #ifdef SWIGRUNTIME_DEBUG
7861  printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
7862 #endif
7863 
7864  /* if there is another module already loaded */
7865  if (swig_module.next != &swig_module) {
7867  }
7868  if (type) {
7869  /* Overwrite clientdata field */
7870 #ifdef SWIGRUNTIME_DEBUG
7871  printf("SWIG_InitializeModule: found type %s\n", type->name);
7872 #endif
7875 #ifdef SWIGRUNTIME_DEBUG
7876  printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
7877 #endif
7878  }
7879  } else {
7880  type = swig_module.type_initial[i];
7881  }
7882 
7883  /* Insert casting types */
7884  cast = swig_module.cast_initial[i];
7885  while (cast->type) {
7886  /* Don't need to add information already in the list */
7887  ret = 0;
7888 #ifdef SWIGRUNTIME_DEBUG
7889  printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
7890 #endif
7891  if (swig_module.next != &swig_module) {
7893 #ifdef SWIGRUNTIME_DEBUG
7894  if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
7895 #endif
7896  }
7897  if (ret) {
7898  if (type == swig_module.type_initial[i]) {
7899 #ifdef SWIGRUNTIME_DEBUG
7900  printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
7901 #endif
7902  cast->type = ret;
7903  ret = 0;
7904  } else {
7905  /* Check for casting already in the list */
7906  swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
7907 #ifdef SWIGRUNTIME_DEBUG
7908  if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
7909 #endif
7910  if (!ocast) ret = 0;
7911  }
7912  }
7913 
7914  if (!ret) {
7915 #ifdef SWIGRUNTIME_DEBUG
7916  printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
7917 #endif
7918  if (type->cast) {
7919  type->cast->prev = cast;
7920  cast->next = type->cast;
7921  }
7922  type->cast = cast;
7923  }
7924  cast++;
7925  }
7926  /* Set entry in modules->types array equal to the type */
7927  swig_module.types[i] = type;
7928  }
7929  swig_module.types[i] = 0;
7930 
7931 #ifdef SWIGRUNTIME_DEBUG
7932  printf("**** SWIG_InitializeModule: Cast List ******\n");
7933  for (i = 0; i < swig_module.size; ++i) {
7934  int j = 0;
7936  printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
7937  while (cast->type) {
7938  printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
7939  cast++;
7940  ++j;
7941  }
7942  printf("---- Total casts: %d\n",j);
7943  }
7944  printf("**** SWIG_InitializeModule: Cast List ******\n");
7945 #endif
7946 }
7947 
7948 /* This function will propagate the clientdata field of type to
7949 * any new swig_type_info structures that have been added into the list
7950 * of equivalent types. It is like calling
7951 * SWIG_TypeClientData(type, clientdata) a second time.
7952 */
7953 SWIGRUNTIME void
7955  size_t i;
7956  swig_cast_info *equiv;
7957  static int init_run = 0;
7958 
7959  if (init_run) return;
7960  init_run = 1;
7961 
7962  for (i = 0; i < swig_module.size; i++) {
7963  if (swig_module.types[i]->clientdata) {
7964  equiv = swig_module.types[i]->cast;
7965  while (equiv) {
7966  if (!equiv->converter) {
7967  if (equiv->type && !equiv->type->clientdata)
7969  }
7970  equiv = equiv->next;
7971  }
7972  }
7973  }
7974 }
7975 
7976 #ifdef __cplusplus
7977 #if 0
7978 {
7979  /* c-mode */
7980 #endif
7981 }
7982 #endif
7983 
7984 
7985 
7986 #ifdef __cplusplus
7987 extern "C" {
7988 #endif
7989 
7990  /* Python-specific SWIG API */
7991 #define SWIG_newvarlink() SWIG_Python_newvarlink()
7992 #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
7993 #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
7994 
7995  /* -----------------------------------------------------------------------------
7996  * global variable support code.
7997  * ----------------------------------------------------------------------------- */
7998 
7999  typedef struct swig_globalvar {
8000  char *name; /* Name of global variable */
8001  PyObject *(*get_attr)(void); /* Return the current value */
8002  int (*set_attr)(PyObject *); /* Set the value */
8003  struct swig_globalvar *next;
8005 
8006  typedef struct swig_varlinkobject {
8007  PyObject_HEAD
8010 
8011  SWIGINTERN PyObject *
8013 #if PY_VERSION_HEX >= 0x03000000
8014  return PyUnicode_InternFromString("<Swig global variables>");
8015 #else
8016  return PyString_FromString("<Swig global variables>");
8017 #endif
8018  }
8019 
8020  SWIGINTERN PyObject *
8022 #if PY_VERSION_HEX >= 0x03000000
8023  PyObject *str = PyUnicode_InternFromString("(");
8024  PyObject *tail;
8025  PyObject *joined;
8027  for (var = v->vars; var; var=var->next) {
8028  tail = PyUnicode_FromString(var->name);
8029  joined = PyUnicode_Concat(str, tail);
8030  Py_DecRef(str);
8031  Py_DecRef(tail);
8032  str = joined;
8033  if (var->next) {
8034  tail = PyUnicode_InternFromString(", ");
8035  joined = PyUnicode_Concat(str, tail);
8036  Py_DecRef(str);
8037  Py_DecRef(tail);
8038  str = joined;
8039  }
8040  }
8041  tail = PyUnicode_InternFromString(")");
8042  joined = PyUnicode_Concat(str, tail);
8043  Py_DecRef(str);
8044  Py_DecRef(tail);
8045  str = joined;
8046 #else
8047  PyObject *str = PyString_FromString("(");
8049  for (var = v->vars; var; var=var->next) {
8050  PyString_ConcatAndDel(&str,PyString_FromString(var->name));
8051  if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
8052  }
8053  PyString_ConcatAndDel(&str,PyString_FromString(")"));
8054 #endif
8055  return str;
8056  }
8057 
8058  SWIGINTERN void
8060  swig_globalvar *var = v->vars;
8061  while (var) {
8062  swig_globalvar *n = var->next;
8063  free(var->name);
8064  free(var);
8065  var = n;
8066  }
8067  }
8068 
8069  SWIGINTERN PyObject *
8071  PyObject *res = NULL;
8072  swig_globalvar *var = v->vars;
8073  while (var) {
8074  if (strcmp(var->name,n) == 0) {
8075  res = (*var->get_attr)();
8076  break;
8077  }
8078  var = var->next;
8079  }
8080  if (res == NULL && !PyErr_Occurred()) {
8081  PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
8082  }
8083  return res;
8084  }
8085 
8086  SWIGINTERN int
8087  swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
8088  int res = 1;
8089  swig_globalvar *var = v->vars;
8090  while (var) {
8091  if (strcmp(var->name,n) == 0) {
8092  res = (*var->set_attr)(p);
8093  break;
8094  }
8095  var = var->next;
8096  }
8097  if (res == 1 && !PyErr_Occurred()) {
8098  PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
8099  }
8100  return res;
8101  }
8102 
8103  SWIGINTERN PyTypeObject*
8105  static char varlink__doc__[] = "Swig var link object";
8106  static PyTypeObject varlink_type;
8107  static int type_init = 0;
8108  if (!type_init) {
8109  const PyTypeObject tmp = {
8110 #if PY_VERSION_HEX >= 0x03000000
8111  PyVarObject_HEAD_INIT(NULL, 0)
8112 #else
8113  PyObject_HEAD_INIT(NULL)
8114  0, /* ob_size */
8115 #endif
8116  "swigvarlink", /* tp_name */
8117  sizeof(swig_varlinkobject), /* tp_basicsize */
8118  0, /* tp_itemsize */
8119  (destructor) swig_varlink_dealloc, /* tp_dealloc */
8120  0, /* tp_print */
8121  (getattrfunc) swig_varlink_getattr, /* tp_getattr */
8122  (setattrfunc) swig_varlink_setattr, /* tp_setattr */
8123  0, /* tp_compare */
8124  (reprfunc) swig_varlink_repr, /* tp_repr */
8125  0, /* tp_as_number */
8126  0, /* tp_as_sequence */
8127  0, /* tp_as_mapping */
8128  0, /* tp_hash */
8129  0, /* tp_call */
8130  (reprfunc) swig_varlink_str, /* tp_str */
8131  0, /* tp_getattro */
8132  0, /* tp_setattro */
8133  0, /* tp_as_buffer */
8134  0, /* tp_flags */
8135  varlink__doc__, /* tp_doc */
8136  0, /* tp_traverse */
8137  0, /* tp_clear */
8138  0, /* tp_richcompare */
8139  0, /* tp_weaklistoffset */
8140  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
8141  0, /* tp_del */
8142  0, /* tp_version_tag */
8143 #if PY_VERSION_HEX >= 0x03040000
8144  0, /* tp_finalize */
8145 #endif
8146 #if PY_VERSION_HEX >= 0x03080000
8147  0, /* tp_vectorcall */
8148 #endif
8149 #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
8150  0, /* tp_print */
8151 #endif
8152 #ifdef COUNT_ALLOCS
8153  0, /* tp_allocs */
8154  0, /* tp_frees */
8155  0, /* tp_maxalloc */
8156  0, /* tp_prev */
8157  0 /* tp_next */
8158 #endif
8159  };
8160  varlink_type = tmp;
8161  type_init = 1;
8162  if (PyType_Ready(&varlink_type) < 0)
8163  return NULL;
8164  }
8165  return &varlink_type;
8166  }
8167 
8168  /* Create a variable linking object for use later */
8169  SWIGINTERN PyObject *
8171  swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
8172  if (result) {
8173  result->vars = 0;
8174  }
8175  return ((PyObject*) result);
8176  }
8177 
8178  SWIGINTERN void
8179  SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
8182  if (gv) {
8183  size_t size = strlen(name)+1;
8184  gv->name = (char *)malloc(size);
8185  if (gv->name) {
8186  memcpy(gv->name, name, size);
8187  gv->get_attr = get_attr;
8188  gv->set_attr = set_attr;
8189  gv->next = v->vars;
8190  }
8191  }
8192  v->vars = gv;
8193  }
8194 
8195  SWIGINTERN PyObject *
8197  static PyObject *globals = 0;
8198  if (!globals) {
8199  globals = SWIG_newvarlink();
8200  }
8201  return globals;
8202  }
8203 
8204  /* -----------------------------------------------------------------------------
8205  * constants/methods manipulation
8206  * ----------------------------------------------------------------------------- */
8207 
8208  /* Install Constants */
8209  SWIGINTERN void
8210  SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
8211  PyObject *obj = 0;
8212  size_t i;
8213  for (i = 0; constants[i].type; ++i) {
8214  switch(constants[i].type) {
8215  case SWIG_PY_POINTER:
8216  obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
8217  break;
8218  case SWIG_PY_BINARY:
8219  obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
8220  break;
8221  default:
8222  obj = 0;
8223  break;
8224  }
8225  if (obj) {
8226  PyDict_SetItemString(d, constants[i].name, obj);
8227  Py_DECREF(obj);
8228  }
8229  }
8230  }
8231 
8232  /* -----------------------------------------------------------------------------*/
8233  /* Fix SwigMethods to carry the callback ptrs when needed */
8234  /* -----------------------------------------------------------------------------*/
8235 
8236  SWIGINTERN void
8237  SWIG_Python_FixMethods(PyMethodDef *methods,
8238  swig_const_info *const_table,
8239  swig_type_info **types,
8240  swig_type_info **types_initial) {
8241  size_t i;
8242  for (i = 0; methods[i].ml_name; ++i) {
8243  const char *c = methods[i].ml_doc;
8244  if (!c) continue;
8245  c = strstr(c, "swig_ptr: ");
8246  if (c) {
8247  int j;
8248  swig_const_info *ci = 0;
8249  const char *name = c + 10;
8250  for (j = 0; const_table[j].type; ++j) {
8251  if (strncmp(const_table[j].name, name,
8252  strlen(const_table[j].name)) == 0) {
8253  ci = &(const_table[j]);
8254  break;
8255  }
8256  }
8257  if (ci) {
8258  void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
8259  if (ptr) {
8260  size_t shift = (ci->ptype) - types;
8261  swig_type_info *ty = types_initial[shift];
8262  size_t ldoc = (c - methods[i].ml_doc);
8263  size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
8264  char *ndoc = (char*)malloc(ldoc + lptr + 10);
8265  if (ndoc) {
8266  char *buff = ndoc;
8267  memcpy(buff, methods[i].ml_doc, ldoc);
8268  buff += ldoc;
8269  memcpy(buff, "swig_ptr: ", 10);
8270  buff += 10;
8271  SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
8272  methods[i].ml_doc = ndoc;
8273  }
8274  }
8275  }
8276  }
8277  }
8278  }
8279 
8280  /* -----------------------------------------------------------------------------
8281  * Method creation and docstring support functions
8282  * ----------------------------------------------------------------------------- */
8283 
8284  /* -----------------------------------------------------------------------------
8285  * Function to find the method definition with the correct docstring for the
8286  * proxy module as opposed to the low-level API
8287  * ----------------------------------------------------------------------------- */
8288 
8289  SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) {
8290  /* Find the function in the modified method table */
8291  size_t offset = 0;
8292  int found = 0;
8293  while (SwigMethods_proxydocs[offset].ml_meth != NULL) {
8294  if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) {
8295  found = 1;
8296  break;
8297  }
8298  offset++;
8299  }
8300  /* Use the copy with the modified docstring if available */
8301  return found ? &SwigMethods_proxydocs[offset] : NULL;
8302  }
8303 
8304  /* -----------------------------------------------------------------------------
8305  * Wrapper of PyInstanceMethod_New() used in Python 3
8306  * It is exported to the generated module, used for -fastproxy
8307  * ----------------------------------------------------------------------------- */
8308 
8309  SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
8310  if (PyCFunction_Check(func)) {
8311  PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
8312  PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
8313  if (ml)
8314  func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
8315  }
8316 #if PY_VERSION_HEX >= 0x03000000
8317  return PyInstanceMethod_New(func);
8318 #else
8319  return PyMethod_New(func, NULL, NULL);
8320 #endif
8321  }
8322 
8323  /* -----------------------------------------------------------------------------
8324  * Wrapper of PyStaticMethod_New()
8325  * It is exported to the generated module, used for -fastproxy
8326  * ----------------------------------------------------------------------------- */
8327 
8328  SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
8329  if (PyCFunction_Check(func)) {
8330  PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
8331  PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
8332  if (ml)
8333  func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
8334  }
8335  return PyStaticMethod_New(func);
8336  }
8337 
8338 #ifdef __cplusplus
8339 }
8340 #endif
8341 
8342 /* -----------------------------------------------------------------------------*
8343  * Partial Init method
8344  * -----------------------------------------------------------------------------*/
8345 
8346 #ifdef __cplusplus
8347 extern "C"
8348 #endif
8349 
8350 SWIGEXPORT
8351 #if PY_VERSION_HEX >= 0x03000000
8352 PyObject*
8353 #else
8354 void
8355 #endif
8356 SWIG_init(void) {
8357  PyObject *m, *d, *md, *globals;
8358 
8359 #if PY_VERSION_HEX >= 0x03000000
8360  static struct PyModuleDef SWIG_module = {
8361  PyModuleDef_HEAD_INIT,
8362  SWIG_name,
8363  NULL,
8364  -1,
8365  SwigMethods,
8366  NULL,
8367  NULL,
8368  NULL,
8369  NULL
8370  };
8371 #endif
8372 
8373 #if defined(SWIGPYTHON_BUILTIN)
8374  static SwigPyClientData SwigPyObject_clientdata = {
8375  0, 0, 0, 0, 0, 0, 0
8376  };
8377  static PyGetSetDef this_getset_def = {
8378  (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
8379  };
8380  static SwigPyGetSet thisown_getset_closure = {
8383  };
8384  static PyGetSetDef thisown_getset_def = {
8385  (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
8386  };
8387  PyTypeObject *builtin_pytype;
8388  int builtin_base_count;
8389  swig_type_info *builtin_basetype;
8390  PyObject *tuple;
8391  PyGetSetDescrObject *static_getset;
8392  PyTypeObject *metatype;
8393  PyTypeObject *swigpyobject;
8394  SwigPyClientData *cd;
8395  PyObject *public_interface, *public_symbol;
8396  PyObject *this_descr;
8397  PyObject *thisown_descr;
8398  PyObject *self = 0;
8399  int i;
8400 
8401  (void)builtin_pytype;
8402  (void)builtin_base_count;
8403  (void)builtin_basetype;
8404  (void)tuple;
8405  (void)static_getset;
8406  (void)self;
8407 
8408  /* Metaclass is used to implement static member variables */
8409  metatype = SwigPyObjectType();
8410  assert(metatype);
8411 #endif
8412 
8413  (void)globals;
8414 
8415  /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
8416  SWIG_This();
8419 #ifndef SWIGPYTHON_BUILTIN
8421 #endif
8422 
8423  /* Fix SwigMethods to carry the callback ptrs when needed */
8425 
8426 #if PY_VERSION_HEX >= 0x03000000
8427  m = PyModule_Create(&SWIG_module);
8428 #else
8429  m = Py_InitModule(SWIG_name, SwigMethods);
8430 #endif
8431 
8432  md = d = PyModule_GetDict(m);
8433  (void)md;
8434 
8436 
8437 #ifdef SWIGPYTHON_BUILTIN
8438  swigpyobject = SwigPyObject_TypeOnce();
8439 
8440  SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
8441  assert(SwigPyObject_stype);
8442  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
8443  if (!cd) {
8444  SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
8445  SwigPyObject_clientdata.pytype = swigpyobject;
8446  } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
8447  PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
8448 # if PY_VERSION_HEX >= 0x03000000
8449  return NULL;
8450 # else
8451  return;
8452 # endif
8453  }
8454 
8455  /* All objects have a 'this' attribute */
8456  this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
8457  (void)this_descr;
8458 
8459  /* All objects have a 'thisown' attribute */
8460  thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
8461  (void)thisown_descr;
8462 
8463  public_interface = PyList_New(0);
8464  public_symbol = 0;
8465  (void)public_symbol;
8466 
8467  PyDict_SetItemString(md, "__all__", public_interface);
8468  Py_DECREF(public_interface);
8469  for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
8470  SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
8471  for (i = 0; swig_const_table[i].name != 0; ++i)
8472  SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
8473 #endif
8474 
8476 
8477  SWIG_Python_SetConstant(d, "Solver_CLP_LINEAR_PROGRAMMING",SWIG_From_int(static_cast< int >(operations_research::MPSolver::CLP_LINEAR_PROGRAMMING)));
8478  SWIG_Python_SetConstant(d, "Solver_GLPK_LINEAR_PROGRAMMING",SWIG_From_int(static_cast< int >(operations_research::MPSolver::GLPK_LINEAR_PROGRAMMING)));
8479  SWIG_Python_SetConstant(d, "Solver_GLOP_LINEAR_PROGRAMMING",SWIG_From_int(static_cast< int >(operations_research::MPSolver::GLOP_LINEAR_PROGRAMMING)));
8480  SWIG_Python_SetConstant(d, "Solver_SCIP_MIXED_INTEGER_PROGRAMMING",SWIG_From_int(static_cast< int >(operations_research::MPSolver::SCIP_MIXED_INTEGER_PROGRAMMING)));
8481  SWIG_Python_SetConstant(d, "Solver_GLPK_MIXED_INTEGER_PROGRAMMING",SWIG_From_int(static_cast< int >(operations_research::MPSolver::GLPK_MIXED_INTEGER_PROGRAMMING)));
8482  SWIG_Python_SetConstant(d, "Solver_CBC_MIXED_INTEGER_PROGRAMMING",SWIG_From_int(static_cast< int >(operations_research::MPSolver::CBC_MIXED_INTEGER_PROGRAMMING)));
8483  SWIG_Python_SetConstant(d, "Solver_GUROBI_LINEAR_PROGRAMMING",SWIG_From_int(static_cast< int >(operations_research::MPSolver::GUROBI_LINEAR_PROGRAMMING)));
8484  SWIG_Python_SetConstant(d, "Solver_GUROBI_MIXED_INTEGER_PROGRAMMING",SWIG_From_int(static_cast< int >(operations_research::MPSolver::GUROBI_MIXED_INTEGER_PROGRAMMING)));
8485  SWIG_Python_SetConstant(d, "Solver_CPLEX_LINEAR_PROGRAMMING",SWIG_From_int(static_cast< int >(operations_research::MPSolver::CPLEX_LINEAR_PROGRAMMING)));
8486  SWIG_Python_SetConstant(d, "Solver_CPLEX_MIXED_INTEGER_PROGRAMMING",SWIG_From_int(static_cast< int >(operations_research::MPSolver::CPLEX_MIXED_INTEGER_PROGRAMMING)));
8487  SWIG_Python_SetConstant(d, "Solver_XPRESS_LINEAR_PROGRAMMING",SWIG_From_int(static_cast< int >(operations_research::MPSolver::XPRESS_LINEAR_PROGRAMMING)));
8488  SWIG_Python_SetConstant(d, "Solver_XPRESS_MIXED_INTEGER_PROGRAMMING",SWIG_From_int(static_cast< int >(operations_research::MPSolver::XPRESS_MIXED_INTEGER_PROGRAMMING)));
8489  SWIG_Python_SetConstant(d, "Solver_BOP_INTEGER_PROGRAMMING",SWIG_From_int(static_cast< int >(operations_research::MPSolver::BOP_INTEGER_PROGRAMMING)));
8490  SWIG_Python_SetConstant(d, "Solver_SAT_INTEGER_PROGRAMMING",SWIG_From_int(static_cast< int >(operations_research::MPSolver::SAT_INTEGER_PROGRAMMING)));
8491  SWIG_Python_SetConstant(d, "Solver_OPTIMAL",SWIG_From_int(static_cast< int >(operations_research::MPSolver::OPTIMAL)));
8492  SWIG_Python_SetConstant(d, "Solver_FEASIBLE",SWIG_From_int(static_cast< int >(operations_research::MPSolver::FEASIBLE)));
8493  SWIG_Python_SetConstant(d, "Solver_INFEASIBLE",SWIG_From_int(static_cast< int >(operations_research::MPSolver::INFEASIBLE)));
8494  SWIG_Python_SetConstant(d, "Solver_UNBOUNDED",SWIG_From_int(static_cast< int >(operations_research::MPSolver::UNBOUNDED)));
8495  SWIG_Python_SetConstant(d, "Solver_ABNORMAL",SWIG_From_int(static_cast< int >(operations_research::MPSolver::ABNORMAL)));
8496  SWIG_Python_SetConstant(d, "Solver_NOT_SOLVED",SWIG_From_int(static_cast< int >(operations_research::MPSolver::NOT_SOLVED)));
8497  SWIG_Python_SetConstant(d, "Solver_FREE",SWIG_From_int(static_cast< int >(operations_research::MPSolver::FREE)));
8498  SWIG_Python_SetConstant(d, "Solver_AT_LOWER_BOUND",SWIG_From_int(static_cast< int >(operations_research::MPSolver::AT_LOWER_BOUND)));
8499  SWIG_Python_SetConstant(d, "Solver_AT_UPPER_BOUND",SWIG_From_int(static_cast< int >(operations_research::MPSolver::AT_UPPER_BOUND)));
8500  SWIG_Python_SetConstant(d, "Solver_FIXED_VALUE",SWIG_From_int(static_cast< int >(operations_research::MPSolver::FIXED_VALUE)));
8501  SWIG_Python_SetConstant(d, "Solver_BASIC",SWIG_From_int(static_cast< int >(operations_research::MPSolver::BASIC)));
8502  SWIG_Python_SetConstant(d, "MPSolverParameters_RELATIVE_MIP_GAP",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::RELATIVE_MIP_GAP)));
8503  SWIG_Python_SetConstant(d, "MPSolverParameters_PRIMAL_TOLERANCE",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::PRIMAL_TOLERANCE)));
8504  SWIG_Python_SetConstant(d, "MPSolverParameters_DUAL_TOLERANCE",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::DUAL_TOLERANCE)));
8505  SWIG_Python_SetConstant(d, "MPSolverParameters_PRESOLVE",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::PRESOLVE)));
8506  SWIG_Python_SetConstant(d, "MPSolverParameters_LP_ALGORITHM",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::LP_ALGORITHM)));
8507  SWIG_Python_SetConstant(d, "MPSolverParameters_INCREMENTALITY",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::INCREMENTALITY)));
8508  SWIG_Python_SetConstant(d, "MPSolverParameters_SCALING",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::SCALING)));
8509  SWIG_Python_SetConstant(d, "MPSolverParameters_PRESOLVE_OFF",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::PRESOLVE_OFF)));
8510  SWIG_Python_SetConstant(d, "MPSolverParameters_PRESOLVE_ON",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::PRESOLVE_ON)));
8511  SWIG_Python_SetConstant(d, "MPSolverParameters_DUAL",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::DUAL)));
8512  SWIG_Python_SetConstant(d, "MPSolverParameters_PRIMAL",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::PRIMAL)));
8513  SWIG_Python_SetConstant(d, "MPSolverParameters_BARRIER",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::BARRIER)));
8514  SWIG_Python_SetConstant(d, "MPSolverParameters_INCREMENTALITY_OFF",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::INCREMENTALITY_OFF)));
8515  SWIG_Python_SetConstant(d, "MPSolverParameters_INCREMENTALITY_ON",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::INCREMENTALITY_ON)));
8516  SWIG_Python_SetConstant(d, "MPSolverParameters_SCALING_OFF",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::SCALING_OFF)));
8517  SWIG_Python_SetConstant(d, "MPSolverParameters_SCALING_ON",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::SCALING_ON)));
8518  globals = SWIG_globals();
8519  if (!globals) {
8520  PyErr_SetString(PyExc_TypeError, "Failure to create SWIG globals.");
8521 #if PY_VERSION_HEX >= 0x03000000
8522  return NULL;
8523 #else
8524  return;
8525 #endif
8526  }
8527  PyDict_SetItemString(md, "cvar", globals);
8528  Py_DECREF(globals);
8534 #if PY_VERSION_HEX >= 0x03000000
8535  return m;
8536 #else
8537  return;
8538 #endif
8539 }
8540 
_wrap_Variable___str__
SWIGINTERN PyObject * _wrap_Variable___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5944
SWIG_AsPtr_std_string
SWIGINTERN int SWIG_AsPtr_std_string(PyObject *obj, std::string **val)
Definition: linear_solver_python_wrap.cc:3018
operations_research_MPSolver_SetHint
SWIGINTERN void operations_research_MPSolver_SetHint(operations_research::MPSolver *self, std::vector< operations_research::MPVariable * > const &variables, std::vector< double > const &values)
Definition: linear_solver_python_wrap.cc:3279
swig::SwigPtr_PyObject::operator->
PyObject * operator->() const
Definition: linear_solver_python_wrap.cc:2795
_wrap_Constraint_SetBounds
SWIGINTERN PyObject * _wrap_Constraint_SetBounds(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6342
SwigPyClientData::delargs
int delargs
Definition: knapsack_solver_python_wrap.cc:1310
SwigPyPacked_dealloc
SWIGRUNTIME void SwigPyPacked_dealloc(PyObject *v)
Definition: linear_solver_python_wrap.cc:1868
_wrap_Solver_NextSolution
SWIGINTERN PyObject * _wrap_Solver_NextSolution(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:4622
var
IntVar * var
Definition: expr_array.cc:1858
SWIG_From_int
SWIGINTERNINLINE PyObject * SWIG_From_int(int value)
Definition: linear_solver_python_wrap.cc:2889
SWIGINTERN
#define SWIGINTERN
Definition: linear_solver_python_wrap.cc:100
Swig_This_global
static PyObject * Swig_This_global
Definition: linear_solver_python_wrap.cc:2001
tail
int64 tail
Definition: routing_flow.cc:127
SwigPyObject_dealloc
SWIGRUNTIME void SwigPyObject_dealloc(PyObject *v)
Definition: linear_solver_python_wrap.cc:1543
swig_cast_info::next
struct swig_cast_info * next
Definition: knapsack_solver_python_wrap.cc:380
swig_module_info::size
size_t size
Definition: knapsack_solver_python_wrap.cc:389
Constraint_swigregister
SWIGINTERN PyObject * Constraint_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6626
_wrap_Objective_minimization
SWIGINTERN PyObject * _wrap_Objective_minimization(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5521
SWIGTYPE_p_operations_research__MPSolverParameters
#define SWIGTYPE_p_operations_research__MPSolverParameters
Definition: linear_solver_python_wrap.cc:2703
SWIG_Python_UnpackTuple
SWIGINTERN Py_ssize_t SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
Definition: linear_solver_python_wrap.cc:1205
operations_research::MPSolutionResponse
SWIG_TypeCheckStruct
SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty)
Definition: linear_solver_python_wrap.cc:473
SWIG_AddNewMask
#define SWIG_AddNewMask(r)
Definition: linear_solver_python_wrap.cc:328
SWIG_NEWOBJ
#define SWIG_NEWOBJ
Definition: linear_solver_python_wrap.cc:325
SwigPyObject_format
SWIGRUNTIME PyObject * SwigPyObject_format(const char *fmt, SwigPyObject *v)
Definition: linear_solver_python_wrap.cc:1423
SWIG_Python_str_DelForPy3
#define SWIG_Python_str_DelForPy3(x)
Definition: linear_solver_python_wrap.cc:833
SWIG_PYTHON_THREAD_BEGIN_BLOCK
#define SWIG_PYTHON_THREAD_BEGIN_BLOCK
Definition: linear_solver_python_wrap.cc:1028
PyObject_DEL
#define PyObject_DEL
Definition: linear_solver_python_wrap.cc:850
swig_module_info::next
struct swig_module_info * next
Definition: knapsack_solver_python_wrap.cc:390
response
SharedResponseManager * response
Definition: cp_model_solver.cc:2105
operations_research_MPSolver_Iterations
SWIGINTERN int64 operations_research_MPSolver_Iterations(operations_research::MPSolver const *self)
Definition: linear_solver_python_wrap.cc:3297
if
if(!yyg->yy_init)
Definition: parser.yy.cc:965
SWIG_Python_addvarlink
SWIGINTERN void SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int(*set_attr)(PyObject *p))
Definition: linear_solver_python_wrap.cc:8179
min
int64 min
Definition: alldiff_cst.cc:138
_wrap_Solver_Solve__SWIG_0
SWIGINTERN PyObject * _wrap_Solver_Solve__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
Definition: linear_solver_python_wrap.cc:4085
SWIG_SetModule
#define SWIG_SetModule(clientdata, pointer)
Definition: linear_solver_python_wrap.cc:1121
SWIG_InternalNewPointerObj
#define SWIG_InternalNewPointerObj(ptr, type, flags)
Definition: linear_solver_python_wrap.cc:1095
_wrap_Constraint_SetCoefficient
SWIGINTERN PyObject * _wrap_Constraint_SetCoefficient(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6237
SWIG_Python_TypeErrorOccurred
SWIGRUNTIME int SWIG_Python_TypeErrorOccurred(PyObject *obj)
Definition: linear_solver_python_wrap.cc:939
swig_cast_info::type
swig_type_info * type
Definition: knapsack_solver_python_wrap.cc:378
SWIG_AddCast
#define SWIG_AddCast(r)
Definition: linear_solver_python_wrap.cc:352
swig_const_info::dvalue
double dvalue
Definition: knapsack_solver_python_wrap.cc:1055
operations_research::MPSolver::CBC_MIXED_INTEGER_PROGRAMMING
@ CBC_MIXED_INTEGER_PROGRAMMING
Definition: linear_solver.h:198
SwigPyObject_richcompare
SWIGRUNTIME PyObject * SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
Definition: linear_solver_python_wrap.cc:1493
operations_research_MPSolver_LoadModelFromProto
SWIGINTERN std::string operations_research_MPSolver_LoadModelFromProto(operations_research::MPSolver *self, operations_research::MPModelProto const &input_model)
Definition: linear_solver_python_wrap.cc:3225
_swigc__p_unsigned_char
static swig_cast_info _swigc__p_unsigned_char[]
Definition: linear_solver_python_wrap.cc:7719
swig_varlink_str
SWIGINTERN PyObject * swig_varlink_str(swig_varlinkobject *v)
Definition: linear_solver_python_wrap.cc:8021
max
int64 max
Definition: alldiff_cst.cc:139
_wrap_ExportModelAsMpsFormat
SWIGINTERN PyObject * _wrap_ExportModelAsMpsFormat(PyObject *self, PyObject *args)
Definition: linear_solver_python_wrap.cc:7155
SWIG_TypeCmp
SWIGRUNTIME int SWIG_TypeCmp(const char *nb, const char *tb)
Definition: linear_solver_python_wrap.cc:419
_wrap_Solver_SetGurobiLibraryPath
SWIGINTERN PyObject * _wrap_Solver_SetGurobiLibraryPath(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:4697
operations_research_MPConstraint_SetUb
SWIGINTERN void operations_research_MPConstraint_SetUb(operations_research::MPConstraint *self, double x)
Definition: linear_solver_python_wrap.cc:3315
operations_research_MPVariable___str__
SWIGINTERN std::string operations_research_MPVariable___str__(operations_research::MPVariable *self)
Definition: linear_solver_python_wrap.cc:3299
operations_research::MPSolver::GLOP_LINEAR_PROGRAMMING
@ GLOP_LINEAR_PROGRAMMING
Definition: linear_solver.h:192
ModelExportOptions_swiginit
SWIGINTERN PyObject * ModelExportOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6925
SWIG_PackDataName
SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz)
Definition: linear_solver_python_wrap.cc:724
SWIG_Python_DestroyModule
SWIGRUNTIME void SWIG_Python_DestroyModule(PyObject *obj)
Definition: linear_solver_python_wrap.cc:2435
Swig_var_MPSolverParameters_kDefaultPresolve_get
SWIGINTERN PyObject * Swig_var_MPSolverParameters_kDefaultPresolve_get(void)
Definition: linear_solver_python_wrap.cc:6681
_wrap_Solver_Constraint__SWIG_1
SWIGINTERN PyObject * _wrap_Solver_Constraint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
Definition: linear_solver_python_wrap.cc:3865
_swigc__p_operations_research__MPConstraint
static swig_cast_info _swigc__p_operations_research__MPConstraint[]
Definition: linear_solver_python_wrap.cc:7709
operations_research::MPSolver::XPRESS_LINEAR_PROGRAMMING
@ XPRESS_LINEAR_PROGRAMMING
Definition: linear_solver.h:205
SWIG_NewClientData
#define SWIG_NewClientData(obj)
Definition: linear_solver_python_wrap.cc:1122
LOG
#define LOG(severity)
Definition: base/logging.h:420
SWIG_InitializeModule
SWIGRUNTIME void SWIG_InitializeModule(void *clientdata)
Definition: linear_solver_python_wrap.cc:7807
SWIG_Python_NewPointerObj
SWIGRUNTIME PyObject * SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags)
Definition: linear_solver_python_wrap.cc:2350
SWIG_Python_AddErrMesg
SWIGRUNTIME int SWIG_Python_AddErrMesg(const char *mesg, int infront)
Definition: linear_solver_python_wrap.cc:2505
ModelExportOptions_swigregister
SWIGINTERN PyObject * ModelExportOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6918
SWIG_TypeNameComp
SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2)
Definition: linear_solver_python_wrap.cc:404
SwigPyPacked
Definition: knapsack_solver_python_wrap.cc:1815
SwigPyObject_TypeOnce
SWIGRUNTIME PyTypeObject * SwigPyObject_TypeOnce(void)
Definition: linear_solver_python_wrap.cc:1666
_wrap_Solver_SetSolverSpecificParametersAsString
SWIGINTERN PyObject * _wrap_Solver_SetSolverSpecificParametersAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:4459
_wrap_Solver_LoadSolutionFromProto__SWIG_1
SWIGINTERN PyObject * _wrap_Solver_LoadSolutionFromProto__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
Definition: linear_solver_python_wrap.cc:4819
swig_varlink_getattr
SWIGINTERN PyObject * swig_varlink_getattr(swig_varlinkobject *v, char *n)
Definition: linear_solver_python_wrap.cc:8070
operations_research::MPSolverParameters::DUAL_TOLERANCE
@ DUAL_TOLERANCE
Advanced usage: tolerance for dual feasibility of basic solutions.
Definition: linear_solver.h:1375
operations_research::MPSolver::OPTIMAL
@ OPTIMAL
optimal.
Definition: linear_solver.h:429
operations_research::MPModelExportOptions
Export options.
Definition: model_exporter.h:29
SWIG_Python_SetSwigThis
SWIGRUNTIME int SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
Definition: linear_solver_python_wrap.cc:2313
_wrap_ExportModelAsLpFormat
SWIGINTERN PyObject * _wrap_ExportModelAsLpFormat(PyObject *self, PyObject *args)
Definition: linear_solver_python_wrap.cc:7008
SWIG_MangledTypeQueryModule
SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
Definition: linear_solver_python_wrap.cc:582
operations_research::MPSolverParameters::LP_ALGORITHM
@ LP_ALGORITHM
Algorithm to solve linear programs.
Definition: linear_solver.h:1383
operations_research::MPModelRequest
_wrap_Constraint_dual_value
SWIGINTERN PyObject * _wrap_Constraint_dual_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6431
FATAL
const int FATAL
Definition: log_severity.h:32
swig::SwigPtr_PyObject
Definition: knapsack_solver_python_wrap.cc:2741
_swigt__p_unsigned_short
static swig_type_info _swigt__p_unsigned_short
Definition: linear_solver_python_wrap.cc:7684
_wrap_Solver_ExportModelAsLpFormat
SWIGINTERN PyObject * _wrap_Solver_ExportModelAsLpFormat(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:4941
operations_research::ExportModelAsLpFormat
absl::StatusOr< std::string > ExportModelAsLpFormat(const MPModelProto &model, const MPModelExportOptions &options)
Outputs the current model (variables, constraints, objective) as a string encoded in the so-called "C...
Definition: model_exporter.cc:214
operations_research::MPSolver::UNBOUNDED
@ UNBOUNDED
proven unbounded.
Definition: linear_solver.h:435
_wrap_Variable_SetBounds
SWIGINTERN PyObject * _wrap_Variable_SetBounds(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5809
swig_module_info
Definition: knapsack_solver_python_wrap.cc:387
SWIG_Python_CheckNoKeywords
SWIGINTERN int SWIG_Python_CheckNoKeywords(PyObject *kwargs, const char *name)
Definition: linear_solver_python_wrap.cc:1251
operations_research::MPSolver::CPLEX_MIXED_INTEGER_PROGRAMMING
@ CPLEX_MIXED_INTEGER_PROGRAMMING
Definition: linear_solver.h:204
SWIG_PackData
SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz)
Definition: linear_solver_python_wrap.cc:656
SWIG_PY_BINARY
#define SWIG_PY_BINARY
Definition: linear_solver_python_wrap.cc:1048
message
std::string message
Definition: trace.cc:395
_wrap_Objective_Clear
SWIGINTERN PyObject * _wrap_Objective_Clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5292
SWIG_fail
#define SWIG_fail
Definition: linear_solver_python_wrap.cc:1128
SWIG_POINTER_DISOWN
#define SWIG_POINTER_DISOWN
Definition: linear_solver_python_wrap.cc:224
operations_research::FindErrorInMPModelProto
std::string FindErrorInMPModelProto(const MPModelProto &model, double abs_value_threshold)
Returns an empty string iff the model is valid and not trivially infeasible.
Definition: model_validator.cc:416
swig_const_info::lvalue
long lvalue
Definition: knapsack_solver_python_wrap.cc:1054
swig::SwigPtr_PyObject::_obj
PyObject * _obj
Definition: knapsack_solver_python_wrap.cc:2743
SWIG_SystemError
#define SWIG_SystemError
Definition: linear_solver_python_wrap.cc:765
SWIG_Python_SetErrorMsg
SWIGINTERN void SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg)
Definition: linear_solver_python_wrap.cc:1144
SWIG_MemoryError
#define SWIG_MemoryError
Definition: linear_solver_python_wrap.cc:767
SWIG_GetModule
#define SWIG_GetModule(clientdata)
Definition: linear_solver_python_wrap.cc:1120
_wrap_Solver_Constraint
SWIGINTERN PyObject * _wrap_Solver_Constraint(PyObject *self, PyObject *args)
Definition: linear_solver_python_wrap.cc:3974
swig_varlink_repr
SWIGINTERN PyObject * swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v))
Definition: linear_solver_python_wrap.cc:8012
operations_research::MPSolver
This mathematical programming (MP) solver class is the main class though which users build and solve ...
Definition: linear_solver.h:179
SWIG_name
#define SWIG_name
Definition: linear_solver_python_wrap.cc:2734
_wrap_Constraint_set_is_lazy
SWIGINTERN PyObject * _wrap_Constraint_set_is_lazy(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6379
_swigc__p_unsigned_int
static swig_cast_info _swigc__p_unsigned_int[]
Definition: linear_solver_python_wrap.cc:7720
_wrap_Objective_maximization
SWIGINTERN PyObject * _wrap_Objective_maximization(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5498
SwigPyPacked::ty
swig_type_info * ty
Definition: knapsack_solver_python_wrap.cc:1818
swig_globalvar
Definition: knapsack_solver_python_wrap.cc:3825
swig_varlink_dealloc
SWIGINTERN void swig_varlink_dealloc(swig_varlinkobject *v)
Definition: linear_solver_python_wrap.cc:8059
_wrap_Objective_SetOptimizationDirection
SWIGINTERN PyObject * _wrap_Objective_SetOptimizationDirection(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5425
swig_type_info::clientdata
void * clientdata
Definition: knapsack_solver_python_wrap.cc:372
_wrap_Solver_wall_time
SWIGINTERN PyObject * _wrap_Solver_wall_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:4674
_wrap_Variable___repr__
SWIGINTERN PyObject * _wrap_Variable___repr__(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5967
value
int64 value
Definition: demon_profiler.cc:43
_wrap_Solver_ExportModelToProto
SWIGINTERN PyObject * _wrap_Solver_ExportModelToProto(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:4395
_wrap_ExportModelAsMpsFormat__SWIG_1
SWIGINTERN PyObject * _wrap_ExportModelAsMpsFormat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
Definition: linear_solver_python_wrap.cc:7121
_wrap_Solver_Solve__SWIG_1
SWIGINTERN PyObject * _wrap_Solver_Solve__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
Definition: linear_solver_python_wrap.cc:4106
operations_research_MPSolver_Infinity
SWIGINTERN double operations_research_MPSolver_Infinity()
Definition: linear_solver_python_wrap.cc:3294
SWIG_BUILTIN_TP_INIT
#define SWIG_BUILTIN_TP_INIT
Definition: linear_solver_python_wrap.cc:1286
_wrap_Objective_SetMaximization
SWIGINTERN PyObject * _wrap_Objective_SetMaximization(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5476
_wrap_Solver_LoadModelFromProto
SWIGINTERN PyObject * _wrap_Solver_LoadModelFromProto(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:4726
SWIGTYPE_p_operations_research__MPModelRequest
#define SWIGTYPE_p_operations_research__MPModelRequest
Definition: linear_solver_python_wrap.cc:2700
SWIG_ERROR
#define SWIG_ERROR
Definition: linear_solver_python_wrap.cc:312
swig_types
static swig_type_info * swig_types[18]
Definition: linear_solver_python_wrap.cc:2712
_swigt__p_signed_char
static swig_type_info _swigt__p_signed_char
Definition: linear_solver_python_wrap.cc:7679
SWIG_Python_ConvertFunctionPtr
SWIGRUNTIME int SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty)
Definition: linear_solver_python_wrap.cc:2205
operations_research::MPSolver::InterruptSolve
bool InterruptSolve()
Interrupts the Solve() execution to terminate processing if possible.
Definition: linear_solver.cc:1078
_swigt__p_long
static swig_type_info _swigt__p_long
Definition: linear_solver_python_wrap.cc:7670
SwigPyObject_compare
SWIGRUNTIME int SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
Definition: linear_solver_python_wrap.cc:1484
swig::SwigPtr_PyObject::SwigPtr_PyObject
SwigPtr_PyObject()
Definition: linear_solver_python_wrap.cc:2753
SWIG_TypeNewClientData
SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata)
Definition: linear_solver_python_wrap.cc:568
SWIG_ValueError
#define SWIG_ValueError
Definition: linear_solver_python_wrap.cc:764
swig::SwigPtr_PyObject::~SwigPtr_PyObject
~SwigPtr_PyObject()
Definition: linear_solver_python_wrap.cc:2783
SWIG_PythonGetProxyDoc
SWIGINTERN PyMethodDef * SWIG_PythonGetProxyDoc(const char *name)
Definition: linear_solver_python_wrap.cc:8289
swig_varlinkobject
Definition: knapsack_solver_python_wrap.cc:3832
operations_research::MPSolverParameters::kDefaultRelativeMipGap
static const double kDefaultRelativeMipGap
Definition: linear_solver.h:1442
_wrap_Variable_basis_status
SWIGINTERN PyObject * _wrap_Variable_basis_status(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5869
operations_research_MPVariable_SolutionValue
SWIGINTERN double operations_research_MPVariable_SolutionValue(operations_research::MPVariable const *self)
Definition: linear_solver_python_wrap.cc:3305
_swigc__p_unsigned_short
static swig_cast_info _swigc__p_unsigned_short[]
Definition: linear_solver_python_wrap.cc:7722
Swig_var_MPSolverParameters_kDefaultIncrementality_get
SWIGINTERN PyObject * Swig_var_MPSolverParameters_kDefaultIncrementality_get(void)
Definition: linear_solver_python_wrap.cc:6695
Swig_var_MPSolverParameters_kDefaultDualTolerance_set
SWIGINTERN int Swig_var_MPSolverParameters_kDefaultDualTolerance_set(PyObject *)
Definition: linear_solver_python_wrap.cc:6661
SwigPyObject_oct
SWIGRUNTIME PyObject * SwigPyObject_oct(SwigPyObject *v)
Definition: linear_solver_python_wrap.cc:1445
swig_const_info
struct swig_const_info swig_const_info
_wrap_Solver_ExportModelAsMpsFormat
SWIGINTERN PyObject * _wrap_Solver_ExportModelAsMpsFormat(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:4971
SwigPyObject_disown
SWIGINTERN PyObject * SwigPyObject_disown(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
Definition: linear_solver_python_wrap.cc:1619
SWIG_RUNTIME_VERSION
#define SWIG_RUNTIME_VERSION
Definition: linear_solver_python_wrap.cc:190
operations_research::MPSolver::GLPK_MIXED_INTEGER_PROGRAMMING
@ GLPK_MIXED_INTEGER_PROGRAMMING
Definition: linear_solver.h:197
Objective_swigregister
SWIGINTERN PyObject * Objective_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5635
operations_research_MPConstraint_SetLb
SWIGINTERN void operations_research_MPConstraint_SetLb(operations_research::MPConstraint *self, double x)
Definition: linear_solver_python_wrap.cc:3314
SWIG_Python_SetConstant
SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj)
Definition: linear_solver_python_wrap.cc:1174
SwigPyObject_next
SWIGRUNTIME PyObject * SwigPyObject_next(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
Definition: linear_solver_python_wrap.cc:1607
swig_module_info::cast_initial
swig_cast_info ** cast_initial
Definition: knapsack_solver_python_wrap.cc:392
operations_research::MPSolverParameters::SCALING_OFF
@ SCALING_OFF
Scaling is off.
Definition: linear_solver.h:1423
malloc
void * malloc(YYSIZE_T)
SWIG_CanCastAsInteger
SWIGINTERNINLINE int SWIG_CanCastAsInteger(double *d, double min, double max)
Definition: linear_solver_python_wrap.cc:3111
operations_research::MPSolver::ABNORMAL
@ ABNORMAL
abnormal, i.e., error of some kind.
Definition: linear_solver.h:437
SWIG_POINTER_EXCEPTION
#define SWIG_POINTER_EXCEPTION
Definition: linear_solver_python_wrap.cc:2500
int64
int64_t int64
Definition: integral_types.h:34
SwigPyObject_GetDesc
SWIGRUNTIMEINLINE const char * SwigPyObject_GetDesc(PyObject *self)
Definition: linear_solver_python_wrap.cc:2546
swig_module_info::type_initial
swig_type_info ** type_initial
Definition: knapsack_solver_python_wrap.cc:391
SWIG_POINTER_IMPLICIT_CONV
#define SWIG_POINTER_IMPLICIT_CONV
Definition: linear_solver_python_wrap.cc:1284
_wrap_ExportModelAsLpFormat__SWIG_0
SWIGINTERN PyObject * _wrap_ExportModelAsLpFormat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
Definition: linear_solver_python_wrap.cc:6929
_wrap_Solver_VerifySolution
SWIGINTERN PyObject * _wrap_Solver_VerifySolution(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:4203
_wrap_new_MPSolverParameters
SWIGINTERN PyObject * _wrap_new_MPSolverParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6703
SWIG_MangledTypeQuery
#define SWIG_MangledTypeQuery(name)
Definition: linear_solver_python_wrap.cc:2715
SWIGPY_CAPSULE_NAME
#define SWIGPY_CAPSULE_NAME
Definition: linear_solver_python_wrap.cc:856
_wrap_Solver_Constraint__SWIG_3
SWIGINTERN PyObject * _wrap_Solver_Constraint__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
Definition: linear_solver_python_wrap.cc:3938
_swigt__p_operations_research__MPObjective
static swig_type_info _swigt__p_operations_research__MPObjective
Definition: linear_solver_python_wrap.cc:7674
_swigt__p_unsigned_char
static swig_type_info _swigt__p_unsigned_char
Definition: linear_solver_python_wrap.cc:7681
_wrap_Variable_Integer
SWIGINTERN PyObject * _wrap_Variable_Integer(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6013
SWIG_PyStaticMethod_New
SWIGINTERN PyObject * SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
Definition: linear_solver_python_wrap.cc:8328
operations_research_MPSolver_ExportModelAsLpFormat
SWIGINTERN std::string operations_research_MPSolver_ExportModelAsLpFormat(operations_research::MPSolver *self, bool obfuscated)
Definition: linear_solver_python_wrap.cc:3265
swig_cast_info
struct swig_cast_info swig_cast_info
index
int index
Definition: pack.cc:508
SWIG_Python_FixMethods
SWIGINTERN void SWIG_Python_FixMethods(PyMethodDef *methods, swig_const_info *const_table, swig_type_info **types, swig_type_info **types_initial)
Definition: linear_solver_python_wrap.cc:8237
SWIG_Python_str_AsChar
SWIGINTERN char * SWIG_Python_str_AsChar(PyObject *str)
Definition: linear_solver_python_wrap.cc:809
SWIG_Python_ConvertPacked
SWIGRUNTIME int SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty)
Definition: linear_solver_python_wrap.cc:2234
operations_research::MPSolverParameters
This class stores parameter settings for LP and MIP solvers.
Definition: linear_solver.h:1360
_wrap_Solver_FillSolutionResponseProto
SWIGINTERN PyObject * _wrap_Solver_FillSolutionResponseProto(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:4264
_wrap_new_Solver
SWIGINTERN PyObject * _wrap_new_Solver(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:3320
swig::SwigPtr_PyObject::operator=
SwigPtr_PyObject & operator=(const SwigPtr_PyObject &item)
Definition: linear_solver_python_wrap.cc:2773
_swigt__p_operations_research__MPSolverParameters
static swig_type_info _swigt__p_operations_research__MPSolverParameters
Definition: linear_solver_python_wrap.cc:7676
operations_research::MPConstraint
The class for constraints of a Mathematical Programming (MP) model.
Definition: linear_solver.h:1177
_wrap_Constraint_index
SWIGINTERN PyObject * _wrap_Constraint_index(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6408
SWIG_TypeName
SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty)
Definition: linear_solver_python_wrap.cc:522
SWIG_Error
#define SWIG_Error(code, msg)
Definition: linear_solver_python_wrap.cc:1127
_wrap_Solver_Iterations
SWIGINTERN PyObject * _wrap_Solver_Iterations(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5145
_wrap___lshift____SWIG_0
SWIGINTERN PyObject * _wrap___lshift____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
Definition: linear_solver_python_wrap.cc:5179
_wrap_Objective_Offset
SWIGINTERN PyObject * _wrap_Objective_Offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5590
SwigPyClientData::implicitconv
int implicitconv
Definition: knapsack_solver_python_wrap.cc:1311
SWIG_AsVal_long
SWIGINTERN int SWIG_AsVal_long(PyObject *obj, long *val)
Definition: linear_solver_python_wrap.cc:3141
_wrap_Solver_SetTimeLimit
SWIGINTERN PyObject * _wrap_Solver_SetTimeLimit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5093
swig_cast_info
Definition: knapsack_solver_python_wrap.cc:377
SWIG_Python_AddErrorMsg
SWIGRUNTIME void SWIG_Python_AddErrorMsg(const char *mesg)
Definition: linear_solver_python_wrap.cc:913
swig_globalvar::name
char * name
Definition: knapsack_solver_python_wrap.cc:3826
SwigPyPacked_Check
SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op)
Definition: linear_solver_python_wrap.cc:1862
SWIG_Python_ExceptionType
SWIGRUNTIMEINLINE PyObject * SWIG_Python_ExceptionType(swig_type_info *desc)
Definition: linear_solver_python_wrap.cc:1326
swig_cast_info::prev
struct swig_cast_info * prev
Definition: knapsack_solver_python_wrap.cc:381
_swigc__p_operations_research__MPModelExportOptions
static swig_cast_info _swigc__p_operations_research__MPModelExportOptions[]
Definition: linear_solver_python_wrap.cc:7710
_wrap_delete_MPSolverParameters
SWIGINTERN PyObject * _wrap_delete_MPSolverParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6850
operations_research::MPSolver::NextSolution
ABSL_MUST_USE_RESULT bool NextSolution()
Some solvers (MIP only, not LP) can produce multiple solutions to the problem.
Definition: linear_solver.cc:1576
SWIG_TypeEquiv
SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb)
Definition: linear_solver_python_wrap.cc:438
SWIG_SyntaxError
#define SWIG_SyntaxError
Definition: linear_solver_python_wrap.cc:763
swig::SwigVar_PyObject
Definition: knapsack_solver_python_wrap.cc:2797
_swigt__p_int
static swig_type_info _swigt__p_int
Definition: linear_solver_python_wrap.cc:7669
operations_research::sat::GetCoefficient
IntegerValue GetCoefficient(const IntegerVariable var, const LinearExpression &expr)
Definition: linear_constraint.cc:335
SwigPyClientData::pytype
PyTypeObject * pytype
Definition: knapsack_solver_python_wrap.cc:1312
SwigPyObject::ty
swig_type_info * ty
Definition: knapsack_solver_python_wrap.cc:1391
_wrap_Variable_Ub
SWIGINTERN PyObject * _wrap_Variable_Ub(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6059
operations_research_MPSolver_SetNumThreads
SWIGINTERN bool operations_research_MPSolver_SetNumThreads(operations_research::MPSolver *self, int num_theads)
Definition: linear_solver_python_wrap.cc:3291
operations_research_MPSolver_WallTime
SWIGINTERN int64 operations_research_MPSolver_WallTime(operations_research::MPSolver const *self)
Definition: linear_solver_python_wrap.cc:3296
_swigt__p_unsigned_long
static swig_type_info _swigt__p_unsigned_long
Definition: linear_solver_python_wrap.cc:7683
swig_const_info::ptype
swig_type_info ** ptype
Definition: knapsack_solver_python_wrap.cc:1057
SwigMethods
static PyMethodDef SwigMethods[]
Definition: linear_solver_python_wrap.cc:7259
_wrap_Variable_Lb
SWIGINTERN PyObject * _wrap_Variable_Lb(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6036
SWIG_Python_AppendOutput
SWIGINTERN PyObject * SWIG_Python_AppendOutput(PyObject *result, PyObject *obj)
Definition: linear_solver_python_wrap.cc:1184
SWIG_TypeClientData
SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata)
Definition: linear_solver_python_wrap.cc:552
operations_research::MPSolverParameters::PRESOLVE_ON
@ PRESOLVE_ON
Presolve is on.
Definition: linear_solver.h:1395
operations_research::MPModelProto
Swig_var_MPSolverParameters_kDefaultDualTolerance_get
SWIGINTERN PyObject * Swig_var_MPSolverParameters_kDefaultDualTolerance_get(void)
Definition: linear_solver_python_wrap.cc:6667
SWIG_DivisionByZero
#define SWIG_DivisionByZero
Definition: linear_solver_python_wrap.cc:761
swigobject_methods
static PyMethodDef swigobject_methods[]
Definition: linear_solver_python_wrap.cc:1655
SwigPyObject_type
SWIGRUNTIME PyTypeObject * SwigPyObject_type(void)
Definition: linear_solver_python_wrap.cc:1520
_wrap_Solver_constraints
SWIGINTERN PyObject * _wrap_Solver_constraints(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:3766
SWIG_AttributeError
#define SWIG_AttributeError
Definition: linear_solver_python_wrap.cc:766
MPSolverParameters_swiginit
SWIGINTERN PyObject * MPSolverParameters_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6879
_swigc__p_int
static swig_cast_info _swigc__p_int[]
Definition: linear_solver_python_wrap.cc:7707
swig_const_info
Definition: knapsack_solver_python_wrap.cc:1051
PyObjAs
bool PyObjAs(PyObject *py_obj, operations_research::MPConstraint **b)
Definition: linear_solver_python_wrap.cc:2849
SWIGRUNTIME
#define SWIGRUNTIME
Definition: linear_solver_python_wrap.cc:211
SWIG_PY_POINTER
#define SWIG_PY_POINTER
Definition: linear_solver_python_wrap.cc:1047
SwigMethods_proxydocs
static PyMethodDef SwigMethods_proxydocs[]
Definition: linear_solver_python_wrap.cc:7661
SWIGTYPE_p_std__ostream
#define SWIGTYPE_p_std__ostream
Definition: linear_solver_python_wrap.cc:2707
SwigPyPacked_TypeOnce
SWIGRUNTIME PyTypeObject * SwigPyPacked_TypeOnce(void)
Definition: linear_solver_python_wrap.cc:1878
SWIGTYPE_p_operations_research__MPVariable
#define SWIGTYPE_p_operations_research__MPVariable
Definition: linear_solver_python_wrap.cc:2704
SWIG_Python_InstallConstants
SWIGINTERN void SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[])
Definition: linear_solver_python_wrap.cc:8210
SWIG_TypeError
#define SWIG_TypeError
Definition: linear_solver_python_wrap.cc:760
swig_cast_initial
static swig_cast_info * swig_cast_initial[]
Definition: linear_solver_python_wrap.cc:7724
_wrap_Solver_SetHint
SWIGINTERN PyObject * _wrap_Solver_SetHint(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5009
SwigPyObject_acquire
SWIGINTERN PyObject * SwigPyObject_acquire(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
Definition: linear_solver_python_wrap.cc:1627
SWIG_NewPointerObj
#define SWIG_NewPointerObj(ptr, type, flags)
Definition: linear_solver_python_wrap.cc:1092
SwigPyClientData_Del
SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data)
Definition: linear_solver_python_wrap.cc:1380
operations_research::MPSolverParameters::SCALING_ON
@ SCALING_ON
Scaling is on.
Definition: linear_solver.h:1425
_swigc__p_std__ostream
static swig_cast_info _swigc__p_std__ostream[]
Definition: linear_solver_python_wrap.cc:7718
_swigt__p_operations_research__MPConstraint
static swig_type_info _swigt__p_operations_research__MPConstraint
Definition: linear_solver_python_wrap.cc:7671
SwigPyObject_own
SWIGINTERN PyObject * SwigPyObject_own(PyObject *v, PyObject *args)
Definition: linear_solver_python_wrap.cc:1635
swig_varlink_type
SWIGINTERN PyTypeObject * swig_varlink_type(void)
Definition: linear_solver_python_wrap.cc:8104
operations_research::MPSolverParameters::INCREMENTALITY_ON
@ INCREMENTALITY_ON
Reuse results from previous solve as much as the underlying solver allows.
Definition: linear_solver.h:1417
operations_research::MPSolver::BASIC
@ BASIC
Definition: linear_solver.h:647
SWIGTYPE_p_operations_research__MPConstraint
#define SWIGTYPE_p_operations_research__MPConstraint
Definition: linear_solver_python_wrap.cc:2698
_wrap_Variable_ub
SWIGINTERN PyObject * _wrap_Variable_ub(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5786
SWIG_pchar_descriptor
SWIGINTERN swig_type_info * SWIG_pchar_descriptor(void)
Definition: linear_solver_python_wrap.cc:2896
_wrap_MPSolverParameters_GetDoubleParam
SWIGINTERN PyObject * _wrap_MPSolverParameters_GetDoubleParam(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6790
SWIG_IndexError
#define SWIG_IndexError
Definition: linear_solver_python_wrap.cc:759
SWIG_Python_newvarlink
SWIGINTERN PyObject * SWIG_Python_newvarlink(void)
Definition: linear_solver_python_wrap.cc:8170
_wrap_Variable_solution_value
SWIGINTERN PyObject * _wrap_Variable_solution_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5717
swig_varlinkobject
struct swig_varlinkobject swig_varlinkobject
operations_research_MPSolver_SetTimeLimit
SWIGINTERN void operations_research_MPSolver_SetTimeLimit(operations_research::MPSolver *self, int64 x)
Definition: linear_solver_python_wrap.cc:3295
_wrap_Solver_BoolVar
SWIGINTERN PyObject * _wrap_Solver_BoolVar(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:3706
SwigPyPacked::pack
PyObject_HEAD void * pack
Definition: knapsack_solver_python_wrap.cc:1817
operations_research::MPSolver::GLPK_LINEAR_PROGRAMMING
@ GLPK_LINEAR_PROGRAMMING
Definition: linear_solver.h:191
SWIG_init
#define SWIG_init
Definition: linear_solver_python_wrap.cc:2731
operations_research::MPSolver::infinity
static double infinity()
Infinity.
Definition: linear_solver.h:670
operations_research::MPSolver::NOT_SOLVED
@ NOT_SOLVED
not been solved yet.
Definition: linear_solver.h:441
SwigPyObject_repr
SWIGRUNTIME PyObject * SwigPyObject_repr(SwigPyObject *v)
Definition: linear_solver_python_wrap.cc:1457
SWIG_newvarlink
#define SWIG_newvarlink()
Definition: linear_solver_python_wrap.cc:7991
_swigc__p_char
static swig_cast_info _swigc__p_char[]
Definition: linear_solver_python_wrap.cc:7706
_wrap_Variable_SolutionValue
SWIGINTERN PyObject * _wrap_Variable_SolutionValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5990
_wrap_Objective_SetCoefficient
SWIGINTERN PyObject * _wrap_Objective_SetCoefficient(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5314
_wrap_Objective_SetOffset
SWIGINTERN PyObject * _wrap_Objective_SetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5373
swig_const_info::pvalue
void * pvalue
Definition: knapsack_solver_python_wrap.cc:1056
operations_research::MPSolver::BOP_INTEGER_PROGRAMMING
@ BOP_INTEGER_PROGRAMMING
Definition: linear_solver.h:210
SWIG_RuntimeError
#define SWIG_RuntimeError
Definition: linear_solver_python_wrap.cc:758
SWIG_Python_SetModule
SWIGRUNTIME void SWIG_Python_SetModule(swig_module_info *swig_module)
Definition: linear_solver_python_wrap.cc:2452
_wrap_Solver_SetNumThreads
SWIGINTERN PyObject * _wrap_Solver_SetNumThreads(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5050
_wrap_Solver_Constraint__SWIG_2
SWIGINTERN PyObject * _wrap_Solver_Constraint__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
Definition: linear_solver_python_wrap.cc:3886
operations_research_MPVariable_SetLb
SWIGINTERN void operations_research_MPVariable_SetLb(operations_research::MPVariable *self, double x)
Definition: linear_solver_python_wrap.cc:3309
operations_research::MPSolverParameters::PRESOLVE
@ PRESOLVE
Advanced usage: presolve mode.
Definition: linear_solver.h:1381
_swigt__p_operations_research__MPVariable
static swig_type_info _swigt__p_operations_research__MPVariable
Definition: linear_solver_python_wrap.cc:7677
SWIG_TypeCast
SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory)
Definition: linear_solver_python_wrap.cc:500
_wrap_delete_Solver
SWIGINTERN PyObject * _wrap_delete_Solver(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:3357
SWIG_Python_TypeQuery
SWIGRUNTIME swig_type_info * SWIG_Python_TypeQuery(const char *type)
Definition: linear_solver_python_wrap.cc:2476
_wrap_Constraint_Clear
SWIGINTERN PyObject * _wrap_Constraint_Clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6215
operations_research::MPSolver::FREE
@ FREE
Definition: linear_solver.h:643
operations_research::MPSolverParameters::kDefaultPresolve
static const PresolveValues kDefaultPresolve
Definition: linear_solver.h:1445
_wrap_Solver_SolveWithProto
SWIGINTERN PyObject * _wrap_Solver_SolveWithProto(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:4328
SwigPyObject_New
SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
Definition: linear_solver_python_wrap.cc:1799
SWIG_IOError
#define SWIG_IOError
Definition: linear_solver_python_wrap.cc:757
SWIG_AsVal_bool
SWIGINTERN int SWIG_AsVal_bool(PyObject *obj, bool *val)
Definition: linear_solver_python_wrap.cc:3207
Swig_var_MPSolverParameters_kDefaultRelativeMipGap_get
SWIGINTERN PyObject * Swig_var_MPSolverParameters_kDefaultRelativeMipGap_get(void)
Definition: linear_solver_python_wrap.cc:6639
_wrap_new_ModelExportOptions
SWIGINTERN PyObject * _wrap_new_ModelExportOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6883
operations_research::MPSolverParameters::kDefaultIncrementality
static const IncrementalityValues kDefaultIncrementality
Definition: linear_solver.h:1446
_swigc__p_operations_research__MPSolver
static swig_cast_info _swigc__p_operations_research__MPSolver[]
Definition: linear_solver_python_wrap.cc:7713
operations_research_MPObjective_Offset
SWIGINTERN double operations_research_MPObjective_Offset(operations_research::MPObjective const *self)
Definition: linear_solver_python_wrap.cc:3298
free
void free(void *)
_wrap_Variable_lb
SWIGINTERN PyObject * _wrap_Variable_lb(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5763
_wrap_Solver_Clear
SWIGINTERN PyObject * _wrap_Solver_Clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:3432
_wrap_Solver_WallTime
SWIGINTERN PyObject * _wrap_Solver_WallTime(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5122
swig_const_info::name
const char * name
Definition: knapsack_solver_python_wrap.cc:1053
_wrap_MPSolverParameters_GetIntegerParam
SWIGINTERN PyObject * _wrap_MPSolverParameters_GetIntegerParam(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6820
_wrap_Variable_SetLb
SWIGINTERN PyObject * _wrap_Variable_SetLb(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6082
SwigPyPacked::size
size_t size
Definition: knapsack_solver_python_wrap.cc:1819
SwigPyObject
Definition: knapsack_solver_python_wrap.cc:1388
SWIG_POINTER_NEW
#define SWIG_POINTER_NEW
Definition: linear_solver_python_wrap.cc:1282
swig::SwigVar_PyObject::operator=
SwigVar_PyObject & operator=(PyObject *obj)
Definition: knapsack_solver_python_wrap.cc:2800
_swigc__p_signed_char
static swig_cast_info _swigc__p_signed_char[]
Definition: linear_solver_python_wrap.cc:7717
SwigPyObject::own
int own
Definition: knapsack_solver_python_wrap.cc:1392
_wrap_Variable_reduced_cost
SWIGINTERN PyObject * _wrap_Variable_reduced_cost(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5846
operations_research::MPSolver::Solve
ResultStatus Solve()
Solves the problem using the default parameter values.
Definition: linear_solver.cc:1225
operations_research_MPVariable_ReducedCost
SWIGINTERN double operations_research_MPVariable_ReducedCost(operations_research::MPVariable const *self)
Definition: linear_solver_python_wrap.cc:3311
SWIG_Python_TypeError
SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj)
Definition: linear_solver_python_wrap.cc:2554
_wrap_FindErrorInModelProto
SWIGINTERN PyObject * _wrap_FindErrorInModelProto(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:7223
_wrap_Solver_ComputeConstraintActivities
SWIGINTERN PyObject * _wrap_Solver_ComputeConstraintActivities(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:4178
SWIG_TypeCheck
SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty)
Definition: linear_solver_python_wrap.cc:446
operations_research::MPSolver::BasisStatus
BasisStatus
Advanced usage: possible basis status values for a variable and the slack variable of a linear constr...
Definition: linear_solver.h:642
Swig_var_MPSolverParameters_kDefaultIncrementality_set
SWIGINTERN int Swig_var_MPSolverParameters_kDefaultIncrementality_set(PyObject *)
Definition: linear_solver_python_wrap.cc:6689
SWIG_TypeQuery
#define SWIG_TypeQuery(name)
Definition: linear_solver_python_wrap.cc:2722
SWIG_TypeDynamicCast
SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr)
Definition: linear_solver_python_wrap.cc:508
operations_research::MPSolverParameters::kDefaultPrimalTolerance
static const double kDefaultPrimalTolerance
Definition: linear_solver.h:1443
SwigPyObject_append
SWIGRUNTIME PyObject * SwigPyObject_append(PyObject *v, PyObject *next)
Definition: linear_solver_python_wrap.cc:1594
SwigPyPacked_type
SWIGRUNTIME PyTypeObject * SwigPyPacked_type(void)
Definition: linear_solver_python_wrap.cc:1856
swig_module_info::types
swig_type_info ** types
Definition: knapsack_solver_python_wrap.cc:388
swig_type_info::name
const char * name
Definition: knapsack_solver_python_wrap.cc:368
SwigPyClientData
Definition: knapsack_solver_python_wrap.cc:1305
SWIG_AsCharPtrAndSize
SWIGINTERN int SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc)
Definition: linear_solver_python_wrap.cc:2909
_wrap_Constraint_Ub
SWIGINTERN PyObject * _wrap_Constraint_Ub(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6500
SWIG_Python_ConvertPtrAndOwn
SWIGRUNTIME int SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own)
Definition: linear_solver_python_wrap.cc:2100
operations_research_MPVariable_Lb
SWIGINTERN double operations_research_MPVariable_Lb(operations_research::MPVariable const *self)
Definition: linear_solver_python_wrap.cc:3307
operations_research::MPSolver::SetGurobiLibraryPath
static void SetGurobiLibraryPath(const std::string &full_library_path)
Definition: gurobi_environment.cc:276
CanConvertToMPConstraint
bool CanConvertToMPConstraint(PyObject *py_obj)
Definition: linear_solver_python_wrap.cc:2862
_wrap___lshift__
SWIGINTERN PyObject * _wrap___lshift__(PyObject *self, PyObject *args)
Definition: linear_solver_python_wrap.cc:5247
basictypes.h
operations_research_MPSolver_ExportModelAsMpsFormat
SWIGINTERN std::string operations_research_MPSolver_ExportModelAsMpsFormat(operations_research::MPSolver *self, bool fixed_format, bool obfuscated)
Definition: linear_solver_python_wrap.cc:3272
SWIG_FromCharPtrAndSize
SWIGINTERNINLINE PyObject * SWIG_FromCharPtrAndSize(const char *carray, size_t size)
Definition: linear_solver_python_wrap.cc:3232
_wrap_Variable_SetBranchingPriority
SWIGINTERN PyObject * _wrap_Variable_SetBranchingPriority(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5915
SWIGEXPORT
#define SWIGEXPORT
Definition: linear_solver_python_wrap.cc:128
_wrap_Solver_SupportsProblemType
SWIGINTERN PyObject * _wrap_Solver_SupportsProblemType(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:3409
_wrap___lshift____SWIG_1
SWIGINTERN PyObject * _wrap___lshift____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
Definition: linear_solver_python_wrap.cc:5213
SwigPyObject::ptr
PyObject_HEAD void * ptr
Definition: knapsack_solver_python_wrap.cc:1390
SWIG_TYPE_TABLE_NAME
#define SWIG_TYPE_TABLE_NAME
Definition: linear_solver_python_wrap.cc:198
operations_research::MPSolver::SCIP_MIXED_INTEGER_PROGRAMMING
@ SCIP_MIXED_INTEGER_PROGRAMMING
Definition: linear_solver.h:196
_wrap_delete_Constraint
SWIGINTERN PyObject * _wrap_delete_Constraint(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6604
operations_research::sat::Value
std::function< int64(const Model &)> Value(IntegerVariable v)
Definition: integer.h:1470
operations_research::MPSolverParameters::INCREMENTALITY_OFF
@ INCREMENTALITY_OFF
Start solve from scratch.
Definition: linear_solver.h:1411
SwigPyPacked_compare
SWIGRUNTIME int SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
Definition: linear_solver_python_wrap.cc:1845
operations_research::MPSolver::AT_UPPER_BOUND
@ AT_UPPER_BOUND
Definition: linear_solver.h:645
_wrap_MPSolverParameters_SetDoubleParam
SWIGINTERN PyObject * _wrap_MPSolverParameters_SetDoubleParam(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6716
SWIG_PropagateClientData
SWIGRUNTIME void SWIG_PropagateClientData(void)
Definition: linear_solver_python_wrap.cc:7954
SwigPyObject_Check
SWIGRUNTIMEINLINE int SwigPyObject_Check(PyObject *op)
Definition: linear_solver_python_wrap.cc:1527
swig_type_info::dcast
swig_dycast_func dcast
Definition: knapsack_solver_python_wrap.cc:370
operations_research_MPConstraint_DualValue
SWIGINTERN double operations_research_MPConstraint_DualValue(operations_research::MPConstraint const *self)
Definition: linear_solver_python_wrap.cc:3316
operations_research_MPVariable_Integer
SWIGINTERN bool operations_research_MPVariable_Integer(operations_research::MPVariable const *self)
Definition: linear_solver_python_wrap.cc:3306
operations_research_MPVariable_Ub
SWIGINTERN double operations_research_MPVariable_Ub(operations_research::MPVariable const *self)
Definition: linear_solver_python_wrap.cc:3308
swig_varlink_setattr
SWIGINTERN int swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p)
Definition: linear_solver_python_wrap.cc:8087
FromObjectMPVariable
PyObject * FromObjectMPVariable(operations_research::MPVariable *obj)
Definition: linear_solver_python_wrap.cc:2876
swig_module_info::clientdata
void * clientdata
Definition: knapsack_solver_python_wrap.cc:393
FromObjectMPConstraint
PyObject * FromObjectMPConstraint(operations_research::MPConstraint *obj)
Definition: linear_solver_python_wrap.cc:2856
swig
Definition: knapsack_solver_python_wrap.cc:2740
_wrap_Solver_ComputeExactConditionNumber
SWIGINTERN PyObject * _wrap_Solver_ComputeExactConditionNumber(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:4599
_wrap_Solver_set_time_limit
SWIGINTERN PyObject * _wrap_Solver_set_time_limit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:4645
operations_research::MPSolver::GUROBI_LINEAR_PROGRAMMING
@ GUROBI_LINEAR_PROGRAMMING
Definition: linear_solver.h:201
_wrap_Variable_ReducedCost
SWIGINTERN PyObject * _wrap_Variable_ReducedCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6140
_wrap_Solver_InterruptSolve
SWIGINTERN PyObject * _wrap_Solver_InterruptSolve(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:4241
SWIG_NewPackedObj
#define SWIG_NewPackedObj(ptr, sz, type)
Definition: linear_solver_python_wrap.cc:1103
SWIG_Python_SetErrorObj
SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj)
Definition: linear_solver_python_wrap.cc:1136
Solver_swiginit
SWIGINTERN PyObject * Solver_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5175
operations_research::MPSolverParameters::PRIMAL_TOLERANCE
@ PRIMAL_TOLERANCE
Advanced usage: tolerance for primal feasibility of basic solutions.
Definition: linear_solver.h:1373
_wrap_Objective_Value
SWIGINTERN PyObject * _wrap_Objective_Value(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5544
SWIG_Python_AcquirePtr
SWIGRUNTIME int SWIG_Python_AcquirePtr(PyObject *obj, int own)
Definition: linear_solver_python_wrap.cc:2085
_wrap_ExportModelAsMpsFormat__SWIG_0
SWIGINTERN PyObject * _wrap_ExportModelAsMpsFormat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
Definition: linear_solver_python_wrap.cc:7076
operations_research::MPSolver::ResultStatus
ResultStatus
The status of solving the problem.
Definition: linear_solver.h:427
MPSolverParameters_swigregister
SWIGINTERN PyObject * MPSolverParameters_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6872
SWIG_addvarlink
#define SWIG_addvarlink(p, name, get_attr, set_attr)
Definition: linear_solver_python_wrap.cc:7992
SWIG_From_bool
SWIGINTERNINLINE PyObject * SWIG_From_bool(bool value)
Definition: linear_solver_python_wrap.cc:3200
_swigc__p_long
static swig_cast_info _swigc__p_long[]
Definition: linear_solver_python_wrap.cc:7708
SWIG_ConvertPtr
#define SWIG_ConvertPtr(obj, pptr, type, flags)
Definition: linear_solver_python_wrap.cc:1086
SWIG_This
SWIGRUNTIME PyObject * SWIG_This(void)
Definition: linear_solver_python_wrap.cc:2004
model_validator.h
Solver_swigregister
SWIGINTERN PyObject * Solver_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5168
swig_type_info::owndata
int owndata
Definition: knapsack_solver_python_wrap.cc:373
swig_type_initial
static swig_type_info * swig_type_initial[]
Definition: linear_solver_python_wrap.cc:7686
SWIG_exception_fail
#define SWIG_exception_fail(code, msg)
Definition: linear_solver_python_wrap.cc:2669
_swigt__p_char
static swig_type_info _swigt__p_char
Definition: linear_solver_python_wrap.cc:7668
SWIG_AsVal_int
SWIGINTERN int SWIG_AsVal_int(PyObject *obj, int *val)
Definition: linear_solver_python_wrap.cc:3184
_wrap_Constraint_DualValue
SWIGINTERN PyObject * _wrap_Constraint_DualValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6581
SWIG_Python_ArgFail
SWIGRUNTIME int SWIG_Python_ArgFail(int argnum)
Definition: linear_solver_python_wrap.cc:2533
SwigPyClientData::klass
PyObject * klass
Definition: knapsack_solver_python_wrap.cc:1306
operations_research_MPVariable___repr__
SWIGINTERN std::string operations_research_MPVariable___repr__(operations_research::MPVariable *self)
Definition: linear_solver_python_wrap.cc:3302
SWIG_Python_str_FromFormat
#define SWIG_Python_str_FromFormat
Definition: linear_solver_python_wrap.cc:801
swig::SwigVar_PyObject::SwigVar_PyObject
SwigVar_PyObject(PyObject *obj=0)
Definition: linear_solver_python_wrap.cc:2805
model
GRBmodel * model
Definition: gurobi_interface.cc:269
SWIG_Python_ErrorType
SWIGRUNTIME PyObject * SWIG_Python_ErrorType(int code)
Definition: linear_solver_python_wrap.cc:869
SwigPyClientData::destroy
PyObject * destroy
Definition: knapsack_solver_python_wrap.cc:1309
SWIG_OverflowError
#define SWIG_OverflowError
Definition: linear_solver_python_wrap.cc:762
_wrap_delete_Variable
SWIGINTERN PyObject * _wrap_delete_Variable(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6163
SWIG_globals
SWIGINTERN PyObject * SWIG_globals(void)
Definition: linear_solver_python_wrap.cc:8196
_wrap_Solver_nodes
SWIGINTERN PyObject * _wrap_Solver_nodes(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:4576
SWIG_as_voidptr
#define SWIG_as_voidptr(a)
Definition: linear_solver_python_wrap.cc:2740
_wrap_ExportModelAsLpFormat__SWIG_1
SWIGINTERN PyObject * _wrap_ExportModelAsLpFormat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
Definition: linear_solver_python_wrap.cc:6974
operations_research::MPSolverParameters::kDefaultDualTolerance
static const double kDefaultDualTolerance
Definition: linear_solver.h:1444
operations_research::MPSolver::FIXED_VALUE
@ FIXED_VALUE
Definition: linear_solver.h:646
_wrap_Objective_GetCoefficient
SWIGINTERN PyObject * _wrap_Objective_GetCoefficient(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5347
SWIG_POINTER_NOSHADOW
#define SWIG_POINTER_NOSHADOW
Definition: linear_solver_python_wrap.cc:1281
SWIG_BUFFER_SIZE
#define SWIG_BUFFER_SIZE
Definition: linear_solver_python_wrap.cc:220
swig_globalvar
struct swig_globalvar swig_globalvar
_wrap_Solver_iterations
SWIGINTERN PyObject * _wrap_Solver_iterations(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:4553
operations_research::MPSolver::SAT_INTEGER_PROGRAMMING
@ SAT_INTEGER_PROGRAMMING
Definition: linear_solver.h:215
swig_const_table
static swig_const_info swig_const_table[]
Definition: linear_solver_python_wrap.cc:7747
SWIG_IsOK
#define SWIG_IsOK(r)
Definition: linear_solver_python_wrap.cc:313
_swigc__p_operations_research__MPVariable
static swig_cast_info _swigc__p_operations_research__MPVariable[]
Definition: linear_solver_python_wrap.cc:7715
operations_research::MPSolver::SolveWithProto
static void SolveWithProto(const MPModelRequest &model_request, MPSolutionResponse *response)
Solves the model encoded by a MPModelRequest protocol buffer and fills the solution encoded as a MPSo...
Definition: linear_solver.cc:834
SWIGTYPE_p_operations_research__MPObjective
#define SWIGTYPE_p_operations_research__MPObjective
Definition: linear_solver_python_wrap.cc:2701
SWIG_TypePrettyName
SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type)
Definition: linear_solver_python_wrap.cc:531
SWIG_CAST_NEW_MEMORY
#define SWIG_CAST_NEW_MEMORY
Definition: linear_solver_python_wrap.cc:225
operations_research::MPSolverParameters::SCALING
@ SCALING
Advanced usage: enable or disable matrix scaling.
Definition: linear_solver.h:1387
SwigPyClientData::newargs
PyObject * newargs
Definition: knapsack_solver_python_wrap.cc:1308
_wrap_Variable_index
SWIGINTERN PyObject * _wrap_Variable_index(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5740
operations_research::MPModelExportOptions::obfuscate
bool obfuscate
Obfuscates variable and constraint names.
Definition: model_exporter.h:33
operations_research::MPSolverParameters::IntegerParam
IntegerParam
Enumeration of parameters that take integer or categorical values.
Definition: linear_solver.h:1379
swig_type_info::str
const char * str
Definition: knapsack_solver_python_wrap.cc:369
SWIG_Python_CheckImplicit
SWIGRUNTIMEINLINE int SWIG_Python_CheckImplicit(swig_type_info *ty)
Definition: linear_solver_python_wrap.cc:1316
SWIG_OK
#define SWIG_OK
Definition: linear_solver_python_wrap.cc:311
SWIG_From_std_string
SWIGINTERNINLINE PyObject * SWIG_From_std_string(const std::string &s)
Definition: linear_solver_python_wrap.cc:3257
_wrap_Solver_Infinity
SWIGINTERN PyObject * _wrap_Solver_Infinity(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5080
SWIGTYPE_p_operations_research__MPSolver
#define SWIGTYPE_p_operations_research__MPSolver
Definition: linear_solver_python_wrap.cc:2702
SWIGUNUSEDPARM
#define SWIGUNUSEDPARM(p)
Definition: linear_solver_python_wrap.cc:94
_wrap_Variable_SetInteger
SWIGINTERN PyObject * _wrap_Variable_SetInteger(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5665
operations_research::MPSolver::CPLEX_LINEAR_PROGRAMMING
@ CPLEX_LINEAR_PROGRAMMING
Definition: linear_solver.h:203
_wrap_Constraint_name
SWIGINTERN PyObject * _wrap_Constraint_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6192
_swigc__p_unsigned_long
static swig_cast_info _swigc__p_unsigned_long[]
Definition: linear_solver_python_wrap.cc:7721
_wrap_Objective_BestBound
SWIGINTERN PyObject * _wrap_Objective_BestBound(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5567
_wrap_Solver_LoadSolutionFromProto
SWIGINTERN PyObject * _wrap_Solver_LoadSolutionFromProto(PyObject *self, PyObject *args)
Definition: linear_solver_python_wrap.cc:4861
swig_const_info::type
int type
Definition: knapsack_solver_python_wrap.cc:1052
_wrap_Solver_LoadSolutionFromProto__SWIG_0
SWIGINTERN PyObject * _wrap_Solver_LoadSolutionFromProto__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
Definition: linear_solver_python_wrap.cc:4769
_wrap_Objective_offset
SWIGINTERN PyObject * _wrap_Objective_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5402
SWIG_Python_RaiseOrModifyTypeError
SWIGRUNTIME void SWIG_Python_RaiseOrModifyTypeError(const char *message)
Definition: linear_solver_python_wrap.cc:949
SWIG_Python_NewPackedObj
SWIGRUNTIMEINLINE PyObject * SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type)
Definition: linear_solver_python_wrap.cc:2404
SWIG_Python_ConvertPtr
#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)
Definition: linear_solver_python_wrap.cc:1085
_swigt__p_short
static swig_type_info _swigt__p_short
Definition: linear_solver_python_wrap.cc:7678
SWIG_Python_NewShadowInstance
SWIGRUNTIME PyObject * SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
Definition: linear_solver_python_wrap.cc:2257
_wrap_delete_Objective
SWIGINTERN PyObject * _wrap_delete_Objective(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5613
Swig_var_MPSolverParameters_kDefaultPrimalTolerance_set
SWIGINTERN int Swig_var_MPSolverParameters_kDefaultPrimalTolerance_set(PyObject *)
Definition: linear_solver_python_wrap.cc:6647
SwigPyObject::next
PyObject * next
Definition: knapsack_solver_python_wrap.cc:1393
_wrap_delete_ModelExportOptions
SWIGINTERN PyObject * _wrap_delete_ModelExportOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6896
_wrap_Constraint_ub
SWIGINTERN PyObject * _wrap_Constraint_ub(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6319
SWIG_PyInstanceMethod_New
SWIGINTERN PyObject * SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
Definition: linear_solver_python_wrap.cc:8309
swig_globalvar::get_attr
PyObject *(* get_attr)(void)
Definition: knapsack_solver_python_wrap.cc:3827
operations_research::MPSolverParameters::RELATIVE_MIP_GAP
@ RELATIVE_MIP_GAP
Limit for relative MIP gap.
Definition: linear_solver.h:1365
SWIG_AsVal_double
SWIGINTERN int SWIG_AsVal_double(PyObject *obj, double *val)
Definition: linear_solver_python_wrap.cc:3059
_wrap_Objective_SetMinimization
SWIGINTERN PyObject * _wrap_Objective_SetMinimization(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5454
SwigPyObject_hex
SWIGRUNTIME PyObject * SwigPyObject_hex(SwigPyObject *v)
Definition: linear_solver_python_wrap.cc:1451
_wrap_Solver_NumVariables
SWIGINTERN PyObject * _wrap_Solver_NumVariables(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:3454
_wrap_Solver_EnableOutput
SWIGINTERN PyObject * _wrap_Solver_EnableOutput(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:4509
operations_research::MPSolver::CLP_LINEAR_PROGRAMMING
@ CLP_LINEAR_PROGRAMMING
Definition: linear_solver.h:190
operations_research_MPConstraint_Lb
SWIGINTERN double operations_research_MPConstraint_Lb(operations_research::MPConstraint const *self)
Definition: linear_solver_python_wrap.cc:3312
operations_research::MPSolverParameters::INCREMENTALITY
@ INCREMENTALITY
Advanced usage: incrementality from one solve to the next.
Definition: linear_solver.h:1385
_swigt__p_operations_research__MPSolver
static swig_type_info _swigt__p_operations_research__MPSolver
Definition: linear_solver_python_wrap.cc:7675
_swigc__p_short
static swig_cast_info _swigc__p_short[]
Definition: linear_solver_python_wrap.cc:7716
SWIG_InstallConstants
#define SWIG_InstallConstants(d, constants)
Definition: linear_solver_python_wrap.cc:7993
SWIG_IsNewObj
#define SWIG_IsNewObj(r)
Definition: linear_solver_python_wrap.cc:330
SWIG_TypeQueryModule
SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
Definition: linear_solver_python_wrap.cc:627
_wrap_MPSolverParameters_SetIntegerParam
SWIGINTERN PyObject * _wrap_MPSolverParameters_SetIntegerParam(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6753
SWIG_From_double
#define SWIG_From_double
Definition: linear_solver_python_wrap.cc:3220
SWIG_PackVoidPtr
SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz)
Definition: linear_solver_python_wrap.cc:700
operations_research::MPVariable
The class for variables of a Mathematical Programming (MP) model.
Definition: linear_solver.h:1052
SWIG_CheckState
#define SWIG_CheckState(r)
Definition: linear_solver_python_wrap.cc:353
SWIG_Python_CallFunctor
#define SWIG_Python_CallFunctor(functor, obj)
Definition: linear_solver_python_wrap.cc:1264
swig_globalvar::set_attr
int(* set_attr)(PyObject *)
Definition: knapsack_solver_python_wrap.cc:3828
operations_research_MPConstraint_Ub
SWIGINTERN double operations_research_MPConstraint_Ub(operations_research::MPConstraint const *self)
Definition: linear_solver_python_wrap.cc:3313
operations_research::MPSolver::OptimizationProblemType
OptimizationProblemType
The type of problems (LP or MIP) that will be solved and the underlying solver (GLOP,...
Definition: linear_solver.h:187
_wrap_Solver_Solve
SWIGINTERN PyObject * _wrap_Solver_Solve(PyObject *self, PyObject *args)
Definition: linear_solver_python_wrap.cc:4138
SWIGTYPE_p_operations_research__MPModelExportOptions
#define SWIGTYPE_p_operations_research__MPModelExportOptions
Definition: linear_solver_python_wrap.cc:2699
linear_solver.h
A C++ wrapper that provides a simple and unified interface to several linear programming and mixed in...
b
int64 b
Definition: constraint_solver/table.cc:43
_wrap_Constraint_SetLb
SWIGINTERN PyObject * _wrap_Constraint_SetLb(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6523
_swigt__p_std__ostream
static swig_type_info _swigt__p_std__ostream
Definition: linear_solver_python_wrap.cc:7680
_swigt__p_operations_research__MPModelRequest
static swig_type_info _swigt__p_operations_research__MPModelRequest
Definition: linear_solver_python_wrap.cc:7673
SwigPyPacked_New
SWIGRUNTIME PyObject * SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
Definition: linear_solver_python_wrap.cc:1966
SWIG_Py_Void
SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void)
Definition: linear_solver_python_wrap.cc:1296
SwigPyPacked_str
SWIGRUNTIME PyObject * SwigPyPacked_str(SwigPyPacked *v)
Definition: linear_solver_python_wrap.cc:1834
_wrap_Solver_SuppressOutput
SWIGINTERN PyObject * _wrap_Solver_SuppressOutput(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:4531
SWIG_ArgError
#define SWIG_ArgError(r)
Definition: linear_solver_python_wrap.cc:314
_swigc__p_operations_research__MPSolverParameters
static swig_cast_info _swigc__p_operations_research__MPSolverParameters[]
Definition: linear_solver_python_wrap.cc:7714
SWIGINTERNINLINE
#define SWIGINTERNINLINE
Definition: linear_solver_python_wrap.cc:105
Swig_var_MPSolverParameters_kDefaultRelativeMipGap_set
SWIGINTERN int Swig_var_MPSolverParameters_kDefaultRelativeMipGap_set(PyObject *)
Definition: linear_solver_python_wrap.cc:6633
_wrap_Variable_branching_priority
SWIGINTERN PyObject * _wrap_Variable_branching_priority(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5892
next
Block * next
Definition: constraint_solver.cc:674
_swigt__p_unsigned_int
static swig_type_info _swigt__p_unsigned_int
Definition: linear_solver_python_wrap.cc:7682
SWIG_Python_InitShadowInstance
SWIGINTERN PyObject * SWIG_Python_InitShadowInstance(PyObject *args)
Definition: linear_solver_python_wrap.cc:2331
swig::SwigPtr_PyObject::SwigPtr_PyObject
SwigPtr_PyObject(const SwigPtr_PyObject &item)
Definition: linear_solver_python_wrap.cc:2757
_wrap_Constraint_SetUb
SWIGINTERN PyObject * _wrap_Constraint_SetUb(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6552
operations_research::MPSolver::INFEASIBLE
@ INFEASIBLE
proven infeasible.
Definition: linear_solver.h:433
_wrap_Variable_name
SWIGINTERN PyObject * _wrap_Variable_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5642
SWIG_NullReferenceError
#define SWIG_NullReferenceError
Definition: linear_solver_python_wrap.cc:768
operations_research::MPSolver::CreateSolver
static MPSolver * CreateSolver(const std::string &solver_id)
Recommended factory method to create a MPSolver instance, especially in non C++ languages.
Definition: linear_solver.cc:602
swig_converter_func
void *(* swig_converter_func)(void *, int *)
Definition: linear_solver_python_wrap.cc:363
_wrap_Solver_LookupConstraint
SWIGINTERN PyObject * _wrap_Solver_LookupConstraint(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:3791
SwigPyObject_repr2
SWIGRUNTIME PyObject * SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
Definition: linear_solver_python_wrap.cc:1478
swig_dycast_func
struct swig_type_info *(* swig_dycast_func)(void **)
Definition: linear_solver_python_wrap.cc:364
SwigPyPacked_UnpackData
SWIGRUNTIME swig_type_info * SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
Definition: linear_solver_python_wrap.cc:1985
operations_research::MPSolverParameters::PRIMAL
@ PRIMAL
Primal simplex.
Definition: linear_solver.h:1403
_wrap_Constraint_GetCoefficient
SWIGINTERN PyObject * _wrap_Constraint_GetCoefficient(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6270
swig_module
static swig_module_info swig_module
Definition: linear_solver_python_wrap.cc:2713
SWIG_UnpackVoidPtr
SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name)
Definition: linear_solver_python_wrap.cc:711
swig_varlinkobject::vars
PyObject_HEAD swig_globalvar * vars
Definition: knapsack_solver_python_wrap.cc:3834
Swig_var_MPSolverParameters_kDefaultPresolve_set
SWIGINTERN int Swig_var_MPSolverParameters_kDefaultPresolve_set(PyObject *)
Definition: linear_solver_python_wrap.cc:6675
operations_research::MPSolverParameters::DoubleParam
DoubleParam
Enumeration of parameters that take continuous values.
Definition: linear_solver.h:1363
operations_research::MPSolverParameters::PRESOLVE_OFF
@ PRESOLVE_OFF
Presolve is off.
Definition: linear_solver.h:1393
swig::SwigPtr_PyObject::SwigPtr_PyObject
SwigPtr_PyObject(PyObject *obj, bool initial_ref=true)
Definition: linear_solver_python_wrap.cc:2764
model_exporter.h
operations_research_MPSolver_LoadSolutionFromProto__SWIG_0
SWIGINTERN bool operations_research_MPSolver_LoadSolutionFromProto__SWIG_0(operations_research::MPSolver *self, operations_research::MPSolutionResponse const &response, double tolerance=operations_research::MPSolverParameters::kDefaultPrimalTolerance)
Definition: linear_solver_python_wrap.cc:3262
SWIG_PYTHON_THREAD_END_BLOCK
#define SWIG_PYTHON_THREAD_END_BLOCK
Definition: linear_solver_python_wrap.cc:1029
SWIG_STATIC_POINTER
#define SWIG_STATIC_POINTER(var)
Definition: linear_solver_python_wrap.cc:1273
_wrap_Solver_LookupVariable
SWIGINTERN PyObject * _wrap_Solver_LookupVariable(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:3502
SWIGRUNTIMEINLINE
#define SWIGRUNTIMEINLINE
Definition: linear_solver_python_wrap.cc:215
SwigPyPacked_repr
SWIGRUNTIME PyObject * SwigPyPacked_repr(SwigPyPacked *v)
Definition: linear_solver_python_wrap.cc:1823
_wrap_Solver_IntVar
SWIGINTERN PyObject * _wrap_Solver_IntVar(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:3653
SWIG_OLDOBJ
#define SWIG_OLDOBJ
Definition: linear_solver_python_wrap.cc:324
SwigPyObject_long
SWIGRUNTIME PyObject * SwigPyObject_long(SwigPyObject *v)
Definition: linear_solver_python_wrap.cc:1417
SwigPyClientData::newraw
PyObject * newraw
Definition: knapsack_solver_python_wrap.cc:1307
_wrap_Solver_variables
SWIGINTERN PyObject * _wrap_Solver_variables(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:3477
_wrap_Constraint_basis_status
SWIGINTERN PyObject * _wrap_Constraint_basis_status(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6454
_wrap_Constraint_Lb
SWIGINTERN PyObject * _wrap_Constraint_Lb(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6477
SWIG_POINTER_OWN
#define SWIG_POINTER_OWN
Definition: linear_solver_python_wrap.cc:229
SWIG_From_long
#define SWIG_From_long
Definition: linear_solver_python_wrap.cc:3223
swig_module_info
struct swig_module_info swig_module_info
operations_research_MPVariable_SetUb
SWIGINTERN void operations_research_MPVariable_SetUb(operations_research::MPVariable *self, double x)
Definition: linear_solver_python_wrap.cc:3310
_wrap_Solver_infinity
SWIGINTERN PyObject * _wrap_Solver_infinity(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:4496
operations_research::MPObjective
A class to express a linear objective.
Definition: linear_solver.h:925
operations_research::MPSolver::AT_LOWER_BOUND
@ AT_LOWER_BOUND
Definition: linear_solver.h:644
SWIG_Python_GetSwigThis
SWIGRUNTIME SwigPyObject * SWIG_Python_GetSwigThis(PyObject *pyobj)
Definition: linear_solver_python_wrap.cc:2019
swig_globalvar::next
struct swig_globalvar * next
Definition: knapsack_solver_python_wrap.cc:3829
swig_cast_info::converter
swig_converter_func converter
Definition: knapsack_solver_python_wrap.cc:379
_wrap_Variable_SetUb
SWIGINTERN PyObject * _wrap_Variable_SetUb(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6111
_wrap_Solver_Objective
SWIGINTERN PyObject * _wrap_Solver_Objective(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:4062
_wrap_Solver_CreateSolver
SWIGINTERN PyObject * _wrap_Solver_CreateSolver(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:3379
SWIG_UnpackDataName
SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name)
Definition: linear_solver_python_wrap.cc:739
SwigPyClientData_New
SWIGRUNTIME SwigPyClientData * SwigPyClientData_New(PyObject *obj)
Definition: linear_solver_python_wrap.cc:1334
SWIG_POINTER_NO_NULL
#define SWIG_POINTER_NO_NULL
Definition: linear_solver_python_wrap.cc:226
Variable_swigregister
SWIGINTERN PyObject * Variable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6185
_wrap_Solver_NumVar
SWIGINTERN PyObject * _wrap_Solver_NumVar(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:3600
operations_research::MPSolver::SupportsProblemType
static bool SupportsProblemType(OptimizationProblemType problem_type)
Whether the given problem type is supported (this will depend on the targets that you linked).
Definition: linear_solver.cc:460
name
const std::string name
Definition: default_search.cc:808
operations_research::MPSolver::XPRESS_MIXED_INTEGER_PROGRAMMING
@ XPRESS_MIXED_INTEGER_PROGRAMMING
Definition: linear_solver.h:206
_wrap_Variable_integer
SWIGINTERN PyObject * _wrap_Variable_integer(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:5694
SWIG_Python_MustGetPtr
SWIGRUNTIME void * SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags)
Definition: linear_solver_python_wrap.cc:2593
_swigc__p_operations_research__MPObjective
static swig_cast_info _swigc__p_operations_research__MPObjective[]
Definition: linear_solver_python_wrap.cc:7712
swig_type_info
Definition: knapsack_solver_python_wrap.cc:367
swig_type_info
struct swig_type_info swig_type_info
operations_research::MPSolver::GUROBI_MIXED_INTEGER_PROGRAMMING
@ GUROBI_MIXED_INTEGER_PROGRAMMING
Definition: linear_solver.h:202
Py_TYPE
#define Py_TYPE(op)
Definition: linear_solver_python_wrap.cc:793
SWIG_Python_TypeCache
SWIGRUNTIME PyObject * SWIG_Python_TypeCache(void)
Definition: linear_solver_python_wrap.cc:2470
_wrap_Solver_NumConstraints
SWIGINTERN PyObject * _wrap_Solver_NumConstraints(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:3743
_wrap_Solver_Var
SWIGINTERN PyObject * _wrap_Solver_Var(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:3539
operations_research::MPSolverParameters::DUAL
@ DUAL
Dual simplex.
Definition: linear_solver.h:1401
_swigt__p_operations_research__MPModelExportOptions
static swig_type_info _swigt__p_operations_research__MPModelExportOptions
Definition: linear_solver_python_wrap.cc:7672
Swig_var_MPSolverParameters_kDefaultPrimalTolerance_get
SWIGINTERN PyObject * Swig_var_MPSolverParameters_kDefaultPrimalTolerance_get(void)
Definition: linear_solver_python_wrap.cc:6653
_swigc__p_operations_research__MPModelRequest
static swig_cast_info _swigc__p_operations_research__MPModelRequest[]
Definition: linear_solver_python_wrap.cc:7711
SWIG_Python_str_FromChar
SWIGINTERN PyObject * SWIG_Python_str_FromChar(const char *c)
Definition: linear_solver_python_wrap.cc:840
SWIG_Python_GetModule
SWIGRUNTIME swig_module_info * SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata))
Definition: linear_solver_python_wrap.cc:2417
operations_research::MPSolverParameters::BARRIER
@ BARRIER
Barrier algorithm.
Definition: linear_solver.h:1405
operations_research::MPSolver::FEASIBLE
@ FEASIBLE
feasible, or stopped by limit.
Definition: linear_solver.h:431
CanConvertToMPVariable
bool CanConvertToMPVariable(PyObject *py_obj)
Definition: linear_solver_python_wrap.cc:2882
_wrap_Solver_Constraint__SWIG_0
SWIGINTERN PyObject * _wrap_Solver_Constraint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
Definition: linear_solver_python_wrap.cc:3828
_wrap_Constraint_lb
SWIGINTERN PyObject * _wrap_Constraint_lb(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: linear_solver_python_wrap.cc:6296
swig_type_info::cast
struct swig_cast_info * cast
Definition: knapsack_solver_python_wrap.cc:371
operations_research::ExportModelAsMpsFormat
absl::StatusOr< std::string > ExportModelAsMpsFormat(const MPModelProto &model, const MPModelExportOptions &options)
Outputs the current model (variables, constraints, objective) as a string encoded in MPS file format,...
Definition: model_exporter.cc:231
SWIG_UnpackData
SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz)
Definition: linear_solver_python_wrap.cc:672