Dear all,

I must to set the non anticipativity constraints in aimms for the stochastic problem.

Then for s scenarios and x decision variable I must to write that

x1=x2=x3=..xs

How can I write this in aimms?

Thanks

Dear all,

I must to set the non anticipativity constraints in aimms for the stochastic problem.

Then for s scenarios and x decision variable I must to write that

x1=x2=x3=..xs

How can I write this in aimms?

Thanks

where x is a binary variable

Add constraint

NonAnticipativity(s1, s2)|s1 <> s2,

Definition: x(s1) = x(s2)

This will generate many constraints like x1 = x2. x1 = x3 .. x1 = xs, x2 = x1 and so on. Some of them would be redundant, you could modify the index domain as

NonAnticipativity(s1, s2) | s2 = s1+1 and s1 < last(Scenarios)

This will generate, x1 = x2, x2 = x3, x3 = 4 and so on.

Dear

thanks for your replay. But I didn’t understand how write it.

How can I write this in aimms?

Best

GL

- Make sure you have two indices in the set of scenarios - let’s call these si and sj
- Create a new constraint, in the index domain attribute - write

(si,sj) | sj = si + 1 and si < last(Scenarios) - In the definition attribute, write

x(si) = x(sj)

Dear

I have only one index for the scenario. Then I can not insert another index.

the scenario set has s index and it is defined as 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. Then I have the binary variable X(i,j,k,s). I want that X(i,j,k,’1’)=X(i,j,k,’2’)=...=X(i,j,k,’10’).

How can I write this in compact way?

I wrote all equation now:

X(i,j,k,’1’)=X(i,j,k,’2’)

X(i,j,k,’2’)=X(i,j,k,’3’)

X(i,j,k,’3’)=X(i,j,k,’4’)

X(i,j,k,’4’)=X(i,j,k,’5’)

X(i,j,k,’5’)=X(i,j,k,’6’)

X(i,j,k,’6’)=X(i,j,k,’7’)

X(i,j,k,’7’)=X(i,j,k,’8’)

X(i,j,k,’8’)=X(i,j,k,’9’)

X(i,j,k,’9’)=X(i,j,k,’10’)

X(i,j,k,’1’)=X(i,j,k,’10’)

Is it right?

Best

GL

How to add multiple indices: https://how-to.aimms.com/Articles/272/272-using-multiple-indices-for-one-set.html

Already have an account? Login

**Please use your business or academic e-mail address to register**

No account yet? Create an account

Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.

Didn't find what you were looking for? Try searching on our documentation pages: