Dynamically assign value

  • 16 March 2023
  • 0 replies
  • 34 views

Userlevel 5
Badge +7

I recently got the question, how to assign a value to a given parameter; for instance the end user enters the name of a configuration parameter and its new value. 

This question is similar to obtaining the value of an arbitrary identifier, and runtime libraries can be used to code this generically; see https://how-to.aimms.com/Articles/146/146-value-dynamic-identifier.html

I created a small example model, whereby three parameters can be changed by naming them in the bottom scalar widget and entering a new value as illustrated below:

Demo app after entering a value for AB987.

Please find the demo app attached to this post.


0 replies

Be the first to reply!

Reply


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

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