dirkschumacher / ompr

R package to model Mixed Integer Linear Programs
https://dirkschumacher.github.io/ompr/
Other
268 stars 35 forks source link

NEOS Server & Async Mode: Error: object of type 'closure' is not subsettable #418

Closed datadrivensupplychain closed 2 years ago

datadrivensupplychain commented 2 years ago

I have a pretty large MILPmodel that I'm trying to solve using CPLEX on the NEOS server. When I set wait=TRUE in the solver controls, the job successfully returns from the NEOS server (on a slimmed down version of the model). But when I try asynchrous mode (wait = FALSE) I get everyone's favorite useless R error.

 solution_neos <- ompr::solve_model(my_model,with_ROI(solver = "neos",
method='cplex', email = 'myemail@gmail.com', wait=FALSE)) #argument wait=FALSE for asynchronous solves.

Error: object of type 'closure' is not subsettable

Any idea on what's going on here? I'd really like to use asynchrous mode if possible, as I would want to send multiple versions of the same model to the NEOS server simultaneously.

Thanks Ralph ralph@datadrivensupplychain.com