org.ojalgo.optimisation
Class ModelComponent<ME extends ModelComponent<ME>>

java.lang.Object
  extended by org.ojalgo.optimisation.ModelEntity<ME>
      extended by org.ojalgo.optimisation.ModelComponent<ME>
All Implemented Interfaces:
Comparable<ME>, Constraint, Objective
Direct Known Subclasses:
Expression, MathProgSysModel.Column, MathProgSysModel.Row, Variable

public abstract class ModelComponent<ME extends ModelComponent<ME>>
extends ModelEntity<ME>
implements Constraint, Objective

Author:
apete

Method Summary
 BigDecimal getAdjustedLowerLimit()
           
 BigDecimal getAdjustedUpperLimit()
           
abstract  BigDecimal getAdjustmentFactor()
           
 BigDecimal getContributionWeight()
           
 BigDecimal getLowerLimit()
           
 BigDecimal getUpperLimit()
           
 boolean isConstraint()
          The Constraint has a lower or an upper limit (possibly both).
 boolean isContributionWeightSet()
           
 boolean isEqualityConstraint()
          The Constraint has both a lower limit and an upper limit, and they are equal.
 boolean isLowerConstraint()
          The Constraint has a lower limit, and the upper limit (if it exists) is different.
 boolean isLowerLimitSet()
           
 boolean isObjective()
           
 boolean isUpperConstraint()
          The Constraint has an upper limit, and the lower limit (if it exists) is different.
 boolean isUpperLimitSet()
           
 ME level(BigDecimal aLowerAndUpperLimit)
           
 ME lower(BigDecimal aLowerLimit)
           
 void setContributionWeight(BigDecimal aContributionWeight)
           
 void setLowerLimit(BigDecimal aLowerLimit)
           
 void setUpperLimit(BigDecimal anUpperLimit)
           
 String toString()
           
 ME upper(BigDecimal anUpperLimit)
           
 boolean validateConfiguration()
           
 ME weight(BigDecimal aContributionWeight)
           
 
Methods inherited from class org.ojalgo.optimisation.ModelEntity
compareTo, equals, getName, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getAdjustedLowerLimit

public final BigDecimal getAdjustedLowerLimit()

getAdjustedUpperLimit

public final BigDecimal getAdjustedUpperLimit()

getAdjustmentFactor

public abstract BigDecimal getAdjustmentFactor()

getContributionWeight

public BigDecimal getContributionWeight()
Specified by:
getContributionWeight in interface Objective
See Also:
Objective.getContributionWeight()

getLowerLimit

public BigDecimal getLowerLimit()
Specified by:
getLowerLimit in interface Constraint
See Also:
Constraint.getLowerLimit()

getUpperLimit

public BigDecimal getUpperLimit()
Specified by:
getUpperLimit in interface Constraint
See Also:
Constraint.getUpperLimit()

isConstraint

public boolean isConstraint()
Description copied from interface: Constraint
The Constraint has a lower or an upper limit (possibly both).

Specified by:
isConstraint in interface Constraint
See Also:
Constraint.isConstraint()

isContributionWeightSet

public final boolean isContributionWeightSet()

isEqualityConstraint

public boolean isEqualityConstraint()
Description copied from interface: Constraint
The Constraint has both a lower limit and an upper limit, and they are equal.

Specified by:
isEqualityConstraint in interface Constraint
See Also:
Constraint.isEqualityConstraint()

isLowerConstraint

public boolean isLowerConstraint()
Description copied from interface: Constraint
The Constraint has a lower limit, and the upper limit (if it exists) is different.

Specified by:
isLowerConstraint in interface Constraint
See Also:
Constraint.isLowerConstraint()

isLowerLimitSet

public final boolean isLowerLimitSet()

isObjective

public boolean isObjective()
Specified by:
isObjective in interface Objective
Returns:
true if this objective has a non zero contribution weight.
See Also:
Objective.isObjective()

isUpperConstraint

public boolean isUpperConstraint()
Description copied from interface: Constraint
The Constraint has an upper limit, and the lower limit (if it exists) is different.

Specified by:
isUpperConstraint in interface Constraint
See Also:
Constraint.isUpperConstraint()

isUpperLimitSet

public final boolean isUpperLimitSet()

level

public final ME level(BigDecimal aLowerAndUpperLimit)

lower

public final ME lower(BigDecimal aLowerLimit)

setContributionWeight

public void setContributionWeight(BigDecimal aContributionWeight)
Specified by:
setContributionWeight in interface Objective
See Also:
Objective.setContributionWeight(java.math.BigDecimal)

setLowerLimit

public void setLowerLimit(BigDecimal aLowerLimit)
Specified by:
setLowerLimit in interface Constraint
See Also:
Constraint.setLowerLimit(java.math.BigDecimal)

setUpperLimit

public void setUpperLimit(BigDecimal anUpperLimit)
Specified by:
setUpperLimit in interface Constraint
See Also:
Constraint.setUpperLimit(java.math.BigDecimal)

toString

public final String toString()
Overrides:
toString in class Object

upper

public final ME upper(BigDecimal anUpperLimit)

validateConfiguration

public boolean validateConfiguration()
                              throws ModelValidationException
Throws:
ModelValidationException

weight

public final ME weight(BigDecimal aContributionWeight)