It's necessary to use scalar rather than vector-matrix notation in AMPL. You could define C, I, and E by
param C {1..N, 1..M};
param I {1..M, 1..M};
param E {1..M};
Then the expression for C_[i]E is
sum {j in 1..M} C[i,j] * E[j]
This can be used in the expression for T_i. To get the log_2 function of an expression you need to compute the log of the expression divided by log(2). (I am writing C, I, and E as params here though perhaps some of them should be vars; you don't distinguish parameters from variables in your question.)
The expression for A_i does not seem right to me, because I_[i] which is 1 x M is multiplying C which is N x M.
Bob Fourer
am...@googlegroups.com
The .mod, .data and .run file are give below, How do I define the variable related to J and T
reset;
param N;
param M;
set NSET := {1..N};
set MSET := {1..M};
param I{NSET,NSET};
param E{MSET};
param P;
param G;
var C{NSET, MSET} binary;
var J{n in NSET}=sum{n in NSET, m in MSET}I[n,m]C[n,m]C[n,m];
var T{n in NSET}=(sum {m in MSET}C[n,m]E[m])log(1+P/(J[n]G(sum {m in MSET}C[n,m]*E[m])))/log(2)
maximize OBJ: sum {n in NSET} T[n];
data;
param N=5;
param M=20;
param I{N,N};
param E:= 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1;
param P=10;
param G=1e-08;
param I : 1 2 3 4 5:= 1 0 1274 1183 1143 1267 2 1197 0 1050 1312 1089 3 1266 1174 0 1090 1190 4 1097 1105 1250 0 1135 5 1097 1105 1250 1201 0;
model DCNDC.mod;
data DCNDC.dat;
option solver knito;
solve;
option display_1col 64;