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

Package class diagram package LPVariableSequence
All Known Implementing Classes:
AbstractLPVariableSequence, AbstractSimpleIndexLPConstrainedRowsWithVars, DoubleLPVariableSequence, EdgesAsLPVariableSequence, MatrixToRoundAsLP

public interface LPVariableSequence

A contiguous sequence of variables in an LP model. This class represents a set of variables that shall occur in contiguous columns in the resulting LP. The location of the variable sequence is defined by setting an offset id. When the variable 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 column of the variable sequence in the final complete model.


Field Summary
static int OFFSET_UNDEFINED
           
 
Method Summary
 LPVariable getLPVariable(int localColumn)
          Return the LP variable for a given local column index.
 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.
 

Field Detail

OFFSET_UNDEFINED

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

getNumVars

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

Returns:
the number of elements in the sequence.

setVarOffsetId

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

Parameters:
columnOffsetId - the offset identifier.

getVarOffsetId

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

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

setVarOffset

void setVarOffset(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.

getVarOffset

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

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

getLPVariable

LPVariable getLPVariable(int localColumn)
Return the LP variable for a given local column index.

Parameters:
localColumn - the local column index.
Returns:
the correponding LP variable.

isInteger

boolean isInteger()
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.