{
  "_id": "6a2c95393efcd9bda42e0c3b",
  "Type": "Package",
  "Package": "MDP2",
  "Title": "Markov Decision Processes (MDPs)",
  "Version": "2.2.2.0",
  "Authors@R": "c(\nperson(\"Lars\", \"Relund Nielsen\", , \"lars@relund.dk\", role = c(\"aut\", \"cre\"),\ncomment = c(ORCID = \"0000-0002-4802-3071\")))",
  "Author": "Lars Relund Nielsen [aut, cre] (ORCID:\n<https://orcid.org/0000-0002-4802-3071>)",
  "Maintainer": "Lars Relund Nielsen <lars@relund.dk>",
  "Description": "Create and optimize (semi) MDPs with discrete time steps\nand state space. Both hierarchical and ordinary-traditional\nMDPs can be modeled.",
  "License": "GPL (>= 3)",
  "URL": "https://relund.github.io/mdp/, https://github.com/relund/mdp/,\nhttp://relund.github.io/mdp/",
  "BugReports": "https://github.com/relund/mdp/issues",
  "VignetteBuilder": "knitr",
  "Encoding": "UTF-8",
  "Language": "en-US",
  "Config/roxygen2/version": "8.0.0",
  "Config/testthat/edition": "3",
  "NeedsCompilation": "yes",
  "Packaged": {
    "Date": "2026-06-12 23:20:43 UTC",
    "User": "root"
  },
  "Repository": "https://cran.r-universe.dev",
  "Date/Publication": "2026-06-12 19:30:14 UTC",
  "RemoteUrl": "https://github.com/cran/MDP2",
  "RemoteRef": "HEAD",
  "RemoteSha": "06cec2781a68a911a47aa64681b4c8bf6e500113",
  "MD5sum": "f567f08eb4ffe4a19118bffeff45d0c4",
  "_user": "cran",
  "_type": "src",
  "_file": "MDP2_2.2.2.0.tar.gz",
  "_fileid": "32a610c99df1414f87550ae745d7b7c4666a78b7628dcf8c0aac0b5bfda9e976",
  "_filesize": 3126833,
  "_sha256": "32a610c99df1414f87550ae745d7b7c4666a78b7628dcf8c0aac0b5bfda9e976",
  "_created": "2026-06-12T23:20:43.000Z",
  "_published": "2026-06-12T23:24:41.225Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 81139311867,
      "time": 170,
      "config": "linux-devel-arm64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7604716206"
    },
    {
      "job": 81139311883,
      "time": 165,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7604715286"
    },
    {
      "job": 81139311837,
      "time": 176,
      "config": "linux-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7604717444"
    },
    {
      "job": 81139311845,
      "time": 180,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7604718137"
    },
    {
      "job": 81138870114,
      "time": 255,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7604682705"
    },
    {
      "job": 81139311838,
      "time": 129,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "FAIL",
      "artifact": ""
    }
  ],
  "_buildurl": "https://github.com/r-universe/cran/actions/runs/27448547862",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/cran/MDP2",
  "_commit": {
    "id": "06cec2781a68a911a47aa64681b4c8bf6e500113",
    "author": "Lars Relund Nielsen <lars@relund.dk>",
    "committer": "cran-robot <csardi.gabor+cran@gmail.com>",
    "message": "version 2.2.2.0\n",
    "time": 1781292614
  },
  "_maintainer": {
    "name": "Lars Relund Nielsen",
    "email": "lars@relund.dk",
    "orcid": "0000-0002-4802-3071"
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 4.1.0",
      "role": "Depends"
    },
    {
      "package": "Rcpp",
      "role": "LinkingTo"
    },
    {
      "package": "RcppArmadillo",
      "role": "LinkingTo"
    },
    {
      "package": "diagram",
      "role": "Imports"
    },
    {
      "package": "dplyr",
      "role": "Imports"
    },
    {
      "package": "stringr",
      "role": "Imports"
    },
    {
      "package": "tidyr",
      "role": "Imports"
    },
    {
      "package": "magrittr",
      "role": "Imports"
    },
    {
      "package": "methods",
      "role": "Imports"
    },
    {
      "package": "purrr",
      "role": "Imports"
    },
    {
      "package": "rlang",
      "role": "Imports"
    },
    {
      "package": "tibble",
      "role": "Imports"
    },
    {
      "package": "Rcpp",
      "version": ">= 0.11.5",
      "role": "Imports"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "Matrix",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    },
    {
      "package": "readr",
      "role": "Suggests"
    },
    {
      "package": "xml2",
      "role": "Suggests"
    },
    {
      "package": "covr",
      "role": "Suggests"
    },
    {
      "package": "roxygen2",
      "role": "Suggests"
    }
  ],
  "_owner": "cran",
  "_selfowned": false,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2026-24",
      "n": 1
    }
  ],
  "_tags": [
    {
      "name": "2.2.2.0",
      "date": "2026-06-12"
    }
  ],
  "_stars": 0,
  "_userbio": {
    "uuid": 6899542,
    "type": "organization",
    "name": "cran",
    "description": "Unofficial read-only mirror of all CRAN R packages"
  },
  "_downloads": {
    "count": 4,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/MDP2"
  },
  "_devurl": "https://github.com/relund/mdp",
  "_pkgdown": "https://relund.github.io/mdp/",
  "_searchresults": 41,
  "_topics": [
    "openblas",
    "cpp"
  ],
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/MDP2.html",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "manual.pdf"
  ],
  "_cranurl": false,
  "_releases": [
    {
      "version": "2.1.2",
      "date": "2023-01-31"
    },
    {
      "version": "2.2.2.0",
      "date": "2026-06-12"
    }
  ],
  "_exports": [
    "binaryActionWriter",
    "binaryMDPWriter",
    "convertBinary2HMP",
    "convertHMP2Binary",
    "getBinInfoActions",
    "getBinInfoStates",
    "getHypergraph",
    "getInfo",
    "getPolicy",
    "getRPO",
    "getSteadyStatePr",
    "getWIdx",
    "hmpMDPWriter",
    "loadMDP",
    "memoryMDPWriter",
    "plotHypergraph",
    "randomHMDP",
    "runCalcWeights",
    "runPolicyIteAve",
    "runPolicyIteDiscount",
    "runValueIte",
    "saveMDP",
    "setPolicy"
  ],
  "_help": [
    {
      "page": "binaryActionWriter",
      "title": "Function for writing actions of a HMDP model to binary files. The function defines sub-functions which can be used to define actions saved in a set of binary files. It is assumed that the states have been defined using 'binaryMDPWriter' and that the id of the states is known (can be retrieved using e.g. 'stateIdxDf').",
      "topics": [
        "binaryActionWriter"
      ]
    },
    {
      "page": "binaryMDPWriter",
      "title": "Function for writing an HMDP model to binary files. The function defines sub-functions which can be used to define an HMDP model saved in a set of binary files.",
      "topics": [
        "binaryMDPWriter"
      ]
    },
    {
      "page": "convertBinary2HMP",
      "title": "Convert a HMDP model stored in binary format to a 'hmp' (XML) file. The function simply parse the binary files and create 'hmp' files using the 'hmpMDPWriter()'.",
      "topics": [
        "convertBinary2HMP"
      ]
    },
    {
      "page": "convertHMP2Binary",
      "title": "Convert a HMDP model stored in a hmp (xml) file to binary file format.",
      "topics": [
        "convertHMP2Binary"
      ]
    },
    {
      "page": "getBinInfoActions",
      "title": "Info about the actions in the HMDP model under consideration.",
      "topics": [
        "getBinInfoActions"
      ]
    },
    {
      "page": "getBinInfoStates",
      "title": "Info about the states in the binary files of the HMDP model under consideration.",
      "topics": [
        "getBinInfoStates"
      ]
    },
    {
      "page": "getHypergraph",
      "title": "Return the (parts of) state-expanded hypergraph",
      "topics": [
        "getHypergraph"
      ]
    },
    {
      "page": "getInfo",
      "title": "Information about the MDP",
      "topics": [
        "getInfo"
      ]
    },
    {
      "page": "getPolicy",
      "title": "Get parts of the optimal policy.",
      "topics": [
        "getPolicy"
      ]
    },
    {
      "page": "getRPO",
      "title": "Calculate the retention pay-off (RPO) or opportunity cost for some states.",
      "topics": [
        "getRPO"
      ]
    },
    {
      "page": "getSteadyStatePr",
      "title": "Calculate the steady state transition probabilities for the founder process (level 0).",
      "topics": [
        "getSteadyStatePr"
      ]
    },
    {
      "page": "getWIdx",
      "title": "Return the index of a weight in the model. Note that index always start from zero (C++ style), i.e. the first weight, the first state at a stage etc has index 0.",
      "topics": [
        "getWIdx"
      ]
    },
    {
      "page": "hmpMDPWriter",
      "title": "Function for writing an HMDP model to a hmp file (XML). The function define sub-functions which can be used to define an HMDP model stored in a hmp file.",
      "topics": [
        "hmpMDPWriter"
      ]
    },
    {
      "page": "loadMDP",
      "title": "Load the HMDP model defined in the binary files. The model are created in memory using the external C++ library.",
      "topics": [
        "loadMDP"
      ]
    },
    {
      "page": "memoryMDPWriter",
      "title": "Function for building an HMDP model directly in memory.",
      "topics": [
        "memoryMDPWriter"
      ]
    },
    {
      "page": "plot.HMDP",
      "title": "Plot the state-expanded hypergraph of the MDP.",
      "topics": [
        "plot.HMDP"
      ]
    },
    {
      "page": "plotHypergraph",
      "title": "Plot parts of the state expanded hypergraph.",
      "topics": [
        "plotHypergraph"
      ]
    },
    {
      "page": "randomHMDP",
      "title": "Generate a \"random\" HMDP stored in a set of binary files.",
      "topics": [
        "randomHMDP"
      ]
    },
    {
      "page": "runCalcWeights",
      "title": "Calculate weights based on current policy. Normally run after an optimal policy has been found.",
      "topics": [
        "runCalcWeights"
      ]
    },
    {
      "page": "runPolicyIteAve",
      "title": "Perform policy iteration using the average expected-weight Bellman operator on the MDP.",
      "topics": [
        "runPolicyIteAve"
      ]
    },
    {
      "page": "runPolicyIteDiscount",
      "title": "Perform policy iteration using the discounted expected-weight Bellman operator on the MDP.",
      "topics": [
        "runPolicyIteDiscount"
      ]
    },
    {
      "page": "runValueIte",
      "title": "Perform value iteration on the MDP.",
      "topics": [
        "runValueIte"
      ]
    },
    {
      "page": "saveMDP",
      "title": "Save the MDP to binary files",
      "topics": [
        "saveMDP"
      ]
    },
    {
      "page": "setPolicy",
      "title": "Modify the current policy by setting policy action of states.",
      "topics": [
        "setPolicy"
      ]
    }
  ],
  "_readme": "https://github.com/cran/MDP2/raw/HEAD/README.md",
  "_rundeps": [
    "cli",
    "cpp11",
    "diagram",
    "dplyr",
    "generics",
    "glue",
    "lifecycle",
    "magrittr",
    "pillar",
    "pkgconfig",
    "purrr",
    "R6",
    "Rcpp",
    "RcppArmadillo",
    "rlang",
    "shape",
    "stringi",
    "stringr",
    "tibble",
    "tidyr",
    "tidyselect",
    "utf8",
    "vctrs",
    "withr"
  ],
  "_sysdeps": [
    {
      "shlib": "liblapack",
      "package": "libopenblas0-pthread",
      "source": "openblas",
      "version": "0.3.26+ds-1ubuntu0.1",
      "name": "openblas",
      "homepage": "https://www.openblas.net/",
      "description": "Optimized BLAS (linear algebra) library (shared lib, pthread)"
    },
    {
      "shlib": "libstdc++",
      "package": "libstdc++6",
      "source": "gcc",
      "version": "14.2.0-4ubuntu2~24.04.1",
      "name": "c++",
      "homepage": "http://gcc.gnu.org/",
      "description": "GNU Standard C++ Library v3"
    }
  ],
  "_vignettes": [
    {
      "source": "building.Rmd",
      "filename": "building.html",
      "title": "Building an MDP model",
      "author": "Lars Relund lars@relund.dk",
      "engine": "knitr::rmarkdown",
      "headings": [
        "An infinite semi-MDP",
        "A finite-horizon semi-MDP",
        "An infinite-horizon HMDP",
        "References"
      ],
      "created": "2023-01-31 15:20:03",
      "modified": "2026-06-12 19:30:14",
      "commits": 2
    },
    {
      "source": "finite-mdp.Rmd",
      "filename": "finite-mdp.html",
      "title": "Solving a finite-horizon semi-MDP",
      "author": "Lars Relund lars@relund.dk",
      "engine": "knitr::rmarkdown",
      "headings": [
        "A finite-horizon semi-MDP",
        "Example",
        "References"
      ],
      "created": "2023-01-31 15:20:03",
      "modified": "2026-06-12 19:30:14",
      "commits": 2
    },
    {
      "source": "infinite-hmdp.Rmd",
      "filename": "infinite-hmdp.html",
      "title": "An infinite-horizon HMDP",
      "author": "Lars Relund lars@relund.dk",
      "engine": "knitr::rmarkdown",
      "headings": [
        "An infinite-horizon HMDP",
        "Example",
        "References"
      ],
      "created": "2023-01-31 15:20:03",
      "modified": "2023-01-31 15:20:03",
      "commits": 1
    },
    {
      "source": "infinite-mdp.Rmd",
      "filename": "infinite-mdp.html",
      "title": "Solving an infinite-horizon semi-MDP",
      "author": "Lars Relund lars@relund.dk",
      "engine": "knitr::rmarkdown",
      "headings": [
        "An infinite-horizon semi-MDP",
        "Example",
        "References"
      ],
      "created": "2023-01-31 15:20:03",
      "modified": "2026-06-12 19:30:14",
      "commits": 2
    },
    {
      "source": "mdp2.Rmd",
      "filename": "mdp2.html",
      "title": "The MDP2 package",
      "author": "Lars Relund lars@relund.dk",
      "engine": "knitr::rmarkdown",
      "headings": [
        "References"
      ],
      "created": "2023-01-31 15:20:03",
      "modified": "2023-01-31 15:20:03",
      "commits": 1
    }
  ],
  "_score": 4.010723865391773,
  "_indexed": true,
  "_nocasepkg": "mdp2",
  "_universes": [
    "cran",
    "relund"
  ],
  "_previous": "2.1.2",
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "2.2.2.0",
      "date": "2026-06-12T23:23:19.000Z",
      "distro": "noble",
      "arch": "aarch64",
      "commit": "06cec2781a68a911a47aa64681b4c8bf6e500113",
      "fileid": "d8329717e66f704b0124d8a0923bbacccb3c38f2dee567705343989977fdfd8a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/27448547862"
    },
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "2.2.2.0",
      "date": "2026-06-12T23:23:15.000Z",
      "distro": "noble",
      "arch": "x86_64",
      "commit": "06cec2781a68a911a47aa64681b4c8bf6e500113",
      "fileid": "28a5d01db02de1649ddabcb60b0ac450515a208b56979a65fc775fc106337d9b",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/27448547862"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "2.2.2.0",
      "date": "2026-06-12T23:23:29.000Z",
      "distro": "noble",
      "arch": "aarch64",
      "commit": "06cec2781a68a911a47aa64681b4c8bf6e500113",
      "fileid": "ddaa9568dc22c197638a6ee085fca2a19837cbece36727b463b783acc00f8782",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/27448547862"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "2.2.2.0",
      "date": "2026-06-12T23:23:28.000Z",
      "distro": "noble",
      "arch": "x86_64",
      "commit": "06cec2781a68a911a47aa64681b4c8bf6e500113",
      "fileid": "e78895926300f678bcac0bc62b27f1ad2f447ed281e3fe38fe77cb18ce0db879",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/27448547862"
    }
  ]
}