I have been given the task at work of creating a linear optimization routine. The questions will be posed in the form:
Create a cow feed mixture at the lowest cost using the following ingredients and that meets the minimum nutritional requirements:
Ingredients:
Name Cost Calcium Iron Protein Fat
A .25 .7 .9 .8 .5
B .10 .8 .8 1.5 .6
C .08 .0 .8 .9 .4
Nutritional Requirements:
Calcium >= 10
Iron >= 12
Protein >= 15
Fat <= 7.5
I have determined (correct me if I'm wrong) that this translates into a linear optimization problem using the following calculations:
Minimize
.25a + .10b + .08c
Where
.7a + .8b >= 10
.9a + .8b + .8c >= 12
.8a + 1.5b + .9c >=15
.5a + .6b + .4c <= 7.5
My situation is that any solution I come up with must run in a JDK 1.4.2 environment (this will eventually be incorporated into an SAP Netweaver portal application and believe it or not 90% of the world still uses NetWeaver 2004s which supports a maximum 1.4.2 environment), so this prevents me from using things like the Apache Commons Math package (which ironically enough has EXACTLY what I need in it).
I was desparately hoping not to reinvent the wheel, but I cannot find any open source projects that are helping me with this. I have been through a couple which is tedious (each has such a different API that it's very cumbersome just learning how to use each one) just to find that I'm not getting what I need out of them.
Any resources (either publication or online) that would help me code such a routine in java would be excellent. Event better if anyone has had success locating and using an open source library that is 1.4 compatible to solve such a problem and could point me in that direction.
Best Regards