Skip to main content
Solved

Retrieve variable values during simulation (variable not in math program)

  • June 29, 2021
  • 2 replies
  • 38 views

Forum|alt.badge.img

Hey. I am trying to implement a plot in a WinUI that displays simulation progress. In this plot, I am showing a variable value changing with simulation iteration (simulation continues until the iteration value has reached a limit). The variable is not in a math program, hence, I believe I can not obtain its value using callback (using RetrieveCurrentVariableValues procedure). Anyways, the variable gets updated at the end of every iteration.

 

Presently, the plot between the variable value vs iteration does not show when the simulation in in progress (or when procedure is running) and appears after the procedure is over. Is there anyway to update the plot when the procedure in running? Thanks.

 

Here is the structure of the procedure I am running: 

while (iteration limit is reached) 

solve Mathematical program1; 

solve Mathematical program2;

Update Plot Variable using variables from math programs 1 and 2; (Plot variable to display in plot)

iteration = iteration + 1;

endwhile;

Best answer by deannezhang

You can add statement

PageRefreshAll;

after the update statements in each iteration.

2 replies

deannezhang
AIMMS Champ
Forum|alt.badge.img+3
  • AIMMS Champ
  • 61 replies
  • Answer
  • June 29, 2021

You can add statement

PageRefreshAll;

after the update statements in each iteration.


Forum|alt.badge.img
  • Author
  • Ace
  • 13 replies
  • June 29, 2021

Thanks Deanne.This works.



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

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