Uses of Class
com.google.ortools.linearsolver.MPVariable
-
Packages that use MPVariable Package Description com.google.ortools.linearsolver -
-
Uses of MPVariable in com.google.ortools.linearsolver
Methods in com.google.ortools.linearsolver that return MPVariable Modifier and Type Method Description MPVariableMPSolver. lookupVariableOrNull(java.lang.String var_name)Looks up a variable by name, and returns nullptr if it does not exist.MPVariableMPSolver. makeBoolVar(java.lang.String name)Creates a boolean variable.MPVariable[]MPSolver. makeBoolVarArray(int count)MPVariable[]MPSolver. makeBoolVarArray(int count, java.lang.String var_name)MPVariableMPSolver. makeIntVar(double lb, double ub, java.lang.String name)Creates an integer variable.MPVariable[]MPSolver. makeIntVarArray(int count, double lb, double ub)MPVariable[]MPSolver. makeIntVarArray(int count, double lb, double ub, java.lang.String var_name)MPVariableMPSolver. makeNumVar(double lb, double ub, java.lang.String name)Creates a continuous variable.MPVariable[]MPSolver. makeNumVarArray(int count, double lb, double ub)MPVariable[]MPSolver. makeNumVarArray(int count, double lb, double ub, java.lang.String var_name)MPVariableMPSolver. makeVar(double lb, double ub, boolean integer, java.lang.String name)Creates a variable with the given bounds, integrality requirement and
name.MPVariable[]MPSolver. makeVarArray(int count, double lb, double ub, boolean integer)Creates and returns an array of variables.MPVariable[]MPSolver. makeVarArray(int count, double lb, double ub, boolean integer, java.lang.String var_name)Creates and returns an array of named variables.static MPVariable[]mainJNI. MPSolver_variables(long jarg1, MPSolver jarg1_)MPVariableMPSolver. variable(int index)Returns the variable at position index.MPVariable[]MPSolver. variables()Returns the array of variables handled by the MPSolver.Methods in com.google.ortools.linearsolver with parameters of type MPVariable Modifier and Type Method Description doubleMPConstraint. 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).doubleMPObjective. 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 longMPVariable. getCPtr(MPVariable obj)static doublemainJNI. MPConstraint_getCoefficient(long jarg1, MPConstraint jarg1_, long jarg2, MPVariable jarg2_)static voidmainJNI. MPConstraint_setCoefficient(long jarg1, MPConstraint jarg1_, long jarg2, MPVariable jarg2_, double jarg3)static doublemainJNI. MPObjective_getCoefficient(long jarg1, MPObjective jarg1_, long jarg2, MPVariable jarg2_)static voidmainJNI. MPObjective_setCoefficient(long jarg1, MPObjective jarg1_, long jarg2, MPVariable jarg2_, double jarg3)static voidmainJNI. MPSolver_setHint(long jarg1, MPSolver jarg1_, MPVariable[] jarg2, double[] jarg3)static intmainJNI. MPVariable_basisStatus(long jarg1, MPVariable jarg1_)static intmainJNI. MPVariable_index(long jarg1, MPVariable jarg1_)static doublemainJNI. MPVariable_lb(long jarg1, MPVariable jarg1_)static java.lang.StringmainJNI. MPVariable_name(long jarg1, MPVariable jarg1_)static doublemainJNI. MPVariable_reducedCost(long jarg1, MPVariable jarg1_)static voidmainJNI. MPVariable_setBounds(long jarg1, MPVariable jarg1_, double jarg2, double jarg3)static voidmainJNI. MPVariable_setInteger(long jarg1, MPVariable jarg1_, boolean jarg2)static voidmainJNI. MPVariable_setLb(long jarg1, MPVariable jarg1_, double jarg2)static voidmainJNI. MPVariable_setUb(long jarg1, MPVariable jarg1_, double jarg2)static doublemainJNI. MPVariable_solutionValue(long jarg1, MPVariable jarg1_)static doublemainJNI. MPVariable_ub(long jarg1, MPVariable jarg1_)voidMPConstraint. 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.voidMPObjective. 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.voidMPSolver. 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 longMPVariable. swigRelease(MPVariable obj)
-