conroylau / lpinfer

lpinfer: An R Package for Inference in Linear Programs
GNU General Public License v3.0
3 stars 5 forks source link

Estimate = false doesn't work for estbounds #47

Closed a-torgovitsky closed 4 years ago

a-torgovitsky commented 4 years ago
r <- estbounds(data, lpm, solver = "gurobi", norm = 1, kappa = .1,
               estimate = FALSE) 

seems to exit ok, but then I get

> str(r)
List of 6
 $ ub    : num(0) 
 $ lb    : num(0) 
 $ est   : logi FALSE
 $ call  : language estbounds(data = data, lpmodel = lpm, kappa = 0.1, norm = 1, solver = "gurobi", estimate = FALSE)
 $ norm  : num 1
 $ solver: chr "gurobi"
 - attr(*, "class")= chr "estbounds"

So apparently nothing happened

conroylau commented 4 years ago

Done! I have fixed the bug that caused the problem here, which prevented the module from estimating the bounds although the original problem is infeasible.

Since the original problem is infeasible, the above code will give the estimated bounds as follows:

> summary(r)
Estimated bounds: [0.05273, 0.47834] 
Norm used: 1 
Solver: gurobi 

Thanks!