Closed geraintpalmer closed 3 years ago
The lpSolve model works whemn there are no binary constraints. It runs forever (I crash it after 5 hours) for binary constraints required.
Yeah this is hanging for me also... :(
Ran no problem with:
sol <- lp("min", f.obj, f.con, f.dir, f.rhs, all.bin = FALSE) # Notice all.bin = FALSE. We need this to be TRUE, but it takes forever.
but as soon as I ran:
sol <- lp("min", f.obj, f.con, f.dir, f.rhs, all.bin = TRUE) # Notice all.bin = FALSE. We need this to be TRUE, but it takes forever.
I haven't looked too closely at the code itself but have you managed to get a smaller version of the problem working with all.bin=TRUE
? (Even nonsensically small?)
Worth us having a chat perhaps to see what we can do...
Don't worry we'll figure it out :)
Closing this as we're now using ROI for linear programming in R not lpSolve.
@drvinceknight
Please could you review this code.
The lpSolve model works whemn there are no binary constraints. It runs forever (I crash it after 5 hours) for binary constraints required. At the bottom I plug in a solution from PuLP to chekc this is not infeasible, and it seems fine.