Solved

Resource balance for resource transport between zones

  • 15 December 2023
  • 4 replies
  • 33 views

Badge

Hi AIMMS community! I’m currently working on a resource transport model using AIMMS and I've encountered a symmetry challenge for resource balance between zones.

In the case when I would like to transport 200MW of power from zone 1 to zone 2, the net outflow of power from zone 2 must be equal to the net inflow of power into zone 1, which can be represented by the equation below:

F_in (z,z’) = F_out (z, z’)

whereby F_in (z,z’) is represented as the net inflow into zone z (zone 1) from zone z’ (zone 2);

while F_out (z,z’) is represented as the net outflow from zone z (zone 2) to zone z’ (zone 1).

Does anyone know of an AIMMS function that can seamlessly handle this equation? Any insights or tips are highly appreciated! Thanks so much!

icon

Best answer by gdiepen 22 December 2023, 21:57

View original

4 replies

Userlevel 5
Badge +7

Not sure if I am understanding, but if you have variables defined in AIMMS like F_in(z,z2) and F_out(z,z2) you can just create a constraint powerConservation(z,z2) with the definition

F_in(z, z2) = F_Out(z,z2)

 

 

Badge

Thanks @gdiepen for your prompt response! However, my concern here is with the ‘z’ index as index ‘z’ and ‘z2’ in F_in is different from the index ‘z’ and ‘z2’ in F_out. May I know is there a specific function in AIMMS where the ordinal ‘z’ and ‘z2’ can be swapped for a certain variable?

For example: 

ord(z) = 1 while ord(z2) = 2 in F_in as the power is being transferred into zone 1 from zone 2. Hence, 

ord(z) = 2 while ord(z2) =1 in F_out as power is flowing out of zone 2 to zone 1. 

 

Thank you!

Userlevel 5
Badge +7

You can use ord and element functions in aimms to convert from and to ordinal values. 

 

Easier solution might be to make use of sets and subsets though and ensure you can use the same indices

Badge

Alright thanks @gdiepen! I’ll try that out. 

Reply


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

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