S
- A
- public class MPSXpressDiscounted<S extends State,A extends Action> extends MpsLpDiscountedSolver<S,A>
Constructor and Description |
---|
MPSXpressDiscounted(DTMDP<S,A> problem,
double interestRate)
This is the default constructor for MPSXpressDiscounted class,
and defines the path for the working directory equals to the
MPS folder tied to the project.
|
MPSXpressDiscounted(DTMDP<S,A> problem,
double interestRate,
java.lang.String workingDir,
java.lang.String fileName)
The constructor method receives a problem of the type infinite
DTMDP, an interest rate, and the working directory and file
name that the user wants as path for MPS Files and solutions
from Xpress-Optimizer.
|
Modifier and Type | Method and Description |
---|---|
Solution<S,A> |
buildSolution()
A solution provided for a MPS File by Xpress-Optmizer has the
next framework.
|
void |
closeFile()
Close the MPS File
|
java.io.File |
createCommandsFile()
creates a File wit the XPress commands:
readprob
minim
writesol
quit
|
long |
getIterations() |
java.lang.String |
label()
The sub classes must return the Solver name.
|
void |
openFile() |
void |
setShowXpressOutput(boolean showXpressOutput)
St this to true if you want to capture Xpress output.
|
boolean |
showXpressOutput()
Returns true if the solver the captures the Xpress o
|
void |
solveLP()
This is where the actual solving takes place.
|
getBuildTime, getLpSolveTime, getMpsFile, getMpsFileName, getProcessTime, getSolBuildTime, getWorkingDir, isAvg, solve
getInterestRate, setInterestRate
getProblem, printSolution
description, getOptimalPolicy, getOptimalValueFunction, getValueFunction, isSolved, printSolution, setPrintProcessTime, setPrintValueFunction, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals
public MPSXpressDiscounted(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
- The path where will be saved and read the MPS
file.fileName
- The MPS file name to create.public MPSXpressDiscounted(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 long getIterations()
getIterations
in class AbstractInfiniteSolver<S extends State,A extends Action>
public void solveLP() throws SolverException
public java.io.File createCommandsFile() throws java.io.IOException
readprob minim writesol quit
java.io.IOException
public java.lang.String label()
Solver
label
in interface JMarkovElement
label
in class Solver<S extends State,A extends Action>
Solver.toString()
public boolean showXpressOutput()
public void setShowXpressOutput(boolean showXpressOutput)
showXpressOutput
- true if Xpress output is to be
captured.public void openFile() throws SolverException
SolverException
MpsLpDiscountedSolver
public void closeFile()
public Solution<S,A> buildSolution() throws SolverException
buildSolution
in interface LPSolver<S extends State,A extends Action>
buildSolution
in class MpsLpDiscountedSolver<S extends State,A extends Action>
SolverException