everyone. I formulate some formulas for my research. I want to ask is there any tool can solve this problem. I survey some tools such as GLPK, some MATLAB toolbox… But my formula seems to be nonlinear. I find some information on the Internet, it is one special case of integer programming called 0-1 integer programming.
My doubt is: can I put binary variable in the exponential like the following formula? And is it available using "product(pi)" when solving this problem? I survey some examples, but I didn’t find this two usages.
The variable is Xc,n,m,s,i. And, Lc,n, Tmax, Tm, Pm,s,i, Dc,n,k, and Bm are all known number.
Can anyone give me some suggestions on this problem? Thanks for reading!
I update the picture, and try to use AMPL language for my formulas.
#AMPL model language
#known numbers
param L{c in 0..C, n in 0..N};
param Tmax;
param T{m in 0..M};
param P{m in 0..M, s in 0..S, i in 0..I};
param D{c in 0..C, n in 0..N, k in 0..K};
#binary variable
var X{c in 0..C, n in 0..N, m in 0..M, s in 0..S, i in 0..I} binary;
#objective function
maximize answer: sum{c in 0..C} r[c];
#two subjections
subject to s1{s in 0..S, i in 0..I}:
sum{c in 0..C}sum{n in 0..N}sum{m in 0..M} X[c,n,m,s,i] <= 1;
subject to s2{c in 0..C, n in 0..N}:
L[c,n]+Tmax >= sum{m in 0..M}sum{s in 0..S}sum{i in 0..I}T[m]*X[c,n,m,s,i] >= L[c,n];
#where (I am not sure is it wright to write like this? Can somebody give me a hint?)
V[c,n]=prod{k in 0..N}(prod{m in 0..M}prod{s in 0..S}prod{i in 0..I} P[m,s,i])^X[c,n,m,s,i])^D{c,n,k};
r[c]=prod{n in 0..N}V[c,n]*(sum{m in 0..M}sum{s in 0..S}sum{i in 0..I}T[m]*X[c,n,m,s,i]);
The modification using logical constraint in order to remove the variable X from exponential:
### model_c.mod ###
set C;
set N;
set M;
set S;
set I;
set K;
param Tmax; #known numbers
param L{c in C, n in N};
param T{m in M};
param P{m in M, s in S, i in I};
param D{c in C, n in N, k in K};
var X{c in C, n in N, m in M, s in S, i in I} binary; #binary variable
var Y{c in C, n in N};
maximize answer:
(sum{c in C}(prod{n in N}(prod{k in K}Y[c,n]^D[c,n,k])*(sum{m in M}sum{s in S}sum{i in I}T[m]*X[c,n,m,s,i]))); #objective function
subject to s1{c in C, n in N, m in M, s in S, i in I}:
Y[c,n]=Y[c,n]*((P[m,s,i]-1)*X[c,n,m,s,i]+1);
subject to s2{s in S, i in I}:
sum{c in C}sum{n in N}sum{m in M} X[c,n,m,s,i] <= 1;
subject to s3{c in C, n in N}:
L[c,n]+Tmax >= sum{m in M}sum{s in S}sum{i in I}T[m]*X[c,n,m,s,i] >= L[c,n];
### model_c.dat ###
data;
set C:= count1, count2;
set N:= frame1, frame2;
set M:= M1, M2;
set S:= sub1, sub2;
set I:= i1, i2;
set K:= k1, k2;
param Tmax:=30;
param L: frame1 frame2:=
count1 2 3
count2 4 5;
param T:= M1 10
M2 20;
param P:=
[*,*,i1]: sub1 sub2 :=
M1 0.9 0.8
M2 0.7 0.6
[*,*,i2]: sub1 sub2 :=
M1 0.9 0.8
M2 0.7 0.6;
param D:=
[*,*,k1]: frame1 frame2 :=
count1 1 0
count2 0 1
[*,*,k2]: frame1 frame2 :=
count1 1 0
count2 1 1;