Uses of Class
com.google.ortools.linearsolver.MPVariable
Packages that use MPVariable
-
Uses of MPVariable in com.google.ortools.linearsolver
Methods in com.google.ortools.linearsolver that return MPVariableModifier and TypeMethodDescriptionMPSolver.lookupVariableOrNull
(String var_name) Looks up a variable by name, and returns nullptr if it does not exist.MPSolver.makeBoolVar
(String name) Creates a boolean variable.MPSolver.makeBoolVarArray
(int count) MPSolver.makeBoolVarArray
(int count, String var_name) MPSolver.makeIntVar
(double lb, double ub, String name) Creates an integer variable.MPSolver.makeIntVarArray
(int count, double lb, double ub) MPSolver.makeIntVarArray
(int count, double lb, double ub, String var_name) MPSolver.makeNumVar
(double lb, double ub, String name) Creates a continuous variable.MPSolver.makeNumVarArray
(int count, double lb, double ub) MPSolver.makeNumVarArray
(int count, double lb, double ub, String var_name) Creates a variable with the given bounds, integrality requirement and
name.MPSolver.makeVarArray
(int count, double lb, double ub, boolean integer) Creates and returns an array of variables.MPSolver.makeVarArray
(int count, double lb, double ub, boolean integer, String var_name) Creates and returns an array of named variables.static final MPVariable[]
mainJNI.MPSolver_variables
(long jarg1, MPSolver jarg1_) MPSolver.variable
(int index) Returns the variable at position index.MPSolver.variables()
Returns the array of variables handled by the MPSolver.Methods in com.google.ortools.linearsolver with parameters of type MPVariableModifier and TypeMethodDescriptiondouble
MPConstraint.getCoefficient
(MPVariable var) Gets the coefficient of a given variable on the constraint (which is 0 if
the variable does not appear in the constraint).double
MPObjective.getCoefficient
(MPVariable var) Gets the coefficient of a given variable in the objective
It returns 0 if the variable does not appear in the objective).protected static long
MPVariable.getCPtr
(MPVariable obj) static final double
mainJNI.MPConstraint_getCoefficient
(long jarg1, MPConstraint jarg1_, long jarg2, MPVariable jarg2_) static final void
mainJNI.MPConstraint_setCoefficient
(long jarg1, MPConstraint jarg1_, long jarg2, MPVariable jarg2_, double jarg3) static final double
mainJNI.MPObjective_getCoefficient
(long jarg1, MPObjective jarg1_, long jarg2, MPVariable jarg2_) static final void
mainJNI.MPObjective_setCoefficient
(long jarg1, MPObjective jarg1_, long jarg2, MPVariable jarg2_, double jarg3) static final void
mainJNI.MPSolver_setHint
(long jarg1, MPSolver jarg1_, MPVariable[] jarg2, double[] jarg3) static final int
mainJNI.MPVariable_basisStatus
(long jarg1, MPVariable jarg1_) static final int
mainJNI.MPVariable_index
(long jarg1, MPVariable jarg1_) static final double
mainJNI.MPVariable_lb
(long jarg1, MPVariable jarg1_) static final String
mainJNI.MPVariable_name
(long jarg1, MPVariable jarg1_) static final double
mainJNI.MPVariable_reducedCost
(long jarg1, MPVariable jarg1_) static final void
mainJNI.MPVariable_setBounds
(long jarg1, MPVariable jarg1_, double jarg2, double jarg3) static final void
mainJNI.MPVariable_setInteger
(long jarg1, MPVariable jarg1_, boolean jarg2) static final void
mainJNI.MPVariable_setLb
(long jarg1, MPVariable jarg1_, double jarg2) static final void
mainJNI.MPVariable_setUb
(long jarg1, MPVariable jarg1_, double jarg2) static final double
mainJNI.MPVariable_solutionValue
(long jarg1, MPVariable jarg1_) static final double
mainJNI.MPVariable_ub
(long jarg1, MPVariable jarg1_) void
MPConstraint.setCoefficient
(MPVariable var, double coeff) Sets the coefficient of the variable on the constraint.
If the variable does not belong to the solver, the function just returns,
or crashes in non-opt mode.void
MPObjective.setCoefficient
(MPVariable var, double coeff) Sets the coefficient of the variable in the objective.
If the variable does not belong to the solver, the function just returns,
or crashes in non-opt mode.void
MPSolver.setHint
(MPVariable[] variables, double[] values) Sets a hint for solution.
If a feasible or almost-feasible solution to the problem is already known,
it may be helpful to pass it to the solver so that it can be used.protected static long
MPVariable.swigRelease
(MPVariable obj)