jmarkov.jmdp.solvers

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

- java.lang.Object
- - jmarkov.jmdp.solvers.Solver<S,A>
  - - jmarkov.jmdp.solvers.AbstractInfiniteSolver<S,A>
    - - jmarkov.jmdp.solvers.AbstractAverageSolver<S,A>
      - - jmarkov.jmdp.solvers.MpsLpAverageSolver<S,A>
        - - jmarkov.jmdp.solvers.MPSQsOptAverageSolver<S,A>

- Type Parameters:
    `S` - Stete class
    `A` - Action class
  All Implemented Interfaces:
    JMarkovElement, LPSolver<S,A>, MpsLpSolver<S,A>

      public class MPSQsOptAverageSolver<S extends State,A extends Action>
      extends MpsLpAverageSolver<S,A>

  This solver solves an average infinite horizon MDP by building and solving a linear problem using as interface QSopt-Optimizer. It implements MpsLpDiscountedSolver creates an MPS file and feeds it to the solver.
  Author:
    German Riano. Universidad de los Andes. (C) 2006

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MPSQsOptAverageSolver(CTMDP<S,A> problem)`
    `MPSQsOptAverageSolver(CTMDP<S,A> problem, java.lang.String workingDir, java.lang.String fileName)` Creates a solver for average cost problems.
    `MPSQsOptAverageSolver(DTMDP<S,A> problem)`
    `MPSQsOptAverageSolver(DTMDP<S,A> problem, java.lang.String workingDir, java.lang.String fileName)` Creates a solver for average cost problems.

  - ### 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.
    `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.MpsLpAverageSolver

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

    - ### 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

    - #### MPSQsOptAverageSolver

          public MPSQsOptAverageSolver(DTMDP<S,A> problem)

      Parameters:
        `problem` -

    - #### MPSQsOptAverageSolver

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

      Creates a solver for average cost problems.
      Parameters:
        `problem` - The problem to solve.
        `workingDir` - working directory where files will be saved
        `fileName` - MDP file name.

    - #### MPSQsOptAverageSolver

          public MPSQsOptAverageSolver(CTMDP<S,A> problem)

      Parameters:
        `problem` -

    - #### MPSQsOptAverageSolver

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

      Creates a solver for average cost problems.
      Parameters:
        `problem` - The problem to solve.
        `workingDir` - working directory where files will be saved
        `fileName` - MDP file name.

  - ### Method Detail

    - #### 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()`

    - #### solveLP

          public void solveLP()
                       throws SolverException

      Description copied from interface: `LPSolver`
      The implementator classes should override this class to solve the problem using the mpsFile that has been created.
      Throws:
        `SolverException`

    - #### buildSolution

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

      Description copied from interface: `LPSolver`
      The implementator classes should override this class to build the solution after the model has been solved.
      Returns:
        The solution to the problem.
      Throws:
        `SolverException`
      See Also:
        `MPSQsOptDiscountedSolver.buildSolution()`