madupite.MDP#

class madupite.MDP(*args, **kwargs)#

Represents a Markov Decision Process (MDP).

This class provides methods to define and solve an MDP by setting the necessary components such as the stage cost matrix and transition probability tensor.

Methods#

__init__(self, madupite=madupite_initialize(), comm=0)

Initialize the MDP with a Madupite instance and MPI communicator.

clearOptions(self)

Clear all options for the MDP.

setOption(self, option, value=None)

Set an option for the MDP.

optionstr

The name of the option to set.

valueoptional

The value to assign to the option. If not provided, the option is set with its default value.

setStageCostMatrix(self, arg)

Set the stage cost matrix for the MDP.

argmadupite.madupite.Matrix

The matrix representing the stage costs for the MDP.

setTransitionProbabilityTensor(self, arg)

Set the transition probability tensor for the MDP.

argmadupite.madupite.Matrix

The tensor representing the transition probabilities for the MDP.

setUp(self)

Optional call to set up the MDP class internally.

solve(self)

Solve the MDP problem.

This method computes the optimal policy and value function for the defined MDP.

__init__(self, madupite: madupite._madupite_impl.Madupite = <madupite._madupite_impl.Madupite object at 0x7fcc2cd33010>, comm: int = 0) None#

Initialize MDP with Madupite instance and MPI communicator

Methods

__init__(self, madupite, comm)

Initialize MDP with Madupite instance and MPI communicator

clearOptions(self)

Clear all options for MDP

setOption(self, option[, value])

Set options for MDP

setStageCostMatrix(self, arg, /)

Set the stage cost matrix

setTransitionProbabilityTensor(self, arg, /)

Set the transition probability tensor

setUp(self)

Set up the MDP class

solve(self)

Solve the MDP problem