help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] Tell glpk not to use some variables


From: Jose Monreal
Subject: [Help-glpk] Tell glpk not to use some variables
Date: Fri, 29 Aug 2008 19:59:45 -0400

How do I tell GLPK by API to not use a few variables, lets say that I dont want that the variables Y appear at the Minimize at the top of the problem file. like this.


*** OBJECTIVE FUNCTION ***

Minimize: OBJF
                     7 x[0,1]
                    12 x[0,2]
                    17 x[0,3]
                     7 x[0,4]
                     5 x[1,1]
                     9 x[1,2]
                    14 x[1,3]
                     7 x[1,4]
                     3 x[2,1]
                     7 x[2,2]
                    12 x[2,3]
                     8 x[2,4]
                     2 x[3,1]
                     5 x[3,2]
                    10 x[3,3]
                     9 x[3,4]
                     1 Y1
                    -1 Y2
                     1 Y3
                    -1 Y4
*** ROWS (CONSTRAINTS) ***

Row 1: APPLE1 = 1
                     7 x[0,4]
                    17 x[0,3]
                    12 x[0,2]
                     7 x[0,1]

Row 2: APPLE2 = 1
                     7 x[1,4]
                    14 x[1,3]
                     9 x[1,2]
                     5 x[1,1]

Row 3: APPLE3 = 1
                     8 x[2,4]
                    12 x[2,3]
                     7 x[2,2]
                     3 x[2,1]

Row 4: APPLE4 = 1
                     9 x[3,4]
                    10 x[3,3]
                     5 x[3,2]
                     2 x[3,1]
Row 5: demand[0] <= 0
                    -1 Y1
                     1 x[0,1]

Row 6: demand[1] <= 0
                    -1 Y2
                     1 x[0,2]
.
.
.
.
.
Row ...: BINS = 8
                     1 Y4
                     1 Y3
                     1 Y2
                     1 Y1

Row ...: CAP1 <= 0
                     1 x[31,1]
                     1 x[30,1]
                     1 x[29,1]

This is part of the output fo glpk when I use the function lpx_print_prob(lp);

And the variables Y that appear at Minimize I do not want them to appear there. Is there a way?
--
José I. Monreal Bailey

reply via email to

[Prev in Thread] Current Thread [Next in Thread]