[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] setting the objective function to be an integer value
From: |
Nicoco BERGER |
Subject: |
Re: [Help-glpk] setting the objective function to be an integer value |
Date: |
Tue, 11 Oct 2005 16:08:51 +0200 (CEST) |
It does not work : the maximum I get still is not an integer value... See the
model :
Problem: (unnamed)
Class: MIP
Rows: 2
Columns: 51 (51 integer, 50 binary)
Non-zeros: 101
*** OBJECTIVE FUNCTION ***
Maximize: (unnamed)
1 u
*** ROWS (CONSTRAINTS) ***
Row 1: R.1 <= 187
29 x49
20 x48
21 x47
32 x46
26 x45
22 x44
35 x43
28 x42
24 x41
33 x40
23 x39
50 x38
36 x37
31 x36
31 x35
34 x34
22 x33
35 x32
48 x31
32 x30
27 x29
43 x28
24 x27
47 x26
32 x25
48 x24
24 x23
49 x22
27 x21
45 x20
50 x19
39 x18
50 x17
38 x16
47 x15
36 x14
21 x13
26 x12
39 x11
34 x10
22 x9
28 x8
49 x7
38 x6
38 x5
20 x4
25 x3
28 x2
26 x1
25 x0
Row 2: R.2 = 0
-1 u
82 x49
36 x48
31 x47
76 x46
78 x45
93 x44
91 x43
66 x42
56 x41
57 x40
49 x39
50 x38
53 x37
94 x36
76 x35
90 x34
62 x33
93 x32
96 x31
79 x30
98 x29
100 x28
92 x27
93 x26
88 x25
56 x24
38 x23
43 x22
40 x21
83 x20
100 x19
32 x18
34 x17
34 x16
98 x15
72 x14
37 x13
40 x12
72 x11
81 x10
40 x9
66 x8
44 x7
94 x6
58 x5
86 x4
38 x3
52 x2
59 x1
80 x0
*** COLUMNS (VARIABLES) ***
Col 1: x0 integer >= 0 <= 1
80 R.2
25 R.1
Col 2: x1 integer >= 0 <= 1
59 R.2
26 R.1
Col 3: x2 integer >= 0 <= 1
52 R.2
28 R.1
Col 4: x3 integer >= 0 <= 1
38 R.2
25 R.1
Col 5: x4 integer >= 0 <= 1
86 R.2
20 R.1
Col 6: x5 integer >= 0 <= 1
58 R.2
38 R.1
Col 7: x6 integer >= 0 <= 1
94 R.2
38 R.1
Col 8: x7 integer >= 0 <= 1
44 R.2
49 R.1
Col 9: x8 integer >= 0 <= 1
66 R.2
28 R.1
Col 10: x9 integer >= 0 <= 1
40 R.2
22 R.1
Col 11: x10 integer >= 0 <= 1
81 R.2
34 R.1
Col 12: x11 integer >= 0 <= 1
72 R.2
39 R.1
Col 13: x12 integer >= 0 <= 1
40 R.2
26 R.1
Col 14: x13 integer >= 0 <= 1
37 R.2
21 R.1
Col 15: x14 integer >= 0 <= 1
72 R.2
36 R.1
Col 16: x15 integer >= 0 <= 1
98 R.2
47 R.1
Col 17: x16 integer >= 0 <= 1
34 R.2
38 R.1
Col 18: x17 integer >= 0 <= 1
34 R.2
50 R.1
Col 19: x18 integer >= 0 <= 1
32 R.2
39 R.1
Col 20: x19 integer >= 0 <= 1
100 R.2
50 R.1
Col 21: x20 integer >= 0 <= 1
83 R.2
45 R.1
Col 22: x21 integer >= 0 <= 1
40 R.2
27 R.1
Col 23: x22 integer >= 0 <= 1
43 R.2
49 R.1
Col 24: x23 integer >= 0 <= 1
38 R.2
24 R.1
Col 25: x24 integer >= 0 <= 1
56 R.2
48 R.1
Col 26: x25 integer >= 0 <= 1
88 R.2
32 R.1
Col 27: x26 integer >= 0 <= 1
93 R.2
47 R.1
Col 28: x27 integer >= 0 <= 1
92 R.2
24 R.1
Col 29: x28 integer >= 0 <= 1
100 R.2
43 R.1
Col 30: x29 integer >= 0 <= 1
98 R.2
27 R.1
Col 31: x30 integer >= 0 <= 1
79 R.2
32 R.1
Col 32: x31 integer >= 0 <= 1
96 R.2
48 R.1
Col 33: x32 integer >= 0 <= 1
93 R.2
35 R.1
Col 34: x33 integer >= 0 <= 1
62 R.2
22 R.1
Col 35: x34 integer >= 0 <= 1
90 R.2
34 R.1
Col 36: x35 integer >= 0 <= 1
76 R.2
31 R.1
Col 37: x36 integer >= 0 <= 1
94 R.2
31 R.1
Col 38: x37 integer >= 0 <= 1
53 R.2
36 R.1
Col 39: x38 integer >= 0 <= 1
50 R.2
50 R.1
Col 40: x39 integer >= 0 <= 1
49 R.2
23 R.1
Col 41: x40 integer >= 0 <= 1
57 R.2
33 R.1
Col 42: x41 integer >= 0 <= 1
56 R.2
24 R.1
Col 43: x42 integer >= 0 <= 1
66 R.2
28 R.1
Col 44: x43 integer >= 0 <= 1
91 R.2
35 R.1
Col 45: x44 integer >= 0 <= 1
93 R.2
22 R.1
Col 46: x45 integer >= 0 <= 1
78 R.2
26 R.1
Col 47: x46 integer >= 0 <= 1
76 R.2
32 R.1
Col 48: x47 integer >= 0 <= 1
31 R.2
21 R.1
Col 49: x48 integer >= 0 <= 1
36 R.2
20 R.1
Col 50: x49 integer >= 0 <= 1
82 R.2
29 R.1
Col 51: u integer >= 0
1 (objective)
-1 R.2
End of output
--- Jérôme Kunegis <address@hidden> a écrit :
> Hello,
>
> > How can I configure GLPK so as the objective function can only be an
> > integer value ?
>
> You can define a new variable to be equal to the objective function and
> declare that variable as integer. Then optimize this variable. For
> instance:
>
> Replace
> max x_1 + 2 x_2 - x_3
>
> ...
>
> by
> max obj
>
> x_1 + 2 x_2 - x_3 - obj = 0
> ...
>
> Binary
> obj
>
> Regards,
> Jérôme Kunegis
>
> --
> ___________________________________________________________________
> Jérôme KUNEGIS Technische Universität Berlin
> Fakultät Informatik, Agententechnologien in betrieblichen
> Anwendungen und in der Telekommunikation, DAI-Labor
> Franklinstraße 28/29 E-Mail: address@hidden
> D-10587 Berlin
> Sekr. GOR 1-1 Tel: (030) 314 73600
> http://wiki/index.php/Benutzer:J%C3%A9r%C3%B4me
>
>
>
___________________________________________________________________________
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
Téléchargez cette version sur http://fr.messenger.yahoo.com