Get constraints in matrix format from gurobipy
Please give me help for my problem solving the data is as bellow,
1- we have the number of each box as
Nbre de of boxes by type of boxe
3E 24
3G 14
3P 4
4C 7
6K 16
AE 59
I9 3
KD 2
RN 4
RP 31
WF 37
2-List of the possible combinations are:
frame 1
3E (4C, 6K)
3G (3P, 4C)
3G (4C, AE)
3G (4C, I9)
RN (3G, 3P)
RN (3G, AE)
RN (3G, I9)
RP (3G, 4C)
RP (3P, AE)
RP (3P, I9)
RP (AE, I9)
WF (3P, 4C)
WF (4C, AE)
WF (4C, I9)
it means for the first row for i.e
3E (4C, 6K) : one boxe of 3E can bear under it 1 4C and 1 6K
I translate the combination bellow by numbres of modules:
24 (16 7)
14 (7 4)
14 (59 7)
14 (3 7)
2 (7 24)
4 (4 14)
4 (59 14)
4 (3 14)
4 (37 4)
4 (37 59)
4 (37 3)
31 (7 14)
31 (59 4)
31 (3 4)
31 (37 7)
31 (3 59)
37 (7 4)
37 (59 7)
37 (3 7)
the maximum of each possible combination is limited by nbre of module that i have of boxes which is:
column 2 =
7
4
7
3
2
4
4
3
4
4
3
7
4
3
7
3
4
7
3
there are two constraints:
1- the minimum of each row less or equal to the column2
2- each cell bellow('3E for example) is the sum wherever you find the
"type" in the 19 rows(the combinations)
the obj is to optimize the sum of all the combinations of each type of boxe
wherever found in frame 1
how to translate this to a a program gurobi please your help
0
Please sign in to leave a comment.
Comments
0 comments