JuMP whit PATHSolver

I am trying to define this variable T:

using JuMP
import PATHSolver
@variable(modelo, 0 <= T[ω = 1:5] <= (ω-1)*0.25, start = 1)

Defined with this restriction:

@constraint(modelo, [ω = 1:5], (c[ω]*(1-α)-s)Y[ω] -(BQ[ω]β+β^2T[ω]*B) ⟂ T[ω])

The problem is that I want to define the variable T such that in the current period it has to be greater than or equal to the previous one, and it cannot be greater than the previous period by more than 0.25.

However, with the current variable definition I have, it’s not working because I might get a result like this:
T = [0,0,0.5,0.75,1]

Which would be incorrect.

PATh is a solver for mixed-complementarity problems, so you can’t write explicit constraints like T[1] <= T[2].

You need to reformulate it by adding a new dual variable:

@variable(model, μ[2:5] >= 0)
@connstraint(model, [ω in 2:5], T[ω] - T[ω-1] ⟂ μ[ω])