How do i maximise, (a*n1+b*n2+c*n3)<d, when n1, n2 and n3 are real positive

lPainel

New member
unknown integers...? and the coefficients a, b, c and d are unique and known with (a,b,c)<d. Is there a known procedure? I can brute force a solution(s), i just wonder if there is a better way.
and a,b,c and d are real and positive.
Gianlino, i'd like to find values where the lhs is at its maximum value with respect to d. Ideally when n1+n2+n3 is small. For example, when a=2.5, b=1.5, c=1.1



(n1) , (n2) , (n3) ,(a*n1+b*n2+c*n3) , d
2.0000, 1.0000, 5.0000, 12.0000, 12.0000
3.0000, 3.0000, 0, 12.0000, 12.1000
1.0000, 2.0000, 6.0000, 12.1000, 12.2000
3.0000, 1.0000, 3.0000, 12.3000, 12.3000
2.0000 2.0000, 4.0000, 12.4000, 12.4000

etc.
note those values are for (a*n1+b*n2+c*n3)
note those values are for (a*n1+b*n2+c*n3) less than are equal to d
You can rewrite the constraints as:
0
it seems yahoo cuts off text with a less than or equal to symbols, irritating...
You can rewrite the constraints as:
0 less than n1 less than (d/a)
0 less than n2 less than (d-a*n1)/b
0 less than n3 less than or equal to (-a*n1*n2-b*n2*n3+d)/c
which might be quicker but is still ugly.
 

Yin

New member
I am thinking about using Lagrange Multipliers and let f(n,n n) = an + bn + cn.

Rewrite all of your constraints as follows

ann + bnn + cn d
an + bn < d
an < d

f = <a,b,c> but since a,b, and c are positive, just treat the inequalities as equalities and continue the way you would with Lagrange Multipliers.

There probably is a cleverer solution.

Yin
 
Top