OR-Tools  9.0
linear_solver_java_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 SWIGJAVA
13 #define SWIGJAVA
14 #endif
15 
16 
17 
18 #ifdef __cplusplus
19 /* SwigValueWrapper is described in swig.swg */
20 template<typename T> class SwigValueWrapper {
21  struct SwigMovePointer {
22  T *ptr;
23  SwigMovePointer(T *p) : ptr(p) { }
24  ~SwigMovePointer() { delete ptr; }
25  SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
26  } pointer;
27  SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
28  SwigValueWrapper(const SwigValueWrapper<T>& rhs);
29 public:
30  SwigValueWrapper() : pointer(0) { }
31  SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
32  operator T&() const { return *pointer.ptr; }
33  T *operator&() { return pointer.ptr; }
34 };
35 
36 template <typename T> T SwigValueInit() {
37  return T();
38 }
39 #endif
40 
41 /* -----------------------------------------------------------------------------
42  * This section contains generic SWIG labels for method/variable
43  * declarations/attributes, and other compiler dependent labels.
44  * ----------------------------------------------------------------------------- */
45 
46 /* template workaround for compilers that cannot correctly implement the C++ standard */
47 #ifndef SWIGTEMPLATEDISAMBIGUATOR
48 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
49 # define SWIGTEMPLATEDISAMBIGUATOR template
50 # elif defined(__HP_aCC)
51 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
52 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
53 # define SWIGTEMPLATEDISAMBIGUATOR template
54 # else
55 # define SWIGTEMPLATEDISAMBIGUATOR
56 # endif
57 #endif
58 
59 /* inline attribute */
60 #ifndef SWIGINLINE
61 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
62 # define SWIGINLINE inline
63 # else
64 # define SWIGINLINE
65 # endif
66 #endif
67 
68 /* attribute recognised by some compilers to avoid 'unused' warnings */
69 #ifndef SWIGUNUSED
70 # if defined(__GNUC__)
71 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
72 # define SWIGUNUSED __attribute__ ((__unused__))
73 # else
74 # define SWIGUNUSED
75 # endif
76 # elif defined(__ICC)
77 # define SWIGUNUSED __attribute__ ((__unused__))
78 # else
79 # define SWIGUNUSED
80 # endif
81 #endif
82 
83 #ifndef SWIG_MSC_UNSUPPRESS_4505
84 # if defined(_MSC_VER)
85 # pragma warning(disable : 4505) /* unreferenced local function has been removed */
86 # endif
87 #endif
88 
89 #ifndef SWIGUNUSEDPARM
90 # ifdef __cplusplus
91 # define SWIGUNUSEDPARM(p)
92 # else
93 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
94 # endif
95 #endif
96 
97 /* internal SWIG method */
98 #ifndef SWIGINTERN
99 # define SWIGINTERN static SWIGUNUSED
100 #endif
101 
102 /* internal inline SWIG method */
103 #ifndef SWIGINTERNINLINE
104 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
105 #endif
106 
107 /* exporting methods */
108 #if defined(__GNUC__)
109 # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
110 # ifndef GCC_HASCLASSVISIBILITY
111 # define GCC_HASCLASSVISIBILITY
112 # endif
113 # endif
114 #endif
115 
116 #ifndef SWIGEXPORT
117 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
118 # if defined(STATIC_LINKED)
119 # define SWIGEXPORT
120 # else
121 # define SWIGEXPORT __declspec(dllexport)
122 # endif
123 # else
124 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
125 # define SWIGEXPORT __attribute__ ((visibility("default")))
126 # else
127 # define SWIGEXPORT
128 # endif
129 # endif
130 #endif
131 
132 /* calling conventions for Windows */
133 #ifndef SWIGSTDCALL
134 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
135 # define SWIGSTDCALL __stdcall
136 # else
137 # define SWIGSTDCALL
138 # endif
139 #endif
140 
141 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
142 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
143 # define _CRT_SECURE_NO_DEPRECATE
144 #endif
145 
146 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
147 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
148 # define _SCL_SECURE_NO_DEPRECATE
149 #endif
150 
151 /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
152 #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
153 # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
154 #endif
155 
156 /* Intel's compiler complains if a variable which was never initialised is
157  * cast to void, which is a common idiom which we use to indicate that we
158  * are aware a variable isn't used. So we just silence that warning.
159  * See: https://github.com/swig/swig/issues/192 for more discussion.
160  */
161 #ifdef __INTEL_COMPILER
162 # pragma warning disable 592
163 #endif
164 
165 
166 /* Fix for jlong on some versions of gcc on Windows */
167 #if defined(__GNUC__) && !defined(__INTEL_COMPILER)
168  typedef long long __int64;
169 #endif
170 
171 /* Fix for jlong on 64-bit x86 Solaris */
172 #if defined(__x86_64)
173 # ifdef _LP64
174 # undef _LP64
175 # endif
176 #endif
177 
178 #include <jni.h>
179 #include <stdlib.h>
180 #include <string.h>
181 
182 
183 /* Support for throwing Java exceptions */
184 typedef enum {
196 
197 typedef struct {
199  const char *java_exception;
201 
202 
203 static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionCodes code, const char *msg) {
204  jclass excep;
205  static const SWIG_JavaExceptions_t java_exceptions[] = {
206  { SWIG_JavaOutOfMemoryError, "java/lang/OutOfMemoryError" },
207  { SWIG_JavaIOException, "java/io/IOException" },
208  { SWIG_JavaRuntimeException, "java/lang/RuntimeException" },
209  { SWIG_JavaIndexOutOfBoundsException, "java/lang/IndexOutOfBoundsException" },
210  { SWIG_JavaArithmeticException, "java/lang/ArithmeticException" },
211  { SWIG_JavaIllegalArgumentException, "java/lang/IllegalArgumentException" },
212  { SWIG_JavaNullPointerException, "java/lang/NullPointerException" },
213  { SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" },
214  { SWIG_JavaUnknownError, "java/lang/UnknownError" },
215  { SWIG_JavaIllegalStateException, "java/lang/IllegalStateException" },
216  { (SWIG_JavaExceptionCodes)0, "java/lang/UnknownError" }
217  };
218  const SWIG_JavaExceptions_t *except_ptr = java_exceptions;
219 
220  while (except_ptr->code != code && except_ptr->code)
221  except_ptr++;
222 
223  jenv->ExceptionClear();
224  excep = jenv->FindClass(except_ptr->java_exception);
225  if (excep)
226  jenv->ThrowNew(excep, msg);
227 }
228 
229 
230 /* Contract support */
231 
232 #define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, msg); return nullreturn; } else
233 
234 
235 #include <stdint.h> // Use the C99 official header
236 
237 
238 #define SWIGWORDSIZE64
239 #ifndef LONG_MAX
240 #include <limits.h>
241 #endif
242 #if (__WORDSIZE == 32) || (LONG_MAX == INT_MAX)
243 # error "SWIG wrapped code invalid in 32 bit architecture, regenerate code using -DSWIGWORDSIZE32"
244 #endif
245 
246 
247 #include <cstdint>
248 #include <string>
249 #include <vector>
250 
251 #include "ortools/base/basictypes.h"
252 
253 
254 #include <string>
255 
256 
258 
259 
260 #include "ortools/base/jniutil.h"
261 
262 
265 
266 SWIGINTERN std::string operations_research_MPSolver_loadModelFromProto(operations_research::MPSolver *self,operations_research::MPModelProto const &input_model){
267  std::string error_message;
268  self->LoadModelFromProto(input_model, &error_message);
269  return error_message;
270  }
271 SWIGINTERN std::string operations_research_MPSolver_loadModelFromProtoWithUniqueNamesOrDie(operations_research::MPSolver *self,operations_research::MPModelProto const &input_model){
272  std::unordered_set<std::string> names;
273  for (const auto var : input_model.variable()) {
274  if (!var.name().empty() && !names.insert(var.name()).second) {
275  LOG(FATAL) << "found duplicated variable names " + var.name();
276  }
277  }
278  std::string error_message;
279  self->LoadModelFromProtoWithUniqueNamesOrDie(input_model, &error_message);
280  return error_message;
281  }
283  operations_research::MPModelProto model;
284  self->ExportModelToProto(&model);
285  return model;
286  }
288  operations_research::MPSolutionResponse response;
289  self->FillSolutionResponseProto(&response);
290  return response;
291  }
293  return self->LoadSolutionFromProto(response).ok();
294  }
295 SWIGINTERN operations_research::MPSolutionResponse operations_research_MPSolver_solveWithProto(operations_research::MPModelRequest const &model_request){
296  operations_research::MPSolutionResponse response;
298  return response;
299  }
301  operations_research::MPModelProto model;
302  self->ExportModelToProto(&model);
303  return ExportModelAsLpFormat(model, options).value_or("");
304  }
306  operations_research::MPModelProto model;
307  self->ExportModelToProto(&model);
308  return ExportModelAsMpsFormat(model, options).value_or("");
309  }
310 SWIGINTERN void operations_research_MPSolver_setHint(operations_research::MPSolver *self,std::vector< operations_research::MPVariable * > const &variables,std::vector< double > const &values){
311  if (variables.size() != values.size()) {
312  LOG(FATAL) << "Different number of variables and values when setting "
313  << "hint.";
314  }
315  std::vector<std::pair<const operations_research::MPVariable*, double> >
316  hint(variables.size());
317  for (int i = 0; i < variables.size(); ++i) {
318  hint[i] = std::make_pair(variables[i], values[i]);
319  }
320  self->SetHint(hint);
321  }
323  return self->SetNumThreads(num_theads).ok();
324  }
325 
326 #ifdef __cplusplus
327 extern "C" {
328 #endif
329 
331  jint jresult = 0 ;
333 
334  (void)jenv;
335  (void)jcls;
337  jresult = (jint)result;
338  return jresult;
339 }
340 
341 
343  jint jresult = 0 ;
345 
346  (void)jenv;
347  (void)jcls;
349  jresult = (jint)result;
350  return jresult;
351 }
352 
353 
355  jint jresult = 0 ;
357 
358  (void)jenv;
359  (void)jcls;
361  jresult = (jint)result;
362  return jresult;
363 }
364 
365 
367  jint jresult = 0 ;
369 
370  (void)jenv;
371  (void)jcls;
373  jresult = (jint)result;
374  return jresult;
375 }
376 
377 
379  jint jresult = 0 ;
381 
382  (void)jenv;
383  (void)jcls;
385  jresult = (jint)result;
386  return jresult;
387 }
388 
389 
391  jint jresult = 0 ;
393 
394  (void)jenv;
395  (void)jcls;
397  jresult = (jint)result;
398  return jresult;
399 }
400 
401 
403  jint jresult = 0 ;
405 
406  (void)jenv;
407  (void)jcls;
409  jresult = (jint)result;
410  return jresult;
411 }
412 
413 
415  jint jresult = 0 ;
417 
418  (void)jenv;
419  (void)jcls;
421  jresult = (jint)result;
422  return jresult;
423 }
424 
425 
427  jint jresult = 0 ;
429 
430  (void)jenv;
431  (void)jcls;
433  jresult = (jint)result;
434  return jresult;
435 }
436 
437 
439  jint jresult = 0 ;
441 
442  (void)jenv;
443  (void)jcls;
445  jresult = (jint)result;
446  return jresult;
447 }
448 
449 
451  jint jresult = 0 ;
453 
454  (void)jenv;
455  (void)jcls;
457  jresult = (jint)result;
458  return jresult;
459 }
460 
461 
463  jint jresult = 0 ;
465 
466  (void)jenv;
467  (void)jcls;
469  jresult = (jint)result;
470  return jresult;
471 }
472 
473 
475  jint jresult = 0 ;
477 
478  (void)jenv;
479  (void)jcls;
481  jresult = (jint)result;
482  return jresult;
483 }
484 
485 
487  jint jresult = 0 ;
489 
490  (void)jenv;
491  (void)jcls;
493  jresult = (jint)result;
494  return jresult;
495 }
496 
497 
498 SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_new_1MPSolver(JNIEnv *jenv, jclass jcls, jstring jarg1, jint jarg2) {
499  jlong jresult = 0 ;
500  std::string *arg1 = 0 ;
502  operations_research::MPSolver *result = 0 ;
503 
504  (void)jenv;
505  (void)jcls;
506  if(!jarg1) {
508  return 0;
509  }
510  const char *arg1_pstr = (const char *)jenv->GetStringUTFChars(jarg1, 0);
511  if (!arg1_pstr) return 0;
512  std::string arg1_str(arg1_pstr);
513  arg1 = &arg1_str;
514  jenv->ReleaseStringUTFChars(jarg1, arg1_pstr);
516  result = (operations_research::MPSolver *)new operations_research::MPSolver((std::string const &)*arg1,arg2);
517  *(operations_research::MPSolver **)&jresult = result;
518  return jresult;
519 }
520 
521 
524 
525  (void)jenv;
526  (void)jcls;
527  arg1 = *(operations_research::MPSolver **)&jarg1;
528  delete arg1;
529 }
530 
531 
533  jlong jresult = 0 ;
534  std::string *arg1 = 0 ;
535  operations_research::MPSolver *result = 0 ;
536 
537  (void)jenv;
538  (void)jcls;
539  if(!jarg1) {
541  return 0;
542  }
543  const char *arg1_pstr = (const char *)jenv->GetStringUTFChars(jarg1, 0);
544  if (!arg1_pstr) return 0;
545  std::string arg1_str(arg1_pstr);
546  arg1 = &arg1_str;
547  jenv->ReleaseStringUTFChars(jarg1, arg1_pstr);
548  result = (operations_research::MPSolver *)operations_research::MPSolver::CreateSolver((std::string const &)*arg1);
549  *(operations_research::MPSolver **)&jresult = result;
550  return jresult;
551 }
552 
553 
555  jboolean jresult = 0 ;
557  bool result;
558 
559  (void)jenv;
560  (void)jcls;
563  jresult = (jboolean)result;
564  return jresult;
565 }
566 
567 
568 SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1isMip(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
569  jboolean jresult = 0 ;
571  bool result;
572 
573  (void)jenv;
574  (void)jcls;
575  (void)jarg1_;
576  arg1 = *(operations_research::MPSolver **)&jarg1;
577  result = (bool)((operations_research::MPSolver const *)arg1)->IsMIP();
578  jresult = (jboolean)result;
579  return jresult;
580 }
581 
582 
583 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1clear(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
585 
586  (void)jenv;
587  (void)jcls;
588  (void)jarg1_;
589  arg1 = *(operations_research::MPSolver **)&jarg1;
590  (arg1)->Clear();
591 }
592 
593 
594 SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1numVariables(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
595  jint jresult = 0 ;
597  int result;
598 
599  (void)jenv;
600  (void)jcls;
601  (void)jarg1_;
602  arg1 = *(operations_research::MPSolver **)&jarg1;
603  result = (int)((operations_research::MPSolver const *)arg1)->NumVariables();
604  jresult = (jint)result;
605  return jresult;
606 }
607 
608 
609 SWIGEXPORT jobjectArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1variables(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
610  jobjectArray jresult = 0 ;
612  std::vector< operations_research::MPVariable * > *result = 0 ;
613 
614  (void)jenv;
615  (void)jcls;
616  (void)jarg1_;
617  arg1 = *(operations_research::MPSolver **)&jarg1;
618  result = (std::vector< operations_research::MPVariable * > *) &((operations_research::MPSolver const *)arg1)->variables();
619  {
620  if (nullptr == result)
621  return 0;
622  std::string java_class_path ="com/google/ortools/linearsolver" "/""MPVariable";
623  jclass object_class = jenv->FindClass(java_class_path.c_str());
624  if (nullptr == object_class)
625  return 0;
626  jresult = jenv->NewObjectArray(result->size(), object_class, 0);
627  jmethodID ctor = jenv->GetMethodID(object_class,"<init>", "(JZ)V");
628  for (int i = 0; i < result->size(); ++i) {
629  jlong obj_ptr = 0;
630  *((operations_research::MPVariable **)&obj_ptr) = (*result)[i];
631  jobject elem = jenv->NewObject(object_class, ctor, obj_ptr, false);
632  jenv->SetObjectArrayElement(jresult, i, elem);
633  }
634  }
635  return jresult;
636 }
637 
638 
639 SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1variable(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
640  jlong jresult = 0 ;
642  int arg2 ;
643  operations_research::MPVariable *result = 0 ;
644 
645  (void)jenv;
646  (void)jcls;
647  (void)jarg1_;
648  arg1 = *(operations_research::MPSolver **)&jarg1;
649  arg2 = (int)jarg2;
650  result = (operations_research::MPVariable *)((operations_research::MPSolver const *)arg1)->variable(arg2);
651  *(operations_research::MPVariable **)&jresult = result;
652  return jresult;
653 }
654 
655 
656 SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1lookupVariableOrNull(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
657  jlong jresult = 0 ;
659  std::string *arg2 = 0 ;
660  operations_research::MPVariable *result = 0 ;
661 
662  (void)jenv;
663  (void)jcls;
664  (void)jarg1_;
665  arg1 = *(operations_research::MPSolver **)&jarg1;
666  if(!jarg2) {
668  return 0;
669  }
670  const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
671  if (!arg2_pstr) return 0;
672  std::string arg2_str(arg2_pstr);
673  arg2 = &arg2_str;
674  jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
675  result = (operations_research::MPVariable *)((operations_research::MPSolver const *)arg1)->LookupVariableOrNull((std::string const &)*arg2);
676  *(operations_research::MPVariable **)&jresult = result;
677  return jresult;
678 }
679 
680 
681 SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1makeVar(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jboolean jarg4, jstring jarg5) {
682  jlong jresult = 0 ;
684  double arg2 ;
685  double arg3 ;
686  bool arg4 ;
687  std::string *arg5 = 0 ;
688  operations_research::MPVariable *result = 0 ;
689 
690  (void)jenv;
691  (void)jcls;
692  (void)jarg1_;
693  arg1 = *(operations_research::MPSolver **)&jarg1;
694  arg2 = (double)jarg2;
695  arg3 = (double)jarg3;
696  arg4 = jarg4 ? true : false;
697  if(!jarg5) {
699  return 0;
700  }
701  const char *arg5_pstr = (const char *)jenv->GetStringUTFChars(jarg5, 0);
702  if (!arg5_pstr) return 0;
703  std::string arg5_str(arg5_pstr);
704  arg5 = &arg5_str;
705  jenv->ReleaseStringUTFChars(jarg5, arg5_pstr);
706  result = (operations_research::MPVariable *)(arg1)->MakeVar(arg2,arg3,arg4,(std::string const &)*arg5);
707  *(operations_research::MPVariable **)&jresult = result;
708  return jresult;
709 }
710 
711 
712 SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1makeNumVar(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jstring jarg4) {
713  jlong jresult = 0 ;
715  double arg2 ;
716  double arg3 ;
717  std::string *arg4 = 0 ;
718  operations_research::MPVariable *result = 0 ;
719 
720  (void)jenv;
721  (void)jcls;
722  (void)jarg1_;
723  arg1 = *(operations_research::MPSolver **)&jarg1;
724  arg2 = (double)jarg2;
725  arg3 = (double)jarg3;
726  if(!jarg4) {
728  return 0;
729  }
730  const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0);
731  if (!arg4_pstr) return 0;
732  std::string arg4_str(arg4_pstr);
733  arg4 = &arg4_str;
734  jenv->ReleaseStringUTFChars(jarg4, arg4_pstr);
735  result = (operations_research::MPVariable *)(arg1)->MakeNumVar(arg2,arg3,(std::string const &)*arg4);
736  *(operations_research::MPVariable **)&jresult = result;
737  return jresult;
738 }
739 
740 
741 SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1makeIntVar(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jstring jarg4) {
742  jlong jresult = 0 ;
744  double arg2 ;
745  double arg3 ;
746  std::string *arg4 = 0 ;
747  operations_research::MPVariable *result = 0 ;
748 
749  (void)jenv;
750  (void)jcls;
751  (void)jarg1_;
752  arg1 = *(operations_research::MPSolver **)&jarg1;
753  arg2 = (double)jarg2;
754  arg3 = (double)jarg3;
755  if(!jarg4) {
757  return 0;
758  }
759  const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0);
760  if (!arg4_pstr) return 0;
761  std::string arg4_str(arg4_pstr);
762  arg4 = &arg4_str;
763  jenv->ReleaseStringUTFChars(jarg4, arg4_pstr);
764  result = (operations_research::MPVariable *)(arg1)->MakeIntVar(arg2,arg3,(std::string const &)*arg4);
765  *(operations_research::MPVariable **)&jresult = result;
766  return jresult;
767 }
768 
769 
770 SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1makeBoolVar(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
771  jlong jresult = 0 ;
773  std::string *arg2 = 0 ;
774  operations_research::MPVariable *result = 0 ;
775 
776  (void)jenv;
777  (void)jcls;
778  (void)jarg1_;
779  arg1 = *(operations_research::MPSolver **)&jarg1;
780  if(!jarg2) {
782  return 0;
783  }
784  const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
785  if (!arg2_pstr) return 0;
786  std::string arg2_str(arg2_pstr);
787  arg2 = &arg2_str;
788  jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
789  result = (operations_research::MPVariable *)(arg1)->MakeBoolVar((std::string const &)*arg2);
790  *(operations_research::MPVariable **)&jresult = result;
791  return jresult;
792 }
793 
794 
795 SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1numConstraints(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
796  jint jresult = 0 ;
798  int result;
799 
800  (void)jenv;
801  (void)jcls;
802  (void)jarg1_;
803  arg1 = *(operations_research::MPSolver **)&jarg1;
804  result = (int)((operations_research::MPSolver const *)arg1)->NumConstraints();
805  jresult = (jint)result;
806  return jresult;
807 }
808 
809 
810 SWIGEXPORT jobjectArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1constraints(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
811  jobjectArray jresult = 0 ;
813  std::vector< operations_research::MPConstraint * > *result = 0 ;
814 
815  (void)jenv;
816  (void)jcls;
817  (void)jarg1_;
818  arg1 = *(operations_research::MPSolver **)&jarg1;
819  result = (std::vector< operations_research::MPConstraint * > *) &((operations_research::MPSolver const *)arg1)->constraints();
820  {
821  if (nullptr == result)
822  return 0;
823  std::string java_class_path ="com/google/ortools/linearsolver" "/""MPConstraint";
824  jclass object_class = jenv->FindClass(java_class_path.c_str());
825  if (nullptr == object_class)
826  return 0;
827  jresult = jenv->NewObjectArray(result->size(), object_class, 0);
828  jmethodID ctor = jenv->GetMethodID(object_class,"<init>", "(JZ)V");
829  for (int i = 0; i < result->size(); ++i) {
830  jlong obj_ptr = 0;
831  *((operations_research::MPConstraint **)&obj_ptr) = (*result)[i];
832  jobject elem = jenv->NewObject(object_class, ctor, obj_ptr, false);
833  jenv->SetObjectArrayElement(jresult, i, elem);
834  }
835  }
836  return jresult;
837 }
838 
839 
840 SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1constraint(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
841  jlong jresult = 0 ;
843  int arg2 ;
845 
846  (void)jenv;
847  (void)jcls;
848  (void)jarg1_;
849  arg1 = *(operations_research::MPSolver **)&jarg1;
850  arg2 = (int)jarg2;
851  result = (operations_research::MPConstraint *)((operations_research::MPSolver const *)arg1)->constraint(arg2);
852  *(operations_research::MPConstraint **)&jresult = result;
853  return jresult;
854 }
855 
856 
857 SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1lookupConstraintOrNull(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
858  jlong jresult = 0 ;
860  std::string *arg2 = 0 ;
862 
863  (void)jenv;
864  (void)jcls;
865  (void)jarg1_;
866  arg1 = *(operations_research::MPSolver **)&jarg1;
867  if(!jarg2) {
869  return 0;
870  }
871  const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
872  if (!arg2_pstr) return 0;
873  std::string arg2_str(arg2_pstr);
874  arg2 = &arg2_str;
875  jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
876  result = (operations_research::MPConstraint *)((operations_research::MPSolver const *)arg1)->LookupConstraintOrNull((std::string const &)*arg2);
877  *(operations_research::MPConstraint **)&jresult = result;
878  return jresult;
879 }
880 
881 
882 SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1makeConstraint_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3) {
883  jlong jresult = 0 ;
885  double arg2 ;
886  double arg3 ;
888 
889  (void)jenv;
890  (void)jcls;
891  (void)jarg1_;
892  arg1 = *(operations_research::MPSolver **)&jarg1;
893  arg2 = (double)jarg2;
894  arg3 = (double)jarg3;
895  result = (operations_research::MPConstraint *)(arg1)->MakeRowConstraint(arg2,arg3);
896  *(operations_research::MPConstraint **)&jresult = result;
897  return jresult;
898 }
899 
900 
902  jlong jresult = 0 ;
905 
906  (void)jenv;
907  (void)jcls;
908  (void)jarg1_;
909  arg1 = *(operations_research::MPSolver **)&jarg1;
910  result = (operations_research::MPConstraint *)(arg1)->MakeRowConstraint();
911  *(operations_research::MPConstraint **)&jresult = result;
912  return jresult;
913 }
914 
915 
916 SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1makeConstraint_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jstring jarg4) {
917  jlong jresult = 0 ;
919  double arg2 ;
920  double arg3 ;
921  std::string *arg4 = 0 ;
923 
924  (void)jenv;
925  (void)jcls;
926  (void)jarg1_;
927  arg1 = *(operations_research::MPSolver **)&jarg1;
928  arg2 = (double)jarg2;
929  arg3 = (double)jarg3;
930  if(!jarg4) {
932  return 0;
933  }
934  const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0);
935  if (!arg4_pstr) return 0;
936  std::string arg4_str(arg4_pstr);
937  arg4 = &arg4_str;
938  jenv->ReleaseStringUTFChars(jarg4, arg4_pstr);
939  result = (operations_research::MPConstraint *)(arg1)->MakeRowConstraint(arg2,arg3,(std::string const &)*arg4);
940  *(operations_research::MPConstraint **)&jresult = result;
941  return jresult;
942 }
943 
944 
945 SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1makeConstraint_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
946  jlong jresult = 0 ;
948  std::string *arg2 = 0 ;
950 
951  (void)jenv;
952  (void)jcls;
953  (void)jarg1_;
954  arg1 = *(operations_research::MPSolver **)&jarg1;
955  if(!jarg2) {
957  return 0;
958  }
959  const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
960  if (!arg2_pstr) return 0;
961  std::string arg2_str(arg2_pstr);
962  arg2 = &arg2_str;
963  jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
964  result = (operations_research::MPConstraint *)(arg1)->MakeRowConstraint((std::string const &)*arg2);
965  *(operations_research::MPConstraint **)&jresult = result;
966  return jresult;
967 }
968 
969 
970 SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1objective(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
971  jlong jresult = 0 ;
974 
975  (void)jenv;
976  (void)jcls;
977  (void)jarg1_;
978  arg1 = *(operations_research::MPSolver **)&jarg1;
979  result = (operations_research::MPObjective *)(arg1)->MutableObjective();
980  *(operations_research::MPObjective **)&jresult = result;
981  return jresult;
982 }
983 
984 
986  jint jresult = 0 ;
988 
989  (void)jenv;
990  (void)jcls;
992  jresult = (jint)result;
993  return jresult;
994 }
995 
996 
997 SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1solve_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
998  jint jresult = 0 ;
1001 
1002  (void)jenv;
1003  (void)jcls;
1004  (void)jarg1_;
1005  arg1 = *(operations_research::MPSolver **)&jarg1;
1007  jresult = (jint)result;
1008  return jresult;
1009 }
1010 
1011 
1012 SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1solve_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
1013  jint jresult = 0 ;
1017 
1018  (void)jenv;
1019  (void)jcls;
1020  (void)jarg1_;
1021  (void)jarg2_;
1022  arg1 = *(operations_research::MPSolver **)&jarg1;
1023  arg2 = *(operations_research::MPSolverParameters **)&jarg2;
1024  if (!arg2) {
1025  SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "operations_research::MPSolverParameters const & reference is null");
1026  return 0;
1027  }
1029  jresult = (jint)result;
1030  return jresult;
1031 }
1032 
1033 
1034 SWIGEXPORT jdoubleArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1computeConstraintActivities(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1035  jdoubleArray jresult = 0 ;
1037  std::vector< double > result;
1038 
1039  (void)jenv;
1040  (void)jcls;
1041  (void)jarg1_;
1042  arg1 = *(operations_research::MPSolver **)&jarg1;
1043  result = ((operations_research::MPSolver const *)arg1)->ComputeConstraintActivities();
1044 
1045  const std::vector<double>& vec = result;
1046  jresult = jenv->NewDoubleArray(vec.size());
1047  jenv->SetDoubleArrayRegion(jresult, 0, vec.size(), reinterpret_cast<const jdouble*>(vec.data()));
1048 
1049  return jresult;
1050 }
1051 
1052 
1053 SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1verifySolution(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jboolean jarg3) {
1054  jboolean jresult = 0 ;
1056  double arg2 ;
1057  bool arg3 ;
1058  bool result;
1059 
1060  (void)jenv;
1061  (void)jcls;
1062  (void)jarg1_;
1063  arg1 = *(operations_research::MPSolver **)&jarg1;
1064  arg2 = (double)jarg2;
1065  arg3 = jarg3 ? true : false;
1066  result = (bool)((operations_research::MPSolver const *)arg1)->VerifySolution(arg2,arg3);
1067  jresult = (jboolean)result;
1068  return jresult;
1069 }
1070 
1071 
1072 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1reset(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1074 
1075  (void)jenv;
1076  (void)jcls;
1077  (void)jarg1_;
1078  arg1 = *(operations_research::MPSolver **)&jarg1;
1079  (arg1)->Reset();
1080 }
1081 
1082 
1083 SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1interruptSolve(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1084  jboolean jresult = 0 ;
1086  bool result;
1087 
1088  (void)jenv;
1089  (void)jcls;
1090  (void)jarg1_;
1091  arg1 = *(operations_research::MPSolver **)&jarg1;
1092  result = (bool)(arg1)->InterruptSolve();
1093  jresult = (jboolean)result;
1094  return jresult;
1095 }
1096 
1097 
1098 SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1setSolverSpecificParametersAsString(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
1099  jboolean jresult = 0 ;
1101  std::string *arg2 = 0 ;
1102  bool result;
1103 
1104  (void)jenv;
1105  (void)jcls;
1106  (void)jarg1_;
1107  arg1 = *(operations_research::MPSolver **)&jarg1;
1108  if(!jarg2) {
1110  return 0;
1111  }
1112  const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
1113  if (!arg2_pstr) return 0;
1114  std::string arg2_str(arg2_pstr);
1115  arg2 = &arg2_str;
1116  jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
1117  result = (bool)(arg1)->SetSolverSpecificParametersAsString((std::string const &)*arg2);
1118  jresult = (jboolean)result;
1119  return jresult;
1120 }
1121 
1122 
1124  jint jresult = 0 ;
1126 
1127  (void)jenv;
1128  (void)jcls;
1130  jresult = (jint)result;
1131  return jresult;
1132 }
1133 
1134 
1136  jdouble jresult = 0 ;
1137  double result;
1138 
1139  (void)jenv;
1140  (void)jcls;
1141  result = (double)operations_research::MPSolver::infinity();
1142  jresult = (jdouble)result;
1143  return jresult;
1144 }
1145 
1146 
1147 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1enableOutput(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1149 
1150  (void)jenv;
1151  (void)jcls;
1152  (void)jarg1_;
1153  arg1 = *(operations_research::MPSolver **)&jarg1;
1154  (arg1)->EnableOutput();
1155 }
1156 
1157 
1158 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1suppressOutput(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1160 
1161  (void)jenv;
1162  (void)jcls;
1163  (void)jarg1_;
1164  arg1 = *(operations_research::MPSolver **)&jarg1;
1165  (arg1)->SuppressOutput();
1166 }
1167 
1168 
1169 SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1iterations(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1170  jlong jresult = 0 ;
1172  int64_t result;
1173 
1174  (void)jenv;
1175  (void)jcls;
1176  (void)jarg1_;
1177  arg1 = *(operations_research::MPSolver **)&jarg1;
1178  result = (int64_t)((operations_research::MPSolver const *)arg1)->iterations();
1179  jresult = (jlong)result;
1180  return jresult;
1181 }
1182 
1183 
1184 SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1nodes(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1185  jlong jresult = 0 ;
1187  int64_t result;
1188 
1189  (void)jenv;
1190  (void)jcls;
1191  (void)jarg1_;
1192  arg1 = *(operations_research::MPSolver **)&jarg1;
1193  result = (int64_t)((operations_research::MPSolver const *)arg1)->nodes();
1194  jresult = (jlong)result;
1195  return jresult;
1196 }
1197 
1198 
1200  jdouble jresult = 0 ;
1202  double result;
1203 
1204  (void)jenv;
1205  (void)jcls;
1206  (void)jarg1_;
1207  arg1 = *(operations_research::MPSolver **)&jarg1;
1208  result = (double)((operations_research::MPSolver const *)arg1)->ComputeExactConditionNumber();
1209  jresult = (jdouble)result;
1210  return jresult;
1211 }
1212 
1213 
1214 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1setTimeLimit(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
1216  int64_t arg2 ;
1217 
1218  (void)jenv;
1219  (void)jcls;
1220  (void)jarg1_;
1221  arg1 = *(operations_research::MPSolver **)&jarg1;
1222  arg2 = (int64_t)jarg2;
1223  (arg1)->set_time_limit(arg2);
1224 }
1225 
1226 
1227 SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1wallTime(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1228  jlong jresult = 0 ;
1230  int64_t result;
1231 
1232  (void)jenv;
1233  (void)jcls;
1234  (void)jarg1_;
1235  arg1 = *(operations_research::MPSolver **)&jarg1;
1236  result = (int64_t)((operations_research::MPSolver const *)arg1)->wall_time();
1237  jresult = (jlong)result;
1238  return jresult;
1239 }
1240 
1241 
1242 SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1loadModelFromProto(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2) {
1243  jstring jresult = 0 ;
1245  operations_research::MPModelProto *arg2 = 0 ;
1246  operations_research::MPModelProto temp2 ;
1247  std::string result;
1248 
1249  (void)jenv;
1250  (void)jcls;
1251  (void)jarg1_;
1252  arg1 = *(operations_research::MPSolver **)&jarg1;
1253  {
1254  int proto_size = 0;
1255  std::unique_ptr<char[]> proto_buffer(
1256  JNIUtil::MakeCharArray(jenv, jarg2, &proto_size));
1257  bool parsed_ok = temp2.ParseFromArray(proto_buffer.get(), proto_size);
1258  if (!parsed_ok) {
1261  "Unable to parse operations_research::MPModelProto protocol message.");
1262  }
1263  arg2 = &temp2;
1264  }
1265  result = operations_research_MPSolver_loadModelFromProto(arg1,(operations_research::MPModelProto const &)*arg2);
1266  jresult = jenv->NewStringUTF((&result)->c_str());
1267  return jresult;
1268 }
1269 
1270 
1271 SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1loadModelFromProtoWithUniqueNamesOrDie(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2) {
1272  jstring jresult = 0 ;
1274  operations_research::MPModelProto *arg2 = 0 ;
1275  operations_research::MPModelProto temp2 ;
1276  std::string result;
1277 
1278  (void)jenv;
1279  (void)jcls;
1280  (void)jarg1_;
1281  arg1 = *(operations_research::MPSolver **)&jarg1;
1282  {
1283  int proto_size = 0;
1284  std::unique_ptr<char[]> proto_buffer(
1285  JNIUtil::MakeCharArray(jenv, jarg2, &proto_size));
1286  bool parsed_ok = temp2.ParseFromArray(proto_buffer.get(), proto_size);
1287  if (!parsed_ok) {
1290  "Unable to parse operations_research::MPModelProto protocol message.");
1291  }
1292  arg2 = &temp2;
1293  }
1294  result = operations_research_MPSolver_loadModelFromProtoWithUniqueNamesOrDie(arg1,(operations_research::MPModelProto const &)*arg2);
1295  jresult = jenv->NewStringUTF((&result)->c_str());
1296  return jresult;
1297 }
1298 
1299 
1300 SWIGEXPORT jbyteArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1exportModelToProto(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1301  jbyteArray jresult = 0 ;
1303  operations_research::MPModelProto result;
1304 
1305  (void)jenv;
1306  (void)jcls;
1307  (void)jarg1_;
1308  arg1 = *(operations_research::MPSolver **)&jarg1;
1310  {
1311  const long size = (&result)->ByteSizeLong();
1312  std::unique_ptr<char[]> buf(new char[size]);
1313  (&result)->SerializeWithCachedSizesToArray(reinterpret_cast<uint8_t*>(buf.get()));
1314  jresult = JNIUtil::MakeJByteArray(jenv, buf.get(), size);
1315  }
1316  return jresult;
1317 }
1318 
1319 
1321  jbyteArray jresult = 0 ;
1323  operations_research::MPSolutionResponse result;
1324 
1325  (void)jenv;
1326  (void)jcls;
1327  (void)jarg1_;
1328  arg1 = *(operations_research::MPSolver **)&jarg1;
1330  {
1331  const long size = (&result)->ByteSizeLong();
1332  std::unique_ptr<char[]> buf(new char[size]);
1333  (&result)->SerializeWithCachedSizesToArray(reinterpret_cast<uint8_t*>(buf.get()));
1334  jresult = JNIUtil::MakeJByteArray(jenv, buf.get(), size);
1335  }
1336  return jresult;
1337 }
1338 
1339 
1340 SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1loadSolutionFromProto(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2) {
1341  jboolean jresult = 0 ;
1343  operations_research::MPSolutionResponse *arg2 = 0 ;
1344  operations_research::MPSolutionResponse temp2 ;
1345  bool result;
1346 
1347  (void)jenv;
1348  (void)jcls;
1349  (void)jarg1_;
1350  arg1 = *(operations_research::MPSolver **)&jarg1;
1351  {
1352  int proto_size = 0;
1353  std::unique_ptr<char[]> proto_buffer(
1354  JNIUtil::MakeCharArray(jenv, jarg2, &proto_size));
1355  bool parsed_ok = temp2.ParseFromArray(proto_buffer.get(), proto_size);
1356  if (!parsed_ok) {
1359  "Unable to parse operations_research::MPSolutionResponse protocol message.");
1360  }
1361  arg2 = &temp2;
1362  }
1363  result = (bool)operations_research_MPSolver_loadSolutionFromProto(arg1,(operations_research::MPSolutionResponse const &)*arg2);
1364  jresult = (jboolean)result;
1365  return jresult;
1366 }
1367 
1368 
1370  jbyteArray jresult = 0 ;
1371  operations_research::MPModelRequest *arg1 = 0 ;
1372  operations_research::MPModelRequest temp1 ;
1373  operations_research::MPSolutionResponse result;
1374 
1375  (void)jenv;
1376  (void)jcls;
1377  {
1378  int proto_size = 0;
1379  std::unique_ptr<char[]> proto_buffer(
1380  JNIUtil::MakeCharArray(jenv, jarg1, &proto_size));
1381  bool parsed_ok = temp1.ParseFromArray(proto_buffer.get(), proto_size);
1382  if (!parsed_ok) {
1385  "Unable to parse operations_research::MPModelRequest protocol message.");
1386  }
1387  arg1 = &temp1;
1388  }
1389  result = operations_research_MPSolver_solveWithProto((operations_research::MPModelRequest const &)*arg1);
1390  {
1391  const long size = (&result)->ByteSizeLong();
1392  std::unique_ptr<char[]> buf(new char[size]);
1393  (&result)->SerializeWithCachedSizesToArray(reinterpret_cast<uint8_t*>(buf.get()));
1394  jresult = JNIUtil::MakeJByteArray(jenv, buf.get(), size);
1395  }
1396  return jresult;
1397 }
1398 
1399 
1400 SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1exportModelAsLpFormat_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
1401  jstring jresult = 0 ;
1404  std::string result;
1405 
1406  (void)jenv;
1407  (void)jcls;
1408  (void)jarg1_;
1409  (void)jarg2_;
1410  arg1 = *(operations_research::MPSolver **)&jarg1;
1411  arg2 = *(operations_research::MPModelExportOptions **)&jarg2;
1412  if (!arg2) {
1413  SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "operations_research::MPModelExportOptions const & reference is null");
1414  return 0;
1415  }
1417  jresult = jenv->NewStringUTF((&result)->c_str());
1418  return jresult;
1419 }
1420 
1421 
1423  jstring jresult = 0 ;
1425  std::string result;
1426 
1427  (void)jenv;
1428  (void)jcls;
1429  (void)jarg1_;
1430  arg1 = *(operations_research::MPSolver **)&jarg1;
1432  jresult = jenv->NewStringUTF((&result)->c_str());
1433  return jresult;
1434 }
1435 
1436 
1437 SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1exportModelAsMpsFormat_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
1438  jstring jresult = 0 ;
1441  std::string result;
1442 
1443  (void)jenv;
1444  (void)jcls;
1445  (void)jarg1_;
1446  (void)jarg2_;
1447  arg1 = *(operations_research::MPSolver **)&jarg1;
1448  arg2 = *(operations_research::MPModelExportOptions **)&jarg2;
1449  if (!arg2) {
1450  SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "operations_research::MPModelExportOptions const & reference is null");
1451  return 0;
1452  }
1454  jresult = jenv->NewStringUTF((&result)->c_str());
1455  return jresult;
1456 }
1457 
1458 
1460  jstring jresult = 0 ;
1462  std::string result;
1463 
1464  (void)jenv;
1465  (void)jcls;
1466  (void)jarg1_;
1467  arg1 = *(operations_research::MPSolver **)&jarg1;
1469  jresult = jenv->NewStringUTF((&result)->c_str());
1470  return jresult;
1471 }
1472 
1473 
1474 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1setHint(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobjectArray jarg2, jdoubleArray jarg3) {
1476  std::vector< operations_research::MPVariable * > *arg2 = 0 ;
1477  std::vector< double > *arg3 = 0 ;
1478  std::vector< operations_research::MPVariable * > result2 ;
1479 
1480  (void)jenv;
1481  (void)jcls;
1482  (void)jarg1_;
1483  arg1 = *(operations_research::MPSolver **)&jarg1;
1484  {
1485  std::string java_class_path ="com/google/ortools/linearsolver" "/""MPVariable";
1486  jclass object_class = jenv->FindClass(java_class_path.c_str());
1487  if (nullptr == object_class)
1488  return ;
1489  jmethodID method_id =
1490  jenv->GetStaticMethodID(
1491  object_class, "getCPtr",
1492  std::string("(L" + java_class_path + ";)J").c_str());
1493  assert(method_id != nullptr);
1494  for (int i = 0; i < jenv->GetArrayLength(jarg2); i++) {
1495  jobject elem = jenv->GetObjectArrayElement(jarg2, i);
1496  jlong ptr_value = jenv->CallStaticLongMethod(object_class, method_id, elem);
1497  result2.push_back(/*@SWIG:ortools/util/java/vector.i,291,REINTERPRET_CAST@*/
1498  reinterpret_cast<operations_research::MPVariable*>(ptr_value)
1499  /*@SWIG@*/);
1500  }
1501  arg2 = &result2;
1502  }
1503 
1504  if(jarg3) {
1505  arg3 = new std::vector<double>;
1506  const int size = jenv->GetArrayLength(jarg3);
1507  arg3->reserve(size);
1508  jdouble *values = jenv->GetDoubleArrayElements((jdoubleArray)jarg3, NULL);
1509  for (int i = 0; i < size; ++i) {
1510  arg3->emplace_back(values[i]);
1511  }
1512  jenv->ReleaseDoubleArrayElements((jdoubleArray)jarg3, values, JNI_ABORT);
1513  }
1514  else {
1516  return ;
1517  }
1518 
1519  operations_research_MPSolver_setHint(arg1,(std::vector< operations_research::MPVariable * > const &)*arg2,(std::vector< double > const &)*arg3);
1520  {
1521  delete arg3;
1522  }
1523 }
1524 
1525 
1526 SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1setNumThreads(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
1527  jboolean jresult = 0 ;
1529  int arg2 ;
1530  bool result;
1531 
1532  (void)jenv;
1533  (void)jcls;
1534  (void)jarg1_;
1535  arg1 = *(operations_research::MPSolver **)&jarg1;
1536  arg2 = (int)jarg2;
1537  result = (bool)operations_research_MPSolver_setNumThreads(arg1,arg2);
1538  jresult = (jboolean)result;
1539  return jresult;
1540 }
1541 
1542 
1543 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1clear(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1545 
1546  (void)jenv;
1547  (void)jcls;
1548  (void)jarg1_;
1549  arg1 = *(operations_research::MPObjective **)&jarg1;
1550  (arg1)->Clear();
1551 }
1552 
1553 
1554 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1setCoefficient(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jdouble jarg3) {
1557  double arg3 ;
1558 
1559  (void)jenv;
1560  (void)jcls;
1561  (void)jarg1_;
1562  (void)jarg2_;
1563  arg1 = *(operations_research::MPObjective **)&jarg1;
1564  arg2 = *(operations_research::MPVariable **)&jarg2;
1565  arg3 = (double)jarg3;
1566  (arg1)->SetCoefficient((operations_research::MPVariable const *)arg2,arg3);
1567 }
1568 
1569 
1570 SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1getCoefficient(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
1571  jdouble jresult = 0 ;
1574  double result;
1575 
1576  (void)jenv;
1577  (void)jcls;
1578  (void)jarg1_;
1579  (void)jarg2_;
1580  arg1 = *(operations_research::MPObjective **)&jarg1;
1581  arg2 = *(operations_research::MPVariable **)&jarg2;
1582  result = (double)((operations_research::MPObjective const *)arg1)->GetCoefficient((operations_research::MPVariable const *)arg2);
1583  jresult = (jdouble)result;
1584  return jresult;
1585 }
1586 
1587 
1588 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1setOffset(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2) {
1590  double arg2 ;
1591 
1592  (void)jenv;
1593  (void)jcls;
1594  (void)jarg1_;
1595  arg1 = *(operations_research::MPObjective **)&jarg1;
1596  arg2 = (double)jarg2;
1597  (arg1)->SetOffset(arg2);
1598 }
1599 
1600 
1601 SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1offset(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1602  jdouble jresult = 0 ;
1604  double result;
1605 
1606  (void)jenv;
1607  (void)jcls;
1608  (void)jarg1_;
1609  arg1 = *(operations_research::MPObjective **)&jarg1;
1610  result = (double)((operations_research::MPObjective const *)arg1)->offset();
1611  jresult = (jdouble)result;
1612  return jresult;
1613 }
1614 
1615 
1616 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1setOptimizationDirection(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
1618  bool arg2 ;
1619 
1620  (void)jenv;
1621  (void)jcls;
1622  (void)jarg1_;
1623  arg1 = *(operations_research::MPObjective **)&jarg1;
1624  arg2 = jarg2 ? true : false;
1625  (arg1)->SetOptimizationDirection(arg2);
1626 }
1627 
1628 
1631 
1632  (void)jenv;
1633  (void)jcls;
1634  (void)jarg1_;
1635  arg1 = *(operations_research::MPObjective **)&jarg1;
1636  (arg1)->SetMinimization();
1637 }
1638 
1639 
1642 
1643  (void)jenv;
1644  (void)jcls;
1645  (void)jarg1_;
1646  arg1 = *(operations_research::MPObjective **)&jarg1;
1647  (arg1)->SetMaximization();
1648 }
1649 
1650 
1651 SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1maximization(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1652  jboolean jresult = 0 ;
1654  bool result;
1655 
1656  (void)jenv;
1657  (void)jcls;
1658  (void)jarg1_;
1659  arg1 = *(operations_research::MPObjective **)&jarg1;
1660  result = (bool)((operations_research::MPObjective const *)arg1)->maximization();
1661  jresult = (jboolean)result;
1662  return jresult;
1663 }
1664 
1665 
1666 SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1minimization(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1667  jboolean jresult = 0 ;
1669  bool result;
1670 
1671  (void)jenv;
1672  (void)jcls;
1673  (void)jarg1_;
1674  arg1 = *(operations_research::MPObjective **)&jarg1;
1675  result = (bool)((operations_research::MPObjective const *)arg1)->minimization();
1676  jresult = (jboolean)result;
1677  return jresult;
1678 }
1679 
1680 
1681 SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1value(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1682  jdouble jresult = 0 ;
1684  double result;
1685 
1686  (void)jenv;
1687  (void)jcls;
1688  (void)jarg1_;
1689  arg1 = *(operations_research::MPObjective **)&jarg1;
1690  result = (double)((operations_research::MPObjective const *)arg1)->Value();
1691  jresult = (jdouble)result;
1692  return jresult;
1693 }
1694 
1695 
1696 SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1bestBound(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1697  jdouble jresult = 0 ;
1699  double result;
1700 
1701  (void)jenv;
1702  (void)jcls;
1703  (void)jarg1_;
1704  arg1 = *(operations_research::MPObjective **)&jarg1;
1705  result = (double)((operations_research::MPObjective const *)arg1)->BestBound();
1706  jresult = (jdouble)result;
1707  return jresult;
1708 }
1709 
1710 
1713 
1714  (void)jenv;
1715  (void)jcls;
1716  arg1 = *(operations_research::MPObjective **)&jarg1;
1717  delete arg1;
1718 }
1719 
1720 
1721 SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1name(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1722  jstring jresult = 0 ;
1724  std::string *result = 0 ;
1725 
1726  (void)jenv;
1727  (void)jcls;
1728  (void)jarg1_;
1729  arg1 = *(operations_research::MPVariable **)&jarg1;
1730  result = (std::string *) &((operations_research::MPVariable const *)arg1)->name();
1731  jresult = jenv->NewStringUTF(result->c_str());
1732  return jresult;
1733 }
1734 
1735 
1736 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1setInteger(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
1738  bool arg2 ;
1739 
1740  (void)jenv;
1741  (void)jcls;
1742  (void)jarg1_;
1743  arg1 = *(operations_research::MPVariable **)&jarg1;
1744  arg2 = jarg2 ? true : false;
1745  (arg1)->SetInteger(arg2);
1746 }
1747 
1748 
1749 SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1solutionValue(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1750  jdouble jresult = 0 ;
1752  double result;
1753 
1754  (void)jenv;
1755  (void)jcls;
1756  (void)jarg1_;
1757  arg1 = *(operations_research::MPVariable **)&jarg1;
1758  result = (double)((operations_research::MPVariable const *)arg1)->solution_value();
1759  jresult = (jdouble)result;
1760  return jresult;
1761 }
1762 
1763 
1764 SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1index(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1765  jint jresult = 0 ;
1767  int result;
1768 
1769  (void)jenv;
1770  (void)jcls;
1771  (void)jarg1_;
1772  arg1 = *(operations_research::MPVariable **)&jarg1;
1773  result = (int)((operations_research::MPVariable const *)arg1)->index();
1774  jresult = (jint)result;
1775  return jresult;
1776 }
1777 
1778 
1779 SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1lb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1780  jdouble jresult = 0 ;
1782  double result;
1783 
1784  (void)jenv;
1785  (void)jcls;
1786  (void)jarg1_;
1787  arg1 = *(operations_research::MPVariable **)&jarg1;
1788  result = (double)((operations_research::MPVariable const *)arg1)->lb();
1789  jresult = (jdouble)result;
1790  return jresult;
1791 }
1792 
1793 
1794 SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1ub(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1795  jdouble jresult = 0 ;
1797  double result;
1798 
1799  (void)jenv;
1800  (void)jcls;
1801  (void)jarg1_;
1802  arg1 = *(operations_research::MPVariable **)&jarg1;
1803  result = (double)((operations_research::MPVariable const *)arg1)->ub();
1804  jresult = (jdouble)result;
1805  return jresult;
1806 }
1807 
1808 
1809 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1setLb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2) {
1811  double arg2 ;
1812 
1813  (void)jenv;
1814  (void)jcls;
1815  (void)jarg1_;
1816  arg1 = *(operations_research::MPVariable **)&jarg1;
1817  arg2 = (double)jarg2;
1818  (arg1)->SetLB(arg2);
1819 }
1820 
1821 
1822 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1setUb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2) {
1824  double arg2 ;
1825 
1826  (void)jenv;
1827  (void)jcls;
1828  (void)jarg1_;
1829  arg1 = *(operations_research::MPVariable **)&jarg1;
1830  arg2 = (double)jarg2;
1831  (arg1)->SetUB(arg2);
1832 }
1833 
1834 
1835 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1setBounds(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3) {
1837  double arg2 ;
1838  double arg3 ;
1839 
1840  (void)jenv;
1841  (void)jcls;
1842  (void)jarg1_;
1843  arg1 = *(operations_research::MPVariable **)&jarg1;
1844  arg2 = (double)jarg2;
1845  arg3 = (double)jarg3;
1846  (arg1)->SetBounds(arg2,arg3);
1847 }
1848 
1849 
1850 SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1reducedCost(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1851  jdouble jresult = 0 ;
1853  double result;
1854 
1855  (void)jenv;
1856  (void)jcls;
1857  (void)jarg1_;
1858  arg1 = *(operations_research::MPVariable **)&jarg1;
1859  result = (double)((operations_research::MPVariable const *)arg1)->reduced_cost();
1860  jresult = (jdouble)result;
1861  return jresult;
1862 }
1863 
1864 
1865 SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1basisStatus(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1866  jint jresult = 0 ;
1869 
1870  (void)jenv;
1871  (void)jcls;
1872  (void)jarg1_;
1873  arg1 = *(operations_research::MPVariable **)&jarg1;
1874  result = (operations_research::MPSolver::BasisStatus)((operations_research::MPVariable const *)arg1)->basis_status();
1875  jresult = (jint)result;
1876  return jresult;
1877 }
1878 
1879 
1882 
1883  (void)jenv;
1884  (void)jcls;
1885  arg1 = *(operations_research::MPVariable **)&jarg1;
1886  delete arg1;
1887 }
1888 
1889 
1890 SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1name(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1891  jstring jresult = 0 ;
1893  std::string *result = 0 ;
1894 
1895  (void)jenv;
1896  (void)jcls;
1897  (void)jarg1_;
1898  arg1 = *(operations_research::MPConstraint **)&jarg1;
1899  result = (std::string *) &((operations_research::MPConstraint const *)arg1)->name();
1900  jresult = jenv->NewStringUTF(result->c_str());
1901  return jresult;
1902 }
1903 
1904 
1905 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1setCoefficient(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jdouble jarg3) {
1908  double arg3 ;
1909 
1910  (void)jenv;
1911  (void)jcls;
1912  (void)jarg1_;
1913  (void)jarg2_;
1914  arg1 = *(operations_research::MPConstraint **)&jarg1;
1915  arg2 = *(operations_research::MPVariable **)&jarg2;
1916  arg3 = (double)jarg3;
1917  (arg1)->SetCoefficient((operations_research::MPVariable const *)arg2,arg3);
1918 }
1919 
1920 
1921 SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1getCoefficient(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
1922  jdouble jresult = 0 ;
1925  double result;
1926 
1927  (void)jenv;
1928  (void)jcls;
1929  (void)jarg1_;
1930  (void)jarg2_;
1931  arg1 = *(operations_research::MPConstraint **)&jarg1;
1932  arg2 = *(operations_research::MPVariable **)&jarg2;
1933  result = (double)((operations_research::MPConstraint const *)arg1)->GetCoefficient((operations_research::MPVariable const *)arg2);
1934  jresult = (jdouble)result;
1935  return jresult;
1936 }
1937 
1938 
1939 SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1lb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1940  jdouble jresult = 0 ;
1942  double result;
1943 
1944  (void)jenv;
1945  (void)jcls;
1946  (void)jarg1_;
1947  arg1 = *(operations_research::MPConstraint **)&jarg1;
1948  result = (double)((operations_research::MPConstraint const *)arg1)->lb();
1949  jresult = (jdouble)result;
1950  return jresult;
1951 }
1952 
1953 
1954 SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1ub(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1955  jdouble jresult = 0 ;
1957  double result;
1958 
1959  (void)jenv;
1960  (void)jcls;
1961  (void)jarg1_;
1962  arg1 = *(operations_research::MPConstraint **)&jarg1;
1963  result = (double)((operations_research::MPConstraint const *)arg1)->ub();
1964  jresult = (jdouble)result;
1965  return jresult;
1966 }
1967 
1968 
1969 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1setLb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2) {
1971  double arg2 ;
1972 
1973  (void)jenv;
1974  (void)jcls;
1975  (void)jarg1_;
1976  arg1 = *(operations_research::MPConstraint **)&jarg1;
1977  arg2 = (double)jarg2;
1978  (arg1)->SetLB(arg2);
1979 }
1980 
1981 
1982 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1setUb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2) {
1984  double arg2 ;
1985 
1986  (void)jenv;
1987  (void)jcls;
1988  (void)jarg1_;
1989  arg1 = *(operations_research::MPConstraint **)&jarg1;
1990  arg2 = (double)jarg2;
1991  (arg1)->SetUB(arg2);
1992 }
1993 
1994 
1995 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1setBounds(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3) {
1997  double arg2 ;
1998  double arg3 ;
1999 
2000  (void)jenv;
2001  (void)jcls;
2002  (void)jarg1_;
2003  arg1 = *(operations_research::MPConstraint **)&jarg1;
2004  arg2 = (double)jarg2;
2005  arg3 = (double)jarg3;
2006  (arg1)->SetBounds(arg2,arg3);
2007 }
2008 
2009 
2010 SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1isLazy(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
2011  jboolean jresult = 0 ;
2013  bool result;
2014 
2015  (void)jenv;
2016  (void)jcls;
2017  (void)jarg1_;
2018  arg1 = *(operations_research::MPConstraint **)&jarg1;
2019  result = (bool)((operations_research::MPConstraint const *)arg1)->is_lazy();
2020  jresult = (jboolean)result;
2021  return jresult;
2022 }
2023 
2024 
2025 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1setIsLazy(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
2027  bool arg2 ;
2028 
2029  (void)jenv;
2030  (void)jcls;
2031  (void)jarg1_;
2032  arg1 = *(operations_research::MPConstraint **)&jarg1;
2033  arg2 = jarg2 ? true : false;
2034  (arg1)->set_is_lazy(arg2);
2035 }
2036 
2037 
2038 SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1index(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
2039  jint jresult = 0 ;
2041  int result;
2042 
2043  (void)jenv;
2044  (void)jcls;
2045  (void)jarg1_;
2046  arg1 = *(operations_research::MPConstraint **)&jarg1;
2047  result = (int)((operations_research::MPConstraint const *)arg1)->index();
2048  jresult = (jint)result;
2049  return jresult;
2050 }
2051 
2052 
2053 SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1dualValue(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
2054  jdouble jresult = 0 ;
2056  double result;
2057 
2058  (void)jenv;
2059  (void)jcls;
2060  (void)jarg1_;
2061  arg1 = *(operations_research::MPConstraint **)&jarg1;
2062  result = (double)((operations_research::MPConstraint const *)arg1)->dual_value();
2063  jresult = (jdouble)result;
2064  return jresult;
2065 }
2066 
2067 
2068 SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1basisStatus(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
2069  jint jresult = 0 ;
2072 
2073  (void)jenv;
2074  (void)jcls;
2075  (void)jarg1_;
2076  arg1 = *(operations_research::MPConstraint **)&jarg1;
2077  result = (operations_research::MPSolver::BasisStatus)((operations_research::MPConstraint const *)arg1)->basis_status();
2078  jresult = (jint)result;
2079  return jresult;
2080 }
2081 
2082 
2085 
2086  (void)jenv;
2087  (void)jcls;
2088  arg1 = *(operations_research::MPConstraint **)&jarg1;
2089  delete arg1;
2090 }
2091 
2092 
2094  jint jresult = 0 ;
2096 
2097  (void)jenv;
2098  (void)jcls;
2100  jresult = (jint)result;
2101  return jresult;
2102 }
2103 
2104 
2106  jint jresult = 0 ;
2108 
2109  (void)jenv;
2110  (void)jcls;
2112  jresult = (jint)result;
2113  return jresult;
2114 }
2115 
2116 
2118  jint jresult = 0 ;
2120 
2121  (void)jenv;
2122  (void)jcls;
2124  jresult = (jint)result;
2125  return jresult;
2126 }
2127 
2128 
2130  jint jresult = 0 ;
2132 
2133  (void)jenv;
2134  (void)jcls;
2136  jresult = (jint)result;
2137  return jresult;
2138 }
2139 
2140 
2142  jint jresult = 0 ;
2144 
2145  (void)jenv;
2146  (void)jcls;
2148  jresult = (jint)result;
2149  return jresult;
2150 }
2151 
2152 
2154  jint jresult = 0 ;
2156 
2157  (void)jenv;
2158  (void)jcls;
2160  jresult = (jint)result;
2161  return jresult;
2162 }
2163 
2164 
2166  jint jresult = 0 ;
2168 
2169  (void)jenv;
2170  (void)jcls;
2172  jresult = (jint)result;
2173  return jresult;
2174 }
2175 
2176 
2178  jint jresult = 0 ;
2180 
2181  (void)jenv;
2182  (void)jcls;
2184  jresult = (jint)result;
2185  return jresult;
2186 }
2187 
2188 
2190  jint jresult = 0 ;
2192 
2193  (void)jenv;
2194  (void)jcls;
2196  jresult = (jint)result;
2197  return jresult;
2198 }
2199 
2200 
2202  jint jresult = 0 ;
2204 
2205  (void)jenv;
2206  (void)jcls;
2208  jresult = (jint)result;
2209  return jresult;
2210 }
2211 
2212 
2214  jint jresult = 0 ;
2216 
2217  (void)jenv;
2218  (void)jcls;
2220  jresult = (jint)result;
2221  return jresult;
2222 }
2223 
2224 
2226  jint jresult = 0 ;
2228 
2229  (void)jenv;
2230  (void)jcls;
2232  jresult = (jint)result;
2233  return jresult;
2234 }
2235 
2236 
2238  jint jresult = 0 ;
2240 
2241  (void)jenv;
2242  (void)jcls;
2244  jresult = (jint)result;
2245  return jresult;
2246 }
2247 
2248 
2250  jint jresult = 0 ;
2252 
2253  (void)jenv;
2254  (void)jcls;
2256  jresult = (jint)result;
2257  return jresult;
2258 }
2259 
2260 
2262  jint jresult = 0 ;
2264 
2265  (void)jenv;
2266  (void)jcls;
2268  jresult = (jint)result;
2269  return jresult;
2270 }
2271 
2272 
2274  jint jresult = 0 ;
2276 
2277  (void)jenv;
2278  (void)jcls;
2280  jresult = (jint)result;
2281  return jresult;
2282 }
2283 
2284 
2286  jdouble jresult = 0 ;
2287  double result;
2288 
2289  (void)jenv;
2290  (void)jcls;
2292  jresult = (jdouble)result;
2293  return jresult;
2294 }
2295 
2296 
2298  jdouble jresult = 0 ;
2299  double result;
2300 
2301  (void)jenv;
2302  (void)jcls;
2304  jresult = (jdouble)result;
2305  return jresult;
2306 }
2307 
2308 
2310  jdouble jresult = 0 ;
2311  double result;
2312 
2313  (void)jenv;
2314  (void)jcls;
2316  jresult = (jdouble)result;
2317  return jresult;
2318 }
2319 
2320 
2322  jint jresult = 0 ;
2324 
2325  (void)jenv;
2326  (void)jcls;
2328  jresult = (jint)result;
2329  return jresult;
2330 }
2331 
2332 
2334  jint jresult = 0 ;
2336 
2337  (void)jenv;
2338  (void)jcls;
2340  jresult = (jint)result;
2341  return jresult;
2342 }
2343 
2344 
2346  jlong jresult = 0 ;
2348 
2349  (void)jenv;
2350  (void)jcls;
2352  *(operations_research::MPSolverParameters **)&jresult = result;
2353  return jresult;
2354 }
2355 
2356 
2357 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1setDoubleParam(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jdouble jarg3) {
2360  double arg3 ;
2361 
2362  (void)jenv;
2363  (void)jcls;
2364  (void)jarg1_;
2365  arg1 = *(operations_research::MPSolverParameters **)&jarg1;
2367  arg3 = (double)jarg3;
2368  (arg1)->SetDoubleParam(arg2,arg3);
2369 }
2370 
2371 
2372 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1setIntegerParam(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3) {
2375  int arg3 ;
2376 
2377  (void)jenv;
2378  (void)jcls;
2379  (void)jarg1_;
2380  arg1 = *(operations_research::MPSolverParameters **)&jarg1;
2382  arg3 = (int)jarg3;
2383  (arg1)->SetIntegerParam(arg2,arg3);
2384 }
2385 
2386 
2387 SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1getDoubleParam(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
2388  jdouble jresult = 0 ;
2391  double result;
2392 
2393  (void)jenv;
2394  (void)jcls;
2395  (void)jarg1_;
2396  arg1 = *(operations_research::MPSolverParameters **)&jarg1;
2398  result = (double)((operations_research::MPSolverParameters const *)arg1)->GetDoubleParam(arg2);
2399  jresult = (jdouble)result;
2400  return jresult;
2401 }
2402 
2403 
2404 SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1getIntegerParam(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
2405  jint jresult = 0 ;
2408  int result;
2409 
2410  (void)jenv;
2411  (void)jcls;
2412  (void)jarg1_;
2413  arg1 = *(operations_research::MPSolverParameters **)&jarg1;
2415  result = (int)((operations_research::MPSolverParameters const *)arg1)->GetIntegerParam(arg2);
2416  jresult = (jint)result;
2417  return jresult;
2418 }
2419 
2420 
2423 
2424  (void)jenv;
2425  (void)jcls;
2426  arg1 = *(operations_research::MPSolverParameters **)&jarg1;
2427  delete arg1;
2428 }
2429 
2430 
2432  jlong jresult = 0 ;
2434 
2435  (void)jenv;
2436  (void)jcls;
2438  *(operations_research::MPModelExportOptions **)&jresult = result;
2439  return jresult;
2440 }
2441 
2442 
2443 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1Obfuscate_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
2445  bool arg2 ;
2446 
2447  (void)jenv;
2448  (void)jcls;
2449  (void)jarg1_;
2450  arg1 = *(operations_research::MPModelExportOptions **)&jarg1;
2451  arg2 = jarg2 ? true : false;
2452  if (arg1) (arg1)->obfuscate = arg2;
2453 }
2454 
2455 
2457  jboolean jresult = 0 ;
2459  bool result;
2460 
2461  (void)jenv;
2462  (void)jcls;
2463  (void)jarg1_;
2464  arg1 = *(operations_research::MPModelExportOptions **)&jarg1;
2465  result = (bool) ((arg1)->obfuscate);
2466  jresult = (jboolean)result;
2467  return jresult;
2468 }
2469 
2470 
2471 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1LogInvalidNames_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
2473  bool arg2 ;
2474 
2475  (void)jenv;
2476  (void)jcls;
2477  (void)jarg1_;
2478  arg1 = *(operations_research::MPModelExportOptions **)&jarg1;
2479  arg2 = jarg2 ? true : false;
2480  if (arg1) (arg1)->log_invalid_names = arg2;
2481 }
2482 
2483 
2485  jboolean jresult = 0 ;
2487  bool result;
2488 
2489  (void)jenv;
2490  (void)jcls;
2491  (void)jarg1_;
2492  arg1 = *(operations_research::MPModelExportOptions **)&jarg1;
2493  result = (bool) ((arg1)->log_invalid_names);
2494  jresult = (jboolean)result;
2495  return jresult;
2496 }
2497 
2498 
2499 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1ShowUnusedVariables_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
2501  bool arg2 ;
2502 
2503  (void)jenv;
2504  (void)jcls;
2505  (void)jarg1_;
2506  arg1 = *(operations_research::MPModelExportOptions **)&jarg1;
2507  arg2 = jarg2 ? true : false;
2508  if (arg1) (arg1)->show_unused_variables = arg2;
2509 }
2510 
2511 
2513  jboolean jresult = 0 ;
2515  bool result;
2516 
2517  (void)jenv;
2518  (void)jcls;
2519  (void)jarg1_;
2520  arg1 = *(operations_research::MPModelExportOptions **)&jarg1;
2521  result = (bool) ((arg1)->show_unused_variables);
2522  jresult = (jboolean)result;
2523  return jresult;
2524 }
2525 
2526 
2527 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1MaxLineLength_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
2529  int arg2 ;
2530 
2531  (void)jenv;
2532  (void)jcls;
2533  (void)jarg1_;
2534  arg1 = *(operations_research::MPModelExportOptions **)&jarg1;
2535  arg2 = (int)jarg2;
2536  if (arg1) (arg1)->max_line_length = arg2;
2537 }
2538 
2539 
2541  jint jresult = 0 ;
2543  int result;
2544 
2545  (void)jenv;
2546  (void)jcls;
2547  (void)jarg1_;
2548  arg1 = *(operations_research::MPModelExportOptions **)&jarg1;
2549  result = (int) ((arg1)->max_line_length);
2550  jresult = (jint)result;
2551  return jresult;
2552 }
2553 
2554 
2557 
2558  (void)jenv;
2559  (void)jcls;
2560  arg1 = *(operations_research::MPModelExportOptions **)&jarg1;
2561  delete arg1;
2562 }
2563 
2564 
2565 #ifdef __cplusplus
2566 }
2567 #endif
2568 
#define LOG(severity)
Definition: base/logging.h:423
static jbyteArray MakeJByteArray(JNIEnv *env, const char *a, int size)
Definition: jniutil.h:59
static char * MakeCharArray(JNIEnv *env, jbyteArray a, int *size)
Definition: jniutil.h:47
The class for constraints of a Mathematical Programming (MP) model.
A class to express a linear objective.
This mathematical programming (MP) solver class is the main class though which users build and solve ...
static bool SupportsProblemType(OptimizationProblemType problem_type)
Whether the given problem type is supported (this will depend on the targets that you linked).
static MPSolver * CreateSolver(const std::string &solver_id)
Recommended factory method to create a MPSolver instance, especially in non C++ languages.
ResultStatus
The status of solving the problem.
@ NOT_SOLVED
not been solved yet.
static void SolveWithProto(const MPModelRequest &model_request, MPSolutionResponse *response)
Solves the model encoded by a MPModelRequest protocol buffer and fills the solution encoded as a MPSo...
OptimizationProblemType
The type of problems (LP or MIP) that will be solved and the underlying solver (GLOP,...
std::vector< double > ComputeConstraintActivities() const
Advanced usage: compute the "activities" of all constraints, which are the sums of their linear terms...
static double infinity()
Infinity.
bool InterruptSolve()
Interrupts the Solve() execution to terminate processing if possible.
ResultStatus Solve()
Solves the problem using the default parameter values.
BasisStatus
Advanced usage: possible basis status values for a variable and the slack variable of a linear constr...
This class stores parameter settings for LP and MIP solvers.
IncrementalityValues
Advanced usage: Incrementality options.
@ INCREMENTALITY_OFF
Start solve from scratch.
@ INCREMENTALITY_ON
Reuse results from previous solve as much as the underlying solver allows.
ScalingValues
Advanced usage: Scaling options.
static const IncrementalityValues kDefaultIncrementality
DoubleParam
Enumeration of parameters that take continuous values.
@ DUAL_TOLERANCE
Advanced usage: tolerance for dual feasibility of basic solutions.
@ PRIMAL_TOLERANCE
Advanced usage: tolerance for primal feasibility of basic solutions.
@ RELATIVE_MIP_GAP
Limit for relative MIP gap.
static const PresolveValues kDefaultPresolve
IntegerParam
Enumeration of parameters that take integer or categorical values.
@ LP_ALGORITHM
Algorithm to solve linear programs.
@ SCALING
Advanced usage: enable or disable matrix scaling.
@ PRESOLVE
Advanced usage: presolve mode.
@ INCREMENTALITY
Advanced usage: incrementality from one solve to the next.
PresolveValues
For each categorical parameter, enumeration of possible values.
The class for variables of a Mathematical Programming (MP) model.
SharedResponseManager * response
const std::string name
IntVar * var
Definition: expr_array.cc:1874
GRBmodel * model
A C++ wrapper that provides a simple and unified interface to several linear programming and mixed in...
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1index(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_new_1MPSolver(JNIEnv *jenv, jclass jcls, jstring jarg1, jint jarg2)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1minimization(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1INCREMENTALITY_1ON_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1setHint(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobjectArray jarg2, jdoubleArray jarg3)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1CPLEX_1LINEAR_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1kDefaultPresolve_1get(JNIEnv *jenv, jclass jcls)
SWIGINTERN operations_research::MPSolutionResponse operations_research_MPSolver_createSolutionResponseProto(operations_research::MPSolver *self)
SWIGEXPORT jdoubleArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1computeConstraintActivities(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1setOptimizationDirection(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1makeVar(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jboolean jarg4, jstring jarg5)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1value(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1LP_1ALGORITHM_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1basisStatus(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1SCALING_1ON_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1isMip(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1createSolver(JNIEnv *jenv, jclass jcls, jstring jarg1)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1setLb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2)
SWIGINTERN std::string operations_research_MPSolver_loadModelFromProtoWithUniqueNamesOrDie(operations_research::MPSolver *self, operations_research::MPModelProto const &input_model)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1solve_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1objective(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1suppressOutput(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1PRESOLVE_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1BOP_1INTEGER_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1PRESOLVE_1ON_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1makeConstraint_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jstring jarg4)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1SAT_1INTEGER_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1setBounds(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1basisStatus(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1kDefaultPrimalTolerance_1get(JNIEnv *jenv, jclass jcls)
SWIGINTERN bool operations_research_MPSolver_setNumThreads(operations_research::MPSolver *self, int num_theads)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1NOT_1SOLVED_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1getCoefficient(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_)
SWIGEXPORT jobjectArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1variables(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1nodes(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1setIsLazy(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2)
SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1name(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_delete_1MPVariable(JNIEnv *jenv, jclass jcls, jlong jarg1)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1getDoubleParam(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1lb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1setTimeLimit(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2)
SWIGEXPORT jbyteArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1createSolutionResponseProto(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1computeExactConditionNumber(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1GLPK_1LINEAR_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
SWIGINTERN bool operations_research_MPSolver_loadSolutionFromProto(operations_research::MPSolver *self, operations_research::MPSolutionResponse const &response)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1setOffset(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1supportsProblemType(JNIEnv *jenv, jclass jcls, jint jarg1)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1makeBoolVar(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1maximization(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1lb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_delete_1MPModelExportOptions(JNIEnv *jenv, jclass jcls, jlong jarg1)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1solve_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1setCoefficient(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jdouble jarg3)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1setMinimization(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1setInteger(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1setUb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2)
SWIGEXPORT jbyteArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1exportModelToProto(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_new_1MPModelExportOptions(JNIEnv *jenv, jclass jcls)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1ShowUnusedVariables_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1makeNumVar(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jstring jarg4)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1isLazy(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_delete_1MPConstraint(JNIEnv *jenv, jclass jcls, jlong jarg1)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1DUAL_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1SCIP_1MIXED_1INTEGER_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
#define SWIGUNUSED
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1PRESOLVE_1OFF_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1GUROBI_1LINEAR_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionCodes code, const char *msg)
@ SWIG_JavaIOException
@ SWIG_JavaArithmeticException
@ SWIG_JavaUnknownError
@ SWIG_JavaRuntimeException
@ SWIG_JavaNullPointerException
@ SWIG_JavaDirectorPureVirtual
@ SWIG_JavaOutOfMemoryError
@ SWIG_JavaIllegalStateException
@ SWIG_JavaIllegalArgumentException
@ SWIG_JavaIndexOutOfBoundsException
SWIGINTERN std::string operations_research_MPSolver_loadModelFromProto(operations_research::MPSolver *self, operations_research::MPModelProto const &input_model)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1BARRIER_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1FREE_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1loadSolutionFromProto(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_delete_1MPSolverParameters(JNIEnv *jenv, jclass jcls, jlong jarg1)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1index(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1setSolverSpecificParametersAsString(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1Obfuscate_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1constraint(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1setDoubleParam(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jdouble jarg3)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1XPRESS_1MIXED_1INTEGER_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1CPLEX_1MIXED_1INTEGER_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1CLP_1LINEAR_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1infinity(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1offset(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1ub(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1DUAL_1TOLERANCE_1get(JNIEnv *jenv, jclass jcls)
SWIGINTERN std::string operations_research_MPSolver_exportModelAsMpsFormat__SWIG_0(operations_research::MPSolver *self, operations_research::MPModelExportOptions const &options=operations_research::MPModelExportOptions())
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1numConstraints(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_delete_1MPSolver(JNIEnv *jenv, jclass jcls, jlong jarg1)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1INCREMENTALITY_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1LogInvalidNames_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
#define SWIGINTERN
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1reset(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1MaxLineLength_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1GLOP_1LINEAR_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jbyteArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1solveWithProto(JNIEnv *jenv, jclass jcls, jbyteArray jarg1)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1ub(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1exportModelAsLpFormat_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1makeConstraint_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1lookupConstraintOrNull(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2)
SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1loadModelFromProto(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2)
SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1exportModelAsMpsFormat_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_)
SWIGINTERN void operations_research_MPSolver_setHint(operations_research::MPSolver *self, std::vector< operations_research::MPVariable * > const &variables, std::vector< double > const &values)
SWIGINTERN operations_research::MPSolutionResponse operations_research_MPSolver_solveWithProto(operations_research::MPModelRequest const &model_request)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1kDefaultRelativeMipGap_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1clear(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1Obfuscate_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1CBC_1MIXED_1INTEGER_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1setNumThreads(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2)
SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1loadModelFromProtoWithUniqueNamesOrDie(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1kDefaultDualTolerance_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1ShowUnusedVariables_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1makeIntVar(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jstring jarg4)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1RELATIVE_1MIP_1GAP_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1setLb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2)
SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1exportModelAsMpsFormat_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1makeConstraint_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1solutionValue(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1interruptSolve(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1XPRESS_1LINEAR_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1PRIMAL_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1variable(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1kDefaultIncrementality_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1INCREMENTALITY_1OFF_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1PRIMAL_1TOLERANCE_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1SCALING_1OFF_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1setIntegerParam(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1reducedCost(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1makeConstraint_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3)
SWIGEXPORT jobjectArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1constraints(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1setCoefficient(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jdouble jarg3)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1dualValue(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1setUb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1setBounds(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1verifySolution(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jboolean jarg3)
SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1exportModelAsLpFormat_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1LogInvalidNames_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_new_1MPSolverParameters(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1getCoefficient(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_)
#define SWIGEXPORT
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1enableOutput(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGINTERN std::string operations_research_MPSolver_exportModelAsLpFormat__SWIG_0(operations_research::MPSolver *self, operations_research::MPModelExportOptions const &options=operations_research::MPModelExportOptions())
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1clear(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1name(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1GUROBI_1MIXED_1INTEGER_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1SCALING_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1wallTime(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1getIntegerParam(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1GLPK_1MIXED_1INTEGER_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1lookupVariableOrNull(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1bestBound(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_delete_1MPObjective(JNIEnv *jenv, jclass jcls, jlong jarg1)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1numVariables(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGINTERN operations_research::MPModelProto operations_research_MPSolver_exportModelToProto(operations_research::MPSolver *self)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1setMaximization(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1iterations(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1MaxLineLength_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2)
const int FATAL
Definition: log_severity.h:32
int NumVariables(const VariablesProto &variables)
int NumConstraints(const LinearConstraintsProto &linear_constraints)
std::function< int64_t(const Model &)> Value(IntegerVariable v)
Definition: integer.h:1492
IntegerValue GetCoefficient(const IntegerVariable var, const LinearExpression &expr)
absl::StatusOr< std::string > ExportModelAsMpsFormat(const MPModelProto &model, const MPModelExportOptions &options)
Outputs the current model (variables, constraints, objective) as a string encoded in MPS file format,...
absl::StatusOr< std::string > ExportModelAsLpFormat(const MPModelProto &model, const MPModelExportOptions &options)
Outputs the current model (variables, constraints, objective) as a string encoded in the so-called "C...
int index
Definition: pack.cc:509
int nodes
SWIG_JavaExceptionCodes code