OR-Tools  9.1
linear_solver_java_wrap.cc
Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
3 * Version 4.0.2
4 *
5 * This file is not intended to be easily readable and contains a number of
6 * coding conventions designed to improve portability and efficiency. Do not make
7 * changes to this file unless you know what you are doing--modify the SWIG
8 * interface file instead.
9 * ----------------------------------------------------------------------------- */
10
11
12#ifndef SWIGJAVA
13#define SWIGJAVA
14#endif
15
16
17
18#ifdef __cplusplus
19/* SwigValueWrapper is described in swig.swg */
20template<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);
29public:
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
36template <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 */
184typedef enum {
196
197typedef struct {
199 const char *java_exception;
201
202
203static 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
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 return self->LoadSolutionFromProto(response).ok();
294 }
298 return response;
299 }
302 self->ExportModelToProto(&model);
303 return ExportModelAsLpFormat(model, options).value_or("");
304 }
307 self->ExportModelToProto(&model);
308 return ExportModelAsMpsFormat(model, options).value_or("");
309 }
310SWIGINTERN void operations_research_MPSolver_setHint(operations_research::MPSolver *self,std::vector< operations_research::MPVariable * > const &variables,std::vector< double > const &values){
311 if (variables.size() != values.size()) {
312 LOG(FATAL) << "Different number of variables and values when setting "
313 << "hint.";
314 }
315 std::vector<std::pair<const operations_research::MPVariable*, double> >
316 hint(variables.size());
317 for (int i = 0; i < variables.size(); ++i) {
318 hint[i] = std::make_pair(variables[i], values[i]);
319 }
320 self->SetHint(hint);
321 }
323 return self->SetNumThreads(num_theads).ok();
324 }
325
326#ifdef __cplusplus
327extern "C" {
328#endif
329
331 jint jresult = 0 ;
333
334 (void)jenv;
335 (void)jcls;
337 jresult = (jint)result;
338 return jresult;
339}
340
341
343 jint jresult = 0 ;
345
346 (void)jenv;
347 (void)jcls;
349 jresult = (jint)result;
350 return jresult;
351}
352
353
355 jint jresult = 0 ;
357
358 (void)jenv;
359 (void)jcls;
361 jresult = (jint)result;
362 return jresult;
363}
364
365
367 jint jresult = 0 ;
369
370 (void)jenv;
371 (void)jcls;
373 jresult = (jint)result;
374 return jresult;
375}
376
377
379 jint jresult = 0 ;
381
382 (void)jenv;
383 (void)jcls;
385 jresult = (jint)result;
386 return jresult;
387}
388
389
391 jint jresult = 0 ;
393
394 (void)jenv;
395 (void)jcls;
397 jresult = (jint)result;
398 return jresult;
399}
400
401
403 jint jresult = 0 ;
405
406 (void)jenv;
407 (void)jcls;
409 jresult = (jint)result;
410 return jresult;
411}
412
413
415 jint jresult = 0 ;
417
418 (void)jenv;
419 (void)jcls;
421 jresult = (jint)result;
422 return jresult;
423}
424
425
427 jint jresult = 0 ;
429
430 (void)jenv;
431 (void)jcls;
433 jresult = (jint)result;
434 return jresult;
435}
436
437
439 jint jresult = 0 ;
441
442 (void)jenv;
443 (void)jcls;
445 jresult = (jint)result;
446 return jresult;
447}
448
449
451 jint jresult = 0 ;
453
454 (void)jenv;
455 (void)jcls;
457 jresult = (jint)result;
458 return jresult;
459}
460
461
463 jint jresult = 0 ;
465
466 (void)jenv;
467 (void)jcls;
469 jresult = (jint)result;
470 return jresult;
471}
472
473
475 jint jresult = 0 ;
477
478 (void)jenv;
479 (void)jcls;
481 jresult = (jint)result;
482 return jresult;
483}
484
485
487 jint jresult = 0 ;
489
490 (void)jenv;
491 (void)jcls;
493 jresult = (jint)result;
494 return jresult;
495}
496
497
498SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_new_1MPSolver(JNIEnv *jenv, jclass jcls, jstring jarg1, jint jarg2) {
499 jlong jresult = 0 ;
500 std::string *arg1 = 0 ;
503
504 (void)jenv;
505 (void)jcls;
506 if(!jarg1) {
508 return 0;
509 }
510 const char *arg1_pstr = (const char *)jenv->GetStringUTFChars(jarg1, 0);
511 if (!arg1_pstr) return 0;
512 std::string arg1_str(arg1_pstr);
513 arg1 = &arg1_str;
514 jenv->ReleaseStringUTFChars(jarg1, arg1_pstr);
516 result = (operations_research::MPSolver *)new operations_research::MPSolver((std::string const &)*arg1,arg2);
517 *(operations_research::MPSolver **)&jresult = result;
518 return jresult;
519}
520
521
524
525 (void)jenv;
526 (void)jcls;
527 arg1 = *(operations_research::MPSolver **)&jarg1;
528 delete arg1;
529}
530
531
533 jlong jresult = 0 ;
534 std::string *arg1 = 0 ;
536
537 (void)jenv;
538 (void)jcls;
539 if(!jarg1) {
541 return 0;
542 }
543 const char *arg1_pstr = (const char *)jenv->GetStringUTFChars(jarg1, 0);
544 if (!arg1_pstr) return 0;
545 std::string arg1_str(arg1_pstr);
546 arg1 = &arg1_str;
547 jenv->ReleaseStringUTFChars(jarg1, arg1_pstr);
549 *(operations_research::MPSolver **)&jresult = result;
550 return jresult;
551}
552
553
555 jboolean jresult = 0 ;
557 bool result;
558
559 (void)jenv;
560 (void)jcls;
563 jresult = (jboolean)result;
564 return jresult;
565}
566
567
568SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1isMip(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
569 jboolean jresult = 0 ;
571 bool result;
572
573 (void)jenv;
574 (void)jcls;
575 (void)jarg1_;
576 arg1 = *(operations_research::MPSolver **)&jarg1;
577 result = (bool)((operations_research::MPSolver const *)arg1)->IsMIP();
578 jresult = (jboolean)result;
579 return jresult;
580}
581
582
583SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1problemType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
584 jint jresult = 0 ;
587
588 (void)jenv;
589 (void)jcls;
590 (void)jarg1_;
591 arg1 = *(operations_research::MPSolver **)&jarg1;
593 jresult = (jint)result;
594 return jresult;
595}
596
597
598SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1clear(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
600
601 (void)jenv;
602 (void)jcls;
603 (void)jarg1_;
604 arg1 = *(operations_research::MPSolver **)&jarg1;
605 (arg1)->Clear();
606}
607
608
609SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1numVariables(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
610 jint jresult = 0 ;
612 int result;
613
614 (void)jenv;
615 (void)jcls;
616 (void)jarg1_;
617 arg1 = *(operations_research::MPSolver **)&jarg1;
618 result = (int)((operations_research::MPSolver const *)arg1)->NumVariables();
619 jresult = (jint)result;
620 return jresult;
621}
622
623
624SWIGEXPORT jobjectArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1variables(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
625 jobjectArray jresult = 0 ;
627 std::vector< operations_research::MPVariable * > *result = 0 ;
628
629 (void)jenv;
630 (void)jcls;
631 (void)jarg1_;
632 arg1 = *(operations_research::MPSolver **)&jarg1;
633 result = (std::vector< operations_research::MPVariable * > *) &((operations_research::MPSolver const *)arg1)->variables();
634 {
635 if (nullptr == result)
636 return 0;
637 std::string java_class_path ="com/google/ortools/linearsolver" "/""MPVariable";
638 jclass object_class = jenv->FindClass(java_class_path.c_str());
639 if (nullptr == object_class)
640 return 0;
641 jresult = jenv->NewObjectArray(result->size(), object_class, 0);
642 jmethodID ctor = jenv->GetMethodID(object_class,"<init>", "(JZ)V");
643 for (int i = 0; i < result->size(); ++i) {
644 jlong obj_ptr = 0;
645 *((operations_research::MPVariable **)&obj_ptr) = (*result)[i];
646 jobject elem = jenv->NewObject(object_class, ctor, obj_ptr, false);
647 jenv->SetObjectArrayElement(jresult, i, elem);
648 }
649 }
650 return jresult;
651}
652
653
654SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1variable(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
655 jlong jresult = 0 ;
657 int arg2 ;
659
660 (void)jenv;
661 (void)jcls;
662 (void)jarg1_;
663 arg1 = *(operations_research::MPSolver **)&jarg1;
664 arg2 = (int)jarg2;
665 result = (operations_research::MPVariable *)((operations_research::MPSolver const *)arg1)->variable(arg2);
666 *(operations_research::MPVariable **)&jresult = result;
667 return jresult;
668}
669
670
671SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1lookupVariableOrNull(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
672 jlong jresult = 0 ;
674 std::string *arg2 = 0 ;
676
677 (void)jenv;
678 (void)jcls;
679 (void)jarg1_;
680 arg1 = *(operations_research::MPSolver **)&jarg1;
681 if(!jarg2) {
683 return 0;
684 }
685 const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
686 if (!arg2_pstr) return 0;
687 std::string arg2_str(arg2_pstr);
688 arg2 = &arg2_str;
689 jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
690 result = (operations_research::MPVariable *)((operations_research::MPSolver const *)arg1)->LookupVariableOrNull((std::string const &)*arg2);
691 *(operations_research::MPVariable **)&jresult = result;
692 return jresult;
693}
694
695
696SWIGEXPORT 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) {
697 jlong jresult = 0 ;
699 double arg2 ;
700 double arg3 ;
701 bool arg4 ;
702 std::string *arg5 = 0 ;
704
705 (void)jenv;
706 (void)jcls;
707 (void)jarg1_;
708 arg1 = *(operations_research::MPSolver **)&jarg1;
709 arg2 = (double)jarg2;
710 arg3 = (double)jarg3;
711 arg4 = jarg4 ? true : false;
712 if(!jarg5) {
714 return 0;
715 }
716 const char *arg5_pstr = (const char *)jenv->GetStringUTFChars(jarg5, 0);
717 if (!arg5_pstr) return 0;
718 std::string arg5_str(arg5_pstr);
719 arg5 = &arg5_str;
720 jenv->ReleaseStringUTFChars(jarg5, arg5_pstr);
721 result = (operations_research::MPVariable *)(arg1)->MakeVar(arg2,arg3,arg4,(std::string const &)*arg5);
722 *(operations_research::MPVariable **)&jresult = result;
723 return jresult;
724}
725
726
727SWIGEXPORT 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) {
728 jlong jresult = 0 ;
730 double arg2 ;
731 double arg3 ;
732 std::string *arg4 = 0 ;
734
735 (void)jenv;
736 (void)jcls;
737 (void)jarg1_;
738 arg1 = *(operations_research::MPSolver **)&jarg1;
739 arg2 = (double)jarg2;
740 arg3 = (double)jarg3;
741 if(!jarg4) {
743 return 0;
744 }
745 const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0);
746 if (!arg4_pstr) return 0;
747 std::string arg4_str(arg4_pstr);
748 arg4 = &arg4_str;
749 jenv->ReleaseStringUTFChars(jarg4, arg4_pstr);
750 result = (operations_research::MPVariable *)(arg1)->MakeNumVar(arg2,arg3,(std::string const &)*arg4);
751 *(operations_research::MPVariable **)&jresult = result;
752 return jresult;
753}
754
755
756SWIGEXPORT 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) {
757 jlong jresult = 0 ;
759 double arg2 ;
760 double arg3 ;
761 std::string *arg4 = 0 ;
763
764 (void)jenv;
765 (void)jcls;
766 (void)jarg1_;
767 arg1 = *(operations_research::MPSolver **)&jarg1;
768 arg2 = (double)jarg2;
769 arg3 = (double)jarg3;
770 if(!jarg4) {
772 return 0;
773 }
774 const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0);
775 if (!arg4_pstr) return 0;
776 std::string arg4_str(arg4_pstr);
777 arg4 = &arg4_str;
778 jenv->ReleaseStringUTFChars(jarg4, arg4_pstr);
779 result = (operations_research::MPVariable *)(arg1)->MakeIntVar(arg2,arg3,(std::string const &)*arg4);
780 *(operations_research::MPVariable **)&jresult = result;
781 return jresult;
782}
783
784
785SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1makeBoolVar(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
786 jlong jresult = 0 ;
788 std::string *arg2 = 0 ;
790
791 (void)jenv;
792 (void)jcls;
793 (void)jarg1_;
794 arg1 = *(operations_research::MPSolver **)&jarg1;
795 if(!jarg2) {
797 return 0;
798 }
799 const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
800 if (!arg2_pstr) return 0;
801 std::string arg2_str(arg2_pstr);
802 arg2 = &arg2_str;
803 jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
804 result = (operations_research::MPVariable *)(arg1)->MakeBoolVar((std::string const &)*arg2);
805 *(operations_research::MPVariable **)&jresult = result;
806 return jresult;
807}
808
809
811 jint jresult = 0 ;
813 int result;
814
815 (void)jenv;
816 (void)jcls;
817 (void)jarg1_;
818 arg1 = *(operations_research::MPSolver **)&jarg1;
819 result = (int)((operations_research::MPSolver const *)arg1)->NumConstraints();
820 jresult = (jint)result;
821 return jresult;
822}
823
824
825SWIGEXPORT jobjectArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1constraints(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
826 jobjectArray jresult = 0 ;
828 std::vector< operations_research::MPConstraint * > *result = 0 ;
829
830 (void)jenv;
831 (void)jcls;
832 (void)jarg1_;
833 arg1 = *(operations_research::MPSolver **)&jarg1;
834 result = (std::vector< operations_research::MPConstraint * > *) &((operations_research::MPSolver const *)arg1)->constraints();
835 {
836 if (nullptr == result)
837 return 0;
838 std::string java_class_path ="com/google/ortools/linearsolver" "/""MPConstraint";
839 jclass object_class = jenv->FindClass(java_class_path.c_str());
840 if (nullptr == object_class)
841 return 0;
842 jresult = jenv->NewObjectArray(result->size(), object_class, 0);
843 jmethodID ctor = jenv->GetMethodID(object_class,"<init>", "(JZ)V");
844 for (int i = 0; i < result->size(); ++i) {
845 jlong obj_ptr = 0;
846 *((operations_research::MPConstraint **)&obj_ptr) = (*result)[i];
847 jobject elem = jenv->NewObject(object_class, ctor, obj_ptr, false);
848 jenv->SetObjectArrayElement(jresult, i, elem);
849 }
850 }
851 return jresult;
852}
853
854
855SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1constraint(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
856 jlong jresult = 0 ;
858 int arg2 ;
860
861 (void)jenv;
862 (void)jcls;
863 (void)jarg1_;
864 arg1 = *(operations_research::MPSolver **)&jarg1;
865 arg2 = (int)jarg2;
866 result = (operations_research::MPConstraint *)((operations_research::MPSolver const *)arg1)->constraint(arg2);
867 *(operations_research::MPConstraint **)&jresult = result;
868 return jresult;
869}
870
871
872SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1lookupConstraintOrNull(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
873 jlong jresult = 0 ;
875 std::string *arg2 = 0 ;
877
878 (void)jenv;
879 (void)jcls;
880 (void)jarg1_;
881 arg1 = *(operations_research::MPSolver **)&jarg1;
882 if(!jarg2) {
884 return 0;
885 }
886 const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
887 if (!arg2_pstr) return 0;
888 std::string arg2_str(arg2_pstr);
889 arg2 = &arg2_str;
890 jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
891 result = (operations_research::MPConstraint *)((operations_research::MPSolver const *)arg1)->LookupConstraintOrNull((std::string const &)*arg2);
892 *(operations_research::MPConstraint **)&jresult = result;
893 return jresult;
894}
895
896
897SWIGEXPORT 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) {
898 jlong jresult = 0 ;
900 double arg2 ;
901 double arg3 ;
903
904 (void)jenv;
905 (void)jcls;
906 (void)jarg1_;
907 arg1 = *(operations_research::MPSolver **)&jarg1;
908 arg2 = (double)jarg2;
909 arg3 = (double)jarg3;
910 result = (operations_research::MPConstraint *)(arg1)->MakeRowConstraint(arg2,arg3);
911 *(operations_research::MPConstraint **)&jresult = result;
912 return jresult;
913}
914
915
917 jlong jresult = 0 ;
920
921 (void)jenv;
922 (void)jcls;
923 (void)jarg1_;
924 arg1 = *(operations_research::MPSolver **)&jarg1;
925 result = (operations_research::MPConstraint *)(arg1)->MakeRowConstraint();
926 *(operations_research::MPConstraint **)&jresult = result;
927 return jresult;
928}
929
930
931SWIGEXPORT 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) {
932 jlong jresult = 0 ;
934 double arg2 ;
935 double arg3 ;
936 std::string *arg4 = 0 ;
938
939 (void)jenv;
940 (void)jcls;
941 (void)jarg1_;
942 arg1 = *(operations_research::MPSolver **)&jarg1;
943 arg2 = (double)jarg2;
944 arg3 = (double)jarg3;
945 if(!jarg4) {
947 return 0;
948 }
949 const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0);
950 if (!arg4_pstr) return 0;
951 std::string arg4_str(arg4_pstr);
952 arg4 = &arg4_str;
953 jenv->ReleaseStringUTFChars(jarg4, arg4_pstr);
954 result = (operations_research::MPConstraint *)(arg1)->MakeRowConstraint(arg2,arg3,(std::string const &)*arg4);
955 *(operations_research::MPConstraint **)&jresult = result;
956 return jresult;
957}
958
959
960SWIGEXPORT 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) {
961 jlong jresult = 0 ;
963 std::string *arg2 = 0 ;
965
966 (void)jenv;
967 (void)jcls;
968 (void)jarg1_;
969 arg1 = *(operations_research::MPSolver **)&jarg1;
970 if(!jarg2) {
972 return 0;
973 }
974 const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
975 if (!arg2_pstr) return 0;
976 std::string arg2_str(arg2_pstr);
977 arg2 = &arg2_str;
978 jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
979 result = (operations_research::MPConstraint *)(arg1)->MakeRowConstraint((std::string const &)*arg2);
980 *(operations_research::MPConstraint **)&jresult = result;
981 return jresult;
982}
983
984
985SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1objective(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
986 jlong jresult = 0 ;
989
990 (void)jenv;
991 (void)jcls;
992 (void)jarg1_;
993 arg1 = *(operations_research::MPSolver **)&jarg1;
994 result = (operations_research::MPObjective *)(arg1)->MutableObjective();
995 *(operations_research::MPObjective **)&jresult = result;
996 return jresult;
997}
998
999
1001 jint jresult = 0 ;
1003
1004 (void)jenv;
1005 (void)jcls;
1007 jresult = (jint)result;
1008 return jresult;
1009}
1010
1011
1013 jint jresult = 0 ;
1016
1017 (void)jenv;
1018 (void)jcls;
1019 (void)jarg1_;
1020 arg1 = *(operations_research::MPSolver **)&jarg1;
1022 jresult = (jint)result;
1023 return jresult;
1024}
1025
1026
1027SWIGEXPORT 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_) {
1028 jint jresult = 0 ;
1032
1033 (void)jenv;
1034 (void)jcls;
1035 (void)jarg1_;
1036 (void)jarg2_;
1037 arg1 = *(operations_research::MPSolver **)&jarg1;
1038 arg2 = *(operations_research::MPSolverParameters **)&jarg2;
1039 if (!arg2) {
1040 SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "operations_research::MPSolverParameters const & reference is null");
1041 return 0;
1042 }
1044 jresult = (jint)result;
1045 return jresult;
1046}
1047
1048
1050 jdoubleArray jresult = 0 ;
1052 std::vector< double > result;
1053
1054 (void)jenv;
1055 (void)jcls;
1056 (void)jarg1_;
1057 arg1 = *(operations_research::MPSolver **)&jarg1;
1059
1060 const std::vector<double>& vec = result;
1061 jresult = jenv->NewDoubleArray(vec.size());
1062 jenv->SetDoubleArrayRegion(jresult, 0, vec.size(), reinterpret_cast<const jdouble*>(vec.data()));
1063
1064 return jresult;
1065}
1066
1067
1068SWIGEXPORT 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) {
1069 jboolean jresult = 0 ;
1071 double arg2 ;
1072 bool arg3 ;
1073 bool result;
1074
1075 (void)jenv;
1076 (void)jcls;
1077 (void)jarg1_;
1078 arg1 = *(operations_research::MPSolver **)&jarg1;
1079 arg2 = (double)jarg2;
1080 arg3 = jarg3 ? true : false;
1081 result = (bool)((operations_research::MPSolver const *)arg1)->VerifySolution(arg2,arg3);
1082 jresult = (jboolean)result;
1083 return jresult;
1084}
1085
1086
1087SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1reset(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1089
1090 (void)jenv;
1091 (void)jcls;
1092 (void)jarg1_;
1093 arg1 = *(operations_research::MPSolver **)&jarg1;
1094 (arg1)->Reset();
1095}
1096
1097
1098SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1interruptSolve(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1099 jboolean jresult = 0 ;
1101 bool result;
1102
1103 (void)jenv;
1104 (void)jcls;
1105 (void)jarg1_;
1106 arg1 = *(operations_research::MPSolver **)&jarg1;
1107 result = (bool)(arg1)->InterruptSolve();
1108 jresult = (jboolean)result;
1109 return jresult;
1110}
1111
1112
1113SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1setSolverSpecificParametersAsString(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
1114 jboolean jresult = 0 ;
1116 std::string *arg2 = 0 ;
1117 bool result;
1118
1119 (void)jenv;
1120 (void)jcls;
1121 (void)jarg1_;
1122 arg1 = *(operations_research::MPSolver **)&jarg1;
1123 if(!jarg2) {
1125 return 0;
1126 }
1127 const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
1128 if (!arg2_pstr) return 0;
1129 std::string arg2_str(arg2_pstr);
1130 arg2 = &arg2_str;
1131 jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
1132 result = (bool)(arg1)->SetSolverSpecificParametersAsString((std::string const &)*arg2);
1133 jresult = (jboolean)result;
1134 return jresult;
1135}
1136
1137
1139 jint jresult = 0 ;
1141
1142 (void)jenv;
1143 (void)jcls;
1145 jresult = (jint)result;
1146 return jresult;
1147}
1148
1149
1151 jdouble jresult = 0 ;
1152 double result;
1153
1154 (void)jenv;
1155 (void)jcls;
1156 result = (double)operations_research::MPSolver::infinity();
1157 jresult = (jdouble)result;
1158 return jresult;
1159}
1160
1161
1162SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1enableOutput(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1164
1165 (void)jenv;
1166 (void)jcls;
1167 (void)jarg1_;
1168 arg1 = *(operations_research::MPSolver **)&jarg1;
1169 (arg1)->EnableOutput();
1170}
1171
1172
1175
1176 (void)jenv;
1177 (void)jcls;
1178 (void)jarg1_;
1179 arg1 = *(operations_research::MPSolver **)&jarg1;
1180 (arg1)->SuppressOutput();
1181}
1182
1183
1184SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1iterations(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1185 jlong jresult = 0 ;
1187 int64_t result;
1188
1189 (void)jenv;
1190 (void)jcls;
1191 (void)jarg1_;
1192 arg1 = *(operations_research::MPSolver **)&jarg1;
1193 result = (int64_t)((operations_research::MPSolver const *)arg1)->iterations();
1194 jresult = (jlong)result;
1195 return jresult;
1196}
1197
1198
1199SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1nodes(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1200 jlong jresult = 0 ;
1202 int64_t result;
1203
1204 (void)jenv;
1205 (void)jcls;
1206 (void)jarg1_;
1207 arg1 = *(operations_research::MPSolver **)&jarg1;
1208 result = (int64_t)((operations_research::MPSolver const *)arg1)->nodes();
1209 jresult = (jlong)result;
1210 return jresult;
1211}
1212
1213
1215 jdouble jresult = 0 ;
1217 double result;
1218
1219 (void)jenv;
1220 (void)jcls;
1221 (void)jarg1_;
1222 arg1 = *(operations_research::MPSolver **)&jarg1;
1223 result = (double)((operations_research::MPSolver const *)arg1)->ComputeExactConditionNumber();
1224 jresult = (jdouble)result;
1225 return jresult;
1226}
1227
1228
1229SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1setTimeLimit(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
1231 int64_t arg2 ;
1232
1233 (void)jenv;
1234 (void)jcls;
1235 (void)jarg1_;
1236 arg1 = *(operations_research::MPSolver **)&jarg1;
1237 arg2 = (int64_t)jarg2;
1238 (arg1)->set_time_limit(arg2);
1239}
1240
1241
1242SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1wallTime(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1243 jlong jresult = 0 ;
1245 int64_t result;
1246
1247 (void)jenv;
1248 (void)jcls;
1249 (void)jarg1_;
1250 arg1 = *(operations_research::MPSolver **)&jarg1;
1251 result = (int64_t)((operations_research::MPSolver const *)arg1)->wall_time();
1252 jresult = (jlong)result;
1253 return jresult;
1254}
1255
1256
1257SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1loadModelFromProto(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2) {
1258 jstring jresult = 0 ;
1262 std::string result;
1263
1264 (void)jenv;
1265 (void)jcls;
1266 (void)jarg1_;
1267 arg1 = *(operations_research::MPSolver **)&jarg1;
1268 {
1269 int proto_size = 0;
1270 std::unique_ptr<char[]> proto_buffer(
1271 JNIUtil::MakeCharArray(jenv, jarg2, &proto_size));
1272 bool parsed_ok = temp2.ParseFromArray(proto_buffer.get(), proto_size);
1273 if (!parsed_ok) {
1276 "Unable to parse operations_research::MPModelProto protocol message.");
1277 }
1278 arg2 = &temp2;
1279 }
1281 jresult = jenv->NewStringUTF((&result)->c_str());
1282 return jresult;
1283}
1284
1285
1286SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1loadModelFromProtoWithUniqueNamesOrDie(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2) {
1287 jstring jresult = 0 ;
1291 std::string result;
1292
1293 (void)jenv;
1294 (void)jcls;
1295 (void)jarg1_;
1296 arg1 = *(operations_research::MPSolver **)&jarg1;
1297 {
1298 int proto_size = 0;
1299 std::unique_ptr<char[]> proto_buffer(
1300 JNIUtil::MakeCharArray(jenv, jarg2, &proto_size));
1301 bool parsed_ok = temp2.ParseFromArray(proto_buffer.get(), proto_size);
1302 if (!parsed_ok) {
1305 "Unable to parse operations_research::MPModelProto protocol message.");
1306 }
1307 arg2 = &temp2;
1308 }
1310 jresult = jenv->NewStringUTF((&result)->c_str());
1311 return jresult;
1312}
1313
1314
1315SWIGEXPORT jbyteArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1exportModelToProto(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1316 jbyteArray jresult = 0 ;
1319
1320 (void)jenv;
1321 (void)jcls;
1322 (void)jarg1_;
1323 arg1 = *(operations_research::MPSolver **)&jarg1;
1325 {
1326 const long size = (&result)->ByteSizeLong();
1327 std::unique_ptr<char[]> buf(new char[size]);
1328 (&result)->SerializeWithCachedSizesToArray(reinterpret_cast<uint8_t*>(buf.get()));
1329 jresult = JNIUtil::MakeJByteArray(jenv, buf.get(), size);
1330 }
1331 return jresult;
1332}
1333
1334
1336 jbyteArray jresult = 0 ;
1339
1340 (void)jenv;
1341 (void)jcls;
1342 (void)jarg1_;
1343 arg1 = *(operations_research::MPSolver **)&jarg1;
1345 {
1346 const long size = (&result)->ByteSizeLong();
1347 std::unique_ptr<char[]> buf(new char[size]);
1348 (&result)->SerializeWithCachedSizesToArray(reinterpret_cast<uint8_t*>(buf.get()));
1349 jresult = JNIUtil::MakeJByteArray(jenv, buf.get(), size);
1350 }
1351 return jresult;
1352}
1353
1354
1355SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1loadSolutionFromProto(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2) {
1356 jboolean jresult = 0 ;
1360 bool result;
1361
1362 (void)jenv;
1363 (void)jcls;
1364 (void)jarg1_;
1365 arg1 = *(operations_research::MPSolver **)&jarg1;
1366 {
1367 int proto_size = 0;
1368 std::unique_ptr<char[]> proto_buffer(
1369 JNIUtil::MakeCharArray(jenv, jarg2, &proto_size));
1370 bool parsed_ok = temp2.ParseFromArray(proto_buffer.get(), proto_size);
1371 if (!parsed_ok) {
1374 "Unable to parse operations_research::MPSolutionResponse protocol message.");
1375 }
1376 arg2 = &temp2;
1377 }
1379 jresult = (jboolean)result;
1380 return jresult;
1381}
1382
1383
1385 jbyteArray jresult = 0 ;
1389
1390 (void)jenv;
1391 (void)jcls;
1392 {
1393 int proto_size = 0;
1394 std::unique_ptr<char[]> proto_buffer(
1395 JNIUtil::MakeCharArray(jenv, jarg1, &proto_size));
1396 bool parsed_ok = temp1.ParseFromArray(proto_buffer.get(), proto_size);
1397 if (!parsed_ok) {
1400 "Unable to parse operations_research::MPModelRequest protocol message.");
1401 }
1402 arg1 = &temp1;
1403 }
1405 {
1406 const long size = (&result)->ByteSizeLong();
1407 std::unique_ptr<char[]> buf(new char[size]);
1408 (&result)->SerializeWithCachedSizesToArray(reinterpret_cast<uint8_t*>(buf.get()));
1409 jresult = JNIUtil::MakeJByteArray(jenv, buf.get(), size);
1410 }
1411 return jresult;
1412}
1413
1414
1415SWIGEXPORT 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_) {
1416 jstring jresult = 0 ;
1419 std::string result;
1420
1421 (void)jenv;
1422 (void)jcls;
1423 (void)jarg1_;
1424 (void)jarg2_;
1425 arg1 = *(operations_research::MPSolver **)&jarg1;
1427 if (!arg2) {
1428 SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "operations_research::MPModelExportOptions const & reference is null");
1429 return 0;
1430 }
1432 jresult = jenv->NewStringUTF((&result)->c_str());
1433 return jresult;
1434}
1435
1436
1438 jstring jresult = 0 ;
1440 std::string result;
1441
1442 (void)jenv;
1443 (void)jcls;
1444 (void)jarg1_;
1445 arg1 = *(operations_research::MPSolver **)&jarg1;
1447 jresult = jenv->NewStringUTF((&result)->c_str());
1448 return jresult;
1449}
1450
1451
1452SWIGEXPORT 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_) {
1453 jstring jresult = 0 ;
1456 std::string result;
1457
1458 (void)jenv;
1459 (void)jcls;
1460 (void)jarg1_;
1461 (void)jarg2_;
1462 arg1 = *(operations_research::MPSolver **)&jarg1;
1464 if (!arg2) {
1465 SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "operations_research::MPModelExportOptions const & reference is null");
1466 return 0;
1467 }
1469 jresult = jenv->NewStringUTF((&result)->c_str());
1470 return jresult;
1471}
1472
1473
1475 jstring jresult = 0 ;
1477 std::string result;
1478
1479 (void)jenv;
1480 (void)jcls;
1481 (void)jarg1_;
1482 arg1 = *(operations_research::MPSolver **)&jarg1;
1484 jresult = jenv->NewStringUTF((&result)->c_str());
1485 return jresult;
1486}
1487
1488
1489SWIGEXPORT 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) {
1491 std::vector< operations_research::MPVariable * > *arg2 = 0 ;
1492 std::vector< double > *arg3 = 0 ;
1493 std::vector< operations_research::MPVariable * > result2 ;
1494
1495 (void)jenv;
1496 (void)jcls;
1497 (void)jarg1_;
1498 arg1 = *(operations_research::MPSolver **)&jarg1;
1499 {
1500 std::string java_class_path ="com/google/ortools/linearsolver" "/""MPVariable";
1501 jclass object_class = jenv->FindClass(java_class_path.c_str());
1502 if (nullptr == object_class)
1503 return ;
1504 jmethodID method_id =
1505 jenv->GetStaticMethodID(
1506 object_class, "getCPtr",
1507 std::string("(L" + java_class_path + ";)J").c_str());
1508 assert(method_id != nullptr);
1509 for (int i = 0; i < jenv->GetArrayLength(jarg2); i++) {
1510 jobject elem = jenv->GetObjectArrayElement(jarg2, i);
1511 jlong ptr_value = jenv->CallStaticLongMethod(object_class, method_id, elem);
1512 result2.push_back(/*@SWIG:ortools/util/java/vector.i,286,REINTERPRET_CAST@*/
1513 reinterpret_cast<operations_research::MPVariable*>(ptr_value)
1514 /*@SWIG@*/);
1515 }
1516 arg2 = &result2;
1517 }
1518
1519 if(jarg3) {
1520 arg3 = new std::vector<double>;
1521 const int size = jenv->GetArrayLength(jarg3);
1522 arg3->reserve(size);
1523 jdouble *values = jenv->GetDoubleArrayElements((jdoubleArray)jarg3, NULL);
1524 for (int i = 0; i < size; ++i) {
1525 arg3->emplace_back(values[i]);
1526 }
1527 jenv->ReleaseDoubleArrayElements((jdoubleArray)jarg3, values, JNI_ABORT);
1528 }
1529 else {
1531 return ;
1532 }
1533
1534 operations_research_MPSolver_setHint(arg1,(std::vector< operations_research::MPVariable * > const &)*arg2,(std::vector< double > const &)*arg3);
1535 {
1536 delete arg3;
1537 }
1538}
1539
1540
1541SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1setNumThreads(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
1542 jboolean jresult = 0 ;
1544 int arg2 ;
1545 bool result;
1546
1547 (void)jenv;
1548 (void)jcls;
1549 (void)jarg1_;
1550 arg1 = *(operations_research::MPSolver **)&jarg1;
1551 arg2 = (int)jarg2;
1552 result = (bool)operations_research_MPSolver_setNumThreads(arg1,arg2);
1553 jresult = (jboolean)result;
1554 return jresult;
1555}
1556
1557
1558SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1clear(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1560
1561 (void)jenv;
1562 (void)jcls;
1563 (void)jarg1_;
1564 arg1 = *(operations_research::MPObjective **)&jarg1;
1565 (arg1)->Clear();
1566}
1567
1568
1569SWIGEXPORT 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) {
1572 double arg3 ;
1573
1574 (void)jenv;
1575 (void)jcls;
1576 (void)jarg1_;
1577 (void)jarg2_;
1578 arg1 = *(operations_research::MPObjective **)&jarg1;
1579 arg2 = *(operations_research::MPVariable **)&jarg2;
1580 arg3 = (double)jarg3;
1581 (arg1)->SetCoefficient((operations_research::MPVariable const *)arg2,arg3);
1582}
1583
1584
1585SWIGEXPORT 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_) {
1586 jdouble jresult = 0 ;
1589 double result;
1590
1591 (void)jenv;
1592 (void)jcls;
1593 (void)jarg1_;
1594 (void)jarg2_;
1595 arg1 = *(operations_research::MPObjective **)&jarg1;
1596 arg2 = *(operations_research::MPVariable **)&jarg2;
1597 result = (double)((operations_research::MPObjective const *)arg1)->GetCoefficient((operations_research::MPVariable const *)arg2);
1598 jresult = (jdouble)result;
1599 return jresult;
1600}
1601
1602
1603SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1setOffset(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2) {
1605 double arg2 ;
1606
1607 (void)jenv;
1608 (void)jcls;
1609 (void)jarg1_;
1610 arg1 = *(operations_research::MPObjective **)&jarg1;
1611 arg2 = (double)jarg2;
1612 (arg1)->SetOffset(arg2);
1613}
1614
1615
1616SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1offset(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1617 jdouble jresult = 0 ;
1619 double result;
1620
1621 (void)jenv;
1622 (void)jcls;
1623 (void)jarg1_;
1624 arg1 = *(operations_research::MPObjective **)&jarg1;
1625 result = (double)((operations_research::MPObjective const *)arg1)->offset();
1626 jresult = (jdouble)result;
1627 return jresult;
1628}
1629
1630
1631SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1setOptimizationDirection(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
1633 bool arg2 ;
1634
1635 (void)jenv;
1636 (void)jcls;
1637 (void)jarg1_;
1638 arg1 = *(operations_research::MPObjective **)&jarg1;
1639 arg2 = jarg2 ? true : false;
1640 (arg1)->SetOptimizationDirection(arg2);
1641}
1642
1643
1646
1647 (void)jenv;
1648 (void)jcls;
1649 (void)jarg1_;
1650 arg1 = *(operations_research::MPObjective **)&jarg1;
1651 (arg1)->SetMinimization();
1652}
1653
1654
1657
1658 (void)jenv;
1659 (void)jcls;
1660 (void)jarg1_;
1661 arg1 = *(operations_research::MPObjective **)&jarg1;
1662 (arg1)->SetMaximization();
1663}
1664
1665
1666SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1maximization(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1667 jboolean jresult = 0 ;
1669 bool result;
1670
1671 (void)jenv;
1672 (void)jcls;
1673 (void)jarg1_;
1674 arg1 = *(operations_research::MPObjective **)&jarg1;
1675 result = (bool)((operations_research::MPObjective const *)arg1)->maximization();
1676 jresult = (jboolean)result;
1677 return jresult;
1678}
1679
1680
1681SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1minimization(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1682 jboolean jresult = 0 ;
1684 bool result;
1685
1686 (void)jenv;
1687 (void)jcls;
1688 (void)jarg1_;
1689 arg1 = *(operations_research::MPObjective **)&jarg1;
1690 result = (bool)((operations_research::MPObjective const *)arg1)->minimization();
1691 jresult = (jboolean)result;
1692 return jresult;
1693}
1694
1695
1696SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1value(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1697 jdouble jresult = 0 ;
1699 double result;
1700
1701 (void)jenv;
1702 (void)jcls;
1703 (void)jarg1_;
1704 arg1 = *(operations_research::MPObjective **)&jarg1;
1705 result = (double)((operations_research::MPObjective const *)arg1)->Value();
1706 jresult = (jdouble)result;
1707 return jresult;
1708}
1709
1710
1711SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1bestBound(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1712 jdouble jresult = 0 ;
1714 double result;
1715
1716 (void)jenv;
1717 (void)jcls;
1718 (void)jarg1_;
1719 arg1 = *(operations_research::MPObjective **)&jarg1;
1720 result = (double)((operations_research::MPObjective const *)arg1)->BestBound();
1721 jresult = (jdouble)result;
1722 return jresult;
1723}
1724
1725
1728
1729 (void)jenv;
1730 (void)jcls;
1731 arg1 = *(operations_research::MPObjective **)&jarg1;
1732 delete arg1;
1733}
1734
1735
1736SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1name(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1737 jstring jresult = 0 ;
1739 std::string *result = 0 ;
1740
1741 (void)jenv;
1742 (void)jcls;
1743 (void)jarg1_;
1744 arg1 = *(operations_research::MPVariable **)&jarg1;
1745 result = (std::string *) &((operations_research::MPVariable const *)arg1)->name();
1746 jresult = jenv->NewStringUTF(result->c_str());
1747 return jresult;
1748}
1749
1750
1751SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1setInteger(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
1753 bool arg2 ;
1754
1755 (void)jenv;
1756 (void)jcls;
1757 (void)jarg1_;
1758 arg1 = *(operations_research::MPVariable **)&jarg1;
1759 arg2 = jarg2 ? true : false;
1760 (arg1)->SetInteger(arg2);
1761}
1762
1763
1764SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1solutionValue(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1765 jdouble jresult = 0 ;
1767 double result;
1768
1769 (void)jenv;
1770 (void)jcls;
1771 (void)jarg1_;
1772 arg1 = *(operations_research::MPVariable **)&jarg1;
1773 result = (double)((operations_research::MPVariable const *)arg1)->solution_value();
1774 jresult = (jdouble)result;
1775 return jresult;
1776}
1777
1778
1779SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1index(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1780 jint jresult = 0 ;
1782 int result;
1783
1784 (void)jenv;
1785 (void)jcls;
1786 (void)jarg1_;
1787 arg1 = *(operations_research::MPVariable **)&jarg1;
1788 result = (int)((operations_research::MPVariable const *)arg1)->index();
1789 jresult = (jint)result;
1790 return jresult;
1791}
1792
1793
1794SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1lb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1795 jdouble jresult = 0 ;
1797 double result;
1798
1799 (void)jenv;
1800 (void)jcls;
1801 (void)jarg1_;
1802 arg1 = *(operations_research::MPVariable **)&jarg1;
1803 result = (double)((operations_research::MPVariable const *)arg1)->lb();
1804 jresult = (jdouble)result;
1805 return jresult;
1806}
1807
1808
1809SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1ub(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1810 jdouble jresult = 0 ;
1812 double result;
1813
1814 (void)jenv;
1815 (void)jcls;
1816 (void)jarg1_;
1817 arg1 = *(operations_research::MPVariable **)&jarg1;
1818 result = (double)((operations_research::MPVariable const *)arg1)->ub();
1819 jresult = (jdouble)result;
1820 return jresult;
1821}
1822
1823
1824SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1setLb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2) {
1826 double arg2 ;
1827
1828 (void)jenv;
1829 (void)jcls;
1830 (void)jarg1_;
1831 arg1 = *(operations_research::MPVariable **)&jarg1;
1832 arg2 = (double)jarg2;
1833 (arg1)->SetLB(arg2);
1834}
1835
1836
1837SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1setUb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2) {
1839 double arg2 ;
1840
1841 (void)jenv;
1842 (void)jcls;
1843 (void)jarg1_;
1844 arg1 = *(operations_research::MPVariable **)&jarg1;
1845 arg2 = (double)jarg2;
1846 (arg1)->SetUB(arg2);
1847}
1848
1849
1850SWIGEXPORT 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) {
1852 double arg2 ;
1853 double arg3 ;
1854
1855 (void)jenv;
1856 (void)jcls;
1857 (void)jarg1_;
1858 arg1 = *(operations_research::MPVariable **)&jarg1;
1859 arg2 = (double)jarg2;
1860 arg3 = (double)jarg3;
1861 (arg1)->SetBounds(arg2,arg3);
1862}
1863
1864
1865SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1reducedCost(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1866 jdouble jresult = 0 ;
1868 double result;
1869
1870 (void)jenv;
1871 (void)jcls;
1872 (void)jarg1_;
1873 arg1 = *(operations_research::MPVariable **)&jarg1;
1874 result = (double)((operations_research::MPVariable const *)arg1)->reduced_cost();
1875 jresult = (jdouble)result;
1876 return jresult;
1877}
1878
1879
1881 jint jresult = 0 ;
1884
1885 (void)jenv;
1886 (void)jcls;
1887 (void)jarg1_;
1888 arg1 = *(operations_research::MPVariable **)&jarg1;
1889 result = (operations_research::MPSolver::BasisStatus)((operations_research::MPVariable const *)arg1)->basis_status();
1890 jresult = (jint)result;
1891 return jresult;
1892}
1893
1894
1897
1898 (void)jenv;
1899 (void)jcls;
1900 arg1 = *(operations_research::MPVariable **)&jarg1;
1901 delete arg1;
1902}
1903
1904
1905SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1name(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1906 jstring jresult = 0 ;
1908 std::string *result = 0 ;
1909
1910 (void)jenv;
1911 (void)jcls;
1912 (void)jarg1_;
1913 arg1 = *(operations_research::MPConstraint **)&jarg1;
1914 result = (std::string *) &((operations_research::MPConstraint const *)arg1)->name();
1915 jresult = jenv->NewStringUTF(result->c_str());
1916 return jresult;
1917}
1918
1919
1920SWIGEXPORT 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) {
1923 double arg3 ;
1924
1925 (void)jenv;
1926 (void)jcls;
1927 (void)jarg1_;
1928 (void)jarg2_;
1929 arg1 = *(operations_research::MPConstraint **)&jarg1;
1930 arg2 = *(operations_research::MPVariable **)&jarg2;
1931 arg3 = (double)jarg3;
1932 (arg1)->SetCoefficient((operations_research::MPVariable const *)arg2,arg3);
1933}
1934
1935
1936SWIGEXPORT 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_) {
1937 jdouble jresult = 0 ;
1940 double result;
1941
1942 (void)jenv;
1943 (void)jcls;
1944 (void)jarg1_;
1945 (void)jarg2_;
1946 arg1 = *(operations_research::MPConstraint **)&jarg1;
1947 arg2 = *(operations_research::MPVariable **)&jarg2;
1948 result = (double)((operations_research::MPConstraint const *)arg1)->GetCoefficient((operations_research::MPVariable const *)arg2);
1949 jresult = (jdouble)result;
1950 return jresult;
1951}
1952
1953
1954SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1lb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1955 jdouble jresult = 0 ;
1957 double result;
1958
1959 (void)jenv;
1960 (void)jcls;
1961 (void)jarg1_;
1962 arg1 = *(operations_research::MPConstraint **)&jarg1;
1963 result = (double)((operations_research::MPConstraint const *)arg1)->lb();
1964 jresult = (jdouble)result;
1965 return jresult;
1966}
1967
1968
1969SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1ub(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1970 jdouble jresult = 0 ;
1972 double result;
1973
1974 (void)jenv;
1975 (void)jcls;
1976 (void)jarg1_;
1977 arg1 = *(operations_research::MPConstraint **)&jarg1;
1978 result = (double)((operations_research::MPConstraint const *)arg1)->ub();
1979 jresult = (jdouble)result;
1980 return jresult;
1981}
1982
1983
1984SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1setLb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2) {
1986 double arg2 ;
1987
1988 (void)jenv;
1989 (void)jcls;
1990 (void)jarg1_;
1991 arg1 = *(operations_research::MPConstraint **)&jarg1;
1992 arg2 = (double)jarg2;
1993 (arg1)->SetLB(arg2);
1994}
1995
1996
1997SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1setUb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2) {
1999 double arg2 ;
2000
2001 (void)jenv;
2002 (void)jcls;
2003 (void)jarg1_;
2004 arg1 = *(operations_research::MPConstraint **)&jarg1;
2005 arg2 = (double)jarg2;
2006 (arg1)->SetUB(arg2);
2007}
2008
2009
2010SWIGEXPORT 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) {
2012 double arg2 ;
2013 double arg3 ;
2014
2015 (void)jenv;
2016 (void)jcls;
2017 (void)jarg1_;
2018 arg1 = *(operations_research::MPConstraint **)&jarg1;
2019 arg2 = (double)jarg2;
2020 arg3 = (double)jarg3;
2021 (arg1)->SetBounds(arg2,arg3);
2022}
2023
2024
2025SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1isLazy(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
2026 jboolean jresult = 0 ;
2028 bool result;
2029
2030 (void)jenv;
2031 (void)jcls;
2032 (void)jarg1_;
2033 arg1 = *(operations_research::MPConstraint **)&jarg1;
2034 result = (bool)((operations_research::MPConstraint const *)arg1)->is_lazy();
2035 jresult = (jboolean)result;
2036 return jresult;
2037}
2038
2039
2040SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1setIsLazy(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
2042 bool arg2 ;
2043
2044 (void)jenv;
2045 (void)jcls;
2046 (void)jarg1_;
2047 arg1 = *(operations_research::MPConstraint **)&jarg1;
2048 arg2 = jarg2 ? true : false;
2049 (arg1)->set_is_lazy(arg2);
2050}
2051
2052
2053SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1index(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
2054 jint jresult = 0 ;
2056 int result;
2057
2058 (void)jenv;
2059 (void)jcls;
2060 (void)jarg1_;
2061 arg1 = *(operations_research::MPConstraint **)&jarg1;
2062 result = (int)((operations_research::MPConstraint const *)arg1)->index();
2063 jresult = (jint)result;
2064 return jresult;
2065}
2066
2067
2068SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1dualValue(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
2069 jdouble jresult = 0 ;
2071 double result;
2072
2073 (void)jenv;
2074 (void)jcls;
2075 (void)jarg1_;
2076 arg1 = *(operations_research::MPConstraint **)&jarg1;
2077 result = (double)((operations_research::MPConstraint const *)arg1)->dual_value();
2078 jresult = (jdouble)result;
2079 return jresult;
2080}
2081
2082
2084 jint jresult = 0 ;
2087
2088 (void)jenv;
2089 (void)jcls;
2090 (void)jarg1_;
2091 arg1 = *(operations_research::MPConstraint **)&jarg1;
2092 result = (operations_research::MPSolver::BasisStatus)((operations_research::MPConstraint const *)arg1)->basis_status();
2093 jresult = (jint)result;
2094 return jresult;
2095}
2096
2097
2100
2101 (void)jenv;
2102 (void)jcls;
2103 arg1 = *(operations_research::MPConstraint **)&jarg1;
2104 delete arg1;
2105}
2106
2107
2109 jint jresult = 0 ;
2111
2112 (void)jenv;
2113 (void)jcls;
2115 jresult = (jint)result;
2116 return jresult;
2117}
2118
2119
2121 jint jresult = 0 ;
2123
2124 (void)jenv;
2125 (void)jcls;
2127 jresult = (jint)result;
2128 return jresult;
2129}
2130
2131
2133 jint jresult = 0 ;
2135
2136 (void)jenv;
2137 (void)jcls;
2139 jresult = (jint)result;
2140 return jresult;
2141}
2142
2143
2145 jint jresult = 0 ;
2147
2148 (void)jenv;
2149 (void)jcls;
2151 jresult = (jint)result;
2152 return jresult;
2153}
2154
2155
2157 jint jresult = 0 ;
2159
2160 (void)jenv;
2161 (void)jcls;
2163 jresult = (jint)result;
2164 return jresult;
2165}
2166
2167
2169 jint jresult = 0 ;
2171
2172 (void)jenv;
2173 (void)jcls;
2175 jresult = (jint)result;
2176 return jresult;
2177}
2178
2179
2181 jint jresult = 0 ;
2183
2184 (void)jenv;
2185 (void)jcls;
2187 jresult = (jint)result;
2188 return jresult;
2189}
2190
2191
2193 jint jresult = 0 ;
2195
2196 (void)jenv;
2197 (void)jcls;
2199 jresult = (jint)result;
2200 return jresult;
2201}
2202
2203
2205 jint jresult = 0 ;
2207
2208 (void)jenv;
2209 (void)jcls;
2211 jresult = (jint)result;
2212 return jresult;
2213}
2214
2215
2217 jint jresult = 0 ;
2219
2220 (void)jenv;
2221 (void)jcls;
2223 jresult = (jint)result;
2224 return jresult;
2225}
2226
2227
2229 jint jresult = 0 ;
2231
2232 (void)jenv;
2233 (void)jcls;
2235 jresult = (jint)result;
2236 return jresult;
2237}
2238
2239
2241 jint jresult = 0 ;
2243
2244 (void)jenv;
2245 (void)jcls;
2247 jresult = (jint)result;
2248 return jresult;
2249}
2250
2251
2253 jint jresult = 0 ;
2255
2256 (void)jenv;
2257 (void)jcls;
2259 jresult = (jint)result;
2260 return jresult;
2261}
2262
2263
2265 jint jresult = 0 ;
2267
2268 (void)jenv;
2269 (void)jcls;
2271 jresult = (jint)result;
2272 return jresult;
2273}
2274
2275
2277 jint jresult = 0 ;
2279
2280 (void)jenv;
2281 (void)jcls;
2283 jresult = (jint)result;
2284 return jresult;
2285}
2286
2287
2289 jint jresult = 0 ;
2291
2292 (void)jenv;
2293 (void)jcls;
2295 jresult = (jint)result;
2296 return jresult;
2297}
2298
2299
2301 jdouble jresult = 0 ;
2302 double result;
2303
2304 (void)jenv;
2305 (void)jcls;
2307 jresult = (jdouble)result;
2308 return jresult;
2309}
2310
2311
2313 jdouble jresult = 0 ;
2314 double result;
2315
2316 (void)jenv;
2317 (void)jcls;
2319 jresult = (jdouble)result;
2320 return jresult;
2321}
2322
2323
2325 jdouble jresult = 0 ;
2326 double result;
2327
2328 (void)jenv;
2329 (void)jcls;
2331 jresult = (jdouble)result;
2332 return jresult;
2333}
2334
2335
2337 jint jresult = 0 ;
2339
2340 (void)jenv;
2341 (void)jcls;
2343 jresult = (jint)result;
2344 return jresult;
2345}
2346
2347
2349 jint jresult = 0 ;
2351
2352 (void)jenv;
2353 (void)jcls;
2355 jresult = (jint)result;
2356 return jresult;
2357}
2358
2359
2361 jlong jresult = 0 ;
2363
2364 (void)jenv;
2365 (void)jcls;
2367 *(operations_research::MPSolverParameters **)&jresult = result;
2368 return jresult;
2369}
2370
2371
2372SWIGEXPORT 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) {
2375 double arg3 ;
2376
2377 (void)jenv;
2378 (void)jcls;
2379 (void)jarg1_;
2380 arg1 = *(operations_research::MPSolverParameters **)&jarg1;
2382 arg3 = (double)jarg3;
2383 (arg1)->SetDoubleParam(arg2,arg3);
2384}
2385
2386
2387SWIGEXPORT 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) {
2390 int arg3 ;
2391
2392 (void)jenv;
2393 (void)jcls;
2394 (void)jarg1_;
2395 arg1 = *(operations_research::MPSolverParameters **)&jarg1;
2397 arg3 = (int)jarg3;
2398 (arg1)->SetIntegerParam(arg2,arg3);
2399}
2400
2401
2402SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1getDoubleParam(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
2403 jdouble jresult = 0 ;
2406 double result;
2407
2408 (void)jenv;
2409 (void)jcls;
2410 (void)jarg1_;
2411 arg1 = *(operations_research::MPSolverParameters **)&jarg1;
2413 result = (double)((operations_research::MPSolverParameters const *)arg1)->GetDoubleParam(arg2);
2414 jresult = (jdouble)result;
2415 return jresult;
2416}
2417
2418
2419SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1getIntegerParam(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
2420 jint jresult = 0 ;
2423 int result;
2424
2425 (void)jenv;
2426 (void)jcls;
2427 (void)jarg1_;
2428 arg1 = *(operations_research::MPSolverParameters **)&jarg1;
2430 result = (int)((operations_research::MPSolverParameters const *)arg1)->GetIntegerParam(arg2);
2431 jresult = (jint)result;
2432 return jresult;
2433}
2434
2435
2438
2439 (void)jenv;
2440 (void)jcls;
2441 arg1 = *(operations_research::MPSolverParameters **)&jarg1;
2442 delete arg1;
2443}
2444
2445
2447 jlong jresult = 0 ;
2449
2450 (void)jenv;
2451 (void)jcls;
2453 *(operations_research::MPModelExportOptions **)&jresult = result;
2454 return jresult;
2455}
2456
2457
2458SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1Obfuscate_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
2460 bool arg2 ;
2461
2462 (void)jenv;
2463 (void)jcls;
2464 (void)jarg1_;
2466 arg2 = jarg2 ? true : false;
2467 if (arg1) (arg1)->obfuscate = arg2;
2468}
2469
2470
2472 jboolean jresult = 0 ;
2474 bool result;
2475
2476 (void)jenv;
2477 (void)jcls;
2478 (void)jarg1_;
2480 result = (bool) ((arg1)->obfuscate);
2481 jresult = (jboolean)result;
2482 return jresult;
2483}
2484
2485
2486SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1LogInvalidNames_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
2488 bool arg2 ;
2489
2490 (void)jenv;
2491 (void)jcls;
2492 (void)jarg1_;
2494 arg2 = jarg2 ? true : false;
2495 if (arg1) (arg1)->log_invalid_names = arg2;
2496}
2497
2498
2500 jboolean jresult = 0 ;
2502 bool result;
2503
2504 (void)jenv;
2505 (void)jcls;
2506 (void)jarg1_;
2508 result = (bool) ((arg1)->log_invalid_names);
2509 jresult = (jboolean)result;
2510 return jresult;
2511}
2512
2513
2514SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1ShowUnusedVariables_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
2516 bool arg2 ;
2517
2518 (void)jenv;
2519 (void)jcls;
2520 (void)jarg1_;
2522 arg2 = jarg2 ? true : false;
2523 if (arg1) (arg1)->show_unused_variables = arg2;
2524}
2525
2526
2528 jboolean jresult = 0 ;
2530 bool result;
2531
2532 (void)jenv;
2533 (void)jcls;
2534 (void)jarg1_;
2536 result = (bool) ((arg1)->show_unused_variables);
2537 jresult = (jboolean)result;
2538 return jresult;
2539}
2540
2541
2542SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1MaxLineLength_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
2544 int arg2 ;
2545
2546 (void)jenv;
2547 (void)jcls;
2548 (void)jarg1_;
2550 arg2 = (int)jarg2;
2551 if (arg1) (arg1)->max_line_length = arg2;
2552}
2553
2554
2556 jint jresult = 0 ;
2558 int result;
2559
2560 (void)jenv;
2561 (void)jcls;
2562 (void)jarg1_;
2564 result = (int) ((arg1)->max_line_length);
2565 jresult = (jint)result;
2566 return jresult;
2567}
2568
2569
2572
2573 (void)jenv;
2574 (void)jcls;
2576 delete arg1;
2577}
2578
2579
2580#ifdef __cplusplus
2581}
2582#endif
2583
#define LOG(severity)
Definition: base/logging.h:416
static jbyteArray MakeJByteArray(JNIEnv *env, const char *a, int size)
Definition: jniutil.h:59
static char * MakeCharArray(JNIEnv *env, jbyteArray a, int *size)
Definition: jniutil.h:47
The class for constraints of a Mathematical Programming (MP) model.
const ::operations_research::MPVariableProto & variable(int index) const
A class to express a linear objective.
This mathematical programming (MP) solver class is the main class though which users build and solve ...
static bool SupportsProblemType(OptimizationProblemType problem_type)
Whether the given problem type is supported (this will depend on the targets that you linked).
static MPSolver * CreateSolver(const std::string &solver_id)
Recommended factory method to create a MPSolver instance, especially in non C++ languages.
ResultStatus
The status of solving the problem.
@ NOT_SOLVED
not been solved yet.
OptimizationProblemType
The type of problems (LP or MIP) that will be solved and the underlying solver (GLOP,...
std::vector< double > ComputeConstraintActivities() const
Advanced usage: compute the "activities" of all constraints, which are the sums of their linear terms...
static double infinity()
Infinity.
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...
bool InterruptSolve()
Interrupts the Solve() execution to terminate processing if possible.
ResultStatus Solve()
Solves the problem using the default parameter values.
BasisStatus
Advanced usage: possible basis status values for a variable and the slack variable of a linear constr...
This class stores parameter settings for LP and MIP solvers.
IncrementalityValues
Advanced usage: Incrementality options.
@ INCREMENTALITY_OFF
Start solve from scratch.
@ INCREMENTALITY_ON
Reuse results from previous solve as much as the underlying solver allows.
ScalingValues
Advanced usage: Scaling options.
static const IncrementalityValues kDefaultIncrementality
DoubleParam
Enumeration of parameters that take continuous values.
@ DUAL_TOLERANCE
Advanced usage: tolerance for dual feasibility of basic solutions.
@ PRIMAL_TOLERANCE
Advanced usage: tolerance for primal feasibility of basic solutions.
@ RELATIVE_MIP_GAP
Limit for relative MIP gap.
static const PresolveValues kDefaultPresolve
IntegerParam
Enumeration of parameters that take integer or categorical values.
@ LP_ALGORITHM
Algorithm to solve linear programs.
@ SCALING
Advanced usage: enable or disable matrix scaling.
@ PRESOLVE
Advanced usage: presolve mode.
@ INCREMENTALITY
Advanced usage: incrementality from one solve to the next.
PresolveValues
For each categorical parameter, enumeration of possible values.
The class for variables of a Mathematical Programming (MP) model.
SharedResponseManager * response
const std::string name
IntVar * var
Definition: expr_array.cc:1874
GRBmodel * model
A C++ wrapper that provides a simple and unified interface to several linear programming and mixed in...
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1index(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_new_1MPSolver(JNIEnv *jenv, jclass jcls, jstring jarg1, jint jarg2)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1minimization(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1INCREMENTALITY_1ON_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1setHint(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobjectArray jarg2, jdoubleArray jarg3)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1CPLEX_1LINEAR_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1kDefaultPresolve_1get(JNIEnv *jenv, jclass jcls)
SWIGINTERN operations_research::MPSolutionResponse operations_research_MPSolver_createSolutionResponseProto(operations_research::MPSolver *self)
SWIGEXPORT jdoubleArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1computeConstraintActivities(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1setOptimizationDirection(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1makeVar(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jboolean jarg4, jstring jarg5)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1value(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1LP_1ALGORITHM_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1basisStatus(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1SCALING_1ON_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1isMip(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1createSolver(JNIEnv *jenv, jclass jcls, jstring jarg1)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1setLb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2)
SWIGINTERN std::string operations_research_MPSolver_loadModelFromProtoWithUniqueNamesOrDie(operations_research::MPSolver *self, operations_research::MPModelProto const &input_model)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1solve_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1objective(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1suppressOutput(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1PRESOLVE_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1BOP_1INTEGER_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1PRESOLVE_1ON_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1makeConstraint_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jstring jarg4)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1SAT_1INTEGER_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1setBounds(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1basisStatus(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1kDefaultPrimalTolerance_1get(JNIEnv *jenv, jclass jcls)
SWIGINTERN bool operations_research_MPSolver_setNumThreads(operations_research::MPSolver *self, int num_theads)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1NOT_1SOLVED_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1getCoefficient(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_)
SWIGEXPORT jobjectArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1variables(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1nodes(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1setIsLazy(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2)
SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1name(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_delete_1MPVariable(JNIEnv *jenv, jclass jcls, jlong jarg1)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1getDoubleParam(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1lb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1setTimeLimit(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2)
SWIGEXPORT jbyteArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1createSolutionResponseProto(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1computeExactConditionNumber(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1GLPK_1LINEAR_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
SWIGINTERN bool operations_research_MPSolver_loadSolutionFromProto(operations_research::MPSolver *self, operations_research::MPSolutionResponse const &response)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1setOffset(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1supportsProblemType(JNIEnv *jenv, jclass jcls, jint jarg1)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1makeBoolVar(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1maximization(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1lb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_delete_1MPModelExportOptions(JNIEnv *jenv, jclass jcls, jlong jarg1)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1solve_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1setCoefficient(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jdouble jarg3)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1setMinimization(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1setInteger(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1setUb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2)
SWIGEXPORT jbyteArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1exportModelToProto(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_new_1MPModelExportOptions(JNIEnv *jenv, jclass jcls)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1ShowUnusedVariables_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1makeNumVar(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jstring jarg4)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1isLazy(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_delete_1MPConstraint(JNIEnv *jenv, jclass jcls, jlong jarg1)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1DUAL_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1SCIP_1MIXED_1INTEGER_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
#define SWIGUNUSED
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1PRESOLVE_1OFF_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1problemType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1GUROBI_1LINEAR_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionCodes code, const char *msg)
@ SWIG_JavaIOException
@ SWIG_JavaArithmeticException
@ SWIG_JavaUnknownError
@ SWIG_JavaRuntimeException
@ SWIG_JavaNullPointerException
@ SWIG_JavaDirectorPureVirtual
@ SWIG_JavaOutOfMemoryError
@ SWIG_JavaIllegalStateException
@ SWIG_JavaIllegalArgumentException
@ SWIG_JavaIndexOutOfBoundsException
SWIGINTERN std::string operations_research_MPSolver_loadModelFromProto(operations_research::MPSolver *self, operations_research::MPModelProto const &input_model)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1BARRIER_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1FREE_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1loadSolutionFromProto(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_delete_1MPSolverParameters(JNIEnv *jenv, jclass jcls, jlong jarg1)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1index(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1setSolverSpecificParametersAsString(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1Obfuscate_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1constraint(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1setDoubleParam(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jdouble jarg3)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1XPRESS_1MIXED_1INTEGER_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1CPLEX_1MIXED_1INTEGER_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1CLP_1LINEAR_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1infinity(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1offset(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1ub(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1DUAL_1TOLERANCE_1get(JNIEnv *jenv, jclass jcls)
SWIGINTERN std::string operations_research_MPSolver_exportModelAsMpsFormat__SWIG_0(operations_research::MPSolver *self, operations_research::MPModelExportOptions const &options=operations_research::MPModelExportOptions())
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1numConstraints(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_delete_1MPSolver(JNIEnv *jenv, jclass jcls, jlong jarg1)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1INCREMENTALITY_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1LogInvalidNames_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
#define SWIGINTERN
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1reset(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1MaxLineLength_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1GLOP_1LINEAR_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jbyteArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1solveWithProto(JNIEnv *jenv, jclass jcls, jbyteArray jarg1)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1ub(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1exportModelAsLpFormat_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1makeConstraint_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1lookupConstraintOrNull(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2)
SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1loadModelFromProto(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2)
SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1exportModelAsMpsFormat_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_)
SWIGINTERN void operations_research_MPSolver_setHint(operations_research::MPSolver *self, std::vector< operations_research::MPVariable * > const &variables, std::vector< double > const &values)
SWIGINTERN operations_research::MPSolutionResponse operations_research_MPSolver_solveWithProto(operations_research::MPModelRequest const &model_request)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1kDefaultRelativeMipGap_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1clear(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1Obfuscate_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1CBC_1MIXED_1INTEGER_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1setNumThreads(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2)
SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1loadModelFromProtoWithUniqueNamesOrDie(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1kDefaultDualTolerance_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1ShowUnusedVariables_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1makeIntVar(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jstring jarg4)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1RELATIVE_1MIP_1GAP_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1setLb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2)
SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1exportModelAsMpsFormat_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1makeConstraint_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1solutionValue(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1interruptSolve(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1XPRESS_1LINEAR_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1PRIMAL_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1variable(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1kDefaultIncrementality_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1INCREMENTALITY_1OFF_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1PRIMAL_1TOLERANCE_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1SCALING_1OFF_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1setIntegerParam(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1reducedCost(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1makeConstraint_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3)
SWIGEXPORT jobjectArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1constraints(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1setCoefficient(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jdouble jarg3)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1dualValue(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1setUb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1setBounds(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3)
SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1verifySolution(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jboolean jarg3)
SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1exportModelAsLpFormat_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1LogInvalidNames_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_new_1MPSolverParameters(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1getCoefficient(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_)
#define SWIGEXPORT
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1enableOutput(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGINTERN std::string operations_research_MPSolver_exportModelAsLpFormat__SWIG_0(operations_research::MPSolver *self, operations_research::MPModelExportOptions const &options=operations_research::MPModelExportOptions())
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1clear(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1name(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1GUROBI_1MIXED_1INTEGER_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1SCALING_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1wallTime(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1getIntegerParam(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1GLPK_1MIXED_1INTEGER_1PROGRAMMING_1get(JNIEnv *jenv, jclass jcls)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1lookupVariableOrNull(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2)
SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1bestBound(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_delete_1MPObjective(JNIEnv *jenv, jclass jcls, jlong jarg1)
SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1numVariables(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGINTERN operations_research::MPModelProto operations_research_MPSolver_exportModelToProto(operations_research::MPSolver *self)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1setMaximization(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1iterations(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_)
SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1MaxLineLength_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2)
const int FATAL
Definition: log_severity.h:32
int NumVariables(const VariablesProto &variables)
int NumConstraints(const LinearConstraintsProto &linear_constraints)
IntegerValue GetCoefficient(const IntegerVariable var, const LinearExpression &expr)
std::function< int64_t(const Model &)> Value(IntegerVariable v)
Definition: integer.h:1544
absl::StatusOr< std::string > ExportModelAsMpsFormat(const MPModelProto &model, const MPModelExportOptions &options)
Outputs the current model (variables, constraints, objective) as a string encoded in MPS file format,...
absl::StatusOr< std::string > ExportModelAsLpFormat(const MPModelProto &model, const MPModelExportOptions &options)
Outputs the current model (variables, constraints, objective) as a string encoded in the so-called "C...
int index
Definition: pack.cc:509
int nodes
SWIG_JavaExceptionCodes code