Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve functionality related to online plotter #194

Open
ahobeost opened this issue Jun 7, 2024 · 4 comments
Open

Improve functionality related to online plotter #194

ahobeost opened this issue Jun 7, 2024 · 4 comments

Comments

@ahobeost
Copy link
Contributor

ahobeost commented Jun 7, 2024

Currently, online plotters are commented out entirely to turn them off.
This doesn't make any sense, as the subprocess already stops it from being displayed in the first place.

Additionally, online plotters can simply be turned off by using the 9th parameter.
grafik

Making this easy to interact with (e.g. with a corresponding variable) would also allow the User to easily choose which 10 plotters to use in larger simulations.

`EQUATIONS 1
:useOnlinePlotter = -1

UNIT 4 TYPE 65 Type65d
PARAMETERS 12
4 ! 1 Nb. of left-axis variables
2 ! 2 Nb. of right-axis variables
-2 ! 3 Left axis minimum
3 ! 4 Left axis maximum
-2 ! 5 Right axis minimum
3 ! 6 Right axis maximum
1 ! 7 Number of plots per simulation
20 ! 8 X-axis gridpoints
:useOnlinePlotter ! 9 Shut off Online w/o removing`

Which could then be activated in the config file using:
deck snk60_useOnlinePlotter 1

@zuckerruebe
Copy link
Contributor

Can the way you suggest to use the 9th parameter not already be used as things are ATM? Plus, in addition you can decided to switch all of them off/comment all of them out?

I didn't understand what you meant by "the subprocess stops it from being displayed".

@zuckerruebe
Copy link
Contributor

Ah, I should have pointed out, there's a flag, ignoreOnlinePlotter (https://pytrnsys.readthedocs.io/en/latest/guide/run_simulation.html#simulation-control), to en/disable commenting out of online plotters.

@ahobeost
Copy link
Contributor Author

ahobeost commented Jun 7, 2024

https://github.com/SPF-OST/pytrnsys/blob/master/pytrnsys/rsim/executeTrnsys.py
grafik

This code causes the subprocess to suppress all popupwindows when using "ignoreOnlinePlotter".

As we both say, the 9th parameter can already be used now.
We can thus cut out the code related to commenting things out and make use to the 9th parameter automatically instead.

@zuckerruebe
Copy link
Contributor

Ah, yes, you're probalby right. With the one caveat that maybe, if we don't comment out the plottes and only use the /N or /H flag, TRNSYS might still complain about there being too many online plotters. But I guess that's fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants