net.sourceforge.combean.interfaces.mathprog.lp.model
Interface LPConstraintSequence

Package class diagram package LPConstraintSequence
All Known Implementing Classes:
AbstractLPConstraintSequence, AbstractSimpleIndexLPConstrainedRows, AbstractSimpleIndexLPConstrainedRowsWithVars, DoubleLPConstraintSequence, EdgesAsLPConstraintSequence, MatrixToRoundAsLP, NodesAsLPConstraintSequence

public interface LPConstraintSequence

A contiguous sequence of LP constraints. This class represents a set of constraints that shall occur in contiguous rows in the resulting LP. The location of the constraint sequence is defined by setting an offset id. When the constraint sequence is loaded as part of a complete LP model, this model loader will assign an offset to this offset id, which represents the first row of the constraint sequence in the final complete model.


Field Summary
static int OFFSET_UNDEFINED
           
 
Method Summary
 int getConstrOffset()
          Get the global index of the first element of the sequence.
 String getConstrOffsetId()
          Return the identifier for the offset in the global LP model.
 LPConstraint getLPConstraint(int localRow)
          Get the constraint for a given (local) row index.
 int getNumConstrs()
          Get the number of elements in the sequence.
 void setConstrOffset(int globalIndex)
          Set the offset, i.e., the index of the first row resp. column of the sequence in the global model.
 void setConstrOffsetId(String offsetId)
          Set the identifier which defines the offset of the condition sequence in a global LP model.
 

Field Detail

OFFSET_UNDEFINED

static final int OFFSET_UNDEFINED
See Also:
Constant Field Values
Method Detail

getNumConstrs

int getNumConstrs()
Get the number of elements in the sequence.

Returns:
the number of elements in the sequence.

setConstrOffsetId

void setConstrOffsetId(String offsetId)
Set the identifier which defines the offset of the condition sequence in a global LP model.

Parameters:
offsetId - the offset identifier.

getConstrOffsetId

String getConstrOffsetId()
Return the identifier for the offset in the global LP model.

Returns:
the identifier for the offset in the global LP model.

setConstrOffset

void setConstrOffset(int globalIndex)
Set the offset, i.e., the index of the first row resp. column of the sequence in the global model.

Parameters:
globalIndex - the global index of the first element of the sequence.

getConstrOffset

int getConstrOffset()
Get the global index of the first element of the sequence.

Returns:
the global index of the first element of the sequence.

getLPConstraint

LPConstraint getLPConstraint(int localRow)
Get the constraint for a given (local) row index.

Parameters:
localRow - a local row index.
Returns:
the corresponding LP constraint.