refactor algorithms.lpsolve into class LPInstance