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;
Best answer by deannezhang
You can add statement
after the update statements in each iteration.