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