User:Mike: Difference between revisions

From ASCEND
Jump to navigation Jump to search
Mike (talk | contribs)
Mike (talk | contribs)
No edit summary
Line 192: Line 192:


== Aug 3 to Aug 9 ==
== Aug 3 to Aug 9 ==
*
== Discussion notes for August 10 ==
*
== Aug 11 to Aug 18 ==
*
== Discussion notes for August 19 ==
*
== Aug 19 to Aug 22 ==


*
*

Revision as of 14:25, 21 August 2016


Name: Tengda Han (Mike)

University: ANU

Email: u5612799@anu.edu.au

Summary: I am doing GSOC2016 for ASCEND. I will do something on Canvas.

Discussion notes of 12 May 2016

To get the canvas GUI running in the trunk code, I used:

john@thunder:~/ascend/trunk2$ ./pygtk/canvas/canvas.py


May 12 to May 22

  • Set development environment and play with canvas.
  • Find a problem about module 'ascpy' in my branch, which cannot be found in canvas.py.
  • But when I run canvas.py of main trunk, module 'ascpy' can be found, but another error is called:libascend.so.1: cannot open shared object file: No such file or directory


Discussion notes of 23 May 2016

  • cannot find module 'ascpy' is because I need to compile by
scons -j4
  • set paths properly before run canvas.py:
export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH
export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH
  • find a bug of Adrian's branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.


May 23 to May 29

  • Tested Adrian's branch on ubuntu 16.04 LTS. Previous bug doesn't exist (ascend kills the terminal)
  • Try to understand Gaphas and libavoid.
  • Link 'libavoid' on ASCEND wiki has 404 error.
  • When 'scons' ASCEND in Ubuntu16.04, SWIG error comes. sulution here


Discussion notes of 30 May 2016

  • When try to run canvas.py, should set PYTHONPATH to
ascend_trunk/trunk/model/johnpye/fprops/python
  • For Adrian's version
canvas.py doesn't work because of
Error: sys.path must be a list of directory names
Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:
cd ~/desired directory
git clone https://github.com/amolenaar/gaphas
git checkout gtk3
git pull
sudo python setup.py install
However, after canvas.py pops up, TypeError: Couldn't find conversion for foreign struct 'cairo.Context' occurs when click on blank canvas


May 30 to June 5

  • Solved TypeError: Couldn't find conversion for foreign struct 'cairo.Context' by
sudo apt-get python-gi-cairo

This package is a Python Cairo bindings for the GObject library

  • If problems occur when installing gaphas by
sudo apt-get install python-gaphas

Check the universe repository before installation may help

  • Undo button works (finishing the work of Adrian), redo haven't been implemented yet.


Discussion notes of June 6 2016

  • Buttons now have labels. By adding tb.set_style(Gtk.ToolbarStyle.BOTH) after tb = Gtk.Toolbar()
  • I can improve blocks, firstly to make sure they can be properly solved in canvas.


June 6 to June 13

  • Problems found: every time after using the model in canvas, a '.svg' file of that model will be generated.


June 13 to June 28

  • GUI update: Load Library (Ctrl+L) is enabled from menu bar
  • GUI update: Correct labels in Block Properties Dialog

June 29 to July 10

  • Fix a bug when adjusting Error/Status Reporter Console
  • Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.
  • Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.
  • An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before 'run' or 'save'. 2. avoid reduplicate names when generating blocks.
  • Also, a warning 'CompareStatements called with unknown statement' always appears when load files, but seems don't affect the result.
  • Add reporter for loading libraries and files.
  • Errors including line number can be shown on canvas when loading is unsuccessful.
  • Update information in 'Help' Menu

Discussion notes of July 11 2016

  • Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp
  • Preference of units should be improved: modify pygtk/preference.py
  • Warning should be displayed when ports not connected
  • Models with degree of freedom should not be solved. Warning should be displayed
  • In 'Block Properties', equations of blocks should be displayed

July 11 to July 20

  • Correct syntax error in some files
  • Improving Block Properties to display equations, by editing relating python files and glade files.
  • Warning Dialog added when load new libraries with canvas items existing.
  • Warning Dialog added when exiting without saving canvas (still need improve).

Discussion notes for July 20 2016

  • For equation display, some paths may be valuable to check: asclibrary - get module types - library.h - type.h - ismodel(); ascend/compiler - type.descio.h - writedefinition.
  • Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network & over constrain issues.

July 21 to Aug 2

  • Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory 'pygtk/canvas/.temp' and save all the .svg files into that .temp directory. By modifying mike:models/test/canvas/blocktype.py
  • Piping system library can be loaded now. But still working on equations.

Discussion notes for August 3 2016

  • generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).
  • Combine Quit (Ctrl+Q) and close button together by assign 'dispensable' argument i.e. Event=None.
  • Refresh the workflow for developing piping system model.

Aug 3 to Aug 9

Discussion notes for August 10

Aug 11 to Aug 18

Discussion notes for August 19

Aug 19 to Aug 22