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