Skip to main content

Hello everyone!

I’m reaching out to know how can I use multiselect in showing nodes and arcs in my network map. It is part of my project to make the UI interactive, however, I’m having difficulty doing so. 

I have tried testing if the same multiselect-table interaction can also work here, but it doesn’t. 

Any tips or examples you can provide?
Thank you!

Hello ccfcuento,

 

I created a small WebUI application, illustrating how I use the multi-select widget to make selections and work with these selections in other widgets. 


To start with the app has:

  • A set of locations, s_locs with indices i_loc, i_locFrom, i_locTo.
  • A parameter with data between those locations, p_dist(i_locFrom,i_locTo) (random data, not actual distances).
  • Latitude and longitude info for each location p_lat, plon.
  • A table widget showing data between those locations
  • A Map widget showing the locations (three locations in the south of South America).

To adapt this app for location selection, I made the following steps:

  1. I introduced a binary parameter, bp_locSel(i_loc) and initialize it to 1 for each location.
  2. I placed that on a new multi-select widget thus permitting easy selection / de-selection of a location.
  3. I introduced a subset of locations, s_selLocs, defined as { i_loc | bp_locSelec(i_loc) }, and with indices i_selLoc, i_selLocFrom, i_selLocTo
  4. In the map widget, each of the parameters used, I changed the index from i_loc to i_selLoc thus showing only the nodes in the set s_selLoc.
  5. In the table widget, I changed the use of index i_locFrom to i_selLocFrom, and i_locTo to i_selLocTo.
After adding selection to table and map widget.

 

I hope this example will enable you to apply selection to your application as well.

With kind regards,

 

Chris.


PS. The filter tab is no longer available to widgets, see also the first remark in:  https://documentation.aimms.com/webui/widget-options.html#widget-options


Hello Chris, 

Thank you very much for this. I will try working out on your steps. 

However, just to give you a heads up, I cannot seem to access your file and the program says:
 

Thank you again!


Hello Carl,

 

This UUID refers to the WebUI library as a repository library; and this is in use since AIMMS 24.4.
My example is based on AIMMS 24.5.

You can download and install AIMMS 24.5 from aimms.com/downloads.

 

With kind regards,

 

Chris.


Hello Chris, 

Does that also work for academic licenses? Thank you!


Dear Carl, 

It works the same no matter the license type so it should work for an academic license as well.

 

Kind regards,

Dessie


Hello,

Thank you again and apologies for the numerous questions. 

I have already tried it but it does not work the same way. It is because I don’t need to include distances between the nodes, instead, only the coordinates are important. However, I don’t know how will I change the index of the coordinates based on the selected one.

Thank you again.


If I proceed with making another index for selected nodes and put it as index for the subset, AIMMS shows this error message:

The declaration of index "selectedI" cannot be changed from a stand alone one to a local one.


Also, I tried the slicing index to the selected_I index I made but the UI says this error:

 

 


Hello, kindly disregard the previous inquiries. I already did it. 

Additional question: How about if I want arcs to be activated thru multiselect. Is that possible?

 


Reply


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

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