Dropdown menu in MIRO
Posted: Mon Jul 17, 2023 10:48 am
Hi everyone,
I am currently working on understanding the data communication between MIRO and GAMS, and I have the following questions:
Based on the transport model, I introduce a new set y with available years from 2021..2023, each year having a particular cost stored via the k(y) parameter.
My objective is to display this list of years as a Dropdown menu in MIRO. When a user selects a specific year from the Dropdown menu, I would like the adapted cost for that year to be applied to the parameter c(i,j).
Please have a look at my attached GAMS code , which works in MIRO. However, the user currently needs to manually enter the desired year after clicking on "Load Data" and modifying the scalar value to either 2021, 2022, or 2023. Once the year is selected, the associated cost is applied.
I have two questions regarding this implementation:
+ According to the guide at https://www.gams.com/miro/widgets.html#widget-dropdown, it appears that we can only implement a Dropdown menu for singleton sets?
+ Is there an alternative method to configure the year values in the Dropdown menu dynamically, fetching them directly from the k(y) parameter? Currently, when running MIRO in configuration mode, it seems that I can only manually set the years statically. I guess I need to use a Custom Renderer in this case?
Thank you for taking the time to address these queries. I appreciate your assistance.
Best,
Thai
I am currently working on understanding the data communication between MIRO and GAMS, and I have the following questions:
Based on the transport model, I introduce a new set y with available years from 2021..2023, each year having a particular cost stored via the k(y) parameter.
My objective is to display this list of years as a Dropdown menu in MIRO. When a user selects a specific year from the Dropdown menu, I would like the adapted cost for that year to be applied to the parameter c(i,j).
Please have a look at my attached GAMS code , which works in MIRO. However, the user currently needs to manually enter the desired year after clicking on "Load Data" and modifying the scalar value to either 2021, 2022, or 2023. Once the year is selected, the associated cost is applied.
I have two questions regarding this implementation:
+ According to the guide at https://www.gams.com/miro/widgets.html#widget-dropdown, it appears that we can only implement a Dropdown menu for singleton sets?
+ Is there an alternative method to configure the year values in the Dropdown menu dynamically, fetching them directly from the k(y) parameter? Currently, when running MIRO in configuration mode, it seems that I can only manually set the years statically. I guess I need to use a Custom Renderer in this case?
Thank you for taking the time to address these queries. I appreciate your assistance.
Best,
Thai