S
- States class.A
- Actions class.public abstract class MpsLpDiscountedSolver<S extends State,A extends Action> extends AbstractDiscountedSolver<S,A> implements MpsLpSolver<S,A>
solveLP()
Constructor and Description |
---|
MpsLpDiscountedSolver(DTMDP<S,A> problem,
double interestRate)
This is the default constructor for MpsLpDiscountedSolver
class, and defines the label MDP for the MPS File.
|
MpsLpDiscountedSolver(DTMDP<S,A> problem,
double interestRate,
java.lang.String workingDir,
java.lang.String fileName)
The constructor method exclusively receives a problem of the
type infinite DTMDP , an interest rate that is modified for
being used as discount factor and the name that the user wants
for the MPS File.
|
Modifier and Type | Method and Description |
---|---|
abstract Solution<S,A> |
buildSolution()
The implementator classes should override this class to build
the solution after the model has been solved.
|
long |
getBuildTime()
Returns the time taken to build and write the MPS file.
|
long |
getLpSolveTime()
Return the time taken to solve the LP model.
|
java.io.File |
getMpsFile()
Returns the MPS file.
|
java.lang.String |
getMpsFileName()
Returns the MPS file name.
|
long |
getProcessTime() |
long |
getSolBuildTime()
Returns the time needed to build the Solution after the LP was
solved.
|
java.io.File |
getWorkingDir()
Returns the working directory (where the MPS file is located)
|
boolean |
isAvg() |
Solution<S,A> |
solve()
Called to solve the problem.
|
abstract void |
solveLP()
The implementator classes should override this class to solve
the problem using the mpsFile that has been created.
|
getInterestRate, setInterestRate
getIterations, getProblem, printSolution
description, getOptimalPolicy, getOptimalValueFunction, getValueFunction, isSolved, label, printSolution, setPrintProcessTime, setPrintValueFunction, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals
public MpsLpDiscountedSolver(DTMDP<S,A> problem, double interestRate, java.lang.String workingDir, java.lang.String fileName)
problem
- The structure of the problem of type infinite
DTMDP.interestRate
- A rate which is paid for the use of a
resource.workingDir
- Where the MPS file will be created.fileName
- Name for the MPS File (with no path).public MpsLpDiscountedSolver(DTMDP<S,A> problem, double interestRate)
problem
- The structure of the problem of type infinite
DTMDP.interestRate
- A rate which is paid for the use of a
resource.public final java.lang.String getMpsFileName()
MpsLpSolver
getMpsFileName
in interface MpsLpSolver<S extends State,A extends Action>
public java.io.File getMpsFile()
MpsLpSolver
getMpsFile
in interface MpsLpSolver<S extends State,A extends Action>
public final java.io.File getWorkingDir()
getWorkingDir
in interface MpsLpSolver<S extends State,A extends Action>
public final boolean isAvg()
public abstract void solveLP() throws SolverException
public abstract Solution<S,A> buildSolution() throws SolverException
buildSolution
in interface LPSolver<S extends State,A extends Action>
SolverException
public final Solution<S,A> solve() throws SolverException
Solver
public final long getBuildTime()
LPSolver
public final long getLpSolveTime()
LPSolver
public final long getSolBuildTime()
LPSolver