Hello! I'm somewhat new to CPLEX so please excuse me if this is a stupid question, but I hope you can help me. I'm trying to model a problem of the form:

y_{k} = decision var

x_{0} = some starting value

x_{k} = x_{(k-1)} + y_{k}

Of course there are further constraints on Y and so on, but this is the general form of the model. It runs a particular set of expression a certain number of times (cycles), whereby the results of the previous cycles are used to determine the constraints of the current cycle. I've tried the following in CPLEX, but I get a circular dependency error for the dexpr:

range R = 1..cycles;

dvar int+ Y[R];

dexpr int X[c in R] = X[c-1] + Y[c];

How can I model something like this? I've gotten the model to work by making the X a decision variable and re-expressing some of the content, but this increases the number of variables too much to be of practical use, because the actual model has very many such constraints and the number of cycles is large (almost 300).