njtierney / maxcovr

Tools in R to make it easier to solve the Maximal Coverage Location Problem
http://maxcovr.njtierney.com/
GNU General Public License v3.0
42 stars 11 forks source link

include early error catching #29

Open njtierney opened 7 years ago

njtierney commented 7 years ago

Similar in spirit to what is suggested in the writing APIs in R, it would be good if the model returned an informative error message if lpSolve doesn't work.

Currently lpSolve will return an error in the print method, like "model build failed ... < msg >".

maxcovr should parse this error and turn it into an R error and return a useful object to the end user.