MPSolver.java
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 4.0.0
4  *
5  * Do not make changes to this file unless you know what you are doing--modify
6  * the SWIG interface file instead.
7  * ----------------------------------------------------------------------------- */
8 
9 package com.google.ortools.linearsolver;
10 
11 import java.lang.reflect.*;
12 
17 public class MPSolver {
18  private transient long swigCPtr;
19  protected transient boolean swigCMemOwn;
20 
21  protected MPSolver(long cPtr, boolean cMemoryOwn) {
22  swigCMemOwn = cMemoryOwn;
23  swigCPtr = cPtr;
24  }
25 
26  protected static long getCPtr(MPSolver obj) {
27  return (obj == null) ? 0 : obj.swigCPtr;
28  }
29 
30  @SuppressWarnings("deprecation")
31  protected void finalize() {
32  delete();
33  }
34 
35  public synchronized void delete() {
36  if (swigCPtr != 0) {
37  if (swigCMemOwn) {
38  swigCMemOwn = false;
39  main_research_linear_solverJNI.delete_MPSolver(swigCPtr);
40  }
41  swigCPtr = 0;
42  }
43  }
44 
45  public MPVariable[] makeVarArray(int count, double lb, double ub, boolean integer) {
46  MPVariable[] array = new MPVariable[count];
47  for (int i = 0; i < count; ++i) {
48  array[i] = makeVar(lb, ub, integer, "");
49  }
50  return array;
51  }
52 
53  public MPVariable[] makeVarArray(int count, double lb, double ub, boolean integer,
54  String var_name) {
55  MPVariable[] array = new MPVariable[count];
56  for (int i = 0; i < count; ++i) {
57  array[i] = makeVar(lb, ub, integer, var_name + i);
58  }
59  return array;
60  }
61 
62  public MPVariable[] makeNumVarArray(int count, double lb, double ub) {
63  return makeVarArray(count, lb, ub, false);
64  }
65 
66  public MPVariable[] makeNumVarArray(int count, double lb, double ub, String var_name) {
67  return makeVarArray(count, lb, ub, false, var_name);
68  }
69 
70  public MPVariable[] makeIntVarArray(int count, double lb, double ub) {
71  return makeVarArray(count, lb, ub, true);
72  }
73 
74  public MPVariable[] makeIntVarArray(int count, double lb, double ub, String var_name) {
75  return makeVarArray(count, lb, ub, true, var_name);
76  }
77 
78  public MPVariable[] makeBoolVarArray(int count) {
79  return makeVarArray(count, 0.0, 1.0, true);
80  }
81 
82  public MPVariable[] makeBoolVarArray(int count, String var_name) {
83  return makeVarArray(count, 0.0, 1.0, true, var_name);
84  }
85 
89  public MPSolver(String name, MPSolver.OptimizationProblemType problem_type) {
90  this(main_research_linear_solverJNI.new_MPSolver(name, problem_type.swigValue()), true);
91  }
92 
97  public static boolean supportsProblemType(MPSolver.OptimizationProblemType problem_type) {
98  return main_research_linear_solverJNI.MPSolver_supportsProblemType(problem_type.swigValue());
99  }
100 
106  public void clear() {
107  main_research_linear_solverJNI.MPSolver_clear(swigCPtr, this);
108  }
109 
113  public int numVariables() {
114  return main_research_linear_solverJNI.MPSolver_numVariables(swigCPtr, this);
115  }
116 
121  public MPVariable[] variables() {
122  return main_research_linear_solverJNI.MPSolver_variables(swigCPtr, this);
123 }
124 
130  public MPVariable lookupVariableOrNull(String var_name) {
131  long cPtr = main_research_linear_solverJNI.MPSolver_lookupVariableOrNull(swigCPtr, this, var_name);
132  return (cPtr == 0) ? null : new MPVariable(cPtr, false);
133  }
134 
142  public MPVariable makeVar(double lb, double ub, boolean integer, String name) {
143  long cPtr = main_research_linear_solverJNI.MPSolver_makeVar(swigCPtr, this, lb, ub, integer, name);
144  return (cPtr == 0) ? null : new MPVariable(cPtr, false);
145  }
146 
150  public MPVariable makeNumVar(double lb, double ub, String name) {
151  long cPtr = main_research_linear_solverJNI.MPSolver_makeNumVar(swigCPtr, this, lb, ub, name);
152  return (cPtr == 0) ? null : new MPVariable(cPtr, false);
153  }
154 
158  public MPVariable makeIntVar(double lb, double ub, String name) {
159  long cPtr = main_research_linear_solverJNI.MPSolver_makeIntVar(swigCPtr, this, lb, ub, name);
160  return (cPtr == 0) ? null : new MPVariable(cPtr, false);
161  }
162 
166  public MPVariable makeBoolVar(String name) {
167  long cPtr = main_research_linear_solverJNI.MPSolver_makeBoolVar(swigCPtr, this, name);
168  return (cPtr == 0) ? null : new MPVariable(cPtr, false);
169  }
170 
174  public int numConstraints() {
175  return main_research_linear_solverJNI.MPSolver_numConstraints(swigCPtr, this);
176  }
177 
184  return main_research_linear_solverJNI.MPSolver_constraints(swigCPtr, this);
185 }
186 
194  public MPConstraint lookupConstraintOrNull(String constraint_name) {
195  long cPtr = main_research_linear_solverJNI.MPSolver_lookupConstraintOrNull(swigCPtr, this, constraint_name);
196  return (cPtr == 0) ? null : new MPConstraint(cPtr, false);
197  }
198 
207  public MPConstraint makeConstraint(double lb, double ub) {
208  long cPtr = main_research_linear_solverJNI.MPSolver_makeConstraint__SWIG_0(swigCPtr, this, lb, ub);
209  return (cPtr == 0) ? null : new MPConstraint(cPtr, false);
210  }
211 
216  long cPtr = main_research_linear_solverJNI.MPSolver_makeConstraint__SWIG_1(swigCPtr, this);
217  return (cPtr == 0) ? null : new MPConstraint(cPtr, false);
218  }
219 
223  public MPConstraint makeConstraint(double lb, double ub, String name) {
224  long cPtr = main_research_linear_solverJNI.MPSolver_makeConstraint__SWIG_2(swigCPtr, this, lb, ub, name);
225  return (cPtr == 0) ? null : new MPConstraint(cPtr, false);
226  }
227 
231  public MPConstraint makeConstraint(String name) {
232  long cPtr = main_research_linear_solverJNI.MPSolver_makeConstraint__SWIG_3(swigCPtr, this, name);
233  return (cPtr == 0) ? null : new MPConstraint(cPtr, false);
234  }
235 
240  long cPtr = main_research_linear_solverJNI.MPSolver_objective(swigCPtr, this);
241  return (cPtr == 0) ? null : new MPObjective(cPtr, false);
242  }
243 
248  return MPSolver.ResultStatus.swigToEnum(main_research_linear_solverJNI.MPSolver_solve__SWIG_0(swigCPtr, this));
249  }
250 
255  return MPSolver.ResultStatus.swigToEnum(main_research_linear_solverJNI.MPSolver_solve__SWIG_1(swigCPtr, this, MPSolverParameters.getCPtr(param), param));
256  }
257 
264  public double[] computeConstraintActivities() {
265  return main_research_linear_solverJNI.MPSolver_computeConstraintActivities(swigCPtr, this);
266 }
267 
286  public boolean verifySolution(double tolerance, boolean log_errors) {
287  return main_research_linear_solverJNI.MPSolver_verifySolution(swigCPtr, this, tolerance, log_errors);
288  }
289 
298  public void reset() {
299  main_research_linear_solverJNI.MPSolver_reset(swigCPtr, this);
300  }
301 
310  public boolean interruptSolve() {
311  return main_research_linear_solverJNI.MPSolver_interruptSolve(swigCPtr, this);
312  }
313 
345  public SWIGTYPE_p_util__Status loadSolutionFromProto(com.google.ortools.linearsolver.MPSolutionResponse response, double tolerance) {
346  return new SWIGTYPE_p_util__Status(main_research_linear_solverJNI.MPSolver_loadSolutionFromProto__SWIG_0(swigCPtr, this, response.toByteArray(), tolerance), true);
347  }
348 
380  public SWIGTYPE_p_util__Status loadSolutionFromProto(com.google.ortools.linearsolver.MPSolutionResponse response) {
381  return new SWIGTYPE_p_util__Status(main_research_linear_solverJNI.MPSolver_loadSolutionFromProto__SWIG_1(swigCPtr, this, response.toByteArray()), true);
382  }
383 
394  public boolean setSolverSpecificParametersAsString(String parameters) {
395  return main_research_linear_solverJNI.MPSolver_setSolverSpecificParametersAsString(swigCPtr, this, parameters);
396  }
397 
403  public static double infinity() {
404  return main_research_linear_solverJNI.MPSolver_infinity();
405  }
406 
410  public void enableOutput() {
411  main_research_linear_solverJNI.MPSolver_enableOutput(swigCPtr, this);
412  }
413 
417  public void suppressOutput() {
418  main_research_linear_solverJNI.MPSolver_suppressOutput(swigCPtr, this);
419  }
420 
424  public long iterations() {
425  return main_research_linear_solverJNI.MPSolver_iterations(swigCPtr, this);
426  }
427 
433  public long nodes() {
434  return main_research_linear_solverJNI.MPSolver_nodes(swigCPtr, this);
435  }
436 
461  public double computeExactConditionNumber() {
462  return main_research_linear_solverJNI.MPSolver_computeExactConditionNumber(swigCPtr, this);
463  }
464 
465  public void setTimeLimit(long time_limit_milliseconds) {
466  main_research_linear_solverJNI.MPSolver_setTimeLimit(swigCPtr, this, time_limit_milliseconds);
467  }
468 
469  public long wallTime() {
470  return main_research_linear_solverJNI.MPSolver_wallTime(swigCPtr, this);
471  }
472 
474  return main_research_linear_solverJNI.MPSolver_loadModelFromProto(swigCPtr, this, input_model.toByteArray());
475  }
476 
478  return main_research_linear_solverJNI.MPSolver_loadModelFromProtoWithUniqueNamesOrDie(swigCPtr, this, input_model.toByteArray());
479  }
480 
482  byte[] buf = main_research_linear_solverJNI.MPSolver_exportModelToProto(swigCPtr, this);
483  if (buf == null || buf.length == 0) {
484  return null;
485  }
486  try {
488  } catch (com.google.protobuf.InvalidProtocolBufferException e) {
489  throw new RuntimeException(
490  "Unable to parse com.google.ortools.linearsolver.MPModelProto protocol message.");
491  }
492 }
493 
495  byte[] buf = main_research_linear_solverJNI.MPSolver_createSolutionResponseProto(swigCPtr, this);
496  if (buf == null || buf.length == 0) {
497  return null;
498  }
499  try {
501  } catch (com.google.protobuf.InvalidProtocolBufferException e) {
502  throw new RuntimeException(
503  "Unable to parse com.google.ortools.linearsolver.MPSolutionResponse protocol message.");
504  }
505 }
506 
508  byte[] buf = main_research_linear_solverJNI.MPSolver_solveWithProto(model_request.toByteArray());
509  if (buf == null || buf.length == 0) {
510  return null;
511  }
512  try {
514  } catch (com.google.protobuf.InvalidProtocolBufferException e) {
515  throw new RuntimeException(
516  "Unable to parse com.google.ortools.linearsolver.MPSolutionResponse protocol message.");
517  }
518 }
519 
521  return main_research_linear_solverJNI.MPSolver_exportModelAsLpFormat__SWIG_0(swigCPtr, this, MPModelExportOptions.getCPtr(options), options);
522  }
523 
524  public String exportModelAsLpFormat() {
525  return main_research_linear_solverJNI.MPSolver_exportModelAsLpFormat__SWIG_1(swigCPtr, this);
526  }
527 
529  return main_research_linear_solverJNI.MPSolver_exportModelAsMpsFormat__SWIG_0(swigCPtr, this, MPModelExportOptions.getCPtr(options), options);
530  }
531 
532  public String exportModelAsMpsFormat() {
533  return main_research_linear_solverJNI.MPSolver_exportModelAsMpsFormat__SWIG_1(swigCPtr, this);
534  }
535 
539  public void setHint(MPVariable[] variables, double[] values) {
540  main_research_linear_solverJNI.MPSolver_setHint(swigCPtr, this, variables, values);
541  }
542 
546  public boolean setNumThreads(int num_theads) {
547  return main_research_linear_solverJNI.MPSolver_setNumThreads(swigCPtr, this, num_theads);
548  }
549 
560  CLP_LINEAR_PROGRAMMING(main_research_linear_solverJNI.MPSolver_CLP_LINEAR_PROGRAMMING_get()),
564  GLOP_LINEAR_PROGRAMMING(main_research_linear_solverJNI.MPSolver_GLOP_LINEAR_PROGRAMMING_get()),
568  CBC_MIXED_INTEGER_PROGRAMMING(main_research_linear_solverJNI.MPSolver_CBC_MIXED_INTEGER_PROGRAMMING_get()),
572  BOP_INTEGER_PROGRAMMING(main_research_linear_solverJNI.MPSolver_BOP_INTEGER_PROGRAMMING_get());
573 
574  public final int swigValue() {
575  return swigValue;
576  }
577 
578  public static OptimizationProblemType swigToEnum(int swigValue) {
579  OptimizationProblemType[] swigValues = OptimizationProblemType.class.getEnumConstants();
580  if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
581  return swigValues[swigValue];
582  for (OptimizationProblemType swigEnum : swigValues)
583  if (swigEnum.swigValue == swigValue)
584  return swigEnum;
585  throw new IllegalArgumentException("No enum " + OptimizationProblemType.class + " with value " + swigValue);
586  }
587 
588  @SuppressWarnings("unused")
589  private OptimizationProblemType() {
590  this.swigValue = SwigNext.next++;
591  }
592 
593  @SuppressWarnings("unused")
594  private OptimizationProblemType(int swigValue) {
595  this.swigValue = swigValue;
596  SwigNext.next = swigValue+1;
597  }
598 
599  @SuppressWarnings("unused")
600  private OptimizationProblemType(OptimizationProblemType swigEnum) {
601  this.swigValue = swigEnum.swigValue;
602  SwigNext.next = this.swigValue+1;
603  }
604 
605  private final int swigValue;
606 
607  private static class SwigNext {
608  private static int next = 0;
609  }
610  }
611 
618  public enum ResultStatus {
642  NOT_SOLVED(main_research_linear_solverJNI.MPSolver_NOT_SOLVED_get());
643 
644  public final int swigValue() {
645  return swigValue;
646  }
647 
648  public static ResultStatus swigToEnum(int swigValue) {
649  ResultStatus[] swigValues = ResultStatus.class.getEnumConstants();
650  if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
651  return swigValues[swigValue];
652  for (ResultStatus swigEnum : swigValues)
653  if (swigEnum.swigValue == swigValue)
654  return swigEnum;
655  throw new IllegalArgumentException("No enum " + ResultStatus.class + " with value " + swigValue);
656  }
657 
658  @SuppressWarnings("unused")
659  private ResultStatus() {
660  this.swigValue = SwigNext.next++;
661  }
662 
663  @SuppressWarnings("unused")
664  private ResultStatus(int swigValue) {
665  this.swigValue = swigValue;
666  SwigNext.next = swigValue+1;
667  }
668 
669  @SuppressWarnings("unused")
670  private ResultStatus(ResultStatus swigEnum) {
671  this.swigValue = swigEnum.swigValue;
672  SwigNext.next = this.swigValue+1;
673  }
674 
675  private final int swigValue;
676 
677  private static class SwigNext {
678  private static int next = 0;
679  }
680  }
681 
686  public enum BasisStatus {
687  FREE(main_research_linear_solverJNI.MPSolver_FREE_get()),
688  AT_LOWER_BOUND,
689  AT_UPPER_BOUND,
690  FIXED_VALUE,
691  BASIC;
692 
693  public final int swigValue() {
694  return swigValue;
695  }
696 
697  public static BasisStatus swigToEnum(int swigValue) {
698  BasisStatus[] swigValues = BasisStatus.class.getEnumConstants();
699  if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
700  return swigValues[swigValue];
701  for (BasisStatus swigEnum : swigValues)
702  if (swigEnum.swigValue == swigValue)
703  return swigEnum;
704  throw new IllegalArgumentException("No enum " + BasisStatus.class + " with value " + swigValue);
705  }
706 
707  @SuppressWarnings("unused")
708  private BasisStatus() {
709  this.swigValue = SwigNext.next++;
710  }
711 
712  @SuppressWarnings("unused")
713  private BasisStatus(int swigValue) {
714  this.swigValue = swigValue;
715  SwigNext.next = swigValue+1;
716  }
717 
718  @SuppressWarnings("unused")
719  private BasisStatus(BasisStatus swigEnum) {
720  this.swigValue = swigEnum.swigValue;
721  SwigNext.next = this.swigValue+1;
722  }
723 
724  private final int swigValue;
725 
726  private static class SwigNext {
727  private static int next = 0;
728  }
729  }
730 
731 }
com.google.ortools.linearsolver.MPSolutionResponse createSolutionResponseProto()
Definition: MPSolver.java:494
CBC_MIXED_INTEGER_PROGRAMMING
Mixed integer Programming Solver using Coin CBC.
Definition: MPSolver.java:568
com.google.ortools.linearsolver.MPModelProto exportModelToProto()
Definition: MPSolver.java:481
The class for variables of a Mathematical Programming (MP) model.
Definition: MPVariable.java:16
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.nio.ByteBuffer data)
static double infinity()
Infinity.
Definition: MPSolver.java:403
MPVariable [] makeVarArray(int count, double lb, double ub, boolean integer, String var_name)
Definition: MPSolver.java:53
MPVariable [] makeNumVarArray(int count, double lb, double ub, String var_name)
Definition: MPSolver.java:66
boolean setNumThreads(int num_theads)
Sets the number of threads to be used by the solver.
Definition: MPSolver.java:546
boolean interruptSolve()
Interrupts the Solve() execution to terminate processing if possible.
Definition: MPSolver.java:310
MPVariable makeIntVar(double lb, double ub, String name)
Creates an integer variable.
Definition: MPSolver.java:158
String loadModelFromProtoWithUniqueNamesOrDie(com.google.ortools.linearsolver.MPModelProto input_model)
Definition: MPSolver.java:477
void setHint(MPVariable[] variables, double[] values)
Sets a hint for solution.
Definition: MPSolver.java:539
MPConstraint makeConstraint(String name)
Creates a named constraint with -infinity and +infinity bounds.
Definition: MPSolver.java:231
MPConstraint makeConstraint(double lb, double ub, String name)
Creates a named constraint with given bounds.
Definition: MPSolver.java:223
void setTimeLimit(long time_limit_milliseconds)
Definition: MPSolver.java:465
MPVariable [] makeBoolVarArray(int count)
Definition: MPSolver.java:78
The class for constraints of a Mathematical Programming (MP) model.
String exportModelAsLpFormat(MPModelExportOptions options)
Definition: MPSolver.java:520
static com.google.ortools.linearsolver.MPSolutionResponse solveWithProto(com.google.ortools.linearsolver.MPModelRequest model_request)
Definition: MPSolver.java:507
static BasisStatus swigToEnum(int swigValue)
Definition: MPSolver.java:697
MPConstraint [] constraints()
Returns the array of constraints handled by the MPSolver.
Definition: MPSolver.java:183
MPVariable [] makeIntVarArray(int count, double lb, double ub)
Definition: MPSolver.java:70
MPSolver.ResultStatus solve()
Solves the problem using default parameter values.
Definition: MPSolver.java:247
MPVariable [] makeVarArray(int count, double lb, double ub, boolean integer)
Definition: MPSolver.java:45
int numConstraints()
Returns the number of constraints.
Definition: MPSolver.java:174
SWIGTYPE_p_util__Status loadSolutionFromProto(com.google.ortools.linearsolver.MPSolutionResponse response)
Load a solution encoded in a protocol buffer onto this solver for easy access via the MPSolver inter...
Definition: MPSolver.java:380
MPConstraint makeConstraint(double lb, double ub)
Creates a linear constraint with given bounds.
Definition: MPSolver.java:207
MPSolver(long cPtr, boolean cMemoryOwn)
Definition: MPSolver.java:21
This mathematical programming (MP) solver class is the main class though which users build and solve...
Definition: MPSolver.java:17
MPVariable [] makeBoolVarArray(int count, String var_name)
Definition: MPSolver.java:82
double [] computeConstraintActivities()
Advanced usage: compute the "activities" of all constraints, which are the sums of their linear term...
Definition: MPSolver.java:264
long iterations()
Returns the number of simplex iterations.
Definition: MPSolver.java:424
MPSolver(String name, MPSolver.OptimizationProblemType problem_type)
Create a solver with the given name and underlying solver backend.
Definition: MPSolver.java:89
MPConstraint makeConstraint()
Creates a constraint with -infinity and +infinity bounds.
Definition: MPSolver.java:215
MPVariable [] makeIntVarArray(int count, double lb, double ub, String var_name)
Definition: MPSolver.java:74
MPSolver.ResultStatus solve(MPSolverParameters param)
Solves the problem using the specified parameter values.
Definition: MPSolver.java:254
String exportModelAsMpsFormat(MPModelExportOptions options)
Definition: MPSolver.java:528
static ResultStatus swigToEnum(int swigValue)
Definition: MPSolver.java:648
The type of problems (LP or MIP) that will be solved and the underlying solver (GLOP,...
Definition: MPSolver.java:556
static boolean supportsProblemType(MPSolver.OptimizationProblemType problem_type)
Whether the given problem type is supported (this will depend on the targets that you linked).
Definition: MPSolver.java:97
long nodes()
Returns the number of branch-and-bound nodes evaluated during the solve.
Definition: MPSolver.java:433
Advanced usage: possible basis status values for a variable and the slack variable of a linear const...
Definition: MPSolver.java:686
This class stores parameter settings for LP and MIP solvers.
MPVariable makeVar(double lb, double ub, boolean integer, String name)
Creates a variable with the given bounds, integrality requirement and name.
Definition: MPSolver.java:142
boolean setSolverSpecificParametersAsString(String parameters)
Advanced usage: pass solver specific parameters in text format.
Definition: MPSolver.java:394
ABNORMAL
abnormal, i.e., error of some kind.
Definition: MPSolver.java:638
void clear()
Clears the objective (including the optimization direction), all variables and constraints.
Definition: MPSolver.java:106
boolean verifySolution(double tolerance, boolean log_errors)
Advanced usage: Verifies the correctness of the solution.
Definition: MPSolver.java:286
String loadModelFromProto(com.google.ortools.linearsolver.MPModelProto input_model)
Definition: MPSolver.java:473
MPVariable [] variables()
Returns the array of variables handled by the MPSolver.
Definition: MPSolver.java:121
GLOP_LINEAR_PROGRAMMING
Linear Programming solver using GLOP (Recommended solver).
Definition: MPSolver.java:564
A class to express a linear objective.
void reset()
Advanced usage: resets extracted model to solve from scratch.
Definition: MPSolver.java:298
MPObjective objective()
Returns the mutable objective object.
Definition: MPSolver.java:239
int numVariables()
Returns the number of variables.
Definition: MPSolver.java:113
CLP_LINEAR_PROGRAMMING
Linear Programming solver using Coin CBC.
Definition: MPSolver.java:560
MPVariable makeNumVar(double lb, double ub, String name)
Creates a continuous variable.
Definition: MPSolver.java:150
MPConstraint lookupConstraintOrNull(String constraint_name)
Looks up a constraint by name, and returns nullptr if it does not exist.
Definition: MPSolver.java:194
void suppressOutput()
Suppress output.
Definition: MPSolver.java:417
MPVariable [] makeNumVarArray(int count, double lb, double ub)
Definition: MPSolver.java:62
MPVariable makeBoolVar(String name)
Creates a boolean variable.
Definition: MPSolver.java:166
SWIGTYPE_p_util__Status loadSolutionFromProto(com.google.ortools.linearsolver.MPSolutionResponse response, double tolerance)
Load a solution encoded in a protocol buffer onto this solver for easy access via the MPSolver inter...
Definition: MPSolver.java:345
static OptimizationProblemType swigToEnum(int swigValue)
Definition: MPSolver.java:578
static com.google.ortools.linearsolver.MPModelProto parseFrom(java.nio.ByteBuffer data)
MPVariable lookupVariableOrNull(String var_name)
Looks up a variable by name, and returns nullptr if it does not exist.
Definition: MPSolver.java:130
double computeExactConditionNumber()
Advanced usage: computes the exact condition number of the current scaled basis: L1norm(B) * L1norm(...
Definition: MPSolver.java:461