net.sourceforge.combean.mathprog.lp.model
Class AbstractSimpleIndexLPConstrainedRowsWithVars
java.lang.Object
net.sourceforge.combean.mathprog.lp.model.AbstractLPModelComponent
net.sourceforge.combean.mathprog.lp.model.AbstractSimpleIndexLPModelComponent
net.sourceforge.combean.mathprog.lp.model.AbstractSimpleIndexLPConstrainedRows
net.sourceforge.combean.mathprog.lp.model.AbstractSimpleIndexLPConstrainedRowsWithVars
- All Implemented Interfaces:
- AbstractMatrix, LPConstraintSequence, LPModelComponent, LPVariableSequence
- Direct Known Subclasses:
- MatrixToRoundAsLP
public abstract class AbstractSimpleIndexLPConstrainedRowsWithVars
- extends AbstractSimpleIndexLPConstrainedRows
- implements LPVariableSequence, LPConstraintSequence, LPModelComponent
Abstract base class for LP models with a single pair of offset ids
and come together with their constraints and variables.
Method Summary |
int |
getNumVars()
Get the number of elements in the sequence. |
int |
getVarOffset()
Get the global index of the first element of the sequence. |
String |
getVarOffsetId()
Return the identifier for the offset in the global LP model. |
boolean |
isInteger()
Flag whether the variables in the sequence are integer variables. |
void |
setVarOffset(int globalIndex)
Set the offset, i.e., the index of the first row resp. column of
the sequence in the global model. |
void |
setVarOffsetId(String columnOffsetId)
Set the identifier which defines the offset of the condition sequence
in a global LP model. |
AbstractSimpleIndexLPConstrainedRowsWithVars
public AbstractSimpleIndexLPConstrainedRowsWithVars(String rowOffsetId,
String columnOffsetId)
- Parameters:
rowOffsetId
- columnOffsetId
-
setVarOffsetId
public void setVarOffsetId(String columnOffsetId)
- Description copied from interface:
LPVariableSequence
- Set the identifier which defines the offset of the condition sequence
in a global LP model.
- Specified by:
setVarOffsetId
in interface LPVariableSequence
- Parameters:
columnOffsetId
- the offset identifier.
getVarOffsetId
public String getVarOffsetId()
- Description copied from interface:
LPVariableSequence
- Return the identifier for the offset in the global LP model.
- Specified by:
getVarOffsetId
in interface LPVariableSequence
- Returns:
- the identifier for the offset in the global LP model.
setVarOffset
public void setVarOffset(int globalIndex)
- Description copied from interface:
LPVariableSequence
- Set the offset, i.e., the index of the first row resp. column of
the sequence in the global model.
- Specified by:
setVarOffset
in interface LPVariableSequence
- Parameters:
globalIndex
- the global index of the first element of the sequence.
getVarOffset
public int getVarOffset()
- Description copied from interface:
LPVariableSequence
- Get the global index of the first element of the sequence.
- Specified by:
getVarOffset
in interface LPVariableSequence
- Returns:
- the global index of the first element of the sequence.
getNumVars
public int getNumVars()
- Description copied from interface:
LPVariableSequence
- Get the number of elements in the sequence.
- Specified by:
getNumVars
in interface LPVariableSequence
- Returns:
- the number of elements in the sequence.
isInteger
public boolean isInteger()
- Description copied from interface:
LPVariableSequence
- Flag whether the variables in the sequence are integer variables.
Please note that you need a MIPSolver to solve the model if you have variables
that are integer.
- Specified by:
isInteger
in interface LPVariableSequence