Originally posted by: memop
Hi. I have a nonlinear model with division constraints. But OPL gives an error message: Function operator (..) not avaliable in content CPLEX. I have searched this problem in the forum, but neither solution is not applicable for my model. The code is as follows. How would you suggest a solution way to overcome this problem? Thank you very much in advance.
{code}
float CV = 0.2;
float SCVa = 1;
float lambda = 1/11;
int Nbtasks = ...;
range tasks = 1..Nbtasks;
int Nbstations = ...;
range stations = 1..Nbstations;
float taskTime[tasks]=...;
float tvariance[tasks];
dvar float cycleTime;
tuple precedence {
int predecessor;
int successor;
};
{precedence} Precedences = ...;
int earliest[tasks] = ...;
int latest[tasks] = ...;
execute {
for (var i in tasks)
tvariance[i] = Math.pow((CV*taskTime[i]), 2);
};
dvar boolean assign[tasks][stations];
dvar int+ stationLength[s in stations];
dvar float+ SCV_d[s in stations];
dvar float+ SCV_a[s in stations];
dvar float+ SCV_e[s in stations];
dvar float+ W_q[s in stations];
dvar float+ CT[s in stations];
dvar float+ WIP[s in stations];
dvar float+ TH[s in stations];
dexpr float rho[s in stations] = (lambda)*(stationLength[s]);
dexpr float svariance[s in stations] = sum(i in tasks, j in stations) (tvariance[i] * (assign[i][j]==1));
dexpr float ssigma[s in stations] = sqrt(svariance[s]);
dexpr float total_W = sum(s in stations) W_q[s];
minimize cycleTime;
subject to {
forall (t in tasks)
eachTaskHasOneStation:
sum (s in stations)
assign[t][s]==1;
forall (s in stations)
eachStationHasOneTask:
sum (t in tasks) assign[t][s] >= 1;
forall (prec in Precedences)
precendeceConstraints:
sum (s in stations) s*assign[prec.predecessor][s] <= sum(s in stations) s*assign[prec.successor][s];
forall (s in stations)
stationTimeConstraints:
sum (t in tasks) (taskTime[t] * assign[t][s]) == stationLength[s];
forall (s in stations)
W_q[s] == (((SCV_a[s])+SCV_e[s])/2) * (rho[s]/(1-rho[s])) * stationLength[s];
SCV_a[1] == SCVa;
forall (s in stations)
SCV_d[s] == SCV_e[s] * (rho[s]^2) + SCV_a[s] * (1-(rho[s]^2));
forall (s in 2..Nbstations)
SCV_a[s] == SCV_d[s-1];
forall (s in stations)
CT[s] == stationLength[s] + W_q[s];
forall (s in stations)
WIP[s] == (((SCV_a[s])+SCV_e[s])/2) * (rho[s]/(1-rho[s]));
forall (s in stations)
TH[s] == WIP[s]/CT[s];
forall (s in stations)
SCV_e[s] == (ssigma[s]/stationLength[s])^2;
}
{code}
#DecisionOptimization#OPLusingCPLEXOptimizer