Re: [ojAlgo-user] solving a linear optimization problem with ojAlgo ?
Mathematics, linear algebra and optimisation
Brought to you by:
apete
From: Anders P. <an...@op...> - 2008-01-05 00:39:51
|
If you you have 50 variables and several hundred equations there =20 typically is no feasible solution. You can get a "best fit" solution using the QR or SVD decompositions =20 but those cannot handle the constraints/inequalities that the =20 variables must be non-negative. You'll have to invent something to =20 handle that. /Anders On 4 jan 2008, at 16.51, Andreas Andreakis wrote: > hi, > > I want to find a solution to the following problem: > > (explained by example) > 1 *c1 + 4 * c2 + 4* c3 + 4 * c4 =3D 2.5 > 1 *c1 + 4 * c2 + 1* c3 + 4 * c4 =3D 3.0 > > here the constraints: > 1) c1+c2+c3+c4 =3D 1 (of course this could be expressed as an =20 > additional equation: c1 + c2 + c3 + c4 =3D 1.0) > 2) c1,c2,c3 and c4 are all positive > > Important is that I need only one and feasible solution, thus the =20 > computation should be as fast as possible. So there is no need to =20 > search for every possible result. > And it needs to work with doubles (not only integers, because some =20 > libraries work only with integers) > > Actually the solution needs to scale for several dozens c=B4s ( there =20= > will not be only 4 like c1,c2,c3,c4), but more like 50 c1, =20 > c2,...,c49, c50 > And there will not be only two equations (like in the example) but =20 > several hundred. > > > So the questions are: > 1) can I find a solution using ojAlgo ? > 2) how will the performance be ? > 3) could you give me a code snipped which is able to compute the =20 > given example ? (I will generalize it then myself) > > kind regards, > Andreas > ----------------------------------------------------------------------=20= > --- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/=20 > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |