
Originally Posted by
LinktheDeme
Well technically no but realistically yes as you can't sell someone half a nail or it'll cease to be a nail lol. Regardless though it was a good effort but 10 minutes after the deadline I would have given it if otherwise though since I didn't list it.
I had to modify the problem a bit to get integer results. I took it for granted that whole nails were desired.
I can't see how 3 sizes had to have a minimum of 5 nails was a necessary constraint. At best it served as a hint for people using brute force methods. Are you covering linear programming in school?
Code:
MOR/LP
Date: 10/19/09 Time: 21:52:57
C:\MOR\problem3
MODEL DESCRIPTION
****************************************************
Max z = 400a+250b+200c+150d+100e+50f
ST 100a+85b+70c+50d+25e+10f<=2000
a+b+c+d+e+f>=15
a+b+c+d+e+f<=30
a<=10
b<=10
c<=10
d<=10
e<=10
f<=10
integer(a,b,c,d,e,f)
****************************************************
Gomory Cut - Mixed Integer Linear Programming
^^^ Optimal Solution ^^^
Integer solution has been obtained
Z = 7200.0000
A = 10.0000
B = 8.0000
C = 0.0000
D = 1.0000
E = 10.0000
F = 1.0000
Slack1 = 10.0000
Surpl2 = 15.0000
Slack5 = 2.0000
Slack6 = 10.0000
Slack7 = 9.0000
Slack9 = 9.0000
Compile time: 0.00 (Secs.)
Run time : 0.00 (Secs.)