Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What is the most efficient way to access many variables in the MIMIC value space?

mimic value variables
0
10 Posted

What is the most efficient way to access many variables in the MIMIC value space?

0
10

A. The first performance improvement to implement is the access by OID instead of name, as detailed in the previous section. The MIMIC API features “multiple-variable” get and set operations on the MIMIC value space, which get and set multiple variables in one operation. The Tcl mimic value mget (and analogous calls in the other supported languages) is the equivalent to mimic value get for multiple variables. The same applies for the mimic value mset operation. These calls are specially efficient if you need to get/set many variables in your simulation. We ran a performance test to access a large number of variables (on the order of 100,000), first with mimic value get, then with mimic value mget with 1, then 10, and finally 100 variables per call. We repeated the experiment for mimic value mset.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.