Hi Prasad, If I understand correctly....you could try:
1. Let's say you have N variables (x) 2. Create a parameter of dimension N, containing the original values of your variables (a) 3. Introduce N binary variables (u) 4. forall (n in N): -M x u_n <= x_n - a_n <= M x u_n 5. sum u_n <= maximum number of changes M is a "big" number. This should be chosen as small as possible (creating the smallest problem possible plus smallest change of frustrating round off errors). I must say that with a 1000 variables, this might slow down the solver drastically, nevertheless you could give it a try. I hope this helps. Regards, Timo Original Message: ----------------- From: Jahnavi Prasad [EMAIL PROTECTED] Date: Fri, 25 Jul 2008 02:18:20 +0400 To: [email protected] Subject: [Help-glpk] Hi: Question. Please help. Hi, I am trying to use GLPK in a flux-balance analysis context in biology. Once the linear constraints are defined and maximization of the objective function is done, I often find that the solution contains too many changes across the free variable set, and I cannot change that many variables (over 1000 sometimes) for my engineering problem. I can at the most take care of say a 15-20. How can I restrict the number (not magnitude) of changes in the LP maximization? Can someone please answer this question? Thanks a lot, regards, Prasad _______________________________________________ Help-glpk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-glpk -------------------------------------------------------------------- myhosting.com - Premium Microsoft® Windows® and Linux web and application hosting - http://link.myhosting.com/myhosting _______________________________________________ Help-glpk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-glpk
