Closed pnanez closed 2 years ago
Hi!
could you please provide more details about what is the problem when displaying the percentage of simulation?
Best, Santiago
perhaps something like this: https://www.mathworks.com/matlabcentral/fileexchange/28067-text-progress-bar I always wanted to know why the simulation stopped (due to j or t), and we have now a "bundled" percentage that is given in lines 224 and 261 of HyEQsolver.m line 261: fprintf('\b\b\b\b%3.0f%%',max(100j/JSPAN(end),100tout(end)/TSPAN(end)));
Some people had mentioned that they can see that the percentage of simulation can go beyond 100%. I am not sure how this might happen, but having time and jumps as progress bars can tell us much more. I was thinking something like:
time: 100% [..........]done jumps: 80% [........ ]
or time: 20% [.. ] jumps: 100% [..........]done
What do you think about this?
Visually I like the idea, but I have two comments, 1) the update of the progress should be during the simulation, like inside the main while loop, preferably at line 260. Right now is more like a "summary" about what happened. 2) the results are not aligned time: 40% [.... ] jumps: 100% [..........]Done
perhaps something like this looks better: time:,,,,,,,,,,40%........[....,,,,,,] jumps:,,,,100%,,,,,,,,[..........]Done (using spaces instead of ,) perhaps using tabs? https://www.mathworks.com/matlabcentral/answers/359032-how-can-i-insert-a-tab-character-in-my-character-array
I can guess that Ricardo @HybridSystemsLab would like to see this, once you solve 1) and 2) we can ask him for his input.
Hi Pablo,
I like the dots idea! But why not
hybrid time : X% [....]
and always have it end at 100%?
Regards, Ricardo
On Wed, Jul 1, 2020 at 10:05 AM Pablo Nanez notifications@github.com wrote:
Visually I like the idea, but I have two comments,
- the update of the progress should be during the simulation, like inside the main while loop, preferably in like 260. Right now is more like a "summary" about what happened.
- the results are not aligned time: 40% [.... ] jumps: 100% [..........]Done
perhaps something like this looks better: time: 40% [.... ] jumps: 100% [..........]Done perhaps using tabs?
I can guess that Ricardo @HybridSystemsLab https://github.com/HybridSystemsLab would like to see this, once you solve 1) and 2) we can ask him for his input.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pnanez/HybridSimulator/issues/51#issuecomment-652540004, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADRUCEPWNCASFKVPIIM5RUDRZNUGRANCNFSM4NEKO4RA .
--
Websites: https://hybrid.soe.ucsc.edu https://cps.ucsc.edu Youtube: https://www.youtube.com/c/HybridSystemsLaboratory
will the hybrid time be the max between t and j?
This example exhibits that feature for you guys to check it.
Do you have any example in which the time goes beyond 100%?
I recall the BB example that comes with the tool has this issue.
Regarding horizon and reporting "hybrid time", I think that the simplest solution is that given (T,J), we determine percentage at current (t,j) of the simulation using the following logic:
If t \geq T or j \geq J then we report 100%
If t <T and t < J, then we use the smallest between T-t and J-j to compute percentage. When either of these errors is zero, then we should report 100%.
So we reporting hybrid time may not be needed in the end.
On Thu, Jul 2, 2020 at 1:01 PM Santiago JL notifications@github.com wrote:
Do you have any example in which the time goes beyond 100%?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pnanez/HybridSimulator/issues/51#issuecomment-653196651, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADRUCEOAIOYEWKF6AER7LRDRZTRSBANCNFSM4NEKO4RA .
--
Websites: https://hybrid.soe.ucsc.edu https://cps.ucsc.edu Youtube: https://www.youtube.com/c/HybridSystemsLaboratory
I would like to pitch this idea one more time. When writing new systems/examples, I found the single percentage (bundled using the max) not informative enough. Sometimes the simulation stops and you are not sure why (on the fly), so you had to go to the data and check. Also, it might be easier to spot problems if you can see the progress on t and j dimensions, for example, your jump-map/set might be not well defined and you might end up with a discrete solution, if you have a bundled progress then you see that it goes to 100%, then you check the data and you realize that there is a problem. But, if you can see the two dimensions of time you can check the problem even without checking the data (even before that the simulation stops). Also, I think that for didactical purposes, watching the progress in two dimensions can help the user to get more used to the hybrid time-domain (it might be nice to watch in Zeno type solutions). Also, I understand that it might be confusing, so it would require some work on the design. This is my first take:
(example, t = 20.4, j = 42, T = 100, J = 100) Progress: [t: 20.4/100, j: 42/100], overall progress [....__] 42%
(example, t = 60.6, j = 42, T = 100, J = 100) Progress: [t: 60.6/100, j: 42/100], overall progress [......____] 61%
let me know your thoughts @sjimen28 @HybridSystemsLab
I like it. As long as "overall progress" ends with 100% :-)
On Mon, Jul 6, 2020 at 7:21 AM Pablo Nanez notifications@github.com wrote:
I would like to pitch this idea one more time. When writing new systems/examples, I found the single percentage (bundled using the max) not informative enough. Sometimes the simulation stops and you are not sure why (on the fly), so you had to go to the data and check. Also, it might be easier to spot problems if you can see the progress on t and j dimensions, for example, your jump-map/set might be not well defined and you might end up with a discrete solution, if you have a bundled progress then you see that it goes to 100%, then you check the data and you realize that there is a problem. But, if you can see the two dimensions of time you can check the problem even without checking the data (even before that the simulation stops). Also, I think that for didactical purposes, watching the progress in two dimensions can help the user to get more used to the hybrid time-domain (it might be nice to watch in Zeno type solutions). Also, I understand that it might be confusing, so it would require some work on the design. This is my first take:
(example, t = 20.4, j = 42, T = 100, J = 100) Progress: [t: 20.4/100, j: 42/100], overall progress [....__] 42%
(example, t = 60.6, j = 42, T = 100, J = 100) Progress: [t: 60.6/100, j: 42/100], overall progress [......____] 61%
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pnanez/HybridSimulator/issues/51#issuecomment-654269046, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADRUCEIZ2X7LSNTTIU35GDTR2HMVLANCNFSM4NEKO4RA .
--
Websites: https://hybrid.soe.ucsc.edu https://cps.ucsc.edu Youtube: https://www.youtube.com/c/HybridSystemsLaboratory
The OOP_improvements
branch I just added includes a progress bar that updates both during flows and jumps. I also added an "silent" option to hide progress updates and users can define their own HybridProgress
objects and pass them to HyEQsolver
to define custom behavior.
Nice @pwintz! it would be nice to take a look at that, perhaps in the next meeting?
The new progress bar looks like this:
I opted to use a single progress bar because that is much easier in MATLAB, but information about t and j are shown as text. Additionally, when the solver completes, the HybridSolution object that it creates contains a termination_cause
property that indicates why the simulation stopped. This seems to cover all of the functionality discussed above. Can we close this issue?
Yes, I saw it, I think that this solves the issue. I am going to close the issue, but if Ricardo has more input we can reopen. The progress bar looks amazing!
Fix the issue with the display of the % of simulation in the lite version (perhaps a progress bar?)