-
Notifications
You must be signed in to change notification settings - Fork 0
/
dss-marketing-optimization.mzn
50 lines (44 loc) · 1.88 KB
/
dss-marketing-optimization.mzn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
%Parameters
int: pCustomersN;
int: pProductsN;
int: pChannelsN;
array[1..pCustomersN, 1..pProductsN, 1..pChannelsN] of float: pExpectedReve;
array[1..pChannelsN] of float: pChannelCosts;
float: pMaxBudget;
array[1..pProductsN] of int: pProductsMinOffersN;
float: pMinHurdleReve;
%Variables
array[1..pCustomersN, 1..pProductsN, 1..pChannelsN] of var 0..1: vAssignment;
%Constraints
constraint sum(customer in 1..pCustomersN, product in 1..pProductsN, channel in 1..pChannelsN)(vAssignment[customer, product, channel]*pChannelCosts[pChannelsN]) <= pMaxBudget;
constraint forall(product in 1..pProductsN) (
sum(customer in 1..pCustomersN,
channel in 1..pChannelsN) (
vAssignment[customer, product, channel]
) >= pProductsMinOffersN[product]);
constraint sum(customer in 1..pCustomersN,
product in 1..pProductsN,
channel in 1..pChannelsN)
(
vAssignment[customer, product, channel]*pExpectedReve[customer, product, channel]
) >=
(1+pMinHurdleReve)*sum(customer in 1..pCustomersN,
product in 1..pProductsN,
channel in 1..pChannelsN)
(
vAssignment[customer, product, channel]*pChannelCosts[pChannelsN]
);
%product to customer only via max one channel
constraint forall(customer in 1..pCustomersN,
product in 1..pProductsN) (
sum(channel in 1..pChannelsN)(
vAssignment[customer, product, channel]
) <= 1
);
solve maximize sum(customer in 1..pCustomersN,
product in 1..pProductsN,
channel in 1..pChannelsN)
(
vAssignment[customer, product, channel]*
pExpectedReve[customer, product, channel]
);