Skip to main content
Solved

Interpolation formula in AIMMS

  • 17 July 2024
  • 2 replies
  • 44 views

Dear All,

I want to apply an interpolation formula to determine the value of a parameter. For example, a parameter that states the emission limit to achieve a net zero emission system has a value in 2025 of 1000 tons of CO2 and in 2050 the emission target is 0. How do I fill in the emission value between 2025 and 2050?

Thank you for the advice given.

2 replies

Userlevel 4
Badge +5

@rahmat 

 

Assuming you have a set of Years with index y, then for instance

Emission(y) := 1000 + (ord(y) - ord('2025', Years))*(0 - 1000)/(ord('2050', Years) - ord('2025', Years));

would do the trick

Userlevel 2
Badge +4

@MarcelRoelofs 

Thank you for the suggestion.

Reply


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

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