a <- c(3000, 4000, 5000, 2000)
m <- c(100, 90, 70, 80)
M <- c(200, 150, 300, 210)
x1 <- dopt(n = 400, a, m)
s1 <- allocation_summary(x1, a, m)
x2 <- dopt(n = 540, a, m, M)
s2 <- allocation_summary(x2, a, m, M)
Run the code above in your browser using DataLab