User:Adrian: Difference between revisions
| Line 268: | Line 268: | ||
::* Fixed status comboboxes issues | ::* Fixed status comboboxes issues | ||
::* Fixed module view issue | ::* Fixed module view issue | ||
* ''10th August 2015 - 16th August 2015'' | |||
:'''Major points describing week's work''' | |||
::* Added live plotting during solution of dynamic models | |||
:'''Fixed bugs''' | |||
::* Fixed no images in diagnose window issue | |||
::* Fixed exception on wrong parameters in integrator window issue | |||
[[Category:GSOC2015]] | [[Category:GSOC2015]] | ||
[[Category:ASCEND Contributors]] | [[Category:ASCEND Contributors]] | ||
Revision as of 17:13, 10 August 2015
He is 4th year student of Gdansk University of Technology in the field of Computer Science. He has some expierence with professional work. He is passionate about parallel computing and great enthusiast for Linux and open source. Currently, he is involved in the development and improvements in the GUI of ASCEND.
Contact Email: adrbogus1@student.pg.gda.pl
Subversion account: adrian:/
GSoC 2015 Project : GUI Improvements
Generally GUI migration from Gtk2 to Gtk3 with some bugs fixing. Then implementation of an installer for the Windows users, which bundles and installs necessary libraries. Finally addition of some functionalities to GUI.
Important information
New ASCEND GUI uses Gtk3 library, so some dependencies have to support this version of Gtk.
If you want to use Canvas GUI you need to have gaphas library (gtk3 branch), which is available on github.com. You can use this command to download it automatically:
Invalid language.
You need to specify a language like this: <source lang="html">...</source>
Supported languages for syntax highlighting:
a4c, abap, abc, abnf, actionscript, ada, agda, alan, algol, ampl, amtrix, applescript, arc, arm, as400cl, ascend, asciidoc, asp, aspect, assembler, ats, autohotkey, autoit, avenue, awk, ballerina, bat, bbcode, bcpl, bibtex, biferno, bison, blitzbasic, bms, bnf, boo, c, carbon, ceylon, charmm, chill, chpl, clean, clearbasic, clipper, clojure, clp, cmake, cobol, coffeescript, coldfusion, conf, cpp2, critic, crk, crystal, cs_block_regex, csharp, css, d, dart, delphi, diff, dockerfile, dts, dylan, ebnf, ebnf2, eiffel, elixir, elm, email, erb, erlang, euphoria, exapunks, excel, express, factor, fame, fasm, felix, fish, fortran77, fortran90, frink, fsharp, fstab, fx, gambas, gdb, gdscript, go, graphviz, haml, hare, haskell, haxe, hcl, html, httpd, hugo, icon, idl, idlang, inc_luatex, informix, ini, innosetup, interlis, io, jam, jasmin, java, javascript, js_regex, json, jsp, jsx, julia, kotlin, ldif, less, lhs, lilypond, limbo, lindenscript, lisp, logtalk, lotos, lotus, lua, luban, makefile, maple, markdown, matlab, maya, mercury, meson, miranda, mod2, mod3, modelica, moon, ms, msl, mssql, mxml, n3, nasal, nbc, nemerle, netrexx, nginx, nice, nim, nix, nsis, nxc, oberon, objc, ocaml, octave, oorexx, org, os, oz, paradox, pas, pdf, perl, php, pike, pl1, plperl, plpython, pltcl, po, polygen, pony, pov, powershell, pro, progress, ps, psl, pure, purebasic, purescript, pyrex, python, q, qmake, qml, qu, r, rebol, rego, rexx, rnc, rpg, rpl, rst, ruby, rust, s, sam, sas, scad, scala, scilab, scss, shellscript, slim, small, smalltalk, sml, snmp, snobol, solidity, spec, spn, sql, squirrel, styl, svg, swift, sybase, tcl, tcsh, terraform, tex, toml, tsql, tsx, ttcn3, txt, typescript, upc, vala, vb, verilog, vhd, vimscript, vue, wat, whiley, wren, xml, xpp, yaiff, yaml, yaml_ansible, yang, zig, znn
Then you should copy gaphastmp/gaphas directory either to canvas directory or to python site-packages (usually: /usr/lib/python2.*/site-packages).
New features
- Multiselection of variables to fix, free and observe
-
Main window with absorber model
-
Context menu for multiselection
-
After click 'fix'
-
After click 'free'
-
After click 'observe'
- Menu option to show/hide different instance types
-
Context menu option to hide a type
-
Hide all selected types
-
After click 'hide selected types'
-
Menu option to show hidden types
-
Menu option to hide more types
-
After 'Show variables/energy_rate'
- Report/enter celsius temperatures
-
Main window with airprops model
-
Units dialog with new unit
-
Units dialog with selected Celsius
-
Temperature constant in Celsius
-
Temperature in Celsius
-
After entering 30 degC
-
Changed temperature in Kelvin
-
Temperature properties
- Show output variables instead indices in external relations (e.g. CO.inlet.state.calc_ph and CO.inlet.state.calc_vT in combinedcycle_water model)
-
Before
-
After
- Show dialog boxes for when and logrel types
-
Heatex model with unsupported before types
-
When properties
-
Logical relation properties
General plan
Till mid-term (3rd July 2015):
- complete working port to GTK3, including canvas GUI (completed)
- port canvas GUI to GTK3 (completed)
- Firstly found all files which should be change. Then tried to port all of them file by file (using pygi-convert.sh, knowledge of pygtk and of course internet). Next tested GUI after every relevant change. Finally performed sanity testing on all changed widgets.
- test main GUI and fix bugs (completed)
- fork gaphas gtk3 branch and fix bugs (completed)
- I forked gaphas from https://github.com/amolenaar/gaphas, then fixed bugs and sent pull request, which was merged with origin.
- install a few virtual machines (completed)
- Installed Fedora 20 32bit with Kde, Debian 7 32bit with Gnome 2 and Ubuntu 14.04 32bit with Unity on VirtualBox
- test Ascend using them (completed)
- On every machine I downloaded Ascend, built it and then tested all canvas features canvas from its menus.
- windows installer based on GTK3, tested and working on a clean Windows VM (completed)
- create installers from trunk code (completed)
- Firstly I created 32 bit installer, as it looked simpler. When this was done, 64bit installer wasn't a problem. I used these pages: http://ascend4.org/Setting_up_a_MinGW-w64_build_environment and http://ascend4.org/Building_ASCEND_for_64-bit_Windows, but of course I had to resolve many problems e.g with mingw32 compiler, lyx for Windows, threading mode etc.
- create 32bit Ascend installer with new GUI (completed)
- I cloned my repository and built installer using scons. I did a lot of changes in nsis files in order to customize installer to new requirements. I removed old urls, old dependencies checking and installing, added section involving Canvas GUI, added new dependencies checking and installing.
- create 64bit Ascend installer with new GUI (completed)
- Ran the same environment in 64bit mode and built installer.
- create all needed python dependencies' installers (PyGI, PyGobject, PyCairo, Pango etc.) (completed)
- I downloaded installer from http://sourceforge.net/projects/pygobjectwin32/files/ and removed some parts from it. More information how to do this, here: http://ascend4.org/Creating_slim_PyGI_installer_for_Windows
- create Gaphas installer with its dependencies (completed)
- I took code from https://github.com and https://pypi.python.org/pypi and then run this command: 'python setup.py bdist_wininst', which produces binary Windows installer.
- install Windows 32bit and 64bit as virtual machines (completed)
- test Ascend on these vms (completed)
- Generally installed Ascend on clear vm. Installer downloaded and installed all dependencies and Ascend worked.
- improved tree-view in main GUI: (completed)
- multi-selection of variables to 'observe' (completed)
- I enabled multiselection mode and then allowed to fix, free and observe selected rows.
- menu option to show/hide different instance types (completed)
- I had to add orignal treepath to every row (this is the key in the data dictionary), modified a lot of code using this dictionary and finally added dynamically changing show/hide menu and appropriate callback functions.
- allow celsius temperatures to be entered/reported in the GUI (completed)
- I added workarounds for displaying/entering celsius temperature in GUI. Every show/edit 'event' is checked whether there is need to change kelvin to celsius or vice versa. Changes are transparent for user, because it looks like 'normal' unit from libascend.
Till full term (28th August 2015):
- improved tree-view in main GUI: (completed)
- better handling of keyboard navigation and value input (completed)
- Added possibility to start editing value after pressing ENTER.
- improve rendering of events, whens, conditionals. (completed)
- I added some function to libascend to call them from python gui and show some information about logrel and when to user.
- dialog boxes for not-yet-supported instance types (completed)
- The same as above. Moreover added rendering external relation using output variables instead indices.
- redesign solver/integrator APIs for better handling of user interrupts (completed)
- create sample solution using multithreading (completed)
- Created daemon thread solving model in background.
- create sample solution using multiprocessing (completed)
- Created new process for solving model. Not completed solution due to complexity.
- test both of them (completed)
- Multithreading: Generally very good approach, because it has a lot of advantages. It's simple, light, it doesn't increase computation time and everywhere you can use variables from Browser class. However it has disadvantages also. You can stop the thread only between iterations, so if iteration is long, it takes some time. And what follows: it looks IPOPT doesn't support slv_iterate, so whole solving is done in one iteration. Therefore user can't stop thread (as I mentioned above, it possible only between iterations).
Multiprocessing: Child process for solving and parent process for updating gui. The approach has great advantage. You can kill "everything" you want (like killing any process in linux), so even IPOPT isn't a problem now. But it has many cons. Implementation is a little more difficult and time spent on calculations is greater (e.g. about 1 second when solving models/johnpye/fprops/rankine_regen.a4c, model rankine_regen_water). Moreover every process has own variables, so they cannot exchange data as simple as in multithreading model. It's needed to create a pipe for communication. You need to send errors from libascend (some errors are reported in 'c' code, the receiver is child process, so it has to send them to parent, otherwise they aren't reported in gui), simulation status (if you want to see something in gui, the parent process must handle it) and finally whole simulation (child process solved it, so child process own it). This is the biggest problem. If you want to send something via pipe, you must serialize it. I added possibility to serialize SolverStatus, but in case of Simulation, the task is very hard, because underneath there are object and structures, which have to be serialized also. I think it's necessary to use external library for c++ serialization.
- implement chosen solution for solve in gtkbrowser, solverhooks and study (completed)
- Every case has the same functions, but with a little bit different implementation. This is due to difference between behavior of every solving case.
- implement chosen solution for integration (completed)
- I had to change a way for saving observed values due to some erros in libascend. Now it's done in ascxx module by calling saveObservations() and user can get them using getObservations().
- full support for live plotting during solution of dynamic models (in progress)
- improved line-routing for the canvas GUI (not started)
- windows installers using msys2 (optional) (not started)
- substantial progress on associated bug-fixed as agreed in weekly meetings (in progress)
- Fixed 59 bugs so far (7th August 2015)
Timeline for task completion
- 1st April 2015 - 3rd May 2015
- Major points describing weeks' work
- Ported Canvas GUI to Gtk3
- Fixed bugs
- Fixed properties displaying after model running
- Fixed context menu displaying issue
- Fixed context menu instance wrong tab displaying issue
- Fixed context menu tool issue
- Fixed method entry issue
- Fixed zoom issue
- Fixed solver status without parent issue
- Fixed instance showing after run issue
- Fixed canvas saving issue
- Fixed blockproperties window issue
- Fixed transient parent for about dialog issue
- Fixed transient parent for canvasproperties issue
- Fixed export svg dialog transient parent issue
- Fixed KeyError in otank dictionary issue
- Fixed selected item status issue
- Fixed no icons issue
- Fixed disappearing menu issue, removed unecessary multiple definitions of toolbar
- Fixed adjustments issue
- 4th May 2015 - 10th May 2015
- Major points describing week's work
- Installed three virtual machines and two native systems with different operating systems and desktop enviroments
- Debian 7 32bit with Gnome 2 - virtual machine to test
- Fedora 20 32bit with Kde - virtual machine to test
- Ubuntu 14.04 32bit with Unity - virtual machine to test
- Fedora 20 64bit with Gnome 3 - main computer to develop and test
- Debian 8 64bit with Gnome 3 - laptop to develop and test
- Testes Canvas GUI on every machine
- Installed three virtual machines and two native systems with different operating systems and desktop enviroments
- Fixed bugs
- Fixed renaming block issue
- Fixed issue with endless depth string in obrowser
- Fixed issue with attributes for tree column view in blockproperties for gnome 2
- Fixed saving canvas after running issue
- 11th May 2015 - 17th May 2015
- Major points describing week's work
- Created user wiki page
- Forked gaphas and fixed bugs (gtk3 branch)
- Initial work with windows 32bit installer
- Fixed bugs
- Fixed scroll adjustments issue
- Fixed scrolling on canvas
- Add gnome 2 compatibility
- 18th May 2015 - 24th May 2015
- Major points describing week's work
- Further work with windows 32bit installer
- Fixed bugs
- Fixed no reporter instance issue
- Removed workarounds after gaphas fixing
- 25th May 2015 - 31st May 2015
- Major points describing week's work
- Resolved many problems with creating trunk code installer
- Created first (bugged) version of 32 bit adrian branch installer
- 1st June 2015 - 7th June 2015
- Major points describing week's work
- Created new 32bit Ascend installer for Windows
- Created new 64bit Ascend installer for Windows
- Tested both of them on virtual machines
- Fixed bugs
- Fixed windows real time library issue
- Fixed null windows issue
- Removed code, which causes problems with python dlls imports
- Fixed 64bit installer filenames issue
- 8th June 2015 - 14th June 2015
- Major points describing week's work
- Created slim PyGI installer for Windows
- Created all python dependencies installers
- Added matplotlib files to installer
- Improved 32bit Ascend installer for Windows
- Improved 64bit Ascend installer for Windows
- Tested both of them on virtual machines
- Allowed user to resize columns in observer tab
- Updated gtk version in glade file
- Fixed bugs
- Fixed adjustment issue
- Fixed transient window for plot
- Fixed observed float values issue
- 15th June 2015 - 21st June 2015
- Major points describing week's work
- Reformated ascend glade file
- Added multiselection of variables to fix, free and observe
- Fixed bugs
- Fixed units issue
- Fixed not refined solver var issue in context menu
- 22nd June 2015 - 28th June 2015
- Major points describing week's work
- Added option to show/hide different instance types
- Fixed bugs
- Fixed dictionary keys issue
- 29th June 2015 - 5th July 2015
- Major points describing week's work
- Added possibility to show/enter celsius temperatures
- Fixed bugs
- Fixed unitsdialog issue
- Fixed model context menu issue
- Fixed issue with too many items in menus after opening next model
- Fixed incidence graph resizing issue
- Fixed almost endless simulation creating in models with 'deep' dependencies
- Fixed first time selected units issue
- 6th July 2015 - 12th July 2015
- Fixed bugs
- Fixed first solver choice issue
- Fixed solver choosing issue
- Fixed builder substitution issue
- Fixed displaying old module issue
- 13th June 2015 - 19th July 2015
- Major points describing week's work
- Added external relation indexing using output variables
- Added ability to edit the value using ENTER
- Fixed bugs
- Fixed delta temperature conversion issue
- 20th June 2015 - 26th July 2015
- Major points describing week's work
- Added default selection in unitsdialog
- Added support for celsius temperature in properties dialog
- Added dialog boxes for when and logrel types
- Initial work with background tasks
- Fixed bugs
- Fixed temperature properties displaying issue
- Fixed observer tab label issue
- Fixed endless editing while using ENTER issue
- Fixed problem with entering boolean values
- 27th June 2015 - 2nd August 2015
- Major points describing week's work
- Created multithreading solution for solving
- Created multiprocessing solution for solving
- Tested them and prepared report
- Fixed bugs
- Fixed too less errors after solving
- Fixed no text on progress bar in solver status dialog
- Fixed celsius temperature typing issue
- 3rd August 2015 - 9th August 2015
- Major points describing week's work
- Added background task for integration
- Added background task to solver hooks
- Added celsius temperatures in observer tab
- Added background task in study
- Moved celsius temperature workaround code
- Added celsius temperatures to study dialog
- Fixed bugs
- Fixed no text on progressbars issue
- Fixed no change in observer tab issue
- Fixed status comboboxes issues
- Fixed module view issue
- 10th August 2015 - 16th August 2015
- Major points describing week's work
- Added live plotting during solution of dynamic models
- Fixed bugs
- Fixed no images in diagnose window issue
- Fixed exception on wrong parameters in integrator window issue