Re: [ojAlgo-user] Removing Equalities and Inequalities methods
Mathematics, linear algebra and optimisation
Brought to you by:
apete
From: Andy B. <ber...@gm...> - 2012-05-22 15:58:53
|
Anders, My apologies, I had a few mistakes. First, I didn't realize the Bold and Underlines show up as asterisks in posts (or don't show up at all) so you couldn't see the 3 errors I was referring to. The first error I had was a Method not Found, for the equalities method, such as in: .equalities(AE_ms,BE_ms), or in your reply: Second, it turns out the above error (plus the others) were entirely my fault. I had multiple Workspaces open in Eclipse and when I compiled the code the Ant Build went fine, created the JAR files, and reported a successful build. I didn't see the compile errors listed in another (Markers) Window in Eclipse (i looked at the wrong workspace I am guessing). I also didn't realize that the Ant Build can report a successful build in the Console window and create JAR files, but actually have compile errors for the code. Learned something new for the day :-). So, I redid the download and compiled V32.5 successfully (based on the build.properties file) with no errors (but with some warnings about deprecated code, etc). However, I still have one (new)issue, my code can no longer find the import (in v32.5): import org.ojalgo.optimisation.OptimisationSolver; To 'check' my compile, I downloaded your compiled JAR file ojalgo-32.0.jar and my code COULD then find the above import and runs fine. Has the OptimisationSolver class been permanently removed post v32.0? I searched my workspace for 'OptimisationSolver' and came up with 3 occurrences, 2 commented out and 1 in a comment. I will try the solution you mentioned below regardless, but could you confirm that OptimisationSolver has been deprecated? Thanks Much, Andy >You don't say what kind of errors you get. Does your program compile? > >Doing this: > >new QuadraticSolver.Builder(tmpQ, tmpC).equalities(tmpAE, tmpBE).inequalities(tmpAI, tmpBI).build().solve(); > >has not been deprecated, and currently there are no plans to do that. I have several unit tests that build the model precisely that way, and as far as I can see they all still work.> > >/Anders <snip> just left a small snippet of the original post can't find the OptimisationSolver anymore referenced below.... QuadraticSolver.Builder tmpBuilder = new QuadraticSolver.Builder(Q_ms, C_ms).*equalities*(AE_ms, BE_ms).inequalities(AI_ms, BI_ms); QuadraticSolver tmpSolver = tmpBuilder.build(); tmpSolver.*options.*timeLimit = Long.MAX_VALUE; OptimisationSolver.Result tmpResult = tmpSolver.*solve*(); BasicMatrix tmpSolution = tmpResult.getSolution(); PhysicalStore<Double> result = tmpSolution.toPrimitiveStore(); <snip> |