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() |
protected void |
doIntegerRounding() |
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) |
Variable |
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() |
Variable |
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 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 Variable lower(Number lower)
BigDecimal
. BigDecimal
values
are always used as they are.public BigDecimal quantifyContribution()
public Variable relax()
public void setInteger(boolean integer)
public void setValue(Number value)
public Variable upper(Number upper)
BigDecimal
. BigDecimal
values
are always used as they are.protected void appendMiddlePart(StringBuilder aStringBuilder)
protected void destroy()
protected void doIntegerRounding()
protected boolean validate(BigDecimal value, NumberContext context, BasicLogger.Printer appender)
public final boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public final double getAdjustedLowerLimit()
public final double getAdjustedUpperLimit()
public final double getAdjustmentFactor()
public final BigDecimal getContributionWeight()
Optimisation.Objective
getContributionWeight
in interface Optimisation.Objective
public final BigDecimal getLowerLimit()
Optimisation.Constraint
getLowerLimit
in interface Optimisation.Constraint
public final String getName()
public final double getUnadjustedLowerLimit()
public final double getUnadjustedUpperLimit()
public final BigDecimal getUpperLimit()
Optimisation.Constraint
getUpperLimit
in interface Optimisation.Constraint
public final boolean isConstraint()
Optimisation.Constraint
isConstraint
in interface Optimisation.Constraint
public final boolean isContributionWeightSet()
public final boolean isEqualityConstraint()
Optimisation.Constraint
isEqualityConstraint
in interface Optimisation.Constraint
public final boolean isLowerConstraint()
Optimisation.Constraint
isLowerConstraint
in interface Optimisation.Constraint
public final boolean isLowerLimitSet()
public final boolean isObjective()
isObjective
in interface Optimisation.Objective
public final boolean isUpperConstraint()
Optimisation.Constraint
isUpperConstraint
in interface Optimisation.Constraint
public final boolean isUpperLimitSet()
public final ME level(Number level)
getLowerLimit()
,
getUpperLimit()
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 © 2019 Optimatika. All rights reserved.