1
$\begingroup$

I have a problem involving work shifts and assembly stations.

  1. Work shifts have the subscript = T
  2. Workstations have the subscript = J

My decision variable is X[t][j]

For each turn (T) I am trying to use the value of the array below and substract a generic value like (2) through each assembly station (J).

For example: AM[t][j] matrix

enter image description here

For each shift [t] X[t][j] = M1[t][j] + X[t][j] – 2.

Example first shift (time), and each work station (j).

  • X1 = 100 + 0 – 2 = 98
  • X[1][2] = 0 + 98 – 2 = 96
  • X[1][3] = 0 + 96 – 2 = 94

Example second shift (time), and each work station (j).

  • X2 = 0 + 200 – 2 = 198
  • X[2][2] = 0 + 198 – 2 = 196
  • X[2][3] = 0 + 196 - 2 = 194

This is my cplex code.

subject to {
forall (t in T, j in J)
Constrain2: X1[t][j] == sum (j in J) M1[t][j] - 2; }

However, I get the following results

  • X1 = 98
  • X[1][2] = 98
  • X[1][3] = 98

It is not decreasing, it just puts the same value of the previous box.

Could you advise me how to subtract the value through each workstation for each time.

Thank you for your help.

$\endgroup$
2
  • $\begingroup$ Welcome to ORSE. First, please elaborate more on the problem specifications. For example, what does $M$ mean? What is the role of the $AM$ matrix and its differences from $M$? In the mentioned expression index $j$ is coming in the outer-loop while again it comes in the RHS and in the inner-loop! $\endgroup$
    – A.Omidi
    Aug 2, 2022 at 7:30
  • $\begingroup$ Also for more cleaning, I suggest using index $s$ for each shift and index $w$ for each workstation. :) $\endgroup$
    – A.Omidi
    Aug 2, 2022 at 7:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.