
R version 4.0.3 Patched (2020-12-16 r79646) -- "Bunny-Wunnies Freak Out"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> ## additional test cases
> ## these are run for avoidance of errors only
> ## no testoutput is created
> require(DoE.MIParray)
Loading required package: DoE.MIParray
> 
> mosek_nonverboseparams <- list(dparam=list(LOWER_OBJ_CUT = 0.5,
+                                 MIO_TOL_ABS_GAP = 0.2, INTPNT_CO_TOL_PFEAS = 1e-05,
+                                 INTPNT_CO_TOL_INFEAS = 1e-07), iparam=list(LOG=0))
> 
> if (require(gurobi)){
+ aus <- gurobi_MIParray(50, c(2,2,2,5,5), 2, gurobi.params = list(OutputFlag=0))
+ ## next command must throw an error
+ if (require(Rmosek)){
+   if (packageVersion("Rmosek") >= "8.0.69" && Rmosek::mosek_version()>="8.1.0.23"){
+     try(mosek_MIPcontinue(aus))
+     aus3improvem <- mosek_MIPcontinue(aus, improve=FALSE, maxtime=12,
+                                       mosek.params = mosek_nonverboseparams)  ## fast with mosek
+     aus4improvem <- mosek_MIPcontinue(aus3improvem, improve=FALSE, maxtime=12,
+                                       mosek.params = mosek_nonverboseparams) ## longer time doesn't help either
+   }
+ }
+ }
Loading required package: gurobi
Loading required package: slam
no violation of necessary criteria  for strength  1  was found
=== GWLP after enforcing resolution ===
    0     1     2     3     4     5 
1.000 0.000 1.068 1.018 0.815 0.098 
=======================================
=== GWLP after optimizing A2 ===
    0     1     2     3     4     5 
1.000 0.000 0.005 1.456 1.194 0.346 
=================================
Loading required package: Rmosek
Loading required package: Matrix
Error in mosek_MIPcontinue(aus) : 
  improvement unnecessary, already optimal
Acquiring MOSEK environment
=== GWLP after optimizing A3 ===
    0     1     2     3     4     5 
1.000 0.000 0.005 0.230 2.765 0.000 
=================================
Releasing MOSEK environment
Acquiring MOSEK environment
=== GWLP after optimizing A4 ===
    0     1     2     3     4     5 
1.000 0.000 0.005 0.230 2.765 0.000 
=================================
Releasing MOSEK environment
> 
> if (require(gurobi) && require(Rmosek)){
+   if (packageVersion("Rmosek") >= "8.0.69" && Rmosek::mosek_version()>="8.1.0.23"){
+     aus <- gurobi_MIParray(50, c(2,2,2,5,5), 2, find.only=TRUE, gurobi.params = list(OutputFlag=0))
+     aus <- mosek_MIPcontinue(aus, maxtime=12, mosek.params = mosek_nonverboseparams)
+     aus3improveg <- gurobi_MIPcontinue(aus, improve=FALSE, maxtime=20, gurobi.params = list(OutputFlag=0))  ## will not succeed to 576
+     aus4improvem <- mosek_MIPcontinue(aus3improveg, improve=FALSE, maxtime=20, mosek.params = mosek_nonverboseparams)
+   }
+   }
no violation of necessary criteria  for strength  1  was found
=== GWLP after enforcing resolution ===
    0     1     2     3     4     5 
1.000 0.000 1.068 1.018 0.815 0.098 
=======================================
Acquiring MOSEK environment
=== GWLP after further improving A2 ===
    0     1     2     3     4     5 
1.000 0.000 0.005 1.920 0.858 0.218 
=================================
Releasing MOSEK environment
=== GWLP after minimizing A3===
    0     1     2     3     4     5 
1.000 0.000 0.005 0.614 2.189 0.192 
=======================================
Acquiring MOSEK environment
=== GWLP after optimizing A4 ===
    0     1     2     3     4     5 
1.000 0.000 0.005 0.614 2.189 0.192 
=================================
Releasing MOSEK environment
> 
> 
> ## use case for which the initial array is optimal, although find.only
> ##   has not been specified; treated internally by setting find.only to TRUE
> if (require(Rmosek))
+   if (packageVersion("Rmosek") >= "8.0.69" && Rmosek::mosek_version()>="8.1.0.23")
+     ausm <- mosek_MIParray(1008, c(42, 12, 6), mosek.params = mosek_nonverboseparams)
no violation of necessary criteria  for strength  2  was found
Acquiring MOSEK environment
=== GWLP after enforcing resolution ===
0 1 2 3 
1 0 0 2 
=======================================
The initial enforcement of resolution yielded the optimal A3.
Releasing MOSEK environment
> if (require(gurobi))
+     ausg <- gurobi_MIParray(1008, c(42, 12, 6), gurobi.params = list(OutputFlag=0))
no violation of necessary criteria  for strength  2  was found
=== GWLP after enforcing resolution ===
0 1 2 3 
1 0 0 2 
=======================================
The initial enforcement of resolution yielded the optimal A3.
> 
> if (require(gurobi) && require(Rmosek)){
+   if (packageVersion("Rmosek") >= "8.0.69" && Rmosek::mosek_version()>="8.1.0.23"){
+     ## improve=FALSE must yield an error
+     ## improve=TRUE does not make sense
+     try(mosek_MIPcontinue(ausm, mosek.params = mosek_nonverboseparams))
+     try(mosek_MIPcontinue(ausg, mosek.params = mosek_nonverboseparams))
+     try(gurobi_MIPcontinue(ausm, gurobi.params = list(OutputFlag=0)))
+     try(gurobi_MIPcontinue(ausg, gurobi.params = list(OutputFlag=0)))
+   }
+ }
Error in mosek_MIPcontinue(ausm, mosek.params = mosek_nonverboseparams) : 
  improvement unnecessary, already optimal
Error in mosek_MIPcontinue(ausg, mosek.params = mosek_nonverboseparams) : 
  improvement unnecessary, already optimal
Error in gurobi_MIPcontinue(ausm, gurobi.params = list(OutputFlag = 0)) : 
  improvement unnecessary, already optimal
Error in gurobi_MIPcontinue(ausg, gurobi.params = list(OutputFlag = 0)) : 
  improvement unnecessary, already optimal
> 
> ## designs found with find.only=TRUE
> ## make sure to leave them in the state they would be in after
> ## an actual optimization attempt of A_R (even if they are proven optimal)
> if (require(Rmosek))
+   if (packageVersion("Rmosek") >= "8.0.69" && Rmosek::mosek_version()>="8.1.0.23"){
+     ausm <- mosek_MIParray(168, c(42,12,6), 2, find.only = TRUE, mosek.params = mosek_nonverboseparams)  ## very fast
+     ausmimproved <- mosek_MIPcontinue(ausm, maxtime=10, mosek.params = mosek_nonverboseparams)  ## will not improve
+   }
no violation of necessary criteria  for strength  1  was found
Acquiring MOSEK environment
=== GWLP after enforcing resolution ===
     0      1      2      3 
 1.000  0.000  3.566 13.434 
=======================================
Releasing MOSEK environment
Acquiring MOSEK environment
=== GWLP after further improving A2 ===
     0      1      2      3 
 1.000  0.000  3.566 13.434 
=================================
Releasing MOSEK environment
> if (require(gurobi)){
+   ausg <- gurobi_MIParray(168, c(42,12,6), 2, find.only = TRUE, gurobi.params = list(OutputFlag=0))  ## very fast
+   ausgimproved <- gurobi_MIPcontinue(ausg, improve=FALSE, maxtime=10, gurobi.params = list(OutputFlag=0)) ## will not improve
+ }
no violation of necessary criteria  for strength  1  was found
=== GWLP after enforcing resolution ===
     0      1      2      3 
 1.000  0.000  4.311 12.689 
=======================================
=== GWLP after further improving A2 ==========
     0      1      2      3 
 1.000  0.000  4.311 12.689 
=======================================
Warning message:
In gurobi_MIPcontinue(ausg, improve = FALSE, maxtime = 10, gurobi.params = list(OutputFlag = 0)) :
  improve was set to TRUE, because A_3 is a consequence of earlier GWLP elements.
> 
> proc.time()
   user  system elapsed 
 292.75    3.07  241.79 
