OR-Tools  9.0
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 
3225 SWIGINTERN std::string operations_research_MPSolver_LoadModelFromProto(operations_research::MPSolver *self,operations_research::MPModelProto const &input_model){
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;
3268  operations_research::MPModelProto model;
3269  self->ExportModelToProto(&model);
3270  return ExportModelAsLpFormat(model, options).value_or("");
3271  }
3274  options.obfuscate = obfuscated;
3275  operations_research::MPModelProto model;
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  }
3296 SWIGINTERN int64_t operations_research_MPSolver_WallTime(operations_research::MPSolver const *self){ return self->wall_time(); }
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_variable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3503  PyObject *resultobj = 0;
3505  int arg2 ;
3506  void *argp1 = 0 ;
3507  int res1 = 0 ;
3508  int val2 ;
3509  int ecode2 = 0 ;
3510  PyObject *swig_obj[2] ;
3511  operations_research::MPVariable *result = 0 ;
3512 
3513  if (!SWIG_Python_UnpackTuple(args, "Solver_variable", 2, 2, swig_obj)) SWIG_fail;
3514  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
3515  if (!SWIG_IsOK(res1)) {
3516  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_variable" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
3517  }
3518  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
3519  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
3520  if (!SWIG_IsOK(ecode2)) {
3521  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Solver_variable" "', argument " "2"" of type '" "int""'");
3522  }
3523  arg2 = static_cast< int >(val2);
3524  result = (operations_research::MPVariable *)((operations_research::MPSolver const *)arg1)->variable(arg2);
3526  return resultobj;
3527 fail:
3528  return NULL;
3529 }
3530 
3531 
3532 SWIGINTERN PyObject *_wrap_Solver_LookupVariable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3533  PyObject *resultobj = 0;
3535  std::string *arg2 = 0 ;
3536  void *argp1 = 0 ;
3537  int res1 = 0 ;
3538  int res2 = SWIG_OLDOBJ ;
3539  PyObject *swig_obj[2] ;
3540  operations_research::MPVariable *result = 0 ;
3541 
3542  if (!SWIG_Python_UnpackTuple(args, "Solver_LookupVariable", 2, 2, swig_obj)) SWIG_fail;
3543  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
3544  if (!SWIG_IsOK(res1)) {
3545  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_LookupVariable" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
3546  }
3547  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
3548  {
3549  std::string *ptr = (std::string *)0;
3550  res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr);
3551  if (!SWIG_IsOK(res2)) {
3552  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Solver_LookupVariable" "', argument " "2"" of type '" "std::string const &""'");
3553  }
3554  if (!ptr) {
3555  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Solver_LookupVariable" "', argument " "2"" of type '" "std::string const &""'");
3556  }
3557  arg2 = ptr;
3558  }
3559  result = (operations_research::MPVariable *)((operations_research::MPSolver const *)arg1)->LookupVariableOrNull((std::string const &)*arg2);
3561  if (SWIG_IsNewObj(res2)) delete arg2;
3562  return resultobj;
3563 fail:
3564  if (SWIG_IsNewObj(res2)) delete arg2;
3565  return NULL;
3566 }
3567 
3568 
3569 SWIGINTERN PyObject *_wrap_Solver_Var(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3570  PyObject *resultobj = 0;
3572  double arg2 ;
3573  double arg3 ;
3574  bool arg4 ;
3575  std::string *arg5 = 0 ;
3576  void *argp1 = 0 ;
3577  int res1 = 0 ;
3578  double val2 ;
3579  int ecode2 = 0 ;
3580  double val3 ;
3581  int ecode3 = 0 ;
3582  bool val4 ;
3583  int ecode4 = 0 ;
3584  int res5 = SWIG_OLDOBJ ;
3585  PyObject *swig_obj[5] ;
3586  operations_research::MPVariable *result = 0 ;
3587 
3588  if (!SWIG_Python_UnpackTuple(args, "Solver_Var", 5, 5, swig_obj)) SWIG_fail;
3589  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
3590  if (!SWIG_IsOK(res1)) {
3591  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_Var" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
3592  }
3593  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
3594  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
3595  if (!SWIG_IsOK(ecode2)) {
3596  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Solver_Var" "', argument " "2"" of type '" "double""'");
3597  }
3598  arg2 = static_cast< double >(val2);
3599  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
3600  if (!SWIG_IsOK(ecode3)) {
3601  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Solver_Var" "', argument " "3"" of type '" "double""'");
3602  }
3603  arg3 = static_cast< double >(val3);
3604  ecode4 = SWIG_AsVal_bool(swig_obj[3], &val4);
3605  if (!SWIG_IsOK(ecode4)) {
3606  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Solver_Var" "', argument " "4"" of type '" "bool""'");
3607  }
3608  arg4 = static_cast< bool >(val4);
3609  {
3610  std::string *ptr = (std::string *)0;
3611  res5 = SWIG_AsPtr_std_string(swig_obj[4], &ptr);
3612  if (!SWIG_IsOK(res5)) {
3613  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Solver_Var" "', argument " "5"" of type '" "std::string const &""'");
3614  }
3615  if (!ptr) {
3616  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Solver_Var" "', argument " "5"" of type '" "std::string const &""'");
3617  }
3618  arg5 = ptr;
3619  }
3620  result = (operations_research::MPVariable *)(arg1)->MakeVar(arg2,arg3,arg4,(std::string const &)*arg5);
3622  if (SWIG_IsNewObj(res5)) delete arg5;
3623  return resultobj;
3624 fail:
3625  if (SWIG_IsNewObj(res5)) delete arg5;
3626  return NULL;
3627 }
3628 
3629 
3630 SWIGINTERN PyObject *_wrap_Solver_NumVar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3631  PyObject *resultobj = 0;
3633  double arg2 ;
3634  double arg3 ;
3635  std::string *arg4 = 0 ;
3636  void *argp1 = 0 ;
3637  int res1 = 0 ;
3638  double val2 ;
3639  int ecode2 = 0 ;
3640  double val3 ;
3641  int ecode3 = 0 ;
3642  int res4 = SWIG_OLDOBJ ;
3643  PyObject *swig_obj[4] ;
3644  operations_research::MPVariable *result = 0 ;
3645 
3646  if (!SWIG_Python_UnpackTuple(args, "Solver_NumVar", 4, 4, swig_obj)) SWIG_fail;
3647  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
3648  if (!SWIG_IsOK(res1)) {
3649  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_NumVar" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
3650  }
3651  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
3652  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
3653  if (!SWIG_IsOK(ecode2)) {
3654  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Solver_NumVar" "', argument " "2"" of type '" "double""'");
3655  }
3656  arg2 = static_cast< double >(val2);
3657  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
3658  if (!SWIG_IsOK(ecode3)) {
3659  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Solver_NumVar" "', argument " "3"" of type '" "double""'");
3660  }
3661  arg3 = static_cast< double >(val3);
3662  {
3663  std::string *ptr = (std::string *)0;
3664  res4 = SWIG_AsPtr_std_string(swig_obj[3], &ptr);
3665  if (!SWIG_IsOK(res4)) {
3666  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Solver_NumVar" "', argument " "4"" of type '" "std::string const &""'");
3667  }
3668  if (!ptr) {
3669  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Solver_NumVar" "', argument " "4"" of type '" "std::string const &""'");
3670  }
3671  arg4 = ptr;
3672  }
3673  result = (operations_research::MPVariable *)(arg1)->MakeNumVar(arg2,arg3,(std::string const &)*arg4);
3675  if (SWIG_IsNewObj(res4)) delete arg4;
3676  return resultobj;
3677 fail:
3678  if (SWIG_IsNewObj(res4)) delete arg4;
3679  return NULL;
3680 }
3681 
3682 
3683 SWIGINTERN PyObject *_wrap_Solver_IntVar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3684  PyObject *resultobj = 0;
3686  double arg2 ;
3687  double arg3 ;
3688  std::string *arg4 = 0 ;
3689  void *argp1 = 0 ;
3690  int res1 = 0 ;
3691  double val2 ;
3692  int ecode2 = 0 ;
3693  double val3 ;
3694  int ecode3 = 0 ;
3695  int res4 = SWIG_OLDOBJ ;
3696  PyObject *swig_obj[4] ;
3697  operations_research::MPVariable *result = 0 ;
3698 
3699  if (!SWIG_Python_UnpackTuple(args, "Solver_IntVar", 4, 4, swig_obj)) SWIG_fail;
3700  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
3701  if (!SWIG_IsOK(res1)) {
3702  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_IntVar" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
3703  }
3704  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
3705  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
3706  if (!SWIG_IsOK(ecode2)) {
3707  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Solver_IntVar" "', argument " "2"" of type '" "double""'");
3708  }
3709  arg2 = static_cast< double >(val2);
3710  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
3711  if (!SWIG_IsOK(ecode3)) {
3712  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Solver_IntVar" "', argument " "3"" of type '" "double""'");
3713  }
3714  arg3 = static_cast< double >(val3);
3715  {
3716  std::string *ptr = (std::string *)0;
3717  res4 = SWIG_AsPtr_std_string(swig_obj[3], &ptr);
3718  if (!SWIG_IsOK(res4)) {
3719  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Solver_IntVar" "', argument " "4"" of type '" "std::string const &""'");
3720  }
3721  if (!ptr) {
3722  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Solver_IntVar" "', argument " "4"" of type '" "std::string const &""'");
3723  }
3724  arg4 = ptr;
3725  }
3726  result = (operations_research::MPVariable *)(arg1)->MakeIntVar(arg2,arg3,(std::string const &)*arg4);
3728  if (SWIG_IsNewObj(res4)) delete arg4;
3729  return resultobj;
3730 fail:
3731  if (SWIG_IsNewObj(res4)) delete arg4;
3732  return NULL;
3733 }
3734 
3735 
3736 SWIGINTERN PyObject *_wrap_Solver_BoolVar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3737  PyObject *resultobj = 0;
3739  std::string *arg2 = 0 ;
3740  void *argp1 = 0 ;
3741  int res1 = 0 ;
3742  int res2 = SWIG_OLDOBJ ;
3743  PyObject *swig_obj[2] ;
3744  operations_research::MPVariable *result = 0 ;
3745 
3746  if (!SWIG_Python_UnpackTuple(args, "Solver_BoolVar", 2, 2, swig_obj)) SWIG_fail;
3747  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
3748  if (!SWIG_IsOK(res1)) {
3749  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_BoolVar" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
3750  }
3751  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
3752  {
3753  std::string *ptr = (std::string *)0;
3754  res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr);
3755  if (!SWIG_IsOK(res2)) {
3756  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Solver_BoolVar" "', argument " "2"" of type '" "std::string const &""'");
3757  }
3758  if (!ptr) {
3759  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Solver_BoolVar" "', argument " "2"" of type '" "std::string const &""'");
3760  }
3761  arg2 = ptr;
3762  }
3763  result = (operations_research::MPVariable *)(arg1)->MakeBoolVar((std::string const &)*arg2);
3765  if (SWIG_IsNewObj(res2)) delete arg2;
3766  return resultobj;
3767 fail:
3768  if (SWIG_IsNewObj(res2)) delete arg2;
3769  return NULL;
3770 }
3771 
3772 
3773 SWIGINTERN PyObject *_wrap_Solver_NumConstraints(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3774  PyObject *resultobj = 0;
3776  void *argp1 = 0 ;
3777  int res1 = 0 ;
3778  PyObject *swig_obj[1] ;
3779  int result;
3780 
3781  if (!args) SWIG_fail;
3782  swig_obj[0] = args;
3783  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
3784  if (!SWIG_IsOK(res1)) {
3785  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_NumConstraints" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
3786  }
3787  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
3788  result = (int)((operations_research::MPSolver const *)arg1)->NumConstraints();
3789  resultobj = SWIG_From_int(static_cast< int >(result));
3790  return resultobj;
3791 fail:
3792  return NULL;
3793 }
3794 
3795 
3796 SWIGINTERN PyObject *_wrap_Solver_constraints(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3797  PyObject *resultobj = 0;
3799  void *argp1 = 0 ;
3800  int res1 = 0 ;
3801  PyObject *swig_obj[1] ;
3802  std::vector< operations_research::MPConstraint * > *result = 0 ;
3803 
3804  if (!args) SWIG_fail;
3805  swig_obj[0] = args;
3806  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
3807  if (!SWIG_IsOK(res1)) {
3808  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_constraints" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
3809  }
3810  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
3811  result = (std::vector< operations_research::MPConstraint * > *) &((operations_research::MPSolver const *)arg1)->constraints();
3812  {
3813  resultobj = vector_output_helper(result, &FromObjectMPConstraint);
3814  }
3815  return resultobj;
3816 fail:
3817  return NULL;
3818 }
3819 
3820 
3821 SWIGINTERN PyObject *_wrap_Solver_constraint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3822  PyObject *resultobj = 0;
3824  int arg2 ;
3825  void *argp1 = 0 ;
3826  int res1 = 0 ;
3827  int val2 ;
3828  int ecode2 = 0 ;
3829  PyObject *swig_obj[2] ;
3830  operations_research::MPConstraint *result = 0 ;
3831 
3832  if (!SWIG_Python_UnpackTuple(args, "Solver_constraint", 2, 2, swig_obj)) SWIG_fail;
3833  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
3834  if (!SWIG_IsOK(res1)) {
3835  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_constraint" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
3836  }
3837  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
3838  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
3839  if (!SWIG_IsOK(ecode2)) {
3840  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Solver_constraint" "', argument " "2"" of type '" "int""'");
3841  }
3842  arg2 = static_cast< int >(val2);
3843  result = (operations_research::MPConstraint *)((operations_research::MPSolver const *)arg1)->constraint(arg2);
3845  return resultobj;
3846 fail:
3847  return NULL;
3848 }
3849 
3850 
3851 SWIGINTERN PyObject *_wrap_Solver_LookupConstraint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3852  PyObject *resultobj = 0;
3854  std::string *arg2 = 0 ;
3855  void *argp1 = 0 ;
3856  int res1 = 0 ;
3857  int res2 = SWIG_OLDOBJ ;
3858  PyObject *swig_obj[2] ;
3859  operations_research::MPConstraint *result = 0 ;
3860 
3861  if (!SWIG_Python_UnpackTuple(args, "Solver_LookupConstraint", 2, 2, swig_obj)) SWIG_fail;
3862  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
3863  if (!SWIG_IsOK(res1)) {
3864  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_LookupConstraint" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
3865  }
3866  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
3867  {
3868  std::string *ptr = (std::string *)0;
3869  res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr);
3870  if (!SWIG_IsOK(res2)) {
3871  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Solver_LookupConstraint" "', argument " "2"" of type '" "std::string const &""'");
3872  }
3873  if (!ptr) {
3874  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Solver_LookupConstraint" "', argument " "2"" of type '" "std::string const &""'");
3875  }
3876  arg2 = ptr;
3877  }
3878  result = (operations_research::MPConstraint *)((operations_research::MPSolver const *)arg1)->LookupConstraintOrNull((std::string const &)*arg2);
3880  if (SWIG_IsNewObj(res2)) delete arg2;
3881  return resultobj;
3882 fail:
3883  if (SWIG_IsNewObj(res2)) delete arg2;
3884  return NULL;
3885 }
3886 
3887 
3888 SWIGINTERN PyObject *_wrap_Solver_Constraint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
3889  PyObject *resultobj = 0;
3891  double arg2 ;
3892  double arg3 ;
3893  void *argp1 = 0 ;
3894  int res1 = 0 ;
3895  double val2 ;
3896  int ecode2 = 0 ;
3897  double val3 ;
3898  int ecode3 = 0 ;
3899  operations_research::MPConstraint *result = 0 ;
3900 
3901  if ((nobjs < 3) || (nobjs > 3)) 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  result = (operations_research::MPConstraint *)(arg1)->MakeRowConstraint(arg2,arg3);
3919  return resultobj;
3920 fail:
3921  return NULL;
3922 }
3923 
3924 
3925 SWIGINTERN PyObject *_wrap_Solver_Constraint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
3926  PyObject *resultobj = 0;
3928  void *argp1 = 0 ;
3929  int res1 = 0 ;
3930  operations_research::MPConstraint *result = 0 ;
3931 
3932  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
3933  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
3934  if (!SWIG_IsOK(res1)) {
3935  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_Constraint" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
3936  }
3937  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
3938  result = (operations_research::MPConstraint *)(arg1)->MakeRowConstraint();
3940  return resultobj;
3941 fail:
3942  return NULL;
3943 }
3944 
3945 
3946 SWIGINTERN PyObject *_wrap_Solver_Constraint__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
3947  PyObject *resultobj = 0;
3949  double arg2 ;
3950  double arg3 ;
3951  std::string *arg4 = 0 ;
3952  void *argp1 = 0 ;
3953  int res1 = 0 ;
3954  double val2 ;
3955  int ecode2 = 0 ;
3956  double val3 ;
3957  int ecode3 = 0 ;
3958  int res4 = SWIG_OLDOBJ ;
3959  operations_research::MPConstraint *result = 0 ;
3960 
3961  if ((nobjs < 4) || (nobjs > 4)) SWIG_fail;
3962  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
3963  if (!SWIG_IsOK(res1)) {
3964  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_Constraint" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
3965  }
3966  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
3967  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
3968  if (!SWIG_IsOK(ecode2)) {
3969  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Solver_Constraint" "', argument " "2"" of type '" "double""'");
3970  }
3971  arg2 = static_cast< double >(val2);
3972  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
3973  if (!SWIG_IsOK(ecode3)) {
3974  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Solver_Constraint" "', argument " "3"" of type '" "double""'");
3975  }
3976  arg3 = static_cast< double >(val3);
3977  {
3978  std::string *ptr = (std::string *)0;
3979  res4 = SWIG_AsPtr_std_string(swig_obj[3], &ptr);
3980  if (!SWIG_IsOK(res4)) {
3981  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Solver_Constraint" "', argument " "4"" of type '" "std::string const &""'");
3982  }
3983  if (!ptr) {
3984  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Solver_Constraint" "', argument " "4"" of type '" "std::string const &""'");
3985  }
3986  arg4 = ptr;
3987  }
3988  result = (operations_research::MPConstraint *)(arg1)->MakeRowConstraint(arg2,arg3,(std::string const &)*arg4);
3990  if (SWIG_IsNewObj(res4)) delete arg4;
3991  return resultobj;
3992 fail:
3993  if (SWIG_IsNewObj(res4)) delete arg4;
3994  return NULL;
3995 }
3996 
3997 
3998 SWIGINTERN PyObject *_wrap_Solver_Constraint__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
3999  PyObject *resultobj = 0;
4001  std::string *arg2 = 0 ;
4002  void *argp1 = 0 ;
4003  int res1 = 0 ;
4004  int res2 = SWIG_OLDOBJ ;
4005  operations_research::MPConstraint *result = 0 ;
4006 
4007  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
4008  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4009  if (!SWIG_IsOK(res1)) {
4010  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_Constraint" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
4011  }
4012  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4013  {
4014  std::string *ptr = (std::string *)0;
4015  res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr);
4016  if (!SWIG_IsOK(res2)) {
4017  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Solver_Constraint" "', argument " "2"" of type '" "std::string const &""'");
4018  }
4019  if (!ptr) {
4020  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Solver_Constraint" "', argument " "2"" of type '" "std::string const &""'");
4021  }
4022  arg2 = ptr;
4023  }
4024  result = (operations_research::MPConstraint *)(arg1)->MakeRowConstraint((std::string const &)*arg2);
4026  if (SWIG_IsNewObj(res2)) delete arg2;
4027  return resultobj;
4028 fail:
4029  if (SWIG_IsNewObj(res2)) delete arg2;
4030  return NULL;
4031 }
4032 
4033 
4034 SWIGINTERN PyObject *_wrap_Solver_Constraint(PyObject *self, PyObject *args) {
4035  Py_ssize_t argc;
4036  PyObject *argv[5] = {
4037  0
4038  };
4039 
4040  if (!(argc = SWIG_Python_UnpackTuple(args, "Solver_Constraint", 0, 4, argv))) SWIG_fail;
4041  --argc;
4042  if (argc == 1) {
4043  int _v;
4044  void *vptr = 0;
4045  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_operations_research__MPSolver, 0);
4046  _v = SWIG_CheckState(res);
4047  if (_v) {
4048  return _wrap_Solver_Constraint__SWIG_1(self, argc, argv);
4049  }
4050  }
4051  if (argc == 2) {
4052  int _v;
4053  void *vptr = 0;
4054  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_operations_research__MPSolver, 0);
4055  _v = SWIG_CheckState(res);
4056  if (_v) {
4057  int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
4058  _v = SWIG_CheckState(res);
4059  if (_v) {
4060  return _wrap_Solver_Constraint__SWIG_3(self, argc, argv);
4061  }
4062  }
4063  }
4064  if (argc == 3) {
4065  int _v;
4066  void *vptr = 0;
4067  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_operations_research__MPSolver, 0);
4068  _v = SWIG_CheckState(res);
4069  if (_v) {
4070  {
4071  int res = SWIG_AsVal_double(argv[1], NULL);
4072  _v = SWIG_CheckState(res);
4073  }
4074  if (_v) {
4075  {
4076  int res = SWIG_AsVal_double(argv[2], NULL);
4077  _v = SWIG_CheckState(res);
4078  }
4079  if (_v) {
4080  return _wrap_Solver_Constraint__SWIG_0(self, argc, argv);
4081  }
4082  }
4083  }
4084  }
4085  if (argc == 4) {
4086  int _v;
4087  void *vptr = 0;
4088  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_operations_research__MPSolver, 0);
4089  _v = SWIG_CheckState(res);
4090  if (_v) {
4091  {
4092  int res = SWIG_AsVal_double(argv[1], NULL);
4093  _v = SWIG_CheckState(res);
4094  }
4095  if (_v) {
4096  {
4097  int res = SWIG_AsVal_double(argv[2], NULL);
4098  _v = SWIG_CheckState(res);
4099  }
4100  if (_v) {
4101  int res = SWIG_AsPtr_std_string(argv[3], (std::string**)(0));
4102  _v = SWIG_CheckState(res);
4103  if (_v) {
4104  return _wrap_Solver_Constraint__SWIG_2(self, argc, argv);
4105  }
4106  }
4107  }
4108  }
4109  }
4110 
4111 fail:
4112  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Solver_Constraint'.\n"
4113  " Possible C/C++ prototypes are:\n"
4114  " operations_research::MPSolver::MakeRowConstraint(double,double)\n"
4115  " operations_research::MPSolver::MakeRowConstraint()\n"
4116  " operations_research::MPSolver::MakeRowConstraint(double,double,std::string const &)\n"
4117  " operations_research::MPSolver::MakeRowConstraint(std::string const &)\n");
4118  return 0;
4119 }
4120 
4121 
4122 SWIGINTERN PyObject *_wrap_Solver_Objective(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4123  PyObject *resultobj = 0;
4125  void *argp1 = 0 ;
4126  int res1 = 0 ;
4127  PyObject *swig_obj[1] ;
4128  operations_research::MPObjective *result = 0 ;
4129 
4130  if (!args) SWIG_fail;
4131  swig_obj[0] = args;
4132  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4133  if (!SWIG_IsOK(res1)) {
4134  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_Objective" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
4135  }
4136  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4137  result = (operations_research::MPObjective *)(arg1)->MutableObjective();
4139  return resultobj;
4140 fail:
4141  return NULL;
4142 }
4143 
4144 
4145 SWIGINTERN PyObject *_wrap_Solver_Solve__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
4146  PyObject *resultobj = 0;
4148  void *argp1 = 0 ;
4149  int res1 = 0 ;
4151 
4152  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
4153  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4154  if (!SWIG_IsOK(res1)) {
4155  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_Solve" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
4156  }
4157  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4159  resultobj = SWIG_From_int(static_cast< int >(result));
4160  return resultobj;
4161 fail:
4162  return NULL;
4163 }
4164 
4165 
4166 SWIGINTERN PyObject *_wrap_Solver_Solve__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
4167  PyObject *resultobj = 0;
4170  void *argp1 = 0 ;
4171  int res1 = 0 ;
4172  void *argp2 = 0 ;
4173  int res2 = 0 ;
4175 
4176  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
4177  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4178  if (!SWIG_IsOK(res1)) {
4179  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_Solve" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
4180  }
4181  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4182  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_operations_research__MPSolverParameters, 0 | 0);
4183  if (!SWIG_IsOK(res2)) {
4184  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Solver_Solve" "', argument " "2"" of type '" "operations_research::MPSolverParameters const &""'");
4185  }
4186  if (!argp2) {
4187  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Solver_Solve" "', argument " "2"" of type '" "operations_research::MPSolverParameters const &""'");
4188  }
4189  arg2 = reinterpret_cast< operations_research::MPSolverParameters * >(argp2);
4191  resultobj = SWIG_From_int(static_cast< int >(result));
4192  return resultobj;
4193 fail:
4194  return NULL;
4195 }
4196 
4197 
4198 SWIGINTERN PyObject *_wrap_Solver_Solve(PyObject *self, PyObject *args) {
4199  Py_ssize_t argc;
4200  PyObject *argv[3] = {
4201  0
4202  };
4203 
4204  if (!(argc = SWIG_Python_UnpackTuple(args, "Solver_Solve", 0, 2, argv))) SWIG_fail;
4205  --argc;
4206  if (argc == 1) {
4207  int _v;
4208  void *vptr = 0;
4209  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_operations_research__MPSolver, 0);
4210  _v = SWIG_CheckState(res);
4211  if (_v) {
4212  return _wrap_Solver_Solve__SWIG_0(self, argc, argv);
4213  }
4214  }
4215  if (argc == 2) {
4216  int _v;
4217  void *vptr = 0;
4218  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_operations_research__MPSolver, 0);
4219  _v = SWIG_CheckState(res);
4220  if (_v) {
4222  _v = SWIG_CheckState(res);
4223  if (_v) {
4224  return _wrap_Solver_Solve__SWIG_1(self, argc, argv);
4225  }
4226  }
4227  }
4228 
4229 fail:
4230  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Solver_Solve'.\n"
4231  " Possible C/C++ prototypes are:\n"
4232  " operations_research::MPSolver::Solve()\n"
4233  " operations_research::MPSolver::Solve(operations_research::MPSolverParameters const &)\n");
4234  return 0;
4235 }
4236 
4237 
4238 SWIGINTERN PyObject *_wrap_Solver_ComputeConstraintActivities(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4239  PyObject *resultobj = 0;
4241  void *argp1 = 0 ;
4242  int res1 = 0 ;
4243  PyObject *swig_obj[1] ;
4244  std::vector< double > result;
4245 
4246  if (!args) SWIG_fail;
4247  swig_obj[0] = args;
4248  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4249  if (!SWIG_IsOK(res1)) {
4250  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_ComputeConstraintActivities" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
4251  }
4252  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4253  result = ((operations_research::MPSolver const *)arg1)->ComputeConstraintActivities();
4254  {
4255  resultobj = vector_output_helper(&result, &PyFloat_FromDouble);
4256  }
4257  return resultobj;
4258 fail:
4259  return NULL;
4260 }
4261 
4262 
4263 SWIGINTERN PyObject *_wrap_Solver_VerifySolution(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4264  PyObject *resultobj = 0;
4266  double arg2 ;
4267  bool arg3 ;
4268  void *argp1 = 0 ;
4269  int res1 = 0 ;
4270  double val2 ;
4271  int ecode2 = 0 ;
4272  bool val3 ;
4273  int ecode3 = 0 ;
4274  PyObject *swig_obj[3] ;
4275  bool result;
4276 
4277  if (!SWIG_Python_UnpackTuple(args, "Solver_VerifySolution", 3, 3, swig_obj)) SWIG_fail;
4278  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4279  if (!SWIG_IsOK(res1)) {
4280  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_VerifySolution" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
4281  }
4282  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4283  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
4284  if (!SWIG_IsOK(ecode2)) {
4285  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Solver_VerifySolution" "', argument " "2"" of type '" "double""'");
4286  }
4287  arg2 = static_cast< double >(val2);
4288  ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3);
4289  if (!SWIG_IsOK(ecode3)) {
4290  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Solver_VerifySolution" "', argument " "3"" of type '" "bool""'");
4291  }
4292  arg3 = static_cast< bool >(val3);
4293  result = (bool)((operations_research::MPSolver const *)arg1)->VerifySolution(arg2,arg3);
4294  resultobj = SWIG_From_bool(static_cast< bool >(result));
4295  return resultobj;
4296 fail:
4297  return NULL;
4298 }
4299 
4300 
4301 SWIGINTERN PyObject *_wrap_Solver_InterruptSolve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4302  PyObject *resultobj = 0;
4304  void *argp1 = 0 ;
4305  int res1 = 0 ;
4306  PyObject *swig_obj[1] ;
4307  bool result;
4308 
4309  if (!args) SWIG_fail;
4310  swig_obj[0] = args;
4311  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4312  if (!SWIG_IsOK(res1)) {
4313  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_InterruptSolve" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
4314  }
4315  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4316  result = (bool)(arg1)->InterruptSolve();
4317  resultobj = SWIG_From_bool(static_cast< bool >(result));
4318  return resultobj;
4319 fail:
4320  return NULL;
4321 }
4322 
4323 
4324 SWIGINTERN PyObject *_wrap_Solver_FillSolutionResponseProto(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4325  PyObject *resultobj = 0;
4327  operations_research::MPSolutionResponse *arg2 = (operations_research::MPSolutionResponse *) 0 ;
4328  void *argp1 = 0 ;
4329  int res1 = 0 ;
4330  PyObject *swig_obj[2] ;
4331 
4332  if (!SWIG_Python_UnpackTuple(args, "Solver_FillSolutionResponseProto", 2, 2, swig_obj)) SWIG_fail;
4333  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4334  if (!SWIG_IsOK(res1)) {
4335  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_FillSolutionResponseProto" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
4336  }
4337  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4338  {
4339  arg2 = new operations_research::MPSolutionResponse;
4340  PyObject* const pyresult = PyObject_CallMethod(
4341  swig_obj[1], const_cast<char*>("SerializeToString"), nullptr);
4342  if (pyresult != nullptr) {
4343  char* buffer = nullptr;
4344  Py_ssize_t length = 0;
4345  int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
4346  if (buffer != nullptr) {
4347  arg2->ParseFromArray(buffer, length);
4348  }
4349  Py_DECREF(pyresult);
4350  }
4351  }
4352  ((operations_research::MPSolver const *)arg1)->FillSolutionResponseProto(arg2);
4353  resultobj = SWIG_Py_Void();
4354  {
4355  std::string encoded_protobuf;
4356  arg2->SerializeToString(&encoded_protobuf);
4357 
4358  PyObject* const python_encoded_protobuf =
4359  PyBytes_FromStringAndSize(encoded_protobuf.c_str(),
4360  encoded_protobuf.size());
4361 
4362 
4363 
4364 
4365 
4366  if (python_encoded_protobuf != nullptr) {
4367  PyObject* const result = PyObject_CallMethod(
4368  swig_obj[1], const_cast<char*>("ParseFromString"),
4369  const_cast<char*>("(O)"), python_encoded_protobuf);
4370  Py_DECREF(python_encoded_protobuf);
4371  if (result != nullptr) {
4372  Py_DECREF(result);
4373  }
4374  }
4375  }
4376  {
4377  delete arg2;
4378  }
4379  return resultobj;
4380 fail:
4381  {
4382  delete arg2;
4383  }
4384  return NULL;
4385 }
4386 
4387 
4388 SWIGINTERN PyObject *_wrap_Solver_SolveWithProto(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4389  PyObject *resultobj = 0;
4390  operations_research::MPModelRequest *arg1 = 0 ;
4391  operations_research::MPSolutionResponse *arg2 = (operations_research::MPSolutionResponse *) 0 ;
4392  void *argp1 = 0 ;
4393  int res1 = 0 ;
4394  PyObject *swig_obj[2] ;
4395 
4396  if (!SWIG_Python_UnpackTuple(args, "Solver_SolveWithProto", 2, 2, swig_obj)) SWIG_fail;
4397  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_operations_research__MPModelRequest, 0 | 0);
4398  if (!SWIG_IsOK(res1)) {
4399  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_SolveWithProto" "', argument " "1"" of type '" "operations_research::MPModelRequest const &""'");
4400  }
4401  if (!argp1) {
4402  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Solver_SolveWithProto" "', argument " "1"" of type '" "operations_research::MPModelRequest const &""'");
4403  }
4404  arg1 = reinterpret_cast< operations_research::MPModelRequest * >(argp1);
4405  {
4406  arg2 = new operations_research::MPSolutionResponse;
4407  PyObject* const pyresult = PyObject_CallMethod(
4408  swig_obj[1], const_cast<char*>("SerializeToString"), nullptr);
4409  if (pyresult != nullptr) {
4410  char* buffer = nullptr;
4411  Py_ssize_t length = 0;
4412  int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
4413  if (buffer != nullptr) {
4414  arg2->ParseFromArray(buffer, length);
4415  }
4416  Py_DECREF(pyresult);
4417  }
4418  }
4419  operations_research::MPSolver::SolveWithProto((operations_research::MPModelRequest const &)*arg1,arg2);
4420  resultobj = SWIG_Py_Void();
4421  {
4422  std::string encoded_protobuf;
4423  arg2->SerializeToString(&encoded_protobuf);
4424 
4425  PyObject* const python_encoded_protobuf =
4426  PyBytes_FromStringAndSize(encoded_protobuf.c_str(),
4427  encoded_protobuf.size());
4428 
4429 
4430 
4431 
4432 
4433  if (python_encoded_protobuf != nullptr) {
4434  PyObject* const result = PyObject_CallMethod(
4435  swig_obj[1], const_cast<char*>("ParseFromString"),
4436  const_cast<char*>("(O)"), python_encoded_protobuf);
4437  Py_DECREF(python_encoded_protobuf);
4438  if (result != nullptr) {
4439  Py_DECREF(result);
4440  }
4441  }
4442  }
4443  {
4444  delete arg2;
4445  }
4446  return resultobj;
4447 fail:
4448  {
4449  delete arg2;
4450  }
4451  return NULL;
4452 }
4453 
4454 
4455 SWIGINTERN PyObject *_wrap_Solver_ExportModelToProto(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4456  PyObject *resultobj = 0;
4458  operations_research::MPModelProto *arg2 = (operations_research::MPModelProto *) 0 ;
4459  void *argp1 = 0 ;
4460  int res1 = 0 ;
4461  PyObject *swig_obj[2] ;
4462 
4463  if (!SWIG_Python_UnpackTuple(args, "Solver_ExportModelToProto", 2, 2, swig_obj)) SWIG_fail;
4464  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4465  if (!SWIG_IsOK(res1)) {
4466  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_ExportModelToProto" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
4467  }
4468  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4469  {
4470  arg2 = new operations_research::MPModelProto;
4471  PyObject* const pyresult = PyObject_CallMethod(
4472  swig_obj[1], const_cast<char*>("SerializeToString"), nullptr);
4473  if (pyresult != nullptr) {
4474  char* buffer = nullptr;
4475  Py_ssize_t length = 0;
4476  int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
4477  if (buffer != nullptr) {
4478  arg2->ParseFromArray(buffer, length);
4479  }
4480  Py_DECREF(pyresult);
4481  }
4482  }
4483  ((operations_research::MPSolver const *)arg1)->ExportModelToProto(arg2);
4484  resultobj = SWIG_Py_Void();
4485  {
4486  std::string encoded_protobuf;
4487  arg2->SerializeToString(&encoded_protobuf);
4488 
4489  PyObject* const python_encoded_protobuf =
4490  PyBytes_FromStringAndSize(encoded_protobuf.c_str(),
4491  encoded_protobuf.size());
4492 
4493 
4494 
4495 
4496 
4497  if (python_encoded_protobuf != nullptr) {
4498  PyObject* const result = PyObject_CallMethod(
4499  swig_obj[1], const_cast<char*>("ParseFromString"),
4500  const_cast<char*>("(O)"), python_encoded_protobuf);
4501  Py_DECREF(python_encoded_protobuf);
4502  if (result != nullptr) {
4503  Py_DECREF(result);
4504  }
4505  }
4506  }
4507  {
4508  delete arg2;
4509  }
4510  return resultobj;
4511 fail:
4512  {
4513  delete arg2;
4514  }
4515  return NULL;
4516 }
4517 
4518 
4520  PyObject *resultobj = 0;
4522  std::string *arg2 = 0 ;
4523  void *argp1 = 0 ;
4524  int res1 = 0 ;
4525  int res2 = SWIG_OLDOBJ ;
4526  PyObject *swig_obj[2] ;
4527  bool result;
4528 
4529  if (!SWIG_Python_UnpackTuple(args, "Solver_SetSolverSpecificParametersAsString", 2, 2, swig_obj)) SWIG_fail;
4530  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4531  if (!SWIG_IsOK(res1)) {
4532  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_SetSolverSpecificParametersAsString" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
4533  }
4534  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4535  {
4536  std::string *ptr = (std::string *)0;
4537  res2 = SWIG_AsPtr_std_string(swig_obj[1], &ptr);
4538  if (!SWIG_IsOK(res2)) {
4539  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Solver_SetSolverSpecificParametersAsString" "', argument " "2"" of type '" "std::string const &""'");
4540  }
4541  if (!ptr) {
4542  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Solver_SetSolverSpecificParametersAsString" "', argument " "2"" of type '" "std::string const &""'");
4543  }
4544  arg2 = ptr;
4545  }
4546  result = (bool)(arg1)->SetSolverSpecificParametersAsString((std::string const &)*arg2);
4547  resultobj = SWIG_From_bool(static_cast< bool >(result));
4548  if (SWIG_IsNewObj(res2)) delete arg2;
4549  return resultobj;
4550 fail:
4551  if (SWIG_IsNewObj(res2)) delete arg2;
4552  return NULL;
4553 }
4554 
4555 
4556 SWIGINTERN PyObject *_wrap_Solver_infinity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4557  PyObject *resultobj = 0;
4558  double result;
4559 
4560  if (!SWIG_Python_UnpackTuple(args, "Solver_infinity", 0, 0, 0)) SWIG_fail;
4561  result = (double)operations_research::MPSolver::infinity();
4562  resultobj = SWIG_From_double(static_cast< double >(result));
4563  return resultobj;
4564 fail:
4565  return NULL;
4566 }
4567 
4568 
4569 SWIGINTERN PyObject *_wrap_Solver_EnableOutput(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4570  PyObject *resultobj = 0;
4572  void *argp1 = 0 ;
4573  int res1 = 0 ;
4574  PyObject *swig_obj[1] ;
4575 
4576  if (!args) SWIG_fail;
4577  swig_obj[0] = args;
4578  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4579  if (!SWIG_IsOK(res1)) {
4580  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_EnableOutput" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
4581  }
4582  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4583  (arg1)->EnableOutput();
4584  resultobj = SWIG_Py_Void();
4585  return resultobj;
4586 fail:
4587  return NULL;
4588 }
4589 
4590 
4591 SWIGINTERN PyObject *_wrap_Solver_SuppressOutput(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4592  PyObject *resultobj = 0;
4594  void *argp1 = 0 ;
4595  int res1 = 0 ;
4596  PyObject *swig_obj[1] ;
4597 
4598  if (!args) SWIG_fail;
4599  swig_obj[0] = args;
4600  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4601  if (!SWIG_IsOK(res1)) {
4602  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_SuppressOutput" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
4603  }
4604  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4605  (arg1)->SuppressOutput();
4606  resultobj = SWIG_Py_Void();
4607  return resultobj;
4608 fail:
4609  return NULL;
4610 }
4611 
4612 
4613 SWIGINTERN PyObject *_wrap_Solver_iterations(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4614  PyObject *resultobj = 0;
4616  void *argp1 = 0 ;
4617  int res1 = 0 ;
4618  PyObject *swig_obj[1] ;
4619  int64_t result;
4620 
4621  if (!args) SWIG_fail;
4622  swig_obj[0] = args;
4623  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4624  if (!SWIG_IsOK(res1)) {
4625  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_iterations" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
4626  }
4627  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4628  result = (int64_t)((operations_research::MPSolver const *)arg1)->iterations();
4629  resultobj = SWIG_From_long(static_cast< long >(result));
4630  return resultobj;
4631 fail:
4632  return NULL;
4633 }
4634 
4635 
4636 SWIGINTERN PyObject *_wrap_Solver_nodes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4637  PyObject *resultobj = 0;
4639  void *argp1 = 0 ;
4640  int res1 = 0 ;
4641  PyObject *swig_obj[1] ;
4642  int64_t result;
4643 
4644  if (!args) SWIG_fail;
4645  swig_obj[0] = args;
4646  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4647  if (!SWIG_IsOK(res1)) {
4648  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_nodes" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
4649  }
4650  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4651  result = (int64_t)((operations_research::MPSolver const *)arg1)->nodes();
4652  resultobj = SWIG_From_long(static_cast< long >(result));
4653  return resultobj;
4654 fail:
4655  return NULL;
4656 }
4657 
4658 
4659 SWIGINTERN PyObject *_wrap_Solver_ComputeExactConditionNumber(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4660  PyObject *resultobj = 0;
4662  void *argp1 = 0 ;
4663  int res1 = 0 ;
4664  PyObject *swig_obj[1] ;
4665  double result;
4666 
4667  if (!args) SWIG_fail;
4668  swig_obj[0] = args;
4669  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4670  if (!SWIG_IsOK(res1)) {
4671  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_ComputeExactConditionNumber" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
4672  }
4673  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4674  result = (double)((operations_research::MPSolver const *)arg1)->ComputeExactConditionNumber();
4675  resultobj = SWIG_From_double(static_cast< double >(result));
4676  return resultobj;
4677 fail:
4678  return NULL;
4679 }
4680 
4681 
4682 SWIGINTERN PyObject *_wrap_Solver_NextSolution(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4683  PyObject *resultobj = 0;
4685  void *argp1 = 0 ;
4686  int res1 = 0 ;
4687  PyObject *swig_obj[1] ;
4688  bool result;
4689 
4690  if (!args) SWIG_fail;
4691  swig_obj[0] = args;
4692  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4693  if (!SWIG_IsOK(res1)) {
4694  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_NextSolution" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
4695  }
4696  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4697  result = (bool)(arg1)->NextSolution();
4698  resultobj = SWIG_From_bool(static_cast< bool >(result));
4699  return resultobj;
4700 fail:
4701  return NULL;
4702 }
4703 
4704 
4705 SWIGINTERN PyObject *_wrap_Solver_set_time_limit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4706  PyObject *resultobj = 0;
4708  int64_t arg2 ;
4709  void *argp1 = 0 ;
4710  int res1 = 0 ;
4711  long val2 ;
4712  int ecode2 = 0 ;
4713  PyObject *swig_obj[2] ;
4714 
4715  if (!SWIG_Python_UnpackTuple(args, "Solver_set_time_limit", 2, 2, swig_obj)) SWIG_fail;
4716  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4717  if (!SWIG_IsOK(res1)) {
4718  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_set_time_limit" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
4719  }
4720  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4721  ecode2 = SWIG_AsVal_long(swig_obj[1], &val2);
4722  if (!SWIG_IsOK(ecode2)) {
4723  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Solver_set_time_limit" "', argument " "2"" of type '" "int64_t""'");
4724  }
4725  arg2 = static_cast< int64_t >(val2);
4726  (arg1)->set_time_limit(arg2);
4727  resultobj = SWIG_Py_Void();
4728  return resultobj;
4729 fail:
4730  return NULL;
4731 }
4732 
4733 
4734 SWIGINTERN PyObject *_wrap_Solver_wall_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4735  PyObject *resultobj = 0;
4737  void *argp1 = 0 ;
4738  int res1 = 0 ;
4739  PyObject *swig_obj[1] ;
4740  int64_t result;
4741 
4742  if (!args) SWIG_fail;
4743  swig_obj[0] = args;
4744  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4745  if (!SWIG_IsOK(res1)) {
4746  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_wall_time" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
4747  }
4748  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4749  result = (int64_t)((operations_research::MPSolver const *)arg1)->wall_time();
4750  resultobj = SWIG_From_long(static_cast< long >(result));
4751  return resultobj;
4752 fail:
4753  return NULL;
4754 }
4755 
4756 
4757 SWIGINTERN PyObject *_wrap_Solver_LoadModelFromProto(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4758  PyObject *resultobj = 0;
4760  operations_research::MPModelProto *arg2 = 0 ;
4761  void *argp1 = 0 ;
4762  int res1 = 0 ;
4763  PyObject *swig_obj[2] ;
4764  std::string result;
4765 
4766  if (!SWIG_Python_UnpackTuple(args, "Solver_LoadModelFromProto", 2, 2, swig_obj)) SWIG_fail;
4767  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4768  if (!SWIG_IsOK(res1)) {
4769  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_LoadModelFromProto" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
4770  }
4771  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4772  {
4773  arg2 = new operations_research::MPModelProto;
4774  PyObject* const pyresult = PyObject_CallMethod(
4775  swig_obj[1], const_cast<char*>("SerializeToString"), nullptr);
4776  if (pyresult != nullptr) {
4777  char* buffer = nullptr;
4778  Py_ssize_t length = 0;
4779  int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
4780  if (buffer != nullptr) {
4781  arg2->ParseFromArray(buffer, length);
4782  }
4783  Py_DECREF(pyresult);
4784  }
4785  }
4786  result = operations_research_MPSolver_LoadModelFromProto(arg1,(operations_research::MPModelProto const &)*arg2);
4787  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
4788  {
4789  delete arg2;
4790  }
4791  return resultobj;
4792 fail:
4793  {
4794  delete arg2;
4795  }
4796  return NULL;
4797 }
4798 
4799 
4800 SWIGINTERN PyObject *_wrap_Solver_LoadSolutionFromProto__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
4801  PyObject *resultobj = 0;
4803  operations_research::MPSolutionResponse *arg2 = 0 ;
4804  double arg3 ;
4805  void *argp1 = 0 ;
4806  int res1 = 0 ;
4807  double val3 ;
4808  int ecode3 = 0 ;
4809  bool result;
4810 
4811  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
4812  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4813  if (!SWIG_IsOK(res1)) {
4814  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_LoadSolutionFromProto" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
4815  }
4816  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4817  {
4818  arg2 = new operations_research::MPSolutionResponse;
4819  PyObject* const pyresult = PyObject_CallMethod(
4820  swig_obj[1], const_cast<char*>("SerializeToString"), nullptr);
4821  if (pyresult != nullptr) {
4822  char* buffer = nullptr;
4823  Py_ssize_t length = 0;
4824  int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
4825  if (buffer != nullptr) {
4826  arg2->ParseFromArray(buffer, length);
4827  }
4828  Py_DECREF(pyresult);
4829  }
4830  }
4831  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
4832  if (!SWIG_IsOK(ecode3)) {
4833  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Solver_LoadSolutionFromProto" "', argument " "3"" of type '" "double""'");
4834  }
4835  arg3 = static_cast< double >(val3);
4836  result = (bool)operations_research_MPSolver_LoadSolutionFromProto__SWIG_0(arg1,(operations_research::MPSolutionResponse const &)*arg2,arg3);
4837  resultobj = SWIG_From_bool(static_cast< bool >(result));
4838  {
4839  delete arg2;
4840  }
4841  return resultobj;
4842 fail:
4843  {
4844  delete arg2;
4845  }
4846  return NULL;
4847 }
4848 
4849 
4850 SWIGINTERN PyObject *_wrap_Solver_LoadSolutionFromProto__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
4851  PyObject *resultobj = 0;
4853  operations_research::MPSolutionResponse *arg2 = 0 ;
4854  void *argp1 = 0 ;
4855  int res1 = 0 ;
4856  bool result;
4857 
4858  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
4859  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4860  if (!SWIG_IsOK(res1)) {
4861  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_LoadSolutionFromProto" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
4862  }
4863  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4864  {
4865  arg2 = new operations_research::MPSolutionResponse;
4866  PyObject* const pyresult = PyObject_CallMethod(
4867  swig_obj[1], const_cast<char*>("SerializeToString"), nullptr);
4868  if (pyresult != nullptr) {
4869  char* buffer = nullptr;
4870  Py_ssize_t length = 0;
4871  int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
4872  if (buffer != nullptr) {
4873  arg2->ParseFromArray(buffer, length);
4874  }
4875  Py_DECREF(pyresult);
4876  }
4877  }
4878  result = (bool)operations_research_MPSolver_LoadSolutionFromProto__SWIG_0(arg1,(operations_research::MPSolutionResponse const &)*arg2);
4879  resultobj = SWIG_From_bool(static_cast< bool >(result));
4880  {
4881  delete arg2;
4882  }
4883  return resultobj;
4884 fail:
4885  {
4886  delete arg2;
4887  }
4888  return NULL;
4889 }
4890 
4891 
4892 SWIGINTERN PyObject *_wrap_Solver_LoadSolutionFromProto(PyObject *self, PyObject *args) {
4893  Py_ssize_t argc;
4894  PyObject *argv[4] = {
4895  0
4896  };
4897 
4898  if (!(argc = SWIG_Python_UnpackTuple(args, "Solver_LoadSolutionFromProto", 0, 3, argv))) SWIG_fail;
4899  --argc;
4900  if (argc == 2) {
4901  int _v;
4902  void *vptr = 0;
4903  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_operations_research__MPSolver, 0);
4904  _v = SWIG_CheckState(res);
4905  if (_v) {
4906  {
4907  bool ok = false;
4908  PyObject* const module = PyImport_ImportModule("ortools.linear_solver.linear_solver_pb2");
4909  if (module != nullptr) {
4910  PyObject* const dict = PyModule_GetDict(module);
4911  if (dict != nullptr) {
4912  PyObject* const clss = PyDict_GetItemString(dict, "MPSolutionResponse");
4913  if (clss != nullptr) {
4914  if (PyObject_IsInstance(argv[1], clss)) {
4915  ok = true;
4916  }
4917  }
4918  }
4919  Py_DECREF(module);
4920  }
4921  _v = ok ? 1 : 0;
4922  }
4923  if (_v) {
4924  return _wrap_Solver_LoadSolutionFromProto__SWIG_1(self, argc, argv);
4925  }
4926  }
4927  }
4928  if (argc == 3) {
4929  int _v;
4930  void *vptr = 0;
4931  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_operations_research__MPSolver, 0);
4932  _v = SWIG_CheckState(res);
4933  if (_v) {
4934  {
4935  bool ok = false;
4936  PyObject* const module = PyImport_ImportModule("ortools.linear_solver.linear_solver_pb2");
4937  if (module != nullptr) {
4938  PyObject* const dict = PyModule_GetDict(module);
4939  if (dict != nullptr) {
4940  PyObject* const clss = PyDict_GetItemString(dict, "MPSolutionResponse");
4941  if (clss != nullptr) {
4942  if (PyObject_IsInstance(argv[1], clss)) {
4943  ok = true;
4944  }
4945  }
4946  }
4947  Py_DECREF(module);
4948  }
4949  _v = ok ? 1 : 0;
4950  }
4951  if (_v) {
4952  {
4953  int res = SWIG_AsVal_double(argv[2], NULL);
4954  _v = SWIG_CheckState(res);
4955  }
4956  if (_v) {
4957  return _wrap_Solver_LoadSolutionFromProto__SWIG_0(self, argc, argv);
4958  }
4959  }
4960  }
4961  }
4962 
4963 fail:
4964  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Solver_LoadSolutionFromProto'.\n"
4965  " Possible C/C++ prototypes are:\n"
4966  " operations_research::MPSolver::LoadSolutionFromProto(operations_research::MPSolutionResponse const &,double)\n"
4967  " operations_research::MPSolver::LoadSolutionFromProto(operations_research::MPSolutionResponse const &)\n");
4968  return 0;
4969 }
4970 
4971 
4972 SWIGINTERN PyObject *_wrap_Solver_ExportModelAsLpFormat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4973  PyObject *resultobj = 0;
4975  bool arg2 ;
4976  void *argp1 = 0 ;
4977  int res1 = 0 ;
4978  bool val2 ;
4979  int ecode2 = 0 ;
4980  PyObject *swig_obj[2] ;
4981  std::string result;
4982 
4983  if (!SWIG_Python_UnpackTuple(args, "Solver_ExportModelAsLpFormat", 2, 2, swig_obj)) SWIG_fail;
4984  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
4985  if (!SWIG_IsOK(res1)) {
4986  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_ExportModelAsLpFormat" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
4987  }
4988  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
4989  ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
4990  if (!SWIG_IsOK(ecode2)) {
4991  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Solver_ExportModelAsLpFormat" "', argument " "2"" of type '" "bool""'");
4992  }
4993  arg2 = static_cast< bool >(val2);
4995  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
4996  return resultobj;
4997 fail:
4998  return NULL;
4999 }
5000 
5001 
5002 SWIGINTERN PyObject *_wrap_Solver_ExportModelAsMpsFormat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5003  PyObject *resultobj = 0;
5005  bool arg2 ;
5006  bool arg3 ;
5007  void *argp1 = 0 ;
5008  int res1 = 0 ;
5009  bool val2 ;
5010  int ecode2 = 0 ;
5011  bool val3 ;
5012  int ecode3 = 0 ;
5013  PyObject *swig_obj[3] ;
5014  std::string result;
5015 
5016  if (!SWIG_Python_UnpackTuple(args, "Solver_ExportModelAsMpsFormat", 3, 3, swig_obj)) SWIG_fail;
5017  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
5018  if (!SWIG_IsOK(res1)) {
5019  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_ExportModelAsMpsFormat" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
5020  }
5021  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
5022  ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
5023  if (!SWIG_IsOK(ecode2)) {
5024  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Solver_ExportModelAsMpsFormat" "', argument " "2"" of type '" "bool""'");
5025  }
5026  arg2 = static_cast< bool >(val2);
5027  ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3);
5028  if (!SWIG_IsOK(ecode3)) {
5029  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Solver_ExportModelAsMpsFormat" "', argument " "3"" of type '" "bool""'");
5030  }
5031  arg3 = static_cast< bool >(val3);
5032  result = operations_research_MPSolver_ExportModelAsMpsFormat(arg1,arg2,arg3);
5033  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
5034  return resultobj;
5035 fail:
5036  return NULL;
5037 }
5038 
5039 
5040 SWIGINTERN PyObject *_wrap_Solver_SetHint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5041  PyObject *resultobj = 0;
5043  std::vector< operations_research::MPVariable * > *arg2 = 0 ;
5044  std::vector< double > *arg3 = 0 ;
5045  void *argp1 = 0 ;
5046  int res1 = 0 ;
5047  std::vector< operations_research::MPVariable * > temp2 ;
5048  std::vector< double > temp3 ;
5049  PyObject *swig_obj[3] ;
5050 
5051  if (!SWIG_Python_UnpackTuple(args, "Solver_SetHint", 3, 3, swig_obj)) SWIG_fail;
5052  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
5053  if (!SWIG_IsOK(res1)) {
5054  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_SetHint" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
5055  }
5056  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
5057  {
5058  if (!vector_input_helper(swig_obj[1], &temp2, PyObjAs<operations_research::MPVariable*>)) {
5059  if (!PyErr_Occurred())
5060  SWIG_Error(SWIG_TypeError, "sequence(operations_research::MPVariable*) expected");
5061  return NULL;
5062  }
5063  arg2 = &temp2;
5064  }
5065  {
5066  if (!vector_input_helper(swig_obj[2], &temp3, PyObjAs<double>)) {
5067  if (!PyErr_Occurred())
5068  SWIG_Error(SWIG_TypeError, "sequence(double) expected");
5069  return NULL;
5070  }
5071  arg3 = &temp3;
5072  }
5073  operations_research_MPSolver_SetHint(arg1,(std::vector< operations_research::MPVariable * > const &)*arg2,(std::vector< double > const &)*arg3);
5074  resultobj = SWIG_Py_Void();
5075  return resultobj;
5076 fail:
5077  return NULL;
5078 }
5079 
5080 
5081 SWIGINTERN PyObject *_wrap_Solver_SetNumThreads(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5082  PyObject *resultobj = 0;
5084  int arg2 ;
5085  void *argp1 = 0 ;
5086  int res1 = 0 ;
5087  int val2 ;
5088  int ecode2 = 0 ;
5089  PyObject *swig_obj[2] ;
5090  bool result;
5091 
5092  if (!SWIG_Python_UnpackTuple(args, "Solver_SetNumThreads", 2, 2, swig_obj)) SWIG_fail;
5093  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
5094  if (!SWIG_IsOK(res1)) {
5095  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_SetNumThreads" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
5096  }
5097  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
5098  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
5099  if (!SWIG_IsOK(ecode2)) {
5100  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Solver_SetNumThreads" "', argument " "2"" of type '" "int""'");
5101  }
5102  arg2 = static_cast< int >(val2);
5103  result = (bool)operations_research_MPSolver_SetNumThreads(arg1,arg2);
5104  resultobj = SWIG_From_bool(static_cast< bool >(result));
5105  return resultobj;
5106 fail:
5107  return NULL;
5108 }
5109 
5110 
5111 SWIGINTERN PyObject *_wrap_Solver_Infinity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5112  PyObject *resultobj = 0;
5113  double result;
5114 
5115  if (!SWIG_Python_UnpackTuple(args, "Solver_Infinity", 0, 0, 0)) SWIG_fail;
5116  result = (double)operations_research_MPSolver_Infinity();
5117  resultobj = SWIG_From_double(static_cast< double >(result));
5118  return resultobj;
5119 fail:
5120  return NULL;
5121 }
5122 
5123 
5124 SWIGINTERN PyObject *_wrap_Solver_SetTimeLimit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5125  PyObject *resultobj = 0;
5127  int64_t arg2 ;
5128  void *argp1 = 0 ;
5129  int res1 = 0 ;
5130  long val2 ;
5131  int ecode2 = 0 ;
5132  PyObject *swig_obj[2] ;
5133 
5134  if (!SWIG_Python_UnpackTuple(args, "Solver_SetTimeLimit", 2, 2, swig_obj)) SWIG_fail;
5135  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
5136  if (!SWIG_IsOK(res1)) {
5137  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_SetTimeLimit" "', argument " "1"" of type '" "operations_research::MPSolver *""'");
5138  }
5139  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
5140  ecode2 = SWIG_AsVal_long(swig_obj[1], &val2);
5141  if (!SWIG_IsOK(ecode2)) {
5142  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Solver_SetTimeLimit" "', argument " "2"" of type '" "int64_t""'");
5143  }
5144  arg2 = static_cast< int64_t >(val2);
5146  resultobj = SWIG_Py_Void();
5147  return resultobj;
5148 fail:
5149  return NULL;
5150 }
5151 
5152 
5153 SWIGINTERN PyObject *_wrap_Solver_WallTime(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5154  PyObject *resultobj = 0;
5156  void *argp1 = 0 ;
5157  int res1 = 0 ;
5158  PyObject *swig_obj[1] ;
5159  int64_t result;
5160 
5161  if (!args) SWIG_fail;
5162  swig_obj[0] = args;
5163  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
5164  if (!SWIG_IsOK(res1)) {
5165  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_WallTime" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
5166  }
5167  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
5169  resultobj = SWIG_From_long(static_cast< long >(result));
5170  return resultobj;
5171 fail:
5172  return NULL;
5173 }
5174 
5175 
5176 SWIGINTERN PyObject *_wrap_Solver_Iterations(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5177  PyObject *resultobj = 0;
5179  void *argp1 = 0 ;
5180  int res1 = 0 ;
5181  PyObject *swig_obj[1] ;
5182  int64_t result;
5183 
5184  if (!args) SWIG_fail;
5185  swig_obj[0] = args;
5186  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolver, 0 | 0 );
5187  if (!SWIG_IsOK(res1)) {
5188  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Solver_Iterations" "', argument " "1"" of type '" "operations_research::MPSolver const *""'");
5189  }
5190  arg1 = reinterpret_cast< operations_research::MPSolver * >(argp1);
5192  resultobj = SWIG_From_long(static_cast< long >(result));
5193  return resultobj;
5194 fail:
5195  return NULL;
5196 }
5197 
5198 
5199 SWIGINTERN PyObject *Solver_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5200  PyObject *obj;
5201  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
5203  return SWIG_Py_Void();
5204 }
5205 
5206 SWIGINTERN PyObject *Solver_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5207  return SWIG_Python_InitShadowInstance(args);
5208 }
5209 
5210 SWIGINTERN PyObject *_wrap___lshift____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
5211  PyObject *resultobj = 0;
5212  std::ostream *arg1 = 0 ;
5214  void *argp1 = 0 ;
5215  int res1 = 0 ;
5216  int val2 ;
5217  int ecode2 = 0 ;
5218  std::ostream *result = 0 ;
5219 
5220  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
5221  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_std__ostream, 0 );
5222  if (!SWIG_IsOK(res1)) {
5223  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__lshift__" "', argument " "1"" of type '" "std::ostream &""'");
5224  }
5225  if (!argp1) {
5226  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__lshift__" "', argument " "1"" of type '" "std::ostream &""'");
5227  }
5228  arg1 = reinterpret_cast< std::ostream * >(argp1);
5229  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
5230  if (!SWIG_IsOK(ecode2)) {
5231  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "__lshift__" "', argument " "2"" of type '" "operations_research::MPSolver::OptimizationProblemType""'");
5232  }
5233  arg2 = static_cast< operations_research::MPSolver::OptimizationProblemType >(val2);
5234  result = (std::ostream *) &operations_research::operator <<(*arg1,arg2);
5235  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__ostream, 0 | 0 );
5236  return resultobj;
5237 fail:
5238  PyErr_Clear();
5239  Py_INCREF(Py_NotImplemented);
5240  return Py_NotImplemented;
5241 }
5242 
5243 
5244 SWIGINTERN PyObject *_wrap___lshift____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
5245  PyObject *resultobj = 0;
5246  std::ostream *arg1 = 0 ;
5248  void *argp1 = 0 ;
5249  int res1 = 0 ;
5250  int val2 ;
5251  int ecode2 = 0 ;
5252  std::ostream *result = 0 ;
5253 
5254  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
5255  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_std__ostream, 0 );
5256  if (!SWIG_IsOK(res1)) {
5257  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__lshift__" "', argument " "1"" of type '" "std::ostream &""'");
5258  }
5259  if (!argp1) {
5260  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__lshift__" "', argument " "1"" of type '" "std::ostream &""'");
5261  }
5262  arg1 = reinterpret_cast< std::ostream * >(argp1);
5263  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
5264  if (!SWIG_IsOK(ecode2)) {
5265  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "__lshift__" "', argument " "2"" of type '" "operations_research::MPSolver::ResultStatus""'");
5266  }
5267  arg2 = static_cast< operations_research::MPSolver::ResultStatus >(val2);
5268  result = (std::ostream *) &operations_research::operator <<(*arg1,arg2);
5269  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__ostream, 0 | 0 );
5270  return resultobj;
5271 fail:
5272  PyErr_Clear();
5273  Py_INCREF(Py_NotImplemented);
5274  return Py_NotImplemented;
5275 }
5276 
5277 
5278 SWIGINTERN PyObject *_wrap___lshift__(PyObject *self, PyObject *args) {
5279  Py_ssize_t argc;
5280  PyObject *argv[3] = {
5281  0
5282  };
5283 
5284  if (!(argc = SWIG_Python_UnpackTuple(args, "__lshift__", 0, 2, argv))) SWIG_fail;
5285  --argc;
5286  if (argc == 2) {
5287  int _v;
5288  void *vptr = 0;
5289  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__ostream, SWIG_POINTER_NO_NULL);
5290  _v = SWIG_CheckState(res);
5291  if (_v) {
5292  {
5293  int res = SWIG_AsVal_int(argv[1], NULL);
5294  _v = SWIG_CheckState(res);
5295  }
5296  if (_v) {
5297  return _wrap___lshift____SWIG_0(self, argc, argv);
5298  }
5299  }
5300  }
5301  if (argc == 2) {
5302  int _v;
5303  void *vptr = 0;
5304  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__ostream, SWIG_POINTER_NO_NULL);
5305  _v = SWIG_CheckState(res);
5306  if (_v) {
5307  {
5308  int res = SWIG_AsVal_int(argv[1], NULL);
5309  _v = SWIG_CheckState(res);
5310  }
5311  if (_v) {
5312  return _wrap___lshift____SWIG_1(self, argc, argv);
5313  }
5314  }
5315  }
5316 
5317 fail:
5318  Py_INCREF(Py_NotImplemented);
5319  return Py_NotImplemented;
5320 }
5321 
5322 
5323 SWIGINTERN PyObject *_wrap_Objective_Clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5324  PyObject *resultobj = 0;
5326  void *argp1 = 0 ;
5327  int res1 = 0 ;
5328  PyObject *swig_obj[1] ;
5329 
5330  if (!args) SWIG_fail;
5331  swig_obj[0] = args;
5332  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPObjective, 0 | 0 );
5333  if (!SWIG_IsOK(res1)) {
5334  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Objective_Clear" "', argument " "1"" of type '" "operations_research::MPObjective *""'");
5335  }
5336  arg1 = reinterpret_cast< operations_research::MPObjective * >(argp1);
5337  (arg1)->Clear();
5338  resultobj = SWIG_Py_Void();
5339  return resultobj;
5340 fail:
5341  return NULL;
5342 }
5343 
5344 
5345 SWIGINTERN PyObject *_wrap_Objective_SetCoefficient(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5346  PyObject *resultobj = 0;
5349  double arg3 ;
5350  void *argp1 = 0 ;
5351  int res1 = 0 ;
5352  double val3 ;
5353  int ecode3 = 0 ;
5354  PyObject *swig_obj[3] ;
5355 
5356  if (!SWIG_Python_UnpackTuple(args, "Objective_SetCoefficient", 3, 3, 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_SetCoefficient" "', argument " "1"" of type '" "operations_research::MPObjective *""'");
5360  }
5361  arg1 = reinterpret_cast< operations_research::MPObjective * >(argp1);
5362  {
5363  if (!PyObjAs(swig_obj[1], &arg2)) SWIG_fail;
5364  }
5365  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
5366  if (!SWIG_IsOK(ecode3)) {
5367  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Objective_SetCoefficient" "', argument " "3"" of type '" "double""'");
5368  }
5369  arg3 = static_cast< double >(val3);
5370  (arg1)->SetCoefficient((operations_research::MPVariable const *)arg2,arg3);
5371  resultobj = SWIG_Py_Void();
5372  return resultobj;
5373 fail:
5374  return NULL;
5375 }
5376 
5377 
5378 SWIGINTERN PyObject *_wrap_Objective_GetCoefficient(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5379  PyObject *resultobj = 0;
5382  void *argp1 = 0 ;
5383  int res1 = 0 ;
5384  PyObject *swig_obj[2] ;
5385  double result;
5386 
5387  if (!SWIG_Python_UnpackTuple(args, "Objective_GetCoefficient", 2, 2, swig_obj)) SWIG_fail;
5388  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPObjective, 0 | 0 );
5389  if (!SWIG_IsOK(res1)) {
5390  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Objective_GetCoefficient" "', argument " "1"" of type '" "operations_research::MPObjective const *""'");
5391  }
5392  arg1 = reinterpret_cast< operations_research::MPObjective * >(argp1);
5393  {
5394  if (!PyObjAs(swig_obj[1], &arg2)) SWIG_fail;
5395  }
5396  result = (double)((operations_research::MPObjective const *)arg1)->GetCoefficient((operations_research::MPVariable const *)arg2);
5397  resultobj = SWIG_From_double(static_cast< double >(result));
5398  return resultobj;
5399 fail:
5400  return NULL;
5401 }
5402 
5403 
5404 SWIGINTERN PyObject *_wrap_Objective_SetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5405  PyObject *resultobj = 0;
5407  double arg2 ;
5408  void *argp1 = 0 ;
5409  int res1 = 0 ;
5410  double val2 ;
5411  int ecode2 = 0 ;
5412  PyObject *swig_obj[2] ;
5413 
5414  if (!SWIG_Python_UnpackTuple(args, "Objective_SetOffset", 2, 2, swig_obj)) SWIG_fail;
5415  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPObjective, 0 | 0 );
5416  if (!SWIG_IsOK(res1)) {
5417  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Objective_SetOffset" "', argument " "1"" of type '" "operations_research::MPObjective *""'");
5418  }
5419  arg1 = reinterpret_cast< operations_research::MPObjective * >(argp1);
5420  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
5421  if (!SWIG_IsOK(ecode2)) {
5422  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Objective_SetOffset" "', argument " "2"" of type '" "double""'");
5423  }
5424  arg2 = static_cast< double >(val2);
5425  (arg1)->SetOffset(arg2);
5426  resultobj = SWIG_Py_Void();
5427  return resultobj;
5428 fail:
5429  return NULL;
5430 }
5431 
5432 
5433 SWIGINTERN PyObject *_wrap_Objective_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5434  PyObject *resultobj = 0;
5436  void *argp1 = 0 ;
5437  int res1 = 0 ;
5438  PyObject *swig_obj[1] ;
5439  double result;
5440 
5441  if (!args) SWIG_fail;
5442  swig_obj[0] = args;
5443  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPObjective, 0 | 0 );
5444  if (!SWIG_IsOK(res1)) {
5445  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Objective_offset" "', argument " "1"" of type '" "operations_research::MPObjective const *""'");
5446  }
5447  arg1 = reinterpret_cast< operations_research::MPObjective * >(argp1);
5448  result = (double)((operations_research::MPObjective const *)arg1)->offset();
5449  resultobj = SWIG_From_double(static_cast< double >(result));
5450  return resultobj;
5451 fail:
5452  return NULL;
5453 }
5454 
5455 
5456 SWIGINTERN PyObject *_wrap_Objective_SetOptimizationDirection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5457  PyObject *resultobj = 0;
5459  bool arg2 ;
5460  void *argp1 = 0 ;
5461  int res1 = 0 ;
5462  bool val2 ;
5463  int ecode2 = 0 ;
5464  PyObject *swig_obj[2] ;
5465 
5466  if (!SWIG_Python_UnpackTuple(args, "Objective_SetOptimizationDirection", 2, 2, swig_obj)) SWIG_fail;
5467  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPObjective, 0 | 0 );
5468  if (!SWIG_IsOK(res1)) {
5469  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Objective_SetOptimizationDirection" "', argument " "1"" of type '" "operations_research::MPObjective *""'");
5470  }
5471  arg1 = reinterpret_cast< operations_research::MPObjective * >(argp1);
5472  ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
5473  if (!SWIG_IsOK(ecode2)) {
5474  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Objective_SetOptimizationDirection" "', argument " "2"" of type '" "bool""'");
5475  }
5476  arg2 = static_cast< bool >(val2);
5477  (arg1)->SetOptimizationDirection(arg2);
5478  resultobj = SWIG_Py_Void();
5479  return resultobj;
5480 fail:
5481  return NULL;
5482 }
5483 
5484 
5485 SWIGINTERN PyObject *_wrap_Objective_SetMinimization(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5486  PyObject *resultobj = 0;
5488  void *argp1 = 0 ;
5489  int res1 = 0 ;
5490  PyObject *swig_obj[1] ;
5491 
5492  if (!args) SWIG_fail;
5493  swig_obj[0] = args;
5494  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPObjective, 0 | 0 );
5495  if (!SWIG_IsOK(res1)) {
5496  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Objective_SetMinimization" "', argument " "1"" of type '" "operations_research::MPObjective *""'");
5497  }
5498  arg1 = reinterpret_cast< operations_research::MPObjective * >(argp1);
5499  (arg1)->SetMinimization();
5500  resultobj = SWIG_Py_Void();
5501  return resultobj;
5502 fail:
5503  return NULL;
5504 }
5505 
5506 
5507 SWIGINTERN PyObject *_wrap_Objective_SetMaximization(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5508  PyObject *resultobj = 0;
5510  void *argp1 = 0 ;
5511  int res1 = 0 ;
5512  PyObject *swig_obj[1] ;
5513 
5514  if (!args) SWIG_fail;
5515  swig_obj[0] = args;
5516  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPObjective, 0 | 0 );
5517  if (!SWIG_IsOK(res1)) {
5518  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Objective_SetMaximization" "', argument " "1"" of type '" "operations_research::MPObjective *""'");
5519  }
5520  arg1 = reinterpret_cast< operations_research::MPObjective * >(argp1);
5521  (arg1)->SetMaximization();
5522  resultobj = SWIG_Py_Void();
5523  return resultobj;
5524 fail:
5525  return NULL;
5526 }
5527 
5528 
5529 SWIGINTERN PyObject *_wrap_Objective_maximization(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5530  PyObject *resultobj = 0;
5532  void *argp1 = 0 ;
5533  int res1 = 0 ;
5534  PyObject *swig_obj[1] ;
5535  bool result;
5536 
5537  if (!args) SWIG_fail;
5538  swig_obj[0] = args;
5539  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPObjective, 0 | 0 );
5540  if (!SWIG_IsOK(res1)) {
5541  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Objective_maximization" "', argument " "1"" of type '" "operations_research::MPObjective const *""'");
5542  }
5543  arg1 = reinterpret_cast< operations_research::MPObjective * >(argp1);
5544  result = (bool)((operations_research::MPObjective const *)arg1)->maximization();
5545  resultobj = SWIG_From_bool(static_cast< bool >(result));
5546  return resultobj;
5547 fail:
5548  return NULL;
5549 }
5550 
5551 
5552 SWIGINTERN PyObject *_wrap_Objective_minimization(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5553  PyObject *resultobj = 0;
5555  void *argp1 = 0 ;
5556  int res1 = 0 ;
5557  PyObject *swig_obj[1] ;
5558  bool result;
5559 
5560  if (!args) SWIG_fail;
5561  swig_obj[0] = args;
5562  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPObjective, 0 | 0 );
5563  if (!SWIG_IsOK(res1)) {
5564  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Objective_minimization" "', argument " "1"" of type '" "operations_research::MPObjective const *""'");
5565  }
5566  arg1 = reinterpret_cast< operations_research::MPObjective * >(argp1);
5567  result = (bool)((operations_research::MPObjective const *)arg1)->minimization();
5568  resultobj = SWIG_From_bool(static_cast< bool >(result));
5569  return resultobj;
5570 fail:
5571  return NULL;
5572 }
5573 
5574 
5575 SWIGINTERN PyObject *_wrap_Objective_Value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5576  PyObject *resultobj = 0;
5578  void *argp1 = 0 ;
5579  int res1 = 0 ;
5580  PyObject *swig_obj[1] ;
5581  double result;
5582 
5583  if (!args) SWIG_fail;
5584  swig_obj[0] = args;
5585  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPObjective, 0 | 0 );
5586  if (!SWIG_IsOK(res1)) {
5587  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Objective_Value" "', argument " "1"" of type '" "operations_research::MPObjective const *""'");
5588  }
5589  arg1 = reinterpret_cast< operations_research::MPObjective * >(argp1);
5590  result = (double)((operations_research::MPObjective const *)arg1)->Value();
5591  resultobj = SWIG_From_double(static_cast< double >(result));
5592  return resultobj;
5593 fail:
5594  return NULL;
5595 }
5596 
5597 
5598 SWIGINTERN PyObject *_wrap_Objective_BestBound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5599  PyObject *resultobj = 0;
5601  void *argp1 = 0 ;
5602  int res1 = 0 ;
5603  PyObject *swig_obj[1] ;
5604  double result;
5605 
5606  if (!args) SWIG_fail;
5607  swig_obj[0] = args;
5608  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPObjective, 0 | 0 );
5609  if (!SWIG_IsOK(res1)) {
5610  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Objective_BestBound" "', argument " "1"" of type '" "operations_research::MPObjective const *""'");
5611  }
5612  arg1 = reinterpret_cast< operations_research::MPObjective * >(argp1);
5613  result = (double)((operations_research::MPObjective const *)arg1)->BestBound();
5614  resultobj = SWIG_From_double(static_cast< double >(result));
5615  return resultobj;
5616 fail:
5617  return NULL;
5618 }
5619 
5620 
5621 SWIGINTERN PyObject *_wrap_Objective_Offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5622  PyObject *resultobj = 0;
5624  void *argp1 = 0 ;
5625  int res1 = 0 ;
5626  PyObject *swig_obj[1] ;
5627  double result;
5628 
5629  if (!args) SWIG_fail;
5630  swig_obj[0] = args;
5631  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPObjective, 0 | 0 );
5632  if (!SWIG_IsOK(res1)) {
5633  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Objective_Offset" "', argument " "1"" of type '" "operations_research::MPObjective const *""'");
5634  }
5635  arg1 = reinterpret_cast< operations_research::MPObjective * >(argp1);
5637  resultobj = SWIG_From_double(static_cast< double >(result));
5638  return resultobj;
5639 fail:
5640  return NULL;
5641 }
5642 
5643 
5644 SWIGINTERN PyObject *_wrap_delete_Objective(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5645  PyObject *resultobj = 0;
5647  void *argp1 = 0 ;
5648  int res1 = 0 ;
5649  PyObject *swig_obj[1] ;
5650 
5651  if (!args) SWIG_fail;
5652  swig_obj[0] = args;
5654  if (!SWIG_IsOK(res1)) {
5655  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Objective" "', argument " "1"" of type '" "operations_research::MPObjective *""'");
5656  }
5657  arg1 = reinterpret_cast< operations_research::MPObjective * >(argp1);
5658  delete arg1;
5659  resultobj = SWIG_Py_Void();
5660  return resultobj;
5661 fail:
5662  return NULL;
5663 }
5664 
5665 
5666 SWIGINTERN PyObject *Objective_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5667  PyObject *obj;
5668  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
5670  return SWIG_Py_Void();
5671 }
5672 
5673 SWIGINTERN PyObject *_wrap_Variable_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5674  PyObject *resultobj = 0;
5676  void *argp1 = 0 ;
5677  int res1 = 0 ;
5678  PyObject *swig_obj[1] ;
5679  std::string *result = 0 ;
5680 
5681  if (!args) SWIG_fail;
5682  swig_obj[0] = args;
5683  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
5684  if (!SWIG_IsOK(res1)) {
5685  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_name" "', argument " "1"" of type '" "operations_research::MPVariable const *""'");
5686  }
5687  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
5688  result = (std::string *) &((operations_research::MPVariable const *)arg1)->name();
5689  resultobj = SWIG_From_std_string(static_cast< std::string >(*result));
5690  return resultobj;
5691 fail:
5692  return NULL;
5693 }
5694 
5695 
5696 SWIGINTERN PyObject *_wrap_Variable_SetInteger(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5697  PyObject *resultobj = 0;
5699  bool arg2 ;
5700  void *argp1 = 0 ;
5701  int res1 = 0 ;
5702  bool val2 ;
5703  int ecode2 = 0 ;
5704  PyObject *swig_obj[2] ;
5705 
5706  if (!SWIG_Python_UnpackTuple(args, "Variable_SetInteger", 2, 2, swig_obj)) SWIG_fail;
5707  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
5708  if (!SWIG_IsOK(res1)) {
5709  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_SetInteger" "', argument " "1"" of type '" "operations_research::MPVariable *""'");
5710  }
5711  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
5712  ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
5713  if (!SWIG_IsOK(ecode2)) {
5714  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Variable_SetInteger" "', argument " "2"" of type '" "bool""'");
5715  }
5716  arg2 = static_cast< bool >(val2);
5717  (arg1)->SetInteger(arg2);
5718  resultobj = SWIG_Py_Void();
5719  return resultobj;
5720 fail:
5721  return NULL;
5722 }
5723 
5724 
5725 SWIGINTERN PyObject *_wrap_Variable_integer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5726  PyObject *resultobj = 0;
5728  void *argp1 = 0 ;
5729  int res1 = 0 ;
5730  PyObject *swig_obj[1] ;
5731  bool result;
5732 
5733  if (!args) SWIG_fail;
5734  swig_obj[0] = args;
5735  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
5736  if (!SWIG_IsOK(res1)) {
5737  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_integer" "', argument " "1"" of type '" "operations_research::MPVariable const *""'");
5738  }
5739  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
5740  result = (bool)((operations_research::MPVariable const *)arg1)->integer();
5741  resultobj = SWIG_From_bool(static_cast< bool >(result));
5742  return resultobj;
5743 fail:
5744  return NULL;
5745 }
5746 
5747 
5748 SWIGINTERN PyObject *_wrap_Variable_solution_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5749  PyObject *resultobj = 0;
5751  void *argp1 = 0 ;
5752  int res1 = 0 ;
5753  PyObject *swig_obj[1] ;
5754  double result;
5755 
5756  if (!args) SWIG_fail;
5757  swig_obj[0] = args;
5758  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
5759  if (!SWIG_IsOK(res1)) {
5760  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_solution_value" "', argument " "1"" of type '" "operations_research::MPVariable const *""'");
5761  }
5762  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
5763  result = (double)((operations_research::MPVariable const *)arg1)->solution_value();
5764  resultobj = SWIG_From_double(static_cast< double >(result));
5765  return resultobj;
5766 fail:
5767  return NULL;
5768 }
5769 
5770 
5771 SWIGINTERN PyObject *_wrap_Variable_index(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5772  PyObject *resultobj = 0;
5774  void *argp1 = 0 ;
5775  int res1 = 0 ;
5776  PyObject *swig_obj[1] ;
5777  int result;
5778 
5779  if (!args) SWIG_fail;
5780  swig_obj[0] = args;
5781  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
5782  if (!SWIG_IsOK(res1)) {
5783  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_index" "', argument " "1"" of type '" "operations_research::MPVariable const *""'");
5784  }
5785  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
5786  result = (int)((operations_research::MPVariable const *)arg1)->index();
5787  resultobj = SWIG_From_int(static_cast< int >(result));
5788  return resultobj;
5789 fail:
5790  return NULL;
5791 }
5792 
5793 
5794 SWIGINTERN PyObject *_wrap_Variable_lb(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5795  PyObject *resultobj = 0;
5797  void *argp1 = 0 ;
5798  int res1 = 0 ;
5799  PyObject *swig_obj[1] ;
5800  double result;
5801 
5802  if (!args) SWIG_fail;
5803  swig_obj[0] = args;
5804  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
5805  if (!SWIG_IsOK(res1)) {
5806  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_lb" "', argument " "1"" of type '" "operations_research::MPVariable const *""'");
5807  }
5808  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
5809  result = (double)((operations_research::MPVariable const *)arg1)->lb();
5810  resultobj = SWIG_From_double(static_cast< double >(result));
5811  return resultobj;
5812 fail:
5813  return NULL;
5814 }
5815 
5816 
5817 SWIGINTERN PyObject *_wrap_Variable_ub(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5818  PyObject *resultobj = 0;
5820  void *argp1 = 0 ;
5821  int res1 = 0 ;
5822  PyObject *swig_obj[1] ;
5823  double result;
5824 
5825  if (!args) SWIG_fail;
5826  swig_obj[0] = args;
5827  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
5828  if (!SWIG_IsOK(res1)) {
5829  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_ub" "', argument " "1"" of type '" "operations_research::MPVariable const *""'");
5830  }
5831  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
5832  result = (double)((operations_research::MPVariable const *)arg1)->ub();
5833  resultobj = SWIG_From_double(static_cast< double >(result));
5834  return resultobj;
5835 fail:
5836  return NULL;
5837 }
5838 
5839 
5840 SWIGINTERN PyObject *_wrap_Variable_SetBounds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5841  PyObject *resultobj = 0;
5843  double arg2 ;
5844  double arg3 ;
5845  void *argp1 = 0 ;
5846  int res1 = 0 ;
5847  double val2 ;
5848  int ecode2 = 0 ;
5849  double val3 ;
5850  int ecode3 = 0 ;
5851  PyObject *swig_obj[3] ;
5852 
5853  if (!SWIG_Python_UnpackTuple(args, "Variable_SetBounds", 3, 3, swig_obj)) SWIG_fail;
5854  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
5855  if (!SWIG_IsOK(res1)) {
5856  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_SetBounds" "', argument " "1"" of type '" "operations_research::MPVariable *""'");
5857  }
5858  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
5859  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
5860  if (!SWIG_IsOK(ecode2)) {
5861  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Variable_SetBounds" "', argument " "2"" of type '" "double""'");
5862  }
5863  arg2 = static_cast< double >(val2);
5864  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
5865  if (!SWIG_IsOK(ecode3)) {
5866  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Variable_SetBounds" "', argument " "3"" of type '" "double""'");
5867  }
5868  arg3 = static_cast< double >(val3);
5869  (arg1)->SetBounds(arg2,arg3);
5870  resultobj = SWIG_Py_Void();
5871  return resultobj;
5872 fail:
5873  return NULL;
5874 }
5875 
5876 
5877 SWIGINTERN PyObject *_wrap_Variable_reduced_cost(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5878  PyObject *resultobj = 0;
5880  void *argp1 = 0 ;
5881  int res1 = 0 ;
5882  PyObject *swig_obj[1] ;
5883  double result;
5884 
5885  if (!args) SWIG_fail;
5886  swig_obj[0] = args;
5887  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
5888  if (!SWIG_IsOK(res1)) {
5889  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_reduced_cost" "', argument " "1"" of type '" "operations_research::MPVariable const *""'");
5890  }
5891  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
5892  result = (double)((operations_research::MPVariable const *)arg1)->reduced_cost();
5893  resultobj = SWIG_From_double(static_cast< double >(result));
5894  return resultobj;
5895 fail:
5896  return NULL;
5897 }
5898 
5899 
5900 SWIGINTERN PyObject *_wrap_Variable_basis_status(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5901  PyObject *resultobj = 0;
5903  void *argp1 = 0 ;
5904  int res1 = 0 ;
5905  PyObject *swig_obj[1] ;
5907 
5908  if (!args) SWIG_fail;
5909  swig_obj[0] = args;
5910  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
5911  if (!SWIG_IsOK(res1)) {
5912  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_basis_status" "', argument " "1"" of type '" "operations_research::MPVariable const *""'");
5913  }
5914  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
5915  result = (operations_research::MPSolver::BasisStatus)((operations_research::MPVariable const *)arg1)->basis_status();
5916  resultobj = SWIG_From_int(static_cast< int >(result));
5917  return resultobj;
5918 fail:
5919  return NULL;
5920 }
5921 
5922 
5923 SWIGINTERN PyObject *_wrap_Variable_branching_priority(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5924  PyObject *resultobj = 0;
5926  void *argp1 = 0 ;
5927  int res1 = 0 ;
5928  PyObject *swig_obj[1] ;
5929  int result;
5930 
5931  if (!args) SWIG_fail;
5932  swig_obj[0] = args;
5933  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
5934  if (!SWIG_IsOK(res1)) {
5935  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_branching_priority" "', argument " "1"" of type '" "operations_research::MPVariable const *""'");
5936  }
5937  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
5938  result = (int)((operations_research::MPVariable const *)arg1)->branching_priority();
5939  resultobj = SWIG_From_int(static_cast< int >(result));
5940  return resultobj;
5941 fail:
5942  return NULL;
5943 }
5944 
5945 
5946 SWIGINTERN PyObject *_wrap_Variable_SetBranchingPriority(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5947  PyObject *resultobj = 0;
5949  int arg2 ;
5950  void *argp1 = 0 ;
5951  int res1 = 0 ;
5952  int val2 ;
5953  int ecode2 = 0 ;
5954  PyObject *swig_obj[2] ;
5955 
5956  if (!SWIG_Python_UnpackTuple(args, "Variable_SetBranchingPriority", 2, 2, swig_obj)) SWIG_fail;
5957  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
5958  if (!SWIG_IsOK(res1)) {
5959  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_SetBranchingPriority" "', argument " "1"" of type '" "operations_research::MPVariable *""'");
5960  }
5961  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
5962  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
5963  if (!SWIG_IsOK(ecode2)) {
5964  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Variable_SetBranchingPriority" "', argument " "2"" of type '" "int""'");
5965  }
5966  arg2 = static_cast< int >(val2);
5967  (arg1)->SetBranchingPriority(arg2);
5968  resultobj = SWIG_Py_Void();
5969  return resultobj;
5970 fail:
5971  return NULL;
5972 }
5973 
5974 
5975 SWIGINTERN PyObject *_wrap_Variable___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5976  PyObject *resultobj = 0;
5978  void *argp1 = 0 ;
5979  int res1 = 0 ;
5980  PyObject *swig_obj[1] ;
5981  std::string result;
5982 
5983  if (!args) SWIG_fail;
5984  swig_obj[0] = args;
5985  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
5986  if (!SWIG_IsOK(res1)) {
5987  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable___str__" "', argument " "1"" of type '" "operations_research::MPVariable *""'");
5988  }
5989  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
5991  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
5992  return resultobj;
5993 fail:
5994  return NULL;
5995 }
5996 
5997 
5998 SWIGINTERN PyObject *_wrap_Variable___repr__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5999  PyObject *resultobj = 0;
6001  void *argp1 = 0 ;
6002  int res1 = 0 ;
6003  PyObject *swig_obj[1] ;
6004  std::string result;
6005 
6006  if (!args) SWIG_fail;
6007  swig_obj[0] = args;
6008  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
6009  if (!SWIG_IsOK(res1)) {
6010  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable___repr__" "', argument " "1"" of type '" "operations_research::MPVariable *""'");
6011  }
6012  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
6014  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
6015  return resultobj;
6016 fail:
6017  return NULL;
6018 }
6019 
6020 
6021 SWIGINTERN PyObject *_wrap_Variable_SolutionValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6022  PyObject *resultobj = 0;
6024  void *argp1 = 0 ;
6025  int res1 = 0 ;
6026  PyObject *swig_obj[1] ;
6027  double result;
6028 
6029  if (!args) SWIG_fail;
6030  swig_obj[0] = args;
6031  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
6032  if (!SWIG_IsOK(res1)) {
6033  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_SolutionValue" "', argument " "1"" of type '" "operations_research::MPVariable const *""'");
6034  }
6035  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
6037  resultobj = SWIG_From_double(static_cast< double >(result));
6038  return resultobj;
6039 fail:
6040  return NULL;
6041 }
6042 
6043 
6044 SWIGINTERN PyObject *_wrap_Variable_Integer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6045  PyObject *resultobj = 0;
6047  void *argp1 = 0 ;
6048  int res1 = 0 ;
6049  PyObject *swig_obj[1] ;
6050  bool result;
6051 
6052  if (!args) SWIG_fail;
6053  swig_obj[0] = args;
6054  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
6055  if (!SWIG_IsOK(res1)) {
6056  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_Integer" "', argument " "1"" of type '" "operations_research::MPVariable const *""'");
6057  }
6058  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
6060  resultobj = SWIG_From_bool(static_cast< bool >(result));
6061  return resultobj;
6062 fail:
6063  return NULL;
6064 }
6065 
6066 
6067 SWIGINTERN PyObject *_wrap_Variable_Lb(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6068  PyObject *resultobj = 0;
6070  void *argp1 = 0 ;
6071  int res1 = 0 ;
6072  PyObject *swig_obj[1] ;
6073  double result;
6074 
6075  if (!args) SWIG_fail;
6076  swig_obj[0] = args;
6077  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
6078  if (!SWIG_IsOK(res1)) {
6079  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_Lb" "', argument " "1"" of type '" "operations_research::MPVariable const *""'");
6080  }
6081  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
6083  resultobj = SWIG_From_double(static_cast< double >(result));
6084  return resultobj;
6085 fail:
6086  return NULL;
6087 }
6088 
6089 
6090 SWIGINTERN PyObject *_wrap_Variable_Ub(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6091  PyObject *resultobj = 0;
6093  void *argp1 = 0 ;
6094  int res1 = 0 ;
6095  PyObject *swig_obj[1] ;
6096  double result;
6097 
6098  if (!args) SWIG_fail;
6099  swig_obj[0] = args;
6100  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
6101  if (!SWIG_IsOK(res1)) {
6102  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_Ub" "', argument " "1"" of type '" "operations_research::MPVariable const *""'");
6103  }
6104  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
6106  resultobj = SWIG_From_double(static_cast< double >(result));
6107  return resultobj;
6108 fail:
6109  return NULL;
6110 }
6111 
6112 
6113 SWIGINTERN PyObject *_wrap_Variable_SetLb(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6114  PyObject *resultobj = 0;
6116  double arg2 ;
6117  void *argp1 = 0 ;
6118  int res1 = 0 ;
6119  double val2 ;
6120  int ecode2 = 0 ;
6121  PyObject *swig_obj[2] ;
6122 
6123  if (!SWIG_Python_UnpackTuple(args, "Variable_SetLb", 2, 2, swig_obj)) SWIG_fail;
6124  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
6125  if (!SWIG_IsOK(res1)) {
6126  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_SetLb" "', argument " "1"" of type '" "operations_research::MPVariable *""'");
6127  }
6128  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
6129  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
6130  if (!SWIG_IsOK(ecode2)) {
6131  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Variable_SetLb" "', argument " "2"" of type '" "double""'");
6132  }
6133  arg2 = static_cast< double >(val2);
6135  resultobj = SWIG_Py_Void();
6136  return resultobj;
6137 fail:
6138  return NULL;
6139 }
6140 
6141 
6142 SWIGINTERN PyObject *_wrap_Variable_SetUb(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6143  PyObject *resultobj = 0;
6145  double arg2 ;
6146  void *argp1 = 0 ;
6147  int res1 = 0 ;
6148  double val2 ;
6149  int ecode2 = 0 ;
6150  PyObject *swig_obj[2] ;
6151 
6152  if (!SWIG_Python_UnpackTuple(args, "Variable_SetUb", 2, 2, swig_obj)) SWIG_fail;
6153  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
6154  if (!SWIG_IsOK(res1)) {
6155  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_SetUb" "', argument " "1"" of type '" "operations_research::MPVariable *""'");
6156  }
6157  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
6158  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
6159  if (!SWIG_IsOK(ecode2)) {
6160  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Variable_SetUb" "', argument " "2"" of type '" "double""'");
6161  }
6162  arg2 = static_cast< double >(val2);
6164  resultobj = SWIG_Py_Void();
6165  return resultobj;
6166 fail:
6167  return NULL;
6168 }
6169 
6170 
6171 SWIGINTERN PyObject *_wrap_Variable_ReducedCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6172  PyObject *resultobj = 0;
6174  void *argp1 = 0 ;
6175  int res1 = 0 ;
6176  PyObject *swig_obj[1] ;
6177  double result;
6178 
6179  if (!args) SWIG_fail;
6180  swig_obj[0] = args;
6181  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPVariable, 0 | 0 );
6182  if (!SWIG_IsOK(res1)) {
6183  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Variable_ReducedCost" "', argument " "1"" of type '" "operations_research::MPVariable const *""'");
6184  }
6185  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
6187  resultobj = SWIG_From_double(static_cast< double >(result));
6188  return resultobj;
6189 fail:
6190  return NULL;
6191 }
6192 
6193 
6194 SWIGINTERN PyObject *_wrap_delete_Variable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6195  PyObject *resultobj = 0;
6197  void *argp1 = 0 ;
6198  int res1 = 0 ;
6199  PyObject *swig_obj[1] ;
6200 
6201  if (!args) SWIG_fail;
6202  swig_obj[0] = args;
6204  if (!SWIG_IsOK(res1)) {
6205  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Variable" "', argument " "1"" of type '" "operations_research::MPVariable *""'");
6206  }
6207  arg1 = reinterpret_cast< operations_research::MPVariable * >(argp1);
6208  delete arg1;
6209  resultobj = SWIG_Py_Void();
6210  return resultobj;
6211 fail:
6212  return NULL;
6213 }
6214 
6215 
6216 SWIGINTERN PyObject *Variable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6217  PyObject *obj;
6218  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
6220  return SWIG_Py_Void();
6221 }
6222 
6223 SWIGINTERN PyObject *_wrap_Constraint_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6224  PyObject *resultobj = 0;
6226  void *argp1 = 0 ;
6227  int res1 = 0 ;
6228  PyObject *swig_obj[1] ;
6229  std::string *result = 0 ;
6230 
6231  if (!args) SWIG_fail;
6232  swig_obj[0] = args;
6233  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6234  if (!SWIG_IsOK(res1)) {
6235  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_name" "', argument " "1"" of type '" "operations_research::MPConstraint const *""'");
6236  }
6237  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6238  result = (std::string *) &((operations_research::MPConstraint const *)arg1)->name();
6239  resultobj = SWIG_From_std_string(static_cast< std::string >(*result));
6240  return resultobj;
6241 fail:
6242  return NULL;
6243 }
6244 
6245 
6246 SWIGINTERN PyObject *_wrap_Constraint_Clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6247  PyObject *resultobj = 0;
6249  void *argp1 = 0 ;
6250  int res1 = 0 ;
6251  PyObject *swig_obj[1] ;
6252 
6253  if (!args) SWIG_fail;
6254  swig_obj[0] = args;
6255  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6256  if (!SWIG_IsOK(res1)) {
6257  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_Clear" "', argument " "1"" of type '" "operations_research::MPConstraint *""'");
6258  }
6259  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6260  (arg1)->Clear();
6261  resultobj = SWIG_Py_Void();
6262  return resultobj;
6263 fail:
6264  return NULL;
6265 }
6266 
6267 
6268 SWIGINTERN PyObject *_wrap_Constraint_SetCoefficient(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6269  PyObject *resultobj = 0;
6272  double arg3 ;
6273  void *argp1 = 0 ;
6274  int res1 = 0 ;
6275  double val3 ;
6276  int ecode3 = 0 ;
6277  PyObject *swig_obj[3] ;
6278 
6279  if (!SWIG_Python_UnpackTuple(args, "Constraint_SetCoefficient", 3, 3, 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_SetCoefficient" "', argument " "1"" of type '" "operations_research::MPConstraint *""'");
6283  }
6284  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6285  {
6286  if (!PyObjAs(swig_obj[1], &arg2)) SWIG_fail;
6287  }
6288  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
6289  if (!SWIG_IsOK(ecode3)) {
6290  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Constraint_SetCoefficient" "', argument " "3"" of type '" "double""'");
6291  }
6292  arg3 = static_cast< double >(val3);
6293  (arg1)->SetCoefficient((operations_research::MPVariable const *)arg2,arg3);
6294  resultobj = SWIG_Py_Void();
6295  return resultobj;
6296 fail:
6297  return NULL;
6298 }
6299 
6300 
6301 SWIGINTERN PyObject *_wrap_Constraint_GetCoefficient(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6302  PyObject *resultobj = 0;
6305  void *argp1 = 0 ;
6306  int res1 = 0 ;
6307  PyObject *swig_obj[2] ;
6308  double result;
6309 
6310  if (!SWIG_Python_UnpackTuple(args, "Constraint_GetCoefficient", 2, 2, swig_obj)) SWIG_fail;
6311  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6312  if (!SWIG_IsOK(res1)) {
6313  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_GetCoefficient" "', argument " "1"" of type '" "operations_research::MPConstraint const *""'");
6314  }
6315  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6316  {
6317  if (!PyObjAs(swig_obj[1], &arg2)) SWIG_fail;
6318  }
6319  result = (double)((operations_research::MPConstraint const *)arg1)->GetCoefficient((operations_research::MPVariable const *)arg2);
6320  resultobj = SWIG_From_double(static_cast< double >(result));
6321  return resultobj;
6322 fail:
6323  return NULL;
6324 }
6325 
6326 
6327 SWIGINTERN PyObject *_wrap_Constraint_lb(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6328  PyObject *resultobj = 0;
6330  void *argp1 = 0 ;
6331  int res1 = 0 ;
6332  PyObject *swig_obj[1] ;
6333  double result;
6334 
6335  if (!args) SWIG_fail;
6336  swig_obj[0] = args;
6337  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6338  if (!SWIG_IsOK(res1)) {
6339  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_lb" "', argument " "1"" of type '" "operations_research::MPConstraint const *""'");
6340  }
6341  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6342  result = (double)((operations_research::MPConstraint const *)arg1)->lb();
6343  resultobj = SWIG_From_double(static_cast< double >(result));
6344  return resultobj;
6345 fail:
6346  return NULL;
6347 }
6348 
6349 
6350 SWIGINTERN PyObject *_wrap_Constraint_ub(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6351  PyObject *resultobj = 0;
6353  void *argp1 = 0 ;
6354  int res1 = 0 ;
6355  PyObject *swig_obj[1] ;
6356  double result;
6357 
6358  if (!args) SWIG_fail;
6359  swig_obj[0] = args;
6360  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6361  if (!SWIG_IsOK(res1)) {
6362  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_ub" "', argument " "1"" of type '" "operations_research::MPConstraint const *""'");
6363  }
6364  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6365  result = (double)((operations_research::MPConstraint const *)arg1)->ub();
6366  resultobj = SWIG_From_double(static_cast< double >(result));
6367  return resultobj;
6368 fail:
6369  return NULL;
6370 }
6371 
6372 
6373 SWIGINTERN PyObject *_wrap_Constraint_SetBounds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6374  PyObject *resultobj = 0;
6376  double arg2 ;
6377  double arg3 ;
6378  void *argp1 = 0 ;
6379  int res1 = 0 ;
6380  double val2 ;
6381  int ecode2 = 0 ;
6382  double val3 ;
6383  int ecode3 = 0 ;
6384  PyObject *swig_obj[3] ;
6385 
6386  if (!SWIG_Python_UnpackTuple(args, "Constraint_SetBounds", 3, 3, swig_obj)) SWIG_fail;
6387  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6388  if (!SWIG_IsOK(res1)) {
6389  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_SetBounds" "', argument " "1"" of type '" "operations_research::MPConstraint *""'");
6390  }
6391  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6392  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
6393  if (!SWIG_IsOK(ecode2)) {
6394  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Constraint_SetBounds" "', argument " "2"" of type '" "double""'");
6395  }
6396  arg2 = static_cast< double >(val2);
6397  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
6398  if (!SWIG_IsOK(ecode3)) {
6399  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Constraint_SetBounds" "', argument " "3"" of type '" "double""'");
6400  }
6401  arg3 = static_cast< double >(val3);
6402  (arg1)->SetBounds(arg2,arg3);
6403  resultobj = SWIG_Py_Void();
6404  return resultobj;
6405 fail:
6406  return NULL;
6407 }
6408 
6409 
6410 SWIGINTERN PyObject *_wrap_Constraint_set_is_lazy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6411  PyObject *resultobj = 0;
6413  bool arg2 ;
6414  void *argp1 = 0 ;
6415  int res1 = 0 ;
6416  bool val2 ;
6417  int ecode2 = 0 ;
6418  PyObject *swig_obj[2] ;
6419 
6420  if (!SWIG_Python_UnpackTuple(args, "Constraint_set_is_lazy", 2, 2, swig_obj)) SWIG_fail;
6421  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6422  if (!SWIG_IsOK(res1)) {
6423  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_set_is_lazy" "', argument " "1"" of type '" "operations_research::MPConstraint *""'");
6424  }
6425  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6426  ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
6427  if (!SWIG_IsOK(ecode2)) {
6428  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Constraint_set_is_lazy" "', argument " "2"" of type '" "bool""'");
6429  }
6430  arg2 = static_cast< bool >(val2);
6431  (arg1)->set_is_lazy(arg2);
6432  resultobj = SWIG_Py_Void();
6433  return resultobj;
6434 fail:
6435  return NULL;
6436 }
6437 
6438 
6439 SWIGINTERN PyObject *_wrap_Constraint_index(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6440  PyObject *resultobj = 0;
6442  void *argp1 = 0 ;
6443  int res1 = 0 ;
6444  PyObject *swig_obj[1] ;
6445  int result;
6446 
6447  if (!args) SWIG_fail;
6448  swig_obj[0] = args;
6449  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6450  if (!SWIG_IsOK(res1)) {
6451  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_index" "', argument " "1"" of type '" "operations_research::MPConstraint const *""'");
6452  }
6453  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6454  result = (int)((operations_research::MPConstraint const *)arg1)->index();
6455  resultobj = SWIG_From_int(static_cast< int >(result));
6456  return resultobj;
6457 fail:
6458  return NULL;
6459 }
6460 
6461 
6462 SWIGINTERN PyObject *_wrap_Constraint_dual_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6463  PyObject *resultobj = 0;
6465  void *argp1 = 0 ;
6466  int res1 = 0 ;
6467  PyObject *swig_obj[1] ;
6468  double result;
6469 
6470  if (!args) SWIG_fail;
6471  swig_obj[0] = args;
6472  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6473  if (!SWIG_IsOK(res1)) {
6474  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_dual_value" "', argument " "1"" of type '" "operations_research::MPConstraint const *""'");
6475  }
6476  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6477  result = (double)((operations_research::MPConstraint const *)arg1)->dual_value();
6478  resultobj = SWIG_From_double(static_cast< double >(result));
6479  return resultobj;
6480 fail:
6481  return NULL;
6482 }
6483 
6484 
6485 SWIGINTERN PyObject *_wrap_Constraint_basis_status(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6486  PyObject *resultobj = 0;
6488  void *argp1 = 0 ;
6489  int res1 = 0 ;
6490  PyObject *swig_obj[1] ;
6492 
6493  if (!args) SWIG_fail;
6494  swig_obj[0] = args;
6495  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6496  if (!SWIG_IsOK(res1)) {
6497  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_basis_status" "', argument " "1"" of type '" "operations_research::MPConstraint const *""'");
6498  }
6499  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6500  result = (operations_research::MPSolver::BasisStatus)((operations_research::MPConstraint const *)arg1)->basis_status();
6501  resultobj = SWIG_From_int(static_cast< int >(result));
6502  return resultobj;
6503 fail:
6504  return NULL;
6505 }
6506 
6507 
6508 SWIGINTERN PyObject *_wrap_Constraint_Lb(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6509  PyObject *resultobj = 0;
6511  void *argp1 = 0 ;
6512  int res1 = 0 ;
6513  PyObject *swig_obj[1] ;
6514  double result;
6515 
6516  if (!args) SWIG_fail;
6517  swig_obj[0] = args;
6518  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6519  if (!SWIG_IsOK(res1)) {
6520  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_Lb" "', argument " "1"" of type '" "operations_research::MPConstraint const *""'");
6521  }
6522  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6524  resultobj = SWIG_From_double(static_cast< double >(result));
6525  return resultobj;
6526 fail:
6527  return NULL;
6528 }
6529 
6530 
6531 SWIGINTERN PyObject *_wrap_Constraint_Ub(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6532  PyObject *resultobj = 0;
6534  void *argp1 = 0 ;
6535  int res1 = 0 ;
6536  PyObject *swig_obj[1] ;
6537  double result;
6538 
6539  if (!args) SWIG_fail;
6540  swig_obj[0] = args;
6541  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6542  if (!SWIG_IsOK(res1)) {
6543  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_Ub" "', argument " "1"" of type '" "operations_research::MPConstraint const *""'");
6544  }
6545  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6547  resultobj = SWIG_From_double(static_cast< double >(result));
6548  return resultobj;
6549 fail:
6550  return NULL;
6551 }
6552 
6553 
6554 SWIGINTERN PyObject *_wrap_Constraint_SetLb(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6555  PyObject *resultobj = 0;
6557  double arg2 ;
6558  void *argp1 = 0 ;
6559  int res1 = 0 ;
6560  double val2 ;
6561  int ecode2 = 0 ;
6562  PyObject *swig_obj[2] ;
6563 
6564  if (!SWIG_Python_UnpackTuple(args, "Constraint_SetLb", 2, 2, swig_obj)) SWIG_fail;
6565  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6566  if (!SWIG_IsOK(res1)) {
6567  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_SetLb" "', argument " "1"" of type '" "operations_research::MPConstraint *""'");
6568  }
6569  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6570  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
6571  if (!SWIG_IsOK(ecode2)) {
6572  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Constraint_SetLb" "', argument " "2"" of type '" "double""'");
6573  }
6574  arg2 = static_cast< double >(val2);
6576  resultobj = SWIG_Py_Void();
6577  return resultobj;
6578 fail:
6579  return NULL;
6580 }
6581 
6582 
6583 SWIGINTERN PyObject *_wrap_Constraint_SetUb(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6584  PyObject *resultobj = 0;
6586  double arg2 ;
6587  void *argp1 = 0 ;
6588  int res1 = 0 ;
6589  double val2 ;
6590  int ecode2 = 0 ;
6591  PyObject *swig_obj[2] ;
6592 
6593  if (!SWIG_Python_UnpackTuple(args, "Constraint_SetUb", 2, 2, swig_obj)) SWIG_fail;
6594  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6595  if (!SWIG_IsOK(res1)) {
6596  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_SetUb" "', argument " "1"" of type '" "operations_research::MPConstraint *""'");
6597  }
6598  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6599  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
6600  if (!SWIG_IsOK(ecode2)) {
6601  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Constraint_SetUb" "', argument " "2"" of type '" "double""'");
6602  }
6603  arg2 = static_cast< double >(val2);
6605  resultobj = SWIG_Py_Void();
6606  return resultobj;
6607 fail:
6608  return NULL;
6609 }
6610 
6611 
6612 SWIGINTERN PyObject *_wrap_Constraint_DualValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6613  PyObject *resultobj = 0;
6615  void *argp1 = 0 ;
6616  int res1 = 0 ;
6617  PyObject *swig_obj[1] ;
6618  double result;
6619 
6620  if (!args) SWIG_fail;
6621  swig_obj[0] = args;
6622  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPConstraint, 0 | 0 );
6623  if (!SWIG_IsOK(res1)) {
6624  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Constraint_DualValue" "', argument " "1"" of type '" "operations_research::MPConstraint const *""'");
6625  }
6626  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6628  resultobj = SWIG_From_double(static_cast< double >(result));
6629  return resultobj;
6630 fail:
6631  return NULL;
6632 }
6633 
6634 
6635 SWIGINTERN PyObject *_wrap_delete_Constraint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6636  PyObject *resultobj = 0;
6638  void *argp1 = 0 ;
6639  int res1 = 0 ;
6640  PyObject *swig_obj[1] ;
6641 
6642  if (!args) SWIG_fail;
6643  swig_obj[0] = args;
6645  if (!SWIG_IsOK(res1)) {
6646  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Constraint" "', argument " "1"" of type '" "operations_research::MPConstraint *""'");
6647  }
6648  arg1 = reinterpret_cast< operations_research::MPConstraint * >(argp1);
6649  delete arg1;
6650  resultobj = SWIG_Py_Void();
6651  return resultobj;
6652 fail:
6653  return NULL;
6654 }
6655 
6656 
6657 SWIGINTERN PyObject *Constraint_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6658  PyObject *obj;
6659  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
6661  return SWIG_Py_Void();
6662 }
6663 
6665  SWIG_Error(SWIG_AttributeError,"Variable MPSolverParameters_kDefaultRelativeMipGap is read-only.");
6666  return 1;
6667 }
6668 
6669 
6671  PyObject *pyobj = 0;
6672 
6674  return pyobj;
6675 }
6676 
6677 
6679  SWIG_Error(SWIG_AttributeError,"Variable MPSolverParameters_kDefaultPrimalTolerance is read-only.");
6680  return 1;
6681 }
6682 
6683 
6685  PyObject *pyobj = 0;
6686 
6688  return pyobj;
6689 }
6690 
6691 
6693  SWIG_Error(SWIG_AttributeError,"Variable MPSolverParameters_kDefaultDualTolerance is read-only.");
6694  return 1;
6695 }
6696 
6697 
6699  PyObject *pyobj = 0;
6700 
6702  return pyobj;
6703 }
6704 
6705 
6707  SWIG_Error(SWIG_AttributeError,"Variable MPSolverParameters_kDefaultPresolve is read-only.");
6708  return 1;
6709 }
6710 
6711 
6713  PyObject *pyobj = 0;
6714 
6716  return pyobj;
6717 }
6718 
6719 
6721  SWIG_Error(SWIG_AttributeError,"Variable MPSolverParameters_kDefaultIncrementality is read-only.");
6722  return 1;
6723 }
6724 
6725 
6727  PyObject *pyobj = 0;
6728 
6730  return pyobj;
6731 }
6732 
6733 
6734 SWIGINTERN PyObject *_wrap_new_MPSolverParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6735  PyObject *resultobj = 0;
6737 
6738  if (!SWIG_Python_UnpackTuple(args, "new_MPSolverParameters", 0, 0, 0)) SWIG_fail;
6741  return resultobj;
6742 fail:
6743  return NULL;
6744 }
6745 
6746 
6747 SWIGINTERN PyObject *_wrap_MPSolverParameters_SetDoubleParam(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6748  PyObject *resultobj = 0;
6751  double arg3 ;
6752  void *argp1 = 0 ;
6753  int res1 = 0 ;
6754  int val2 ;
6755  int ecode2 = 0 ;
6756  double val3 ;
6757  int ecode3 = 0 ;
6758  PyObject *swig_obj[3] ;
6759 
6760  if (!SWIG_Python_UnpackTuple(args, "MPSolverParameters_SetDoubleParam", 3, 3, swig_obj)) SWIG_fail;
6761  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolverParameters, 0 | 0 );
6762  if (!SWIG_IsOK(res1)) {
6763  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MPSolverParameters_SetDoubleParam" "', argument " "1"" of type '" "operations_research::MPSolverParameters *""'");
6764  }
6765  arg1 = reinterpret_cast< operations_research::MPSolverParameters * >(argp1);
6766  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
6767  if (!SWIG_IsOK(ecode2)) {
6768  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MPSolverParameters_SetDoubleParam" "', argument " "2"" of type '" "operations_research::MPSolverParameters::DoubleParam""'");
6769  }
6770  arg2 = static_cast< operations_research::MPSolverParameters::DoubleParam >(val2);
6771  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
6772  if (!SWIG_IsOK(ecode3)) {
6773  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MPSolverParameters_SetDoubleParam" "', argument " "3"" of type '" "double""'");
6774  }
6775  arg3 = static_cast< double >(val3);
6776  (arg1)->SetDoubleParam(arg2,arg3);
6777  resultobj = SWIG_Py_Void();
6778  return resultobj;
6779 fail:
6780  return NULL;
6781 }
6782 
6783 
6784 SWIGINTERN PyObject *_wrap_MPSolverParameters_SetIntegerParam(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6785  PyObject *resultobj = 0;
6788  int arg3 ;
6789  void *argp1 = 0 ;
6790  int res1 = 0 ;
6791  int val2 ;
6792  int ecode2 = 0 ;
6793  int val3 ;
6794  int ecode3 = 0 ;
6795  PyObject *swig_obj[3] ;
6796 
6797  if (!SWIG_Python_UnpackTuple(args, "MPSolverParameters_SetIntegerParam", 3, 3, swig_obj)) SWIG_fail;
6798  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolverParameters, 0 | 0 );
6799  if (!SWIG_IsOK(res1)) {
6800  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MPSolverParameters_SetIntegerParam" "', argument " "1"" of type '" "operations_research::MPSolverParameters *""'");
6801  }
6802  arg1 = reinterpret_cast< operations_research::MPSolverParameters * >(argp1);
6803  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
6804  if (!SWIG_IsOK(ecode2)) {
6805  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MPSolverParameters_SetIntegerParam" "', argument " "2"" of type '" "operations_research::MPSolverParameters::IntegerParam""'");
6806  }
6807  arg2 = static_cast< operations_research::MPSolverParameters::IntegerParam >(val2);
6808  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
6809  if (!SWIG_IsOK(ecode3)) {
6810  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MPSolverParameters_SetIntegerParam" "', argument " "3"" of type '" "int""'");
6811  }
6812  arg3 = static_cast< int >(val3);
6813  (arg1)->SetIntegerParam(arg2,arg3);
6814  resultobj = SWIG_Py_Void();
6815  return resultobj;
6816 fail:
6817  return NULL;
6818 }
6819 
6820 
6821 SWIGINTERN PyObject *_wrap_MPSolverParameters_GetDoubleParam(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6822  PyObject *resultobj = 0;
6825  void *argp1 = 0 ;
6826  int res1 = 0 ;
6827  int val2 ;
6828  int ecode2 = 0 ;
6829  PyObject *swig_obj[2] ;
6830  double result;
6831 
6832  if (!SWIG_Python_UnpackTuple(args, "MPSolverParameters_GetDoubleParam", 2, 2, swig_obj)) SWIG_fail;
6833  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolverParameters, 0 | 0 );
6834  if (!SWIG_IsOK(res1)) {
6835  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MPSolverParameters_GetDoubleParam" "', argument " "1"" of type '" "operations_research::MPSolverParameters const *""'");
6836  }
6837  arg1 = reinterpret_cast< operations_research::MPSolverParameters * >(argp1);
6838  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
6839  if (!SWIG_IsOK(ecode2)) {
6840  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MPSolverParameters_GetDoubleParam" "', argument " "2"" of type '" "operations_research::MPSolverParameters::DoubleParam""'");
6841  }
6842  arg2 = static_cast< operations_research::MPSolverParameters::DoubleParam >(val2);
6843  result = (double)((operations_research::MPSolverParameters const *)arg1)->GetDoubleParam(arg2);
6844  resultobj = SWIG_From_double(static_cast< double >(result));
6845  return resultobj;
6846 fail:
6847  return NULL;
6848 }
6849 
6850 
6851 SWIGINTERN PyObject *_wrap_MPSolverParameters_GetIntegerParam(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6852  PyObject *resultobj = 0;
6855  void *argp1 = 0 ;
6856  int res1 = 0 ;
6857  int val2 ;
6858  int ecode2 = 0 ;
6859  PyObject *swig_obj[2] ;
6860  int result;
6861 
6862  if (!SWIG_Python_UnpackTuple(args, "MPSolverParameters_GetIntegerParam", 2, 2, swig_obj)) SWIG_fail;
6863  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__MPSolverParameters, 0 | 0 );
6864  if (!SWIG_IsOK(res1)) {
6865  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MPSolverParameters_GetIntegerParam" "', argument " "1"" of type '" "operations_research::MPSolverParameters const *""'");
6866  }
6867  arg1 = reinterpret_cast< operations_research::MPSolverParameters * >(argp1);
6868  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
6869  if (!SWIG_IsOK(ecode2)) {
6870  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MPSolverParameters_GetIntegerParam" "', argument " "2"" of type '" "operations_research::MPSolverParameters::IntegerParam""'");
6871  }
6872  arg2 = static_cast< operations_research::MPSolverParameters::IntegerParam >(val2);
6873  result = (int)((operations_research::MPSolverParameters const *)arg1)->GetIntegerParam(arg2);
6874  resultobj = SWIG_From_int(static_cast< int >(result));
6875  return resultobj;
6876 fail:
6877  return NULL;
6878 }
6879 
6880 
6881 SWIGINTERN PyObject *_wrap_delete_MPSolverParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6882  PyObject *resultobj = 0;
6884  void *argp1 = 0 ;
6885  int res1 = 0 ;
6886  PyObject *swig_obj[1] ;
6887 
6888  if (!args) SWIG_fail;
6889  swig_obj[0] = args;
6891  if (!SWIG_IsOK(res1)) {
6892  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MPSolverParameters" "', argument " "1"" of type '" "operations_research::MPSolverParameters *""'");
6893  }
6894  arg1 = reinterpret_cast< operations_research::MPSolverParameters * >(argp1);
6895  delete arg1;
6896  resultobj = SWIG_Py_Void();
6897  return resultobj;
6898 fail:
6899  return NULL;
6900 }
6901 
6902 
6903 SWIGINTERN PyObject *MPSolverParameters_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6904  PyObject *obj;
6905  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
6907  return SWIG_Py_Void();
6908 }
6909 
6910 SWIGINTERN PyObject *MPSolverParameters_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6911  return SWIG_Python_InitShadowInstance(args);
6912 }
6913 
6914 SWIGINTERN PyObject *_wrap_new_ModelExportOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6915  PyObject *resultobj = 0;
6917 
6918  if (!SWIG_Python_UnpackTuple(args, "new_ModelExportOptions", 0, 0, 0)) SWIG_fail;
6921  return resultobj;
6922 fail:
6923  return NULL;
6924 }
6925 
6926 
6927 SWIGINTERN PyObject *_wrap_delete_ModelExportOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6928  PyObject *resultobj = 0;
6930  void *argp1 = 0 ;
6931  int res1 = 0 ;
6932  PyObject *swig_obj[1] ;
6933 
6934  if (!args) SWIG_fail;
6935  swig_obj[0] = args;
6937  if (!SWIG_IsOK(res1)) {
6938  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ModelExportOptions" "', argument " "1"" of type '" "operations_research::MPModelExportOptions *""'");
6939  }
6940  arg1 = reinterpret_cast< operations_research::MPModelExportOptions * >(argp1);
6941  delete arg1;
6942  resultobj = SWIG_Py_Void();
6943  return resultobj;
6944 fail:
6945  return NULL;
6946 }
6947 
6948 
6949 SWIGINTERN PyObject *ModelExportOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6950  PyObject *obj;
6951  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
6953  return SWIG_Py_Void();
6954 }
6955 
6956 SWIGINTERN PyObject *ModelExportOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6957  return SWIG_Python_InitShadowInstance(args);
6958 }
6959 
6960 SWIGINTERN PyObject *_wrap_ExportModelAsLpFormat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
6961  PyObject *resultobj = 0;
6962  operations_research::MPModelProto *arg1 = 0 ;
6964  void *argp2 = 0 ;
6965  int res2 = 0 ;
6966  std::string result;
6967 
6968  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
6969  {
6970  arg1 = new operations_research::MPModelProto;
6971  PyObject* const pyresult = PyObject_CallMethod(
6972  swig_obj[0], const_cast<char*>("SerializeToString"), nullptr);
6973  if (pyresult != nullptr) {
6974  char* buffer = nullptr;
6975  Py_ssize_t length = 0;
6976  int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
6977  if (buffer != nullptr) {
6978  arg1->ParseFromArray(buffer, length);
6979  }
6980  Py_DECREF(pyresult);
6981  }
6982  }
6983  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_operations_research__MPModelExportOptions, 0 | 0);
6984  if (!SWIG_IsOK(res2)) {
6985  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExportModelAsLpFormat" "', argument " "2"" of type '" "operations_research::MPModelExportOptions const &""'");
6986  }
6987  if (!argp2) {
6988  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExportModelAsLpFormat" "', argument " "2"" of type '" "operations_research::MPModelExportOptions const &""'");
6989  }
6990  arg2 = reinterpret_cast< operations_research::MPModelExportOptions * >(argp2);
6991  result = operations_research::ExportModelAsLpFormatReturnString((operations_research::MPModelProto const &)*arg1,(operations_research::MPModelExportOptions const &)*arg2);
6992  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
6993  {
6994  delete arg1;
6995  }
6996  return resultobj;
6997 fail:
6998  {
6999  delete arg1;
7000  }
7001  return NULL;
7002 }
7003 
7004 
7005 SWIGINTERN PyObject *_wrap_ExportModelAsLpFormat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
7006  PyObject *resultobj = 0;
7007  operations_research::MPModelProto *arg1 = 0 ;
7008  std::string result;
7009 
7010  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
7011  {
7012  arg1 = new operations_research::MPModelProto;
7013  PyObject* const pyresult = PyObject_CallMethod(
7014  swig_obj[0], const_cast<char*>("SerializeToString"), nullptr);
7015  if (pyresult != nullptr) {
7016  char* buffer = nullptr;
7017  Py_ssize_t length = 0;
7018  int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
7019  if (buffer != nullptr) {
7020  arg1->ParseFromArray(buffer, length);
7021  }
7022  Py_DECREF(pyresult);
7023  }
7024  }
7025  result = operations_research::ExportModelAsLpFormatReturnString((operations_research::MPModelProto const &)*arg1);
7026  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
7027  {
7028  delete arg1;
7029  }
7030  return resultobj;
7031 fail:
7032  {
7033  delete arg1;
7034  }
7035  return NULL;
7036 }
7037 
7038 
7039 SWIGINTERN PyObject *_wrap_ExportModelAsLpFormat(PyObject *self, PyObject *args) {
7040  Py_ssize_t argc;
7041  PyObject *argv[3] = {
7042  0
7043  };
7044 
7045  if (!(argc = SWIG_Python_UnpackTuple(args, "ExportModelAsLpFormat", 0, 2, argv))) SWIG_fail;
7046  --argc;
7047  if (argc == 1) {
7048  int _v;
7049  {
7050  bool ok = false;
7051  PyObject* const module = PyImport_ImportModule("ortools.linear_solver.linear_solver_pb2");
7052  if (module != nullptr) {
7053  PyObject* const dict = PyModule_GetDict(module);
7054  if (dict != nullptr) {
7055  PyObject* const clss = PyDict_GetItemString(dict, "MPModelProto");
7056  if (clss != nullptr) {
7057  if (PyObject_IsInstance(argv[0], clss)) {
7058  ok = true;
7059  }
7060  }
7061  }
7062  Py_DECREF(module);
7063  }
7064  _v = ok ? 1 : 0;
7065  }
7066  if (_v) {
7067  return _wrap_ExportModelAsLpFormat__SWIG_1(self, argc, argv);
7068  }
7069  }
7070  if (argc == 2) {
7071  int _v;
7072  {
7073  bool ok = false;
7074  PyObject* const module = PyImport_ImportModule("ortools.linear_solver.linear_solver_pb2");
7075  if (module != nullptr) {
7076  PyObject* const dict = PyModule_GetDict(module);
7077  if (dict != nullptr) {
7078  PyObject* const clss = PyDict_GetItemString(dict, "MPModelProto");
7079  if (clss != nullptr) {
7080  if (PyObject_IsInstance(argv[0], clss)) {
7081  ok = true;
7082  }
7083  }
7084  }
7085  Py_DECREF(module);
7086  }
7087  _v = ok ? 1 : 0;
7088  }
7089  if (_v) {
7091  _v = SWIG_CheckState(res);
7092  if (_v) {
7093  return _wrap_ExportModelAsLpFormat__SWIG_0(self, argc, argv);
7094  }
7095  }
7096  }
7097 
7098 fail:
7099  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'ExportModelAsLpFormat'.\n"
7100  " Possible C/C++ prototypes are:\n"
7101  " operations_research::ExportModelAsLpFormatReturnString(operations_research::MPModelProto const &,operations_research::MPModelExportOptions const &)\n"
7102  " operations_research::ExportModelAsLpFormatReturnString(operations_research::MPModelProto const &)\n");
7103  return 0;
7104 }
7105 
7106 
7107 SWIGINTERN PyObject *_wrap_ExportModelAsMpsFormat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
7108  PyObject *resultobj = 0;
7109  operations_research::MPModelProto *arg1 = 0 ;
7111  void *argp2 = 0 ;
7112  int res2 = 0 ;
7113  std::string result;
7114 
7115  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
7116  {
7117  arg1 = new operations_research::MPModelProto;
7118  PyObject* const pyresult = PyObject_CallMethod(
7119  swig_obj[0], const_cast<char*>("SerializeToString"), nullptr);
7120  if (pyresult != nullptr) {
7121  char* buffer = nullptr;
7122  Py_ssize_t length = 0;
7123  int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
7124  if (buffer != nullptr) {
7125  arg1->ParseFromArray(buffer, length);
7126  }
7127  Py_DECREF(pyresult);
7128  }
7129  }
7130  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_operations_research__MPModelExportOptions, 0 | 0);
7131  if (!SWIG_IsOK(res2)) {
7132  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExportModelAsMpsFormat" "', argument " "2"" of type '" "operations_research::MPModelExportOptions const &""'");
7133  }
7134  if (!argp2) {
7135  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExportModelAsMpsFormat" "', argument " "2"" of type '" "operations_research::MPModelExportOptions const &""'");
7136  }
7137  arg2 = reinterpret_cast< operations_research::MPModelExportOptions * >(argp2);
7138  result = operations_research::ExportModelAsMpsFormatReturnString((operations_research::MPModelProto const &)*arg1,(operations_research::MPModelExportOptions const &)*arg2);
7139  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
7140  {
7141  delete arg1;
7142  }
7143  return resultobj;
7144 fail:
7145  {
7146  delete arg1;
7147  }
7148  return NULL;
7149 }
7150 
7151 
7152 SWIGINTERN PyObject *_wrap_ExportModelAsMpsFormat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
7153  PyObject *resultobj = 0;
7154  operations_research::MPModelProto *arg1 = 0 ;
7155  std::string result;
7156 
7157  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
7158  {
7159  arg1 = new operations_research::MPModelProto;
7160  PyObject* const pyresult = PyObject_CallMethod(
7161  swig_obj[0], const_cast<char*>("SerializeToString"), nullptr);
7162  if (pyresult != nullptr) {
7163  char* buffer = nullptr;
7164  Py_ssize_t length = 0;
7165  int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
7166  if (buffer != nullptr) {
7167  arg1->ParseFromArray(buffer, length);
7168  }
7169  Py_DECREF(pyresult);
7170  }
7171  }
7172  result = operations_research::ExportModelAsMpsFormatReturnString((operations_research::MPModelProto const &)*arg1);
7173  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
7174  {
7175  delete arg1;
7176  }
7177  return resultobj;
7178 fail:
7179  {
7180  delete arg1;
7181  }
7182  return NULL;
7183 }
7184 
7185 
7186 SWIGINTERN PyObject *_wrap_ExportModelAsMpsFormat(PyObject *self, PyObject *args) {
7187  Py_ssize_t argc;
7188  PyObject *argv[3] = {
7189  0
7190  };
7191 
7192  if (!(argc = SWIG_Python_UnpackTuple(args, "ExportModelAsMpsFormat", 0, 2, argv))) SWIG_fail;
7193  --argc;
7194  if (argc == 1) {
7195  int _v;
7196  {
7197  bool ok = false;
7198  PyObject* const module = PyImport_ImportModule("ortools.linear_solver.linear_solver_pb2");
7199  if (module != nullptr) {
7200  PyObject* const dict = PyModule_GetDict(module);
7201  if (dict != nullptr) {
7202  PyObject* const clss = PyDict_GetItemString(dict, "MPModelProto");
7203  if (clss != nullptr) {
7204  if (PyObject_IsInstance(argv[0], clss)) {
7205  ok = true;
7206  }
7207  }
7208  }
7209  Py_DECREF(module);
7210  }
7211  _v = ok ? 1 : 0;
7212  }
7213  if (_v) {
7214  return _wrap_ExportModelAsMpsFormat__SWIG_1(self, argc, argv);
7215  }
7216  }
7217  if (argc == 2) {
7218  int _v;
7219  {
7220  bool ok = false;
7221  PyObject* const module = PyImport_ImportModule("ortools.linear_solver.linear_solver_pb2");
7222  if (module != nullptr) {
7223  PyObject* const dict = PyModule_GetDict(module);
7224  if (dict != nullptr) {
7225  PyObject* const clss = PyDict_GetItemString(dict, "MPModelProto");
7226  if (clss != nullptr) {
7227  if (PyObject_IsInstance(argv[0], clss)) {
7228  ok = true;
7229  }
7230  }
7231  }
7232  Py_DECREF(module);
7233  }
7234  _v = ok ? 1 : 0;
7235  }
7236  if (_v) {
7238  _v = SWIG_CheckState(res);
7239  if (_v) {
7240  return _wrap_ExportModelAsMpsFormat__SWIG_0(self, argc, argv);
7241  }
7242  }
7243  }
7244 
7245 fail:
7246  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'ExportModelAsMpsFormat'.\n"
7247  " Possible C/C++ prototypes are:\n"
7248  " operations_research::ExportModelAsMpsFormatReturnString(operations_research::MPModelProto const &,operations_research::MPModelExportOptions const &)\n"
7249  " operations_research::ExportModelAsMpsFormatReturnString(operations_research::MPModelProto const &)\n");
7250  return 0;
7251 }
7252 
7253 
7254 SWIGINTERN PyObject *_wrap_FindErrorInModelProto(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7255  PyObject *resultobj = 0;
7256  operations_research::MPModelProto *arg1 = 0 ;
7257  PyObject *swig_obj[1] ;
7258  std::string result;
7259 
7260  if (!args) SWIG_fail;
7261  swig_obj[0] = args;
7262  {
7263  arg1 = new operations_research::MPModelProto;
7264  PyObject* const pyresult = PyObject_CallMethod(
7265  swig_obj[0], const_cast<char*>("SerializeToString"), nullptr);
7266  if (pyresult != nullptr) {
7267  char* buffer = nullptr;
7268  Py_ssize_t length = 0;
7269  int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
7270  if (buffer != nullptr) {
7271  arg1->ParseFromArray(buffer, length);
7272  }
7273  Py_DECREF(pyresult);
7274  }
7275  }
7276  result = operations_research::FindErrorInMPModelProto((operations_research::MPModelProto const &)*arg1);
7277  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
7278  {
7279  delete arg1;
7280  }
7281  return resultobj;
7282 fail:
7283  {
7284  delete arg1;
7285  }
7286  return NULL;
7287 }
7288 
7289 
7290 static PyMethodDef SwigMethods[] = {
7291  { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
7292  { "new_Solver", _wrap_new_Solver, METH_VARARGS, " Create a solver with the given name and underlying solver backend."},
7293  { "delete_Solver", _wrap_delete_Solver, METH_O, NULL},
7294  { "Solver_CreateSolver", _wrap_Solver_CreateSolver, METH_O, "\n"
7295  "Recommended factory method to create a MPSolver instance, especially in\n"
7296  "non C++ languages.\n"
7297  "\n"
7298  "It returns a newly created solver instance if successful, or a nullptr\n"
7299  "otherwise. This can occur if the relevant interface is not linked in, or if\n"
7300  "a needed license is not accessible for commercial solvers.\n"
7301  "\n"
7302  "Ownership of the solver is passed on to the caller of this method.\n"
7303  "It will accept both string names of the OptimizationProblemType enum, as\n"
7304  "well as a short version (i.e. \"SCIP_MIXED_INTEGER_PROGRAMMING\" or \"SCIP\").\n"
7305  "\n"
7306  "solver_id is case insensitive, and the following names are supported:\n"
7307  " - CLP_LINEAR_PROGRAMMING or CLP\n"
7308  " - CBC_MIXED_INTEGER_PROGRAMMING or CBC\n"
7309  " - GLOP_LINEAR_PROGRAMMING or GLOP\n"
7310  " - BOP_INTEGER_PROGRAMMING or BOP\n"
7311  " - SAT_INTEGER_PROGRAMMING or SAT or CP_SAT\n"
7312  " - SCIP_MIXED_INTEGER_PROGRAMMING or SCIP\n"
7313  " - GUROBI_LINEAR_PROGRAMMING or GUROBI_LP\n"
7314  " - GUROBI_MIXED_INTEGER_PROGRAMMING or GUROBI or GUROBI_MIP\n"
7315  " - CPLEX_LINEAR_PROGRAMMING or CPLEX_LP\n"
7316  " - CPLEX_MIXED_INTEGER_PROGRAMMING or CPLEX or CPLEX_MIP\n"
7317  " - XPRESS_LINEAR_PROGRAMMING or XPRESS_LP\n"
7318  " - XPRESS_MIXED_INTEGER_PROGRAMMING or XPRESS or XPRESS_MIP\n"
7319  " - GLPK_LINEAR_PROGRAMMING or GLPK_LP\n"
7320  " - GLPK_MIXED_INTEGER_PROGRAMMING or GLPK or GLPK_MIP\n"
7321  ""},
7322  { "Solver_SupportsProblemType", _wrap_Solver_SupportsProblemType, METH_O, "\n"
7323  "Whether the given problem type is supported (this will depend on the\n"
7324  "targets that you linked).\n"
7325  ""},
7326  { "Solver_Clear", _wrap_Solver_Clear, METH_O, "\n"
7327  "Clears the objective (including the optimization direction), all variables\n"
7328  "and constraints. All the other properties of the MPSolver (like the time\n"
7329  "limit) are kept untouched.\n"
7330  ""},
7331  { "Solver_NumVariables", _wrap_Solver_NumVariables, METH_O, " Returns the number of variables."},
7332  { "Solver_variables", _wrap_Solver_variables, METH_O, "\n"
7333  "Returns the array of variables handled by the MPSolver. (They are listed in\n"
7334  "the order in which they were created.)\n"
7335  ""},
7336  { "Solver_variable", _wrap_Solver_variable, METH_VARARGS, "Returns the variable at position index."},
7337  { "Solver_LookupVariable", _wrap_Solver_LookupVariable, METH_VARARGS, "\n"
7338  "Looks up a variable by name, and returns nullptr if it does not exist. The\n"
7339  "first call has a O(n) complexity, as the variable name index is lazily\n"
7340  "created upon first use. Will crash if variable names are not unique.\n"
7341  ""},
7342  { "Solver_Var", _wrap_Solver_Var, METH_VARARGS, "\n"
7343  "Creates a variable with the given bounds, integrality requirement and\n"
7344  "name. Bounds can be finite or +/- MPSolver::infinity(). The MPSolver owns\n"
7345  "the variable (i.e. the returned pointer is borrowed). Variable names are\n"
7346  "optional. If you give an empty name, name() will auto-generate one for you\n"
7347  "upon request.\n"
7348  ""},
7349  { "Solver_NumVar", _wrap_Solver_NumVar, METH_VARARGS, " Creates a continuous variable."},
7350  { "Solver_IntVar", _wrap_Solver_IntVar, METH_VARARGS, " Creates an integer variable."},
7351  { "Solver_BoolVar", _wrap_Solver_BoolVar, METH_VARARGS, " Creates a boolean variable."},
7352  { "Solver_NumConstraints", _wrap_Solver_NumConstraints, METH_O, " Returns the number of constraints."},
7353  { "Solver_constraints", _wrap_Solver_constraints, METH_O, "\n"
7354  "Returns the array of constraints handled by the MPSolver.\n"
7355  "\n"
7356  "They are listed in the order in which they were created.\n"
7357  ""},
7358  { "Solver_constraint", _wrap_Solver_constraint, METH_VARARGS, " Returns the constraint at the given index."},
7359  { "Solver_LookupConstraint", _wrap_Solver_LookupConstraint, METH_VARARGS, "\n"
7360  " Looks up a constraint by name, and returns nullptr if it does not exist.\n"
7361  "\n"
7362  "The first call has a O(n) complexity, as the constraint name index is\n"
7363  "lazily created upon first use. Will crash if constraint names are not\n"
7364  "unique.\n"
7365  ""},
7366  { "Solver_Constraint", _wrap_Solver_Constraint, METH_VARARGS, "\n"
7367  "*Overload 1:*\n"
7368  "\n"
7369  "Creates a linear constraint with given bounds.\n"
7370  "\n"
7371  "Bounds can be finite or +/- MPSolver::infinity(). The MPSolver class\n"
7372  "assumes ownership of the constraint.\n"
7373  "\n"
7374  ":rtype: :py:class:`MPConstraint`\n"
7375  ":return: a pointer to the newly created constraint.\n"
7376  "\n"
7377  "|\n"
7378  "\n"
7379  "*Overload 2:*\n"
7380  " Creates a constraint with -infinity and +infinity bounds.\n"
7381  "\n"
7382  "|\n"
7383  "\n"
7384  "*Overload 3:*\n"
7385  " Creates a named constraint with given bounds.\n"
7386  "\n"
7387  "|\n"
7388  "\n"
7389  "*Overload 4:*\n"
7390  " Creates a named constraint with -infinity and +infinity bounds.\n"
7391  ""},
7392  { "Solver_Objective", _wrap_Solver_Objective, METH_O, " Returns the mutable objective object."},
7393  { "Solver_Solve", _wrap_Solver_Solve, METH_VARARGS, "\n"
7394  "*Overload 1:*\n"
7395  "Solves the problem using the default parameter values.\n"
7396  "\n"
7397  "|\n"
7398  "\n"
7399  "*Overload 2:*\n"
7400  "Solves the problem using the specified parameter values.\n"
7401  ""},
7402  { "Solver_ComputeConstraintActivities", _wrap_Solver_ComputeConstraintActivities, METH_O, "\n"
7403  "Advanced usage: compute the \"activities\" of all constraints, which are the\n"
7404  "sums of their linear terms. The activities are returned in the same order\n"
7405  "as constraints(), which is the order in which constraints were added; but\n"
7406  "you can also use MPConstraint::index() to get a constraint's index.\n"
7407  ""},
7408  { "Solver_VerifySolution", _wrap_Solver_VerifySolution, METH_VARARGS, "\n"
7409  "Advanced usage: Verifies the *correctness* of the solution.\n"
7410  "\n"
7411  "It verifies that all variables must be within their domains, all\n"
7412  "constraints must be satisfied, and the reported objective value must be\n"
7413  "accurate.\n"
7414  "\n"
7415  "Usage:\n"
7416  "- This can only be called after Solve() was called.\n"
7417  "- \"tolerance\" is interpreted as an absolute error threshold.\n"
7418  "- For the objective value only, if the absolute error is too large,\n"
7419  " the tolerance is interpreted as a relative error threshold instead.\n"
7420  "- If \"log_errors\" is true, every single violation will be logged.\n"
7421  "- If \"tolerance\" is negative, it will be set to infinity().\n"
7422  "\n"
7423  "Most users should just set the --verify_solution flag and not bother using\n"
7424  "this method directly.\n"
7425  ""},
7426  { "Solver_InterruptSolve", _wrap_Solver_InterruptSolve, METH_O, "\n"
7427  " Interrupts the Solve() execution to terminate processing if possible.\n"
7428  "\n"
7429  "If the underlying interface supports interruption; it does that and returns\n"
7430  "true regardless of whether there's an ongoing Solve() or not. The Solve()\n"
7431  "call may still linger for a while depending on the conditions. If\n"
7432  "interruption is not supported; returns false and does nothing.\n"
7433  ""},
7434  { "Solver_FillSolutionResponseProto", _wrap_Solver_FillSolutionResponseProto, METH_VARARGS, " Encodes the current solution in a solution response protocol buffer."},
7435  { "Solver_SolveWithProto", _wrap_Solver_SolveWithProto, METH_VARARGS, "\n"
7436  "Solves the model encoded by a MPModelRequest protocol buffer and fills the\n"
7437  "solution encoded as a MPSolutionResponse.\n"
7438  "\n"
7439  "Note(user): This creates a temporary MPSolver and destroys it at the end.\n"
7440  "If you want to keep the MPSolver alive (for debugging, or for incremental\n"
7441  "solving), you should write another version of this function that creates\n"
7442  "the MPSolver object on the heap and returns it.\n"
7443  "\n"
7444  "Note(pawell): This attempts to first use `DirectlySolveProto()` (if\n"
7445  "implemented). Consequently, this most likely does *not* override any of\n"
7446  "the default parameters of the underlying solver. This behavior *differs*\n"
7447  "from `MPSolver::Solve()` which by default sets the feasibility tolerance\n"
7448  "and the gap limit (as of 2020/02/11, to 1e-7 and 0.0001, respectively).\n"
7449  ""},
7450  { "Solver_ExportModelToProto", _wrap_Solver_ExportModelToProto, METH_VARARGS, " Exports model to protocol buffer."},
7451  { "Solver_SetSolverSpecificParametersAsString", _wrap_Solver_SetSolverSpecificParametersAsString, METH_VARARGS, "\n"
7452  "Advanced usage: pass solver specific parameters in text format.\n"
7453  "\n"
7454  "The format is solver-specific and is the same as the corresponding solver\n"
7455  "configuration file format. Returns true if the operation was successful.\n"
7456  ""},
7457  { "Solver_infinity", _wrap_Solver_infinity, METH_NOARGS, "\n"
7458  "Infinity.\n"
7459  "\n"
7460  "You can use -MPSolver::infinity() for negative infinity.\n"
7461  ""},
7462  { "Solver_EnableOutput", _wrap_Solver_EnableOutput, METH_O, " Enables solver logging."},
7463  { "Solver_SuppressOutput", _wrap_Solver_SuppressOutput, METH_O, " Suppresses solver logging."},
7464  { "Solver_iterations", _wrap_Solver_iterations, METH_O, " Returns the number of simplex iterations."},
7465  { "Solver_nodes", _wrap_Solver_nodes, METH_O, "\n"
7466  "Returns the number of branch-and-bound nodes evaluated during the solve.\n"
7467  "\n"
7468  "Only available for discrete problems.\n"
7469  ""},
7470  { "Solver_ComputeExactConditionNumber", _wrap_Solver_ComputeExactConditionNumber, METH_O, "\n"
7471  " Advanced usage: computes the exact condition number of the current scaled\n"
7472  "basis: L1norm(B) * L1norm(inverse(B)), where B is the scaled basis.\n"
7473  "\n"
7474  "This method requires that a basis exists: it should be called after Solve.\n"
7475  "It is only available for continuous problems. It is implemented for GLPK\n"
7476  "but not CLP because CLP does not provide the API for doing it.\n"
7477  "\n"
7478  "The condition number measures how well the constraint matrix is conditioned\n"
7479  "and can be used to predict whether numerical issues will arise during the\n"
7480  "solve: the model is declared infeasible whereas it is feasible (or\n"
7481  "vice-versa), the solution obtained is not optimal or violates some\n"
7482  "constraints, the resolution is slow because of repeated singularities.\n"
7483  "\n"
7484  "The rule of thumb to interpret the condition number kappa is:\n"
7485  " - o kappa <= 1e7: virtually no chance of numerical issues\n"
7486  " - o 1e7 < kappa <= 1e10: small chance of numerical issues\n"
7487  " - o 1e10 < kappa <= 1e13: medium chance of numerical issues\n"
7488  " - o kappa > 1e13: high chance of numerical issues\n"
7489  "\n"
7490  "The computation of the condition number depends on the quality of the LU\n"
7491  "decomposition, so it is not very accurate when the matrix is ill\n"
7492  "conditioned.\n"
7493  ""},
7494  { "Solver_NextSolution", _wrap_Solver_NextSolution, METH_O, "\n"
7495  "Some solvers (MIP only, not LP) can produce multiple solutions to the\n"
7496  "problem. Returns true when another solution is available, and updates the\n"
7497  "MPVariable* objects to make the new solution queryable. Call only after\n"
7498  "calling solve.\n"
7499  "\n"
7500  "The optimality properties of the additional solutions found, and whether or\n"
7501  "not the solver computes them ahead of time or when NextSolution() is called\n"
7502  "is solver specific.\n"
7503  "\n"
7504  "As of 2020-02-10, only Gurobi and SCIP support NextSolution(), see\n"
7505  "linear_solver_interfaces_test for an example of how to configure these\n"
7506  "solvers for multiple solutions. Other solvers return false unconditionally.\n"
7507  ""},
7508  { "Solver_set_time_limit", _wrap_Solver_set_time_limit, METH_VARARGS, NULL},
7509  { "Solver_wall_time", _wrap_Solver_wall_time, METH_O, NULL},
7510  { "Solver_LoadModelFromProto", _wrap_Solver_LoadModelFromProto, METH_VARARGS, NULL},
7511  { "Solver_LoadSolutionFromProto", _wrap_Solver_LoadSolutionFromProto, METH_VARARGS, NULL},
7512  { "Solver_ExportModelAsLpFormat", _wrap_Solver_ExportModelAsLpFormat, METH_VARARGS, NULL},
7513  { "Solver_ExportModelAsMpsFormat", _wrap_Solver_ExportModelAsMpsFormat, METH_VARARGS, NULL},
7514  { "Solver_SetHint", _wrap_Solver_SetHint, METH_VARARGS, "\n"
7515  "Set a hint for solution.\n"
7516  "\n"
7517  "If a feasible or almost-feasible solution to the problem is already known,\n"
7518  "it may be helpful to pass it to the solver so that it can be used. A\n"
7519  "solver that supports this feature will try to use this information to\n"
7520  "create its initial feasible solution.\n"
7521  "\n"
7522  "Note that it may not always be faster to give a hint like this to the\n"
7523  "solver. There is also no guarantee that the solver will use this hint or\n"
7524  "try to return a solution \"close\" to this assignment in case of multiple\n"
7525  "optimal solutions.\n"
7526  ""},
7527  { "Solver_SetNumThreads", _wrap_Solver_SetNumThreads, METH_VARARGS, " Sets the number of threads to be used by the solver."},
7528  { "Solver_Infinity", _wrap_Solver_Infinity, METH_NOARGS, NULL},
7529  { "Solver_SetTimeLimit", _wrap_Solver_SetTimeLimit, METH_VARARGS, NULL},
7530  { "Solver_WallTime", _wrap_Solver_WallTime, METH_O, NULL},
7531  { "Solver_Iterations", _wrap_Solver_Iterations, METH_O, NULL},
7532  { "Solver_swigregister", Solver_swigregister, METH_O, NULL},
7533  { "Solver_swiginit", Solver_swiginit, METH_VARARGS, NULL},
7534  { "__lshift__", _wrap___lshift__, METH_VARARGS, NULL},
7535  { "Objective_Clear", _wrap_Objective_Clear, METH_O, "\n"
7536  " Clears the offset, all variables and coefficients, and the optimization\n"
7537  "direction.\n"
7538  ""},
7539  { "Objective_SetCoefficient", _wrap_Objective_SetCoefficient, METH_VARARGS, "\n"
7540  "Sets the coefficient of the variable in the objective.\n"
7541  "\n"
7542  "If the variable does not belong to the solver, the function just returns,\n"
7543  "or crashes in non-opt mode.\n"
7544  ""},
7545  { "Objective_GetCoefficient", _wrap_Objective_GetCoefficient, METH_VARARGS, "\n"
7546  " Gets the coefficient of a given variable in the objective\n"
7547  "\n"
7548  "It returns 0 if the variable does not appear in the objective).\n"
7549  ""},
7550  { "Objective_SetOffset", _wrap_Objective_SetOffset, METH_VARARGS, " Sets the constant term in the objective."},
7551  { "Objective_offset", _wrap_Objective_offset, METH_O, " Gets the constant term in the objective."},
7552  { "Objective_SetOptimizationDirection", _wrap_Objective_SetOptimizationDirection, METH_VARARGS, " Sets the optimization direction (maximize: true or minimize: false)."},
7553  { "Objective_SetMinimization", _wrap_Objective_SetMinimization, METH_O, " Sets the optimization direction to minimize."},
7554  { "Objective_SetMaximization", _wrap_Objective_SetMaximization, METH_O, " Sets the optimization direction to maximize."},
7555  { "Objective_maximization", _wrap_Objective_maximization, METH_O, " Is the optimization direction set to maximize?"},
7556  { "Objective_minimization", _wrap_Objective_minimization, METH_O, " Is the optimization direction set to minimize?"},
7557  { "Objective_Value", _wrap_Objective_Value, METH_O, "\n"
7558  "Returns the objective value of the best solution found so far.\n"
7559  "\n"
7560  "It is the optimal objective value if the problem has been solved to\n"
7561  "optimality.\n"
7562  "\n"
7563  "Note: the objective value may be slightly different than what you could\n"
7564  "compute yourself using ``MPVariable::solution_value();`` please use the\n"
7565  "--verify_solution flag to gain confidence about the numerical stability of\n"
7566  "your solution.\n"
7567  ""},
7568  { "Objective_BestBound", _wrap_Objective_BestBound, METH_O, "\n"
7569  "Returns the best objective bound.\n"
7570  "\n"
7571  "In case of minimization, it is a lower bound on the objective value of the\n"
7572  "optimal integer solution. Only available for discrete problems.\n"
7573  ""},
7574  { "Objective_Offset", _wrap_Objective_Offset, METH_O, NULL},
7575  { "delete_Objective", _wrap_delete_Objective, METH_O, NULL},
7576  { "Objective_swigregister", Objective_swigregister, METH_O, NULL},
7577  { "Variable_name", _wrap_Variable_name, METH_O, " Returns the name of the variable."},
7578  { "Variable_SetInteger", _wrap_Variable_SetInteger, METH_VARARGS, " Sets the integrality requirement of the variable."},
7579  { "Variable_integer", _wrap_Variable_integer, METH_O, " Returns the integrality requirement of the variable."},
7580  { "Variable_solution_value", _wrap_Variable_solution_value, METH_O, "\n"
7581  "Returns the value of the variable in the current solution.\n"
7582  "\n"
7583  "If the variable is integer, then the value will always be an integer (the\n"
7584  "underlying solver handles floating-point values only, but this function\n"
7585  "automatically rounds it to the nearest integer; see: man 3 round).\n"
7586  ""},
7587  { "Variable_index", _wrap_Variable_index, METH_O, " Returns the index of the variable in the MPSolver::variables_."},
7588  { "Variable_lb", _wrap_Variable_lb, METH_O, " Returns the lower bound."},
7589  { "Variable_ub", _wrap_Variable_ub, METH_O, " Returns the upper bound."},
7590  { "Variable_SetBounds", _wrap_Variable_SetBounds, METH_VARARGS, " Sets both the lower and upper bounds."},
7591  { "Variable_reduced_cost", _wrap_Variable_reduced_cost, METH_O, "\n"
7592  "Advanced usage: returns the reduced cost of the variable in the current\n"
7593  "solution (only available for continuous problems).\n"
7594  ""},
7595  { "Variable_basis_status", _wrap_Variable_basis_status, METH_O, "\n"
7596  "Advanced usage: returns the basis status of the variable in the current\n"
7597  "solution (only available for continuous problems).\n"
7598  "\n"
7599  "See also: MPSolver::BasisStatus.\n"
7600  ""},
7601  { "Variable_branching_priority", _wrap_Variable_branching_priority, METH_O, "\n"
7602  "Advanced usage: Certain MIP solvers (e.g. Gurobi or SCIP) allow you to set\n"
7603  "a per-variable priority for determining which variable to branch on.\n"
7604  "\n"
7605  "A value of 0 is treated as default, and is equivalent to not setting the\n"
7606  "branching priority. The solver looks first to branch on fractional\n"
7607  "variables in higher priority levels. As of 2019-05, only Gurobi and SCIP\n"
7608  "support setting branching priority; all other solvers will simply ignore\n"
7609  "this annotation.\n"
7610  ""},
7611  { "Variable_SetBranchingPriority", _wrap_Variable_SetBranchingPriority, METH_VARARGS, NULL},
7612  { "Variable___str__", _wrap_Variable___str__, METH_O, NULL},
7613  { "Variable___repr__", _wrap_Variable___repr__, METH_O, NULL},
7614  { "Variable_SolutionValue", _wrap_Variable_SolutionValue, METH_O, NULL},
7615  { "Variable_Integer", _wrap_Variable_Integer, METH_O, NULL},
7616  { "Variable_Lb", _wrap_Variable_Lb, METH_O, NULL},
7617  { "Variable_Ub", _wrap_Variable_Ub, METH_O, NULL},
7618  { "Variable_SetLb", _wrap_Variable_SetLb, METH_VARARGS, NULL},
7619  { "Variable_SetUb", _wrap_Variable_SetUb, METH_VARARGS, NULL},
7620  { "Variable_ReducedCost", _wrap_Variable_ReducedCost, METH_O, NULL},
7621  { "delete_Variable", _wrap_delete_Variable, METH_O, NULL},
7622  { "Variable_swigregister", Variable_swigregister, METH_O, NULL},
7623  { "Constraint_name", _wrap_Constraint_name, METH_O, " Returns the name of the constraint."},
7624  { "Constraint_Clear", _wrap_Constraint_Clear, METH_O, " Clears all variables and coefficients. Does not clear the bounds."},
7625  { "Constraint_SetCoefficient", _wrap_Constraint_SetCoefficient, METH_VARARGS, "\n"
7626  "Sets the coefficient of the variable on the constraint.\n"
7627  "\n"
7628  "If the variable does not belong to the solver, the function just returns,\n"
7629  "or crashes in non-opt mode.\n"
7630  ""},
7631  { "Constraint_GetCoefficient", _wrap_Constraint_GetCoefficient, METH_VARARGS, "\n"
7632  "Gets the coefficient of a given variable on the constraint (which is 0 if\n"
7633  "the variable does not appear in the constraint).\n"
7634  ""},
7635  { "Constraint_lb", _wrap_Constraint_lb, METH_O, " Returns the lower bound."},
7636  { "Constraint_ub", _wrap_Constraint_ub, METH_O, " Returns the upper bound."},
7637  { "Constraint_SetBounds", _wrap_Constraint_SetBounds, METH_VARARGS, " Sets both the lower and upper bounds."},
7638  { "Constraint_set_is_lazy", _wrap_Constraint_set_is_lazy, METH_VARARGS, "\n"
7639  "Advanced usage: sets the constraint \"laziness\".\n"
7640  "\n"
7641  "**This is only supported for SCIP and has no effect on other\n"
7642  "solvers.**\n"
7643  "\n"
7644  "When **laziness** is true, the constraint is only considered by the Linear\n"
7645  "Programming solver if its current solution violates the constraint. In this\n"
7646  "case, the constraint is definitively added to the problem. This may be\n"
7647  "useful in some MIP problems, and may have a dramatic impact on performance.\n"
7648  "\n"
7649  "For more info see: http://tinyurl.com/lazy-constraints.\n"
7650  ""},
7651  { "Constraint_index", _wrap_Constraint_index, METH_O, " Returns the index of the constraint in the MPSolver::constraints_."},
7652  { "Constraint_dual_value", _wrap_Constraint_dual_value, METH_O, "\n"
7653  "Advanced usage: returns the dual value of the constraint in the current\n"
7654  "solution (only available for continuous problems).\n"
7655  ""},
7656  { "Constraint_basis_status", _wrap_Constraint_basis_status, METH_O, "\n"
7657  "Advanced usage: returns the basis status of the constraint.\n"
7658  "\n"
7659  "It is only available for continuous problems).\n"
7660  "\n"
7661  "Note that if a constraint \"linear_expression in [lb, ub]\" is transformed\n"
7662  "into \"linear_expression + slack = 0\" with slack in [-ub, -lb], then this\n"
7663  "status is the same as the status of the slack variable with AT_UPPER_BOUND\n"
7664  "and AT_LOWER_BOUND swapped.\n"
7665  "\n"
7666  "See also: MPSolver::BasisStatus.\n"
7667  ""},
7668  { "Constraint_Lb", _wrap_Constraint_Lb, METH_O, NULL},
7669  { "Constraint_Ub", _wrap_Constraint_Ub, METH_O, NULL},
7670  { "Constraint_SetLb", _wrap_Constraint_SetLb, METH_VARARGS, NULL},
7671  { "Constraint_SetUb", _wrap_Constraint_SetUb, METH_VARARGS, NULL},
7672  { "Constraint_DualValue", _wrap_Constraint_DualValue, METH_O, NULL},
7673  { "delete_Constraint", _wrap_delete_Constraint, METH_O, NULL},
7674  { "Constraint_swigregister", Constraint_swigregister, METH_O, NULL},
7675  { "new_MPSolverParameters", _wrap_new_MPSolverParameters, METH_NOARGS, " The constructor sets all parameters to their default value."},
7676  { "MPSolverParameters_SetDoubleParam", _wrap_MPSolverParameters_SetDoubleParam, METH_VARARGS, " Sets a double parameter to a specific value."},
7677  { "MPSolverParameters_SetIntegerParam", _wrap_MPSolverParameters_SetIntegerParam, METH_VARARGS, " Sets a integer parameter to a specific value."},
7678  { "MPSolverParameters_GetDoubleParam", _wrap_MPSolverParameters_GetDoubleParam, METH_VARARGS, " Returns the value of a double parameter."},
7679  { "MPSolverParameters_GetIntegerParam", _wrap_MPSolverParameters_GetIntegerParam, METH_VARARGS, " Returns the value of an integer parameter."},
7680  { "delete_MPSolverParameters", _wrap_delete_MPSolverParameters, METH_O, NULL},
7681  { "MPSolverParameters_swigregister", MPSolverParameters_swigregister, METH_O, NULL},
7682  { "MPSolverParameters_swiginit", MPSolverParameters_swiginit, METH_VARARGS, NULL},
7683  { "new_ModelExportOptions", _wrap_new_ModelExportOptions, METH_NOARGS, NULL},
7684  { "delete_ModelExportOptions", _wrap_delete_ModelExportOptions, METH_O, NULL},
7685  { "ModelExportOptions_swigregister", ModelExportOptions_swigregister, METH_O, NULL},
7686  { "ModelExportOptions_swiginit", ModelExportOptions_swiginit, METH_VARARGS, NULL},
7687  { "ExportModelAsLpFormat", _wrap_ExportModelAsLpFormat, METH_VARARGS, NULL},
7688  { "ExportModelAsMpsFormat", _wrap_ExportModelAsMpsFormat, METH_VARARGS, NULL},
7689  { "FindErrorInModelProto", _wrap_FindErrorInModelProto, METH_O, NULL},
7690  { NULL, NULL, 0, NULL }
7691 };
7692 
7693 static PyMethodDef SwigMethods_proxydocs[] = {
7694  { NULL, NULL, 0, NULL }
7695 };
7696 
7697 
7698 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
7699 
7700 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
7701 static swig_type_info _swigt__p_int = {"_p_int", "int *|int_least32_t *|int32_t *", 0, 0, (void*)0, 0};
7702 static swig_type_info _swigt__p_long = {"_p_long", "intptr_t *|int_least64_t *|int_fast32_t *|int_fast64_t *|int64_t *|long *|int_fast16_t *|intmax_t *", 0, 0, (void*)0, 0};
7703 static swig_type_info _swigt__p_operations_research__MPConstraint = {"_p_operations_research__MPConstraint", "operations_research::MPConstraint *", 0, 0, (void*)0, 0};
7704 static swig_type_info _swigt__p_operations_research__MPModelExportOptions = {"_p_operations_research__MPModelExportOptions", "operations_research::MPModelExportOptions *", 0, 0, (void*)0, 0};
7705 static swig_type_info _swigt__p_operations_research__MPModelRequest = {"_p_operations_research__MPModelRequest", "operations_research::MPModelRequest *", 0, 0, (void*)0, 0};
7706 static swig_type_info _swigt__p_operations_research__MPObjective = {"_p_operations_research__MPObjective", "operations_research::MPObjective *", 0, 0, (void*)0, 0};
7707 static swig_type_info _swigt__p_operations_research__MPSolver = {"_p_operations_research__MPSolver", "operations_research::MPSolver *", 0, 0, (void*)0, 0};
7708 static swig_type_info _swigt__p_operations_research__MPSolverParameters = {"_p_operations_research__MPSolverParameters", "operations_research::MPSolverParameters *", 0, 0, (void*)0, 0};
7709 static swig_type_info _swigt__p_operations_research__MPVariable = {"_p_operations_research__MPVariable", "operations_research::MPVariable *", 0, 0, (void*)0, 0};
7710 static swig_type_info _swigt__p_short = {"_p_short", "short *|int_least16_t *|int16_t *", 0, 0, (void*)0, 0};
7711 static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "signed char *|int_least8_t *|int_fast8_t *|int8_t *", 0, 0, (void*)0, 0};
7712 static swig_type_info _swigt__p_std__ostream = {"_p_std__ostream", "std::ostream *", 0, 0, (void*)0, 0};
7713 static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|uint_least8_t *|uint_fast8_t *|uint8_t *", 0, 0, (void*)0, 0};
7714 static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "uint_least32_t *|uint32_t *|unsigned int *", 0, 0, (void*)0, 0};
7715 static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "uintptr_t *|uint_least64_t *|uint_fast32_t *|uint_fast64_t *|uint64_t *|unsigned long *|uint_fast16_t *|uintmax_t *", 0, 0, (void*)0, 0};
7716 static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|uint_least16_t *|uint16_t *", 0, 0, (void*)0, 0};
7717 
7719  &_swigt__p_char,
7720  &_swigt__p_int,
7721  &_swigt__p_long,
7729  &_swigt__p_short,
7736 };
7737 
7738 static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
7739 static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
7740 static swig_cast_info _swigc__p_long[] = { {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
7748 static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}};
7749 static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}};
7750 static swig_cast_info _swigc__p_std__ostream[] = { {&_swigt__p_std__ostream, 0, 0, 0},{0, 0, 0, 0}};
7751 static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
7752 static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
7753 static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
7755 
7758  _swigc__p_int,
7774 };
7775 
7776 
7777 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
7778 
7780 {0, 0, 0, 0.0, 0, 0}};
7781 
7782 #ifdef __cplusplus
7783 }
7784 #endif
7785 /* -----------------------------------------------------------------------------
7786  * Type initialization:
7787  * This problem is tough by the requirement that no dynamic
7788  * memory is used. Also, since swig_type_info structures store pointers to
7789  * swig_cast_info structures and swig_cast_info structures store pointers back
7790  * to swig_type_info structures, we need some lookup code at initialization.
7791  * The idea is that swig generates all the structures that are needed.
7792  * The runtime then collects these partially filled structures.
7793  * The SWIG_InitializeModule function takes these initial arrays out of
7794  * swig_module, and does all the lookup, filling in the swig_module.types
7795  * array with the correct data and linking the correct swig_cast_info
7796  * structures together.
7797  *
7798  * The generated swig_type_info structures are assigned statically to an initial
7799  * array. We just loop through that array, and handle each type individually.
7800  * First we lookup if this type has been already loaded, and if so, use the
7801  * loaded structure instead of the generated one. Then we have to fill in the
7802  * cast linked list. The cast data is initially stored in something like a
7803  * two-dimensional array. Each row corresponds to a type (there are the same
7804  * number of rows as there are in the swig_type_initial array). Each entry in
7805  * a column is one of the swig_cast_info structures for that type.
7806  * The cast_initial array is actually an array of arrays, because each row has
7807  * a variable number of columns. So to actually build the cast linked list,
7808  * we find the array of casts associated with the type, and loop through it
7809  * adding the casts to the list. The one last trick we need to do is making
7810  * sure the type pointer in the swig_cast_info struct is correct.
7811  *
7812  * First off, we lookup the cast->type name to see if it is already loaded.
7813  * There are three cases to handle:
7814  * 1) If the cast->type has already been loaded AND the type we are adding
7815  * casting info to has not been loaded (it is in this module), THEN we
7816  * replace the cast->type pointer with the type pointer that has already
7817  * been loaded.
7818  * 2) If BOTH types (the one we are adding casting info to, and the
7819  * cast->type) are loaded, THEN the cast info has already been loaded by
7820  * the previous module so we just ignore it.
7821  * 3) Finally, if cast->type has not already been loaded, then we add that
7822  * swig_cast_info to the linked list (because the cast->type) pointer will
7823  * be correct.
7824  * ----------------------------------------------------------------------------- */
7825 
7826 #ifdef __cplusplus
7827 extern "C" {
7828 #if 0
7829 } /* c-mode */
7830 #endif
7831 #endif
7832 
7833 #if 0
7834 #define SWIGRUNTIME_DEBUG
7835 #endif
7836 
7837 
7838 SWIGRUNTIME void
7839 SWIG_InitializeModule(void *clientdata) {
7840  size_t i;
7841  swig_module_info *module_head, *iter;
7842  int init;
7843 
7844  /* check to see if the circular list has been setup, if not, set it up */
7845  if (swig_module.next==0) {
7846  /* Initialize the swig_module */
7850  init = 1;
7851  } else {
7852  init = 0;
7853  }
7854 
7855  /* Try and load any already created modules */
7856  module_head = SWIG_GetModule(clientdata);
7857  if (!module_head) {
7858  /* This is the first module loaded for this interpreter */
7859  /* so set the swig module into the interpreter */
7860  SWIG_SetModule(clientdata, &swig_module);
7861  } else {
7862  /* the interpreter has loaded a SWIG module, but has it loaded this one? */
7863  iter=module_head;
7864  do {
7865  if (iter==&swig_module) {
7866  /* Our module is already in the list, so there's nothing more to do. */
7867  return;
7868  }
7869  iter=iter->next;
7870  } while (iter!= module_head);
7871 
7872  /* otherwise we must add our module into the list */
7873  swig_module.next = module_head->next;
7874  module_head->next = &swig_module;
7875  }
7876 
7877  /* When multiple interpreters are used, a module could have already been initialized in
7878  a different interpreter, but not yet have a pointer in this interpreter.
7879  In this case, we do not want to continue adding types... everything should be
7880  set up already */
7881  if (init == 0) return;
7882 
7883  /* Now work on filling in swig_module.types */
7884 #ifdef SWIGRUNTIME_DEBUG
7885  printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
7886 #endif
7887  for (i = 0; i < swig_module.size; ++i) {
7888  swig_type_info *type = 0;
7889  swig_type_info *ret;
7890  swig_cast_info *cast;
7891 
7892 #ifdef SWIGRUNTIME_DEBUG
7893  printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
7894 #endif
7895 
7896  /* if there is another module already loaded */
7897  if (swig_module.next != &swig_module) {
7899  }
7900  if (type) {
7901  /* Overwrite clientdata field */
7902 #ifdef SWIGRUNTIME_DEBUG
7903  printf("SWIG_InitializeModule: found type %s\n", type->name);
7904 #endif
7907 #ifdef SWIGRUNTIME_DEBUG
7908  printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
7909 #endif
7910  }
7911  } else {
7912  type = swig_module.type_initial[i];
7913  }
7914 
7915  /* Insert casting types */
7916  cast = swig_module.cast_initial[i];
7917  while (cast->type) {
7918  /* Don't need to add information already in the list */
7919  ret = 0;
7920 #ifdef SWIGRUNTIME_DEBUG
7921  printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
7922 #endif
7923  if (swig_module.next != &swig_module) {
7925 #ifdef SWIGRUNTIME_DEBUG
7926  if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
7927 #endif
7928  }
7929  if (ret) {
7930  if (type == swig_module.type_initial[i]) {
7931 #ifdef SWIGRUNTIME_DEBUG
7932  printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
7933 #endif
7934  cast->type = ret;
7935  ret = 0;
7936  } else {
7937  /* Check for casting already in the list */
7938  swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
7939 #ifdef SWIGRUNTIME_DEBUG
7940  if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
7941 #endif
7942  if (!ocast) ret = 0;
7943  }
7944  }
7945 
7946  if (!ret) {
7947 #ifdef SWIGRUNTIME_DEBUG
7948  printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
7949 #endif
7950  if (type->cast) {
7951  type->cast->prev = cast;
7952  cast->next = type->cast;
7953  }
7954  type->cast = cast;
7955  }
7956  cast++;
7957  }
7958  /* Set entry in modules->types array equal to the type */
7959  swig_module.types[i] = type;
7960  }
7961  swig_module.types[i] = 0;
7962 
7963 #ifdef SWIGRUNTIME_DEBUG
7964  printf("**** SWIG_InitializeModule: Cast List ******\n");
7965  for (i = 0; i < swig_module.size; ++i) {
7966  int j = 0;
7968  printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
7969  while (cast->type) {
7970  printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
7971  cast++;
7972  ++j;
7973  }
7974  printf("---- Total casts: %d\n",j);
7975  }
7976  printf("**** SWIG_InitializeModule: Cast List ******\n");
7977 #endif
7978 }
7979 
7980 /* This function will propagate the clientdata field of type to
7981 * any new swig_type_info structures that have been added into the list
7982 * of equivalent types. It is like calling
7983 * SWIG_TypeClientData(type, clientdata) a second time.
7984 */
7985 SWIGRUNTIME void
7987  size_t i;
7988  swig_cast_info *equiv;
7989  static int init_run = 0;
7990 
7991  if (init_run) return;
7992  init_run = 1;
7993 
7994  for (i = 0; i < swig_module.size; i++) {
7995  if (swig_module.types[i]->clientdata) {
7996  equiv = swig_module.types[i]->cast;
7997  while (equiv) {
7998  if (!equiv->converter) {
7999  if (equiv->type && !equiv->type->clientdata)
8001  }
8002  equiv = equiv->next;
8003  }
8004  }
8005  }
8006 }
8007 
8008 #ifdef __cplusplus
8009 #if 0
8010 {
8011  /* c-mode */
8012 #endif
8013 }
8014 #endif
8015 
8016 
8017 
8018 #ifdef __cplusplus
8019 extern "C" {
8020 #endif
8021 
8022  /* Python-specific SWIG API */
8023 #define SWIG_newvarlink() SWIG_Python_newvarlink()
8024 #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
8025 #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
8026 
8027  /* -----------------------------------------------------------------------------
8028  * global variable support code.
8029  * ----------------------------------------------------------------------------- */
8030 
8031  typedef struct swig_globalvar {
8032  char *name; /* Name of global variable */
8033  PyObject *(*get_attr)(void); /* Return the current value */
8034  int (*set_attr)(PyObject *); /* Set the value */
8035  struct swig_globalvar *next;
8037 
8038  typedef struct swig_varlinkobject {
8039  PyObject_HEAD
8042 
8043  SWIGINTERN PyObject *
8045 #if PY_VERSION_HEX >= 0x03000000
8046  return PyUnicode_InternFromString("<Swig global variables>");
8047 #else
8048  return PyString_FromString("<Swig global variables>");
8049 #endif
8050  }
8051 
8052  SWIGINTERN PyObject *
8054 #if PY_VERSION_HEX >= 0x03000000
8055  PyObject *str = PyUnicode_InternFromString("(");
8056  PyObject *tail;
8057  PyObject *joined;
8059  for (var = v->vars; var; var=var->next) {
8060  tail = PyUnicode_FromString(var->name);
8061  joined = PyUnicode_Concat(str, tail);
8062  Py_DecRef(str);
8063  Py_DecRef(tail);
8064  str = joined;
8065  if (var->next) {
8066  tail = PyUnicode_InternFromString(", ");
8067  joined = PyUnicode_Concat(str, tail);
8068  Py_DecRef(str);
8069  Py_DecRef(tail);
8070  str = joined;
8071  }
8072  }
8073  tail = PyUnicode_InternFromString(")");
8074  joined = PyUnicode_Concat(str, tail);
8075  Py_DecRef(str);
8076  Py_DecRef(tail);
8077  str = joined;
8078 #else
8079  PyObject *str = PyString_FromString("(");
8081  for (var = v->vars; var; var=var->next) {
8082  PyString_ConcatAndDel(&str,PyString_FromString(var->name));
8083  if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
8084  }
8085  PyString_ConcatAndDel(&str,PyString_FromString(")"));
8086 #endif
8087  return str;
8088  }
8089 
8090  SWIGINTERN void
8092  swig_globalvar *var = v->vars;
8093  while (var) {
8094  swig_globalvar *n = var->next;
8095  free(var->name);
8096  free(var);
8097  var = n;
8098  }
8099  }
8100 
8101  SWIGINTERN PyObject *
8103  PyObject *res = NULL;
8104  swig_globalvar *var = v->vars;
8105  while (var) {
8106  if (strcmp(var->name,n) == 0) {
8107  res = (*var->get_attr)();
8108  break;
8109  }
8110  var = var->next;
8111  }
8112  if (res == NULL && !PyErr_Occurred()) {
8113  PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
8114  }
8115  return res;
8116  }
8117 
8118  SWIGINTERN int
8119  swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
8120  int res = 1;
8121  swig_globalvar *var = v->vars;
8122  while (var) {
8123  if (strcmp(var->name,n) == 0) {
8124  res = (*var->set_attr)(p);
8125  break;
8126  }
8127  var = var->next;
8128  }
8129  if (res == 1 && !PyErr_Occurred()) {
8130  PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
8131  }
8132  return res;
8133  }
8134 
8135  SWIGINTERN PyTypeObject*
8137  static char varlink__doc__[] = "Swig var link object";
8138  static PyTypeObject varlink_type;
8139  static int type_init = 0;
8140  if (!type_init) {
8141  const PyTypeObject tmp = {
8142 #if PY_VERSION_HEX >= 0x03000000
8143  PyVarObject_HEAD_INIT(NULL, 0)
8144 #else
8145  PyObject_HEAD_INIT(NULL)
8146  0, /* ob_size */
8147 #endif
8148  "swigvarlink", /* tp_name */
8149  sizeof(swig_varlinkobject), /* tp_basicsize */
8150  0, /* tp_itemsize */
8151  (destructor) swig_varlink_dealloc, /* tp_dealloc */
8152  0, /* tp_print */
8153  (getattrfunc) swig_varlink_getattr, /* tp_getattr */
8154  (setattrfunc) swig_varlink_setattr, /* tp_setattr */
8155  0, /* tp_compare */
8156  (reprfunc) swig_varlink_repr, /* tp_repr */
8157  0, /* tp_as_number */
8158  0, /* tp_as_sequence */
8159  0, /* tp_as_mapping */
8160  0, /* tp_hash */
8161  0, /* tp_call */
8162  (reprfunc) swig_varlink_str, /* tp_str */
8163  0, /* tp_getattro */
8164  0, /* tp_setattro */
8165  0, /* tp_as_buffer */
8166  0, /* tp_flags */
8167  varlink__doc__, /* tp_doc */
8168  0, /* tp_traverse */
8169  0, /* tp_clear */
8170  0, /* tp_richcompare */
8171  0, /* tp_weaklistoffset */
8172  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
8173  0, /* tp_del */
8174  0, /* tp_version_tag */
8175 #if PY_VERSION_HEX >= 0x03040000
8176  0, /* tp_finalize */
8177 #endif
8178 #if PY_VERSION_HEX >= 0x03080000
8179  0, /* tp_vectorcall */
8180 #endif
8181 #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
8182  0, /* tp_print */
8183 #endif
8184 #ifdef COUNT_ALLOCS
8185  0, /* tp_allocs */
8186  0, /* tp_frees */
8187  0, /* tp_maxalloc */
8188  0, /* tp_prev */
8189  0 /* tp_next */
8190 #endif
8191  };
8192  varlink_type = tmp;
8193  type_init = 1;
8194  if (PyType_Ready(&varlink_type) < 0)
8195  return NULL;
8196  }
8197  return &varlink_type;
8198  }
8199 
8200  /* Create a variable linking object for use later */
8201  SWIGINTERN PyObject *
8203  swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
8204  if (result) {
8205  result->vars = 0;
8206  }
8207  return ((PyObject*) result);
8208  }
8209 
8210  SWIGINTERN void
8211  SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
8214  if (gv) {
8215  size_t size = strlen(name)+1;
8216  gv->name = (char *)malloc(size);
8217  if (gv->name) {
8218  memcpy(gv->name, name, size);
8219  gv->get_attr = get_attr;
8220  gv->set_attr = set_attr;
8221  gv->next = v->vars;
8222  }
8223  }
8224  v->vars = gv;
8225  }
8226 
8227  SWIGINTERN PyObject *
8229  static PyObject *globals = 0;
8230  if (!globals) {
8231  globals = SWIG_newvarlink();
8232  }
8233  return globals;
8234  }
8235 
8236  /* -----------------------------------------------------------------------------
8237  * constants/methods manipulation
8238  * ----------------------------------------------------------------------------- */
8239 
8240  /* Install Constants */
8241  SWIGINTERN void
8242  SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
8243  PyObject *obj = 0;
8244  size_t i;
8245  for (i = 0; constants[i].type; ++i) {
8246  switch(constants[i].type) {
8247  case SWIG_PY_POINTER:
8248  obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
8249  break;
8250  case SWIG_PY_BINARY:
8251  obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
8252  break;
8253  default:
8254  obj = 0;
8255  break;
8256  }
8257  if (obj) {
8258  PyDict_SetItemString(d, constants[i].name, obj);
8259  Py_DECREF(obj);
8260  }
8261  }
8262  }
8263 
8264  /* -----------------------------------------------------------------------------*/
8265  /* Fix SwigMethods to carry the callback ptrs when needed */
8266  /* -----------------------------------------------------------------------------*/
8267 
8268  SWIGINTERN void
8269  SWIG_Python_FixMethods(PyMethodDef *methods,
8270  swig_const_info *const_table,
8271  swig_type_info **types,
8272  swig_type_info **types_initial) {
8273  size_t i;
8274  for (i = 0; methods[i].ml_name; ++i) {
8275  const char *c = methods[i].ml_doc;
8276  if (!c) continue;
8277  c = strstr(c, "swig_ptr: ");
8278  if (c) {
8279  int j;
8280  swig_const_info *ci = 0;
8281  const char *name = c + 10;
8282  for (j = 0; const_table[j].type; ++j) {
8283  if (strncmp(const_table[j].name, name,
8284  strlen(const_table[j].name)) == 0) {
8285  ci = &(const_table[j]);
8286  break;
8287  }
8288  }
8289  if (ci) {
8290  void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
8291  if (ptr) {
8292  size_t shift = (ci->ptype) - types;
8293  swig_type_info *ty = types_initial[shift];
8294  size_t ldoc = (c - methods[i].ml_doc);
8295  size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
8296  char *ndoc = (char*)malloc(ldoc + lptr + 10);
8297  if (ndoc) {
8298  char *buff = ndoc;
8299  memcpy(buff, methods[i].ml_doc, ldoc);
8300  buff += ldoc;
8301  memcpy(buff, "swig_ptr: ", 10);
8302  buff += 10;
8303  SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
8304  methods[i].ml_doc = ndoc;
8305  }
8306  }
8307  }
8308  }
8309  }
8310  }
8311 
8312  /* -----------------------------------------------------------------------------
8313  * Method creation and docstring support functions
8314  * ----------------------------------------------------------------------------- */
8315 
8316  /* -----------------------------------------------------------------------------
8317  * Function to find the method definition with the correct docstring for the
8318  * proxy module as opposed to the low-level API
8319  * ----------------------------------------------------------------------------- */
8320 
8321  SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) {
8322  /* Find the function in the modified method table */
8323  size_t offset = 0;
8324  int found = 0;
8325  while (SwigMethods_proxydocs[offset].ml_meth != NULL) {
8326  if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) {
8327  found = 1;
8328  break;
8329  }
8330  offset++;
8331  }
8332  /* Use the copy with the modified docstring if available */
8333  return found ? &SwigMethods_proxydocs[offset] : NULL;
8334  }
8335 
8336  /* -----------------------------------------------------------------------------
8337  * Wrapper of PyInstanceMethod_New() used in Python 3
8338  * It is exported to the generated module, used for -fastproxy
8339  * ----------------------------------------------------------------------------- */
8340 
8341  SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
8342  if (PyCFunction_Check(func)) {
8343  PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
8344  PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
8345  if (ml)
8346  func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
8347  }
8348 #if PY_VERSION_HEX >= 0x03000000
8349  return PyInstanceMethod_New(func);
8350 #else
8351  return PyMethod_New(func, NULL, NULL);
8352 #endif
8353  }
8354 
8355  /* -----------------------------------------------------------------------------
8356  * Wrapper of PyStaticMethod_New()
8357  * It is exported to the generated module, used for -fastproxy
8358  * ----------------------------------------------------------------------------- */
8359 
8360  SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
8361  if (PyCFunction_Check(func)) {
8362  PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
8363  PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
8364  if (ml)
8365  func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
8366  }
8367  return PyStaticMethod_New(func);
8368  }
8369 
8370 #ifdef __cplusplus
8371 }
8372 #endif
8373 
8374 /* -----------------------------------------------------------------------------*
8375  * Partial Init method
8376  * -----------------------------------------------------------------------------*/
8377 
8378 #ifdef __cplusplus
8379 extern "C"
8380 #endif
8381 
8382 SWIGEXPORT
8383 #if PY_VERSION_HEX >= 0x03000000
8384 PyObject*
8385 #else
8386 void
8387 #endif
8388 SWIG_init(void) {
8389  PyObject *m, *d, *md, *globals;
8390 
8391 #if PY_VERSION_HEX >= 0x03000000
8392  static struct PyModuleDef SWIG_module = {
8393  PyModuleDef_HEAD_INIT,
8394  SWIG_name,
8395  NULL,
8396  -1,
8397  SwigMethods,
8398  NULL,
8399  NULL,
8400  NULL,
8401  NULL
8402  };
8403 #endif
8404 
8405 #if defined(SWIGPYTHON_BUILTIN)
8406  static SwigPyClientData SwigPyObject_clientdata = {
8407  0, 0, 0, 0, 0, 0, 0
8408  };
8409  static PyGetSetDef this_getset_def = {
8410  (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
8411  };
8412  static SwigPyGetSet thisown_getset_closure = {
8415  };
8416  static PyGetSetDef thisown_getset_def = {
8417  (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
8418  };
8419  PyTypeObject *builtin_pytype;
8420  int builtin_base_count;
8421  swig_type_info *builtin_basetype;
8422  PyObject *tuple;
8423  PyGetSetDescrObject *static_getset;
8424  PyTypeObject *metatype;
8425  PyTypeObject *swigpyobject;
8426  SwigPyClientData *cd;
8427  PyObject *public_interface, *public_symbol;
8428  PyObject *this_descr;
8429  PyObject *thisown_descr;
8430  PyObject *self = 0;
8431  int i;
8432 
8433  (void)builtin_pytype;
8434  (void)builtin_base_count;
8435  (void)builtin_basetype;
8436  (void)tuple;
8437  (void)static_getset;
8438  (void)self;
8439 
8440  /* Metaclass is used to implement static member variables */
8441  metatype = SwigPyObjectType();
8442  assert(metatype);
8443 #endif
8444 
8445  (void)globals;
8446 
8447  /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
8448  SWIG_This();
8451 #ifndef SWIGPYTHON_BUILTIN
8453 #endif
8454 
8455  /* Fix SwigMethods to carry the callback ptrs when needed */
8457 
8458 #if PY_VERSION_HEX >= 0x03000000
8459  m = PyModule_Create(&SWIG_module);
8460 #else
8461  m = Py_InitModule(SWIG_name, SwigMethods);
8462 #endif
8463 
8464  md = d = PyModule_GetDict(m);
8465  (void)md;
8466 
8468 
8469 #ifdef SWIGPYTHON_BUILTIN
8470  swigpyobject = SwigPyObject_TypeOnce();
8471 
8472  SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
8473  assert(SwigPyObject_stype);
8474  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
8475  if (!cd) {
8476  SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
8477  SwigPyObject_clientdata.pytype = swigpyobject;
8478  } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
8479  PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
8480 # if PY_VERSION_HEX >= 0x03000000
8481  return NULL;
8482 # else
8483  return;
8484 # endif
8485  }
8486 
8487  /* All objects have a 'this' attribute */
8488  this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
8489  (void)this_descr;
8490 
8491  /* All objects have a 'thisown' attribute */
8492  thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
8493  (void)thisown_descr;
8494 
8495  public_interface = PyList_New(0);
8496  public_symbol = 0;
8497  (void)public_symbol;
8498 
8499  PyDict_SetItemString(md, "__all__", public_interface);
8500  Py_DECREF(public_interface);
8501  for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
8502  SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
8503  for (i = 0; swig_const_table[i].name != 0; ++i)
8504  SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
8505 #endif
8506 
8508 
8509  SWIG_Python_SetConstant(d, "Solver_CLP_LINEAR_PROGRAMMING",SWIG_From_int(static_cast< int >(operations_research::MPSolver::CLP_LINEAR_PROGRAMMING)));
8510  SWIG_Python_SetConstant(d, "Solver_GLPK_LINEAR_PROGRAMMING",SWIG_From_int(static_cast< int >(operations_research::MPSolver::GLPK_LINEAR_PROGRAMMING)));
8511  SWIG_Python_SetConstant(d, "Solver_GLOP_LINEAR_PROGRAMMING",SWIG_From_int(static_cast< int >(operations_research::MPSolver::GLOP_LINEAR_PROGRAMMING)));
8512  SWIG_Python_SetConstant(d, "Solver_SCIP_MIXED_INTEGER_PROGRAMMING",SWIG_From_int(static_cast< int >(operations_research::MPSolver::SCIP_MIXED_INTEGER_PROGRAMMING)));
8513  SWIG_Python_SetConstant(d, "Solver_GLPK_MIXED_INTEGER_PROGRAMMING",SWIG_From_int(static_cast< int >(operations_research::MPSolver::GLPK_MIXED_INTEGER_PROGRAMMING)));
8514  SWIG_Python_SetConstant(d, "Solver_CBC_MIXED_INTEGER_PROGRAMMING",SWIG_From_int(static_cast< int >(operations_research::MPSolver::CBC_MIXED_INTEGER_PROGRAMMING)));
8515  SWIG_Python_SetConstant(d, "Solver_GUROBI_LINEAR_PROGRAMMING",SWIG_From_int(static_cast< int >(operations_research::MPSolver::GUROBI_LINEAR_PROGRAMMING)));
8516  SWIG_Python_SetConstant(d, "Solver_GUROBI_MIXED_INTEGER_PROGRAMMING",SWIG_From_int(static_cast< int >(operations_research::MPSolver::GUROBI_MIXED_INTEGER_PROGRAMMING)));
8517  SWIG_Python_SetConstant(d, "Solver_CPLEX_LINEAR_PROGRAMMING",SWIG_From_int(static_cast< int >(operations_research::MPSolver::CPLEX_LINEAR_PROGRAMMING)));
8518  SWIG_Python_SetConstant(d, "Solver_CPLEX_MIXED_INTEGER_PROGRAMMING",SWIG_From_int(static_cast< int >(operations_research::MPSolver::CPLEX_MIXED_INTEGER_PROGRAMMING)));
8519  SWIG_Python_SetConstant(d, "Solver_XPRESS_LINEAR_PROGRAMMING",SWIG_From_int(static_cast< int >(operations_research::MPSolver::XPRESS_LINEAR_PROGRAMMING)));
8520  SWIG_Python_SetConstant(d, "Solver_XPRESS_MIXED_INTEGER_PROGRAMMING",SWIG_From_int(static_cast< int >(operations_research::MPSolver::XPRESS_MIXED_INTEGER_PROGRAMMING)));
8521  SWIG_Python_SetConstant(d, "Solver_BOP_INTEGER_PROGRAMMING",SWIG_From_int(static_cast< int >(operations_research::MPSolver::BOP_INTEGER_PROGRAMMING)));
8522  SWIG_Python_SetConstant(d, "Solver_SAT_INTEGER_PROGRAMMING",SWIG_From_int(static_cast< int >(operations_research::MPSolver::SAT_INTEGER_PROGRAMMING)));
8523  SWIG_Python_SetConstant(d, "Solver_OPTIMAL",SWIG_From_int(static_cast< int >(operations_research::MPSolver::OPTIMAL)));
8524  SWIG_Python_SetConstant(d, "Solver_FEASIBLE",SWIG_From_int(static_cast< int >(operations_research::MPSolver::FEASIBLE)));
8525  SWIG_Python_SetConstant(d, "Solver_INFEASIBLE",SWIG_From_int(static_cast< int >(operations_research::MPSolver::INFEASIBLE)));
8526  SWIG_Python_SetConstant(d, "Solver_UNBOUNDED",SWIG_From_int(static_cast< int >(operations_research::MPSolver::UNBOUNDED)));
8527  SWIG_Python_SetConstant(d, "Solver_ABNORMAL",SWIG_From_int(static_cast< int >(operations_research::MPSolver::ABNORMAL)));
8528  SWIG_Python_SetConstant(d, "Solver_NOT_SOLVED",SWIG_From_int(static_cast< int >(operations_research::MPSolver::NOT_SOLVED)));
8529  SWIG_Python_SetConstant(d, "Solver_FREE",SWIG_From_int(static_cast< int >(operations_research::MPSolver::FREE)));
8530  SWIG_Python_SetConstant(d, "Solver_AT_LOWER_BOUND",SWIG_From_int(static_cast< int >(operations_research::MPSolver::AT_LOWER_BOUND)));
8531  SWIG_Python_SetConstant(d, "Solver_AT_UPPER_BOUND",SWIG_From_int(static_cast< int >(operations_research::MPSolver::AT_UPPER_BOUND)));
8532  SWIG_Python_SetConstant(d, "Solver_FIXED_VALUE",SWIG_From_int(static_cast< int >(operations_research::MPSolver::FIXED_VALUE)));
8533  SWIG_Python_SetConstant(d, "Solver_BASIC",SWIG_From_int(static_cast< int >(operations_research::MPSolver::BASIC)));
8534  SWIG_Python_SetConstant(d, "MPSolverParameters_RELATIVE_MIP_GAP",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::RELATIVE_MIP_GAP)));
8535  SWIG_Python_SetConstant(d, "MPSolverParameters_PRIMAL_TOLERANCE",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::PRIMAL_TOLERANCE)));
8536  SWIG_Python_SetConstant(d, "MPSolverParameters_DUAL_TOLERANCE",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::DUAL_TOLERANCE)));
8537  SWIG_Python_SetConstant(d, "MPSolverParameters_PRESOLVE",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::PRESOLVE)));
8538  SWIG_Python_SetConstant(d, "MPSolverParameters_LP_ALGORITHM",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::LP_ALGORITHM)));
8539  SWIG_Python_SetConstant(d, "MPSolverParameters_INCREMENTALITY",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::INCREMENTALITY)));
8540  SWIG_Python_SetConstant(d, "MPSolverParameters_SCALING",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::SCALING)));
8541  SWIG_Python_SetConstant(d, "MPSolverParameters_PRESOLVE_OFF",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::PRESOLVE_OFF)));
8542  SWIG_Python_SetConstant(d, "MPSolverParameters_PRESOLVE_ON",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::PRESOLVE_ON)));
8543  SWIG_Python_SetConstant(d, "MPSolverParameters_DUAL",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::DUAL)));
8544  SWIG_Python_SetConstant(d, "MPSolverParameters_PRIMAL",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::PRIMAL)));
8545  SWIG_Python_SetConstant(d, "MPSolverParameters_BARRIER",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::BARRIER)));
8546  SWIG_Python_SetConstant(d, "MPSolverParameters_INCREMENTALITY_OFF",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::INCREMENTALITY_OFF)));
8547  SWIG_Python_SetConstant(d, "MPSolverParameters_INCREMENTALITY_ON",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::INCREMENTALITY_ON)));
8548  SWIG_Python_SetConstant(d, "MPSolverParameters_SCALING_OFF",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::SCALING_OFF)));
8549  SWIG_Python_SetConstant(d, "MPSolverParameters_SCALING_ON",SWIG_From_int(static_cast< int >(operations_research::MPSolverParameters::SCALING_ON)));
8550  globals = SWIG_globals();
8551  if (!globals) {
8552  PyErr_SetString(PyExc_TypeError, "Failure to create SWIG globals.");
8553 #if PY_VERSION_HEX >= 0x03000000
8554  return NULL;
8555 #else
8556  return;
8557 #endif
8558  }
8559  PyDict_SetItemString(md, "cvar", globals);
8560  Py_DECREF(globals);
8566 #if PY_VERSION_HEX >= 0x03000000
8567  return m;
8568 #else
8569  return;
8570 #endif
8571 }
8572 
int64_t max
Definition: alldiff_cst.cc:140
int64_t min
Definition: alldiff_cst.cc:139
#define LOG(severity)
Definition: base/logging.h:423
The class for constraints of a Mathematical Programming (MP) model.
A class to express a linear objective.
This mathematical programming (MP) solver class is the main class though which users build and solve ...
static bool SupportsProblemType(OptimizationProblemType problem_type)
Whether the given problem type is supported (this will depend on the targets that you linked).
static MPSolver * CreateSolver(const std::string &solver_id)
Recommended factory method to create a MPSolver instance, especially in non C++ languages.
ResultStatus
The status of solving the problem.
@ FEASIBLE
feasible, or stopped by limit.
@ NOT_SOLVED
not been solved yet.
@ INFEASIBLE
proven infeasible.
@ UNBOUNDED
proven unbounded.
@ ABNORMAL
abnormal, i.e., error of some kind.
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...
OptimizationProblemType
The type of problems (LP or MIP) that will be solved and the underlying solver (GLOP,...
std::vector< double > ComputeConstraintActivities() const
Advanced usage: compute the "activities" of all constraints, which are the sums of their linear terms...
static double infinity()
Infinity.
ABSL_MUST_USE_RESULT bool NextSolution()
Some solvers (MIP only, not LP) can produce multiple solutions to the problem.
bool InterruptSolve()
Interrupts the Solve() execution to terminate processing if possible.
ResultStatus Solve()
Solves the problem using the default parameter values.
BasisStatus
Advanced usage: possible basis status values for a variable and the slack variable of a linear constr...
This class stores parameter settings for LP and MIP solvers.
@ INCREMENTALITY_OFF
Start solve from scratch.
@ INCREMENTALITY_ON
Reuse results from previous solve as much as the underlying solver allows.
static const IncrementalityValues kDefaultIncrementality
DoubleParam
Enumeration of parameters that take continuous values.
@ DUAL_TOLERANCE
Advanced usage: tolerance for dual feasibility of basic solutions.
@ PRIMAL_TOLERANCE
Advanced usage: tolerance for primal feasibility of basic solutions.
@ RELATIVE_MIP_GAP
Limit for relative MIP gap.
static const PresolveValues kDefaultPresolve
IntegerParam
Enumeration of parameters that take integer or categorical values.
@ LP_ALGORITHM
Algorithm to solve linear programs.
@ SCALING
Advanced usage: enable or disable matrix scaling.
@ PRESOLVE
Advanced usage: presolve mode.
@ INCREMENTALITY
Advanced usage: incrementality from one solve to the next.
The class for variables of a Mathematical Programming (MP) model.
SwigPtr_PyObject(PyObject *obj, bool initial_ref=true)
SwigPtr_PyObject & operator=(const SwigPtr_PyObject &item)
SwigPtr_PyObject(const SwigPtr_PyObject &item)
int64_t b
Block * next
SharedResponseManager * response
const std::string name
int64_t value
IntVar * var
Definition: expr_array.cc:1874
GRBmodel * model
A C++ wrapper that provides a simple and unified interface to several linear programming and mixed in...
SWIGRUNTIME swig_type_info * SWIG_Python_TypeQuery(const char *type)
static swig_cast_info _swigc__p_operations_research__MPObjective[]
#define SWIG_Error(code, msg)
SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz)
SWIGRUNTIME int SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty)
SWIGINTERN PyObject * _wrap_Constraint_GetCoefficient(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Solver_wall_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Variable_lb(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_cast_info * swig_cast_initial[]
#define SWIGTYPE_p_operations_research__MPSolverParameters
SWIGINTERN int Swig_var_MPSolverParameters_kDefaultPrimalTolerance_set(PyObject *)
SWIGINTERN PyObject * _wrap_Constraint_SetBounds(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * SWIG_Python_str_FromChar(const char *c)
SWIGINTERN PyObject * _wrap_Solver_Infinity(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_MangledTypeQuery(name)
static swig_type_info _swigt__p_operations_research__MPSolverParameters
SWIGINTERN PyObject * _wrap_ExportModelAsLpFormat(PyObject *self, PyObject *args)
bool CanConvertToMPConstraint(PyObject *py_obj)
SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz)
SWIGINTERN PyObject * _wrap_Solver_Constraint__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
SWIGINTERN PyObject * _wrap_delete_Objective(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * Swig_var_MPSolverParameters_kDefaultDualTolerance_get(void)
static PyObject * Swig_This_global
SWIGRUNTIME int SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
SWIGINTERN int SWIG_AsVal_double(PyObject *obj, double *val)
SWIGINTERN PyObject * swig_varlink_str(swig_varlinkobject *v)
SWIGRUNTIMEINLINE PyObject * SWIG_Python_ExceptionType(swig_type_info *desc)
SWIGINTERN Py_ssize_t SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
SWIGINTERN PyObject * Variable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Constraint_Clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_TypeQuery(name)
static swig_cast_info _swigc__p_operations_research__MPVariable[]
#define SWIG_POINTER_OWN
#define SWIG_POINTER_EXCEPTION
#define SWIG_SyntaxError
SWIGINTERN PyObject * _wrap_Variable_ReducedCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * MPSolverParameters_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_POINTER_NEW
SWIGINTERN PyObject * _wrap_Variable_Lb(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Solver_EnableOutput(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_CheckState(r)
static swig_cast_info _swigc__p_operations_research__MPConstraint[]
static swig_cast_info _swigc__p_int[]
static swig_cast_info _swigc__p_operations_research__MPModelRequest[]
SWIGINTERN PyObject * Solver_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN std::string operations_research_MPVariable___repr__(operations_research::MPVariable *self)
SWIGINTERN PyObject * _wrap_Solver_Solve(PyObject *self, PyObject *args)
SWIGINTERN PyObject * _wrap_Solver_ExportModelAsLpFormat(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb)
SWIGINTERN double operations_research_MPSolver_Infinity()
SWIGINTERN PyObject * swig_varlink_getattr(swig_varlinkobject *v, char *n)
SWIGINTERN PyObject * _wrap_Variable___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Objective_Value(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_BUFFER_SIZE
SWIGRUNTIME PyTypeObject * SwigPyPacked_TypeOnce(void)
#define SWIG_TypeError
SWIGRUNTIME int SWIG_Python_AddErrMesg(const char *mesg, int infront)
SWIGINTERN void SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[])
#define SWIGTYPE_p_operations_research__MPSolver
SWIGINTERN PyObject * _wrap_FindErrorInModelProto(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_POINTER_IMPLICIT_CONV
SWIGINTERN PyObject * _wrap_Variable_SetLb(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_PY_POINTER
struct swig_cast_info swig_cast_info
SWIGINTERN PyObject * _wrap_ExportModelAsLpFormat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
#define SWIG_init
SWIGINTERN PyObject * _wrap_Solver_ComputeConstraintActivities(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN int swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p)
SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2)
SWIGINTERN PyObject * _wrap_Solver_SetTimeLimit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Objective_minimization(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Objective_Offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIGTYPE_p_operations_research__MPConstraint
#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)
SWIGRUNTIME void SwigPyObject_dealloc(PyObject *v)
#define SWIG_PYTHON_THREAD_END_BLOCK
SWIGINTERN std::string operations_research_MPSolver_LoadModelFromProto(operations_research::MPSolver *self, operations_research::MPModelProto const &input_model)
SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory)
SWIGINTERN PyObject * _wrap_Variable_SetInteger(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_type_info _swigt__p_operations_research__MPVariable
SWIGINTERN PyObject * _wrap_Constraint_SetCoefficient(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Solver_variables(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_RuntimeError
SWIGINTERN PyObject * _wrap_delete_Constraint(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Variable_Ub(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Variable_solution_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Solver_Constraint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
SWIGINTERN PyObject * Swig_var_MPSolverParameters_kDefaultPresolve_get(void)
SWIGINTERN PyObject * _wrap_Constraint_Lb(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
struct swig_varlinkobject swig_varlinkobject
#define SWIG_NewClientData(obj)
SWIGINTERN PyObject * _wrap_Variable___repr__(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Constraint_set_is_lazy(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Objective_maximization(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define PyObject_DEL
SWIGINTERN PyObject * _wrap_Variable_integer(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
bool CanConvertToMPVariable(PyObject *py_obj)
SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type)
static swig_type_info _swigt__p_unsigned_char
SWIGINTERNINLINE int SWIG_CanCastAsInteger(double *d, double min, double max)
SWIGINTERN PyObject * Swig_var_MPSolverParameters_kDefaultIncrementality_get(void)
SWIGINTERN PyObject * _wrap_Solver_Constraint(PyObject *self, PyObject *args)
#define SWIGRUNTIME
SWIGINTERN PyObject * SwigPyObject_disown(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
SWIGINTERN double operations_research_MPVariable_Lb(operations_research::MPVariable const *self)
#define SWIG_PY_BINARY
SWIGINTERN PyObject * _wrap_Solver_SetNumThreads(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_type_info _swigt__p_operations_research__MPModelExportOptions
SWIGINTERN PyObject * _wrap_Objective_Clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_new_Solver(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_RUNTIME_VERSION
SWIGINTERN void operations_research_MPVariable_SetLb(operations_research::MPVariable *self, double x)
#define SWIG_addvarlink(p, name, get_attr, set_attr)
#define SWIG_POINTER_NOSHADOW
SWIGINTERN PyObject * SwigPyObject_own(PyObject *v, PyObject *args)
#define SWIG_OLDOBJ
SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata)
static swig_type_info _swigt__p_short
#define SWIG_ValueError
SWIGINTERN void SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int(*set_attr)(PyObject *p))
SWIGINTERN PyObject * SWIG_Python_newvarlink(void)
SWIGINTERN PyObject * _wrap_Solver_SupportsProblemType(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static PyMethodDef swigobject_methods[]
#define SWIG_AddCast(r)
static swig_cast_info _swigc__p_std__ostream[]
#define SWIG_IsNewObj(r)
SWIGRUNTIME PyObject * SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
SWIGINTERN PyObject * _wrap_Variable_ub(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyObject * SWIG_Python_ErrorType(int code)
#define SWIG_InternalNewPointerObj(ptr, type, flags)
SWIGINTERN PyObject * Constraint_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIMEINLINE PyObject * SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type)
#define SWIG_exception_fail(code, msg)
SWIGINTERN PyObject * _wrap_Solver_Constraint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
SWIGINTERNINLINE PyObject * SWIG_From_bool(bool value)
SWIGINTERN PyObject * _wrap_Solver_Solve__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
SWIGINTERN PyObject * Swig_var_MPSolverParameters_kDefaultRelativeMipGap_get(void)
SWIGRUNTIME PyObject * SwigPyObject_next(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
SWIGINTERN int64_t operations_research_MPSolver_WallTime(operations_research::MPSolver const *self)
SWIGINTERN bool operations_research_MPVariable_Integer(operations_research::MPVariable const *self)
SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
#define SWIG_AttributeError
SWIGRUNTIMEINLINE const char * SwigPyObject_GetDesc(PyObject *self)
static swig_type_info _swigt__p_operations_research__MPModelRequest
SWIGINTERN PyObject * _wrap_Solver_SetHint(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_module_info swig_module
static swig_cast_info _swigc__p_unsigned_char[]
SWIGINTERN PyObject * _wrap_Solver_LoadSolutionFromProto__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
static swig_cast_info _swigc__p_short[]
#define SWIG_From_long
SWIGRUNTIME PyObject * SwigPyObject_hex(SwigPyObject *v)
SWIGINTERN PyObject * _wrap_Objective_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Constraint_basis_status(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * SwigPyObject_acquire(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
SWIGRUNTIME int SWIG_Python_TypeErrorOccurred(PyObject *obj)
SWIGRUNTIME void SWIG_Python_DestroyModule(PyObject *obj)
#define SWIG_SetModule(clientdata, pointer)
SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty)
SWIGINTERN PyObject * _wrap_Solver_IntVar(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyTypeObject * swig_varlink_type(void)
SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void)
#define SWIGUNUSEDPARM(p)
SWIGINTERN PyObject * _wrap_Variable_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Constraint_DualValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyObject * SWIG_This(void)
SWIGINTERN PyObject * _wrap_Variable_reduced_cost(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Constraint_SetUb(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyObject * SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags)
static swig_type_info _swigt__p_operations_research__MPSolver
SWIGINTERN int64_t operations_research_MPSolver_Iterations(operations_research::MPSolver const *self)
SWIGRUNTIME PyObject * SwigPyObject_format(const char *fmt, SwigPyObject *v)
#define SWIG_as_voidptr(a)
static swig_const_info swig_const_table[]
SWIGINTERN PyObject * _wrap_MPSolverParameters_GetIntegerParam(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Variable_basis_status(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op)
SWIGRUNTIME PyTypeObject * SwigPyObject_type(void)
SWIGRUNTIME PyObject * SwigPyPacked_repr(SwigPyPacked *v)
#define SWIG_Python_CallFunctor(functor, obj)
SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata)
static swig_type_info _swigt__p_unsigned_short
SWIGRUNTIME int SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
#define SWIG_ConvertPtr(obj, pptr, type, flags)
SWIGINTERNINLINE PyObject * SWIG_From_int(int value)
SWIGRUNTIME int SWIG_TypeCmp(const char *nb, const char *tb)
SWIGINTERN PyObject * _wrap_ExportModelAsMpsFormat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
SWIGINTERN PyObject * _wrap_Solver_NumVariables(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyObject * SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
SWIGINTERN PyObject * _wrap_Solver_variable(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
struct swig_const_info swig_const_info
SWIGINTERNINLINE PyObject * SWIG_From_std_string(const std::string &s)
SWIGINTERN PyObject * _wrap_Solver_VerifySolution(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIGTYPE_p_operations_research__MPModelExportOptions
SWIGINTERN PyObject * Objective_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN int SWIG_Python_CheckNoKeywords(PyObject *kwargs, const char *name)
PyObject * FromObjectMPVariable(operations_research::MPVariable *obj)
SWIGINTERN PyObject * SWIG_Python_InitShadowInstance(PyObject *args)
SWIGINTERN PyObject * _wrap_Objective_SetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Solver_SuppressOutput(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * ModelExportOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_cast_info _swigc__p_operations_research__MPSolver[]
SWIGRUNTIME PyObject * SwigPyPacked_str(SwigPyPacked *v)
SWIGINTERN PyObject * _wrap_Solver_BoolVar(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_type_info _swigt__p_operations_research__MPObjective
SWIGRUNTIME void SWIG_InitializeModule(void *clientdata)
SWIGINTERN PyObject * SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz)
SWIGINTERN PyObject * _wrap_new_ModelExportOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_newvarlink()
SWIGRUNTIME void SWIG_Python_RaiseOrModifyTypeError(const char *message)
bool PyObjAs(PyObject *py_obj, operations_research::MPConstraint **b)
SWIGINTERN PyObject * _wrap_Solver_InterruptSolve(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_type_info _swigt__p_unsigned_long
#define SWIG_Python_str_DelForPy3(x)
SWIGINTERN PyObject * _wrap_Objective_SetMinimization(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * MPSolverParameters_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_cast_info _swigc__p_char[]
SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty)
SWIGINTERN void operations_research_MPSolver_SetHint(operations_research::MPSolver *self, std::vector< operations_research::MPVariable * > const &variables, std::vector< double > const &values)
SWIGINTERN PyObject * _wrap_Solver_iterations(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_ExportModelAsLpFormat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
SWIGINTERN PyObject * _wrap_Constraint_SetLb(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Solver_constraints(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Solver_ComputeExactConditionNumber(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIGINTERN
SWIGINTERN PyObject * swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v))
SWIGRUNTIME SwigPyObject * SWIG_Python_GetSwigThis(PyObject *pyobj)
SWIGRUNTIMEINLINE int SwigPyObject_Check(PyObject *op)
SWIGRUNTIME SwigPyClientData * SwigPyClientData_New(PyObject *obj)
SWIGINTERN PyObject * _wrap_delete_ModelExportOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_From_double
SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj)
SWIGINTERN char * SWIG_Python_str_AsChar(PyObject *str)
#define SWIGTYPE_p_operations_research__MPObjective
static swig_cast_info _swigc__p_unsigned_short[]
struct swig_globalvar swig_globalvar
SWIGINTERN PyObject * _wrap_Variable_SolutionValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIGPY_CAPSULE_NAME
#define SWIG_ArgError(r)
SWIGRUNTIME void SWIG_Python_AddErrorMsg(const char *mesg)
#define SWIG_NewPointerObj(ptr, type, flags)
SWIGRUNTIME void SWIG_Python_SetModule(swig_module_info *swig_module)
SWIGINTERN PyObject * _wrap_ExportModelAsMpsFormat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name)
SWIGINTERN PyObject * _wrap_Solver_NumConstraints(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj)
void *(* swig_converter_func)(void *, int *)
#define SWIG_POINTER_NO_NULL
#define SWIG_Python_str_FromFormat
SWIGINTERN PyObject * _wrap_Solver_LoadSolutionFromProto__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
#define SWIG_InstallConstants(d, constants)
SWIGINTERN int Swig_var_MPSolverParameters_kDefaultDualTolerance_set(PyObject *)
SWIGINTERN PyObject * _wrap_Solver_Iterations(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_type_info _swigt__p_std__ostream
static swig_type_info _swigt__p_operations_research__MPConstraint
static swig_cast_info _swigc__p_operations_research__MPModelExportOptions[]
static swig_cast_info _swigc__p_operations_research__MPSolverParameters[]
#define SWIG_IOError
static PyMethodDef SwigMethods[]
#define SWIG_NullReferenceError
SWIGINTERN std::string operations_research_MPVariable___str__(operations_research::MPVariable *self)
SWIGINTERN PyObject * _wrap_Solver_Constraint__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
SWIGINTERN std::string operations_research_MPSolver_ExportModelAsLpFormat(operations_research::MPSolver *self, bool obfuscated)
SWIGINTERN PyObject * _wrap_Solver_LookupConstraint(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Solver_LoadSolutionFromProto(PyObject *self, PyObject *args)
#define SWIG_POINTER_DISOWN
#define SWIG_STATIC_POINTER(var)
struct swig_type_info swig_type_info
SWIGINTERN double operations_research_MPVariable_Ub(operations_research::MPVariable const *self)
SWIGINTERN PyObject * _wrap_Solver_ExportModelAsMpsFormat(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME void * SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags)
SWIGINTERN PyObject * Swig_var_MPSolverParameters_kDefaultPrimalTolerance_get(void)
SWIGINTERN PyObject * _wrap_Solver_SetSolverSpecificParametersAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERNINLINE PyObject * SWIG_FromCharPtrAndSize(const char *carray, size_t size)
SWIGRUNTIME int SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty)
SWIGINTERN void SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg)
SWIGINTERN bool operations_research_MPSolver_LoadSolutionFromProto__SWIG_0(operations_research::MPSolver *self, operations_research::MPSolutionResponse const &response, double tolerance=operations_research::MPSolverParameters::kDefaultPrimalTolerance)
SWIGINTERN PyObject * _wrap_Solver_nodes(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyMethodDef * SWIG_PythonGetProxyDoc(const char *name)
SWIGINTERN PyObject * _wrap_Solver_CreateSolver(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_NEWOBJ
SWIGINTERN PyObject * _wrap___lshift__(PyObject *self, PyObject *args)
static swig_type_info _swigt__p_signed_char
SWIGINTERN int SWIG_AsPtr_std_string(PyObject *obj, std::string **val)
SWIGRUNTIME int SWIG_Python_ArgFail(int argnum)
SWIGINTERN PyObject * SWIG_globals(void)
SWIGRUNTIME PyTypeObject * SwigPyObject_TypeOnce(void)
SWIGRUNTIME int SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own)
#define SWIG_NewPackedObj(ptr, sz, type)
SWIGRUNTIME PyObject * SwigPyObject_repr(SwigPyObject *v)
#define SWIG_GetModule(clientdata)
static swig_cast_info _swigc__p_unsigned_int[]
#define SWIG_fail
static swig_type_info _swigt__p_int
SWIGINTERN PyObject * _wrap_delete_Solver(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Solver_Clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME void SWIG_PropagateClientData(void)
static swig_cast_info _swigc__p_unsigned_long[]
static swig_type_info * swig_types[18]
SWIGRUNTIME PyObject * SwigPyObject_long(SwigPyObject *v)
SWIGINTERN int Swig_var_MPSolverParameters_kDefaultIncrementality_set(PyObject *)
SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty)
SWIGRUNTIME PyObject * SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
SWIGINTERN PyObject * _wrap_Objective_SetCoefficient(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
SWIGINTERN PyObject * _wrap_Solver_LookupVariable(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME int SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
static swig_type_info _swigt__p_long
SWIGINTERN PyObject * _wrap_ExportModelAsMpsFormat(PyObject *self, PyObject *args)
SWIGINTERN PyObject * _wrap_Solver_infinity(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyObject * SwigPyObject_oct(SwigPyObject *v)
SWIGINTERN PyObject * _wrap_Solver_FillSolutionResponseProto(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static PyMethodDef SwigMethods_proxydocs[]
SWIGRUNTIME PyTypeObject * SwigPyPacked_type(void)
SWIGINTERN PyObject * _wrap_Solver_Objective(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN int Swig_var_MPSolverParameters_kDefaultPresolve_set(PyObject *)
SWIGINTERN PyObject * _wrap_Constraint_index(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj)
SWIGINTERN PyObject * _wrap_Solver_NextSolution(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN int SWIG_AsVal_int(PyObject *obj, int *val)
#define SWIG_TYPE_TABLE_NAME
SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
#define SWIG_BUILTIN_TP_INIT
SWIGINTERN PyObject * _wrap_Solver_Solve__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
SWIGINTERN PyObject * _wrap_Objective_SetMaximization(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN double operations_research_MPVariable_SolutionValue(operations_research::MPVariable const *self)
static swig_type_info _swigt__p_unsigned_int
#define SWIG_CAST_NEW_MEMORY
SWIGRUNTIME swig_module_info * SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata))
#define SWIGTYPE_p_operations_research__MPModelRequest
SWIGINTERN int SWIG_AsVal_long(PyObject *obj, long *val)
SWIGINTERN PyObject * _wrap_Solver_SolveWithProto(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
struct swig_module_info swig_module_info
SWIGINTERN bool operations_research_MPSolver_SetNumThreads(operations_research::MPSolver *self, int num_theads)
SWIGINTERN PyObject * _wrap_Solver_NumVar(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Solver_set_time_limit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap___lshift____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
#define SWIG_ERROR
SWIGINTERN int SWIG_AsVal_bool(PyObject *obj, bool *val)
SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data)
#define SWIG_name
SWIGRUNTIME PyObject * SwigPyObject_append(PyObject *v, PyObject *next)
SWIGINTERN PyObject * _wrap_Constraint_Ub(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Variable_branching_priority(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN void swig_varlink_dealloc(swig_varlinkobject *v)
SWIGINTERN double operations_research_MPConstraint_Ub(operations_research::MPConstraint const *self)
SWIGINTERN PyObject * _wrap_Objective_SetOptimizationDirection(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN double operations_research_MPObjective_Offset(operations_research::MPObjective const *self)
SWIGINTERN PyObject * _wrap_Constraint_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_cast_info _swigc__p_long[]
static swig_type_info * swig_type_initial[]
SWIGRUNTIME swig_type_info * SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
SWIGINTERN PyObject * ModelExportOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIGTYPE_p_std__ostream
SWIGINTERN PyObject * _wrap___lshift____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
SWIGRUNTIME void SwigPyPacked_dealloc(PyObject *v)
SWIGINTERN PyObject * _wrap_Solver_LoadModelFromProto(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Constraint_dual_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIMEINLINE int SWIG_Python_CheckImplicit(swig_type_info *ty)
SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr)
SWIGINTERN void SWIG_Python_FixMethods(PyMethodDef *methods, swig_const_info *const_table, swig_type_info **types, swig_type_info **types_initial)
SWIGINTERN PyObject * _wrap_Variable_SetUb(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Constraint_lb(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_MPSolverParameters_GetDoubleParam(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Variable_SetBounds(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_MemoryError
SWIGINTERN PyObject * Solver_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Solver_Var(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name)
SWIGINTERN PyObject * _wrap_Solver_WallTime(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_SystemError
#define SWIG_DivisionByZero
SWIGINTERN PyObject * _wrap_MPSolverParameters_SetIntegerParam(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_delete_MPSolverParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Variable_Integer(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_type_info _swigt__p_char
PyObject * FromObjectMPConstraint(operations_research::MPConstraint *obj)
SWIGINTERN swig_type_info * SWIG_pchar_descriptor(void)
SWIGINTERN PyObject * _wrap_Variable_SetBranchingPriority(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIGTYPE_p_operations_research__MPVariable
SWIGINTERN void operations_research_MPSolver_SetTimeLimit(operations_research::MPSolver *self, int64_t x)
SWIGINTERN PyObject * _wrap_Constraint_ub(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_Variable_index(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyObject * SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
#define SWIG_OverflowError
#define SWIGEXPORT
#define SWIG_IsOK(r)
SWIGINTERN int SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc)
SWIGINTERN int Swig_var_MPSolverParameters_kDefaultRelativeMipGap_set(PyObject *)
SWIGINTERN PyObject * _wrap_Objective_BestBound(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_new_MPSolverParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
struct swig_type_info *(* swig_dycast_func)(void **)
#define SWIG_IndexError
SWIGINTERN double operations_research_MPVariable_ReducedCost(operations_research::MPVariable const *self)
SWIGRUNTIME PyObject * SWIG_Python_TypeCache(void)
SWIGINTERN double operations_research_MPConstraint_Lb(operations_research::MPConstraint const *self)
#define SWIG_AddNewMask(r)
SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz)
SWIGINTERN void operations_research_MPConstraint_SetLb(operations_research::MPConstraint *self, double x)
#define SWIG_OK
SWIGINTERN PyObject * _wrap_Solver_ExportModelToProto(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN std::string operations_research_MPSolver_ExportModelAsMpsFormat(operations_research::MPSolver *self, bool fixed_format, bool obfuscated)
SWIGINTERN PyObject * _wrap_delete_Variable(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN void operations_research_MPConstraint_SetUb(operations_research::MPConstraint *self, double x)
#define SWIG_PYTHON_THREAD_BEGIN_BLOCK
#define SWIGINTERNINLINE
static swig_cast_info _swigc__p_signed_char[]
SWIGINTERN PyObject * _wrap_Solver_constraint(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define Py_TYPE(op)
SWIGINTERN PyObject * _wrap_MPSolverParameters_SetDoubleParam(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME int SWIG_Python_AcquirePtr(PyObject *obj, int own)
SWIGINTERN void operations_research_MPVariable_SetUb(operations_research::MPVariable *self, double x)
SWIGINTERN PyObject * SWIG_Python_AppendOutput(PyObject *result, PyObject *obj)
SWIGINTERN PyObject * _wrap_Objective_GetCoefficient(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIGRUNTIMEINLINE
SWIGINTERN double operations_research_MPConstraint_DualValue(operations_research::MPConstraint const *self)
const int FATAL
Definition: log_severity.h:32
int NumVariables(const VariablesProto &variables)
int NumConstraints(const LinearConstraintsProto &linear_constraints)
std::function< int64_t(const Model &)> Value(IntegerVariable v)
Definition: integer.h:1492
IntegerValue GetCoefficient(const IntegerVariable var, const LinearExpression &expr)
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,...
std::string FindErrorInMPModelProto(const MPModelProto &model, double abs_value_threshold)
Returns an empty string iff the model is valid and not trivially infeasible.
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...
int index
Definition: pack.cc:509
void * malloc(YYSIZE_T)
void free(void *)
if(!yyg->yy_init)
Definition: parser.yy.cc:965
int64_t tail
int nodes
PyObject_HEAD void * ptr
PyObject_HEAD void * pack
bool obfuscate
Obfuscates variable and constraint names.
SwigVar_PyObject & operator=(PyObject *obj)
struct swig_cast_info * prev
struct swig_cast_info * next
swig_converter_func converter
struct swig_globalvar * next
PyObject *(* get_attr)(void)
struct swig_module_info * next
struct swig_cast_info * cast
PyObject_HEAD swig_globalvar * vars
std::string message
Definition: trace.cc:398