Re: [ojAlgo-user] Knapsack problem with binary variables
Mathematics, linear algebra and optimisation
Brought to you by:
apete
From: Anders P. <an...@op...> - 2010-04-25 19:26:38
|
ok, but I think I'll have to call it makeBinary(...) /Anders On 25 apr 2010, at 21.01, Luke Lindsay wrote: > 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 > > ------------------------------------------------------------------------------ > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > |