net.sourceforge.combean.mathprog.lp.model
Class AbstractSimpleIndexLPConstrainedRows
java.lang.Object
net.sourceforge.combean.mathprog.lp.model.AbstractLPModelComponent
net.sourceforge.combean.mathprog.lp.model.AbstractSimpleIndexLPModelComponent
net.sourceforge.combean.mathprog.lp.model.AbstractSimpleIndexLPConstrainedRows
- All Implemented Interfaces:
- AbstractMatrix, LPConstraintSequence, LPModelComponent
- Direct Known Subclasses:
- AbstractSimpleIndexLPConstrainedRowsWithVars
public abstract class AbstractSimpleIndexLPConstrainedRows
- extends AbstractSimpleIndexLPModelComponent
- implements LPModelComponent, LPConstraintSequence
Abstract base class for LP models that have a single pair of constrOffset ids
and come together with their constraints.
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. |
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. |
AbstractSimpleIndexLPConstrainedRows
public AbstractSimpleIndexLPConstrainedRows(String rowOffsetId,
String columnOffsetId)
- Constructor
- Parameters:
rowOffsetId
- columnOffsetId
-
getConstrOffset
public int getConstrOffset()
- Description copied from interface:
LPConstraintSequence
- Get the global index of the first element of the sequence.
- Specified by:
getConstrOffset
in interface LPConstraintSequence
- Returns:
- the global index of the first element of the sequence.
setConstrOffset
public void setConstrOffset(int globalIndex)
- Description copied from interface:
LPConstraintSequence
- Set the offset, i.e., the index of the first row resp. column of
the sequence in the global model.
- Specified by:
setConstrOffset
in interface LPConstraintSequence
- Parameters:
globalIndex
- the global index of the first element of the sequence.
getConstrOffsetId
public String getConstrOffsetId()
- Description copied from interface:
LPConstraintSequence
- Return the identifier for the offset in the global LP model.
- Specified by:
getConstrOffsetId
in interface LPConstraintSequence
- Returns:
- the identifier for the offset in the global LP model.
setConstrOffsetId
public void setConstrOffsetId(String offsetId)
- Description copied from interface:
LPConstraintSequence
- Set the identifier which defines the offset of the condition sequence
in a global LP model.
- Specified by:
setConstrOffsetId
in interface LPConstraintSequence
- Parameters:
offsetId
- the offset identifier.
getNumConstrs
public int getNumConstrs()
- Description copied from interface:
LPConstraintSequence
- Get the number of elements in the sequence.
- Specified by:
getNumConstrs
in interface LPConstraintSequence
- Returns:
- the number of elements in the sequence.