OR-Tools  9.2
linear_solver_java_wrap.cc
Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
3 * Version 4.0.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#include <cstdint>
239#include <string>
240#include <vector>
241
243
244
245#include <string>
246
247
249
250
251#include "ortools/base/jniutil.h"
252
253
256
258 std::string error_message;
259 self->LoadModelFromProto(input_model, &error_message);
260 return error_message;
261 }
263 std::unordered_set<std::string> names;
264 for (const auto var : input_model.variable()) {
265 if (!var.name().empty() && !names.insert(var.name()).second) {
266 LOG(FATAL) << "found duplicated variable names " + var.name();
267 }
268 }
269 std::string error_message;
270 self->LoadModelFromProtoWithUniqueNamesOrDie(input_model, &error_message);
271 return error_message;
272 }
276 return model;
277 }
281 return response;
282 }
284 const absl::Status status =
286 LOG_IF(ERROR, !status.ok()) << "LoadSolutionFromProto() failed: " << status;
287 return status.ok();
288 }
292 return response;
293 }
297 return ExportModelAsLpFormat(model, options).value_or("");
298 }
302 return ExportModelAsMpsFormat(model, options).value_or("");
303 }
304SWIGINTERN void operations_research_MPSolver_setHint(operations_research::MPSolver *self,std::vector< operations_research::MPVariable * > const &variables,std::vector< double > const &values){
305 if (variables.size() != values.size()) {
306 LOG(FATAL) << "Different number of variables and values when setting "
307 << "hint.";
308 }
309 std::vector<std::pair<const operations_research::MPVariable*, double> >
310 hint(variables.size());
311 for (int i = 0; i < variables.size(); ++i) {
312 hint[i] = std::make_pair(variables[i], values[i]);
313 }
314 self->SetHint(hint);
315 }
317 return self->SetNumThreads(num_theads).ok();
318 }
319
320#ifdef __cplusplus
321extern "C" {
322#endif
323
325 jint jresult = 0 ;
327
328 (void)jenv;
329 (void)jcls;
331 jresult = (jint)result;
332 return jresult;
333}
334
335
337 jint jresult = 0 ;
339
340 (void)jenv;
341 (void)jcls;
343 jresult = (jint)result;
344 return jresult;
345}
346
347
349 jint jresult = 0 ;
351
352 (void)jenv;
353 (void)jcls;
355 jresult = (jint)result;
356 return jresult;
357}
358
359
361 jint jresult = 0 ;
363
364 (void)jenv;
365 (void)jcls;
367 jresult = (jint)result;
368 return jresult;
369}
370
371
373 jint jresult = 0 ;
375
376 (void)jenv;
377 (void)jcls;
379 jresult = (jint)result;
380 return jresult;
381}
382
383
385 jint jresult = 0 ;
387
388 (void)jenv;
389 (void)jcls;
391 jresult = (jint)result;
392 return jresult;
393}
394
395
397 jint jresult = 0 ;
399
400 (void)jenv;
401 (void)jcls;
403 jresult = (jint)result;
404 return jresult;
405}
406
407
409 jint jresult = 0 ;
411
412 (void)jenv;
413 (void)jcls;
415 jresult = (jint)result;
416 return jresult;
417}
418
419
421 jint jresult = 0 ;
423
424 (void)jenv;
425 (void)jcls;
427 jresult = (jint)result;
428 return jresult;
429}
430
431
433 jint jresult = 0 ;
435
436 (void)jenv;
437 (void)jcls;
439 jresult = (jint)result;
440 return jresult;
441}
442
443
445 jint jresult = 0 ;
447
448 (void)jenv;
449 (void)jcls;
451 jresult = (jint)result;
452 return jresult;
453}
454
455
457 jint jresult = 0 ;
459
460 (void)jenv;
461 (void)jcls;
463 jresult = (jint)result;
464 return jresult;
465}
466
467
469 jint jresult = 0 ;
471
472 (void)jenv;
473 (void)jcls;
475 jresult = (jint)result;
476 return jresult;
477}
478
479
481 jint jresult = 0 ;
483
484 (void)jenv;
485 (void)jcls;
487 jresult = (jint)result;
488 return jresult;
489}
490
491
492SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_new_1MPSolver(JNIEnv *jenv, jclass jcls, jstring jarg1, jint jarg2) {
493 jlong jresult = 0 ;
494 std::string *arg1 = 0 ;
497
498 (void)jenv;
499 (void)jcls;
500 if(!jarg1) {
502 return 0;
503 }
504 const char *arg1_pstr = (const char *)jenv->GetStringUTFChars(jarg1, 0);
505 if (!arg1_pstr) return 0;
506 std::string arg1_str(arg1_pstr);
507 arg1 = &arg1_str;
508 jenv->ReleaseStringUTFChars(jarg1, arg1_pstr);
510 result = (operations_research::MPSolver *)new operations_research::MPSolver((std::string const &)*arg1,arg2);
511 *(operations_research::MPSolver **)&jresult = result;
512 return jresult;
513}
514
515
518
519 (void)jenv;
520 (void)jcls;
521 arg1 = *(operations_research::MPSolver **)&jarg1;
522 delete arg1;
523}
524
525
527 jlong jresult = 0 ;
528 std::string *arg1 = 0 ;
530
531 (void)jenv;
532 (void)jcls;
533 if(!jarg1) {
535 return 0;
536 }
537 const char *arg1_pstr = (const char *)jenv->GetStringUTFChars(jarg1, 0);
538 if (!arg1_pstr) return 0;
539 std::string arg1_str(arg1_pstr);
540 arg1 = &arg1_str;
541 jenv->ReleaseStringUTFChars(jarg1, arg1_pstr);
543 *(operations_research::MPSolver **)&jresult = result;
544 return jresult;
545}
546
547
549 jboolean jresult = 0 ;
551 bool result;
552
553 (void)jenv;
554 (void)jcls;
557 jresult = (jboolean)result;
558 return jresult;
559}
560
561
562SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1isMip(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
563 jboolean jresult = 0 ;
565 bool result;
566
567 (void)jenv;
568 (void)jcls;
569 (void)jarg1_;
570 arg1 = *(operations_research::MPSolver **)&jarg1;
571 result = (bool)((operations_research::MPSolver const *)arg1)->IsMIP();
572 jresult = (jboolean)result;
573 return jresult;
574}
575
576
577SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1problemType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
578 jint jresult = 0 ;
581
582 (void)jenv;
583 (void)jcls;
584 (void)jarg1_;
585 arg1 = *(operations_research::MPSolver **)&jarg1;
587 jresult = (jint)result;
588 return jresult;
589}
590
591
592SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1clear(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
594
595 (void)jenv;
596 (void)jcls;
597 (void)jarg1_;
598 arg1 = *(operations_research::MPSolver **)&jarg1;
599 (arg1)->Clear();
600}
601
602
603SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1numVariables(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
604 jint jresult = 0 ;
606 int result;
607
608 (void)jenv;
609 (void)jcls;
610 (void)jarg1_;
611 arg1 = *(operations_research::MPSolver **)&jarg1;
612 result = (int)((operations_research::MPSolver const *)arg1)->NumVariables();
613 jresult = (jint)result;
614 return jresult;
615}
616
617
618SWIGEXPORT jobjectArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1variables(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
619 jobjectArray jresult = 0 ;
621 std::vector< operations_research::MPVariable * > *result = 0 ;
622
623 (void)jenv;
624 (void)jcls;
625 (void)jarg1_;
626 arg1 = *(operations_research::MPSolver **)&jarg1;
627 result = (std::vector< operations_research::MPVariable * > *) &((operations_research::MPSolver const *)arg1)->variables();
628 {
629 if (nullptr == result)
630 return 0;
631 std::string java_class_path ="com/google/ortools/linearsolver" "/""MPVariable";
632 jclass object_class = jenv->FindClass(java_class_path.c_str());
633 if (nullptr == object_class)
634 return 0;
635 jresult = jenv->NewObjectArray(result->size(), object_class, 0);
636 jmethodID ctor = jenv->GetMethodID(object_class,"<init>", "(JZ)V");
637 for (int i = 0; i < result->size(); ++i) {
638 jlong obj_ptr = 0;
639 *((operations_research::MPVariable **)&obj_ptr) = (*result)[i];
640 jobject elem = jenv->NewObject(object_class, ctor, obj_ptr, false);
641 jenv->SetObjectArrayElement(jresult, i, elem);
642 }
643 }
644 return jresult;
645}
646
647
648SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1variable(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
649 jlong jresult = 0 ;
651 int arg2 ;
653
654 (void)jenv;
655 (void)jcls;
656 (void)jarg1_;
657 arg1 = *(operations_research::MPSolver **)&jarg1;
658 arg2 = (int)jarg2;
659 result = (operations_research::MPVariable *)((operations_research::MPSolver const *)arg1)->variable(arg2);
660 *(operations_research::MPVariable **)&jresult = result;
661 return jresult;
662}
663
664
665SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1lookupVariableOrNull(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
666 jlong jresult = 0 ;
668 std::string *arg2 = 0 ;
670
671 (void)jenv;
672 (void)jcls;
673 (void)jarg1_;
674 arg1 = *(operations_research::MPSolver **)&jarg1;
675 if(!jarg2) {
677 return 0;
678 }
679 const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
680 if (!arg2_pstr) return 0;
681 std::string arg2_str(arg2_pstr);
682 arg2 = &arg2_str;
683 jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
684 result = (operations_research::MPVariable *)((operations_research::MPSolver const *)arg1)->LookupVariableOrNull((std::string const &)*arg2);
685 *(operations_research::MPVariable **)&jresult = result;
686 return jresult;
687}
688
689
690SWIGEXPORT 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) {
691 jlong jresult = 0 ;
693 double arg2 ;
694 double arg3 ;
695 bool arg4 ;
696 std::string *arg5 = 0 ;
698
699 (void)jenv;
700 (void)jcls;
701 (void)jarg1_;
702 arg1 = *(operations_research::MPSolver **)&jarg1;
703 arg2 = (double)jarg2;
704 arg3 = (double)jarg3;
705 arg4 = jarg4 ? true : false;
706 if(!jarg5) {
708 return 0;
709 }
710 const char *arg5_pstr = (const char *)jenv->GetStringUTFChars(jarg5, 0);
711 if (!arg5_pstr) return 0;
712 std::string arg5_str(arg5_pstr);
713 arg5 = &arg5_str;
714 jenv->ReleaseStringUTFChars(jarg5, arg5_pstr);
715 result = (operations_research::MPVariable *)(arg1)->MakeVar(arg2,arg3,arg4,(std::string const &)*arg5);
716 *(operations_research::MPVariable **)&jresult = result;
717 return jresult;
718}
719
720
721SWIGEXPORT 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) {
722 jlong jresult = 0 ;
724 double arg2 ;
725 double arg3 ;
726 std::string *arg4 = 0 ;
728
729 (void)jenv;
730 (void)jcls;
731 (void)jarg1_;
732 arg1 = *(operations_research::MPSolver **)&jarg1;
733 arg2 = (double)jarg2;
734 arg3 = (double)jarg3;
735 if(!jarg4) {
737 return 0;
738 }
739 const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0);
740 if (!arg4_pstr) return 0;
741 std::string arg4_str(arg4_pstr);
742 arg4 = &arg4_str;
743 jenv->ReleaseStringUTFChars(jarg4, arg4_pstr);
744 result = (operations_research::MPVariable *)(arg1)->MakeNumVar(arg2,arg3,(std::string const &)*arg4);
745 *(operations_research::MPVariable **)&jresult = result;
746 return jresult;
747}
748
749
750SWIGEXPORT 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) {
751 jlong jresult = 0 ;
753 double arg2 ;
754 double arg3 ;
755 std::string *arg4 = 0 ;
757
758 (void)jenv;
759 (void)jcls;
760 (void)jarg1_;
761 arg1 = *(operations_research::MPSolver **)&jarg1;
762 arg2 = (double)jarg2;
763 arg3 = (double)jarg3;
764 if(!jarg4) {
766 return 0;
767 }
768 const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0);
769 if (!arg4_pstr) return 0;
770 std::string arg4_str(arg4_pstr);
771 arg4 = &arg4_str;
772 jenv->ReleaseStringUTFChars(jarg4, arg4_pstr);
773 result = (operations_research::MPVariable *)(arg1)->MakeIntVar(arg2,arg3,(std::string const &)*arg4);
774 *(operations_research::MPVariable **)&jresult = result;
775 return jresult;
776}
777
778
779SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1makeBoolVar(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
780 jlong jresult = 0 ;
782 std::string *arg2 = 0 ;
784
785 (void)jenv;
786 (void)jcls;
787 (void)jarg1_;
788 arg1 = *(operations_research::MPSolver **)&jarg1;
789 if(!jarg2) {
791 return 0;
792 }
793 const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
794 if (!arg2_pstr) return 0;
795 std::string arg2_str(arg2_pstr);
796 arg2 = &arg2_str;
797 jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
798 result = (operations_research::MPVariable *)(arg1)->MakeBoolVar((std::string const &)*arg2);
799 *(operations_research::MPVariable **)&jresult = result;
800 return jresult;
801}
802
803
805 jint jresult = 0 ;
807 int result;
808
809 (void)jenv;
810 (void)jcls;
811 (void)jarg1_;
812 arg1 = *(operations_research::MPSolver **)&jarg1;
813 result = (int)((operations_research::MPSolver const *)arg1)->NumConstraints();
814 jresult = (jint)result;
815 return jresult;
816}
817
818
819SWIGEXPORT jobjectArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1constraints(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
820 jobjectArray jresult = 0 ;
822 std::vector< operations_research::MPConstraint * > *result = 0 ;
823
824 (void)jenv;
825 (void)jcls;
826 (void)jarg1_;
827 arg1 = *(operations_research::MPSolver **)&jarg1;
828 result = (std::vector< operations_research::MPConstraint * > *) &((operations_research::MPSolver const *)arg1)->constraints();
829 {
830 if (nullptr == result)
831 return 0;
832 std::string java_class_path ="com/google/ortools/linearsolver" "/""MPConstraint";
833 jclass object_class = jenv->FindClass(java_class_path.c_str());
834 if (nullptr == object_class)
835 return 0;
836 jresult = jenv->NewObjectArray(result->size(), object_class, 0);
837 jmethodID ctor = jenv->GetMethodID(object_class,"<init>", "(JZ)V");
838 for (int i = 0; i < result->size(); ++i) {
839 jlong obj_ptr = 0;
840 *((operations_research::MPConstraint **)&obj_ptr) = (*result)[i];
841 jobject elem = jenv->NewObject(object_class, ctor, obj_ptr, false);
842 jenv->SetObjectArrayElement(jresult, i, elem);
843 }
844 }
845 return jresult;
846}
847
848
849SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1constraint(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
850 jlong jresult = 0 ;
852 int arg2 ;
854
855 (void)jenv;
856 (void)jcls;
857 (void)jarg1_;
858 arg1 = *(operations_research::MPSolver **)&jarg1;
859 arg2 = (int)jarg2;
860 result = (operations_research::MPConstraint *)((operations_research::MPSolver const *)arg1)->constraint(arg2);
861 *(operations_research::MPConstraint **)&jresult = result;
862 return jresult;
863}
864
865
866SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1lookupConstraintOrNull(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
867 jlong jresult = 0 ;
869 std::string *arg2 = 0 ;
871
872 (void)jenv;
873 (void)jcls;
874 (void)jarg1_;
875 arg1 = *(operations_research::MPSolver **)&jarg1;
876 if(!jarg2) {
878 return 0;
879 }
880 const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
881 if (!arg2_pstr) return 0;
882 std::string arg2_str(arg2_pstr);
883 arg2 = &arg2_str;
884 jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
885 result = (operations_research::MPConstraint *)((operations_research::MPSolver const *)arg1)->LookupConstraintOrNull((std::string const &)*arg2);
886 *(operations_research::MPConstraint **)&jresult = result;
887 return jresult;
888}
889
890
891SWIGEXPORT 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) {
892 jlong jresult = 0 ;
894 double arg2 ;
895 double arg3 ;
897
898 (void)jenv;
899 (void)jcls;
900 (void)jarg1_;
901 arg1 = *(operations_research::MPSolver **)&jarg1;
902 arg2 = (double)jarg2;
903 arg3 = (double)jarg3;
904 result = (operations_research::MPConstraint *)(arg1)->MakeRowConstraint(arg2,arg3);
905 *(operations_research::MPConstraint **)&jresult = result;
906 return jresult;
907}
908
909
911 jlong jresult = 0 ;
914
915 (void)jenv;
916 (void)jcls;
917 (void)jarg1_;
918 arg1 = *(operations_research::MPSolver **)&jarg1;
919 result = (operations_research::MPConstraint *)(arg1)->MakeRowConstraint();
920 *(operations_research::MPConstraint **)&jresult = result;
921 return jresult;
922}
923
924
925SWIGEXPORT 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) {
926 jlong jresult = 0 ;
928 double arg2 ;
929 double arg3 ;
930 std::string *arg4 = 0 ;
932
933 (void)jenv;
934 (void)jcls;
935 (void)jarg1_;
936 arg1 = *(operations_research::MPSolver **)&jarg1;
937 arg2 = (double)jarg2;
938 arg3 = (double)jarg3;
939 if(!jarg4) {
941 return 0;
942 }
943 const char *arg4_pstr = (const char *)jenv->GetStringUTFChars(jarg4, 0);
944 if (!arg4_pstr) return 0;
945 std::string arg4_str(arg4_pstr);
946 arg4 = &arg4_str;
947 jenv->ReleaseStringUTFChars(jarg4, arg4_pstr);
948 result = (operations_research::MPConstraint *)(arg1)->MakeRowConstraint(arg2,arg3,(std::string const &)*arg4);
949 *(operations_research::MPConstraint **)&jresult = result;
950 return jresult;
951}
952
953
954SWIGEXPORT 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) {
955 jlong jresult = 0 ;
957 std::string *arg2 = 0 ;
959
960 (void)jenv;
961 (void)jcls;
962 (void)jarg1_;
963 arg1 = *(operations_research::MPSolver **)&jarg1;
964 if(!jarg2) {
966 return 0;
967 }
968 const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
969 if (!arg2_pstr) return 0;
970 std::string arg2_str(arg2_pstr);
971 arg2 = &arg2_str;
972 jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
973 result = (operations_research::MPConstraint *)(arg1)->MakeRowConstraint((std::string const &)*arg2);
974 *(operations_research::MPConstraint **)&jresult = result;
975 return jresult;
976}
977
978
979SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1objective(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
980 jlong jresult = 0 ;
983
984 (void)jenv;
985 (void)jcls;
986 (void)jarg1_;
987 arg1 = *(operations_research::MPSolver **)&jarg1;
988 result = (operations_research::MPObjective *)(arg1)->MutableObjective();
989 *(operations_research::MPObjective **)&jresult = result;
990 return jresult;
991}
992
993
995 jint jresult = 0 ;
997
998 (void)jenv;
999 (void)jcls;
1001 jresult = (jint)result;
1002 return jresult;
1003}
1004
1005
1007 jint jresult = 0 ;
1010
1011 (void)jenv;
1012 (void)jcls;
1013 (void)jarg1_;
1014 arg1 = *(operations_research::MPSolver **)&jarg1;
1016 jresult = (jint)result;
1017 return jresult;
1018}
1019
1020
1021SWIGEXPORT 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_) {
1022 jint jresult = 0 ;
1026
1027 (void)jenv;
1028 (void)jcls;
1029 (void)jarg1_;
1030 (void)jarg2_;
1031 arg1 = *(operations_research::MPSolver **)&jarg1;
1032 arg2 = *(operations_research::MPSolverParameters **)&jarg2;
1033 if (!arg2) {
1034 SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "operations_research::MPSolverParameters const & reference is null");
1035 return 0;
1036 }
1038 jresult = (jint)result;
1039 return jresult;
1040}
1041
1042
1044 jdoubleArray jresult = 0 ;
1046 std::vector< double > result;
1047
1048 (void)jenv;
1049 (void)jcls;
1050 (void)jarg1_;
1051 arg1 = *(operations_research::MPSolver **)&jarg1;
1053
1054 const std::vector<double>& vec = result;
1055 jresult = jenv->NewDoubleArray(vec.size());
1056 jenv->SetDoubleArrayRegion(jresult, 0, vec.size(), reinterpret_cast<const jdouble*>(vec.data()));
1057
1058 return jresult;
1059}
1060
1061
1062SWIGEXPORT 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) {
1063 jboolean jresult = 0 ;
1065 double arg2 ;
1066 bool arg3 ;
1067 bool result;
1068
1069 (void)jenv;
1070 (void)jcls;
1071 (void)jarg1_;
1072 arg1 = *(operations_research::MPSolver **)&jarg1;
1073 arg2 = (double)jarg2;
1074 arg3 = jarg3 ? true : false;
1075 result = (bool)((operations_research::MPSolver const *)arg1)->VerifySolution(arg2,arg3);
1076 jresult = (jboolean)result;
1077 return jresult;
1078}
1079
1080
1081SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1reset(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1083
1084 (void)jenv;
1085 (void)jcls;
1086 (void)jarg1_;
1087 arg1 = *(operations_research::MPSolver **)&jarg1;
1088 (arg1)->Reset();
1089}
1090
1091
1092SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1interruptSolve(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1093 jboolean jresult = 0 ;
1095 bool result;
1096
1097 (void)jenv;
1098 (void)jcls;
1099 (void)jarg1_;
1100 arg1 = *(operations_research::MPSolver **)&jarg1;
1101 result = (bool)(arg1)->InterruptSolve();
1102 jresult = (jboolean)result;
1103 return jresult;
1104}
1105
1106
1107SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1setSolverSpecificParametersAsString(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
1108 jboolean jresult = 0 ;
1110 std::string *arg2 = 0 ;
1111 bool result;
1112
1113 (void)jenv;
1114 (void)jcls;
1115 (void)jarg1_;
1116 arg1 = *(operations_research::MPSolver **)&jarg1;
1117 if(!jarg2) {
1119 return 0;
1120 }
1121 const char *arg2_pstr = (const char *)jenv->GetStringUTFChars(jarg2, 0);
1122 if (!arg2_pstr) return 0;
1123 std::string arg2_str(arg2_pstr);
1124 arg2 = &arg2_str;
1125 jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
1126 result = (bool)(arg1)->SetSolverSpecificParametersAsString((std::string const &)*arg2);
1127 jresult = (jboolean)result;
1128 return jresult;
1129}
1130
1131
1133 jint jresult = 0 ;
1135
1136 (void)jenv;
1137 (void)jcls;
1139 jresult = (jint)result;
1140 return jresult;
1141}
1142
1143
1145 jdouble jresult = 0 ;
1146 double result;
1147
1148 (void)jenv;
1149 (void)jcls;
1150 result = (double)operations_research::MPSolver::infinity();
1151 jresult = (jdouble)result;
1152 return jresult;
1153}
1154
1155
1156SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1enableOutput(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1158
1159 (void)jenv;
1160 (void)jcls;
1161 (void)jarg1_;
1162 arg1 = *(operations_research::MPSolver **)&jarg1;
1163 (arg1)->EnableOutput();
1164}
1165
1166
1169
1170 (void)jenv;
1171 (void)jcls;
1172 (void)jarg1_;
1173 arg1 = *(operations_research::MPSolver **)&jarg1;
1174 (arg1)->SuppressOutput();
1175}
1176
1177
1178SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1iterations(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1179 jlong jresult = 0 ;
1181 int64_t result;
1182
1183 (void)jenv;
1184 (void)jcls;
1185 (void)jarg1_;
1186 arg1 = *(operations_research::MPSolver **)&jarg1;
1187 result = (int64_t)((operations_research::MPSolver const *)arg1)->iterations();
1188 jresult = (jlong)result;
1189 return jresult;
1190}
1191
1192
1193SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1nodes(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1194 jlong jresult = 0 ;
1196 int64_t result;
1197
1198 (void)jenv;
1199 (void)jcls;
1200 (void)jarg1_;
1201 arg1 = *(operations_research::MPSolver **)&jarg1;
1202 result = (int64_t)((operations_research::MPSolver const *)arg1)->nodes();
1203 jresult = (jlong)result;
1204 return jresult;
1205}
1206
1207
1209 jdouble jresult = 0 ;
1211 double result;
1212
1213 (void)jenv;
1214 (void)jcls;
1215 (void)jarg1_;
1216 arg1 = *(operations_research::MPSolver **)&jarg1;
1217 result = (double)((operations_research::MPSolver const *)arg1)->ComputeExactConditionNumber();
1218 jresult = (jdouble)result;
1219 return jresult;
1220}
1221
1222
1223SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1setTimeLimit(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
1225 int64_t arg2 ;
1226
1227 (void)jenv;
1228 (void)jcls;
1229 (void)jarg1_;
1230 arg1 = *(operations_research::MPSolver **)&jarg1;
1231 arg2 = (int64_t)jarg2;
1232 (arg1)->set_time_limit(arg2);
1233}
1234
1235
1236SWIGEXPORT jlong JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1wallTime(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1237 jlong jresult = 0 ;
1239 int64_t result;
1240
1241 (void)jenv;
1242 (void)jcls;
1243 (void)jarg1_;
1244 arg1 = *(operations_research::MPSolver **)&jarg1;
1245 result = (int64_t)((operations_research::MPSolver const *)arg1)->wall_time();
1246 jresult = (jlong)result;
1247 return jresult;
1248}
1249
1250
1251SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1loadModelFromProto(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2) {
1252 jstring jresult = 0 ;
1256 std::string result;
1257
1258 (void)jenv;
1259 (void)jcls;
1260 (void)jarg1_;
1261 arg1 = *(operations_research::MPSolver **)&jarg1;
1262 {
1263 int proto_size = 0;
1264 std::unique_ptr<char[]> proto_buffer(
1265 JNIUtil::MakeCharArray(jenv, jarg2, &proto_size));
1266 bool parsed_ok = temp2.ParseFromArray(proto_buffer.get(), proto_size);
1267 if (!parsed_ok) {
1270 "Unable to parse operations_research::MPModelProto protocol message.");
1271 }
1272 arg2 = &temp2;
1273 }
1275 jresult = jenv->NewStringUTF((&result)->c_str());
1276 return jresult;
1277}
1278
1279
1280SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1loadModelFromProtoWithUniqueNamesOrDie(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2) {
1281 jstring jresult = 0 ;
1285 std::string result;
1286
1287 (void)jenv;
1288 (void)jcls;
1289 (void)jarg1_;
1290 arg1 = *(operations_research::MPSolver **)&jarg1;
1291 {
1292 int proto_size = 0;
1293 std::unique_ptr<char[]> proto_buffer(
1294 JNIUtil::MakeCharArray(jenv, jarg2, &proto_size));
1295 bool parsed_ok = temp2.ParseFromArray(proto_buffer.get(), proto_size);
1296 if (!parsed_ok) {
1299 "Unable to parse operations_research::MPModelProto protocol message.");
1300 }
1301 arg2 = &temp2;
1302 }
1304 jresult = jenv->NewStringUTF((&result)->c_str());
1305 return jresult;
1306}
1307
1308
1309SWIGEXPORT jbyteArray JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1exportModelToProto(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1310 jbyteArray jresult = 0 ;
1313
1314 (void)jenv;
1315 (void)jcls;
1316 (void)jarg1_;
1317 arg1 = *(operations_research::MPSolver **)&jarg1;
1319 {
1320 const long size = (&result)->ByteSizeLong();
1321 std::unique_ptr<char[]> buf(new char[size]);
1322 (&result)->SerializeWithCachedSizesToArray(reinterpret_cast<uint8_t*>(buf.get()));
1323 jresult = JNIUtil::MakeJByteArray(jenv, buf.get(), size);
1324 }
1325 return jresult;
1326}
1327
1328
1330 jbyteArray jresult = 0 ;
1333
1334 (void)jenv;
1335 (void)jcls;
1336 (void)jarg1_;
1337 arg1 = *(operations_research::MPSolver **)&jarg1;
1339 {
1340 const long size = (&result)->ByteSizeLong();
1341 std::unique_ptr<char[]> buf(new char[size]);
1342 (&result)->SerializeWithCachedSizesToArray(reinterpret_cast<uint8_t*>(buf.get()));
1343 jresult = JNIUtil::MakeJByteArray(jenv, buf.get(), size);
1344 }
1345 return jresult;
1346}
1347
1348
1349SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1loadSolutionFromProto(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2) {
1350 jboolean jresult = 0 ;
1354 bool result;
1355
1356 (void)jenv;
1357 (void)jcls;
1358 (void)jarg1_;
1359 arg1 = *(operations_research::MPSolver **)&jarg1;
1360 {
1361 int proto_size = 0;
1362 std::unique_ptr<char[]> proto_buffer(
1363 JNIUtil::MakeCharArray(jenv, jarg2, &proto_size));
1364 bool parsed_ok = temp2.ParseFromArray(proto_buffer.get(), proto_size);
1365 if (!parsed_ok) {
1368 "Unable to parse operations_research::MPSolutionResponse protocol message.");
1369 }
1370 arg2 = &temp2;
1371 }
1373 jresult = (jboolean)result;
1374 return jresult;
1375}
1376
1377
1379 jbyteArray jresult = 0 ;
1383
1384 (void)jenv;
1385 (void)jcls;
1386 {
1387 int proto_size = 0;
1388 std::unique_ptr<char[]> proto_buffer(
1389 JNIUtil::MakeCharArray(jenv, jarg1, &proto_size));
1390 bool parsed_ok = temp1.ParseFromArray(proto_buffer.get(), proto_size);
1391 if (!parsed_ok) {
1394 "Unable to parse operations_research::MPModelRequest protocol message.");
1395 }
1396 arg1 = &temp1;
1397 }
1399 {
1400 const long size = (&result)->ByteSizeLong();
1401 std::unique_ptr<char[]> buf(new char[size]);
1402 (&result)->SerializeWithCachedSizesToArray(reinterpret_cast<uint8_t*>(buf.get()));
1403 jresult = JNIUtil::MakeJByteArray(jenv, buf.get(), size);
1404 }
1405 return jresult;
1406}
1407
1408
1409SWIGEXPORT 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_) {
1410 jstring jresult = 0 ;
1413 std::string result;
1414
1415 (void)jenv;
1416 (void)jcls;
1417 (void)jarg1_;
1418 (void)jarg2_;
1419 arg1 = *(operations_research::MPSolver **)&jarg1;
1421 if (!arg2) {
1422 SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "operations_research::MPModelExportOptions const & reference is null");
1423 return 0;
1424 }
1426 jresult = jenv->NewStringUTF((&result)->c_str());
1427 return jresult;
1428}
1429
1430
1432 jstring jresult = 0 ;
1434 std::string result;
1435
1436 (void)jenv;
1437 (void)jcls;
1438 (void)jarg1_;
1439 arg1 = *(operations_research::MPSolver **)&jarg1;
1441 jresult = jenv->NewStringUTF((&result)->c_str());
1442 return jresult;
1443}
1444
1445
1446SWIGEXPORT 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_) {
1447 jstring jresult = 0 ;
1450 std::string result;
1451
1452 (void)jenv;
1453 (void)jcls;
1454 (void)jarg1_;
1455 (void)jarg2_;
1456 arg1 = *(operations_research::MPSolver **)&jarg1;
1458 if (!arg2) {
1459 SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "operations_research::MPModelExportOptions const & reference is null");
1460 return 0;
1461 }
1463 jresult = jenv->NewStringUTF((&result)->c_str());
1464 return jresult;
1465}
1466
1467
1469 jstring jresult = 0 ;
1471 std::string result;
1472
1473 (void)jenv;
1474 (void)jcls;
1475 (void)jarg1_;
1476 arg1 = *(operations_research::MPSolver **)&jarg1;
1478 jresult = jenv->NewStringUTF((&result)->c_str());
1479 return jresult;
1480}
1481
1482
1483SWIGEXPORT 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) {
1485 std::vector< operations_research::MPVariable * > *arg2 = 0 ;
1486 std::vector< double > *arg3 = 0 ;
1487 std::vector< operations_research::MPVariable * > result2 ;
1488
1489 (void)jenv;
1490 (void)jcls;
1491 (void)jarg1_;
1492 arg1 = *(operations_research::MPSolver **)&jarg1;
1493 {
1494 std::string java_class_path ="com/google/ortools/linearsolver" "/""MPVariable";
1495 jclass object_class = jenv->FindClass(java_class_path.c_str());
1496 if (nullptr == object_class)
1497 return ;
1498 jmethodID method_id =
1499 jenv->GetStaticMethodID(
1500 object_class, "getCPtr",
1501 std::string("(L" + java_class_path + ";)J").c_str());
1502 assert(method_id != nullptr);
1503 for (int i = 0; i < jenv->GetArrayLength(jarg2); i++) {
1504 jobject elem = jenv->GetObjectArrayElement(jarg2, i);
1505 jlong ptr_value = jenv->CallStaticLongMethod(object_class, method_id, elem);
1506 result2.push_back(/*@SWIG:ortools/util/java/vector.i,286,REINTERPRET_CAST@*/
1507 reinterpret_cast<operations_research::MPVariable*>(ptr_value)
1508 /*@SWIG@*/);
1509 }
1510 arg2 = &result2;
1511 }
1512
1513 if(jarg3) {
1514 arg3 = new std::vector<double>;
1515 const int size = jenv->GetArrayLength(jarg3);
1516 arg3->reserve(size);
1517 jdouble *values = jenv->GetDoubleArrayElements((jdoubleArray)jarg3, NULL);
1518 for (int i = 0; i < size; ++i) {
1519 arg3->emplace_back(values[i]);
1520 }
1521 jenv->ReleaseDoubleArrayElements((jdoubleArray)jarg3, values, JNI_ABORT);
1522 }
1523 else {
1525 return ;
1526 }
1527
1528 operations_research_MPSolver_setHint(arg1,(std::vector< operations_research::MPVariable * > const &)*arg2,(std::vector< double > const &)*arg3);
1529 {
1530 delete arg3;
1531 }
1532}
1533
1534
1535SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolver_1setNumThreads(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
1536 jboolean jresult = 0 ;
1538 int arg2 ;
1539 bool result;
1540
1541 (void)jenv;
1542 (void)jcls;
1543 (void)jarg1_;
1544 arg1 = *(operations_research::MPSolver **)&jarg1;
1545 arg2 = (int)jarg2;
1546 result = (bool)operations_research_MPSolver_setNumThreads(arg1,arg2);
1547 jresult = (jboolean)result;
1548 return jresult;
1549}
1550
1551
1552SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1clear(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1554
1555 (void)jenv;
1556 (void)jcls;
1557 (void)jarg1_;
1558 arg1 = *(operations_research::MPObjective **)&jarg1;
1559 (arg1)->Clear();
1560}
1561
1562
1563SWIGEXPORT 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) {
1566 double arg3 ;
1567
1568 (void)jenv;
1569 (void)jcls;
1570 (void)jarg1_;
1571 (void)jarg2_;
1572 arg1 = *(operations_research::MPObjective **)&jarg1;
1573 arg2 = *(operations_research::MPVariable **)&jarg2;
1574 arg3 = (double)jarg3;
1575 (arg1)->SetCoefficient((operations_research::MPVariable const *)arg2,arg3);
1576}
1577
1578
1579SWIGEXPORT 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_) {
1580 jdouble jresult = 0 ;
1583 double result;
1584
1585 (void)jenv;
1586 (void)jcls;
1587 (void)jarg1_;
1588 (void)jarg2_;
1589 arg1 = *(operations_research::MPObjective **)&jarg1;
1590 arg2 = *(operations_research::MPVariable **)&jarg2;
1591 result = (double)((operations_research::MPObjective const *)arg1)->GetCoefficient((operations_research::MPVariable const *)arg2);
1592 jresult = (jdouble)result;
1593 return jresult;
1594}
1595
1596
1597SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1setOffset(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2) {
1599 double arg2 ;
1600
1601 (void)jenv;
1602 (void)jcls;
1603 (void)jarg1_;
1604 arg1 = *(operations_research::MPObjective **)&jarg1;
1605 arg2 = (double)jarg2;
1606 (arg1)->SetOffset(arg2);
1607}
1608
1609
1610SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1offset(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1611 jdouble jresult = 0 ;
1613 double result;
1614
1615 (void)jenv;
1616 (void)jcls;
1617 (void)jarg1_;
1618 arg1 = *(operations_research::MPObjective **)&jarg1;
1619 result = (double)((operations_research::MPObjective const *)arg1)->offset();
1620 jresult = (jdouble)result;
1621 return jresult;
1622}
1623
1624
1625SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1setOptimizationDirection(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
1627 bool arg2 ;
1628
1629 (void)jenv;
1630 (void)jcls;
1631 (void)jarg1_;
1632 arg1 = *(operations_research::MPObjective **)&jarg1;
1633 arg2 = jarg2 ? true : false;
1634 (arg1)->SetOptimizationDirection(arg2);
1635}
1636
1637
1640
1641 (void)jenv;
1642 (void)jcls;
1643 (void)jarg1_;
1644 arg1 = *(operations_research::MPObjective **)&jarg1;
1645 (arg1)->SetMinimization();
1646}
1647
1648
1651
1652 (void)jenv;
1653 (void)jcls;
1654 (void)jarg1_;
1655 arg1 = *(operations_research::MPObjective **)&jarg1;
1656 (arg1)->SetMaximization();
1657}
1658
1659
1660SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1maximization(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1661 jboolean jresult = 0 ;
1663 bool result;
1664
1665 (void)jenv;
1666 (void)jcls;
1667 (void)jarg1_;
1668 arg1 = *(operations_research::MPObjective **)&jarg1;
1669 result = (bool)((operations_research::MPObjective const *)arg1)->maximization();
1670 jresult = (jboolean)result;
1671 return jresult;
1672}
1673
1674
1675SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1minimization(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1676 jboolean jresult = 0 ;
1678 bool result;
1679
1680 (void)jenv;
1681 (void)jcls;
1682 (void)jarg1_;
1683 arg1 = *(operations_research::MPObjective **)&jarg1;
1684 result = (bool)((operations_research::MPObjective const *)arg1)->minimization();
1685 jresult = (jboolean)result;
1686 return jresult;
1687}
1688
1689
1690SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1value(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1691 jdouble jresult = 0 ;
1693 double result;
1694
1695 (void)jenv;
1696 (void)jcls;
1697 (void)jarg1_;
1698 arg1 = *(operations_research::MPObjective **)&jarg1;
1699 result = (double)((operations_research::MPObjective const *)arg1)->Value();
1700 jresult = (jdouble)result;
1701 return jresult;
1702}
1703
1704
1705SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPObjective_1bestBound(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1706 jdouble jresult = 0 ;
1708 double result;
1709
1710 (void)jenv;
1711 (void)jcls;
1712 (void)jarg1_;
1713 arg1 = *(operations_research::MPObjective **)&jarg1;
1714 result = (double)((operations_research::MPObjective const *)arg1)->BestBound();
1715 jresult = (jdouble)result;
1716 return jresult;
1717}
1718
1719
1722
1723 (void)jenv;
1724 (void)jcls;
1725 arg1 = *(operations_research::MPObjective **)&jarg1;
1726 delete arg1;
1727}
1728
1729
1730SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1name(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1731 jstring jresult = 0 ;
1733 std::string *result = 0 ;
1734
1735 (void)jenv;
1736 (void)jcls;
1737 (void)jarg1_;
1738 arg1 = *(operations_research::MPVariable **)&jarg1;
1739 result = (std::string *) &((operations_research::MPVariable const *)arg1)->name();
1740 jresult = jenv->NewStringUTF(result->c_str());
1741 return jresult;
1742}
1743
1744
1745SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1setInteger(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
1747 bool arg2 ;
1748
1749 (void)jenv;
1750 (void)jcls;
1751 (void)jarg1_;
1752 arg1 = *(operations_research::MPVariable **)&jarg1;
1753 arg2 = jarg2 ? true : false;
1754 (arg1)->SetInteger(arg2);
1755}
1756
1757
1758SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1solutionValue(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1759 jdouble jresult = 0 ;
1761 double result;
1762
1763 (void)jenv;
1764 (void)jcls;
1765 (void)jarg1_;
1766 arg1 = *(operations_research::MPVariable **)&jarg1;
1767 result = (double)((operations_research::MPVariable const *)arg1)->solution_value();
1768 jresult = (jdouble)result;
1769 return jresult;
1770}
1771
1772
1773SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1index(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1774 jint jresult = 0 ;
1776 int result;
1777
1778 (void)jenv;
1779 (void)jcls;
1780 (void)jarg1_;
1781 arg1 = *(operations_research::MPVariable **)&jarg1;
1782 result = (int)((operations_research::MPVariable const *)arg1)->index();
1783 jresult = (jint)result;
1784 return jresult;
1785}
1786
1787
1788SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1lb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1789 jdouble jresult = 0 ;
1791 double result;
1792
1793 (void)jenv;
1794 (void)jcls;
1795 (void)jarg1_;
1796 arg1 = *(operations_research::MPVariable **)&jarg1;
1797 result = (double)((operations_research::MPVariable const *)arg1)->lb();
1798 jresult = (jdouble)result;
1799 return jresult;
1800}
1801
1802
1803SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1ub(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1804 jdouble jresult = 0 ;
1806 double result;
1807
1808 (void)jenv;
1809 (void)jcls;
1810 (void)jarg1_;
1811 arg1 = *(operations_research::MPVariable **)&jarg1;
1812 result = (double)((operations_research::MPVariable const *)arg1)->ub();
1813 jresult = (jdouble)result;
1814 return jresult;
1815}
1816
1817
1818SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1setLb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2) {
1820 double arg2 ;
1821
1822 (void)jenv;
1823 (void)jcls;
1824 (void)jarg1_;
1825 arg1 = *(operations_research::MPVariable **)&jarg1;
1826 arg2 = (double)jarg2;
1827 (arg1)->SetLB(arg2);
1828}
1829
1830
1831SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1setUb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2) {
1833 double arg2 ;
1834
1835 (void)jenv;
1836 (void)jcls;
1837 (void)jarg1_;
1838 arg1 = *(operations_research::MPVariable **)&jarg1;
1839 arg2 = (double)jarg2;
1840 (arg1)->SetUB(arg2);
1841}
1842
1843
1844SWIGEXPORT 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) {
1846 double arg2 ;
1847 double arg3 ;
1848
1849 (void)jenv;
1850 (void)jcls;
1851 (void)jarg1_;
1852 arg1 = *(operations_research::MPVariable **)&jarg1;
1853 arg2 = (double)jarg2;
1854 arg3 = (double)jarg3;
1855 (arg1)->SetBounds(arg2,arg3);
1856}
1857
1858
1859SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPVariable_1reducedCost(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1860 jdouble jresult = 0 ;
1862 double result;
1863
1864 (void)jenv;
1865 (void)jcls;
1866 (void)jarg1_;
1867 arg1 = *(operations_research::MPVariable **)&jarg1;
1868 result = (double)((operations_research::MPVariable const *)arg1)->reduced_cost();
1869 jresult = (jdouble)result;
1870 return jresult;
1871}
1872
1873
1875 jint jresult = 0 ;
1878
1879 (void)jenv;
1880 (void)jcls;
1881 (void)jarg1_;
1882 arg1 = *(operations_research::MPVariable **)&jarg1;
1883 result = (operations_research::MPSolver::BasisStatus)((operations_research::MPVariable const *)arg1)->basis_status();
1884 jresult = (jint)result;
1885 return jresult;
1886}
1887
1888
1891
1892 (void)jenv;
1893 (void)jcls;
1894 arg1 = *(operations_research::MPVariable **)&jarg1;
1895 delete arg1;
1896}
1897
1898
1899SWIGEXPORT jstring JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1name(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1900 jstring jresult = 0 ;
1902 std::string *result = 0 ;
1903
1904 (void)jenv;
1905 (void)jcls;
1906 (void)jarg1_;
1907 arg1 = *(operations_research::MPConstraint **)&jarg1;
1908 result = (std::string *) &((operations_research::MPConstraint const *)arg1)->name();
1909 jresult = jenv->NewStringUTF(result->c_str());
1910 return jresult;
1911}
1912
1913
1914SWIGEXPORT 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) {
1917 double arg3 ;
1918
1919 (void)jenv;
1920 (void)jcls;
1921 (void)jarg1_;
1922 (void)jarg2_;
1923 arg1 = *(operations_research::MPConstraint **)&jarg1;
1924 arg2 = *(operations_research::MPVariable **)&jarg2;
1925 arg3 = (double)jarg3;
1926 (arg1)->SetCoefficient((operations_research::MPVariable const *)arg2,arg3);
1927}
1928
1929
1930SWIGEXPORT 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_) {
1931 jdouble jresult = 0 ;
1934 double result;
1935
1936 (void)jenv;
1937 (void)jcls;
1938 (void)jarg1_;
1939 (void)jarg2_;
1940 arg1 = *(operations_research::MPConstraint **)&jarg1;
1941 arg2 = *(operations_research::MPVariable **)&jarg2;
1942 result = (double)((operations_research::MPConstraint const *)arg1)->GetCoefficient((operations_research::MPVariable const *)arg2);
1943 jresult = (jdouble)result;
1944 return jresult;
1945}
1946
1947
1948SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1lb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1949 jdouble jresult = 0 ;
1951 double result;
1952
1953 (void)jenv;
1954 (void)jcls;
1955 (void)jarg1_;
1956 arg1 = *(operations_research::MPConstraint **)&jarg1;
1957 result = (double)((operations_research::MPConstraint const *)arg1)->lb();
1958 jresult = (jdouble)result;
1959 return jresult;
1960}
1961
1962
1963SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1ub(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1964 jdouble jresult = 0 ;
1966 double result;
1967
1968 (void)jenv;
1969 (void)jcls;
1970 (void)jarg1_;
1971 arg1 = *(operations_research::MPConstraint **)&jarg1;
1972 result = (double)((operations_research::MPConstraint const *)arg1)->ub();
1973 jresult = (jdouble)result;
1974 return jresult;
1975}
1976
1977
1978SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1setLb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2) {
1980 double arg2 ;
1981
1982 (void)jenv;
1983 (void)jcls;
1984 (void)jarg1_;
1985 arg1 = *(operations_research::MPConstraint **)&jarg1;
1986 arg2 = (double)jarg2;
1987 (arg1)->SetLB(arg2);
1988}
1989
1990
1991SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1setUb(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2) {
1993 double arg2 ;
1994
1995 (void)jenv;
1996 (void)jcls;
1997 (void)jarg1_;
1998 arg1 = *(operations_research::MPConstraint **)&jarg1;
1999 arg2 = (double)jarg2;
2000 (arg1)->SetUB(arg2);
2001}
2002
2003
2004SWIGEXPORT 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) {
2006 double arg2 ;
2007 double arg3 ;
2008
2009 (void)jenv;
2010 (void)jcls;
2011 (void)jarg1_;
2012 arg1 = *(operations_research::MPConstraint **)&jarg1;
2013 arg2 = (double)jarg2;
2014 arg3 = (double)jarg3;
2015 (arg1)->SetBounds(arg2,arg3);
2016}
2017
2018
2019SWIGEXPORT jboolean JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1isLazy(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
2020 jboolean jresult = 0 ;
2022 bool result;
2023
2024 (void)jenv;
2025 (void)jcls;
2026 (void)jarg1_;
2027 arg1 = *(operations_research::MPConstraint **)&jarg1;
2028 result = (bool)((operations_research::MPConstraint const *)arg1)->is_lazy();
2029 jresult = (jboolean)result;
2030 return jresult;
2031}
2032
2033
2034SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1setIsLazy(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
2036 bool arg2 ;
2037
2038 (void)jenv;
2039 (void)jcls;
2040 (void)jarg1_;
2041 arg1 = *(operations_research::MPConstraint **)&jarg1;
2042 arg2 = jarg2 ? true : false;
2043 (arg1)->set_is_lazy(arg2);
2044}
2045
2046
2047SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1index(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
2048 jint jresult = 0 ;
2050 int result;
2051
2052 (void)jenv;
2053 (void)jcls;
2054 (void)jarg1_;
2055 arg1 = *(operations_research::MPConstraint **)&jarg1;
2056 result = (int)((operations_research::MPConstraint const *)arg1)->index();
2057 jresult = (jint)result;
2058 return jresult;
2059}
2060
2061
2062SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPConstraint_1dualValue(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
2063 jdouble jresult = 0 ;
2065 double result;
2066
2067 (void)jenv;
2068 (void)jcls;
2069 (void)jarg1_;
2070 arg1 = *(operations_research::MPConstraint **)&jarg1;
2071 result = (double)((operations_research::MPConstraint const *)arg1)->dual_value();
2072 jresult = (jdouble)result;
2073 return jresult;
2074}
2075
2076
2078 jint jresult = 0 ;
2081
2082 (void)jenv;
2083 (void)jcls;
2084 (void)jarg1_;
2085 arg1 = *(operations_research::MPConstraint **)&jarg1;
2086 result = (operations_research::MPSolver::BasisStatus)((operations_research::MPConstraint const *)arg1)->basis_status();
2087 jresult = (jint)result;
2088 return jresult;
2089}
2090
2091
2094
2095 (void)jenv;
2096 (void)jcls;
2097 arg1 = *(operations_research::MPConstraint **)&jarg1;
2098 delete arg1;
2099}
2100
2101
2103 jint jresult = 0 ;
2105
2106 (void)jenv;
2107 (void)jcls;
2109 jresult = (jint)result;
2110 return jresult;
2111}
2112
2113
2115 jint jresult = 0 ;
2117
2118 (void)jenv;
2119 (void)jcls;
2121 jresult = (jint)result;
2122 return jresult;
2123}
2124
2125
2127 jint jresult = 0 ;
2129
2130 (void)jenv;
2131 (void)jcls;
2133 jresult = (jint)result;
2134 return jresult;
2135}
2136
2137
2139 jint jresult = 0 ;
2141
2142 (void)jenv;
2143 (void)jcls;
2145 jresult = (jint)result;
2146 return jresult;
2147}
2148
2149
2151 jint jresult = 0 ;
2153
2154 (void)jenv;
2155 (void)jcls;
2157 jresult = (jint)result;
2158 return jresult;
2159}
2160
2161
2163 jint jresult = 0 ;
2165
2166 (void)jenv;
2167 (void)jcls;
2169 jresult = (jint)result;
2170 return jresult;
2171}
2172
2173
2175 jint jresult = 0 ;
2177
2178 (void)jenv;
2179 (void)jcls;
2181 jresult = (jint)result;
2182 return jresult;
2183}
2184
2185
2187 jint jresult = 0 ;
2189
2190 (void)jenv;
2191 (void)jcls;
2193 jresult = (jint)result;
2194 return jresult;
2195}
2196
2197
2199 jint jresult = 0 ;
2201
2202 (void)jenv;
2203 (void)jcls;
2205 jresult = (jint)result;
2206 return jresult;
2207}
2208
2209
2211 jint jresult = 0 ;
2213
2214 (void)jenv;
2215 (void)jcls;
2217 jresult = (jint)result;
2218 return jresult;
2219}
2220
2221
2223 jint jresult = 0 ;
2225
2226 (void)jenv;
2227 (void)jcls;
2229 jresult = (jint)result;
2230 return jresult;
2231}
2232
2233
2235 jint jresult = 0 ;
2237
2238 (void)jenv;
2239 (void)jcls;
2241 jresult = (jint)result;
2242 return jresult;
2243}
2244
2245
2247 jint jresult = 0 ;
2249
2250 (void)jenv;
2251 (void)jcls;
2253 jresult = (jint)result;
2254 return jresult;
2255}
2256
2257
2259 jint jresult = 0 ;
2261
2262 (void)jenv;
2263 (void)jcls;
2265 jresult = (jint)result;
2266 return jresult;
2267}
2268
2269
2271 jint jresult = 0 ;
2273
2274 (void)jenv;
2275 (void)jcls;
2277 jresult = (jint)result;
2278 return jresult;
2279}
2280
2281
2283 jint jresult = 0 ;
2285
2286 (void)jenv;
2287 (void)jcls;
2289 jresult = (jint)result;
2290 return jresult;
2291}
2292
2293
2295 jdouble jresult = 0 ;
2296 double result;
2297
2298 (void)jenv;
2299 (void)jcls;
2301 jresult = (jdouble)result;
2302 return jresult;
2303}
2304
2305
2307 jdouble jresult = 0 ;
2308 double result;
2309
2310 (void)jenv;
2311 (void)jcls;
2313 jresult = (jdouble)result;
2314 return jresult;
2315}
2316
2317
2319 jdouble jresult = 0 ;
2320 double result;
2321
2322 (void)jenv;
2323 (void)jcls;
2325 jresult = (jdouble)result;
2326 return jresult;
2327}
2328
2329
2331 jint jresult = 0 ;
2333
2334 (void)jenv;
2335 (void)jcls;
2337 jresult = (jint)result;
2338 return jresult;
2339}
2340
2341
2343 jint jresult = 0 ;
2345
2346 (void)jenv;
2347 (void)jcls;
2349 jresult = (jint)result;
2350 return jresult;
2351}
2352
2353
2355 jlong jresult = 0 ;
2357
2358 (void)jenv;
2359 (void)jcls;
2361 *(operations_research::MPSolverParameters **)&jresult = result;
2362 return jresult;
2363}
2364
2365
2366SWIGEXPORT 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) {
2369 double arg3 ;
2370
2371 (void)jenv;
2372 (void)jcls;
2373 (void)jarg1_;
2374 arg1 = *(operations_research::MPSolverParameters **)&jarg1;
2376 arg3 = (double)jarg3;
2377 (arg1)->SetDoubleParam(arg2,arg3);
2378}
2379
2380
2381SWIGEXPORT 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) {
2384 int arg3 ;
2385
2386 (void)jenv;
2387 (void)jcls;
2388 (void)jarg1_;
2389 arg1 = *(operations_research::MPSolverParameters **)&jarg1;
2391 arg3 = (int)jarg3;
2392 (arg1)->SetIntegerParam(arg2,arg3);
2393}
2394
2395
2396SWIGEXPORT jdouble JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1getDoubleParam(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
2397 jdouble jresult = 0 ;
2400 double result;
2401
2402 (void)jenv;
2403 (void)jcls;
2404 (void)jarg1_;
2405 arg1 = *(operations_research::MPSolverParameters **)&jarg1;
2407 result = (double)((operations_research::MPSolverParameters const *)arg1)->GetDoubleParam(arg2);
2408 jresult = (jdouble)result;
2409 return jresult;
2410}
2411
2412
2413SWIGEXPORT jint JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPSolverParameters_1getIntegerParam(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
2414 jint jresult = 0 ;
2417 int result;
2418
2419 (void)jenv;
2420 (void)jcls;
2421 (void)jarg1_;
2422 arg1 = *(operations_research::MPSolverParameters **)&jarg1;
2424 result = (int)((operations_research::MPSolverParameters const *)arg1)->GetIntegerParam(arg2);
2425 jresult = (jint)result;
2426 return jresult;
2427}
2428
2429
2432
2433 (void)jenv;
2434 (void)jcls;
2435 arg1 = *(operations_research::MPSolverParameters **)&jarg1;
2436 delete arg1;
2437}
2438
2439
2441 jlong jresult = 0 ;
2443
2444 (void)jenv;
2445 (void)jcls;
2447 *(operations_research::MPModelExportOptions **)&jresult = result;
2448 return jresult;
2449}
2450
2451
2452SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1Obfuscate_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
2454 bool arg2 ;
2455
2456 (void)jenv;
2457 (void)jcls;
2458 (void)jarg1_;
2460 arg2 = jarg2 ? true : false;
2461 if (arg1) (arg1)->obfuscate = arg2;
2462}
2463
2464
2466 jboolean jresult = 0 ;
2468 bool result;
2469
2470 (void)jenv;
2471 (void)jcls;
2472 (void)jarg1_;
2474 result = (bool) ((arg1)->obfuscate);
2475 jresult = (jboolean)result;
2476 return jresult;
2477}
2478
2479
2480SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1LogInvalidNames_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
2482 bool arg2 ;
2483
2484 (void)jenv;
2485 (void)jcls;
2486 (void)jarg1_;
2488 arg2 = jarg2 ? true : false;
2489 if (arg1) (arg1)->log_invalid_names = arg2;
2490}
2491
2492
2494 jboolean jresult = 0 ;
2496 bool result;
2497
2498 (void)jenv;
2499 (void)jcls;
2500 (void)jarg1_;
2502 result = (bool) ((arg1)->log_invalid_names);
2503 jresult = (jboolean)result;
2504 return jresult;
2505}
2506
2507
2508SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1ShowUnusedVariables_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
2510 bool arg2 ;
2511
2512 (void)jenv;
2513 (void)jcls;
2514 (void)jarg1_;
2516 arg2 = jarg2 ? true : false;
2517 if (arg1) (arg1)->show_unused_variables = arg2;
2518}
2519
2520
2522 jboolean jresult = 0 ;
2524 bool result;
2525
2526 (void)jenv;
2527 (void)jcls;
2528 (void)jarg1_;
2530 result = (bool) ((arg1)->show_unused_variables);
2531 jresult = (jboolean)result;
2532 return jresult;
2533}
2534
2535
2536SWIGEXPORT void JNICALL Java_com_google_ortools_linearsolver_main_1research_1linear_1solverJNI_MPModelExportOptions_1MaxLineLength_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
2538 int arg2 ;
2539
2540 (void)jenv;
2541 (void)jcls;
2542 (void)jarg1_;
2544 arg2 = (int)jarg2;
2545 if (arg1) (arg1)->max_line_length = arg2;
2546}
2547
2548
2550 jint jresult = 0 ;
2552 int result;
2553
2554 (void)jenv;
2555 (void)jcls;
2556 (void)jarg1_;
2558 result = (int) ((arg1)->max_line_length);
2559 jresult = (jint)result;
2560 return jresult;
2561}
2562
2563
2566
2567 (void)jenv;
2568 (void)jcls;
2570 delete arg1;
2571}
2572
2573
2574#ifdef __cplusplus
2575}
2576#endif
2577
#define LOG_IF(severity, condition)
Definition: base/logging.h:479
#define LOG(severity)
Definition: base/logging.h:420
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 ...
void FillSolutionResponseProto(MPSolutionResponse *response) const
Encodes the current solution in a solution response protocol buffer.
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.
void SetHint(std::vector< std::pair< const MPVariable *, double > > hint)
Sets a hint for solution.
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,...
absl::Status LoadSolutionFromProto(const MPSolutionResponse &response, double tolerance=std::numeric_limits< double >::infinity())
Load a solution encoded in a protocol buffer onto this solver for easy access via the MPSolver interf...
absl::Status SetNumThreads(int num_threads)
Sets the number of threads to use by the underlying solver.
void ExportModelToProto(MPModelProto *output_model) const
Exports model to protocol buffer.
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...
MPSolverResponseStatus LoadModelFromProto(const MPModelProto &input_model, std::string *error_message)
Loads model from protocol buffer.
bool InterruptSolve()
Interrupts the Solve() execution to terminate processing if possible.
ResultStatus Solve()
Solves the problem using the default parameter values.
MPSolverResponseStatus LoadModelFromProtoWithUniqueNamesOrDie(const MPModelProto &input_model, std::string *error_message)
Loads model from protocol buffer.
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
absl::Status status
Definition: g_gurobi.cc:35
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 ERROR
Definition: log_severity.h:32
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:1673
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