[ojAlgo-user] solving a linear optimization problem with ojAlgo ?
Mathematics, linear algebra and optimisation
Brought to you by:
apete
From: Andreas A. <and...@go...> - 2008-01-04 15:51:21
|
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 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 computation should be as fast as possible. So there is no need to search fo= r every possible result. And it needs to work with doubles (not only integers, because some librarie= s work only with integers) Actually the solution needs to scale for several dozens c=B4s ( there will = not be only 4 like c1,c2,c3,c4), but more like 50 c1, c2,...,c49, c50 And there will not be only two equations (like in the example) but 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 given example ? (I will generalize it then myself) kind regards, Andreas |