Question

How to do Equality Calculation

  • 6 November 2019
  • 6 replies
  • 148 views

Dear all, 

I have a matrix T(i,j,k,s).

I want that for each s, i and j are equal.

How can I do this?
Best


6 replies

Userlevel 5

I want that for each s, i and j are equal.

 

Your identifier T has 4 indices (i,j,k, s)

What do you want to happen with k ? 

Dear @mohansx 

also k should be the same.

Best

GL

Userlevel 5

@graleo , you are confusing index values with the value of T.

 

also k should be the same.

k cannot be the same, k will take values of whichever set it belongs to.

T(i,j,k,s) means

T(1,1,1,1), T(1,2,1,1), T(1,2,2,1) and so on and each of these will have a data value.

 

If you want an index domain for each s and values of i,j,k are equal - Then

 

index domain: (i,j,k,s) | ord(i) = ord(j) = ord(k)

 

This will create only those combinations (1,1,1,s), (2,2,2,s) and so on

Dear @mohansx 

how can I write this in aimms?
I have to select the constraint and then what can I write?
Best

GL

Userlevel 5

Looks like you want to have a constraint which enforces

for a given s, values of T must be equal for all (i, j, k)

T(i1,j1,k1,s1) = T(i2,j1,k1,s1) and something.

This is similar to your other post, please try not to create duplicate posts.

Create extra indices in your sets I, J, K and use the instructions given in https://community.aimms.com/aimms-developer-12/non-anticipativity-constraint-440#post1027

Hi @graleo,

Was Mohan’s answer sufficient in providing a solution to your problem?

 

 

Reply


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

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator