0
$\begingroup$

I am currently solving a scheduling optimization problem regarding the fleet management of AGV/AMR. I always get the same error and I don't know where to start to solve it. Here's the code snippet for the objective function and the constraints.

// Objective Function

minimize
  sum(m in M, i in T, r in R) (alpha * M_T[m][i] * X[i][m][r] +
                                   beta * Consumption_M_T_R[m][i][r] * X[i][m][r] -
                                   gamma * Y[m][r]);

// Constraints

subject to {

  // Resource Assigned to One Mission

  forall(r in R)
    sum(m in M) Y[m][r] <= 1;

  // All Tasks Performed (Regardless of Resource)

  forall(m in M, i in T)
    sum(r in R) X[i][m][r] == 1;

  // Task Succession within Missions

  forall(m in M, i1 in T, i2 in T : i1 != i2)
    sum(r in R) X[i1][m][r] <= sum(r in R) X[i2][m][r];

  // Mission-Resource Compatibility

  forall(m in M, r in R)
    Y[m][r] <= Compat_M_R[m][r];

  // Segment Compatibility

  forall(m in M, i in T, s1 in S, s2 in S)
    sum(r in R) M_T_Segments[m][i][s1] * M_T_Segments[m][i][s2] * NonExecParalleleSegments[s1][s2] * X[i][m][r] <= 1;

  // Resource Availability

  forall(j in R, r in R : j != r)
    sum(m in M) Y[m][r] <= Z[j];

  // Energy Constraint

  forall(r in R, m in M, i in T)
    W[m][r][i] >= sum(m in M, i in T) Consumption_M_T_R[m][i][r] * X[i][m][r];

  // Calculating Start and End time

  forall(m in M, i in T)
    C[i][m] >= sum(r in R) (St[i][m] * Y[m][r] + M_T[m][i] * X[i][m][r]);
  
  forall(m in M, i in T, s in S)
    sum(s in S) St[i][m] * M_T_Segments[m][i][s] >= sum(s in S, m in M, i in T) C[i][m] * M_T_Segments[m][i][s];
}
```
$\endgroup$

1 Answer 1

1
$\begingroup$

You did not identify the variables in your model. Presumably X is a variable. If either M_T or Consumption_M_T_R is a variable, then your objective function is a nonconvex quadratic function. If any of the other matrices in the code snippet are variables, then you may have nonconvex quadratic functions in the constraints as well.

$\endgroup$
3
  • $\begingroup$ // Decision Variables dvar boolean X[T][M][R]; // Binary variable indicating if task i of mission m is performed by resource r dvar boolean Y[M][R]; // Binary variable indicating if resource r is assigned to mission m dvar boolean Z[R]; // Binary variable indicating if resource r is occupied and assigned to a mission dvar float St[T][M]; // Start time of task i of mission m dvar float C[T][M]; // End time of task i of mission m dvar float W[M][R][T]; // Energy required to perform task i of mission m on resource r $\endgroup$
    – Rami
    Commented Mar 27 at 7:55
  • $\begingroup$ M_T and Consumption_M_T_R are input data in fact. $\endgroup$
    – Rami
    Commented Mar 27 at 7:57
  • $\begingroup$ So the problem is apparently your next to last constraint, where you multiply St and Y. $\endgroup$
    – prubin
    Commented Mar 27 at 15:54

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.