How can I formulate the following statements mathematically and in AMPL:
Q[i,m] = X[i,m] if S[i,m]=1, E[i,m]=0, and W[i,m]=0.
Q[i,m] = Y[i,m] if S[i,m]=0, E[i,m]=1, and W[i,m]=0.
Q[i,m] = Z[i,m] if S[i,m]=0, E[i,m]=0, and W[i,m]=1.
Q[i,m] = 0 if S[i,m]=0, E[i,m]=0, and W[i,m]=0.
Where Q,X,Y,and Z are continuous variables, and S,E and W are binary variables.
Any ideas?
Aucun commentaire:
Enregistrer un commentaire