Re: [ojAlgo-user] Knapsack problem with binary variables
Mathematics, linear algebra and optimisation
Brought to you by:
apete
From: Luke L. <luk...@gm...> - 2010-04-25 19:01:16
|
On 23 April 2010 22:57, Anders Peterson <an...@op...> wrote: > All your test cases (1 + 5) work now. > > Fixed a bug with the IntegerSolver related to determining if a branch-solution is an integer solution or not. > Fixed a bug with the ExpressionsBasedModel (that only affected integer models) that resulted in all models being treated as minimization models. > Changed/improved the LinearSolver. It generally seems better now, but there's actually a couple of unit tests that used to work that now fail. Not finished with this yet. > > /Anders > Thanks Anders. The new code works correctly with all cases I've tried so far. I was wondering if it would be possible to add a static factory method for creating binary variables since it would make my code more readable, e.g. public static Variable binary(final String aName){ return new Variable(aName).lower(ZERO).upper(ONE).integer(true); } Best, Luke |