lo1 <- list()
lo1$sense <- "max"
lo1$c <- c(3,1,5,1)
lo1$A <- Matrix(c(3,1,2,0,
2,1,3,1,
0,2,0,3), nrow=3, byrow=TRUE, sparse=TRUE)
lo1$blc <- c(30,15,-Inf)
lo1$buc <- c(30,Inf,25)
lo1$blx <- c(0,0,0,0)
lo1$bux <- c(Inf,10,Inf,Inf)
rr <- mosek_write(lo1, "lo1.opf")
if (is.null(rr) || !identical(rr$response$code, 0))
stop("Failed to write model file to current working directory")
Run the code above in your browser using DataLab