Ok its been a while since my college math class days, so I may have lost a step and I may not explain this well, but here is my problem. I am a programmer trying to write an algorithm that will help me balance the difficulty of a game I am working on. Without getting into unnecessary details I have narrowed it down to this.

55a + 25b + 20c + 20d = A

25a + 65b + 20c + 20d = B

25a + 25b + 50c + 20d = C

25a + 25b + 20c + 70d = D

a >= 0

b >= 0

c >= 0

d >= 0

A, B, C, & D are constants I need to be able to enter as parameters, then solve the equations so that I get the minimum a+b+c+d.

Now using a solver I found online, I was able to find that without the >= 0 restrictions I can find the answer by: (sorry i couldn't get latex to work right)

a = (323A - 75B - 80C - 48D) / 12690

b = (-25A + 87B - 20C - 12D) / 4230

c = (-100A - 75B + 343C - 48D) / 12690

d = (-20A - 15B - 16C + 75D) / 4230

but that allows for negative values which I cannot have.

How would I find a set of solutions which includes the >= restrictions?