# read the saved data
<- readRDS('d.RData') d
3. Run Optimisation
Run the program
Requirements:
The package Rcplex
needs to be correctly installed.
To understand more about what the data input should look like, please refer to the previous document: input data processing.
Check if the data look like the right format,
# check if the data is correctly loaded
$cvec
d$Amat
d$bvec
d$Qmat
d$lb
d$ub
d$sense d
Once you’re satisfied, run the following code chunk.
library(Rcplex)
# use data from the d list
<- Rcplex(cvec = d$cvec,
problem_1 Amat = d$Amat,
bvec = d$bvec,
Qmat = d$Qmat,
lb = d$lb,
ub = d$ub,
objsense ="min",
sense = d$sense)
To save the results for the future,
saveRDS(problem_1, file = 'result.RData')