OR-Tools  9.2
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.1
4  *
5  * This file is not intended to be easily readable and contains a number of
6  * coding conventions designed to improve portability and efficiency. Do not make
7  * changes to this file unless you know what you are doing--modify the SWIG
8  * interface file instead.
9  * ----------------------------------------------------------------------------- */
10 
11 
12 #ifndef 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 
267  std::string error_message;
268  self->LoadModelFromProto(input_model, &error_message);
269  return error_message;
270  }
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  }
284  self->ExportModelToProto(&model);
285  return model;
286  }
289  self->FillSolutionResponseProto(&response);
290  return response;
291  }
293  const absl::Status status =
294  self->LoadSolutionFromProto(response);
295  LOG_IF(ERROR, !status.ok()) << "LoadSolutionFromProto() failed: " << status;
296  return status.ok();
297  }
301  return response;
302  }
305  self->ExportModelToProto(&model);
306  return ExportModelAsLpFormat(model, options).value_or("");
307  }
310  self->ExportModelToProto(&model);
311  return ExportModelAsMpsFormat(model, options).value_or("");
312  }
313 SWIGINTERN void operations_research_MPSolver_setHint(operations_research::MPSolver *self,std::vector< operations_research::MPVariable * > const &variables,std::vector< double > const &values){
314  if (variables.size() != values.size()) {
315  LOG(FATAL) << "Different number of variables and values when setting "
316  << "hint.";
317  }
318  std::vector<std::pair<const operations_research::MPVariable*, double> >
319  hint(variables.size());
320  for (int i = 0; i < variables.size(); ++i) {
321  hint[i] = std::make_pair(variables[i], values[i]);
322  }
323  self->SetHint(hint);
324  }
326  return self->SetNumThreads(num_theads).ok();
327  }
328 
329 #ifdef __cplusplus
330 extern "C" {
331 #endif
332 
334  jint jresult = 0 ;
336 
337  (void)jenv;
338  (void)jcls;
340  jresult = (jint)result;
341  return jresult;
342 }
343 
344 
346  jint jresult = 0 ;
348 
349  (void)jenv;
350  (void)jcls;
352  jresult = (jint)result;
353  return jresult;
354 }
355 
356 
358  jint jresult = 0 ;
360 
361  (void)jenv;
362  (void)jcls;
364  jresult = (jint)result;
365  return jresult;
366 }
367 
368 
370  jint jresult = 0 ;
372 
373  (void)jenv;
374  (void)jcls;
376  jresult = (jint)result;
377  return jresult;
378 }
379 
380 
382  jint jresult = 0 ;
384 
385  (void)jenv;
386  (void)jcls;
388  jresult = (jint)result;
389  return jresult;
390 }
391 
392 
394  jint jresult = 0 ;
396 
397  (void)jenv;
398  (void)jcls;
400  jresult = (jint)result;
401  return jresult;
402 }
403 
404 
406  jint jresult = 0 ;
408 
409  (void)jenv;
410  (void)jcls;
412  jresult = (jint)result;
413  return jresult;
414 }
415 
416 
418  jint jresult = 0 ;
420 
421  (void)jenv;
422  (void)jcls;
424  jresult = (jint)result;
425  return jresult;
426 }
427 
428 
430  jint jresult = 0 ;
432 
433  (void)jenv;
434  (void)jcls;
436  jresult = (jint)result;
437  return jresult;
438 }
439 
440 
442  jint jresult = 0 ;
444 
445  (void)jenv;
446  (void)jcls;
448  jresult = (jint)result;
449  return jresult;
450 }
451 
452 
454  jint jresult = 0 ;
456 
457  (void)jenv;
458  (void)jcls;
460  jresult = (jint)result;
461  return jresult;
462 }
463 
464 
466  jint jresult = 0 ;
468 
469  (void)jenv;
470  (void)jcls;
472  jresult = (jint)result;
473  return jresult;
474 }
475 
476 
478  jint jresult = 0 ;
480 
481  (void)jenv;
482  (void)jcls;
484  jresult = (jint)result;
485  return jresult;
486 }
487 
488 
490  jint jresult = 0 ;
492 
493  (void)jenv;
494  (void)jcls;
496  jresult = (jint)result;
497  return jresult;
498 }
499 
500 
501 SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_new_1MPSolver(JNIEnv *jenv, jclass jcls, jstring jarg1, jint jarg2) {
502  jlong jresult = 0 ;
503  std::string *arg1 = 0 ;
505  operations_research::MPSolver *result = 0 ;
506 
507  (void)jenv;
508  (void)jcls;
509  if(!jarg1) {
511  return 0;
512  }
513  const char *arg1_pstr = (const char *)jenv->GetStringUTFChars(jarg1, 0);
514  if (!arg1_pstr) return 0;
515  std::string arg1_str(arg1_pstr);
516  arg1 = &arg1_str;
517  jenv->ReleaseStringUTFChars(jarg1, arg1_pstr);
519  result = (operations_research::MPSolver *)new operations_research::MPSolver((std::string const &)*arg1,arg2);
520  *(operations_research::MPSolver **)&jresult = result;
521  return jresult;
522 }
523 
524 
527 
528  (void)jenv;
529  (void)jcls;
530  arg1 = *(operations_research::MPSolver **)&jarg1;
531  delete arg1;
532 }
533 
534 
536  jlong jresult = 0 ;
537  std::string *arg1 = 0 ;
538  operations_research::MPSolver *result = 0 ;
539 
540  (void)jenv;
541  (void)jcls;
542  if(!jarg1) {
544  return 0;
545  }
546  const char *arg1_pstr = (const char *)jenv->GetStringUTFChars(jarg1, 0);
547  if (!arg1_pstr) return 0;
548  std::string arg1_str(arg1_pstr);
549  arg1 = &arg1_str;
550  jenv->ReleaseStringUTFChars(jarg1, arg1_pstr);
551  result = (operations_research::MPSolver *)operations_research::MPSolver::CreateSolver((std::string const &)*arg1);
552  *(operations_research::MPSolver **)&jresult = result;
553  return jresult;
554 }
555 
556 
558  jboolean jresult = 0 ;
560  bool result;
561 
562  (void)jenv;
563  (void)jcls;
566  jresult = (jboolean)result;
567  return jresult;
568 }
569 
570 
571 SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1isMip(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
572  jboolean jresult = 0 ;
574  bool result;
575 
576  (void)jenv;
577  (void)jcls;
578  (void)jarg1_;
579  arg1 = *(operations_research::MPSolver **)&jarg1;
580  result = (bool)((operations_research::MPSolver const *)arg1)->IsMIP();
581  jresult = (jboolean)result;
582  return jresult;
583 }
584 
585 
586 SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1problemType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
587  jint jresult = 0 ;
590 
591  (void)jenv;
592  (void)jcls;
593  (void)jarg1_;
594  arg1 = *(operations_research::MPSolver **)&jarg1;
596  jresult = (jint)result;
597  return jresult;
598 }
599 
600 
601 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1clear(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
603 
604  (void)jenv;
605  (void)jcls;
606  (void)jarg1_;
607  arg1 = *(operations_research::MPSolver **)&jarg1;
608  (arg1)->Clear();
609 }
610 
611 
612 SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1numVariables(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
613  jint jresult = 0 ;
615  int result;
616 
617  (void)jenv;
618  (void)jcls;
619  (void)jarg1_;
620  arg1 = *(operations_research::MPSolver **)&jarg1;
621  result = (int)((operations_research::MPSolver const *)arg1)->NumVariables();
622  jresult = (jint)result;
623  return jresult;
624 }
625 
626 
627 SWIGEXPORT jobjectArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1variables(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
628  jobjectArray jresult = 0 ;
630  std::vector< operations_research::MPVariable * > *result = 0 ;
631 
632  (void)jenv;
633  (void)jcls;
634  (void)jarg1_;
635  arg1 = *(operations_research::MPSolver **)&jarg1;
636  result = (std::vector< operations_research::MPVariable * > *) &((operations_research::MPSolver const *)arg1)->variables();
637  {
638  if (nullptr == result)
639  return 0;
640  std::string java_class_path ="com/google/ortools/linearsolver" "/""MPVariable";
641  jclass object_class = jenv->FindClass(java_class_path.c_str());
642  if (nullptr == object_class)
643  return 0;
644  jresult = jenv->NewObjectArray(result->size(), object_class, 0);
645  jmethodID ctor = jenv->GetMethodID(object_class,"<init>", "(JZ)V");
646  for (int i = 0; i < result->size(); ++i) {
647  jlong obj_ptr = 0;
648  *((operations_research::MPVariable **)&obj_ptr) = (*result)[i];
649  jobject elem = jenv->NewObject(object_class, ctor, obj_ptr, false);
650  jenv->SetObjectArrayElement(jresult, i, elem);
651  }
652  }
653  return jresult;
654 }
655 
656 
657 SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1variable(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
658  jlong jresult = 0 ;
660  int arg2 ;
661  operations_research::MPVariable *result = 0 ;
662 
663  (void)jenv;
664  (void)jcls;
665  (void)jarg1_;
666  arg1 = *(operations_research::MPSolver **)&jarg1;
667  arg2 = (int)jarg2;
668  result = (operations_research::MPVariable *)((operations_research::MPSolver const *)arg1)->variable(arg2);
669  *(operations_research::MPVariable **)&jresult = result;
670  return jresult;
671 }
672 
673 
674 SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1lookupVariableOrNull(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
675  jlong jresult = 0 ;
677  std::string *arg2 = 0 ;
678  operations_research::MPVariable *result = 0 ;
679 
680  (void)jenv;
681  (void)jcls;
682  (void)jarg1_;
683  arg1 = *(operations_research::MPSolver **)&jarg1;
684  if(!jarg2) {
686  return 0;
687  }
688  const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
689  if (!arg2_pstr) return 0;
690  std::string arg2_str(arg2_pstr);
691  arg2 = &arg2_str;
692  jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
693  result = (operations_research::MPVariable *)((operations_research::MPSolver const *)arg1)->LookupVariableOrNull((std::string const &)*arg2);
694  *(operations_research::MPVariable **)&jresult = result;
695  return jresult;
696 }
697 
698 
699 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) {
700  jlong jresult = 0 ;
702  double arg2 ;
703  double arg3 ;
704  bool arg4 ;
705  std::string *arg5 = 0 ;
706  operations_research::MPVariable *result = 0 ;
707 
708  (void)jenv;
709  (void)jcls;
710  (void)jarg1_;
711  arg1 = *(operations_research::MPSolver **)&jarg1;
712  arg2 = (double)jarg2;
713  arg3 = (double)jarg3;
714  arg4 = jarg4 ? true : false;
715  if(!jarg5) {
717  return 0;
718  }
719  const char *arg5_pstr = (const char *)jenv->GetStringUTFChars(jarg5, 0);
720  if (!arg5_pstr) return 0;
721  std::string arg5_str(arg5_pstr);
722  arg5 = &arg5_str;
723  jenv->ReleaseStringUTFChars(jarg5, arg5_pstr);
724  result = (operations_research::MPVariable *)(arg1)->MakeVar(arg2,arg3,arg4,(std::string const &)*arg5);
725  *(operations_research::MPVariable **)&jresult = result;
726  return jresult;
727 }
728 
729 
730 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) {
731  jlong jresult = 0 ;
733  double arg2 ;
734  double arg3 ;
735  std::string *arg4 = 0 ;
736  operations_research::MPVariable *result = 0 ;
737 
738  (void)jenv;
739  (void)jcls;
740  (void)jarg1_;
741  arg1 = *(operations_research::MPSolver **)&jarg1;
742  arg2 = (double)jarg2;
743  arg3 = (double)jarg3;
744  if(!jarg4) {
746  return 0;
747  }
748  const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0);
749  if (!arg4_pstr) return 0;
750  std::string arg4_str(arg4_pstr);
751  arg4 = &arg4_str;
752  jenv->ReleaseStringUTFChars(jarg4, arg4_pstr);
753  result = (operations_research::MPVariable *)(arg1)->MakeNumVar(arg2,arg3,(std::string const &)*arg4);
754  *(operations_research::MPVariable **)&jresult = result;
755  return jresult;
756 }
757 
758 
759 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) {
760  jlong jresult = 0 ;
762  double arg2 ;
763  double arg3 ;
764  std::string *arg4 = 0 ;
765  operations_research::MPVariable *result = 0 ;
766 
767  (void)jenv;
768  (void)jcls;
769  (void)jarg1_;
770  arg1 = *(operations_research::MPSolver **)&jarg1;
771  arg2 = (double)jarg2;
772  arg3 = (double)jarg3;
773  if(!jarg4) {
775  return 0;
776  }
777  const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0);
778  if (!arg4_pstr) return 0;
779  std::string arg4_str(arg4_pstr);
780  arg4 = &arg4_str;
781  jenv->ReleaseStringUTFChars(jarg4, arg4_pstr);
782  result = (operations_research::MPVariable *)(arg1)->MakeIntVar(arg2,arg3,(std::string const &)*arg4);
783  *(operations_research::MPVariable **)&jresult = result;
784  return jresult;
785 }
786 
787 
788 SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1makeBoolVar(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
789  jlong jresult = 0 ;
791  std::string *arg2 = 0 ;
792  operations_research::MPVariable *result = 0 ;
793 
794  (void)jenv;
795  (void)jcls;
796  (void)jarg1_;
797  arg1 = *(operations_research::MPSolver **)&jarg1;
798  if(!jarg2) {
800  return 0;
801  }
802  const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
803  if (!arg2_pstr) return 0;
804  std::string arg2_str(arg2_pstr);
805  arg2 = &arg2_str;
806  jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
807  result = (operations_research::MPVariable *)(arg1)->MakeBoolVar((std::string const &)*arg2);
808  *(operations_research::MPVariable **)&jresult = result;
809  return jresult;
810 }
811 
812 
813 SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1numConstraints(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
814  jint jresult = 0 ;
816  int result;
817 
818  (void)jenv;
819  (void)jcls;
820  (void)jarg1_;
821  arg1 = *(operations_research::MPSolver **)&jarg1;
822  result = (int)((operations_research::MPSolver const *)arg1)->NumConstraints();
823  jresult = (jint)result;
824  return jresult;
825 }
826 
827 
828 SWIGEXPORT jobjectArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1constraints(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
829  jobjectArray jresult = 0 ;
831  std::vector< operations_research::MPConstraint * > *result = 0 ;
832 
833  (void)jenv;
834  (void)jcls;
835  (void)jarg1_;
836  arg1 = *(operations_research::MPSolver **)&jarg1;
837  result = (std::vector< operations_research::MPConstraint * > *) &((operations_research::MPSolver const *)arg1)->constraints();
838  {
839  if (nullptr == result)
840  return 0;
841  std::string java_class_path ="com/google/ortools/linearsolver" "/""MPConstraint";
842  jclass object_class = jenv->FindClass(java_class_path.c_str());
843  if (nullptr == object_class)
844  return 0;
845  jresult = jenv->NewObjectArray(result->size(), object_class, 0);
846  jmethodID ctor = jenv->GetMethodID(object_class,"<init>", "(JZ)V");
847  for (int i = 0; i < result->size(); ++i) {
848  jlong obj_ptr = 0;
849  *((operations_research::MPConstraint **)&obj_ptr) = (*result)[i];
850  jobject elem = jenv->NewObject(object_class, ctor, obj_ptr, false);
851  jenv->SetObjectArrayElement(jresult, i, elem);
852  }
853  }
854  return jresult;
855 }
856 
857 
858 SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1constraint(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
859  jlong jresult = 0 ;
861  int arg2 ;
863 
864  (void)jenv;
865  (void)jcls;
866  (void)jarg1_;
867  arg1 = *(operations_research::MPSolver **)&jarg1;
868  arg2 = (int)jarg2;
869  result = (operations_research::MPConstraint *)((operations_research::MPSolver const *)arg1)->constraint(arg2);
870  *(operations_research::MPConstraint **)&jresult = result;
871  return jresult;
872 }
873 
874 
875 SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1lookupConstraintOrNull(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
876  jlong jresult = 0 ;
878  std::string *arg2 = 0 ;
880 
881  (void)jenv;
882  (void)jcls;
883  (void)jarg1_;
884  arg1 = *(operations_research::MPSolver **)&jarg1;
885  if(!jarg2) {
887  return 0;
888  }
889  const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
890  if (!arg2_pstr) return 0;
891  std::string arg2_str(arg2_pstr);
892  arg2 = &arg2_str;
893  jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
894  result = (operations_research::MPConstraint *)((operations_research::MPSolver const *)arg1)->LookupConstraintOrNull((std::string const &)*arg2);
895  *(operations_research::MPConstraint **)&jresult = result;
896  return jresult;
897 }
898 
899 
900 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) {
901  jlong jresult = 0 ;
903  double arg2 ;
904  double arg3 ;
906 
907  (void)jenv;
908  (void)jcls;
909  (void)jarg1_;
910  arg1 = *(operations_research::MPSolver **)&jarg1;
911  arg2 = (double)jarg2;
912  arg3 = (double)jarg3;
913  result = (operations_research::MPConstraint *)(arg1)->MakeRowConstraint(arg2,arg3);
914  *(operations_research::MPConstraint **)&jresult = result;
915  return jresult;
916 }
917 
918 
920  jlong jresult = 0 ;
923 
924  (void)jenv;
925  (void)jcls;
926  (void)jarg1_;
927  arg1 = *(operations_research::MPSolver **)&jarg1;
928  result = (operations_research::MPConstraint *)(arg1)->MakeRowConstraint();
929  *(operations_research::MPConstraint **)&jresult = result;
930  return jresult;
931 }
932 
933 
934 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) {
935  jlong jresult = 0 ;
937  double arg2 ;
938  double arg3 ;
939  std::string *arg4 = 0 ;
941 
942  (void)jenv;
943  (void)jcls;
944  (void)jarg1_;
945  arg1 = *(operations_research::MPSolver **)&jarg1;
946  arg2 = (double)jarg2;
947  arg3 = (double)jarg3;
948  if(!jarg4) {
950  return 0;
951  }
952  const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0);
953  if (!arg4_pstr) return 0;
954  std::string arg4_str(arg4_pstr);
955  arg4 = &arg4_str;
956  jenv->ReleaseStringUTFChars(jarg4, arg4_pstr);
957  result = (operations_research::MPConstraint *)(arg1)->MakeRowConstraint(arg2,arg3,(std::string const &)*arg4);
958  *(operations_research::MPConstraint **)&jresult = result;
959  return jresult;
960 }
961 
962 
963 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) {
964  jlong jresult = 0 ;
966  std::string *arg2 = 0 ;
968 
969  (void)jenv;
970  (void)jcls;
971  (void)jarg1_;
972  arg1 = *(operations_research::MPSolver **)&jarg1;
973  if(!jarg2) {
975  return 0;
976  }
977  const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
978  if (!arg2_pstr) return 0;
979  std::string arg2_str(arg2_pstr);
980  arg2 = &arg2_str;
981  jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
982  result = (operations_research::MPConstraint *)(arg1)->MakeRowConstraint((std::string const &)*arg2);
983  *(operations_research::MPConstraint **)&jresult = result;
984  return jresult;
985 }
986 
987 
988 SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1objective(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
989  jlong jresult = 0 ;
992 
993  (void)jenv;
994  (void)jcls;
995  (void)jarg1_;
996  arg1 = *(operations_research::MPSolver **)&jarg1;
997  result = (operations_research::MPObjective *)(arg1)->MutableObjective();
998  *(operations_research::MPObjective **)&jresult = result;
999  return jresult;
1000 }
1001 
1002 
1004  jint jresult = 0 ;
1006 
1007  (void)jenv;
1008  (void)jcls;
1010  jresult = (jint)result;
1011  return jresult;
1012 }
1013 
1014 
1016  jint jresult = 0 ;
1019 
1020  (void)jenv;
1021  (void)jcls;
1022  (void)jarg1_;
1023  arg1 = *(operations_research::MPSolver **)&jarg1;
1025  jresult = (jint)result;
1026  return jresult;
1027 }
1028 
1029 
1030 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_) {
1031  jint jresult = 0 ;
1035 
1036  (void)jenv;
1037  (void)jcls;
1038  (void)jarg1_;
1039  (void)jarg2_;
1040  arg1 = *(operations_research::MPSolver **)&jarg1;
1041  arg2 = *(operations_research::MPSolverParameters **)&jarg2;
1042  if (!arg2) {
1043  SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "operations_research::MPSolverParameters const & reference is null");
1044  return 0;
1045  }
1047  jresult = (jint)result;
1048  return jresult;
1049 }
1050 
1051 
1052 SWIGEXPORT jdoubleArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1computeConstraintActivities(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1053  jdoubleArray jresult = 0 ;
1055  std::vector< double > result;
1056 
1057  (void)jenv;
1058  (void)jcls;
1059  (void)jarg1_;
1060  arg1 = *(operations_research::MPSolver **)&jarg1;
1061  result = ((operations_research::MPSolver const *)arg1)->ComputeConstraintActivities();
1062 
1063  const std::vector<double>& vec = result;
1064  jresult = jenv->NewDoubleArray(vec.size());
1065  jenv->SetDoubleArrayRegion(jresult, 0, vec.size(), reinterpret_cast<const jdouble*>(vec.data()));
1066 
1067  return jresult;
1068 }
1069 
1070 
1071 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) {
1072  jboolean jresult = 0 ;
1074  double arg2 ;
1075  bool arg3 ;
1076  bool result;
1077 
1078  (void)jenv;
1079  (void)jcls;
1080  (void)jarg1_;
1081  arg1 = *(operations_research::MPSolver **)&jarg1;
1082  arg2 = (double)jarg2;
1083  arg3 = jarg3 ? true : false;
1084  result = (bool)((operations_research::MPSolver const *)arg1)->VerifySolution(arg2,arg3);
1085  jresult = (jboolean)result;
1086  return jresult;
1087 }
1088 
1089 
1090 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1reset(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1092 
1093  (void)jenv;
1094  (void)jcls;
1095  (void)jarg1_;
1096  arg1 = *(operations_research::MPSolver **)&jarg1;
1097  (arg1)->Reset();
1098 }
1099 
1100 
1101 SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1interruptSolve(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1102  jboolean jresult = 0 ;
1104  bool result;
1105 
1106  (void)jenv;
1107  (void)jcls;
1108  (void)jarg1_;
1109  arg1 = *(operations_research::MPSolver **)&jarg1;
1110  result = (bool)(arg1)->InterruptSolve();
1111  jresult = (jboolean)result;
1112  return jresult;
1113 }
1114 
1115 
1116 SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1setSolverSpecificParametersAsString(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
1117  jboolean jresult = 0 ;
1119  std::string *arg2 = 0 ;
1120  bool result;
1121 
1122  (void)jenv;
1123  (void)jcls;
1124  (void)jarg1_;
1125  arg1 = *(operations_research::MPSolver **)&jarg1;
1126  if(!jarg2) {
1128  return 0;
1129  }
1130  const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
1131  if (!arg2_pstr) return 0;
1132  std::string arg2_str(arg2_pstr);
1133  arg2 = &arg2_str;
1134  jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
1135  result = (bool)(arg1)->SetSolverSpecificParametersAsString((std::string const &)*arg2);
1136  jresult = (jboolean)result;
1137  return jresult;
1138 }
1139 
1140 
1142  jint jresult = 0 ;
1144 
1145  (void)jenv;
1146  (void)jcls;
1148  jresult = (jint)result;
1149  return jresult;
1150 }
1151 
1152 
1154  jdouble jresult = 0 ;
1155  double result;
1156 
1157  (void)jenv;
1158  (void)jcls;
1159  result = (double)operations_research::MPSolver::infinity();
1160  jresult = (jdouble)result;
1161  return jresult;
1162 }
1163 
1164 
1165 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1enableOutput(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1167 
1168  (void)jenv;
1169  (void)jcls;
1170  (void)jarg1_;
1171  arg1 = *(operations_research::MPSolver **)&jarg1;
1172  (arg1)->EnableOutput();
1173 }
1174 
1175 
1176 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1suppressOutput(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1178 
1179  (void)jenv;
1180  (void)jcls;
1181  (void)jarg1_;
1182  arg1 = *(operations_research::MPSolver **)&jarg1;
1183  (arg1)->SuppressOutput();
1184 }
1185 
1186 
1187 SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1iterations(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1188  jlong jresult = 0 ;
1190  int64_t result;
1191 
1192  (void)jenv;
1193  (void)jcls;
1194  (void)jarg1_;
1195  arg1 = *(operations_research::MPSolver **)&jarg1;
1196  result = (int64_t)((operations_research::MPSolver const *)arg1)->iterations();
1197  jresult = (jlong)result;
1198  return jresult;
1199 }
1200 
1201 
1202 SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1nodes(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1203  jlong jresult = 0 ;
1205  int64_t result;
1206 
1207  (void)jenv;
1208  (void)jcls;
1209  (void)jarg1_;
1210  arg1 = *(operations_research::MPSolver **)&jarg1;
1211  result = (int64_t)((operations_research::MPSolver const *)arg1)->nodes();
1212  jresult = (jlong)result;
1213  return jresult;
1214 }
1215 
1216 
1218  jdouble jresult = 0 ;
1220  double result;
1221 
1222  (void)jenv;
1223  (void)jcls;
1224  (void)jarg1_;
1225  arg1 = *(operations_research::MPSolver **)&jarg1;
1226  result = (double)((operations_research::MPSolver const *)arg1)->ComputeExactConditionNumber();
1227  jresult = (jdouble)result;
1228  return jresult;
1229 }
1230 
1231 
1232 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1setTimeLimit(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
1234  int64_t arg2 ;
1235 
1236  (void)jenv;
1237  (void)jcls;
1238  (void)jarg1_;
1239  arg1 = *(operations_research::MPSolver **)&jarg1;
1240  arg2 = (int64_t)jarg2;
1241  (arg1)->set_time_limit(arg2);
1242 }
1243 
1244 
1245 SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1wallTime(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1246  jlong jresult = 0 ;
1248  int64_t result;
1249 
1250  (void)jenv;
1251  (void)jcls;
1252  (void)jarg1_;
1253  arg1 = *(operations_research::MPSolver **)&jarg1;
1254  result = (int64_t)((operations_research::MPSolver const *)arg1)->wall_time();
1255  jresult = (jlong)result;
1256  return jresult;
1257 }
1258 
1259 
1260 SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1loadModelFromProto(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2) {
1261  jstring jresult = 0 ;
1265  std::string result;
1266 
1267  (void)jenv;
1268  (void)jcls;
1269  (void)jarg1_;
1270  arg1 = *(operations_research::MPSolver **)&jarg1;
1271  {
1272  int proto_size = 0;
1273  std::unique_ptr<char[]> proto_buffer(
1274  JNIUtil::MakeCharArray(jenv, jarg2, &proto_size));
1275  bool parsed_ok = temp2.ParseFromArray(proto_buffer.get(), proto_size);
1276  if (!parsed_ok) {
1279  "Unable to parse operations_research::MPModelProto protocol message.");
1280  }
1281  arg2 = &temp2;
1282  }
1284  jresult = jenv->NewStringUTF((&result)->c_str());
1285  return jresult;
1286 }
1287 
1288 
1289 SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1loadModelFromProtoWithUniqueNamesOrDie(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2) {
1290  jstring jresult = 0 ;
1294  std::string result;
1295 
1296  (void)jenv;
1297  (void)jcls;
1298  (void)jarg1_;
1299  arg1 = *(operations_research::MPSolver **)&jarg1;
1300  {
1301  int proto_size = 0;
1302  std::unique_ptr<char[]> proto_buffer(
1303  JNIUtil::MakeCharArray(jenv, jarg2, &proto_size));
1304  bool parsed_ok = temp2.ParseFromArray(proto_buffer.get(), proto_size);
1305  if (!parsed_ok) {
1308  "Unable to parse operations_research::MPModelProto protocol message.");
1309  }
1310  arg2 = &temp2;
1311  }
1313  jresult = jenv->NewStringUTF((&result)->c_str());
1314  return jresult;
1315 }
1316 
1317 
1318 SWIGEXPORT jbyteArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1exportModelToProto(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1319  jbyteArray jresult = 0 ;
1322 
1323  (void)jenv;
1324  (void)jcls;
1325  (void)jarg1_;
1326  arg1 = *(operations_research::MPSolver **)&jarg1;
1328  {
1329  const long size = (&result)->ByteSizeLong();
1330  std::unique_ptr<char[]> buf(new char[size]);
1331  (&result)->SerializeWithCachedSizesToArray(reinterpret_cast<uint8_t*>(buf.get()));
1332  jresult = JNIUtil::MakeJByteArray(jenv, buf.get(), size);
1333  }
1334  return jresult;
1335 }
1336 
1337 
1339  jbyteArray jresult = 0 ;
1342 
1343  (void)jenv;
1344  (void)jcls;
1345  (void)jarg1_;
1346  arg1 = *(operations_research::MPSolver **)&jarg1;
1348  {
1349  const long size = (&result)->ByteSizeLong();
1350  std::unique_ptr<char[]> buf(new char[size]);
1351  (&result)->SerializeWithCachedSizesToArray(reinterpret_cast<uint8_t*>(buf.get()));
1352  jresult = JNIUtil::MakeJByteArray(jenv, buf.get(), size);
1353  }
1354  return jresult;
1355 }
1356 
1357 
1358 SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1loadSolutionFromProto(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2) {
1359  jboolean jresult = 0 ;
1363  bool result;
1364 
1365  (void)jenv;
1366  (void)jcls;
1367  (void)jarg1_;
1368  arg1 = *(operations_research::MPSolver **)&jarg1;
1369  {
1370  int proto_size = 0;
1371  std::unique_ptr<char[]> proto_buffer(
1372  JNIUtil::MakeCharArray(jenv, jarg2, &proto_size));
1373  bool parsed_ok = temp2.ParseFromArray(proto_buffer.get(), proto_size);
1374  if (!parsed_ok) {
1377  "Unable to parse operations_research::MPSolutionResponse protocol message.");
1378  }
1379  arg2 = &temp2;
1380  }
1382  jresult = (jboolean)result;
1383  return jresult;
1384 }
1385 
1386 
1388  jbyteArray jresult = 0 ;
1392 
1393  (void)jenv;
1394  (void)jcls;
1395  {
1396  int proto_size = 0;
1397  std::unique_ptr<char[]> proto_buffer(
1398  JNIUtil::MakeCharArray(jenv, jarg1, &proto_size));
1399  bool parsed_ok = temp1.ParseFromArray(proto_buffer.get(), proto_size);
1400  if (!parsed_ok) {
1403  "Unable to parse operations_research::MPModelRequest protocol message.");
1404  }
1405  arg1 = &temp1;
1406  }
1408  {
1409  const long size = (&result)->ByteSizeLong();
1410  std::unique_ptr<char[]> buf(new char[size]);
1411  (&result)->SerializeWithCachedSizesToArray(reinterpret_cast<uint8_t*>(buf.get()));
1412  jresult = JNIUtil::MakeJByteArray(jenv, buf.get(), size);
1413  }
1414  return jresult;
1415 }
1416 
1417 
1418 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_) {
1419  jstring jresult = 0 ;
1422  std::string result;
1423 
1424  (void)jenv;
1425  (void)jcls;
1426  (void)jarg1_;
1427  (void)jarg2_;
1428  arg1 = *(operations_research::MPSolver **)&jarg1;
1429  arg2 = *(operations_research::MPModelExportOptions **)&jarg2;
1430  if (!arg2) {
1431  SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "operations_research::MPModelExportOptions const & reference is null");
1432  return 0;
1433  }
1435  jresult = jenv->NewStringUTF((&result)->c_str());
1436  return jresult;
1437 }
1438 
1439 
1441  jstring jresult = 0 ;
1443  std::string result;
1444 
1445  (void)jenv;
1446  (void)jcls;
1447  (void)jarg1_;
1448  arg1 = *(operations_research::MPSolver **)&jarg1;
1450  jresult = jenv->NewStringUTF((&result)->c_str());
1451  return jresult;
1452 }
1453 
1454 
1455 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_) {
1456  jstring jresult = 0 ;
1459  std::string result;
1460 
1461  (void)jenv;
1462  (void)jcls;
1463  (void)jarg1_;
1464  (void)jarg2_;
1465  arg1 = *(operations_research::MPSolver **)&jarg1;
1466  arg2 = *(operations_research::MPModelExportOptions **)&jarg2;
1467  if (!arg2) {
1468  SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "operations_research::MPModelExportOptions const & reference is null");
1469  return 0;
1470  }
1472  jresult = jenv->NewStringUTF((&result)->c_str());
1473  return jresult;
1474 }
1475 
1476 
1478  jstring jresult = 0 ;
1480  std::string result;
1481 
1482  (void)jenv;
1483  (void)jcls;
1484  (void)jarg1_;
1485  arg1 = *(operations_research::MPSolver **)&jarg1;
1487  jresult = jenv->NewStringUTF((&result)->c_str());
1488  return jresult;
1489 }
1490 
1491 
1492 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) {
1494  std::vector< operations_research::MPVariable * > *arg2 = 0 ;
1495  std::vector< double > *arg3 = 0 ;
1496  std::vector< operations_research::MPVariable * > result2 ;
1497 
1498  (void)jenv;
1499  (void)jcls;
1500  (void)jarg1_;
1501  arg1 = *(operations_research::MPSolver **)&jarg1;
1502  {
1503  std::string java_class_path ="com/google/ortools/linearsolver" "/""MPVariable";
1504  jclass object_class = jenv->FindClass(java_class_path.c_str());
1505  if (nullptr == object_class)
1506  return ;
1507  jmethodID method_id =
1508  jenv->GetStaticMethodID(
1509  object_class, "getCPtr",
1510  std::string("(L" + java_class_path + ";)J").c_str());
1511  assert(method_id != nullptr);
1512  for (int i = 0; i < jenv->GetArrayLength(jarg2); i++) {
1513  jobject elem = jenv->GetObjectArrayElement(jarg2, i);
1514  jlong ptr_value = jenv->CallStaticLongMethod(object_class, method_id, elem);
1515  result2.push_back(/*@SWIG:ortools/util/java/vector.i,286,REINTERPRET_CAST@*/
1516  reinterpret_cast<operations_research::MPVariable*>(ptr_value)
1517  /*@SWIG@*/);
1518  }
1519  arg2 = &result2;
1520  }
1521 
1522  if(jarg3) {
1523  arg3 = new std::vector<double>;
1524  const int size = jenv->GetArrayLength(jarg3);
1525  arg3->reserve(size);
1526  jdouble *values = jenv->GetDoubleArrayElements((jdoubleArray)jarg3, NULL);
1527  for (int i = 0; i < size; ++i) {
1528  arg3->emplace_back(values[i]);
1529  }
1530  jenv->ReleaseDoubleArrayElements((jdoubleArray)jarg3, values, JNI_ABORT);
1531  }
1532  else {
1534  return ;
1535  }
1536 
1537  operations_research_MPSolver_setHint(arg1,(std::vector< operations_research::MPVariable * > const &)*arg2,(std::vector< double > const &)*arg3);
1538  {
1539  delete arg3;
1540  }
1541 }
1542 
1543 
1544 SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1setNumThreads(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
1545  jboolean jresult = 0 ;
1547  int arg2 ;
1548  bool result;
1549 
1550  (void)jenv;
1551  (void)jcls;
1552  (void)jarg1_;
1553  arg1 = *(operations_research::MPSolver **)&jarg1;
1554  arg2 = (int)jarg2;
1555  result = (bool)operations_research_MPSolver_setNumThreads(arg1,arg2);
1556  jresult = (jboolean)result;
1557  return jresult;
1558 }
1559 
1560 
1561 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1clear(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1563 
1564  (void)jenv;
1565  (void)jcls;
1566  (void)jarg1_;
1567  arg1 = *(operations_research::MPObjective **)&jarg1;
1568  (arg1)->Clear();
1569 }
1570 
1571 
1572 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) {
1575  double arg3 ;
1576 
1577  (void)jenv;
1578  (void)jcls;
1579  (void)jarg1_;
1580  (void)jarg2_;
1581  arg1 = *(operations_research::MPObjective **)&jarg1;
1582  arg2 = *(operations_research::MPVariable **)&jarg2;
1583  arg3 = (double)jarg3;
1584  (arg1)->SetCoefficient((operations_research::MPVariable const *)arg2,arg3);
1585 }
1586 
1587 
1588 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_) {
1589  jdouble jresult = 0 ;
1592  double result;
1593 
1594  (void)jenv;
1595  (void)jcls;
1596  (void)jarg1_;
1597  (void)jarg2_;
1598  arg1 = *(operations_research::MPObjective **)&jarg1;
1599  arg2 = *(operations_research::MPVariable **)&jarg2;
1600  result = (double)((operations_research::MPObjective const *)arg1)->GetCoefficient((operations_research::MPVariable const *)arg2);
1601  jresult = (jdouble)result;
1602  return jresult;
1603 }
1604 
1605 
1606 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1setOffset(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2) {
1608  double arg2 ;
1609 
1610  (void)jenv;
1611  (void)jcls;
1612  (void)jarg1_;
1613  arg1 = *(operations_research::MPObjective **)&jarg1;
1614  arg2 = (double)jarg2;
1615  (arg1)->SetOffset(arg2);
1616 }
1617 
1618 
1619 SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1offset(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1620  jdouble jresult = 0 ;
1622  double result;
1623 
1624  (void)jenv;
1625  (void)jcls;
1626  (void)jarg1_;
1627  arg1 = *(operations_research::MPObjective **)&jarg1;
1628  result = (double)((operations_research::MPObjective const *)arg1)->offset();
1629  jresult = (jdouble)result;
1630  return jresult;
1631 }
1632 
1633 
1634 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1setOptimizationDirection(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
1636  bool arg2 ;
1637 
1638  (void)jenv;
1639  (void)jcls;
1640  (void)jarg1_;
1641  arg1 = *(operations_research::MPObjective **)&jarg1;
1642  arg2 = jarg2 ? true : false;
1643  (arg1)->SetOptimizationDirection(arg2);
1644 }
1645 
1646 
1649 
1650  (void)jenv;
1651  (void)jcls;
1652  (void)jarg1_;
1653  arg1 = *(operations_research::MPObjective **)&jarg1;
1654  (arg1)->SetMinimization();
1655 }
1656 
1657 
1660 
1661  (void)jenv;
1662  (void)jcls;
1663  (void)jarg1_;
1664  arg1 = *(operations_research::MPObjective **)&jarg1;
1665  (arg1)->SetMaximization();
1666 }
1667 
1668 
1669 SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1maximization(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1670  jboolean jresult = 0 ;
1672  bool result;
1673 
1674  (void)jenv;
1675  (void)jcls;
1676  (void)jarg1_;
1677  arg1 = *(operations_research::MPObjective **)&jarg1;
1678  result = (bool)((operations_research::MPObjective const *)arg1)->maximization();
1679  jresult = (jboolean)result;
1680  return jresult;
1681 }
1682 
1683 
1684 SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1minimization(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1685  jboolean jresult = 0 ;
1687  bool result;
1688 
1689  (void)jenv;
1690  (void)jcls;
1691  (void)jarg1_;
1692  arg1 = *(operations_research::MPObjective **)&jarg1;
1693  result = (bool)((operations_research::MPObjective const *)arg1)->minimization();
1694  jresult = (jboolean)result;
1695  return jresult;
1696 }
1697 
1698 
1699 SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1value(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1700  jdouble jresult = 0 ;
1702  double result;
1703 
1704  (void)jenv;
1705  (void)jcls;
1706  (void)jarg1_;
1707  arg1 = *(operations_research::MPObjective **)&jarg1;
1708  result = (double)((operations_research::MPObjective const *)arg1)->Value();
1709  jresult = (jdouble)result;
1710  return jresult;
1711 }
1712 
1713 
1714 SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1bestBound(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1715  jdouble jresult = 0 ;
1717  double result;
1718 
1719  (void)jenv;
1720  (void)jcls;
1721  (void)jarg1_;
1722  arg1 = *(operations_research::MPObjective **)&jarg1;
1723  result = (double)((operations_research::MPObjective const *)arg1)->BestBound();
1724  jresult = (jdouble)result;
1725  return jresult;
1726 }
1727 
1728 
1731 
1732  (void)jenv;
1733  (void)jcls;
1734  arg1 = *(operations_research::MPObjective **)&jarg1;
1735  delete arg1;
1736 }
1737 
1738 
1739 SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1name(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1740  jstring jresult = 0 ;
1742  std::string *result = 0 ;
1743 
1744  (void)jenv;
1745  (void)jcls;
1746  (void)jarg1_;
1747  arg1 = *(operations_research::MPVariable **)&jarg1;
1748  result = (std::string *) &((operations_research::MPVariable const *)arg1)->name();
1749  jresult = jenv->NewStringUTF(result->c_str());
1750  return jresult;
1751 }
1752 
1753 
1754 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1setInteger(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
1756  bool arg2 ;
1757 
1758  (void)jenv;
1759  (void)jcls;
1760  (void)jarg1_;
1761  arg1 = *(operations_research::MPVariable **)&jarg1;
1762  arg2 = jarg2 ? true : false;
1763  (arg1)->SetInteger(arg2);
1764 }
1765 
1766 
1767 SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1solutionValue(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1768  jdouble jresult = 0 ;
1770  double result;
1771 
1772  (void)jenv;
1773  (void)jcls;
1774  (void)jarg1_;
1775  arg1 = *(operations_research::MPVariable **)&jarg1;
1776  result = (double)((operations_research::MPVariable const *)arg1)->solution_value();
1777  jresult = (jdouble)result;
1778  return jresult;
1779 }
1780 
1781 
1782 SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1index(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1783  jint jresult = 0 ;
1785  int result;
1786 
1787  (void)jenv;
1788  (void)jcls;
1789  (void)jarg1_;
1790  arg1 = *(operations_research::MPVariable **)&jarg1;
1791  result = (int)((operations_research::MPVariable const *)arg1)->index();
1792  jresult = (jint)result;
1793  return jresult;
1794 }
1795 
1796 
1797 SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1lb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1798  jdouble jresult = 0 ;
1800  double result;
1801 
1802  (void)jenv;
1803  (void)jcls;
1804  (void)jarg1_;
1805  arg1 = *(operations_research::MPVariable **)&jarg1;
1806  result = (double)((operations_research::MPVariable const *)arg1)->lb();
1807  jresult = (jdouble)result;
1808  return jresult;
1809 }
1810 
1811 
1812 SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1ub(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1813  jdouble jresult = 0 ;
1815  double result;
1816 
1817  (void)jenv;
1818  (void)jcls;
1819  (void)jarg1_;
1820  arg1 = *(operations_research::MPVariable **)&jarg1;
1821  result = (double)((operations_research::MPVariable const *)arg1)->ub();
1822  jresult = (jdouble)result;
1823  return jresult;
1824 }
1825 
1826 
1827 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1setLb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2) {
1829  double arg2 ;
1830 
1831  (void)jenv;
1832  (void)jcls;
1833  (void)jarg1_;
1834  arg1 = *(operations_research::MPVariable **)&jarg1;
1835  arg2 = (double)jarg2;
1836  (arg1)->SetLB(arg2);
1837 }
1838 
1839 
1840 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1setUb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2) {
1842  double arg2 ;
1843 
1844  (void)jenv;
1845  (void)jcls;
1846  (void)jarg1_;
1847  arg1 = *(operations_research::MPVariable **)&jarg1;
1848  arg2 = (double)jarg2;
1849  (arg1)->SetUB(arg2);
1850 }
1851 
1852 
1853 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) {
1855  double arg2 ;
1856  double arg3 ;
1857 
1858  (void)jenv;
1859  (void)jcls;
1860  (void)jarg1_;
1861  arg1 = *(operations_research::MPVariable **)&jarg1;
1862  arg2 = (double)jarg2;
1863  arg3 = (double)jarg3;
1864  (arg1)->SetBounds(arg2,arg3);
1865 }
1866 
1867 
1868 SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1reducedCost(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1869  jdouble jresult = 0 ;
1871  double result;
1872 
1873  (void)jenv;
1874  (void)jcls;
1875  (void)jarg1_;
1876  arg1 = *(operations_research::MPVariable **)&jarg1;
1877  result = (double)((operations_research::MPVariable const *)arg1)->reduced_cost();
1878  jresult = (jdouble)result;
1879  return jresult;
1880 }
1881 
1882 
1883 SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1basisStatus(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1884  jint jresult = 0 ;
1887 
1888  (void)jenv;
1889  (void)jcls;
1890  (void)jarg1_;
1891  arg1 = *(operations_research::MPVariable **)&jarg1;
1892  result = (operations_research::MPSolver::BasisStatus)((operations_research::MPVariable const *)arg1)->basis_status();
1893  jresult = (jint)result;
1894  return jresult;
1895 }
1896 
1897 
1900 
1901  (void)jenv;
1902  (void)jcls;
1903  arg1 = *(operations_research::MPVariable **)&jarg1;
1904  delete arg1;
1905 }
1906 
1907 
1908 SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1name(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1909  jstring jresult = 0 ;
1911  std::string *result = 0 ;
1912 
1913  (void)jenv;
1914  (void)jcls;
1915  (void)jarg1_;
1916  arg1 = *(operations_research::MPConstraint **)&jarg1;
1917  result = (std::string *) &((operations_research::MPConstraint const *)arg1)->name();
1918  jresult = jenv->NewStringUTF(result->c_str());
1919  return jresult;
1920 }
1921 
1922 
1923 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) {
1926  double arg3 ;
1927 
1928  (void)jenv;
1929  (void)jcls;
1930  (void)jarg1_;
1931  (void)jarg2_;
1932  arg1 = *(operations_research::MPConstraint **)&jarg1;
1933  arg2 = *(operations_research::MPVariable **)&jarg2;
1934  arg3 = (double)jarg3;
1935  (arg1)->SetCoefficient((operations_research::MPVariable const *)arg2,arg3);
1936 }
1937 
1938 
1939 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_) {
1940  jdouble jresult = 0 ;
1943  double result;
1944 
1945  (void)jenv;
1946  (void)jcls;
1947  (void)jarg1_;
1948  (void)jarg2_;
1949  arg1 = *(operations_research::MPConstraint **)&jarg1;
1950  arg2 = *(operations_research::MPVariable **)&jarg2;
1951  result = (double)((operations_research::MPConstraint const *)arg1)->GetCoefficient((operations_research::MPVariable const *)arg2);
1952  jresult = (jdouble)result;
1953  return jresult;
1954 }
1955 
1956 
1957 SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1lb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1958  jdouble jresult = 0 ;
1960  double result;
1961 
1962  (void)jenv;
1963  (void)jcls;
1964  (void)jarg1_;
1965  arg1 = *(operations_research::MPConstraint **)&jarg1;
1966  result = (double)((operations_research::MPConstraint const *)arg1)->lb();
1967  jresult = (jdouble)result;
1968  return jresult;
1969 }
1970 
1971 
1972 SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1ub(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1973  jdouble jresult = 0 ;
1975  double result;
1976 
1977  (void)jenv;
1978  (void)jcls;
1979  (void)jarg1_;
1980  arg1 = *(operations_research::MPConstraint **)&jarg1;
1981  result = (double)((operations_research::MPConstraint const *)arg1)->ub();
1982  jresult = (jdouble)result;
1983  return jresult;
1984 }
1985 
1986 
1987 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1setLb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2) {
1989  double arg2 ;
1990 
1991  (void)jenv;
1992  (void)jcls;
1993  (void)jarg1_;
1994  arg1 = *(operations_research::MPConstraint **)&jarg1;
1995  arg2 = (double)jarg2;
1996  (arg1)->SetLB(arg2);
1997 }
1998 
1999 
2000 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1setUb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2) {
2002  double arg2 ;
2003 
2004  (void)jenv;
2005  (void)jcls;
2006  (void)jarg1_;
2007  arg1 = *(operations_research::MPConstraint **)&jarg1;
2008  arg2 = (double)jarg2;
2009  (arg1)->SetUB(arg2);
2010 }
2011 
2012 
2013 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) {
2015  double arg2 ;
2016  double arg3 ;
2017 
2018  (void)jenv;
2019  (void)jcls;
2020  (void)jarg1_;
2021  arg1 = *(operations_research::MPConstraint **)&jarg1;
2022  arg2 = (double)jarg2;
2023  arg3 = (double)jarg3;
2024  (arg1)->SetBounds(arg2,arg3);
2025 }
2026 
2027 
2028 SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1isLazy(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
2029  jboolean jresult = 0 ;
2031  bool result;
2032 
2033  (void)jenv;
2034  (void)jcls;
2035  (void)jarg1_;
2036  arg1 = *(operations_research::MPConstraint **)&jarg1;
2037  result = (bool)((operations_research::MPConstraint const *)arg1)->is_lazy();
2038  jresult = (jboolean)result;
2039  return jresult;
2040 }
2041 
2042 
2043 SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1setIsLazy(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
2045  bool arg2 ;
2046 
2047  (void)jenv;
2048  (void)jcls;
2049  (void)jarg1_;
2050  arg1 = *(operations_research::MPConstraint **)&jarg1;
2051  arg2 = jarg2 ? true : false;
2052  (arg1)->set_is_lazy(arg2);
2053 }
2054 
2055 
2056 SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1index(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
2057  jint jresult = 0 ;
2059  int result;
2060 
2061  (void)jenv;
2062  (void)jcls;
2063  (void)jarg1_;
2064  arg1 = *(operations_research::MPConstraint **)&jarg1;
2065  result = (int)((operations_research::MPConstraint const *)arg1)->index();
2066  jresult = (jint)result;
2067  return jresult;
2068 }
2069 
2070 
2071 SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1dualValue(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
2072  jdouble jresult = 0 ;
2074  double result;
2075 
2076  (void)jenv;
2077  (void)jcls;
2078  (void)jarg1_;
2079  arg1 = *(operations_research::MPConstraint **)&jarg1;
2080  result = (double)((operations_research::MPConstraint const *)arg1)->dual_value();
2081  jresult = (jdouble)result;
2082  return jresult;
2083 }
2084 
2085 
2086 SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1basisStatus(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
2087  jint jresult = 0 ;
2090 
2091  (void)jenv;
2092  (void)jcls;
2093  (void)jarg1_;
2094  arg1 = *(operations_research::MPConstraint **)&jarg1;
2095  result = (operations_research::MPSolver::BasisStatus)((operations_research::MPConstraint const *)arg1)->basis_status();
2096  jresult = (jint)result;
2097  return jresult;
2098 }
2099 
2100 
2103 
2104  (void)jenv;
2105  (void)jcls;
2106  arg1 = *(operations_research::MPConstraint **)&jarg1;
2107  delete arg1;
2108 }
2109 
2110 
2112  jint jresult = 0 ;
2114 
2115  (void)jenv;
2116  (void)jcls;
2118  jresult = (jint)result;
2119  return jresult;
2120 }
2121 
2122 
2124  jint jresult = 0 ;
2126 
2127  (void)jenv;
2128  (void)jcls;
2130  jresult = (jint)result;
2131  return jresult;
2132 }
2133 
2134 
2136  jint jresult = 0 ;
2138 
2139  (void)jenv;
2140  (void)jcls;
2142  jresult = (jint)result;
2143  return jresult;
2144 }
2145 
2146 
2148  jint jresult = 0 ;
2150 
2151  (void)jenv;
2152  (void)jcls;
2154  jresult = (jint)result;
2155  return jresult;
2156 }
2157 
2158 
2160  jint jresult = 0 ;
2162 
2163  (void)jenv;
2164  (void)jcls;
2166  jresult = (jint)result;
2167  return jresult;
2168 }
2169 
2170 
2172  jint jresult = 0 ;
2174 
2175  (void)jenv;
2176  (void)jcls;
2178  jresult = (jint)result;
2179  return jresult;
2180 }
2181 
2182 
2184  jint jresult = 0 ;
2186 
2187  (void)jenv;
2188  (void)jcls;
2190  jresult = (jint)result;
2191  return jresult;
2192 }
2193 
2194 
2196  jint jresult = 0 ;
2198 
2199  (void)jenv;
2200  (void)jcls;
2202  jresult = (jint)result;
2203  return jresult;
2204 }
2205 
2206 
2208  jint jresult = 0 ;
2210 
2211  (void)jenv;
2212  (void)jcls;
2214  jresult = (jint)result;
2215  return jresult;
2216 }
2217 
2218 
2220  jint jresult = 0 ;
2222 
2223  (void)jenv;
2224  (void)jcls;
2226  jresult = (jint)result;
2227  return jresult;
2228 }
2229 
2230 
2232  jint jresult = 0 ;
2234 
2235  (void)jenv;
2236  (void)jcls;
2238  jresult = (jint)result;
2239  return jresult;
2240 }
2241 
2242 
2244  jint jresult = 0 ;
2246 
2247  (void)jenv;
2248  (void)jcls;
2250  jresult = (jint)result;
2251  return jresult;
2252 }
2253 
2254 
2256  jint jresult = 0 ;
2258 
2259  (void)jenv;
2260  (void)jcls;
2262  jresult = (jint)result;
2263  return jresult;
2264 }
2265 
2266 
2268  jint jresult = 0 ;
2270 
2271  (void)jenv;
2272  (void)jcls;
2274  jresult = (jint)result;
2275  return jresult;
2276 }
2277 
2278 
2280  jint jresult = 0 ;
2282 
2283  (void)jenv;
2284  (void)jcls;
2286  jresult = (jint)result;
2287  return jresult;
2288 }
2289 
2290 
2292  jint jresult = 0 ;
2294 
2295  (void)jenv;
2296  (void)jcls;
2298  jresult = (jint)result;
2299  return jresult;
2300 }
2301 
2302 
2304  jdouble jresult = 0 ;
2305  double result;
2306 
2307  (void)jenv;
2308  (void)jcls;
2310  jresult = (jdouble)result;
2311  return jresult;
2312 }
2313 
2314 
2316  jdouble jresult = 0 ;
2317  double result;
2318 
2319  (void)jenv;
2320  (void)jcls;
2322  jresult = (jdouble)result;
2323  return jresult;
2324 }
2325 
2326 
2328  jdouble jresult = 0 ;
2329  double result;
2330 
2331  (void)jenv;
2332  (void)jcls;
2334  jresult = (jdouble)result;
2335  return jresult;
2336 }
2337 
2338 
2340  jint jresult = 0 ;
2342 
2343  (void)jenv;
2344  (void)jcls;
2346  jresult = (jint)result;
2347  return jresult;
2348 }
2349 
2350 
2352  jint jresult = 0 ;
2354 
2355  (void)jenv;
2356  (void)jcls;
2358  jresult = (jint)result;
2359  return jresult;
2360 }
2361 
2362 
2364  jlong jresult = 0 ;
2366 
2367  (void)jenv;
2368  (void)jcls;
2370  *(operations_research::MPSolverParameters **)&jresult = result;
2371  return jresult;
2372 }
2373 
2374 
2375 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) {
2378  double arg3 ;
2379 
2380  (void)jenv;
2381  (void)jcls;
2382  (void)jarg1_;
2383  arg1 = *(operations_research::MPSolverParameters **)&jarg1;
2385  arg3 = (double)jarg3;
2386  (arg1)->SetDoubleParam(arg2,arg3);
2387 }
2388 
2389 
2390 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) {
2393  int arg3 ;
2394 
2395  (void)jenv;
2396  (void)jcls;
2397  (void)jarg1_;
2398  arg1 = *(operations_research::MPSolverParameters **)&jarg1;
2400  arg3 = (int)jarg3;
2401  (arg1)->SetIntegerParam(arg2,arg3);
2402 }
2403 
2404 
2405 SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1getDoubleParam(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
2406  jdouble jresult = 0 ;
2409  double result;
2410 
2411  (void)jenv;
2412  (void)jcls;
2413  (void)jarg1_;
2414  arg1 = *(operations_research::MPSolverParameters **)&jarg1;
2416  result = (double)((operations_research::MPSolverParameters const *)arg1)->GetDoubleParam(arg2);
2417  jresult = (jdouble)result;
2418  return jresult;
2419 }
2420 
2421 
2422 SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1getIntegerParam(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
2423  jint jresult = 0 ;
2426  int result;
2427 
2428  (void)jenv;
2429  (void)jcls;
2430  (void)jarg1_;
2431  arg1 = *(operations_research::MPSolverParameters **)&jarg1;
2433  result = (int)((operations_research::MPSolverParameters const *)arg1)->GetIntegerParam(arg2);
2434  jresult = (jint)result;
2435  return jresult;
2436 }
2437 
2438 
2441 
2442  (void)jenv;
2443  (void)jcls;
2444  arg1 = *(operations_research::MPSolverParameters **)&jarg1;
2445  delete arg1;
2446 }
2447 
2448 
2450  jlong jresult = 0 ;
2452 
2453  (void)jenv;
2454  (void)jcls;
2456  *(operations_research::MPModelExportOptions **)&jresult = result;
2457  return jresult;
2458 }
2459 
2460 
2461 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) {
2463  bool arg2 ;
2464 
2465  (void)jenv;
2466  (void)jcls;
2467  (void)jarg1_;
2468  arg1 = *(operations_research::MPModelExportOptions **)&jarg1;
2469  arg2 = jarg2 ? true : false;
2470  if (arg1) (arg1)->obfuscate = arg2;
2471 }
2472 
2473 
2475  jboolean jresult = 0 ;
2477  bool result;
2478 
2479  (void)jenv;
2480  (void)jcls;
2481  (void)jarg1_;
2482  arg1 = *(operations_research::MPModelExportOptions **)&jarg1;
2483  result = (bool) ((arg1)->obfuscate);
2484  jresult = (jboolean)result;
2485  return jresult;
2486 }
2487 
2488 
2489 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) {
2491  bool arg2 ;
2492 
2493  (void)jenv;
2494  (void)jcls;
2495  (void)jarg1_;
2496  arg1 = *(operations_research::MPModelExportOptions **)&jarg1;
2497  arg2 = jarg2 ? true : false;
2498  if (arg1) (arg1)->log_invalid_names = arg2;
2499 }
2500 
2501 
2503  jboolean jresult = 0 ;
2505  bool result;
2506 
2507  (void)jenv;
2508  (void)jcls;
2509  (void)jarg1_;
2510  arg1 = *(operations_research::MPModelExportOptions **)&jarg1;
2511  result = (bool) ((arg1)->log_invalid_names);
2512  jresult = (jboolean)result;
2513  return jresult;
2514 }
2515 
2516 
2517 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) {
2519  bool arg2 ;
2520 
2521  (void)jenv;
2522  (void)jcls;
2523  (void)jarg1_;
2524  arg1 = *(operations_research::MPModelExportOptions **)&jarg1;
2525  arg2 = jarg2 ? true : false;
2526  if (arg1) (arg1)->show_unused_variables = arg2;
2527 }
2528 
2529 
2531  jboolean jresult = 0 ;
2533  bool result;
2534 
2535  (void)jenv;
2536  (void)jcls;
2537  (void)jarg1_;
2538  arg1 = *(operations_research::MPModelExportOptions **)&jarg1;
2539  result = (bool) ((arg1)->show_unused_variables);
2540  jresult = (jboolean)result;
2541  return jresult;
2542 }
2543 
2544 
2545 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) {
2547  int arg2 ;
2548 
2549  (void)jenv;
2550  (void)jcls;
2551  (void)jarg1_;
2552  arg1 = *(operations_research::MPModelExportOptions **)&jarg1;
2553  arg2 = (int)jarg2;
2554  if (arg1) (arg1)->max_line_length = arg2;
2555 }
2556 
2557 
2559  jint jresult = 0 ;
2561  int result;
2562 
2563  (void)jenv;
2564  (void)jcls;
2565  (void)jarg1_;
2566  arg1 = *(operations_research::MPModelExportOptions **)&jarg1;
2567  result = (int) ((arg1)->max_line_length);
2568  jresult = (jint)result;
2569  return jresult;
2570 }
2571 
2572 
2575 
2576  (void)jenv;
2577  (void)jcls;
2578  arg1 = *(operations_research::MPModelExportOptions **)&jarg1;
2579  delete arg1;
2580 }
2581 
2582 
2583 #ifdef __cplusplus
2584 }
2585 #endif
2586 
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1nodes(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
ResultStatus
The status of solving the problem.
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_)
SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1name(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
static const IncrementalityValues kDefaultIncrementality
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1interruptSolve(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
bool InterruptSolve()
Interrupts the Solve() execution to terminate processing if possible.
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1Obfuscate_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
Advanced usage: incrementality from one solve to the next.
IntegerValue GetCoefficient(const IntegerVariable var, const LinearExpression &expr)
static MPSolver * CreateSolver(const std::string &solver_id)
Recommended factory method to create a MPSolver instance, especially in non C++ languages.
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1INCREMENTALITY_1ON_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1XPRESS_1LINEAR_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
ScalingValues
Advanced usage: Scaling options.
#define SWIGEXPORT
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 jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1bestBound(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
static char * MakeCharArray(JNIEnv *env, jbyteArray a, int *size)
Definition: jniutil.h:47
const int FATAL
Definition: log_severity.h:32
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1SAT_1INTEGER_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1objective(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
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 jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1computeExactConditionNumber(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 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 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_MPObjective_1setOffset(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1INCREMENTALITY_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1kDefaultRelativeMipGap_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1kDefaultPresolve_1get(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)
const std::string name
static double infinity()
Infinity.
const int ERROR
Definition: log_severity.h:32
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 jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1supportsProblemType(JNIEnv *jenv, jclass jcls, jint jarg1)
A C++ wrapper that provides a simple and unified interface to several linear programming and mixed in...
SWIGEXPORT jdoubleArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1computeConstraintActivities(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionCodes code, const char *msg)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1SCALING_1OFF_1get(JNIEnv *jenv, jclass jcls)
static bool SupportsProblemType(OptimizationProblemType problem_type)
Whether the given problem type is supported (this will depend on the targets that you linked).
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 jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1PRIMAL_1TOLERANCE_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1setLb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2)
#define LOG(severity)
Definition: base/logging.h:420
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_MPVariable_1reducedCost(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
OptimizationProblemType
The type of problems (LP or MIP) that will be solved and the underlying solver (GLOP,...
GRBmodel * model
A class to express a linear objective.
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1GLOP_1LINEAR_1PROGRAMMING_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 void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1setTimeLimit(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2)
BasisStatus
Advanced usage: possible basis status values for a variable and the slack variable of a linear constr...
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1createSolver(JNIEnv *jenv, jclass jcls, jstring jarg1)
IntegerParam
Enumeration of parameters that take integer or categorical values.
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1basisStatus(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
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 jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1numVariables(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1PRIMAL_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jobjectArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1variables(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
int NumVariables(const VariablesProto &variables)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1problemType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1clear(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
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)
std::function< int64_t(const Model &)> Value(IntegerVariable v)
Definition: integer.h:1673
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_delete_1MPSolver(JNIEnv *jenv, jclass jcls, jlong jarg1)
SWIGINTERN operations_research::MPSolutionResponse operations_research_MPSolver_createSolutionResponseProto(operations_research::MPSolver *self)
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 void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1setMinimization(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1XPRESS_1MIXED_1INTEGER_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
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_)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1ShowUnusedVariables_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1basisStatus(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
The class for variables of a Mathematical Programming (MP) model.
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 jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1wallTime(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 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_MPSolver_1GLPK_1LINEAR_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 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 jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1NOT_1SOLVED_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_new_1MPModelExportOptions(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1kDefaultIncrementality_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1setInteger(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2)
SWIGINTERN operations_research::MPModelProto operations_research_MPSolver_exportModelToProto(operations_research::MPSolver *self)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1minimization(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jobjectArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1constraints(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
DoubleParam
Enumeration of parameters that take continuous values.
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1LP_1ALGORITHM_1get(JNIEnv *jenv, jclass jcls)
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 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_MPSolverParameters_1BARRIER_1get(JNIEnv *jenv, jclass jcls)
const ::operations_research::MPVariableProto & variable(int index) const
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1solutionValue(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject 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_MPModelExportOptions_1LogInvalidNames_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2)
SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1name(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1value(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGINTERN void operations_research_MPSolver_setHint(operations_research::MPSolver *self, std::vector< operations_research::MPVariable * > const &variables, std::vector< double > const &values)
SWIGEXPORT jbyteArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1solveWithProto(JNIEnv *jenv, jclass jcls, jbyteArray jarg1)
SWIGINTERN std::string operations_research_MPSolver_exportModelAsMpsFormat__SWIG_0(operations_research::MPSolver *self, operations_research::MPModelExportOptions const &options=operations_research::MPModelExportOptions())
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...
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1numConstraints(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
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 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 jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1loadModelFromProto(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2)
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)
int index
Definition: pack.cc:509
The class for constraints of a Mathematical Programming (MP) model.
static const PresolveValues kDefaultPresolve
#define SWIGINTERN
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1setUb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2)
SharedResponseManager * response
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_1iterations(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
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 jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1SCALING_1ON_1get(JNIEnv *jenv, jclass jcls)
Advanced usage: tolerance for primal feasibility of basic solutions.
int NumConstraints(const LinearConstraintsProto &linear_constraints)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1setMaximization(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject 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_MPSolverParameters_1DUAL_1TOLERANCE_1get(JNIEnv *jenv, jclass jcls)
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_)
#define SWIGUNUSED
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1SCALING_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1dualValue(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
#define LOG_IF(severity, condition)
Definition: base/logging.h:479
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)
Advanced usage: enable or disable matrix scaling.
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_new_1MPSolverParameters(JNIEnv *jenv, jclass jcls)
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_1CPLEX_1MIXED_1INTEGER_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1PRESOLVE_1get(JNIEnv *jenv, jclass jcls)
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 jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1PRESOLVE_1OFF_1get(JNIEnv *jenv, jclass jcls)
SWIGINTERN std::string operations_research_MPSolver_loadModelFromProtoWithUniqueNamesOrDie(operations_research::MPSolver *self, operations_research::MPModelProto const &input_model)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1LogInvalidNames_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
Advanced usage: tolerance for dual feasibility of basic solutions.
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1index(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1PRESOLVE_1ON_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1GUROBI_1MIXED_1INTEGER_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
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())
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_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_1GUROBI_1LINEAR_1PROGRAMMING_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)
Reuse results from previous solve as much as the underlying solver allows.
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1BOP_1INTEGER_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
ResultStatus Solve()
Solves the problem using the default parameter values.
This mathematical programming (MP) solver class is the main class though which users build and solve ...
IncrementalityValues
Advanced usage: Incrementality options.
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 jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1loadModelFromProtoWithUniqueNamesOrDie(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1isMip(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 void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1suppressOutput(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIG_JavaExceptionCodes code
absl::StatusOr< std::string > ExportModelAsMpsFormat(const MPModelProto &model, const MPModelExportOptions &options)
Outputs the current model (variables, constraints, objective) as a string encoded in MPS file format,...
SWIGINTERN 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_MPConstraint_1ub(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)
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_MPSolver_1GLPK_1MIXED_1INTEGER_1PROGRAMMING_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)
This class stores parameter settings for LP and MIP solvers.
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1kDefaultDualTolerance_1get(JNIEnv *jenv, jclass jcls)
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_MPSolver_1CBC_1MIXED_1INTEGER_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
IntVar * var
Definition: expr_array.cc:1874
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1clear(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_)
static jbyteArray MakeJByteArray(JNIEnv *env, const char *a, int size)
Definition: jniutil.h:59
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 jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1RELATIVE_1MIP_1GAP_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_MPVariable_1lb(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 jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1exportModelAsLpFormat_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
PresolveValues
For each categorical parameter, enumeration of possible values.
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_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1CPLEX_1LINEAR_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_delete_1MPSolverParameters(JNIEnv *jenv, jclass jcls, jlong jarg1)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1ub(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
int nodes
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1index(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1INCREMENTALITY_1OFF_1get(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_MPSolverParameters_1kDefaultPrimalTolerance_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1maximization(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
static void SolveWithProto(const MPModelRequest &model_request, MPSolutionResponse *response, std::atomic< bool > *interrupt=nullptr)
Solves the model encoded by a MPModelRequest protocol buffer and fills the solution encoded as a MPSo...
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)
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_MPSolver_1setHint(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobjectArray jarg2, jdoubleArray jarg3)
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_1loadSolutionFromProto(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2)
SWIGEXPORT jbyteArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1exportModelToProto(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 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 void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1setIsLazy(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1isLazy(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)