at.dms.kjc.linprog
Class CPLEXSolve

java.lang.Object
  extended by at.dms.kjc.linprog.SimpleLinearProgram
      extended by at.dms.kjc.linprog.CPLEXSolve
All Implemented Interfaces:
LinearProgram, LinearProgramSolver, Serializable

public class CPLEXSolve
extends SimpleLinearProgram
implements LinearProgramSolver, Serializable

Solver that uses CPLEX. Current limitations: 1. Not making use of double variable bounds. Just saying between MIN_VALUE, MAX_VALUE

See Also:
Serialized Form

Field Summary
 
Fields inherited from class at.dms.kjc.linprog.SimpleLinearProgram
boolVar, constraints, numVars, obj
 
Constructor Summary
CPLEXSolve(int numVars)
          Create one of these with variables with no timeout.
CPLEXSolve(int numVars, long optTimeout, double gapTolerance, long gapTimeout)
          Create one of these with variables with a timeout of for the solving process.
 
Method Summary
 double[] solve()
          Solve the program and return the value of the the variables (indices 0...numVars-1) in the optimum.
 
Methods inherited from class at.dms.kjc.linprog.SimpleLinearProgram
addConstraintEQ, addConstraintGE, getEmptyConstraint, setBoolVar, setObjective
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface at.dms.kjc.linprog.LinearProgram
addConstraintEQ, addConstraintGE, getEmptyConstraint, setBoolVar, setObjective
 

Constructor Detail

CPLEXSolve

public CPLEXSolve(int numVars,
                  long optTimeout,
                  double gapTolerance,
                  long gapTimeout)
Create one of these with variables with a timeout of for the solving process.


CPLEXSolve

public CPLEXSolve(int numVars)
Create one of these with variables with no timeout.

Method Detail

solve

public double[] solve()
               throws LPSolverFailedException
Solve the program and return the value of the the variables (indices 0...numVars-1) in the optimum.

Specified by:
solve in interface LinearProgramSolver
Throws:
LPSolverFailedException