# NOT RUN {
## generate item pool
set.seed(123456)
items <- Rirt::model_mixed_gendata(1, n_3pl=200)$items
## Ex. 1: 1-2-2 MST, 2 panels, 20 items, topdown
## maximize info. at -1 and 1 for easy and hard routes
x <- mst(items, "1-2-2", n_panels=2, method='topdown', test_len=10, max_use=1)
x <- mst_objective(x, -1, indices=1:2)
x <- mst_objective(x, 1, indices=3:4)
x <- mst_assemble(x, 'lpsolve', time_limit=30)
plot(x, byroute=TRUE, label=TRUE)
## Ex. 2: 1-2-3 MST, 2 panels, bottomup,
## remove two routes with large theta change: 1-2-6, 1-3-4
## 10 items in each module, content= and 3 items in content area 1 in each module
## maximize info. at -1, 0 and 1 for easy, medium, and hard modules
x <- mst(items, "1-2-3", 1, 'bottomup', len=10, max_use=1)
x <- mst_route(x, c(1, 2, 6), "-")
x <- mst_route(x, c(1, 3, 4), "-")
x <- mst_objective(x, 0, indices=c(1, 5))
x <- mst_objective(x, -1, indices=c(2, 4))
x <- mst_objective(x, 1, indices=c(3, 6))
x <- mst_assemble(x, timeout=30)
plot(x, byroute=FALSE)
plot(x, byroute=TRUE)
# }
Run the code above in your browser using DataLab