The short answer is no, because such a thing isn’t allowed by mathematical optimization solvers.

The longer answer is that there is probably a reformulation into a linear program.

One option that comes to mind, assuming I understand your problem correctly, is:

```
model = Model()
@variable(model, x[i=1:N, j=1:N, p=1:P], Bin)
@variable(model, y[i=1:N, p=1:P], Bin)
@variable(model, z[i=1:N], Bin)
# @constraint(model, [i in N, p in P],
# sum(y[(j,p)] for j in passed_nodes(p)) >= z(i))
# @constraint(model, [i in N, p in P],
# sum(y[j, p] for j in 1:N if x[i, j, p] == 1) >= z[i])
# @constraint(model, [i in N, p in P],
# sum(x[i, j, p] * y[j, p] for j in 1:N) >= z[i])
@variable(model, xy[i=1:N, j=1:N, p=1:P], Bin)
@constraint(model, [i=1:N, j=1:N, p=1:P], xy[i,j,p] <= x[i,j,p])
@constraint(model, [i=1:N, j=1:N, p=1:P], xy[i,j,p] <= y[j,p])
@constraint(model, [i=1:N, j=1:N, p=1:P], xy[i,j,p] >= x[i,j,p] + y[j,p] - 1)
# Now substitute in the xy variable:
@constraint(model, [i in N, p in P], sum(xy[i, j, p] for j in 1:N) >= z[i])
```

You might be able to get away with this, depending on the rest of your

formulation:

```
model = Model()
@variable(model, x[i=1:N, j=1:N, p=1:P], Bin)
@variable(model, y[i=1:N, p=1:P], Bin)
@variable(model, z[i=1:N], Bin)
@constraint(model, [i=1:N, j=1:N, p=1:P], y[j,p] <= x[i,j,p])
@constraint(model, [i in N, p in P], sum(y[j, p] for j in 1:N) >= z[i])
```