at.dms.kjc.linprog
Interface LinearProgram

All Known Subinterfaces:
LinearProgramSolver
All Known Implementing Classes:
CPLEXSolve, GLPKSolve, LPSolve, MPSWriter, SimpleLinearProgram

public interface LinearProgram

A generic inteface to a linear programming package. Constraints are all specified in terms of arrays of variables; it is up to the user to keep track of which index of the array corresponds to which variable. In functions taking an index, the indices start from 0.


Method Summary
 void addConstraintEQ(double[] constraint, double rhs)
          Adds an equality constraint between the variables with coefficients and the right-hand-side .
 void addConstraintGE(double[] constraint, double rhs)
          Adds a greater-than-or-equal constraint between the variables with coefficients and the right-hand-side .
 double[] getEmptyConstraint()
          Returns an array with a zero-entry for each variable in the linear program (which the client can then fill in with coefficients before checking in as a new constraint.)
 void setBoolVar(int n)
          Constrains the n'th variable of this to be an integer.
 void setObjective(double[] obj)
          Sets the objective function to be .
 

Method Detail

getEmptyConstraint

double[] getEmptyConstraint()
Returns an array with a zero-entry for each variable in the linear program (which the client can then fill in with coefficients before checking in as a new constraint.)


setObjective

void setObjective(double[] obj)
Sets the objective function to be .


setBoolVar

void setBoolVar(int n)
Constrains the n'th variable of this to be an integer.


addConstraintGE

void addConstraintGE(double[] constraint,
                     double rhs)
Adds a greater-than-or-equal constraint between the variables with coefficients and the right-hand-side . That is, >= .


addConstraintEQ

void addConstraintEQ(double[] constraint,
                     double rhs)
Adds an equality constraint between the variables with coefficients and the right-hand-side .