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 TypeMethodDescriptiondoubleMPConstraint.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 final doublemainJNI.MPConstraint_getCoefficient(long jarg1, MPConstraint jarg1_, long jarg2, MPVariable jarg2_) static final voidmainJNI.MPConstraint_setCoefficient(long jarg1, MPConstraint jarg1_, long jarg2, MPVariable jarg2_, double jarg3) static final doublemainJNI.MPObjective_getCoefficient(long jarg1, MPObjective jarg1_, long jarg2, MPVariable jarg2_) static final voidmainJNI.MPObjective_setCoefficient(long jarg1, MPObjective jarg1_, long jarg2, MPVariable jarg2_, double jarg3) static final voidmainJNI.MPSolver_setHint(long jarg1, MPSolver jarg1_, MPVariable[] jarg2, double[] jarg3) static final intmainJNI.MPVariable_basisStatus(long jarg1, MPVariable jarg1_) static final intmainJNI.MPVariable_index(long jarg1, MPVariable jarg1_) static final doublemainJNI.MPVariable_lb(long jarg1, MPVariable jarg1_) static final StringmainJNI.MPVariable_name(long jarg1, MPVariable jarg1_) static final doublemainJNI.MPVariable_reducedCost(long jarg1, MPVariable jarg1_) static final voidmainJNI.MPVariable_setBounds(long jarg1, MPVariable jarg1_, double jarg2, double jarg3) static final voidmainJNI.MPVariable_setInteger(long jarg1, MPVariable jarg1_, boolean jarg2) static final voidmainJNI.MPVariable_setLb(long jarg1, MPVariable jarg1_, double jarg2) static final voidmainJNI.MPVariable_setUb(long jarg1, MPVariable jarg1_, double jarg2) static final doublemainJNI.MPVariable_solutionValue(long jarg1, MPVariable jarg1_) static final 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)