Function srand() initializes the random number seed. You should instead use rand() when initializing the matrix c. This will give you random numbers.
Call srand() only once in the beginning to set the random number seed. Like so:
execute {
var now = new Date();
Opl.srand(Math.round(now.getTime()/1000000000));
for (var p in P) {
for (var s in S) {
c[p][s] = Opl.rand(100); // random number in [0,100[
}
}
}
#CPLEXOptimizers#DecisionOptimization