9 package com.google.ortools.linearsolver;
11 import java.lang.reflect.*;
14 private transient long swigCPtr;
17 protected MPSolver(
long cPtr,
boolean cMemoryOwn) {
23 return (obj ==
null) ? 0 : obj.swigCPtr;
30 public synchronized void delete() {
42 for (
int i = 0; i < count; ++i) {
43 array[i] =
makeVar(lb, ub, integer,
"");
51 for (
int i = 0; i < count; ++i) {
52 array[i] =
makeVar(lb, ub, integer, var_name + i);
99 return (cPtr == 0) ? null :
new MPVariable(cPtr,
false);
104 return (cPtr == 0) ? null :
new MPVariable(cPtr,
false);
109 return (cPtr == 0) ? null :
new MPVariable(cPtr,
false);
114 return (cPtr == 0) ? null :
new MPVariable(cPtr,
false);
119 return (cPtr == 0) ? null :
new MPVariable(cPtr,
false);
128 return (cPtr == 0) ? null :
new MPConstraint(cPtr,
false);
133 return (cPtr == 0) ? null :
new MPConstraint(cPtr,
false);
138 return (cPtr == 0) ? null :
new MPConstraint(cPtr,
false);
143 return (cPtr == 0) ? null :
new MPConstraint(cPtr,
false);
148 return (cPtr == 0) ? null :
new MPConstraint(cPtr,
false);
153 return (cPtr == 0) ? null :
new MPObjective(cPtr,
false);
232 public void setHint(SWIGTYPE_p_std__vectorT_operations_research__MPVariable_p_t variables,
double[] values) {
248 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
249 return swigValues[swigValue];
251 if (swigEnum.swigValue == swigValue)
256 @SuppressWarnings(
"unused")
258 this.swigValue = SwigNext.next++;
261 @SuppressWarnings(
"unused")
262 private OptimizationProblemType(
int swigValue) {
263 this.swigValue = swigValue;
264 SwigNext.next = swigValue+1;
267 @SuppressWarnings(
"unused")
268 private OptimizationProblemType(OptimizationProblemType swigEnum) {
269 this.swigValue = swigEnum.swigValue;
270 SwigNext.next = this.swigValue+1;
273 private final int swigValue;
275 private static class SwigNext {
276 private static int next = 0;
294 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
295 return swigValues[swigValue];
297 if (swigEnum.swigValue == swigValue)
299 throw new IllegalArgumentException(
"No enum " +
ResultStatus.class +
" with value " + swigValue);
302 @SuppressWarnings(
"unused")
304 this.swigValue = SwigNext.next++;
307 @SuppressWarnings(
"unused")
308 private ResultStatus(
int swigValue) {
309 this.swigValue = swigValue;
310 SwigNext.next = swigValue+1;
313 @SuppressWarnings(
"unused")
314 private ResultStatus(ResultStatus swigEnum) {
315 this.swigValue = swigEnum.swigValue;
316 SwigNext.next = this.swigValue+1;
319 private final int swigValue;
321 private static class SwigNext {
322 private static int next = 0;
339 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
340 return swigValues[swigValue];
342 if (swigEnum.swigValue == swigValue)
344 throw new IllegalArgumentException(
"No enum " +
BasisStatus.class +
" with value " + swigValue);
347 @SuppressWarnings(
"unused")
349 this.swigValue = SwigNext.next++;
352 @SuppressWarnings(
"unused")
353 private BasisStatus(
int swigValue) {
354 this.swigValue = swigValue;
355 SwigNext.next = swigValue+1;
358 @SuppressWarnings(
"unused")
359 private BasisStatus(BasisStatus swigEnum) {
360 this.swigValue = swigEnum.swigValue;
361 SwigNext.next = this.swigValue+1;
364 private final int swigValue;
366 private static class SwigNext {
367 private static int next = 0;
static final native long MPSolver_iterations(long jarg1, MPSolver jarg1_)
static final native int MPSolver_solve__SWIG_0(long jarg1, MPSolver jarg1_)
static final native int MPSolver_CLP_LINEAR_PROGRAMMING_get()
static final native void MPSolver_suppressOutput(long jarg1, MPSolver jarg1_)
static final native int MPSolver_numConstraints(long jarg1, MPSolver jarg1_)
static final native long MPSolver_makeConstraint__SWIG_1(long jarg1, MPSolver jarg1_)
static final native int MPSolver_FREE_get()
static final native int MPSolver_BOP_INTEGER_PROGRAMMING_get()
static final native long MPSolver_makeConstraint__SWIG_0(long jarg1, MPSolver jarg1_, double jarg2, double jarg3)
static final native String MPSolver_exportModelAsLpFormat__SWIG_1(long jarg1, MPSolver jarg1_)
static final native boolean MPSolver_supportsProblemType(int jarg1)
static final native long MPSolver_makeIntVar(long jarg1, MPSolver jarg1_, double jarg2, double jarg3, String jarg4)
static final native boolean MPSolver_setSolverSpecificParametersAsString(long jarg1, MPSolver jarg1_, String jarg2)
static final native String MPSolver_exportModelAsMpsFormat__SWIG_1(long jarg1, MPSolver jarg1_)
static final native void MPSolver_setTimeLimit(long jarg1, MPSolver jarg1_, long jarg2)
static final native int MPSolver_solve__SWIG_1(long jarg1, MPSolver jarg1_, long jarg2, MPSolverParameters jarg2_)
static final native long MPSolver_makeConstraint__SWIG_2(long jarg1, MPSolver jarg1_, double jarg2, double jarg3, String jarg4)
static final native int MPSolver_NOT_SOLVED_get()
static final native int MPSolver_GLOP_LINEAR_PROGRAMMING_get()
static final native void MPSolver_reset(long jarg1, MPSolver jarg1_)
static final native long MPSolver_makeBoolVar(long jarg1, MPSolver jarg1_, String jarg2)
static final native String MPSolver_exportModelAsMpsFormat__SWIG_0(long jarg1, MPSolver jarg1_, long jarg2, MPModelExportOptions jarg2_)
static final native void MPSolver_enableOutput(long jarg1, MPSolver jarg1_)
static final native double MPSolver_infinity()
static final native long MPSolver_objective(long jarg1, MPSolver jarg1_)
static final native boolean MPSolver_verifySolution(long jarg1, MPSolver jarg1_, double jarg2, boolean jarg3)
static final native long MPSolver_makeConstraint__SWIG_3(long jarg1, MPSolver jarg1_, String jarg2)
static final native int MPSolver_CBC_MIXED_INTEGER_PROGRAMMING_get()
static final native long MPSolver_wallTime(long jarg1, MPSolver jarg1_)
static final native long new_MPSolver(String jarg1, int jarg2)
static final native long MPSolver_lookupVariableOrNull(long jarg1, MPSolver jarg1_, String jarg2)
static final native long MPSolver_makeVar(long jarg1, MPSolver jarg1_, double jarg2, double jarg3, boolean jarg4, String jarg5)
static final native double [] MPSolver_computeConstraintActivities(long jarg1, MPSolver jarg1_)
static final native void MPSolver_clear(long jarg1, MPSolver jarg1_)
static final native long MPSolver_lookupConstraintOrNull(long jarg1, MPSolver jarg1_, String jarg2)
static final native void MPSolver_setHint(long jarg1, MPSolver jarg1_, long jarg2, double[] jarg3)
static final native String MPSolver_exportModelAsLpFormat__SWIG_0(long jarg1, MPSolver jarg1_, long jarg2, MPModelExportOptions jarg2_)
static final native int MPSolver_numVariables(long jarg1, MPSolver jarg1_)
static final native void delete_MPSolver(long jarg1)
static final native long MPSolver_nodes(long jarg1, MPSolver jarg1_)
static final native boolean MPSolver_interruptSolve(long jarg1, MPSolver jarg1_)
static final native long MPSolver_makeNumVar(long jarg1, MPSolver jarg1_, double jarg2, double jarg3, String jarg4)
static final native double MPSolver_computeExactConditionNumber(long jarg1, MPSolver jarg1_)