examples.jmdp

## Class ControlProduccion

- java.lang.Object
- - jmarkov.jmdp.MDP<S,A>
  - - jmarkov.jmdp.InfiniteMDP<S,A>
    - - jmarkov.jmdp.DTMDP<S,A>
      - - jmarkov.jmdp.DTMDPEv<InvLevel,Order,DemandEvent>
        - - examples.jmdp.ControlProduccion

-     public class ControlProduccion
      extends DTMDPEv<InvLevel,Order,DemandEvent>

  This problem is periodic review, a single item, stochastic demand inventory problem. It is modeled like a discounted cost, infinite horizon, Markov Decision Problem. Demand is assumed to be random according to a Poisson Process distribution with given rate per period. The system is a periodic review problem in which an entity periodically checks the inventory level and takes decisions according to the states he finds. There is a price of selling each item and a cost for buying it. Besides, there is a holding cost incurred when holding one item in stock from one period to another. There is also a fixedCost ordering cost independent of the size of the order placed. The objective is to minimize the expected discounted long run cost.
  Author:
    Germán Riaño and Andres Sarmiento - Universidad de Los Andes

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ControlProduccion(int maxInventory, double fixedCost, double cost, double price, double holdingCost, double interestRate, double demandMean)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Events<DemandEvent>` | `activeEvents(InvLevel i, Order a)` Set of events that are active from state i given that action a is taken.
    `Actions<Order>` | `feasibleActions(InvLevel i)` Returns the set of actions available at this state.
    `double` | `immediateCost(InvLevel i, Order a, DemandEvent e)` Cost incurred received when the current state is i, the action taken is a and event e occurs.
    `static void` | `main(java.lang.String[] a)` Test Program
    `double` | `prob(InvLevel i, DemandEvent e)` Conditional Event probability.
    `double` | `prob(InvLevel i, InvLevel j, Order a, DemandEvent e)` Conditional destination probability.
    `States<InvLevel>` | `reachable(InvLevel i, Order a, DemandEvent e)` Set of reachable states from state i given that action a is taken and event e occurs.

    - ### Methods inherited from class jmarkov.jmdp.DTMDPEv

      `immediateCost, prob, reachable`

    - ### Methods inherited from class jmarkov.jmdp.DTMDP

      `getSteadyStateProbabilities, setProbabilitySolver, solve`

    - ### Methods inherited from class jmarkov.jmdp.InfiniteMDP

      `getAllStates, getNumStates, getSolver`

    - ### Methods inherited from class jmarkov.jmdp.MDP

      `debug, debug, debug, getDebugLevel, getOptimalPolicy, getOptimalValueFunction, getReporter, isFinite, isSolved, operation, printSolution, printSolution, setDebugLevel, setReporter, setSolver, solve`

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

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

- - ### Constructor Detail

    - #### ControlProduccion

          public ControlProduccion(int maxInventory,
                           double fixedCost,
                           double cost,
                           double price,
                           double holdingCost,
                           double interestRate,
                           double demandMean)

      Parameters:
        `maxInventory` - Capacity
        `fixedCost` - Fixed cost per order
        `cost` - aquisition cost
        `price` - selling price
        `holdingCost` - cost per item stored (non-monetary)
        `interestRate` -
        `demandMean` - Expected demand

  - ### Method Detail

    - #### reachable

          public States<InvLevel> reachable(InvLevel i,
                                   Order a,
                                   DemandEvent e)

      Description copied from class: `DTMDPEv`
      Set of reachable states from state i given that action a is taken and event e occurs.
      Specified by:
        `reachable` in class `DTMDPEv<InvLevel,Order,DemandEvent>`
      Parameters:
        `i` - current state
        `a` - action taken
        `e` - event that occurs
      Returns:
        set of reachable states.

    - #### activeEvents

          public Events<DemandEvent> activeEvents(InvLevel i,
                                         Order a)

      Description copied from class: `DTMDPEv`
      Set of events that are active from state i given that action a is taken.
      Specified by:
        `activeEvents` in class `DTMDPEv<InvLevel,Order,DemandEvent>`
      Parameters:
        `i` - current state
        `a` - action taken
      Returns:
        set of events that can occur

    - #### prob

          public double prob(InvLevel i,
                    InvLevel j,
                    Order a,
                    DemandEvent e)

      Description copied from class: `DTMDPEv`
      Conditional destination probability. Probability of reaching state j given that the current state is i, the action taken is a and the event that occurs is e.
      Specified by:
        `prob` in class `DTMDPEv<InvLevel,Order,DemandEvent>`
      Parameters:
        `i` - current state
        `j` - state to reach
        `a` - action taken (given)
        `e` - event that occurs (given)
      Returns:
        Conditional probability

    - #### prob

          public double prob(InvLevel i,
                    DemandEvent e)

      Description copied from class: `DTMDPEv`
      Conditional Event probability. Probability that event e occurs given that the current state is i.
      Specified by:
        `prob` in class `DTMDPEv<InvLevel,Order,DemandEvent>`
      Parameters:
        `i` - current state
        `e` - event that occurs
      Returns:
        Conditional probability

    - #### immediateCost

          public double immediateCost(InvLevel i,
                             Order a,
                             DemandEvent e)

      Description copied from class: `DTMDPEv`
      Cost incurred received when the current state is i, the action taken is a and event e occurs.
      Specified by:
        `immediateCost` in class `DTMDPEv<InvLevel,Order,DemandEvent>`
      Parameters:
        `i` - current state
        `a` - action taken
        `e` - event that occurs
      Returns:
        reward

    - #### feasibleActions

          public Actions<Order> feasibleActions(InvLevel i)

      Description copied from class: `InfiniteMDP`
      Returns the set of actions available at this state.
      Specified by:
        `feasibleActions` in class `InfiniteMDP<InvLevel,Order>`
      Parameters:
        `i` - Current State
      Returns:
        set of Actions that can be taken at this state.

    - #### main

          public static void main(java.lang.String[] a)
                           throws SolverException

      Test Program
      Parameters:
        `a` -
      Throws:
        `SolverException`