SophiePantone
New Member
- Joined
- Dec 3, 2015
- Messages
- 1
I am trying to optimize the profit by area constraints in a store. A sort of Knapsack problem.
The goal is to optimize the profit by placing department i within section j. 4 departments need to be located to 6 sections.
The objective function is a sum of decision variable xij * profit for department i in section j. xij is a binary variable.
Everything is working fine, until I try that the model only maximises the profit by the use of 3 to 4 departments.
I want to investigate wether if you drop a department, the profit is maximized.
Does someone know how I can enforce this constraint?
I already tried the countif(...;'<>0') functions on both of my area constraints. But this is not working.
This is my model so far:
MAX Xij * Pij + E
ST
EACH SECTION CAN ONLY CARY ONE DEPARTMENT
SUM i to 4: Xij = 1 for all j sections
BRANDS TOGETHER
sum j to 6: abs value (Xij + Xij+1) <= 2 for all i brands
AREA CONSTRAINTS
0 < sum j to 6: Xij for all i brands * size department < 92
I tried the countif function on the <xij for all i brands * size department>. For some situations the model only puts 2 departments within the 6 sections, even when i ask that the countif constraint should be >= 3.
Can anyone help me?
Thank you!!!
The goal is to optimize the profit by placing department i within section j. 4 departments need to be located to 6 sections.
The objective function is a sum of decision variable xij * profit for department i in section j. xij is a binary variable.
Everything is working fine, until I try that the model only maximises the profit by the use of 3 to 4 departments.
I want to investigate wether if you drop a department, the profit is maximized.
Does someone know how I can enforce this constraint?
I already tried the countif(...;'<>0') functions on both of my area constraints. But this is not working.
This is my model so far:
MAX Xij * Pij + E
ST
EACH SECTION CAN ONLY CARY ONE DEPARTMENT
SUM i to 4: Xij = 1 for all j sections
BRANDS TOGETHER
sum j to 6: abs value (Xij + Xij+1) <= 2 for all i brands
AREA CONSTRAINTS
0 < sum j to 6: Xij for all i brands * size department < 92
I tried the countif function on the <xij for all i brands * size department>. For some situations the model only puts 2 departments within the 6 sections, even when i ask that the countif constraint should be >= 3.
Can anyone help me?
Thank you!!!