public final class Variable extends Object
Optimisation.Constraint, Optimisation.Integration<M extends Optimisation.Model,S extends Optimisation.Solver>, Optimisation.Model, Optimisation.Objective, Optimisation.Options, Optimisation.Result, Optimisation.Solver, Optimisation.State| Modifier | Constructor and Description |
|---|---|
|
Variable(String name) |
protected |
Variable(Variable variableToCopy) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendLeftPart(StringBuilder builder) |
protected void |
appendMiddlePart(StringBuilder aStringBuilder) |
protected void |
appendRightPart(StringBuilder builder) |
Variable |
binary() |
int |
compareTo(Variable obj) |
Variable |
copy() |
protected void |
destroy() |
boolean |
equals(Object obj) |
double |
getAdjustedLowerLimit() |
double |
getAdjustedUpperLimit() |
protected int |
getAdjustmentExponent() |
double |
getAdjustmentFactor() |
BigDecimal |
getContributionWeight()
The weight/factor by which this model entity's value contributes to the objective function - may
return null.
|
BigDecimal |
getLowerLimit()
The lower limit/bound - may return null.
|
BigDecimal |
getLowerSlack() |
String |
getName() |
double |
getUnadjustedLowerLimit() |
double |
getUnadjustedUpperLimit() |
BigDecimal |
getUpperLimit()
The upper limit/bound - may return null.
|
BigDecimal |
getUpperSlack() |
BigDecimal |
getValue() |
int |
hashCode() |
Variable |
integer(boolean integer) |
boolean |
isBinary()
Variable can only be 0 or 1.
|
boolean |
isConstraint()
The Constraint has a lower or an upper limit actually set (possibly both) - it actually is
constained.
|
boolean |
isContributionWeightSet() |
boolean |
isEqualityConstraint()
The Constraint has both a lower limit and an upper limit, and they are equal.
|
boolean |
isInteger() |
boolean |
isLowerConstraint()
The Constraint has a lower limit, and the upper limit (if it exists) is different.
|
boolean |
isLowerLimitSet() |
boolean |
isNegative() |
boolean |
isObjective() |
boolean |
isPositive() |
boolean |
isUpperConstraint()
The Constraint has an upper limit, and the lower limit (if it exists) is different.
|
boolean |
isUpperLimitSet() |
boolean |
isValueSet() |
ME |
level(Number level) |
ME |
lower(Number lower)
Extremely large (absolute value) values are treated as "no limit" (null) and extremely small values are
treated as exactly 0.0, unless the input number type is
BigDecimal. |
static Variable |
make(String name) |
static Variable |
makeBinary(String name) |
BigDecimal |
quantifyContribution() |
Variable |
relax() |
void |
setInteger(boolean integer) |
void |
setValue(Number value) |
String |
toString() |
ME |
upper(Number upper)
Extremely large (absolute value) values are treated as "no limit" (null) and extremely small values are
treated as exactly 0.0, unless the input number type is
BigDecimal. |
protected boolean |
validate(BasicLogger.Printer appender)
Validate model parameters, like lower and upper limits.
|
protected boolean |
validate(BigDecimal value,
NumberContext context,
BasicLogger.Printer appender) |
ME |
weight(Number weight) |
public Variable(String name)
protected Variable(Variable variableToCopy)
public Variable binary()
getLowerLimit(),
getUpperLimit(),
isInteger(),
isBinary()public final int compareTo(Variable obj)
public Variable copy()
public BigDecimal getLowerSlack()
public BigDecimal getUpperSlack()
public BigDecimal getValue()
public Variable integer(boolean integer)
isInteger()public boolean isBinary()
public boolean isInteger()
public boolean isNegative()
public boolean isPositive()
public boolean isValueSet()
public BigDecimal quantifyContribution()
public Variable relax()
public void setInteger(boolean integer)
public void setValue(Number value)
protected void appendMiddlePart(StringBuilder aStringBuilder)
protected void destroy()
protected boolean validate(BigDecimal value, NumberContext context, BasicLogger.Printer appender)
public final boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public final double getAdjustedLowerLimit()
public final double getAdjustedUpperLimit()
public final double getAdjustmentFactor()
public final BigDecimal getContributionWeight()
Optimisation.ObjectivegetContributionWeight in interface Optimisation.Objectivepublic final BigDecimal getLowerLimit()
Optimisation.ConstraintgetLowerLimit in interface Optimisation.Constraintpublic final String getName()
public final double getUnadjustedLowerLimit()
public final double getUnadjustedUpperLimit()
public final BigDecimal getUpperLimit()
Optimisation.ConstraintgetUpperLimit in interface Optimisation.Constraintpublic final boolean isConstraint()
Optimisation.ConstraintisConstraint in interface Optimisation.Constraintpublic final boolean isContributionWeightSet()
public final boolean isEqualityConstraint()
Optimisation.ConstraintisEqualityConstraint in interface Optimisation.Constraintpublic final boolean isLowerConstraint()
Optimisation.ConstraintisLowerConstraint in interface Optimisation.Constraintpublic final boolean isLowerLimitSet()
public final boolean isObjective()
isObjective in interface Optimisation.Objectivepublic final boolean isUpperConstraint()
Optimisation.ConstraintisUpperConstraint in interface Optimisation.Constraintpublic final boolean isUpperLimitSet()
public final ME level(Number level)
getLowerLimit(),
getUpperLimit()public final ME lower(Number lower)
BigDecimal. BigDecimal values
are always used as they are.public final ME upper(Number upper)
BigDecimal. BigDecimal values
are always used as they are.public final ME weight(Number weight)
getContributionWeight()protected void appendLeftPart(StringBuilder builder)
protected void appendRightPart(StringBuilder builder)
protected final int getAdjustmentExponent()
protected final boolean validate(BasicLogger.Printer appender)
Copyright © 2018 Optimatika. All rights reserved.