{
  "_id": "6adf12b2bf30f5f47f1a6e42",
  "Type": "Package",
  "Package": "MDP2",
  "Title": "Markov Decision Processes (MDPs)",
  "Version": "3.0.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-10-26 08:37:52 UTC",
    "User": "root"
  },
  "Repository": "https://cran.r-universe.dev",
  "Date/Publication": "2026-06-22 08:10:07 UTC",
  "RemoteUrl": "https://github.com/cran/MDP2",
  "RemoteRef": "HEAD",
  "RemoteSha": "5437dd4ca31e3f70224399f2214f668f0b23bd95",
  "_user": "cran",
  "_type": "src",
  "_file": "MDP2_3.0.0.tar.gz",
  "_fileid": "https://r2.ropensci.org/6f6f2945a6e28d284013f0d246c567c6d04f696a46d091df516a45fbd3f9803e",
  "_filesize": 3121124,
  "_sha256": "6f6f2945a6e28d284013f0d246c567c6d04f696a46d091df516a45fbd3f9803e",
  "_expires": "2027-02-03T08:43:28.000Z",
  "_created": "2026-10-26T08:37:52.000Z",
  "_published": "2026-10-26T08:43:30.479Z",
  "_upstream": "https://github.com/cran/MDP2",
  "_status": "success",
  "_maintainer": {
    "name": "Lars Relund Nielsen",
    "email": "lars@relund.dk",
    "orcid": "0000-0002-4802-3071"
  },
  "_jobs": [
    {
      "job": 121474478975,
      "time": 135,
      "config": "linux-devel-arm64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "12637945611"
    },
    {
      "job": 121474478997,
      "time": 168,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "12637327385"
    },
    {
      "job": 121474479074,
      "time": 168,
      "config": "linux-release-arm64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "12637970581"
    },
    {
      "job": 121474479073,
      "time": 168,
      "config": "linux-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "12637591425"
    },
    {
      "job": 121472956539,
      "time": 234,
      "config": "source",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "12637316790"
    },
    {
      "job": 121474479037,
      "time": 112,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "FAIL",
      "artifact": ""
    },
    {
      "job": 121474479006,
      "time": 236,
      "config": "windows-devel-arm64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "12637801253"
    },
    {
      "job": 121474479032,
      "time": 164,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "12637222432"
    },
    {
      "job": 121474479243,
      "time": 274,
      "config": "windows-release-arm64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "12637841730"
    },
    {
      "job": 121474479298,
      "time": 166,
      "config": "windows-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "12637177504"
    }
  ],
  "_buildurl": "https://github.com/r-universe/cran/actions/runs/40293168139",
  "_commit": {
    "id": "5437dd4ca31e3f70224399f2214f668f0b23bd95",
    "author": "Lars Relund Nielsen <lars@relund.dk>",
    "committer": "cran-robot <csardi.gabor+cran@gmail.com>",
    "message": "version 3.0.0\n",
    "time": 1782115807
  },
  "_distro": "resolute",
  "_host": "GitHub-Actions",
  "_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
    },
    {
      "week": "2026-26",
      "n": 1
    }
  ],
  "_tags": [
    {
      "name": "2.2.2.0",
      "date": "2026-06-12"
    },
    {
      "name": "3.0.0",
      "date": "2026-06-22"
    }
  ],
  "_stars": 0,
  "_userbio": {
    "uuid": 6899542,
    "type": "organization",
    "name": "cran",
    "followers": 634,
    "description": "Unofficial read-only mirror of all CRAN R packages"
  },
  "_downloads": {
    "count": 274,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/MDP2"
  },
  "_devurl": "https://github.com/relund/mdp",
  "_pkgdown": "https://relund.github.io/mdp/",
  "_searchresults": 33,
  "_topics": [
    "openblas",
    "cpp"
  ],
  "_rbuild": "4.6.1",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/manual.pdf",
    "extra/MDP2.html",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md"
  ],
  "_homeurl": "https://github.com/relund/mdp",
  "_realowner": "relund",
  "_cranurl": false,
  "_releases": [
    {
      "version": "2.1.2",
      "date": "2023-01-31"
    },
    {
      "version": "2.2.2.0",
      "date": "2026-06-12"
    },
    {
      "version": "3.0.0",
      "date": "2026-06-22"
    }
  ],
  "_exports": [
    "binary_action_writer",
    "binary_mdp_writer",
    "convert_binary_to_hmp",
    "convert_hmp_to_binary",
    "get_bin_info_actions",
    "get_bin_info_states",
    "get_hypergraph",
    "get_info",
    "get_policy",
    "get_rpo",
    "get_steady_state_pr",
    "get_w_idx",
    "hmp_mdp_writer",
    "load_mdp",
    "memory_mdp_writer",
    "plot_hypergraph",
    "random_hmdp",
    "run_calc_weights",
    "run_policy_ite_ave",
    "run_policy_ite_discount",
    "run_value_ite",
    "save_mdp",
    "set_policy"
  ],
  "_help": [
    {
      "page": "binary_action_writer",
      "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 'binary_mdp_writer' and that the id of the states is known (can be retrieved using e.g. 'state_idx_df').",
      "topics": [
        "binary_action_writer"
      ]
    },
    {
      "page": "binary_mdp_writer",
      "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": [
        "binary_mdp_writer"
      ]
    },
    {
      "page": "convert_binary_to_hmp",
      "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 'hmp_mdp_writer()'.",
      "topics": [
        "convert_binary_to_hmp"
      ]
    },
    {
      "page": "convert_hmp_to_binary",
      "title": "Convert a HMDP model stored in a hmp (xml) file to binary file format.",
      "topics": [
        "convert_hmp_to_binary"
      ]
    },
    {
      "page": "get_bin_info_actions",
      "title": "Info about the actions in the HMDP model under consideration.",
      "topics": [
        "get_bin_info_actions"
      ]
    },
    {
      "page": "get_bin_info_states",
      "title": "Info about the states in the binary files of the HMDP model under consideration.",
      "topics": [
        "get_bin_info_states"
      ]
    },
    {
      "page": "get_hypergraph",
      "title": "Return the (parts of) state-expanded hypergraph",
      "topics": [
        "get_hypergraph"
      ]
    },
    {
      "page": "get_info",
      "title": "Information about the MDP",
      "topics": [
        "get_info"
      ]
    },
    {
      "page": "get_policy",
      "title": "Get parts of the optimal policy.",
      "topics": [
        "get_policy"
      ]
    },
    {
      "page": "get_rpo",
      "title": "Calculate the retention pay-off (RPO) or opportunity cost for some states.",
      "topics": [
        "get_rpo"
      ]
    },
    {
      "page": "get_steady_state_pr",
      "title": "Calculate the steady state transition probabilities for the founder process (level 0).",
      "topics": [
        "get_steady_state_pr"
      ]
    },
    {
      "page": "get_w_idx",
      "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": [
        "get_w_idx"
      ]
    },
    {
      "page": "hmp_mdp_writer",
      "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": [
        "hmp_mdp_writer"
      ]
    },
    {
      "page": "load_mdp",
      "title": "Load the HMDP model defined in the binary files. The model are created in memory using the external C++ library.",
      "topics": [
        "load_mdp"
      ]
    },
    {
      "page": "memory_mdp_writer",
      "title": "Function for building an HMDP model directly in memory.",
      "topics": [
        "memory_mdp_writer"
      ]
    },
    {
      "page": "plot_hypergraph",
      "title": "Plot parts of the state expanded hypergraph.",
      "topics": [
        "plot_hypergraph"
      ]
    },
    {
      "page": "plot.HMDP",
      "title": "Plot the state-expanded hypergraph of the MDP.",
      "topics": [
        "plot.HMDP"
      ]
    },
    {
      "page": "random_hmdp",
      "title": "Generate a \"random\" HMDP stored in a set of binary files.",
      "topics": [
        "random_hmdp"
      ]
    },
    {
      "page": "run_calc_weights",
      "title": "Calculate weights based on current policy. Normally run after an optimal policy has been found.",
      "topics": [
        "run_calc_weights"
      ]
    },
    {
      "page": "run_policy_ite_ave",
      "title": "Perform policy iteration using the average expected-weight Bellman operator on the MDP.",
      "topics": [
        "run_policy_ite_ave"
      ]
    },
    {
      "page": "run_policy_ite_discount",
      "title": "Perform policy iteration using the discounted expected-weight Bellman operator on the MDP.",
      "topics": [
        "run_policy_ite_discount"
      ]
    },
    {
      "page": "run_value_ite",
      "title": "Perform value iteration on the MDP.",
      "topics": [
        "run_value_ite"
      ]
    },
    {
      "page": "save_mdp",
      "title": "Save the MDP to binary files",
      "topics": [
        "save_mdp"
      ]
    },
    {
      "page": "set_policy",
      "title": "Modify the current policy by setting policy action of states.",
      "topics": [
        "set_policy"
      ]
    }
  ],
  "_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.32+ds-5",
      "name": "openblas",
      "homepage": "https://www.openblas.net/",
      "description": "Optimized BLAS (linear algebra) library (shared lib, pthread)"
    },
    {
      "shlib": "libstdc++",
      "package": "libstdc++6",
      "source": "gcc",
      "version": "16-20260322-1ubuntu1",
      "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-22 08:10:07",
      "commits": 3
    },
    {
      "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-22 08:10:07",
      "commits": 3
    },
    {
      "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": "2026-06-22 08:10:07",
      "commits": 2
    },
    {
      "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-22 08:10:07",
      "commits": 3
    },
    {
      "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": "2026-06-22 08:10:07",
      "commits": 2
    }
  ],
  "_score": 4.217483944213907,
  "_indexed": false,
  "_nocasepkg": "mdp2",
  "_universes": [
    "cran"
  ],
  "_indexurl": "https://relund.r-universe.dev/MDP2",
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "3.0.0",
      "date": "2026-10-26T08:39:59.000Z",
      "distro": "resolute",
      "arch": "aarch64",
      "commit": "5437dd4ca31e3f70224399f2214f668f0b23bd95",
      "fileid": "https://r2.ropensci.org/4192bf1eb1c82cafd76c25b65a8eda3db0f19683499f6062ca2c893e0deae281",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/40293168139"
    },
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "3.0.0",
      "date": "2026-10-26T08:40:17.000Z",
      "distro": "resolute",
      "arch": "x86_64",
      "commit": "5437dd4ca31e3f70224399f2214f668f0b23bd95",
      "fileid": "https://r2.ropensci.org/5ccd5a83b8c782815e7893aa55b312cfffc0604aa86f5606429e3532da04c234",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/40293168139"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "3.0.0",
      "date": "2026-10-26T08:40:31.000Z",
      "distro": "resolute",
      "arch": "aarch64",
      "commit": "5437dd4ca31e3f70224399f2214f668f0b23bd95",
      "fileid": "https://r2.ropensci.org/8ac45d19410118e0fc2912aedb96dd61cff7f2a90b4306c7335f54f058fa05ea",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/40293168139"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "3.0.0",
      "date": "2026-10-26T08:40:20.000Z",
      "distro": "resolute",
      "arch": "x86_64",
      "commit": "5437dd4ca31e3f70224399f2214f668f0b23bd95",
      "fileid": "https://r2.ropensci.org/5fe04f5de71b32954ff6c4a232a2c711de5c3acb82b42658b406e931c9ddee22",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/40293168139"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "3.0.0",
      "date": "2026-10-26T08:41:11.000Z",
      "arch": "aarch64",
      "commit": "5437dd4ca31e3f70224399f2214f668f0b23bd95",
      "fileid": "https://r2.ropensci.org/4493e52b7530122b2e5e27773d5940abc16b1d669738295bb484952385d89119",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/40293168139"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "3.0.0",
      "date": "2026-10-26T08:39:36.000Z",
      "arch": "x86_64",
      "commit": "5437dd4ca31e3f70224399f2214f668f0b23bd95",
      "fileid": "https://r2.ropensci.org/e7ba260f02a6cacb38944658485c2f4fbc53a72d99e5a2a1513e6e4d81a92ca0",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/40293168139"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "3.0.0",
      "date": "2026-10-26T08:41:52.000Z",
      "arch": "aarch64",
      "commit": "5437dd4ca31e3f70224399f2214f668f0b23bd95",
      "fileid": "https://r2.ropensci.org/5a22e432bcc76c5b53d98599d7204161de8b04f10d73031807c20a0acb7f1931",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/40293168139"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "3.0.0",
      "date": "2026-10-26T08:39:29.000Z",
      "arch": "x86_64",
      "commit": "5437dd4ca31e3f70224399f2214f668f0b23bd95",
      "fileid": "https://r2.ropensci.org/edc3079ca7c3a8d89d45218c87f15209bb08b8b472d7f4aef259f02ec11416d2",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/40293168139"
    }
  ]
}