This is in a similar vein to the Diet problem (integer programming), but harder.
This guy has solved this problem using 3 programs, Maxima and LPsolveIDE and Excel:
A text file generated by maxima is fed into LPSolveIDE (because Maxima’s simplex cmd can’t handle integers), and some of the resulting output is retrieved and fed into Maxima again. The information is finally transferred to Excel for readability. It can be done but its very time consuming and tedious. I fed the equations from Maxima into maple's linear optimizer and this was the output: CSP_MAXIMA_OP.mw. When you feed the non-zero output back into Maxima you get a valid but sub-optimal solution.
I know these problems are hard, but surely maple with its integer handling optimizer can do it all in one swoop. can someone....?