net.sourceforge.combean.mathprog.lp.model
Class AbstractSimpleIndexLPConstrainedRowsWithVars

Package class diagram package AbstractSimpleIndexLPConstrainedRowsWithVars
java.lang.Object
  extended by net.sourceforge.combean.mathprog.lp.model.AbstractLPModelComponent
      extended by net.sourceforge.combean.mathprog.lp.model.AbstractSimpleIndexLPModelComponent
          extended by net.sourceforge.combean.mathprog.lp.model.AbstractSimpleIndexLPConstrainedRows
              extended by 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.


Field Summary
 
Fields inherited from class net.sourceforge.combean.mathprog.lp.model.AbstractSimpleIndexLPModelComponent
columnOffsetId, rowOffsetId
 
Fields inherited from interface net.sourceforge.combean.interfaces.mathprog.lp.model.LPVariableSequence
OFFSET_UNDEFINED
 
Fields inherited from interface net.sourceforge.combean.interfaces.mathprog.lp.model.LPConstraintSequence
OFFSET_UNDEFINED
 
Constructor Summary
AbstractSimpleIndexLPConstrainedRowsWithVars(String rowOffsetId, String columnOffsetId)
           
 
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.
 
Methods inherited from class net.sourceforge.combean.mathprog.lp.model.AbstractSimpleIndexLPConstrainedRows
getConstrOffset, getConstrOffsetId, getNumConstrs, setConstrOffset, setConstrOffsetId
 
Methods inherited from class net.sourceforge.combean.mathprog.lp.model.AbstractSimpleIndexLPModelComponent
getColumnModelIndex, getColumnOffsetId, getColumnOffsetIds, getRowModelIndex, getRowOffsetId, getRowOffsetIds, setColumnOffsetId, setRowOffsetId
 
Methods inherited from class net.sourceforge.combean.mathprog.lp.model.AbstractLPModelComponent
getOrientation, setOrientation, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sourceforge.combean.interfaces.mathprog.lp.model.LPVariableSequence
getLPVariable
 
Methods inherited from interface net.sourceforge.combean.interfaces.mathprog.lp.model.LPConstraintSequence
getConstrOffset, getConstrOffsetId, getLPConstraint, getNumConstrs, setConstrOffset, setConstrOffsetId
 
Methods inherited from interface net.sourceforge.combean.interfaces.mathprog.lp.model.LPModelComponent
getColumnOffsetIds, getOrientation, getRowOffsetIds
 
Methods inherited from interface net.sourceforge.combean.interfaces.mathprog.linalg.AbstractMatrix
getNumColumns, getNumRows
 

Constructor Detail

AbstractSimpleIndexLPConstrainedRowsWithVars

public AbstractSimpleIndexLPConstrainedRowsWithVars(String rowOffsetId,
                                                    String columnOffsetId)
Parameters:
rowOffsetId -
columnOffsetId -
Method Detail

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