Comments (6)
@EwaGomez Thanks!
I think this is an important issue, for several reasons: (i) the GUI becomes unusable when a simulation is running, which greatly diminishes the interest of the graphical interface compared to entering the parameters via text files or directly via variables in the code (since the only aim of the current GUI is entering parameters. There is no realtime plots, progress or some other useful functionalities. The output is only seen in the stdout console.). (ii) when a GUI application becomes unresponsive for a long time, the system can stop it. (iii) the user cannot stop cleanly the simulation. The only way to do so is to stop Python from the IDE, which is not recommended (open files, memory, actions in progress...).
Another reason I opened this issue is because you're pushing the GUI aspect as novelty of the software, and in this case you have to make it usable. You could highlight other new contributions such as albedo, for example, and leave aside this GUI aspect to redesign and redevelop it completely with functionalities that facilitate the use of the software. And therefore as a perspective and not as a finalized functionality.
from bifacialsimu.
Thank you for your comment! I will read into the threading library!
Would you mind if I resolve this issue after the JOSS review? Right now I would love to concentrate on more research related issues and later in the year on a more user-friendly design.
from bifacialsimu.
@sidihamady - You are totally right, the novelty of BifacialSimu was not the GUI, but the albedo and electrical models. I made those changes to the original paper!
I still like the idea of Threading and I have been working on it for the last few days. I was able to integrate Threading and to make the GUI responsive during simulations, but unfortunately is matplotlib not threadsafe and was not able to communicate with the Thread, where the calculations were running. Matplotlib is a crucial part of BifacialSimu, since, besides the results data, you get 9 interactive plots at the end of the simulation. So I had to delete Threading again to keep Matplotlib running.
I am now reading into multiprocessing instead of Threading.
By any chance, do you have any experience in Tkinter, Multiprocessing and Matplotlib?
Do you still think that this is an issue for the JOSS publication?
from bifacialsimu.
Dear @EwaGomez
To implement the threading you need to understand some important points.
First the GUI (so Tk and matplotlib) runs in the main thread. Tk and matplotlib are not thread safe. And they don't need to be thread safe. The organization is as follows:
1/ the main thread with UI
2/ a working thead, with only calculations and without any direct call to the GUI.
The communication between the threads can be done using various methods, e.g. events, mutex, ... (with a timer for example).
The simplest way is to perform all calculations is a working thread and setup a termination function that can create/update plots. If you try to plot directly from the working thread, the program will not work.
If by design you have mixed UI stuff with the simulation routines, it will take some time to redesign the application. One golden rule is to never mix UI and calculations. Different routines, different classes. It can take some time in the beginning but it is really crucial.
You can look at the application I developed to simulate solar cell I-V characteristic: https://github.com/sidihamady/Photovoltaic-Model.
For JOSS, as I mentioned, if you consider GUI as something new in the publication, then it should follow usability rules, and be always responsive and offers features not offered by a command-line program.
If the novelty is only in albedo and electrical models, then this should be highlghted clearly in the paper, and therefore remove the part relating to the novelty which would be linked to the GUI.
from bifacialsimu.
Dear @sidihamady,
Thank you for your input!
I just released a new version of BifacialSimu including threading. The GUI is now responsive during the simulation. But I also implemented your second suggestion and shifted the main USP of the paper from the GUI to the different simulations models, especially the albedo models. In the future, after the JOSS publication, I will implement a timer and a function to update the plots.
from bifacialsimu.
Dear @EwaGomez,
The issue is now addressed. Thanks.
Indeed, in a future version it is important to enrich the GUI with updated plots, progress information, etc.
from bifacialsimu.
Related Issues (16)
- [JOSS] Does the package have standard tests? HOT 2
- [JOSS] Using modified versions of pvfactors and bifacial_radiance seems unsustainable HOT 4
- [JOSS] No community guidelines HOT 1
- [JOSS] paper.md feedback HOT 1
- [JOSS] document all dependencies HOT 3
- [JOSS] git repository contains unnecessary files HOT 1
- [JOSS] pvlib and pvfactors not included in Anaconda by default HOT 3
- [JOSS] ImportError: cannot import name '_missingKeyWarning' from 'bifacial_radiance.main' HOT 1
- [JOSS] AUTHORS file HOT 3
- [JOSS] GUI issues on linux HOT 1
- [JOSS] egg-info should be removed HOT 1
- [JOSS] package version in setup.py is out of date HOT 1
- [JOSS] ViewFactors error: "dateutil.parser._parser.ParserError: Unknown string format: 11-01 00:00%" HOT 9
- Shapely issue on Mac
- FileNotFoundError HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bifacialsimu.