examples.jmdp.solvers

## Class MPSQsOptDiscountedSolver<S extends State,A extends Action>

- java.lang.Object
- - jmarkov.jmdp.solvers.Solver<S,A>
  - - jmarkov.jmdp.solvers.AbstractInfiniteSolver<S,A>
    - - jmarkov.jmdp.solvers.AbstractDiscountedSolver<S,A>
      - - jmarkov.jmdp.solvers.MpsLpDiscountedSolver<S,A>
        - - examples.jmdp.solvers.MPSQsOptDiscountedSolver<S,A>

- Type Parameters:
    `S` - States class.
    `A` - Actions class.
  All Implemented Interfaces:
    JMarkovElement, LPSolver<S,A>, MpsLpSolver<S,A>

      public class MPSQsOptDiscountedSolver<S extends State,A extends Action>
      extends MpsLpDiscountedSolver<S,A>

  Author:
    Germán Riaño. Universidad de los Andes. (C) 2005

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MPSQsOptDiscountedSolver(CTMDP<S,A> problem, double interestRate)`
    `MPSQsOptDiscountedSolver(CTMDP<S,A> problem, double interestRate, boolean isAvg)`
    `MPSQsOptDiscountedSolver(CTMDP<S,A> problem, double interestRate, java.lang.String workingDir, java.lang.String fileName)`
    `MPSQsOptDiscountedSolver(CTMDP<S,A> problem, double interestRate, java.lang.String workingDir, java.lang.String fileName, boolean isAvg)`
    `MPSQsOptDiscountedSolver(DTMDP<S,A> problem, double interestRate)`
    `MPSQsOptDiscountedSolver(DTMDP<S,A> problem, double interestRate, boolean isAvg)`
    `MPSQsOptDiscountedSolver(DTMDP<S,A> problem, double interestRate, java.lang.String workingDir, java.lang.String fileName)`
    `MPSQsOptDiscountedSolver(DTMDP<S,A> problem, double interestRate, java.lang.String workingDir, java.lang.String fileName, boolean isAvg)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Solution<S,A>` | `buildSolution()` The implementator classes should override this class to build the solution after the model has been solved.
    `long` | `getIterations()`
    `java.lang.String` | `label()` The sub classes must return the Solver name.
    `void` | `solveLP()` The implementator classes should override this class to solve the problem using the mpsFile that has been created.

    - ### Methods inherited from class jmarkov.jmdp.solvers.MpsLpDiscountedSolver

      `getBuildTime, getLpSolveTime, getMpsFile, getMpsFileName, getProcessTime, getSolBuildTime, getWorkingDir, isAvg, solve`

    - ### Methods inherited from class jmarkov.jmdp.solvers.AbstractDiscountedSolver

      `getInterestRate, setInterestRate`

    - ### Methods inherited from class jmarkov.jmdp.solvers.AbstractInfiniteSolver

      `getProblem, printSolution`

    - ### Methods inherited from class jmarkov.jmdp.solvers.Solver

      `description, getOptimalPolicy, getOptimalValueFunction, getValueFunction, isSolved, printSolution, setPrintProcessTime, setPrintValueFunction, toString`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface jmarkov.basic.JMarkovElement

      `equals`

- - ### Constructor Detail

    - #### MPSQsOptDiscountedSolver

          public MPSQsOptDiscountedSolver(CTMDP<S,A> problem,
                                  double interestRate,
                                  java.lang.String workingDir,
                                  java.lang.String fileName)

      Parameters:
        `problem` - The problem to solve
        `interestRate` - The interest rate
        `workingDir` - The working directory where MPS file will be stored.
        `fileName` - The name for the generated MPD file.

    - #### MPSQsOptDiscountedSolver

          public MPSQsOptDiscountedSolver(DTMDP<S,A> problem,
                                  double interestRate,
                                  java.lang.String workingDir,
                                  java.lang.String fileName)

      Parameters:
        `problem` - The problem to solve
        `interestRate` - The interest rate
        `workingDir` - The working directory where MPS file will be stored.
        `fileName` - The name for the generated MPD file.

    - #### MPSQsOptDiscountedSolver

          public MPSQsOptDiscountedSolver(DTMDP<S,A> problem,
                                  double interestRate)

      Parameters:
        `problem` - Probelem to solve
        `interestRate` - The interest rate.

    - #### MPSQsOptDiscountedSolver

          public MPSQsOptDiscountedSolver(CTMDP<S,A> problem,
                                  double interestRate)

      Parameters:
        `problem` - problem to solve
        `interestRate` - interest rate

    - #### MPSQsOptDiscountedSolver

          public MPSQsOptDiscountedSolver(DTMDP<S,A> problem,
                                  double interestRate,
                                  java.lang.String workingDir,
                                  java.lang.String fileName,
                                  boolean isAvg)

      Parameters:
        `problem` - The problem to solve
        `interestRate` - The interest rate
        `workingDir` - The working directory where MPS file will be stored.
        `fileName` - The name for the generated MPD file.
        `isAvg` - true if problem is treated as Average cost problem

    - #### MPSQsOptDiscountedSolver

          public MPSQsOptDiscountedSolver(CTMDP<S,A> problem,
                                  double interestRate,
                                  java.lang.String workingDir,
                                  java.lang.String fileName,
                                  boolean isAvg)

      Parameters:
        `problem` - The problem to solve
        `interestRate` - The interest rate
        `workingDir` - The working directory where MPS file will be stored.
        `fileName` - The name for the generated MPD file.
        `isAvg` - true if problem is treated as Average cost problem

    - #### MPSQsOptDiscountedSolver

          public MPSQsOptDiscountedSolver(DTMDP<S,A> problem,
                                  double interestRate,
                                  boolean isAvg)

      Parameters:
        `problem` - The problem to solve
        `interestRate` - The interest rate
        `isAvg` - true if problem is treated as Average cost problem

    - #### MPSQsOptDiscountedSolver

          public MPSQsOptDiscountedSolver(CTMDP<S,A> problem,
                                  double interestRate,
                                  boolean isAvg)

      Parameters:
        `problem` - The problem to solve
        `interestRate` - The interest rate
        `isAvg` - true if problem is treated as Average cost problem

  - ### Method Detail

    - #### getIterations

          public long getIterations()

      Specified by:
        `getIterations` in class `AbstractInfiniteSolver<S extends State,A extends Action>`
      Returns:
        Returns the iterations in the last solve.
      See Also:
        `AbstractInfiniteSolver.getIterations()`

    - #### solveLP

          public void solveLP()
                       throws SolverException

      Description copied from class: `MpsLpDiscountedSolver`
      The implementator classes should override this class to solve the problem using the mpsFile that has been created.
      Specified by:
        `solveLP` in interface `LPSolver<S extends State,A extends Action>`
      Specified by:
        `solveLP` in class `MpsLpDiscountedSolver<S extends State,A extends Action>`
      Throws:
        `SolverException`

    - #### buildSolution

          public Solution<S,A> buildSolution()
                                                                   throws SolverException

      Description copied from class: `MpsLpDiscountedSolver`
      The implementator classes should override this class to build the solution after the model has been solved.
      Specified by:
        `buildSolution` in interface `LPSolver<S extends State,A extends Action>`
      Specified by:
        `buildSolution` in class `MpsLpDiscountedSolver<S extends State,A extends Action>`
      Returns:
        The solution to the problem.
      Throws:
        `SolverException`

    - #### label

          public java.lang.String label()

      Description copied from class: `Solver`
      The sub classes must return the Solver name.
      Specified by:
        `label` in interface `JMarkovElement`
      Specified by:
        `label` in class `Solver<S extends State,A extends Action>`
      Returns:
        A String label.
      See Also:
        `Solver.label()`