<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://ascend4.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mike</id>
	<title>ASCEND - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://ascend4.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mike"/>
	<link rel="alternate" type="text/html" href="https://ascend4.org/Special:Contributions/Mike"/>
	<updated>2026-04-28T21:45:37Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://ascend4.org/index.php?title=Student_projects&amp;diff=5957</id>
		<title>Student projects</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=Student_projects&amp;diff=5957"/>
		<updated>2018-02-02T14:53:05Z</updated>

		<summary type="html">&lt;p&gt;Mike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to [[Main Page|ASCEND]]! You might want to read our [[ASCEND overview|overview]] to learn a bit about our project, or read about our more general [[Development Activities]]. This page gives a long list of possible student projects with our project, which means potential [[GSOC2018]] projects, or possibly undergrad or post-grad research projects, such as for engineering final-year students. Our contact details are [[Support|here]]. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Last updated Jan 2018.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= Recommended projects =&lt;br /&gt;
&lt;br /&gt;
We have assigned &#039;&#039;&#039;priorities&#039;&#039;&#039; to these projects. All things being equal, we will choose students who propose high-priority projects. However, all things are not equal; if we receive a very strong proposal from a student who has done lots of preparatory work, then we will probably choose that student over a lower-quality proposal for a higher-priority project.&lt;br /&gt;
&lt;br /&gt;
== Graphical flowsheet editor ==&lt;br /&gt;
&lt;br /&gt;
Similar to the flowsheet editor in chemical process modelling software such as ASPEN, ASCEND has a [[canvas-based_modeller_for_ASCEND|Canvas-based modeller]] which is currently in development, and not yet quite usable. We would like to push this nice new interface closer to usability. The next step in the implementation, be believe, is to implement proper &#039;connector&#039; logic, including annotation which which variables should be connected in a &#039;potential&#039; sense (eg. voltage, temperature), and which which should be connected in a &#039;flow&#039; sense (eg. current, energy). Connectors should be able to connect a number of related variables at once. Also it would be good to present documents/tutorials to users for solving practical problems. Before going ahead with this project, we would like to discuss implementation details with interested students.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]], [[User:Mike|Tengda (Mike) Han]]&lt;br /&gt;
* Level of difficulty: Medium&lt;br /&gt;
* Priority: Medium/High&lt;br /&gt;
* Languages: Python, possibly a small amount of C/C++&lt;br /&gt;
* Also useful: Cairo/PyGTK/PyGI, design patterns for GUI programming&lt;br /&gt;
&lt;br /&gt;
== Parallel optimisation solvers for ASCEND ==&lt;br /&gt;
&lt;br /&gt;
We would like to develop optimisation solvers for ASCEND using particle swarm optimisation (PSO) or a hybrid of PSO with gradient-based Newton solver methods. Such methods are amenable to parallelisation, and should be considerably faster for certain kinds of models with modern hardware. Connecting to an existing open-source solver would be preferred, but only if it makes good sense architecturally. Before starting, we would like to discuss possible implementation approaches. It&#039;s important to note that current ASCEND is not thread-safe, so care may be required depending on the approach that is taken.&lt;br /&gt;
&lt;br /&gt;
* Contact: [[John Pye]], [[Ben Allan]]&lt;br /&gt;
* Languages: C&lt;br /&gt;
* Difficulty: Medium-High&lt;br /&gt;
* Priority: High&lt;br /&gt;
&lt;br /&gt;
== FPROPS ==&lt;br /&gt;
&lt;br /&gt;
Our [[FPROPS]] fluid properties library within ASCEND is used to calculate the properties of pure fluids (enthalpy, pressure, temperature, density, viscosity, conductivity, etc) with high accuracy. We would like to extend its capabilites in various ways: (1) add support for mixtures, (2) add support for more equations of state, especially cubic equations of state such as Redlich-Kwong and others, (3) add support for incompressible liquids, (4) add support for humid air calculations, (4) demonstrate its use in flash, heat exchanger and reactor models in ASCEND. This project requires someone with background in engineering thermodynamics (for example, having studied the [http://www.amazon.com/dp/0471661740 Sandler book] or similar), because the theory from that book is a necessary starting point for the project.&lt;br /&gt;
&lt;br /&gt;
* Contact: [[Mahesh Venkataraman]], [[John Pye]], [[Krishnan Chittur]]&lt;br /&gt;
* Languages: C and maybe a small amount of Python&lt;br /&gt;
* Must know: engineering thermodynamics (eg. the [http://www.amazon.com/dp/0471661740 Sandler book])&lt;br /&gt;
* Difficult: Medium&lt;br /&gt;
* Priority: High&lt;br /&gt;
&lt;br /&gt;
== Gibbs equilibrium reactor model ==&lt;br /&gt;
&lt;br /&gt;
We would like to implement a robust tool for calculating reaction equilibrium using Gibbs free energy minimisation. This needs to be done in a way that is compatible with the ASCEND approach to declaring [[MODEL]]s etc., and should make use of [[FPROPS]] for the calculation of the properties of each component. We have some sample code in MATLAB; a first step might be to convert that code to C and connect it to FPROPS. We will need to simultaneously discuss how to interface to the code to ASCEND so that it can be used in the context of flexible modelling of chemical process flowsheets.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[Mahesh Venkataraman]], [[John Pye]]&lt;br /&gt;
* Level of difficulty: Medium&lt;br /&gt;
* Must know: engineering thermodynamics (eg the [http://www.amazon.com/dp/0471661740 Sandler book])&lt;br /&gt;
* Priority: Medium/High&lt;br /&gt;
* Languages: C&lt;br /&gt;
&lt;br /&gt;
== CAPE-OPEN thermodynamics ==&lt;br /&gt;
&lt;br /&gt;
[http://www.colan.org/ CAPE-OPEN] is a well-documented API for evaluating thermodynamic properties of mixtures, running flash calculations, etc, which exists in the chemical process simulation community. In this project, we&#039;d like to develop a first proof-of-concept integration of CAPE-OPEN into ASCEND. It is suggested that we might use the CAPE-OPEN thermodynamics library provided by [http://dwsim.inforside.com.br/wiki/index.php?title=CAPE-OPEN the DWSIM project], although other possibilities exist. Importantly, we need this approach to work on Linux as well as Windows, and this may complicate matters. However, on the whole, it should be possible to achieve this integration in a relatively straightforward way using our support for external functions (eg see [[writing ASCEND external relations in C]]). Having CAPE-OPEN support with greatly increase ASCEND&#039;s access to range of high-quality thermodynamic property engines, which would be very helpful in improving the usefulness of our code.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]], [[Mahesh Venkataraman]], [[Krishnan Chittur]]&lt;br /&gt;
* Level of difficulty: Medium (/ Low?)&lt;br /&gt;
* Must know: chemical engineering thermodynamics (eg the [http://www.amazon.com/dp/0471661740 Sandler book])&lt;br /&gt;
* Priority: Medium/High&lt;br /&gt;
* Languages: C, possibly others for &#039;gluing&#039; to the CAPE-OPEN DLLs/COM objects&lt;br /&gt;
&lt;br /&gt;
== Dynamic modelling improvements ==&lt;br /&gt;
&lt;br /&gt;
This project would build on the progress with [[dynamic modelling]] by [[User:Ksenija|Ksenija]] in GSOC2012-2013. We would like to improve our new [[EVENT]] syntax and extend its support to a range of problem types not yet supported, such as periodic events, and make further changes to the ASCEND language to make dynamic modelling more &#039;natural&#039;. We would like to work on the efficiency of the [[ODE]]/[[DAE]] engines, to ensure that integrator restarts after boundaries are as efficient as possible.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]]&lt;br /&gt;
* Level of difficulty: High&lt;br /&gt;
* Priority: High&lt;br /&gt;
* Must know: numerical methods&lt;br /&gt;
* Languages: C, plus possibly some use of lex/yacc&lt;br /&gt;
&lt;br /&gt;
== Debugging tools for DAE modelling ==&lt;br /&gt;
&lt;br /&gt;
We would like to implement tools that make it easier to determine degrees-of-freedom problems for initial value problems, and possibly implement index reduction into ASCEND. One possible algorithm is that by Soares and Secchi (see [http://cepac.cheme.cmu.edu/pasi2011/library/secchi/Soares_Secchi_Dycops-2007_p217.pdf Soares_Secchi_Dycops-2007] or (somewhat different) {{doi|10.1016/S1570-7946(07)80063-0}}).&lt;br /&gt;
&lt;br /&gt;
* Contact person [[John Pye]]&lt;br /&gt;
* Level of difficulty: High&lt;br /&gt;
* Priority: Medium&lt;br /&gt;
* Must know: numerical methods, differential equations, graph theory&lt;br /&gt;
* Languages: C&lt;br /&gt;
&lt;br /&gt;
== Improvements to the Conditional Modelling syntax ==&lt;br /&gt;
&lt;br /&gt;
ASCEND provides support for [[Conditional modelling]] in the form of language constructs and a solver called [[CMSlv]]. Unfortunately the syntax available for conditional modelling is unintuitive. It could be improved by a student willing to delve into the dark corners of the ASCEND compiler and willing to learn about the Flex and Bison parser/compiler tools. Further work on this project could include a rigorous test-suite to demonstrate that all aspects of the conditional model parser and corresponding solver are working OK. Additional further might include enhancements to the graphical interface to make it more obvious to the user when parts of the model are switched on and off as a result of changes in IF or WHEN statements, or alternatively completion of the conditional modelling support for the dynamic modelling solver [[IDA]]. This is another item that would benefit from a [[New Compiler]] effort.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]], [[Art Westerberg]]&lt;br /&gt;
* Level of difficulty: medium&lt;br /&gt;
* Priority: High&lt;br /&gt;
* Languages: Flex/Bison, C&lt;br /&gt;
&lt;br /&gt;
= Other projects =&lt;br /&gt;
&lt;br /&gt;
The following list contains a range of projects that we consider either harder to tackle, or lower priority, or which require very particular skills.&lt;br /&gt;
&lt;br /&gt;
== Python bindings rewrite ==&lt;br /&gt;
&lt;br /&gt;
We would like to review and improve the way that ASCEND accesses its low-level C functionality from Python. Currently this is done via C++ using the [http://www.swig.org SWIG] interface generator. Our preference is probably to keep using SWIG, but to eliminate the C++ layer. Alternatively, a different type of interfacing tool like Cython could be used instead. The new wrapping/langugage bindings would need to be tested via a set of test suites, and program examples in Python provided. It would not be necessary to translate the GUI code to use this new wrapper, although that would certainly be desirable.&lt;br /&gt;
&lt;br /&gt;
* Contact: [[John Pye]]&lt;br /&gt;
* Languages: C, Python, C++, SWIG&lt;br /&gt;
* Difficulty: Medium&lt;br /&gt;
* Priority: Medium&lt;br /&gt;
&lt;br /&gt;
== MSYS2 ==&lt;br /&gt;
&lt;br /&gt;
We would like to implement a new build process for ASCEND for Windows, based on the use of  [https://msys2.github.io/ MSYS2]. MSYS2 is a command-line environment similar to Linux. It offers the usual GCC compilers etc, plus a package manager with pre-compiled versions of many of our dependency libraries and tools. This project would require (1) modifying current SCons build files so that they work correctly with MSYS2 (compared to older MSYS), (2) ensuring that all required dependencies are also available in MSYS2 and (3) producing a new installer for ASCEND, by updating our current NSIS-based scripts, that makes use of the MSYS2 binaries built in 1 and 2.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]]&lt;br /&gt;
* Languages: Python, C, NSIS&lt;br /&gt;
* Must know: usability principles&lt;br /&gt;
* Level of difficulty: Low/Medium&lt;br /&gt;
* Priority: High&lt;br /&gt;
&lt;br /&gt;
== GTK3/Python3 ==&lt;br /&gt;
&lt;br /&gt;
We have already done quite a bit of work (eg [[User:Adrian]]) on adapting ASCEND to work with GTK3 (PyGI, PyGTK3). Next we need to update ASCEND so that it works correctly with Python3. This will require some work using SWIG to update our Python wrapper to work with Python3. It will also require some changes to the Python GUI (code in {{srcdir|pygtk}}. Finally, it is very important to check that the build and install processes work correctly with Python3 on both Windows and Linux as a minimum.&lt;br /&gt;
&lt;br /&gt;
* Contact: [[John Pye]]&lt;br /&gt;
* Languages: Python, SWIG, possibly some C/C++.&lt;br /&gt;
* Difficulty: Low/Medium&lt;br /&gt;
* Priority: High&lt;br /&gt;
&lt;br /&gt;
== Automated parameter-setting for dynamic models ==&lt;br /&gt;
&lt;br /&gt;
With the addition of [[SOLVE]], [[SOLVER]] and [[OPTION]] statements to the ASCEND language, we now have a way to specify all the necessary parameters for most of the ASCEND solvers like [[QRSlv]], [[IPOPT]] and others. However, this implementation doesn&#039;t work with our [[ODE]]/[[DAE]] solvers like [[LSODE]] and [[IDA]]. This project would involve extending the ASCEND language in a way that dynamic models could be easily initialised and solved using statements in [[METHOD]] syntax. A careful review of the [[OPTION]] syntax is also required, as it appears that in some cases the current approach fails to pass through parameters if the solver has already been connected to the system. There is no tough mathematics involved in this project; mostly it&#039;s about data structures and information-passing, but efficient software design will be very important.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]]&lt;br /&gt;
* Very helpful: experience on a large software project (or software engineering studies)&lt;br /&gt;
* Level of difficulty: Medium/high&lt;br /&gt;
* Languages: C, Python&lt;br /&gt;
&lt;br /&gt;
== Automated connector routing for the canvas-based modeller ==&lt;br /&gt;
&lt;br /&gt;
When working on big simulation models, line routing can be annoying and tedious, but with a sufficiently clever constraint-based solver, algorithms can be used to automate the task, leaving only minor tweaking required to complete a diagram. Our collaborator on the [[canvas-based_modeller_for_ASCEND|canvas-based modeller]], [[Arjan Molenaar]], [https://github.com/amolenaar/adaptagrams has been working] to integrate Michael Wybrow&#039;s [http://adaptagrams.sourceforge.net/ adaptagrams] library into Gaphas, to add support for automatic line routing. At this stage he has got partial Python bindings for the needed parts of adaptagrams, but not plan yet exists for how that will be incorporated into Gaphas or thence to our canvas-based modeller. This project would require someone with good Python skills to work in Gaphas as well as ASCEND to development this functionality.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]] and Arjan Molenaar would hopefully help out as an informal mentor&lt;br /&gt;
* Level of difficulty: Medium&lt;br /&gt;
* Priority: Medium&lt;br /&gt;
* Languages: C&lt;br /&gt;
&lt;br /&gt;
== Bug Squashing ==&lt;br /&gt;
&lt;br /&gt;
We&#039;ve got a [http://ascendbugs.cheme.cmu.edu/ big long list] of bugs and feature requests (as well as [http://ascendbugs.cheme.cmu.edu/roadmap_page.php a shortlist]) that a student could certainly work on with success. Many of the bugs can be fairly easily fixed and just need a little time. Someone with the right C/C++/Python programming background plus understanding on numerical methods and hopefully some understanding of compiler design and/or GUI design could really make a difference for us.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]]&lt;br /&gt;
* Level of difficulty: variable, depends on the bugs you choose to fix&lt;br /&gt;
* Must know: numerical methods&lt;br /&gt;
* Languages: primarily C, and then possibly Python, C++, Flex/Bison, SWIG, Tcl/Tk, PyGTK,...&lt;br /&gt;
* Priority: Medium/High&lt;br /&gt;
&lt;br /&gt;
== Persistence of modelling results ==&lt;br /&gt;
&lt;br /&gt;
Currently, ASCEND models are loaded and solved afresh each time. But sometimes, it can take a bit of fiddling to achieve solution of a model. In these cases, it would be useful to be able to save the model state and load it again into ASCEND. A coherent proposal for how to do this needs to be prepared, in discussion with the ASCEND team, by a student who would like to work in this area. Because this task involved loading and saving model state, it is proposed that it could also incorporate more general data export functionality, eg to export whole/partial model results to a CSV or tab-delimited file, for use with other tools. How this system would work with &#039;observers&#039; and &#039;integrator&#039; output is an open question. See also [[Saving and restoring model state]]. Especially important that the design of this component would work nicely with the new [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]]&lt;br /&gt;
* Level of difficulty: Low-medium&lt;br /&gt;
* Languages: C, Python, possibly some Tcl.&lt;br /&gt;
* Priority: Medium&lt;br /&gt;
&lt;br /&gt;
== Packaging for Mac ==&lt;br /&gt;
&lt;br /&gt;
We want to get ASCEND working for Mac! We previously did a lot of the work (see [[Porting to Mac]]), but since then Python3 and GTK3 have become commonplace, and we also need to develop an ASCEND bundle/installer/disk-image that feels nice and Mac-ish, but doesn&#039;t cause too much disruption to the overall codebase. One key challenge is to provide suitable Apple Event bindings so that models can be opened using the ASCEND GUI. &lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]], [[Art Westerberg]]&lt;br /&gt;
* Level of difficulty: low-medium&lt;br /&gt;
* Priority: Medium&lt;br /&gt;
* Languages: Python, C, and a fair bit of general Mac OSX knowhow&lt;br /&gt;
&lt;br /&gt;
== New Compiler ==&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve got a strong background or interest in designing parsers/lexers/compilers, we&#039;d be interested to discuss possible ways to write a new compiler for the ASCEND language. The original ASCEND compiler uses Flex/Bison, but perhaps we can make something more efficient and easier to maintain using more modern tools, perhaps such as ANTLR. See also [[New Compiler]]&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[Ben Allan]], [[John Pye]]&lt;br /&gt;
* Level of difficulty: very high&lt;br /&gt;
* Languages: flexible, would need to interface with current instance hierarchy C code&lt;br /&gt;
* Priority: Medium&lt;br /&gt;
&lt;br /&gt;
== Model Export Engine Experiments (MEEE!) ==&lt;br /&gt;
&lt;br /&gt;
A number of the other projects on this page are concerned with converting a model into some format appropriate for use with another tool.  There are actually two kinds of objects both ambiguously known as ASCEND models:&lt;br /&gt;
&lt;br /&gt;
* an ascend TypeDescription: a list of statements that must be interpreted somehow to derive a data tree (Instance) in memory.&lt;br /&gt;
* an Instance data tree (which, in principle, may contain references to unexecuted statements from the TypeDescription or may be &#039;completed&#039;).&lt;br /&gt;
&lt;br /&gt;
Potential approaches:&lt;br /&gt;
&lt;br /&gt;
* Conversion of C TypeDescriptions to equivalent classes in some other language is the most general form of model reuse, but requires careful implementation of the conversion operation. A general solution would be to create, or expose in a convenient form, visitor functionality over a self-consistent list of related TypeDescriptions for type-translation plugins to convert to other languages. In the compiler science world, the ascend TD is most related to an AST.&lt;br /&gt;
* Conversion of ascend model source via an independent parser to another language. This approach &#039;reinvents&#039; the ASCEND AST and grammar, but may then be much more translator friendly-- e.g. Java or other tools could be used for implementation with no direct reference to the existing C code base.&lt;br /&gt;
* Define a visitor API for conversion of instance data structures to classes in other languages. These classes may or may not look anything like the original object-oriented models. Note that conversions of this sort to flat-file data storage formats (for reloading in ascend later) and to object-free (flat) modeling languages are in the ascend code base already.&lt;br /&gt;
&lt;br /&gt;
See also: Persistence, Openoffice below.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[Ben Allan]], [[John Pye]]&lt;br /&gt;
* Level of difficulty: medium&lt;br /&gt;
* Language: C / ANTLR / others&lt;br /&gt;
* Priority: Medium/Low&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Internationalisation ==&lt;br /&gt;
&lt;br /&gt;
ASCEND has some bugs when used in locales that use the comma &#039;,&#039; as the decimal point separator. Furthermore, its user interface is in english only, with the exception of some standard menus that GTK+ provides translations for. This project would work towards internationalising ASCEND, starting with solving the decimal point problem, then translating the Python GUI, then moving on into the C library part of ASCEND. It would not be intended that the modelling language itself would be translated, though, nor would the decimal point separator in model files change from the default &amp;quot;.&amp;quot; -- the same model files need to work for everyone.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]]&lt;br /&gt;
* Level of difficulty: low&lt;br /&gt;
* Languages: Python, C&lt;br /&gt;
* Priority: Low&lt;br /&gt;
&lt;br /&gt;
== Structural Mechanics Solver in Graphical flowsheet editor ==&lt;br /&gt;
&lt;br /&gt;
As mentioned above, ASCEND has a [[canvas-based_modeller_for_ASCEND|Canvas-based modeller]] which is currently in development. We would like to explore and develop more functionality for this canvas-based modeller. One possible direction is to build a structural mechanics solver to solve mechanics problems. Ideally users can draw the structure in the modeller, with various loading condition and constrains. The solver should solve the structure according to equilibrium equations and return the required answers. We can start with some simple structure from mechanics textbooks, and extend to complicated situation like buckling and advanced beam theory, etc. Of course, it would be good to present documents/tutorials to users for solving example problems. Ideally, for this project you should have some elementary (undergraduate) mechanics knowledge.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[User:Mike|Tengda (Mike) Han]], [[John Pye]]&lt;br /&gt;
* Level of difficulty: Medium/Low&lt;br /&gt;
* Priority: Low&lt;br /&gt;
* Languages: Python&lt;br /&gt;
* Also useful: Cairo/PyGTK/PyGI, design patterns for GUI programming&lt;br /&gt;
&lt;br /&gt;
== Your Own Ideas ==&lt;br /&gt;
&lt;br /&gt;
There are many other areas of possible work on ASCEND, including those from our long list of current and future [[Development Activities]]. Feel free to discuss other possible ideas with us!&lt;br /&gt;
&lt;br /&gt;
* Contact person: write to the &#039;users&#039; mailing list (see [[Support]]).&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=GSOC2018&amp;diff=5956</id>
		<title>GSOC2018</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=GSOC2018&amp;diff=5956"/>
		<updated>2018-02-02T14:28:47Z</updated>

		<summary type="html">&lt;p&gt;Mike: add &amp;#039;student projects&amp;#039; hyper-link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ASCEND is applying to participate in [https://summerofcode.withgoogle.com/ GSOC] in 2018. Please read below if you are interested in participating!&lt;br /&gt;
&lt;br /&gt;
The following application guidelines are retained for future reference.&lt;br /&gt;
&lt;br /&gt;
== General information ==&lt;br /&gt;
&lt;br /&gt;
GSOC is a programme that lets students be paid for work that they do to contribute to an open-source software project. It is a competitive programme for which students must make themselves known to the software project directly, and then apply to Google for selection. Students who get involved well in advance of the deadlines usually have a much better chance of being selected. Some links for people wanting to learn about GSOC for possible future participation:&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Google_Summer_of_Code general information about the programme (wikipedia)]&lt;br /&gt;
* [https://developers.google.com/open-source/gsoc/faq GSOC FAQs]&lt;br /&gt;
* [https://developers.google.com/open-source/gsoc/timeline timeline]&lt;br /&gt;
* &#039;&#039;&#039;[[Student projects]]&#039;&#039;&#039;: our list of project ideas with ASCEND (or propose your own)&lt;br /&gt;
* [[:Category:GSOC]]: read about ASCEND projects/students with GSOC in previous years&lt;br /&gt;
* &#039;&#039;&#039;our application template&#039;&#039;&#039; is at the bottom of this page.&lt;br /&gt;
&lt;br /&gt;
We&#039;d like to encourage anyone interested in our project to get in contact with us, and make a proposal! In general, the best way to learn about ASCEND is first to actually try to use it: so, &#039;&#039;please, [[SvnInfo|get the code]], [[Building ASCEND|build it]], try writing some models&#039;&#039;, ponder our [[student projects]] list, and make your proposal. If you would like to discuss any of this, you can [[Support|get in contact with us]].&lt;br /&gt;
&lt;br /&gt;
Please note that to actually formally apply to participate in the GSOC, you must do so via the GSOC website, you don&#039;t apply to us.&lt;br /&gt;
&lt;br /&gt;
== Ways to get involved ==&lt;br /&gt;
&lt;br /&gt;
* read the [[ASCEND overview]] and understand what ASCEND actually does.&lt;br /&gt;
* download our &#039;trunk&#039; code [[SvnInfo|using subversion]] then [[Building ASCEND|build it]], and then [https://lists.sourceforge.net/lists/listinfo/ascend-sim-users let us know] about any issues you come across. Try to help us fix those issues. If you want an overview of the code, see our [[Developer&#039;s Manual]].&lt;br /&gt;
* &#039;&#039;use&#039;&#039; ASCEND! write some models to solve some problems that you have come across in your coursework or elsewhere. Preferably they should be non-trival: simultaneous nonlinear equations, optimisation problems, dynamic problems, etc. Send us your completed models, and work to make them general and reusable. Make use of existing reusable models from our [[model library]] where possible. If we see someone who&#039;s actually worked out what ASCEND is and how to use it, we&#039;re much more likely to sit up and pay attention!&lt;br /&gt;
* read our [[:Category:Documentation|documentation]] and help us to improve it: this is a wiki, so anyone can edit it. (Note: because of endless spam, you have to first register and we have to manually review your submission, but if you look like you&#039;re a real human-being person thing, then we&#039;re happy to have you.)&lt;br /&gt;
* take a look at our [http://bugs.ascend4.org|bug tracker] and find a bug that you can fix, or a feature request that you can implement&lt;br /&gt;
* get onto our [https://lists.sourceforge.net/lists/listinfo/ascend-sim-users mailing list] and open a discussion on features you would like to see in ASCEND&lt;br /&gt;
* talk to your professor about ASCEND, and whether there might be ways to incorporate project work with ASCEND into your degree.&lt;br /&gt;
* you might like to try tackling some little example problems that we previously used as tests for our GSOC applicants: [[OpenMP Exercise]], [[ANTLR exercise]]. We&#039;ll update here if we manage to write any new example problems.&lt;br /&gt;
* take a look at our  [[Student projects]] page for some existing GSOC projects. Surely, you are very welcomed to propose your own project!&lt;br /&gt;
&lt;br /&gt;
== Application template ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;The following is the &#039;application template&#039; that you can use when submitting your formal proposal to ASCEND via the GSOC website. Please check back here before the application deadline to ensure you have included all of the requested information. Please take care with formatting, and try to use a concise style.&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;About you&#039;&#039;&#039;&lt;br /&gt;
* Name: full name (preferred &#039;friendly&#039; name in brackets)&lt;br /&gt;
* Email:&lt;br /&gt;
* Location: country, city during coding period&lt;br /&gt;
* University: current university and course, year started, length, expected completion date.&lt;br /&gt;
** Please include an email address and website reference for a &#039;&#039;&#039;professor at your university&#039;&#039;&#039; whom we can contact to confirm your enrolment status if required.&lt;br /&gt;
* Skype ID: (if you have one) &lt;br /&gt;
* Are you subscribed to our [[Support|ascend-sim-users]] mailing list? YES/NO (we prefer YES!)&lt;br /&gt;
* Phone number: (optional)&lt;br /&gt;
* URL link to your CV: (optional)&lt;br /&gt;
* URL link to your personal blog/homepage: (optional)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Project proposal&#039;&#039;&#039;&lt;br /&gt;
* Project title as provided on the [[Student projects]] page (or something of your own)&lt;br /&gt;
* Then, a description of the project &#039;&#039;in your own words&#039;&#039;. What do you think you will be able to achieve, and what will your approach be? Why did you choose this idea? &lt;br /&gt;
* What progress have you made already? This might be a more detailed plan, getting up and running, some initial coding, familiarising yourself with related tools, or some general bug-fixing or bug-reporting for ASCEND more broadly.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Milestones&#039;&#039;&#039;&lt;br /&gt;
* What are the goals of your project? Are they [https://en.wikipedia.org/wiki/SMART_criteria &#039;&#039;specific&#039;&#039;, &#039;&#039;measurable&#039;&#039;, &#039;&#039;achievable&#039;&#039;, &#039;&#039;realistic&#039;&#039; and &#039;&#039;time-specific&#039;&#039;]?&lt;br /&gt;
* Give a schedule, showing the order in which you will achieve the specified goals. If possible, show that you have discussed the plan with your proposed mentor.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Other commitments&#039;&#039;&#039;&lt;br /&gt;
* We expect our GSOC students to be online (we prefer Skype) and immediately contactable for at least 35 hours a week, working directly on their GSOC project. If you expect this to be difficult, or if you expect to work at odd hours, we want to know in advance.&lt;br /&gt;
* Note that we require an &#039;&#039;absolute minimum&#039;&#039; of a weekly email update from all our students.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Programming language experience/expertise&#039;&#039;&#039;&lt;br /&gt;
* Programming languages you have learnt, and how many lines of code, approximately, you have written in each.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Relevant experience&#039;&#039;&#039;&lt;br /&gt;
* List jobs, projects, courses etc that show that you have the required knowledge and experience for this project. Explain briefly how they relate to the project you are seeking.&lt;br /&gt;
* Only list things that are relevant, we don&#039;t want your whole CV.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Experience with ASCEND&#039;&#039;&#039;&lt;br /&gt;
* Is this your first contact with the ASCEND project?&lt;br /&gt;
* List or link to any code, patches, documentation or bug reports contributed to ASCEND or other projects.&lt;br /&gt;
* Please give us as much evidence as you can to show that you have got our code running on your machine -- compiled it from the source code yourself -- and that you&#039;ve figured out how to use it independently. The more independent use that you can show, the better. If you&#039;ve identified a bug, report it and link to your bug report. If you&#039;ve written a new model, or some new code to add, tell us about it. The more you&#039;ve done, the easier it is for us to trust in your ability to contribute.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Why ASCEND?&#039;&#039;&#039;&lt;br /&gt;
* If you can, say something insightful about the ASCEND project &#039;&#039;specifically&#039;&#039; -- something about our project that interests you more than others available in GSOC.&lt;br /&gt;
&lt;br /&gt;
[[Category:GSOC]]&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=ASCEND_Users_and_Friends&amp;diff=5955</id>
		<title>ASCEND Users and Friends</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=ASCEND_Users_and_Friends&amp;diff=5955"/>
		<updated>2018-01-31T11:06:20Z</updated>

		<summary type="html">&lt;p&gt;Mike: /* ASCEND Developers */ typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you&#039;re using ASCEND to solve problems, please let us know!&lt;br /&gt;
&lt;br /&gt;
==ASCEND Users==&lt;br /&gt;
&lt;br /&gt;
* [http://solar-thermal.anu.edu.au/ Solar Thermal Group at &#039;&#039;&#039;Australian National University&#039;&#039;&#039;] uses ASCEND for a wide range of simulation problems and actively participates in ASCEND development.&lt;br /&gt;
* [http://www.che.iitb.ac.in/online/ Chemical Engineering at &#039;&#039;&#039;Indian Institute of Technology Bombay&#039;&#039;&#039;] and [http://fossee.in FOSSEE], with leadership from Prof Kannan Moudgalya, are working to introduce ASCEND into their chemical engineering curriculum.&lt;br /&gt;
* [http://www.cnim.com/en/cnim-and-solar-energy.aspx &#039;&#039;&#039;CNIM&#039;&#039;&#039;] (France) used ASCEND to model two-phase flow for their new solar collector&lt;br /&gt;
* [http://lncmi.cnrs.fr/ Laboratoire National des Champs Magnétiques Intenses, &#039;&#039;&#039;CNRS France&#039;&#039;&#039;]&lt;br /&gt;
* [http://www.uantof.cl/D2P/HydroSimLibrary.htm The D2P Research Group at &#039;&#039;&#039;Universidad de Antifagasta&#039;&#039;&#039;] use ASCEND for solving hydrometallurgy problems. See [http://www.uantof.cl/D2P/reporte%20tecnico.pdf technical report (in spanish)] or [http://www.uantof.cl/d2p/HydroSim.pdf summary (in english)].&lt;br /&gt;
* [http://www.che.uah.edu/courseware/toolbox/ascend/ Chemical Engineering at &#039;&#039;&#039;University of Alabama Huntsville&#039;&#039;&#039;] problems solved using ASCEND for chemical engineering coursework&lt;br /&gt;
* [http://pedro.valelima.com/phd/ Pedro Vale Lima] contributed some documentation on doing [[Thermodynamics with ASCEND]].&lt;br /&gt;
* [http://www.bystronic.com/ Bystronic] are working on using ASCEND as a computation engine for embedded controllers.&lt;br /&gt;
&lt;br /&gt;
== ASCEND Developers ==&lt;br /&gt;
&lt;br /&gt;
See also [[ASCEND history]] and [[:Category:ASCEND Contributors]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Name&lt;br /&gt;
!  Connection&lt;br /&gt;
!  Mugshot&lt;br /&gt;
|-&lt;br /&gt;
|  Ben Allan&lt;br /&gt;
|  A principal member of the technical staff, Sandia Laboratories/CA. Research interests include large-scale OO modeling support tools (solution methods &amp;amp;amp; compilers), scalable design of human-computer interaction, and optimizing finite-element data representations.&lt;br /&gt;
|  [[Image:BenAllan.jpg]]&lt;br /&gt;
|-&lt;br /&gt;
|  [[User:Kchittur|Krishnan Chittur]]&lt;br /&gt;
|  Professor, Department of Chemical and Materials Engineering, University of Alabama Huntsville, Alabama. Research interests include biomaterials and bioinformatics. An enthusiastic ASCEND user who would like to see it being widely used for computations, simple and complex.&lt;br /&gt;
|  [[Image:KrishnanChittur.jpg]]&lt;br /&gt;
|-&lt;br /&gt;
|  Luis Cisternas&lt;br /&gt;
|  Professor, Departamento de Ingeniería Química, Universidad de Antofagasta, Casilla 170, Antofagasta, Chile. Research interests include Chemical and metallurgical process &amp;amp;amp; product design, Process systems modelling and optimization, Process synthesis. Developer of the ASCEND library [[HydroSim]] for hydrometallurgy applications.&lt;br /&gt;
|  [[Image:LuisCisternas.jpg]]&lt;br /&gt;
|-&lt;br /&gt;
|  [http://engn.anu.edu.au/OurPeople/index.php?StaffID=3627027 John Pye]&lt;br /&gt;
|  Lecturer at the Dept of Engineering, Australian National University, Canberra, Australia. Research interest: Solar thermal energy systems, thermal system modelling, thermochemical energy storage by ammonia dissociation, structural modelling and optimisation of parabolic reflectors.&lt;br /&gt;
|-&lt;br /&gt;
|  [[Vicente Rico-Ramirez]]&lt;br /&gt;
|  Professor, Department of Chemical Engineering, Technical Institute of Celaya, Mexico.  Research interests in optimization, modeling, synthesis.&lt;br /&gt;
|  [[Image:VicenteRicoRamirez.jpg]]&lt;br /&gt;
|-&lt;br /&gt;
|  Jon Shao&lt;br /&gt;
|  Assoc Prof, Institute of Systems Engineering, Zhejiang Univ, Hangzhou, China.  Research interests in advanced optimization/solution strategies for complex systems, RTO, automatic differentiation, support environments for solving complex problems, and very long distance supervisory control and data acquisition.&lt;br /&gt;
|  [[Image:JonShao.jpg]]&lt;br /&gt;
|-&lt;br /&gt;
|  Jerry St Clair&lt;br /&gt;
|  Our token organic chemist (doesn&#039;t every team need one). An ASCEND user for non-engineering applications.  His research interests include reaction mechanisms and kinetics, process optimization and control, and doing with computers what could more easily be done without them.&lt;br /&gt;
|  [[Image:JerryStClair.jpg]]&lt;br /&gt;
|-&lt;br /&gt;
|  Mark Thomas&lt;br /&gt;
|  Staff in the Survivable Network Technology Group at the Software Engineering Institute of Carnegie Mellon University.&lt;br /&gt;
|  [[Image:MarkThomas.jpg]]&lt;br /&gt;
|-&lt;br /&gt;
|  [http://www.cheme.cmu.edu/people/faculty/aw0a.htm Art Westerberg]&lt;br /&gt;
|  Retired as of June, 2004.  Formerly professor in the Dept. of Chemical Engineering, Carnegie Mellon University.  Research interests: ASCEND development.&lt;br /&gt;
|  [[Image:ArtWesterberg.jpg]]&lt;br /&gt;
|-&lt;br /&gt;
|  Duncan Coffey&lt;br /&gt;
|  Student at CMU. Contributed {{src|models/reactor.a4l}} and {{src|models/kinetics.a4l}} in 1998.&lt;br /&gt;
|&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=OcamlParser&amp;diff=5954</id>
		<title>OcamlParser</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=OcamlParser&amp;diff=5954"/>
		<updated>2018-01-31T11:03:27Z</updated>

		<summary type="html">&lt;p&gt;Mike: add to contributor category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For [[GSOC2016]], [[User:Hugo|Hugo]] implemented an experimental parser for the ASCEND modeling language that allows a faster rate of experimentation for new syntactic features compared to the existing ASCEND parser.&lt;br /&gt;
&lt;br /&gt;
The new parser was designed to make it easy to parse ASCEND syntax into a syntax tree, perform transformation passes over this syntax tree and then serialize the result back into a textual format, which can be fed into the existing ASCEND compiler. This lets us implement new language features in terms of existing ones and experiment without needing to modify the core ASCEND compiler.&lt;br /&gt;
&lt;br /&gt;
One advantage of having this new parser and syntax-tree tooling is that working with syntax trees is hard to do in the existing parsing architecture because ASCEND&#039;s C compiler parses and interprets the code at the same time, and doesn&#039;t give us a chance to apply syntax transformers before the code is interpreted. Another advantage of the new parser is that it is written in [https://ocaml.org/ Ocaml], which as a functional programming language is specially suited for operating on tree-like data structures.&lt;br /&gt;
&lt;br /&gt;
== Compiling and Using the New Parser == &lt;br /&gt;
&lt;br /&gt;
The code for the new experimental parser as well as the infrastructure for writing syntax transformers can currently be found in the {{srcbranchdir|hugo|}} branch of the ASCEND Subversion repository. It has not been merged into the trunk yet.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
svn co http://svn.ascend4.org/branches/hugo ascend-hugo&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run the new parser and to write syntax transformers, you will need to install the Ocaml compiler, and some Ocaml libraries. The recommended way to do this is to use your distro&#039;s package manager to install the Ocaml compiler and the [https://opam.ocaml.org/ Opam] package manager and then use Opam to download and install the required Ocaml libraries.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=sh&amp;gt;&lt;br /&gt;
sudo apt-get install ocaml opam&lt;br /&gt;
&lt;br /&gt;
opam init&lt;br /&gt;
opam install menhir containers sequence&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, go to the &amp;quot;ocaml&amp;quot; folder in the ASCEND source directory and build things with the makefile. Now you can start playing with the new parser.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=sh&amp;gt;&lt;br /&gt;
cd ascend-hugo/ocaml&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The makefile, {{srcbranch|hugo|ocaml/makefile}}, shows how to compile the code and the tests filder has some examples of how to run it. For more details see {{srcbranch|hugo|ocaml/README.txt}}.&lt;br /&gt;
&lt;br /&gt;
== Writing Syntax Transformers ==&lt;br /&gt;
&lt;br /&gt;
The goal of this new Ocaml parser is to support syntax experiments that work by mapping ASCEND syntax trees (possibly with some extensions) into a vanilla ASCEND syntax tree that can be fed into the existing C compiler. However, writing these syntax tree transformers by hand can be a very laborious process because you need to write a lot of code just to traverse the syntax tree and get to the interesting leaves that we might want to modify. (Have a look at {{srcbranch|hugo|ocaml/tokenize_tree.ml}} to see how traversing a tree by hand looks like).&lt;br /&gt;
&lt;br /&gt;
One of the ways to avoid boilerplate traversal code is to use the &amp;quot;Visitor Pattern&amp;quot; and write traversals by extending a default traversal that doesn&#039;t do anything. To support this pattern, there is an interface for syntax tree iterators in {{srcbranch|hugo|ocaml/ast_iterator.ml}} as well as a default_iterator that doesn&#039;t do anything but that can be easily extended into an iterator that does something interesting in relevant nodes and just walks through everything else. There is also a similar system for transformers (functions that convert one AST into another) in {{srcbranch|hugo|ocaml/ast_mapper.ml}}.&lt;br /&gt;
&lt;br /&gt;
A good example of how to use the tree iteration and transformation modules can be found in  {{srcbranch|hugo|ocaml/infer_derivatives.ml}}. This syntax transformer receives makes &amp;lt;code&amp;gt;DERIVATIVE OF&amp;lt;/code&amp;gt; declarations optional by inferring them from the uses of the &amp;lt;code&amp;gt;der()&amp;lt;/code&amp;gt; operator throughout the program.&lt;br /&gt;
&lt;br /&gt;
[[Category:GSOC2016]] [[Category:Experimental]][[Category:ASCEND Contributors]]&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Vishnu&amp;diff=5953</id>
		<title>User:Vishnu</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Vishnu&amp;diff=5953"/>
		<updated>2018-01-31T11:03:03Z</updated>

		<summary type="html">&lt;p&gt;Mike: add to contributor category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My GSoC 2016 project will be on the topic &#039;&#039;&#039;Adding incompressible fluids EOS to FPROPS&#039;&#039;&#039;. The project [https://summerofcode.withgoogle.com/projects/#6628262910361600 details] and [https://drive.google.com/file/d/0B_NSyeBxo3MKQk5oeENjYW1yY00/view?usp=sharing proposal] are on the official GSOC website. My mentors will be [[User:Jpye|John Pye]] and [[User:Mahesh|Mahesh Venkataraman]].&lt;br /&gt;
&lt;br /&gt;
My code is at {{srcbranchdir|vishnu|}}.&lt;br /&gt;
&lt;br /&gt;
= Approach =&lt;br /&gt;
&lt;br /&gt;
Here are some examples of current incompressible fluid support in ASCEND:&lt;br /&gt;
* {{src|models/johnpye/liquidsodium.a4c}}&lt;br /&gt;
* {{src|models/johnpye/moltensalt.a4c}}&lt;br /&gt;
&lt;br /&gt;
The project is divided into two parts:&lt;br /&gt;
# Develop a stand alone code for computing popular thermodynamic properties for incompressible pure fluids as well as mixtures.&lt;br /&gt;
#* This includes development of new evaluation functions for incompressible fluids based on polynomial, exponential and exponential-polynomial mathematical models with fitting coefficients extracted from various published journal articles. The development of the stand alone code will finally consist of extensive verification and validation with available data in [http://www.coolprop.org/fluid_properties/Incompressibles.html CoolProp]. The deadline to complete this work will be June 27, 2016 (GSoC &#039;16 mid-term).&lt;br /&gt;
# Enhance the FRPOPS module with the features of the developed stand alone code&lt;br /&gt;
#* This second part (post mid-term) will consist of developing the incompressible fluid data structures from the existing structures in FPROPS. The property evaluation functions developed in the first part will be then linked with FPROPS, hence completely adding the incompressible EOS to FPROPS.&lt;br /&gt;
&lt;br /&gt;
= Weekly updates =&lt;br /&gt;
&lt;br /&gt;
== Before 23 May 2016 (community bonding period and before) ==&lt;br /&gt;
Updates:&lt;br /&gt;
# Active participation with ascend-sim-users [https://sourceforge.net/p/ascend-sim/mailman/message/34912089/ link]&lt;br /&gt;
# Executed several ready made ASCEND models (for nitrogen and oxygen) provided by Dr. John Pye (that invoke FPROPS)&lt;br /&gt;
# Understood the implementation of TTSE (done by Dr. Sidharth Somanathan, GSoC &#039;15 student) [http://ascend4.org/User:Sidharth link]&lt;br /&gt;
# Reported minor bug related to the test for &#039;Nitrogen&#039; [http://bazaar.launchpad.net/~jdpipe/ascend/trunk/revision/2814 link]&lt;br /&gt;
&lt;br /&gt;
Work under progress:&lt;br /&gt;
# Understand call graph and data flow of ASCEND-FPROPS models&lt;br /&gt;
&lt;br /&gt;
== 30 May 2016 ==&lt;br /&gt;
Updates:&lt;br /&gt;
# Identified existing incompressible models written for a pure fluid (liquidsodium) and a molten mixture (KNO3:NaNO3)&lt;br /&gt;
# Literature review&lt;br /&gt;
#* Found repositories (in JSON format from CoolProp) for extracting coefficient matrices (as discussed in the proposal) of incompressible fluid models (above 100 pure and mixture fluids)&lt;br /&gt;
#* Different evaluation functions required for different types of fit coefficients are: polynomial type, exponential type and exponential-polynomial type&lt;br /&gt;
&lt;br /&gt;
Work under progress:&lt;br /&gt;
# Understand the implementation of incompressible fluid models in CoolProp&lt;br /&gt;
# Start with a standalone code for incompressible fluids&lt;br /&gt;
#* Extract the coefficient matrix by implementing a JSON-to-C file parser&lt;br /&gt;
#* Implement the evaluation functions&lt;br /&gt;
&lt;br /&gt;
== 06 June 2016 ==&lt;br /&gt;
Updates:&lt;br /&gt;
# Identified relevant &#039;C&#039; structures required for incompressible fluids &lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
typedef struct {&lt;br /&gt;
	char* type;&lt;br /&gt;
	double** coeff;&lt;br /&gt;
	int numc_r, numc_c;	// number of rows and columns in coefficient matrix respectively&lt;br /&gt;
} coefficients;&lt;br /&gt;
&lt;br /&gt;
typedef struct {&lt;br /&gt;
	coefficients T_freeze, conductivity, density, specific_heat, viscosity, saturation_pressure;&lt;br /&gt;
	char* x_id;&lt;br /&gt;
	char* description;&lt;br /&gt;
	double T_base, T_max, T_min, T_minPsat, x_base, x_max, x_min; &lt;br /&gt;
} fprops_incompressible;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;ol start=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; JSON-to-C file parser added to the standalone code and subsequently loaded the incompressible fluid data structures &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Work under progress:&lt;br /&gt;
# Adding property evaluation functions to the standalone code&lt;br /&gt;
#* for &#039;density&#039;, &#039;conductivity&#039;, &#039;heat capacity&#039; and &#039;viscosity&#039;&lt;br /&gt;
#* as function of &#039;temperature&#039; (as discussed in the proposal)&lt;br /&gt;
&lt;br /&gt;
== 13 June 2016 ==&lt;br /&gt;
Updates:&lt;br /&gt;
# Still working on incompressible standalone code (please review the committed work)&lt;br /&gt;
# Added property evaluation functions for density, conductivity, heat capacity and viscosity&lt;br /&gt;
# Added functions to compute properties from different types of fit coefficients: polynomial, exponential, exponential-polynomial&lt;br /&gt;
# Analyzed preliminary results for &amp;quot;Zitrec S55, Potassium formate/Sodium propionate&amp;quot;&lt;br /&gt;
#* Programmed a macro {{srcbranch|vishnu|models/johnpye/fprops/vishnu/scratch/generate.mcr}} and a script file {{srcbranch|vishnu|models/johnpye/fprops/vishnu/scratch/unite}} to create plots (which works with the post-processing tool &#039;Tecplot&#039;)&lt;br /&gt;
#* Results in [http://code.ascend4.org/ascend/branches/vishnu/models/johnpye/fprops/vishnu/scratch/results.pdf?view=log link], Original data in [http://code.ascend4.org/ascend/branches/vishnu/models/johnpye/fprops/vishnu/scratch/Original.pdf?view=log link]&lt;br /&gt;
#* Large/significant deviations/inconsistencies observed&lt;br /&gt;
&lt;br /&gt;
Work under progress:&lt;br /&gt;
# Comparing with respective computations of CoolProp to detect the root-cause behind mismatching results&lt;br /&gt;
&lt;br /&gt;
Future discussion:&lt;br /&gt;
# What is the purpose of &amp;quot;NRMS&amp;quot; (normalized root-mean-square provided in the &#039;JSON&#039; files of CoolProp)? Do I have to include that anywhere in the calculations or is it just additional info?&lt;br /&gt;
#: NRMS is just a measure of correlation/agreement between results. When the value is low, it means there is good agreement. Note the ambiguity in the definition around [https://en.wikipedia.org/wiki/Root-mean-square_deviation#Normalized_root-mean-square_deviation &#039;nomalized&#039;]&lt;br /&gt;
&lt;br /&gt;
== 20 June 2016 ==&lt;br /&gt;
Updates:&lt;br /&gt;
# Dived deep into CoolProp evaluation functions and debugged the existing code for &#039;pure&#039; fluids.&lt;br /&gt;
# Ran test cases for &lt;br /&gt;
#* Zitrec S55, Potassium Formate/Sodium Propionate (to test polynomial and exp-polynomial functions) and &lt;br /&gt;
#* Water (exponential viscosity model)&lt;br /&gt;
# Exponential type model for viscosity - bugs:  &lt;br /&gt;
#* The model was not based on a centered-fit approach. &lt;br /&gt;
#* There is no need to subtract the base property (Temperature in our case) before evaluating the model.&lt;br /&gt;
#* Also, there is a change in sign for one of the viscosity coefficients entered in the original JSON files.&lt;br /&gt;
# Demonstrated exact results to that generated by CoolProp (compare Original_*.pdf to Results_*.pdf in [http://code.ascend4.org/ascend/branches/vishnu/models/johnpye/fprops/vishnu/scratch/ repository])&lt;br /&gt;
&lt;br /&gt;
Conclusion: Pure fluids incompressible EOS ready to be merged with FPROPS&lt;br /&gt;
&lt;br /&gt;
Work under progress till July 27 (GSoC mid-term):&lt;br /&gt;
# Get the EOS for incompressible mixtures working: Demonstrate match for LiBr&lt;br /&gt;
# Add integration functions to evaluate &#039;internal energy&#039;,&#039;enthalpy&#039; and &#039;entropy&#039; (as discussed in proposal)&lt;br /&gt;
&lt;br /&gt;
Further Discussions:&lt;br /&gt;
# Please note that models for incompressible mixtures are further complicated as we now have 2D coefficient matrices. Are there simplified models?&lt;br /&gt;
&lt;br /&gt;
== 27 June 2016 (GSoC &#039;16 mid-term) ==&lt;br /&gt;
Here is the update: &lt;br /&gt;
# Developed a working stand alone code for evaluating incompressible EOS (pure fluids and mixtures)&lt;br /&gt;
#* Consists of JSON-to-C parser (for current requirements)&lt;br /&gt;
#* Evaluates different types of incompressible EOS: polynomial, exponential-polynomial and exponential for pure and mixed fluids&lt;br /&gt;
#* Evaluation functions for different major thermodynamic properties: Density, conductivity, specific heat, viscosity, saturation pressure&lt;br /&gt;
# Performed test cases for &lt;br /&gt;
#* Zitrec S55, Potassium formate/Sodium propionate (to test polynomial and exp-polynomial functions) &lt;br /&gt;
#* Water (exponential viscosity model) and&lt;br /&gt;
#* LiBr (mixture)&lt;br /&gt;
#* Demonstrated exact results to those generated by CoolProp (compare Original_*.pdf to Results_*.pdf in the [http://code.ascend4.org/ascend/branches/vishnu/models/johnpye/fprops/vishnu/scratch/ repository]) [* = ZS55, Water, LiBr]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Verification and validation of incompressible EOS models for pure fluid (Water) and mixture (Lithium Bromide)&lt;br /&gt;
|-&lt;br /&gt;
! Original from CoolProp&lt;br /&gt;
! Test results&lt;br /&gt;
! Test results&lt;br /&gt;
! Test results&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:Original_Water.png|thumb|350px|&#039;Density&#039; (polynomial fit), &#039;Heat Capacity&#039; (polynomial fit), &#039;Thermal Conductivity&#039; (polynomial fit), &#039;Dynamic Viscosity&#039; (exponential fit) and &#039;Saturation Pressure&#039; (exponential fit) profiles of &#039;&#039;&#039;&#039;&#039;Water&#039;&#039;&#039;&#039;&#039; (pure fluid)]]&lt;br /&gt;
| [[Image:Results_Water-d.png|thumb|350px|Polynomial fit of &#039;Density&#039; profile for &#039;&#039;&#039;&#039;&#039;Water&#039;&#039;&#039;&#039;&#039; (pure fluid) mixture generated by the standalone code]]&lt;br /&gt;
| [[Image:Results_Water-tc.png|thumb|350px|Polynomial fit of &#039;Thermal Conductivity&#039; profile for &#039;&#039;&#039;&#039;&#039;Water&#039;&#039;&#039;&#039;&#039; (pure fluid) mixture generated by the standalone code]]&lt;br /&gt;
| [[Image:Results_Water-v.png|thumb|350px|Exponential fit of &#039;Dynamic Viscosity&#039; profile for &#039;&#039;&#039;&#039;&#039;Water&#039;&#039;&#039;&#039;&#039; (pure fluid) mixture generated by the standalone code]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:original_LiBr.png|thumb|350px|&#039;Density&#039; (polynomial fit), &#039;Heat Capacity&#039; (polynomial fit) and &#039;Saturation Pressure&#039; (exponential-polynomial fit) profiles of &#039;&#039;&#039;&#039;&#039;LiBr&#039;&#039;&#039;&#039;&#039; mixture at &#039;&#039;&#039;&#039;&#039;x = 0.39&#039;&#039;&#039;&#039;&#039;]]&lt;br /&gt;
| [[Image:results_LiBr-d.png|thumb|350px|Polynomial fit of &#039;Density&#039; profile for &#039;&#039;&#039;&#039;&#039;LiBr&#039;&#039;&#039;&#039;&#039; mixture generated by the standalone code at &#039;&#039;&#039;&#039;&#039;x = 0.39&#039;&#039;&#039;&#039;&#039;]]&lt;br /&gt;
| [[Image:results_LiBr-hc.png|thumb|350px|Polynomial fit of &#039;Heat Capacity&#039; profile for &#039;&#039;&#039;&#039;&#039;LiBr&#039;&#039;&#039;&#039;&#039; mixture generated by the standalone code at &#039;&#039;&#039;&#039;&#039;x = 0.39&#039;&#039;&#039;&#039;&#039;]]&lt;br /&gt;
| [[Image:results_LiBr-sp.png|thumb|350px|Exponential-polynomial fit of &#039;Saturation Pressure&#039; profile for &#039;&#039;&#039;&#039;&#039;LiBr&#039;&#039;&#039;&#039;&#039; mixture generated by the standalone code at &#039;&#039;&#039;&#039;&#039;x = 0.39&#039;&#039;&#039;&#039;&#039;]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Conclusion: Pure and mixed fluids incompressible EOS ready to be linked with FPROPS&lt;br /&gt;
&lt;br /&gt;
Work under progress:&lt;br /&gt;
# Add integration functions to evaluate internal energy/enthalpy/entropy&lt;br /&gt;
# Start final integration of the current code with FPROPS &lt;br /&gt;
&lt;br /&gt;
Further Discussions:&lt;br /&gt;
# Do you know of any published data/equations/results to compare the integrated properties (internal energy/enthalpy/entropy)?&lt;br /&gt;
&lt;br /&gt;
== 03 July 2016 ==&lt;br /&gt;
Updates:&lt;br /&gt;
# Integration functions added: [http://code.ascend4.org/ascend/branches/vishnu/models/johnpye/fprops/vishnu/scratch/main.c?revision=3168&amp;amp;view=markup link]&lt;br /&gt;
#* It is assumed that specific heats are polynomial functions of input temperature&lt;br /&gt;
#* Integration functions for internal energy and entropy calculations for incompressible pure fluid and mixtures are then added according to the equations given in the proposal&lt;br /&gt;
#* All incompressible fluids have an arbitrary reference state for internal energy and entropy: During initialization, the reference state is defined as a temperature of 20 C and a pressure of 1 atm according to the U.S. National Institute of Standards and Technology.&lt;br /&gt;
Further discussions:&lt;br /&gt;
# We don&#039;t know if we need a centered fit for this computation too (as in the evaluation functions before)&lt;br /&gt;
#* No data available for validation purposes&lt;br /&gt;
# How do we deal with enthalpy computation? &lt;br /&gt;
#* This depends on input temperature as well as pressure&lt;br /&gt;
Work under progress:&lt;br /&gt;
# Adding incompressible fluid data structures to filedata.h and rundata.h&lt;br /&gt;
&lt;br /&gt;
== 10 July 2016 ==&lt;br /&gt;
Updates:&lt;br /&gt;
# Modified the files [http://code.ascend4.org/ascend/branches/vishnu/models/johnpye/fprops/filedata.h?revision=3149&amp;amp;view=markup filedata.h] and [http://code.ascend4.org/ascend/branches/vishnu/models/johnpye/fprops/rundata.h?revision=3168&amp;amp;view=markup rundata.h] to store incompressibile fluid coefficients&lt;br /&gt;
#* Note that viscosity and thermal conductivity coefficients for incompressible fluids are bound with the incompressible fluid data structure (although there is an option to separate them out)&lt;br /&gt;
#* New pointers to departure functions added into PureFluid_struct to facilitate computations of some incompressible fluid properties (freezing temperature, viscosity, saturation pressure etc.)&lt;br /&gt;
Work under progress:&lt;br /&gt;
# Adding files incompressible.h and incompressible.c&lt;br /&gt;
#* Most of the evaluation function will have to be simply copied from the working/validated standalone code&lt;br /&gt;
&lt;br /&gt;
== 17 July 2016 ==&lt;br /&gt;
Updates:&lt;br /&gt;
# rundata.h and filedata.h in good shape&lt;br /&gt;
#* compatible with both pure and mixture incompresible fluids&lt;br /&gt;
# Evaluation function declaration and definition completed in [http://code.ascend4.org/ascend/branches/vishnu/models/johnpye/fprops/incompressible.h?revision=3168&amp;amp;view=markup incompressible.h] and [http://code.ascend4.org/ascend/branches/vishnu/models/johnpye/fprops/incompressible.c?revision=3168&amp;amp;view=markup incompressible.c] file respectively (except enthalpy, internal energy and entropy)&lt;br /&gt;
&lt;br /&gt;
Work under progress:&lt;br /&gt;
# Write the incompressible_prepare() subroutine to load the stored model data from filedata to rundata &lt;br /&gt;
# Completing evaluation function for integrated properties (enthalpy, internal energy and entropy)&lt;br /&gt;
# Learn final linking of incompressible model through fprops(.h/.c) files&lt;br /&gt;
&lt;br /&gt;
Further discussions:&lt;br /&gt;
# Which are the files that need major changes while performing the final binding work (of the incompressible model to FPROPS)?&lt;br /&gt;
&lt;br /&gt;
== 24 July 2016 ==&lt;br /&gt;
Updates:&lt;br /&gt;
# Finished coding up the evaluation function for integrated properties (internal energy and entropy)&lt;br /&gt;
# Completed the incompressible_prepare() subroutine: [http://code.ascend4.org/ascend/branches/vishnu/models/johnpye/fprops/incompressible.c?revision=3168&amp;amp;view=markup link]&lt;br /&gt;
&lt;br /&gt;
Under progress:&lt;br /&gt;
# Binding the incompressible model with FPROPS&lt;br /&gt;
# Setting up test cases similar to what was done with the standalone code&lt;br /&gt;
#* Focus on Zitrec S55, Potassium Formate/Sodium Propionate (pure) and LiBr (mixture) verification&lt;br /&gt;
&lt;br /&gt;
== 31 July 2016 ==&lt;br /&gt;
Updates:&lt;br /&gt;
# Initial binding of the incompressible model to FPROPS successful&lt;br /&gt;
# Incompressible module tested for Zitrec S55, Potassium Formate/Sodium Propionate (pure) and LiBr (mixture) solution&lt;br /&gt;
#* Results consistent with previous test performed with the standalone code&lt;br /&gt;
#* Please find the relevant input, source code, post-processing .py scripts and output+plots here: (moved to) [http://code.ascend4.org/ascend/branches/vishnu/models/johnpye/fprops/test/incomp_misc/ link1] and [http://code.ascend4.org/ascend/branches/vishnu/models/johnpye/fprops/vishnu/ link2]&lt;br /&gt;
&lt;br /&gt;
Further discussion:&lt;br /&gt;
# Here, the underlying fluid state structure in &#039;fprops&#039; file had to be changed to incorporate the values for concentration (x) and pressure (p)&lt;br /&gt;
#* This might affect the assumption made by other EOS models in FPROPS&lt;br /&gt;
&lt;br /&gt;
Work under progress:&lt;br /&gt;
# Concentrate binding the pure incompressible fluid part&lt;br /&gt;
#* This can be done without changing the fluid state structure&lt;br /&gt;
#* But then, it should be noted that it will be &#039;pressure&#039; that will be actually stored in the variable named &#039;density&#039; during incompressible EOS computations&lt;br /&gt;
#* The mixture part that was coded up will be placed in a backup folder and will be worked upon in the future (post-GSoC &#039;16)&lt;br /&gt;
&lt;br /&gt;
== 07 August 2016 ==&lt;br /&gt;
Updates:&lt;br /&gt;
# [http://code.ascend4.org/ascend/branches/vishnu/models/johnpye/fprops/fprops.h?revision=3168&amp;amp;view=markup fprops.h] and [http://code.ascend4.org/ascend/branches/vishnu/models/johnpye/fprops/fprops.c?revision=3168&amp;amp;view=markup fprops.c] files edited to support pure incompressible EOS&lt;br /&gt;
# Final binding of &#039;pure&#039; incompressible EOS model completed&lt;br /&gt;
&lt;br /&gt;
Work under progress:&lt;br /&gt;
# Verification of incompressible EOS model with available [http://code.ascend4.org/ascend/trunk/models/johnpye/moltensalt.a4c?view=markup ascend-model] for &#039;molten salt&#039;&lt;br /&gt;
#* More data points from [http://prod.sandia.gov/techlib/access-control.cgi/2001/012100.pdf Sandia-National-Laboratories-report]&lt;br /&gt;
&lt;br /&gt;
== 14 August 2016 ==&lt;br /&gt;
Updates:&lt;br /&gt;
# Managed to partially get the test case for molten-salt working  &lt;br /&gt;
#* Approach was to create a &#039;json&#039; file for the coefficients as given in http://prod.sandia.gov/techlib/access-control.cgi/2001/012100.pdf&lt;br /&gt;
#* Debugging and tedious unit conversions (from British to SI and back) &lt;br /&gt;
#* Deviations from the SNL paper data are significant for density and specific heat &lt;br /&gt;
#* Here are the values (original data, fitted data from code) all in SI units at (T,p) = (1050 F, 1 bar):&lt;br /&gt;
#**    density (1728,1730)&lt;br /&gt;
#**    specific heat (1544,1540)&lt;br /&gt;
#**    viscosity (1.14e-3,1.14e-3)&lt;br /&gt;
#**    conductivity (0.55,0.55)&lt;br /&gt;
&lt;br /&gt;
Further work:&lt;br /&gt;
# Finish molten-salt test case with appropriate error analysis&lt;br /&gt;
&lt;br /&gt;
Discussion:&lt;br /&gt;
# No validation data to compare against for integrated properties. &lt;br /&gt;
# How to deal with enthalpy calculation? (pressure comes into picture)&lt;br /&gt;
# Discussion about functions on computing the reference values: Is it really necessary to add reference states in the evaluation functions if there are many options (and since we don&#039;t know which one to use for incompressible fluids)? I assume that the CFD solvers are more concerned with the gradients rather than the absolute values. Or is it important when it comes to computational chemistry?&lt;br /&gt;
&lt;br /&gt;
== 21 August 2016 (GSoC &#039;16 Final Product) ==&lt;br /&gt;
Updates:&lt;br /&gt;
# Incompressible EOS for pure fluids added and linked to FPROPS&lt;br /&gt;
# The test case presented will be that for &#039;molten salt&#039;&lt;br /&gt;
#* 60% NaNO3 and 40% KNO3&lt;br /&gt;
#* 12 test points and correlation coefficients from http://prod.sandia.gov/techlib/access-control.cgi/2001/012100.pdf&lt;br /&gt;
&lt;br /&gt;
How to run the test in your Linux machine (assuming svn, scons and other relevant apps are already installed):&lt;br /&gt;
* Check out the code from my repository using svn client:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt; svn co http://svn.ascend4.org/branches/vishnu ascend &amp;lt;/source&amp;gt;&lt;br /&gt;
* Run scons script from fprops folder:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt; cd ascend/models/johnpye/fprops &amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt; scons &amp;lt;/source&amp;gt;&lt;br /&gt;
* Run the moltensalt_btu_test executable in the test folder:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt; cd test // or cd ascend/models/johnpye/fprops/test &amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt; ./moltensalt_btu_test &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
incompressible.c:107(incompressible_prepare): Incompressible&lt;br /&gt;
&lt;br /&gt;
Test point: 0 {Temperature 	Density 	Specific Heat 	Viscosity 	Conductivity}&lt;br /&gt;
FPROPS at T = 5.000000e+02	1.200950e+02	3.564000e-01	1.050580e+01	2.845572e-01&lt;br /&gt;
Error at T =  5.000000e+02	0.000000e+00	0.000000e+00	0.000000e+00	0.000000e+00&lt;br /&gt;
&lt;br /&gt;
Test point: 1 {Temperature 	Density 	Specific Heat 	Viscosity 	Conductivity}&lt;br /&gt;
FPROPS at T = 5.500000e+02	1.189845e+02	3.575400e-01	8.607339e+00	2.876921e-01&lt;br /&gt;
Error at T =  5.500000e+02	0.000000e+00	0.000000e+00	0.000000e+00	0.000000e+00&lt;br /&gt;
&lt;br /&gt;
Test point: 2 {Temperature 	Density 	Specific Heat 	Viscosity 	Conductivity}&lt;br /&gt;
FPROPS at T = 6.000000e+02	1.178740e+02	3.586800e-01	7.085347e+00	2.908270e-01&lt;br /&gt;
Error at T =  6.000000e+02	0.000000e+00	0.000000e+00	0.000000e+00	0.000000e+00&lt;br /&gt;
&lt;br /&gt;
Test point: 3 {Temperature 	Density 	Specific Heat 	Viscosity 	Conductivity}&lt;br /&gt;
FPROPS at T = 6.500000e+02	1.167635e+02	3.598200e-01	5.893968e+00	2.939620e-01&lt;br /&gt;
Error at T =  6.500000e+02	0.000000e+00	0.000000e+00	0.000000e+00	0.000000e+00&lt;br /&gt;
&lt;br /&gt;
Test point: 4 {Temperature 	Density 	Specific Heat 	Viscosity 	Conductivity}&lt;br /&gt;
FPROPS at T = 7.000000e+02	1.156530e+02	3.609600e-01	4.987346e+00	2.970969e-01&lt;br /&gt;
Error at T =  7.000000e+02	0.000000e+00	0.000000e+00	0.000000e+00	0.000000e+00&lt;br /&gt;
&lt;br /&gt;
Test point: 5 {Temperature 	Density 	Specific Heat 	Viscosity 	Conductivity}&lt;br /&gt;
FPROPS at T = 7.500000e+02	1.145425e+02	3.621000e-01	4.319625e+00	3.002318e-01&lt;br /&gt;
Error at T =  7.500000e+02	0.000000e+00	0.000000e+00	0.000000e+00	0.000000e+00&lt;br /&gt;
&lt;br /&gt;
Test point: 6 {Temperature 	Density 	Specific Heat 	Viscosity 	Conductivity}&lt;br /&gt;
FPROPS at T = 8.000000e+02	1.134320e+02	3.632400e-01	3.844950e+00	3.033667e-01&lt;br /&gt;
Error at T =  8.000000e+02	0.000000e+00	0.000000e+00	0.000000e+00	0.000000e+00&lt;br /&gt;
&lt;br /&gt;
Test point: 7 {Temperature 	Density 	Specific Heat 	Viscosity 	Conductivity}&lt;br /&gt;
FPROPS at T = 8.500000e+02	1.123215e+02	3.643800e-01	3.517466e+00	3.065016e-01&lt;br /&gt;
Error at T =  8.500000e+02	0.000000e+00	0.000000e+00	0.000000e+00	0.000000e+00&lt;br /&gt;
&lt;br /&gt;
Test point: 8 {Temperature 	Density 	Specific Heat 	Viscosity 	Conductivity}&lt;br /&gt;
FPROPS at T = 9.000000e+02	1.112110e+02	3.655200e-01	3.291317e+00	3.096366e-01&lt;br /&gt;
Error at T =  9.000000e+02	0.000000e+00	0.000000e+00	0.000000e+00	0.000000e+00&lt;br /&gt;
&lt;br /&gt;
Test point: 9 {Temperature 	Density 	Specific Heat 	Viscosity 	Conductivity}&lt;br /&gt;
FPROPS at T = 9.500000e+02	1.101005e+02	3.666600e-01	3.120647e+00	3.127715e-01&lt;br /&gt;
Error at T =  9.500000e+02	0.000000e+00	0.000000e+00	0.000000e+00	0.000000e+00&lt;br /&gt;
&lt;br /&gt;
Test point: 10 {Temperature 	Density 	Specific Heat 	Viscosity 	Conductivity}&lt;br /&gt;
FPROPS at T = 1.000000e+03	1.089900e+02	3.678000e-01	2.959600e+00	3.159064e-01&lt;br /&gt;
Error at T =  1.000000e+03	0.000000e+00	0.000000e+00	0.000000e+00	0.000000e+00&lt;br /&gt;
&lt;br /&gt;
Test point: 11 {Temperature 	Density 	Specific Heat 	Viscosity 	Conductivity}&lt;br /&gt;
FPROPS at T = 1.050000e+03	1.078795e+02	3.689400e-01	2.762321e+00	3.190413e-01&lt;br /&gt;
Error at T =  1.050000e+03	0.000000e+00	0.000000e+00	0.000000e+00	0.000000e+00&lt;br /&gt;
&lt;br /&gt;
Test point: 12 {Temperature 	Density 	Specific Heat 	Viscosity 	Conductivity}&lt;br /&gt;
FPROPS at T = 1.100000e+03	1.067690e+02	3.700800e-01	2.482955e+00	3.221762e-01&lt;br /&gt;
Error at T =  1.100000e+03	0.000000e+00	0.000000e+00	0.000000e+00	0.000000e+00&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Edit log =&lt;br /&gt;
http://code.ascend4.org/ascend/branches/vishnu/?sortby=log&amp;amp;view=log&lt;br /&gt;
&lt;br /&gt;
[[Category:GSOC2016]]&lt;br /&gt;
[[Category:ASCEND Contributors]]&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Hugo&amp;diff=5952</id>
		<title>User:Hugo</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Hugo&amp;diff=5952"/>
		<updated>2018-01-31T11:02:23Z</updated>

		<summary type="html">&lt;p&gt;Mike: add to contributor category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I&#039;m Hugo Gualandi, and am currently pursuing a PhD at [http://www.lua.inf.puc-rio.br/ PUC-Rio university], focusing on programming languages. For [[GSOC2016]] I implemented [[OcamlParser|experimental ASCEND parsers and syntax transformers]].&lt;br /&gt;
&lt;br /&gt;
== GSOC 2016 Project: Improvements to the Conditional Modeling Syntax ==&lt;br /&gt;
&lt;br /&gt;
The goal of my 2016 Summer Of Code project was to improve ASCEND&#039;s conditional modelling syntax. The first thing I did was to study the current state of ASCEND&#039;s conditional modeling and identify some ways in which the current modeling syntax and semantics could be improved. My findings are documented in the [[#Proposed syntax changes]] section.&lt;br /&gt;
&lt;br /&gt;
My most significant contribution during this project was to implement an experimental alternative parser for the ASCEND modeling language that allows a faster rate of experimentation for new syntactic features compared to the existing ASCEND parser. I documented what this parser does and how to use it in its own wiki page: [[OcamlParser]].&lt;br /&gt;
&lt;br /&gt;
What is left to is leverage the new parser to experiment with the new designs for the conditional syntax and then, after verifying that they work well, implement the required changes in ASCEND&#039;s main compiler.&lt;br /&gt;
&lt;br /&gt;
== Proposed syntax changes ==&lt;br /&gt;
&lt;br /&gt;
The main goal of this project was to improve the usability of dynamic and conditional modeling in ASCEND. This includes:&lt;br /&gt;
&lt;br /&gt;
1) Reducing redundancy in the specification&lt;br /&gt;
* Right now some models break badly without redundant information ([[FIX]] and [[FREE]] in hybrid models)&lt;br /&gt;
* Sometimes, we have redundant information that could have been inferred by a smarter compiler&lt;br /&gt;
&lt;br /&gt;
2) Make modeling less error prone&lt;br /&gt;
* Right now, hybrid modeling relies on calling methods that run [[FIX]], [[FREE]] and set variables by hand. This is very error prone and violates some of the ASCEND abstractions.&lt;br /&gt;
* I believe that the key to improving this is a better way to specify initial conditions in models.&lt;br /&gt;
&lt;br /&gt;
So far, I have identified many easy places to improve the language regarding point #1. Point #2 is something that ended up being harder than expected. Many of my proposed changes were inspired by the [https://www.modelica.org/ Modelica] system and I would highly recommend checking that out for comparison.&lt;br /&gt;
&lt;br /&gt;
=== Easy redundancy reduction ===&lt;br /&gt;
&lt;br /&gt;
1) We could infer the PREVIOUS and DERIVATIVE OF declarations.&lt;br /&gt;
&lt;br /&gt;
Modelica does this for its language. Its would be just a matter of parsing the model and checking which variables we are using the der() and pre() operators on. Right now, the only thing these declarations do is clutter the model and complain when we forget to specify a declaration.&lt;br /&gt;
&lt;br /&gt;
2) We could allow conditional expressions inside equations.&lt;br /&gt;
&lt;br /&gt;
For example, right now we use [[USE]] statements to turn equations on and off:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
on: P = 3000;&lt;br /&gt;
off: P = 0;&lt;br /&gt;
 &lt;br /&gt;
ev1: EVENT (too_high)&lt;br /&gt;
    CASE TRUE: USE off;&lt;br /&gt;
END EVENT;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I would prefer to use boolean expressions instead, similar to how it is possible in Modelica. In ASCEND it would look something like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
P = if on then 3000 else 0;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another good application of conditional expressions would be piecewise functions such as min(), max() and abs(). They resulting code can end up more concise than conditional equations.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
x = max(y, 0)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For optimization and [http://book.xogeny.com/behavior/discrete/decay/ advanced tweaking], Modelica also has the `noEvent` and `smooth` operators to &amp;quot;turn off&amp;quot; the automatic event-handling and boundary checking of conditional expressions.&lt;br /&gt;
&lt;br /&gt;
=== Miscelaneous Modelica features ===&lt;br /&gt;
&lt;br /&gt;
Some Modelica features caught my eye. They wouldn&#039;t be a big priority for us, but I think its worth mentioning that they exist.&lt;br /&gt;
&lt;br /&gt;
1) You can use a buit-in function to create an event that runs every X seconds. In Ascend I think you would need to abuse a periodic function such as sin() to achieve this effect.&lt;br /&gt;
&lt;br /&gt;
2) The terminate() builtin lets you cleanly halt the integration from inside an event handler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hybrid modeling ===&lt;br /&gt;
&lt;br /&gt;
For motivation, lets look at the code for a bouncing ball in Modelica:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
model BouncingBall &amp;quot;The &#039;classic&#039; bouncing ball model&amp;quot;&lt;br /&gt;
  type Height=Real(unit=&amp;quot;m&amp;quot;);&lt;br /&gt;
  type Velocity=Real(unit=&amp;quot;m/s&amp;quot;);&lt;br /&gt;
  parameter Real e=0.8 &amp;quot;Coefficient of restitution&amp;quot;;&lt;br /&gt;
  parameter Height h0=1.0 &amp;quot;Initial height&amp;quot;;&lt;br /&gt;
  Height h;&lt;br /&gt;
  Velocity v;&lt;br /&gt;
initial equation&lt;br /&gt;
  h = h0;&lt;br /&gt;
equation&lt;br /&gt;
  der(h) = v&lt;br /&gt;
  der(v) = -9.81;&lt;br /&gt;
  when h&amp;lt;0 then&lt;br /&gt;
    reinit(v, -e*pre(v));&lt;br /&gt;
  end when;&lt;br /&gt;
end BouncingBall;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some interesting things that I think of this: &lt;br /&gt;
* The Hybrid modeling happens via a `reinit` statement that &amp;quot;sets&amp;quot; a variable to a new value. We were asking if maybe something more general would be needed but Modelica suggests that these &amp;quot;assignments&amp;quot; are enough.&lt;br /&gt;
* However, `reinit` is not a plain assignment. It also recomputes the initial conditions appropriately.&lt;br /&gt;
* There are special equations for specifying the initial conditions. In more advanced cases, these equations can be things like `der(x) = 0`.&lt;br /&gt;
&lt;br /&gt;
Now, lets compare this to how ASCEND handles [[EVENT]] statements&lt;br /&gt;
&lt;br /&gt;
# Detect when a boolean variable flips from FALSE to TRUE&lt;br /&gt;
# Deactivate equations from OTHERWISE clause.&lt;br /&gt;
# Activate equations in the CASE TRUE clause.&lt;br /&gt;
# Run the evtname METHOD to fix/free variables.&lt;br /&gt;
# Run QRSlv&lt;br /&gt;
# Run the evtname_end METHOD to undo the changes from step 4&lt;br /&gt;
&lt;br /&gt;
Step 1 can get a bit cleaner if we allow boolean expressions instead of just boolean variables. I think steps 2 and 3 should be covered by regular conditional equations (what the current WHEN syntax does) and does not have to be the responsibility of the EVENT statement.&lt;br /&gt;
&lt;br /&gt;
The really tricky part are steps 4, 5 and 6. This problem of solving the system to find new initial conditions is something that we don&#039;t have a good way to express yet in ASCEND. For example, notice how some of the models in the ksenija folder have `before_integ` or `prepare_integ` that should be manually run to find initial conditions. I also needed to do something similar to find steady-state initial conditions in the Lotka-Volterra model I wrote.&lt;br /&gt;
&lt;br /&gt;
Right now, I don&#039;t know how to fix this problem of specifying initial conditions but I highly suspect that if we can figure this out, the syntax for the hybrid modeling will follow very naturally.&lt;br /&gt;
&lt;br /&gt;
[[Category:GSOC2016]]&lt;br /&gt;
[[Category:ASCEND Contributors]]&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Georgy&amp;diff=5951</id>
		<title>User:Georgy</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Georgy&amp;diff=5951"/>
		<updated>2018-01-31T11:01:30Z</updated>

		<summary type="html">&lt;p&gt;Mike: add to contributor category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Georgy Berdyshev&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to implement MSYS2 based build process for ASCEND and improve packaging for Mac.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The main task is to improve the ASCEND build processes by creating a new MSYS2 based implementation by modifying and updating the current SCons build files.&lt;br /&gt;
&lt;br /&gt;
The introduction of MSYS2 for the build processes will bring many benefits to ASCEND, such as the possibility to build more easily 64 bit binaries on Windows and to be able to rely on a current gcc compiler suite from MinGW­w64.&lt;br /&gt;
&lt;br /&gt;
In contrast, the current build process has to rely on TDM­GCC (instead of MinGW used with MSYS) to be able to compile 32­bit and 64­bit binaries.&lt;br /&gt;
MSYS2 would bring many features to the project, such as the possibility to install dependencies in an easy manner and speed up the build process. But most importantly it has much better native Windows API support. Therefore providing a very feature rich and free base for the new build system of ASCEND.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Project details: https://summerofcode.withgoogle.com/dashboard/project/5090588751822848/details/&lt;br /&gt;
&lt;br /&gt;
== Using subversion ==&lt;br /&gt;
1) Subversion username and branch: {{srcbranchdir|georgy|}}&lt;br /&gt;
&lt;br /&gt;
2) Changes:&lt;br /&gt;
&lt;br /&gt;
http://code.ascend4.org/ascend/branches/georgy/?sortby=log&amp;amp;view=log&lt;br /&gt;
&lt;br /&gt;
The changes for this project are committed to github and synced regularly with the {{srcbranchdir|georgy|}} subversion branch.&lt;br /&gt;
&lt;br /&gt;
== Using git (github.com) ==&lt;br /&gt;
&lt;br /&gt;
1) Master branch contains merge code from the below branches, that is synced to the subversion branch.&lt;br /&gt;
&lt;br /&gt;
[https://github.com/georgyberdyshev/ascend/tree/master master]&lt;br /&gt;
[https://github.com/georgyberdyshev/ascend/commits/master changes]&lt;br /&gt;
&lt;br /&gt;
2) MSYS2 branch contains msys2, swig and changes for mingw64 and native Python support.&lt;br /&gt;
&lt;br /&gt;
[https://github.com/georgyberdyshev/ascend/tree/msys2/python msys2/python]&lt;br /&gt;
[https://github.com/georgyberdyshev/ascend/commits/msys2/python changes]&lt;br /&gt;
&lt;br /&gt;
3) NSIS3 branch contains support for a NSIS3 Windows based installer and further improvements.&lt;br /&gt;
&lt;br /&gt;
[https://github.com/georgyberdyshev/ascend/tree/nsis3 nsis3]&lt;br /&gt;
[https://github.com/georgyberdyshev/ascend/commits/nsis3 changes]&lt;br /&gt;
&lt;br /&gt;
4) Sundials_2.6 branch contains support for using the newer sundials 2.6 version with ascend.&lt;br /&gt;
&lt;br /&gt;
[https://github.com/georgyberdyshev/ascend/tree/sundials_2.6 sundials_2.6]&lt;br /&gt;
[https://github.com/georgyberdyshev/ascend/commits/sundials_2.6 changes]&lt;br /&gt;
&lt;br /&gt;
==Obtaining the source code==&lt;br /&gt;
1) Using subversion&lt;br /&gt;
&lt;br /&gt;
svn co http://code.ascend4.org/ascend/branches/georgy&lt;br /&gt;
&lt;br /&gt;
2) Using git&lt;br /&gt;
&lt;br /&gt;
git clone https://github.com/georgyberdyshev/ascend.git&lt;br /&gt;
&lt;br /&gt;
== Using MSYS2 ==&lt;br /&gt;
&lt;br /&gt;
MSYS2 is a new generation of MSYS that works with the &amp;lt;tt&amp;gt;[https://wiki.archlinux.org/index.php/pacman pacman]&amp;lt;/tt&amp;gt; package manager.&lt;br /&gt;
&lt;br /&gt;
After obtaining the source code, you can install the required pacman package by running the following commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sh&amp;quot;&amp;gt;&lt;br /&gt;
pacman -Syu&lt;br /&gt;
pacman -S vim&lt;br /&gt;
pacman -S mingw-w64-x86_64-gtk2 mingw-w64-x86_64-gcc \ &lt;br /&gt;
 mingw-w64-x86_64-gcc-fortran mingw-w64-x86_64-python2-numpy \ &lt;br /&gt;
 mingw-w64-x86_64-python2-pygtk subversion swig \ &lt;br /&gt;
 flex bison python2 scons pkgconfig \ &lt;br /&gt;
 mingw-w64-i686-python2&lt;br /&gt;
svn co svn://ascend4.org/code/trunk ascend&lt;br /&gt;
cd ascend&lt;br /&gt;
scons&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to note, that the current version of scons that is being used for the build relies on the msys Python package, that is broken.&lt;br /&gt;
Therefore it is required to bootstrap an alternative Python, even though scons runs via msys.&lt;br /&gt;
You may either provide a mingw64 install Python or the native win32 Python installation, by specifying the PYTHON variable to scons.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sh&amp;quot;&amp;gt;&lt;br /&gt;
scons PYTHON=/c/Python27/python.exe&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
scons PYTHON=/mingw64/bin/python&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project log ==&lt;br /&gt;
*[https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82 Added SWIG 3 support. Fixes Unknown SWIG preprocessor directive error.]&lt;br /&gt;
*[https://github.com/georgyberdyshev/ascend/commit/a9e79e6bb410ea60eb1e3e6b7ad19923216c77bc Fix name of sundials-config command.]&lt;br /&gt;
*[https://github.com/georgyberdyshev/ascend/commit/6a0af5af9ada74fca34c24e2ded1859738484994 Detect SUNDIALS 2.6 on MinGW.]&lt;br /&gt;
*[https://github.com/georgyberdyshev/ascend/commit/6aa1673da8f26716b5a9080660e24331c38a5759 Detect SUNDIALS 2.6 on MinGW.]&lt;br /&gt;
*[https://github.com/georgyberdyshev/ascend/commit/026bd7814daaa17cc7484f012b945ed17449df16 Updated code to use NSISdl plugin.]&lt;br /&gt;
*[https://github.com/georgyberdyshev/ascend/commit/8e47a0eb9543933e7d08cd1655c08964b246b792 Added Unicode multi language installer and uninstaller with several languages.]&lt;br /&gt;
*[https://github.com/georgyberdyshev/ascend/commit/12eadeb43b8f481f4effe7b6e2ae0baf3556f36e Create NSIS Modern UI 2.0 based installers.]&lt;br /&gt;
*[https://github.com/georgyberdyshev/ascend/commit/58c01c61ea9efbb2668bd8e792ab8a299e6e8f14 Display ASCEND website as branding text.]&lt;br /&gt;
*[https://github.com/georgyberdyshev/ascend/commit/85ceb7985755a333c0b31c80ad5aaf9053841427 Added initial code to specify and detect the Python executable.]&lt;br /&gt;
*[https://github.com/georgyberdyshev/ascend/commit/a8289e3bbf16e27565fe618b0f7d36e7823204e0 Merge remote-tracking branch &#039;origin/nsis3&#039; into msys2/python]&lt;br /&gt;
*[https://github.com/georgyberdyshev/ascend/commit/a0c72c8920e773516f0eea0ee1ddb3c97f35e3e4 Use /usr/bin/env to detect Python.]&lt;br /&gt;
*[https://github.com/georgyberdyshev/ascend/commit/c0614cb0273b79beb055fd7f822631c27738dd45 Use /usr/bin/env to detect Python.]&lt;br /&gt;
*[https://github.com/georgyberdyshev/ascend/commit/22ccdad3a5b3eca8ec51cb14fd7830f5181f8f28 Detect native win32 Python.]&lt;br /&gt;
*[https://github.com/georgyberdyshev/ascend/commit/74d3505f27f68cb566bdc1c732c44f3a75267bf6 Use os.path on Windows.]&lt;br /&gt;
*[https://github.com/georgyberdyshev/ascend/commit/2b724c6855d3e1963b5c109dff642abccea8585d Added functionality to detect Windows Python environment.]&lt;br /&gt;
*[https://github.com/georgyberdyshev/ascend/commit/17e9afa0b69f34f395c44b7a782858fa59eefeca Request Python environment when using msys2.]&lt;br /&gt;
*[https://github.com/georgyberdyshev/ascend/commit/4835282f161f3b53a6d4ab757aa6f366e255d11d Added functionality to detect Windows Python environment independently.]&lt;br /&gt;
*[https://github.com/georgyberdyshev/ascend/commit/4e7dd34bad7f1e00175aa916c39049d85531273a Detect bootstrapped Python environment.]&lt;br /&gt;
*[https://github.com/georgyberdyshev/ascend/commit/b8ec72f999f7af3f317dcfd1fb424cf29a82720b Added support to bootstrap mingw64 Python from msys2.]&lt;br /&gt;
*[https://github.com/georgyberdyshev/ascend/commit/4adaac1c3edcf54ab93634d1b7df6ffec37e9df0 Added functionality to detect additional lib paths for native Python on win32 and win64.]&lt;br /&gt;
*[https://github.com/georgyberdyshev/ascend/commit/3b9ed5ca884b0a54e43810821ace02a1cde75191 Show scons generated output files.]&lt;br /&gt;
*[https://github.com/georgyberdyshev/ascend/commit/1989b3ba3baa607ab32c111732a95aed1b5eda3f Fix SWIG compilation and Python lib paths.]&lt;br /&gt;
*[https://github.com/georgyberdyshev/ascend/commit/38642239f4b0cd846448a55e8356de67c321ab43 Fix compilation and Python lib paths.]&lt;br /&gt;
*[https://github.com/georgyberdyshev/ascend/commit/9e2bcb56560e34038036fb249a84d0881b425262 Updated NSIS detection.]&lt;br /&gt;
*[https://github.com/georgyberdyshev/ascend/commit/c2f265108f122fb44b82ec6f30ebeceb49157ca6 Updated Tcl detection.]&lt;br /&gt;
*[https://github.com/georgyberdyshev/ascend/commit/f1778f9a1891ea601fa17905fc3d4b9ae5fa67cb Merge branch &#039;sundials_2.6&#039; into msys2/python]&lt;br /&gt;
&lt;br /&gt;
[[Category:GSOC2016]]&lt;br /&gt;
[[Category:ASCEND Contributors]]&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5950</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5950"/>
		<updated>2018-01-31T11:00:54Z</updated>

		<summary type="html">&lt;p&gt;Mike: add to contributor category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han ([https://en.wikipedia.org/wiki/Chinese_characters 韩腾达]) (Mike) &lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: tengda.han@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I did [[GSOC2016]] for ASCEND. I optimized GUI of Canvas, fixed bugs, developed canvas models and improved canvas language.  &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* How to use &#039;inout&#039; port: (see {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}} for detail)[[File:canvas_inout.png|thumb|alt=&#039;Inout&#039; port is available in canvas|Connecting &#039;inout&#039; port in canvas]]&lt;br /&gt;
** The resistor_basic model has normal &#039;inlet&#039; and &#039;outlet&#039; port. But the Ground model only has &#039;inout&#039; port, which can be connected with any kinds of ports in canvas. The definition of &#039;inout&#039; port is exactly the same as &#039;inlet&#039; or &#039;outlet&#039; ports. Part of the code is shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=a4c&amp;gt;&lt;br /&gt;
 MODEL Ground;&lt;br /&gt;
 	NOTES&lt;br /&gt;
 		&#039;block&#039; SELF {Ground}&lt;br /&gt;
 		&#039;icon&#039; SELF {ground.png}&lt;br /&gt;
 		&#039;graphic&#039; SELF {5,0-5,5&lt;br /&gt;
 			0,5-10,5&lt;br /&gt;
 			2,7-8,7&lt;br /&gt;
 			4,9-6,9}&lt;br /&gt;
 		&#039;port_inout&#039; SELF {inout:5,0}&lt;br /&gt;
 	END NOTES;&lt;br /&gt;
 	inout &amp;quot;inout:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 	inout.V = 0 {volt};&lt;br /&gt;
 END Ground;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Piping system introduction:&lt;br /&gt;
&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:canvas_GUI.png|Canvas GUI&lt;br /&gt;
File:canvas_inout.png|&#039;Inout&#039; port is available in canvas&lt;br /&gt;
File:canvas_basic_elec.png|Basic electronic circuit simulation&lt;br /&gt;
File:canvas_block_properties.png|Block equation can be viewed from &#039;block properties&#039;&lt;br /&gt;
File:canvas_quit_confirm.png|Warning dialog before quitting canvas&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND Contributors]]&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=Category:GSOC2016&amp;diff=5949</id>
		<title>Category:GSOC2016</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=Category:GSOC2016&amp;diff=5949"/>
		<updated>2018-01-31T10:58:31Z</updated>

		<summary type="html">&lt;p&gt;Mike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here are the student projects making up our [[GSOC2016]] activity, part of the [[GSOC|Google Summer of Code]] program.&lt;br /&gt;
[[Category:GSOC]]&lt;br /&gt;
[[Category:ASCEND Contributors]]&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=Category:GSOC&amp;diff=5948</id>
		<title>Category:GSOC</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=Category:GSOC&amp;diff=5948"/>
		<updated>2018-01-31T10:55:51Z</updated>

		<summary type="html">&lt;p&gt;Mike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These pages relate to our participation in [http://code.google.com/soc/ Google Summer of Code], a programme where Google pays students to participate in free, open-source software projects.&lt;br /&gt;
&lt;br /&gt;
Probably you want to see [[GSOC2018]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=GSOC2018&amp;diff=5947</id>
		<title>GSOC2018</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=GSOC2018&amp;diff=5947"/>
		<updated>2018-01-31T10:52:31Z</updated>

		<summary type="html">&lt;p&gt;Mike: tiny grammar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ASCEND is applying to participate in [https://summerofcode.withgoogle.com/ GSOC] in 2018. Please read below if you are interested in participating!&lt;br /&gt;
&lt;br /&gt;
The following application guidelines are retained for future reference.&lt;br /&gt;
&lt;br /&gt;
== General information ==&lt;br /&gt;
&lt;br /&gt;
GSOC is a programme that lets students be paid for work that they do to contribute to an open-source software project. It is a competitive programme for which students must make themselves known to the software project directly, and then apply to Google for selection. Students who get involved well in advance of the deadlines usually have a much better chance of being selected. Some links for people wanting to learn about GSOC for possible future participation:&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Google_Summer_of_Code general information about the programme (wikipedia)]&lt;br /&gt;
* [https://developers.google.com/open-source/gsoc/faq GSOC FAQs]&lt;br /&gt;
* [https://developers.google.com/open-source/gsoc/timeline timeline]&lt;br /&gt;
* &#039;&#039;&#039;[[Student projects]]&#039;&#039;&#039;: our list of project ideas with ASCEND (or propose your own)&lt;br /&gt;
* [[:Category:GSOC]]: read about ASCEND projects/students with GSOC in previous years&lt;br /&gt;
* &#039;&#039;&#039;our application template&#039;&#039;&#039; is at the bottom of this page.&lt;br /&gt;
&lt;br /&gt;
We&#039;d like to encourage anyone interested in our project to get in contact with us, and make a proposal! In general, the best way to learn about ASCEND is first to actually try to use it: so, &#039;&#039;please, [[SvnInfo|get the code]], [[Building ASCEND|build it]], try writing some models&#039;&#039;, ponder our [[student projects]] list, and make your proposal. If you would like to discuss any of this, you can [[Support|get in contact with us]].&lt;br /&gt;
&lt;br /&gt;
Please note that to actually formally apply to participate in the GSOC, you must do so via the GSOC website, you don&#039;t apply to us.&lt;br /&gt;
&lt;br /&gt;
== Ways to get involved ==&lt;br /&gt;
&lt;br /&gt;
* read the [[ASCEND overview]] and understand what ASCEND actually does.&lt;br /&gt;
* download our &#039;trunk&#039; code [[SvnInfo|using subversion]] then [[Building ASCEND|build it]], and then [https://lists.sourceforge.net/lists/listinfo/ascend-sim-users let us know] about any issues you come across. Try to help us fix those issues. If you want an overview of the code, see our [[Developer&#039;s Manual]].&lt;br /&gt;
* &#039;&#039;use&#039;&#039; ASCEND! write some models to solve some problems that you have come across in your coursework or elsewhere. Preferably they should be non-trival: simultaneous nonlinear equations, optimisation problems, dynamic problems, etc. Send us your completed models, and work to make them general and reusable. Make use of existing reusable models from our [[model library]] where possible. If we see someone who&#039;s actually worked out what ASCEND is and how to use it, we&#039;re much more likely to sit up and pay attention!&lt;br /&gt;
* read our [[:Category:Documentation|documentation]] and help us to improve it: this is a wiki, so anyone can edit it. (Note: because of endless spam, you have to first register and we have to manually review your submission, but if you look like you&#039;re a real human-being person thing, then we&#039;re happy to have you.)&lt;br /&gt;
* take a look at our [http://bugs.ascend4.org|bug tracker] and find a bug that you can fix, or a feature request that you can implement&lt;br /&gt;
* get onto our [https://lists.sourceforge.net/lists/listinfo/ascend-sim-users mailing list] and open a discussion on features you would like to see in ASCEND&lt;br /&gt;
* talk to your professor about ASCEND, and whether there might be ways to incorporate project work with ASCEND into your degree.&lt;br /&gt;
* you might like to try tackling some little example problems that we previously used as tests for our GSOC applicants: [[OpenMP Exercise]], [[ANTLR exercise]]. We&#039;ll update here if we manage to write any new example problems.&lt;br /&gt;
&lt;br /&gt;
== Application template ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;The following is the &#039;application template&#039; that you can use when submitting your formal proposal to ASCEND via the GSOC website. Please check back here before the application deadline to ensure you have included all of the requested information. Please take care with formatting, and try to use a concise style.&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;About you&#039;&#039;&#039;&lt;br /&gt;
* Name: full name (preferred &#039;friendly&#039; name in brackets)&lt;br /&gt;
* Email:&lt;br /&gt;
* Location: country, city during coding period&lt;br /&gt;
* University: current university and course, year started, length, expected completion date.&lt;br /&gt;
** Please include an email address and website reference for a &#039;&#039;&#039;professor at your university&#039;&#039;&#039; whom we can contact to confirm your enrolment status if required.&lt;br /&gt;
* Skype ID: (if you have one) &lt;br /&gt;
* Are you subscribed to our [[Support|ascend-sim-users]] mailing list? YES/NO (we prefer YES!)&lt;br /&gt;
* Phone number: (optional)&lt;br /&gt;
* URL link to your CV: (optional)&lt;br /&gt;
* URL link to your personal blog/homepage: (optional)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Project proposal&#039;&#039;&#039;&lt;br /&gt;
* Project title as provided on the [[Student projects]] page (or something of your own)&lt;br /&gt;
* Then, a description of the project &#039;&#039;in your own words&#039;&#039;. What do you think you will be able to achieve, and what will your approach be? Why did you choose this idea? &lt;br /&gt;
* What progress have you made already? This might be a more detailed plan, getting up and running, some initial coding, familiarising yourself with related tools, or some general bug-fixing or bug-reporting for ASCEND more broadly.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Milestones&#039;&#039;&#039;&lt;br /&gt;
* What are the goals of your project? Are they [https://en.wikipedia.org/wiki/SMART_criteria &#039;&#039;specific&#039;&#039;, &#039;&#039;measurable&#039;&#039;, &#039;&#039;achievable&#039;&#039;, &#039;&#039;realistic&#039;&#039; and &#039;&#039;time-specific&#039;&#039;]?&lt;br /&gt;
* Give a schedule, showing the order in which you will achieve the specified goals. If possible, show that you have discussed the plan with your proposed mentor.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Other commitments&#039;&#039;&#039;&lt;br /&gt;
* We expect our GSOC students to be online (we prefer Skype) and immediately contactable for at least 35 hours a week, working directly on their GSOC project. If you expect this to be difficult, or if you expect to work at odd hours, we want to know in advance.&lt;br /&gt;
* Note that we require an &#039;&#039;absolute minimum&#039;&#039; of a weekly email update from all our students.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Programming language experience/expertise&#039;&#039;&#039;&lt;br /&gt;
* Programming languages you have learnt, and how many lines of code, approximately, you have written in each.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Relevant experience&#039;&#039;&#039;&lt;br /&gt;
* List jobs, projects, courses etc that show that you have the required knowledge and experience for this project. Explain briefly how they relate to the project you are seeking.&lt;br /&gt;
* Only list things that are relevant, we don&#039;t want your whole CV.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Experience with ASCEND&#039;&#039;&#039;&lt;br /&gt;
* Is this your first contact with the ASCEND project?&lt;br /&gt;
* List or link to any code, patches, documentation or bug reports contributed to ASCEND or other projects.&lt;br /&gt;
* Please give us as much evidence as you can to show that you have got our code running on your machine -- compiled it from the source code yourself -- and that you&#039;ve figured out how to use it independently. The more independent use that you can show, the better. If you&#039;ve identified a bug, report it and link to your bug report. If you&#039;ve written a new model, or some new code to add, tell us about it. The more you&#039;ve done, the easier it is for us to trust in your ability to contribute.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Why ASCEND?&#039;&#039;&#039;&lt;br /&gt;
* If you can, say something insightful about the ASCEND project &#039;&#039;specifically&#039;&#039; -- something about our project that interests you more than others available in GSOC.&lt;br /&gt;
&lt;br /&gt;
[[Category:GSOC]]&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=Student_projects&amp;diff=5946</id>
		<title>Student projects</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=Student_projects&amp;diff=5946"/>
		<updated>2018-01-31T10:00:47Z</updated>

		<summary type="html">&lt;p&gt;Mike: correct small typos&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to [[Main Page|ASCEND]]! You might want to read our [[ASCEND overview|overview]] to learn a bit about our project, or read about our more general [[Development Activities]]. This page gives a long list of possible student projects with our project, which means potential [[GSOC2018]] projects, or possibly undergrad or post-grad research projects, such as for engineering final-year students. Our contact details are [[Support|here]]. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Last updated Jan 2018.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= Recommended projects =&lt;br /&gt;
&lt;br /&gt;
We have assigned &#039;&#039;&#039;priorities&#039;&#039;&#039; to these projects. All things being equal, we will choose students who propose high-priority projects. However, all things are not equal; if we receive a very strong proposal from a student who has done lots of preparatory work, then we will probably choose that student over a lower-quality proposal for a higher-priority project.&lt;br /&gt;
&lt;br /&gt;
== Graphical flowsheet editor ==&lt;br /&gt;
&lt;br /&gt;
Similar to the flowsheet editor in chemical process modelling software such as ASPEN, ASCEND has a [[canvas-based_modeller_for_ASCEND|Canvas-based modeller]] which is currently in development, and not yet quite usable. We would like to push this nice new interface closer to usability. The next step in the implementation, be believe, is to implement proper &#039;connector&#039; logic, including annotation which which variables should be connected in a &#039;potential&#039; sense (eg. voltage, temperature), and which which should be connected in a &#039;flow&#039; sense (eg. current, energy). Connectors should be able to connect a number of related variables at once. Also it would be good to present documents/tutorials to users for solving practical problems. Before going ahead with this project, we would like to discuss implementation details with interested students.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]], [[User:Mike|Tengda (Mike) Han]]&lt;br /&gt;
* Level of difficulty: Medium&lt;br /&gt;
* Priority: Medium/High&lt;br /&gt;
* Languages: Python, possibly a small amount of C/C++&lt;br /&gt;
* Also useful: Cairo/PyGTK/PyGI, design patterns for GUI programming&lt;br /&gt;
&lt;br /&gt;
== Parallel optimisation solvers for ASCEND ==&lt;br /&gt;
&lt;br /&gt;
We would like to develop optimisation solvers for ASCEND using particle swarm optimisation (PSO) or a hybrid of PSO with gradient-based Newton solver methods. Such methods are amenable to parallelisation, and should be considerably faster for certain kinds of models with modern hardware. Connecting to an existing open-source solver would be preferred, but only if it makes good sense architecturally. Before starting, we would like to discuss possible implementation approaches. It&#039;s important to note that current ASCEND is not thread-safe, so care may be required depending on the approach that is taken.&lt;br /&gt;
&lt;br /&gt;
* Contact: [[John Pye]], [[Ben Allan]]&lt;br /&gt;
* Languages: C&lt;br /&gt;
* Difficulty: Medium-High&lt;br /&gt;
* Priority: High&lt;br /&gt;
&lt;br /&gt;
== FPROPS ==&lt;br /&gt;
&lt;br /&gt;
Our [[FPROPS]] fluid properties library within ASCEND is used to calculate the properties of pure fluids (enthalpy, pressure, temperature, density, viscosity, conductivity, etc) with high accuracy. We would like to extend its capabilites in various ways: (1) add support for mixtures, (2) add support for more equations of state, especially cubic equations of state such as Redlich-Kwong and others, (3) add support for incompressible liquids, (4) add support for humid air calculations, (4) demonstrate its use in flash, heat exchanger and reactor models in ASCEND. This project requires someone with background in engineering thermodynamics (for example, having studied the [http://www.amazon.com/dp/0471661740 Sandler book] or similar), because the theory from that book is a necessary starting point for the project.&lt;br /&gt;
&lt;br /&gt;
* Contact: [[Mahesh Venkataraman]], [[John Pye]], [[Krishnan Chittur]]&lt;br /&gt;
* Languages: C and maybe a small amount of Python&lt;br /&gt;
* Must know: engineering thermodynamics (eg. the [http://www.amazon.com/dp/0471661740 Sandler book])&lt;br /&gt;
* Difficult: Medium&lt;br /&gt;
* Priority: High&lt;br /&gt;
&lt;br /&gt;
== Gibbs equilibrium reactor model ==&lt;br /&gt;
&lt;br /&gt;
We would like to implement a robust tool for calculating reaction equilibrium using Gibbs free energy minimisation. This needs to be done in a way that is compatible with the ASCEND approach to declaring [[MODEL]]s etc., and should make use of [[FPROPS]] for the calculation of the properties of each component. We have some sample code in MATLAB; a first step might be to convert that code to C and connect it to FPROPS. We will need to simultaneously discuss how to interface to the code to ASCEND so that it can be used in the context of flexible modelling of chemical process flowsheets.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[Mahesh Venkataraman]], [[John Pye]]&lt;br /&gt;
* Level of difficulty: Medium&lt;br /&gt;
* Must know: engineering thermodynamics (eg the [http://www.amazon.com/dp/0471661740 Sandler book])&lt;br /&gt;
* Priority: Medium/High&lt;br /&gt;
* Languages: C&lt;br /&gt;
&lt;br /&gt;
== CAPE-OPEN thermodynamics ==&lt;br /&gt;
&lt;br /&gt;
[http://www.colan.org/ CAPE-OPEN] is a well-documented API for evaluating thermodynamic properties of mixtures, running flash calculations, etc, which exists in the chemical process simulation community. In this project, we&#039;d like to develop a first proof-of-concept integration of CAPE-OPEN into ASCEND. It is suggested that we might use the CAPE-OPEN thermodynamics library provided by [http://dwsim.inforside.com.br/wiki/index.php?title=CAPE-OPEN the DWSIM project], although other possibilities exist. Importantly, we need this approach to work on Linux as well as Windows, and this may complicate matters. However, on the whole, it should be possible to achieve this integration in a relatively straightforward way using our support for external functions (eg see [[writing ASCEND external relations in C]]). Having CAPE-OPEN support with greatly increase ASCEND&#039;s access to range of high-quality thermodynamic property engines, which would be very helpful in improving the usefulness of our code.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]], [[Mahesh Venkataraman]], [[Krishnan Chittur]]&lt;br /&gt;
* Level of difficulty: Medium (/ Low?)&lt;br /&gt;
* Must know: chemical engineering thermodynamics (eg the [http://www.amazon.com/dp/0471661740 Sandler book])&lt;br /&gt;
* Priority: Medium/High&lt;br /&gt;
* Languages: C, possibly others for &#039;gluing&#039; to the CAPE-OPEN DLLs/COM objects&lt;br /&gt;
&lt;br /&gt;
== Dynamic modelling improvements ==&lt;br /&gt;
&lt;br /&gt;
This project would build on the progress with [[dynamic modelling]] by [[User:Ksenija|Ksenija]] in GSOC2012-2013. We would like to improve our new [[EVENT]] syntax and extend its support to a range of problem types not yet supported, such as periodic events, and make further changes to the ASCEND language to make dynamic modelling more &#039;natural&#039;. We would like to work on the efficiency of the [[ODE]]/[[DAE]] engines, to ensure that integrator restarts after boundaries are as efficient as possible.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]]&lt;br /&gt;
* Level of difficulty: High&lt;br /&gt;
* Priority: High&lt;br /&gt;
* Must know: numerical methods&lt;br /&gt;
* Languages: C, plus possibly some use of lex/yacc&lt;br /&gt;
&lt;br /&gt;
== Debugging tools for DAE modelling ==&lt;br /&gt;
&lt;br /&gt;
We would like to implement tools that make it easier to determine degrees-of-freedom problems for initial value problems, and possibly implement index reduction into ASCEND. One possible algorithm is that by Soares and Secchi (see [http://cepac.cheme.cmu.edu/pasi2011/library/secchi/Soares_Secchi_Dycops-2007_p217.pdf Soares_Secchi_Dycops-2007] or (somewhat different) {{doi|10.1016/S1570-7946(07)80063-0}}).&lt;br /&gt;
&lt;br /&gt;
* Contact person [[John Pye]]&lt;br /&gt;
* Level of difficulty: High&lt;br /&gt;
* Priority: Medium&lt;br /&gt;
* Must know: numerical methods, differential equations, graph theory&lt;br /&gt;
* Languages: C&lt;br /&gt;
&lt;br /&gt;
== Improvements to the Conditional Modelling syntax ==&lt;br /&gt;
&lt;br /&gt;
ASCEND provides support for [[Conditional modelling]] in the form of language constructs and a solver called [[CMSlv]]. Unfortunately the syntax available for conditional modelling is unintuitive. It could be improved by a student willing to delve into the dark corners of the ASCEND compiler and willing to learn about the Flex and Bison parser/compiler tools. Further work on this project could include a rigorous test-suite to demonstrate that all aspects of the conditional model parser and corresponding solver are working OK. Additional further might include enhancements to the graphical interface to make it more obvious to the user when parts of the model are switched on and off as a result of changes in IF or WHEN statements, or alternatively completion of the conditional modelling support for the dynamic modelling solver [[IDA]]. This is another item that would benefit from a [[New Compiler]] effort.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]], [[Art Westerberg]]&lt;br /&gt;
* Level of difficulty: medium&lt;br /&gt;
* Priority: High&lt;br /&gt;
* Languages: Flex/Bison, C&lt;br /&gt;
&lt;br /&gt;
= Other projects =&lt;br /&gt;
&lt;br /&gt;
The following list contains a range of projects that we consider either harder to tackle, or lower priority, or which require very particular skills.&lt;br /&gt;
&lt;br /&gt;
== Python bindings rewrite ==&lt;br /&gt;
&lt;br /&gt;
We would like to review and improve the way that ASCEND accesses its low-level C functionality from Python. Currently this is done via C++ using the [http://www.swig.org SWIG] interface generator. Our preference is probably to keep using SWIG, but to eliminate the C++ layer. Alternatively, a different type of interfacing tool like Cython could be used instead. The new wrapping/langugage bindings would need to be tested via a set of test suites, and program examples in Python provided. It would not be necessary to translate the GUI code to use this new wrapper, although that would certainly be desirable.&lt;br /&gt;
&lt;br /&gt;
* Contact: [[John Pye]]&lt;br /&gt;
* Languages: C, Python, C++, SWIG&lt;br /&gt;
* Difficulty: Medium&lt;br /&gt;
* Priority: Medium&lt;br /&gt;
&lt;br /&gt;
== MSYS2 ==&lt;br /&gt;
&lt;br /&gt;
We would like to implement a new build process for ASCEND for Windows, based on the use of  [https://msys2.github.io/ MSYS2]. MSYS2 is a command-line environment similar to Linux. It offers the usual GCC compilers etc, plus a package manager with pre-compiled versions of many of our dependency libraries and tools. This project would require (1) modifying current SCons build files so that they work correctly with MSYS2 (compared to older MSYS), (2) ensuring that all required dependencies are also available in MSYS2 and (3) producing a new installer for ASCEND, by updating our current NSIS-based scripts, that makes use of the MSYS2 binaries built in 1 and 2.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]]&lt;br /&gt;
* Languages: Python, C, NSIS&lt;br /&gt;
* Must know: usability principles&lt;br /&gt;
* Level of difficulty: Low/Medium&lt;br /&gt;
* Priority: High&lt;br /&gt;
&lt;br /&gt;
== GTK3/Python3 ==&lt;br /&gt;
&lt;br /&gt;
We have already done quite a bit of work (eg [[User:Adrian]]) on adapting ASCEND to work with GTK3 (PyGI, PyGTK3). Next we need to update ASCEND so that it works correctly with Python3. This will require some work using SWIG to update our Python wrapper to work with Python3. It will also require some changes to the Python GUI (code in {{srcdir|pygtk}}. Finally, it is very important to check that the build and install processes work correctly with Python3 on both Windows and Linux as a minimum.&lt;br /&gt;
&lt;br /&gt;
* Contact: [[John Pye]]&lt;br /&gt;
* Languages: Python, SWIG, possibly some C/C++.&lt;br /&gt;
* Difficulty: Low/Medium&lt;br /&gt;
* Priority: High&lt;br /&gt;
&lt;br /&gt;
== Automated parameter-setting for dynamic models ==&lt;br /&gt;
&lt;br /&gt;
With the addition of [[SOLVE]], [[SOLVER]] and [[OPTION]] statements to the ASCEND language, we now have a way to specify all the necessary parameters for most of the ASCEND solvers like [[QRSlv]], [[IPOPT]] and others. However, this implementation doesn&#039;t work with our [[ODE]]/[[DAE]] solvers like [[LSODE]] and [[IDA]]. This project would involve extending the ASCEND language in a way that dynamic models could be easily initialised and solved using statements in [[METHOD]] syntax. A careful review of the [[OPTION]] syntax is also required, as it appears that in some cases the current approach fails to pass through parameters if the solver has already been connected to the system. There is no tough mathematics involved in this project; mostly it&#039;s about data structures and information-passing, but efficient software design will be very important.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]]&lt;br /&gt;
* Very helpful: experience on a large software project (or software engineering studies)&lt;br /&gt;
* Level of difficulty: Medium/high&lt;br /&gt;
* Languages: C, Python&lt;br /&gt;
&lt;br /&gt;
== Automated connector routing for the canvas-based modeller ==&lt;br /&gt;
&lt;br /&gt;
When working on big simulation models, line routing can be annoying and tedious, but with a sufficiently clever constraint-based solver, algorithms can be used to automate the task, leaving only minor tweaking required to complete a diagram. Our collaborator on the [[canvas-based_modeller_for_ASCEND|canvas-based modeller]], [[Arjan Molenaar]], [https://github.com/amolenaar/adaptagrams has been working] to integrate Michael Wybrow&#039;s [http://adaptagrams.sourceforge.net/ adaptagrams] library into Gaphas, to add support for automatic line routing. At this stage he has got partial Python bindings for the needed parts of adaptagrams, but not plan yet exists for how that will be incorporated into Gaphas or thence to our canvas-based modeller. This project would require someone with good Python skills to work in Gaphas as well as ASCEND to development this functionality.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]] and Arjan Molenaar would hopefully help out as an informal mentor&lt;br /&gt;
* Level of difficulty: Medium&lt;br /&gt;
* Priority: Medium&lt;br /&gt;
* Languages: C&lt;br /&gt;
&lt;br /&gt;
== Bug Squashing ==&lt;br /&gt;
&lt;br /&gt;
We&#039;ve got a [http://ascendbugs.cheme.cmu.edu/ big long list] of bugs and feature requests (as well as [http://ascendbugs.cheme.cmu.edu/roadmap_page.php a shortlist]) that a student could certainly work on with success. Many of the bugs can be fairly easily fixed and just need a little time. Someone with the right C/C++/Python programming background plus understanding on numerical methods and hopefully some understanding of compiler design and/or GUI design could really make a difference for us.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]]&lt;br /&gt;
* Level of difficulty: variable, depends on the bugs you choose to fix&lt;br /&gt;
* Must know: numerical methods&lt;br /&gt;
* Languages: primarily C, and then possibly Python, C++, Flex/Bison, SWIG, Tcl/Tk, PyGTK,...&lt;br /&gt;
* Priority: Medium/High&lt;br /&gt;
&lt;br /&gt;
== Persistence of modelling results ==&lt;br /&gt;
&lt;br /&gt;
Currently, ASCEND models are loaded and solved afresh each time. But sometimes, it can take a bit of fiddling to achieve solution of a model. In these cases, it would be useful to be able to save the model state and load it again into ASCEND. A coherent proposal for how to do this needs to be prepared, in discussion with the ASCEND team, by a student who would like to work in this area. Because this task involved loading and saving model state, it is proposed that it could also incorporate more general data export functionality, eg to export whole/partial model results to a CSV or tab-delimited file, for use with other tools. How this system would work with &#039;observers&#039; and &#039;integrator&#039; output is an open question. See also [[Saving and restoring model state]]. Especially important that the design of this component would work nicely with the new [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]]&lt;br /&gt;
* Level of difficulty: Low-medium&lt;br /&gt;
* Languages: C, Python, possibly some Tcl.&lt;br /&gt;
* Priority: Medium&lt;br /&gt;
&lt;br /&gt;
== Packaging for Mac ==&lt;br /&gt;
&lt;br /&gt;
We want to get ASCEND working for Mac! We previously did a lot of the work (see [[Porting to Mac]]), but since then Python3 and GTK3 have become commonplace, and we also need to develop an ASCEND bundle/installer/disk-image that feels nice and Mac-ish, but doesn&#039;t cause too much disruption to the overall codebase. One key challenge is to provide suitable Apple Event bindings so that models can be opened using the ASCEND GUI. &lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]], [[Art Westerberg]]&lt;br /&gt;
* Level of difficulty: low-medium&lt;br /&gt;
* Priority: Medium&lt;br /&gt;
* Languages: Python, C, and a fair bit of general Mac OSX knowhow&lt;br /&gt;
&lt;br /&gt;
== New Compiler ==&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve got a strong background or interest in designing parsers/lexers/compilers, we&#039;d be interested to discuss possible ways to write a new compiler for the ASCEND language. The original ASCEND compiler uses Flex/Bison, but perhaps we can make something more efficient and easier to maintain using more modern tools, perhaps such as ANTLR. See also [[New Compiler]]&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[Ben Allan]], [[John Pye]]&lt;br /&gt;
* Level of difficulty: very high&lt;br /&gt;
* Languages: flexible, would need to interface with current instance hierarchy C code&lt;br /&gt;
* Priority: Medium&lt;br /&gt;
&lt;br /&gt;
== Model Export Engine Experiments (MEEE!) ==&lt;br /&gt;
&lt;br /&gt;
A number of the other projects on this page are concerned with converting a model into some format appropriate for use with another tool.  There are actually two kinds of objects both ambiguously known as ASCEND models:&lt;br /&gt;
&lt;br /&gt;
* an ascend TypeDescription: a list of statements that must be interpreted somehow to derive a data tree (Instance) in memory.&lt;br /&gt;
* an Instance data tree (which, in principle, may contain references to unexecuted statements from the TypeDescription or may be &#039;completed&#039;).&lt;br /&gt;
&lt;br /&gt;
Potential approaches:&lt;br /&gt;
&lt;br /&gt;
* Conversion of C TypeDescriptions to equivalent classes in some other language is the most general form of model reuse, but requires careful implementation of the conversion operation. A general solution would be to create, or expose in a convenient form, visitor functionality over a self-consistent list of related TypeDescriptions for type-translation plugins to convert to other languages. In the compiler science world, the ascend TD is most related to an AST.&lt;br /&gt;
* Conversion of ascend model source via an independent parser to another language. This approach &#039;reinvents&#039; the ASCEND AST and grammar, but may then be much more translator friendly-- e.g. Java or other tools could be used for implementation with no direct reference to the existing C code base.&lt;br /&gt;
* Define a visitor API for conversion of instance data structures to classes in other languages. These classes may or may not look anything like the original object-oriented models. Note that conversions of this sort to flat-file data storage formats (for reloading in ascend later) and to object-free (flat) modeling languages are in the ascend code base already.&lt;br /&gt;
&lt;br /&gt;
See also: Persistence, Openoffice below.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[Ben Allan]], [[John Pye]]&lt;br /&gt;
* Level of difficulty: medium&lt;br /&gt;
* Language: C / ANTLR / others&lt;br /&gt;
* Priority: Medium/Low&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Internationalisation ==&lt;br /&gt;
&lt;br /&gt;
ASCEND has some bugs when used in locales that use the comma &#039;,&#039; as the decimal point separator. Furthermore, its user interface is in english only, with the exception of some standard menus that GTK+ provides translations for. This project would work towards internationalising ASCEND, starting with solving the decimal point problem, then translating the Python GUI, then moving on into the C library part of ASCEND. It would not be intended that the modelling language itself would be translated, though, nor would the decimal point separator in model files change from the default &amp;quot;.&amp;quot; -- the same model files need to work for everyone.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]]&lt;br /&gt;
* Level of difficulty: low&lt;br /&gt;
* Languages: Python, C&lt;br /&gt;
* Priority: Low&lt;br /&gt;
&lt;br /&gt;
== Your Own Ideas ==&lt;br /&gt;
&lt;br /&gt;
There are many other areas of possible work on ASCEND, including those from our long list of current and future [[Development Activities]]. Feel free to discuss other possible ideas with us!&lt;br /&gt;
&lt;br /&gt;
* Contact person: write to the &#039;users&#039; mailing list (see [[Support]]).&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5915</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5915"/>
		<updated>2017-10-11T07:31:29Z</updated>

		<summary type="html">&lt;p&gt;Mike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han ([https://en.wikipedia.org/wiki/Chinese_characters 韩腾达]) (Mike) &lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: tengda.han@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I did [[GSOC2016]] for ASCEND. I optimized GUI of Canvas, fixed bugs, developed canvas models and improved canvas language.  &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* How to use &#039;inout&#039; port: (see {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}} for detail)[[File:canvas_inout.png|thumb|alt=&#039;Inout&#039; port is available in canvas|Connecting &#039;inout&#039; port in canvas]]&lt;br /&gt;
** The resistor_basic model has normal &#039;inlet&#039; and &#039;outlet&#039; port. But the Ground model only has &#039;inout&#039; port, which can be connected with any kinds of ports in canvas. The definition of &#039;inout&#039; port is exactly the same as &#039;inlet&#039; or &#039;outlet&#039; ports. Part of the code is shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=a4c&amp;gt;&lt;br /&gt;
 MODEL Ground;&lt;br /&gt;
 	NOTES&lt;br /&gt;
 		&#039;block&#039; SELF {Ground}&lt;br /&gt;
 		&#039;icon&#039; SELF {ground.png}&lt;br /&gt;
 		&#039;graphic&#039; SELF {5,0-5,5&lt;br /&gt;
 			0,5-10,5&lt;br /&gt;
 			2,7-8,7&lt;br /&gt;
 			4,9-6,9}&lt;br /&gt;
 		&#039;port_inout&#039; SELF {inout:5,0}&lt;br /&gt;
 	END NOTES;&lt;br /&gt;
 	inout &amp;quot;inout:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 	inout.V = 0 {volt};&lt;br /&gt;
 END Ground;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Piping system introduction:&lt;br /&gt;
&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:canvas_GUI.png|Canvas GUI&lt;br /&gt;
File:canvas_inout.png|&#039;Inout&#039; port is available in canvas&lt;br /&gt;
File:canvas_basic_elec.png|Basic electronic circuit simulation&lt;br /&gt;
File:canvas_block_properties.png|Block equation can be viewed from &#039;block properties&#039;&lt;br /&gt;
File:canvas_quit_confirm.png|Warning dialog before quitting canvas&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=Student_projects&amp;diff=5892</id>
		<title>Student projects</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=Student_projects&amp;diff=5892"/>
		<updated>2017-02-25T08:57:07Z</updated>

		<summary type="html">&lt;p&gt;Mike: /* Graphical flowsheet editor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to [[Main Page|ASCEND]]! You might want to read our [[ASCEND overview|overview]] to learn a bit about our project, or read about our more general [[Development Activities]]. This page gives a long list of possible student projects with our project, which means potential [[GSOC2017]] projects, or possibly undergrad or post-grad research projects, such as for engineering final-year students. Our contact details are [[Support|here]]. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Last updated Feb 2017.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= Recommended projects =&lt;br /&gt;
&lt;br /&gt;
We have assigned &#039;&#039;&#039;priorities&#039;&#039;&#039; to these projects. All things being equal, we will choose students who propose high-priority projects. However, all things are not equal; if we receive a very strong proposal from a student who has done lots of preparatory work, then we will probably choose that student over a lower-quality proposal for a higher-priority project.&lt;br /&gt;
&lt;br /&gt;
== Graphical flowsheet editor ==&lt;br /&gt;
&lt;br /&gt;
Similar to the flowsheet editor in chemical process modelling software such as ASPEN, ASCEND has a [[canvas-based_modeller_for_ASCEND|Canvas-based modeller]] which is currently in development, and not yet quite usable. We would like to push this nice new interface closer to usability. The next step in the implementation, be believe, is to implement proper &#039;connector&#039; logic, including annotation which which variables should be connected in a &#039;potential&#039; sense (eg voltage, temperature), and which which should be connected in a &#039;flow&#039; sense (eg current, energy). Connectors should be able to connect a number of related variables at once. Also it would be good to present documents/tutorials to users for solving practical problems. Before going ahead with this project, we would like to discuss implementation details with interested students.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]], [[User:Mike|Tengda (Mike) Han]]&lt;br /&gt;
* Level of difficulty: Medium&lt;br /&gt;
* Priority: Medium/High&lt;br /&gt;
* Languages: Python, possibly a small amount of C/C++&lt;br /&gt;
* Also useful: Cairo/PyGTK/PyGI, design patterns for GUI programming&lt;br /&gt;
&lt;br /&gt;
== Parallel optimisation solvers for ASCEND ==&lt;br /&gt;
&lt;br /&gt;
We would like to develop optimisation solvers for ASCEND using particle swarm optimisation (PSO) or a hybrid of PSO with gradient-based Newton solver methods. Such methods are amenable to parallelisation, and should be considerably faster for certain kinds of models with modern hardware. Connecting to an existing open-source solver would be preferred, but only if it makes good sense architecturally. Before starting, we would like to discuss possible implementation approaches. It&#039;s important to note that current ASCEND is not thread-safe, so care may be required depending on the approach that is taken.&lt;br /&gt;
&lt;br /&gt;
* Contact: [[John Pye]], [[Ben Allan]]&lt;br /&gt;
* Languages: C&lt;br /&gt;
* Difficulty: Medium-High&lt;br /&gt;
* Priority: High&lt;br /&gt;
&lt;br /&gt;
== FPROPS ==&lt;br /&gt;
&lt;br /&gt;
Our [[FPROPS]] fluid properties library within ASCEND is used to calculate the properties of pure fluids (enthalpy, pressure, temperature, density, viscosity, conductivity, etc) with high accuracy. We would like to extend its capabilites in various ways: (1) add support for mixtures, (2) add support for more equations of state, especially cubic equations of state such as Redlich-Kwong and others, (3) add support for incompressible liquids, (4) add support for humid air calculations, (4) demonstrate its use in flash, heat exchanger and reactor models in ASCEND. This project requires someone with background in engineering thermodynamics (for example, having studied the [http://www.amazon.com/dp/0471661740 Sandler book] or similar), because the theory from that book is a necessary starting point for the projct.&lt;br /&gt;
&lt;br /&gt;
* Contact: [[Mahesh Venkataraman]], [[John Pye]], [[Krishnan Chittur]]&lt;br /&gt;
* Languages: C and maybe a small amount of Python&lt;br /&gt;
* Must know: engineering thermodynamics (eg the [http://www.amazon.com/dp/0471661740 Sandler book])&lt;br /&gt;
* Difficult: Medium&lt;br /&gt;
* Priority: High&lt;br /&gt;
&lt;br /&gt;
== Gibbs equilibrium reactor model ==&lt;br /&gt;
&lt;br /&gt;
We would like to implement a robust tool for calculating reaction equilibrium using Gibbs free energy minimisation. This needs to be done in a way that is compatible with the ASCEND approach to declaring [[MODEL]]s etc., and should make use of [[FPROPS]] for the calculation of the properties of each component. We have some sample code in MATLAB; a first step might be to convert that code to C and connect it to FPROPS. We will need to simultaneously discuss how to interface to the code to ASCEND so that it can be used in the context of flexible modelling of chemical process flowsheets.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[Mahesh Venkataraman]], [[John Pye]]&lt;br /&gt;
* Level of difficulty: Medium&lt;br /&gt;
* Must know: engineering thermodynamics (eg the [http://www.amazon.com/dp/0471661740 Sandler book])&lt;br /&gt;
* Priority: Medium/High&lt;br /&gt;
* Languages: C&lt;br /&gt;
&lt;br /&gt;
== CAPE-OPEN thermodynamics ==&lt;br /&gt;
&lt;br /&gt;
[http://www.colan.org/ CAPE-OPEN] is a well-documented API for evaluating thermodynamic properties of mixtures, running flash calculations, etc, which exists in the chemical process simulation community. In this project, we&#039;d like to develop a first proof-of-concept integration of CAPE-OPEN into ASCEND. It is suggested that we might use the CAPE-OPEN thermodynamics library provided by [http://dwsim.inforside.com.br/wiki/index.php?title=CAPE-OPEN the DWSIM project], although other possibilities exist. Importantly, we need this approach to work on Linux as well as Windows, and this may complicate matters. However, on the whole, it should be possible to achieve this integration in a relatively straightforward way using our support for external functions (eg see [[writing ASCEND external relations in C]]). Having CAPE-OPEN support with greatly increase ASCEND&#039;s access to range of high-quality thermodynamic property engines, which would be very helpful in improving the usefulness of our code.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]], [[Mahesh Venkataraman]], [[Krishnan Chittur]]&lt;br /&gt;
* Level of difficulty: Medium (/ Low?)&lt;br /&gt;
* Must know: chemical engineering thermodynamics (eg the [http://www.amazon.com/dp/0471661740 Sandler book])&lt;br /&gt;
* Priority: Medium/High&lt;br /&gt;
* Languages: C, possibly others for &#039;gluing&#039; to the CAPE-OPEN DLLs/COM objects&lt;br /&gt;
&lt;br /&gt;
== Dynamic modelling improvements ==&lt;br /&gt;
&lt;br /&gt;
This project would build on the progress with [[dynamic modelling]] by [[User:Ksenija|Ksenija]] in GSOC2012-2013. We would like to improve our new [[EVENT]] syntax and extend its support to a range of problem types not yet supported, such as periodic events, and make further changes to the ASCEND language to make dynamic modelling more &#039;natural&#039;. We would like to work on the efficiency of the [[ODE]]/[[DAE]] engines, to ensure that integrator restarts after boundaries are as efficient as possible.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]]&lt;br /&gt;
* Level of difficulty: High&lt;br /&gt;
* Priority: High&lt;br /&gt;
* Must know: numerical methods&lt;br /&gt;
* Languages: C, plus possibly some use of lex/yacc&lt;br /&gt;
&lt;br /&gt;
== Debugging tools for DAE modelling ==&lt;br /&gt;
&lt;br /&gt;
We would like to implement tools that make it easier to determine degrees-of-freedom problems for initial value problems, and possibly implement index reduction into ASCEND. One possible algorithm is that by Soares and Secchi (see [http://cepac.cheme.cmu.edu/pasi2011/library/secchi/Soares_Secchi_Dycops-2007_p217.pdf Soares_Secchi_Dycops-2007] or (somewhat different) {{doi|10.1016/S1570-7946(07)80063-0}}).&lt;br /&gt;
&lt;br /&gt;
* Contact person [[John Pye]]&lt;br /&gt;
* Level of difficulty: High&lt;br /&gt;
* Priority: Medium&lt;br /&gt;
* Must know: numerical methods, differential equations, graph theory&lt;br /&gt;
* Languages: C&lt;br /&gt;
&lt;br /&gt;
== Improvements to the Conditional Modelling syntax ==&lt;br /&gt;
&lt;br /&gt;
ASCEND provides support for [[Conditional modelling]] in the form of language constructs and a solver called [[CMSlv]]. Unfortunately the syntax available for conditional modelling is unintuitive. It could be improved by a student willing to delve into the dark corners of the ASCEND compiler and willing to learn about the Flex and Bison parser/compiler tools. Further work on this project could include a rigorous test-suite to demonstrate that all aspects of the conditional model parser and corresponding solver are working OK. Additional further might include enhancements to the graphical interface to make it more obvious to the user when parts of the model are switched on and off as a result of changes in IF or WHEN statements, or alternatively completion of the conditional modelling support for the dynamic modelling solver [[IDA]]. This is another item that would benefit from a [[New Compiler]] effort.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]], [[Art Westerberg]]&lt;br /&gt;
* Level of difficulty: medium&lt;br /&gt;
* Priority: High&lt;br /&gt;
* Languages: Flex/Bison, C&lt;br /&gt;
&lt;br /&gt;
= Other projects =&lt;br /&gt;
&lt;br /&gt;
The following list contains a range of projects that we consider either harder to tackle, or lower priority, or which require very particular skills.&lt;br /&gt;
&lt;br /&gt;
== Python bindings rewrite ==&lt;br /&gt;
&lt;br /&gt;
We would like to review and improve the way that ASCEND accesses its low-level C functionality from Python. Currently this is done via C++ using the [http://www.swig.org SWIG] interface generator. Our preference is probably to keep using SWIG, but to eliminate the C++ layer. Alternatively, a different type of interfacing tool like Cython could be used instead. The new wrapping/langugage bindings would need to be tested via a set of test suites, and program examples in Python provided. It would not be necessary to translate the GUI code to use this new wrapper, although that would certainly be desirable.&lt;br /&gt;
&lt;br /&gt;
* Contact: [[John Pye]]&lt;br /&gt;
* Languages: C, Python, C++, SWIG&lt;br /&gt;
* Difficulty: Medium&lt;br /&gt;
* Priority: Medium&lt;br /&gt;
&lt;br /&gt;
== MSYS2 ==&lt;br /&gt;
&lt;br /&gt;
We would like to implement a new build process for ASCEND for Windows, based on the use of  [https://msys2.github.io/ MSYS2]. MSYS2 is a command-line environment similar to Linux. It offers the usual GCC compilers etc, plus a package manager with pre-compiled versions of many of our dependency libraries and tools. This project would require (1) modifying current SCons build files so that they work correctly with MSYS2 (compared to older MSYS), (2) ensuring that all required dependencies are also available in MSYS2 and (3) producing a new installer for ASCEND, by updating our current NSIS-based scripts, that makes use of the MSYS2 binaries built in 1 and 2.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]]&lt;br /&gt;
* Languages: Python, C, NSIS&lt;br /&gt;
* Must know: usability principles&lt;br /&gt;
* Level of difficulty: Low/Medium&lt;br /&gt;
* Priority: High&lt;br /&gt;
&lt;br /&gt;
== GTK3/Python3 ==&lt;br /&gt;
&lt;br /&gt;
We have already done quite a bit of work (eg [[User:Adrian]]) on adapting ASCEND to work with GTK3 (PyGI, PyGTK3). Next we need to update ASCEND so that it works correctly with Python3. This will require some work using SWIG to update our Python wrapper to work with Python3. It will also require some changes to the Python GUI (code in {{srcdir|pygtk}}. Finally, it is very important to check that the build and install processes work correctly with Python3 on both Windows and Linux as a minimum.&lt;br /&gt;
&lt;br /&gt;
* Contact: [[John Pye]]&lt;br /&gt;
* Languages: Python, SWIG, possibly some C/C++.&lt;br /&gt;
* Difficulty: Low/Medium&lt;br /&gt;
* Priority: High&lt;br /&gt;
&lt;br /&gt;
== Automated parameter-setting for dynamic models ==&lt;br /&gt;
&lt;br /&gt;
With the addition of [[SOLVE]], [[SOLVER]] and [[OPTION]] statements to the ASCEND language, we now have a way to specify all the necessary parameters for most of the ASCEND solvers like [[QRSlv]], [[IPOPT]] and others. However, this implementation doesn&#039;t work with our [[ODE]]/[[DAE]] solvers like [[LSODE]] and [[IDA]]. This project would involve extending the ASCEND language in a way that dynamic models could be easily initialised and solved using statements in [[METHOD]] syntax. A careful review of the [[OPTION]] syntax is also required, as it appears that in some cases the current approach fails to pass through parameters if the solver has already been connected to the system. There is no tough mathematics involved in this project; mostly it&#039;s about data structures and information-passing, but efficient software design will be very important.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]]&lt;br /&gt;
* Very helpful: experience on a large software project (or software engineering studies)&lt;br /&gt;
* Level of difficulty: Medium/high&lt;br /&gt;
* Languages: C, Python&lt;br /&gt;
&lt;br /&gt;
== Automated connector routing for the canvas-based modeller ==&lt;br /&gt;
&lt;br /&gt;
When working on big simulation models, line routing can be annoying and tedious, but with a sufficiently clever constraint-based solver, algorithms can be used to automate the task, leaving only minor tweaking required to complete a diagram. Our collaborator on the [[canvas-based_modeller_for_ASCEND|canvas-based modeller]], [[Arjan Molenaar]], [https://github.com/amolenaar/adaptagrams has been working] to integrate Michael Wybrow&#039;s [http://adaptagrams.sourceforge.net/ adaptagrams] library into Gaphas, to add support for automatic line routing. At this stage he has got partial Python bindings for the needed parts of adaptagrams, but not plan yet exists for how that will be incorporated into Gaphas or thence to our canvas-based modeller. This project would require someone with good Python skills to work in Gaphas as well as ASCEND to development this functionality.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]] and Arjan Molenaar would hopefully help out as an informal mentor&lt;br /&gt;
* Level of difficulty: Medium&lt;br /&gt;
* Priority: Medium&lt;br /&gt;
* Languages: C&lt;br /&gt;
&lt;br /&gt;
== Bug Squashing ==&lt;br /&gt;
&lt;br /&gt;
We&#039;ve got a [http://ascendbugs.cheme.cmu.edu/ big long list] of bugs and feature requests (as well as [http://ascendbugs.cheme.cmu.edu/roadmap_page.php a shortlist]) that a student could certainly work on with success. Many of the bugs can be fairly easily fixed and just need a little time. Someone with the right C/C++/Python programming background plus understanding on numerical methods and hopefully some understanding of compiler design and/or GUI design could really make a difference for us.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]]&lt;br /&gt;
* Level of difficulty: variable, depends on the bugs you choose to fix&lt;br /&gt;
* Must know: numerical methods&lt;br /&gt;
* Languages: primarily C, and then possibly Python, C++, Flex/Bison, SWIG, Tcl/Tk, PyGTK,...&lt;br /&gt;
* Priority: Medium/High&lt;br /&gt;
&lt;br /&gt;
== Persistence of modelling results ==&lt;br /&gt;
&lt;br /&gt;
Currently, ASCEND models are loaded and solved afresh each time. But sometimes, it can take a bit of fiddling to achieve solution of a model. In these cases, it would be useful to be able to save the model state and load it again into ASCEND. A coherent proposal for how to do this needs to be prepared, in discussion with the ASCEND team, by a student who would like to work in this area. Because this task involved loading and saving model state, it is proposed that it could also incorporate more general data export functionality, eg to export whole/partial model results to a CSV or tab-delimited file, for use with other tools. How this system would work with &#039;observers&#039; and &#039;integrator&#039; output is an open question. See also [[Saving and restoring model state]]. Especially important that the design of this component would work nicely with the new [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]]&lt;br /&gt;
* Level of difficulty: Low-medium&lt;br /&gt;
* Languages: C, Python, possibly some Tcl.&lt;br /&gt;
* Priority: Medium&lt;br /&gt;
&lt;br /&gt;
== Packaging for Mac ==&lt;br /&gt;
&lt;br /&gt;
We want to get ASCEND working for Mac! We previously did a lot of the work (see [[Porting to Mac]]), but since then Python3 and GTK3 have become commonplace, and we also need to develop an ASCEND bundle/installer/disk-image that feels nice and Mac-ish, but doesn&#039;t cause too much disruption to the overall codebase. One key challenge is to provide suitable Apple Event bindings so that models can be opened using the ASCEND GUI. &lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]], [[Art Westerberg]]&lt;br /&gt;
* Level of difficulty: low-medium&lt;br /&gt;
* Priority: Medium&lt;br /&gt;
* Languages: Python, C, and a fair bit of general Mac OSX knowhow&lt;br /&gt;
&lt;br /&gt;
== New Compiler ==&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve got a strong background or interest in designing parsers/lexers/compilers, we&#039;d be interested to discuss possible ways to write a new compiler for the ASCEND language. The original ASCEND compiler uses Flex/Bison, but perhaps we can make something more efficient and easier to maintain using more modern tools, perhaps such as ANTLR. See also [[New Compiler]]&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[Ben Allan]], [[John Pye]]&lt;br /&gt;
* Level of difficulty: very high&lt;br /&gt;
* Languages: flexible, would need to interface with current instance hierarchy C code&lt;br /&gt;
* Priority: Medium&lt;br /&gt;
&lt;br /&gt;
== Model Export Engine Experiments (MEEE!) ==&lt;br /&gt;
&lt;br /&gt;
A number of the other projects on this page are concerned with converting a model into some format appropriate for use with another tool.  There are actually two kinds of objects both ambiguously known as ASCEND models:&lt;br /&gt;
&lt;br /&gt;
* an ascend TypeDescription: a list of statements that must be interpreted somehow to derive a data tree (Instance) in memory.&lt;br /&gt;
* an Instance data tree (which, in principle, may contain references to unexecuted statements from the TypeDescription or may be &#039;completed&#039;).&lt;br /&gt;
&lt;br /&gt;
Potential approaches:&lt;br /&gt;
&lt;br /&gt;
* Conversion of C TypeDescriptions to equivalent classes in some other language is the most general form of model reuse, but requires careful implementation of the conversion operation. A general solution would be to create, or expose in a convenient form, visitor functionality over a self-consistent list of related TypeDescriptions for type-translation plugins to convert to other languages. In the compiler science world, the ascend TD is most related to an AST.&lt;br /&gt;
* Conversion of ascend model source via an independent parser to another language. This approach &#039;reinvents&#039; the ASCEND AST and grammar, but may then be much more translator friendly-- e.g. Java or other tools could be used for implementation with no direct reference to the existing C code base.&lt;br /&gt;
* Define a visitor API for conversion of instance data structures to classes in other languages. These classes may or may not look anything like the original object-oriented models. Note that conversions of this sort to flat-file data storage formats (for reloading in ascend later) and to object-free (flat) modeling languages are in the ascend code base already.&lt;br /&gt;
&lt;br /&gt;
See also: Persistence, Openoffice below.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[Ben Allan]], [[John Pye]]&lt;br /&gt;
* Level of difficulty: medium&lt;br /&gt;
* Language: C / ANTLR / others&lt;br /&gt;
* Priority: Medium/Low&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Internationalisation ==&lt;br /&gt;
&lt;br /&gt;
ASCEND has some bugs when used in locales that use the comma &#039;,&#039; as the decimal point separator. Furthermore, its user interface is in english only, with the exception of some standard menus that GTK+ provides translations for. This project would work towards internationalising ASCEND, starting with solving the decimal point problem, then translating the Python GUI, then moving on into the C library part of ASCEND. It would not be intended that the modelling language itself would be translated, though, nor would the decimal point separator in model files change from the default &amp;quot;.&amp;quot; -- the same model files need to work for everyone.&lt;br /&gt;
&lt;br /&gt;
* Contact person: [[John Pye]]&lt;br /&gt;
* Level of difficulty: low&lt;br /&gt;
* Languages: Python, C&lt;br /&gt;
* Priority: Low&lt;br /&gt;
&lt;br /&gt;
== Your Own Ideas ==&lt;br /&gt;
&lt;br /&gt;
There are many other areas of possible work on ASCEND, including those from our long list of current and future [[Development Activities]]. Feel free to discuss other possible ideas with us!&lt;br /&gt;
&lt;br /&gt;
* Contact person: write to the &#039;users&#039; mailing list (see [[Support]]).&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5867</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5867"/>
		<updated>2016-08-31T03:41:18Z</updated>

		<summary type="html">&lt;p&gt;Mike: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han ([https://en.wikipedia.org/wiki/Chinese_characters 韩腾达]) (Mike) &lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I did [[GSOC2016]] for ASCEND. I optimized GUI of Canvas, fixed bugs, developed canvas models and improved canvas language.  &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* How to use &#039;inout&#039; port: (see {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}} for detail)[[File:canvas_inout.png|thumb|alt=&#039;Inout&#039; port is available in canvas|Connecting &#039;inout&#039; port in canvas]]&lt;br /&gt;
** The resistor_basic model has normal &#039;inlet&#039; and &#039;outlet&#039; port. But the Ground model only has &#039;inout&#039; port, which can be connected with any kinds of ports in canvas. The definition of &#039;inout&#039; port is exactly the same as &#039;inlet&#039; or &#039;outlet&#039; ports. Part of the code is shown below:&lt;br /&gt;
 MODEL Ground;&lt;br /&gt;
 	NOTES&lt;br /&gt;
 		&#039;block&#039; SELF {Ground}&lt;br /&gt;
 		&#039;icon&#039; SELF {ground.png}&lt;br /&gt;
 		&#039;graphic&#039; SELF {5,0-5,5&lt;br /&gt;
 			0,5-10,5&lt;br /&gt;
 			2,7-8,7&lt;br /&gt;
 			4,9-6,9}&lt;br /&gt;
 		&#039;port_inout&#039; SELF {inout:5,0}&lt;br /&gt;
 	END NOTES;&lt;br /&gt;
 	inout &amp;quot;inout:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 	inout.V = 0 {volt};&lt;br /&gt;
 END Ground;&lt;br /&gt;
* Piping system introduction:&lt;br /&gt;
&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:canvas_GUI.png|Canvas GUI&lt;br /&gt;
File:canvas_inout.png|&#039;Inout&#039; port is available in canvas&lt;br /&gt;
File:canvas_basic_elec.png|Basic electronic circuit simulation&lt;br /&gt;
File:canvas_block_properties.png|Block equation can be viewed from &#039;block properties&#039;&lt;br /&gt;
File:canvas_quit_confirm.png|Warning dialog before quitting canvas&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5866</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5866"/>
		<updated>2016-08-31T03:09:18Z</updated>

		<summary type="html">&lt;p&gt;Mike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han ([https://en.wikipedia.org/wiki/Chinese_characters 韩腾达]) (Mike) &lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I did [[GSOC2016]] for ASCEND. I optimized GUI of Canvas, fixed bugs, developed canvas models and improved canvas language.  &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* How to use &#039;inout&#039; port: (see {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}} for detail)[[File:canvas_inout.png|thumb|alt=&#039;Inout&#039; port is available in canvas|Connecting &#039;inout&#039; port in canvas]]&lt;br /&gt;
** The resistor_basic model has normal &#039;inlet&#039; and &#039;outlet&#039; port. But the Ground model only has &#039;inout&#039; port, which can be connected with any kinds of ports in canvas. The definition of &#039;inout&#039; port is exactly the same as &#039;inlet&#039; or &#039;outlet&#039; ports. Part of the code is shown below:&lt;br /&gt;
 MODEL Ground;&lt;br /&gt;
 	NOTES&lt;br /&gt;
 		&#039;block&#039; SELF {Ground}&lt;br /&gt;
 		&#039;icon&#039; SELF {ground.png}&lt;br /&gt;
 		&#039;graphic&#039; SELF {5,0-5,5&lt;br /&gt;
 			0,5-10,5&lt;br /&gt;
 			2,7-8,7&lt;br /&gt;
 			4,9-6,9}&lt;br /&gt;
 		&#039;port_inout&#039; SELF {inout:5,0}&lt;br /&gt;
 	END NOTES;&lt;br /&gt;
 	inout &amp;quot;inout:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 	inout.V = 0 {volt};&lt;br /&gt;
 END Ground;&lt;br /&gt;
* Piping system introduction:&lt;br /&gt;
&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:canvas_GUI.png|Canvas GUI&lt;br /&gt;
File:canvas_inout.png|&#039;Inout&#039; port is available in canvas&lt;br /&gt;
File:canvas_basic_elec.png|Basic electronic circuit simulation&lt;br /&gt;
File:canvas_block_properties.png|Block equation can be viewed from &#039;block properties&#039;&lt;br /&gt;
File:canvas_quit_confirm.png|Warning dialog before quitting canvas is added&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5865</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5865"/>
		<updated>2016-08-31T03:05:01Z</updated>

		<summary type="html">&lt;p&gt;Mike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han ([https://en.wikipedia.org/wiki/Chinese_characters 韩腾达]) (Mike) &lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* How to use &#039;inout&#039; port: (see {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}} for detail)[[File:canvas_inout.png|thumb|alt=&#039;Inout&#039; port is available in canvas|Connecting &#039;inout&#039; port in canvas]]&lt;br /&gt;
** The resistor_basic model has normal &#039;inlet&#039; and &#039;outlet&#039; port. But the Ground model only has &#039;inout&#039; port, which can be connected with any kinds of ports in canvas. The definition of &#039;inout&#039; port is exactly the same as &#039;inlet&#039; or &#039;outlet&#039; ports. Part of the code is shown below:&lt;br /&gt;
 MODEL Ground;&lt;br /&gt;
 	NOTES&lt;br /&gt;
 		&#039;block&#039; SELF {Ground}&lt;br /&gt;
 		&#039;icon&#039; SELF {ground.png}&lt;br /&gt;
 		&#039;graphic&#039; SELF {5,0-5,5&lt;br /&gt;
 			0,5-10,5&lt;br /&gt;
 			2,7-8,7&lt;br /&gt;
 			4,9-6,9}&lt;br /&gt;
 		&#039;port_inout&#039; SELF {inout:5,0}&lt;br /&gt;
 	END NOTES;&lt;br /&gt;
 	inout &amp;quot;inout:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 	inout.V = 0 {volt};&lt;br /&gt;
 END Ground;&lt;br /&gt;
* Piping system introduction:&lt;br /&gt;
&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:canvas_GUI.png|Canvas GUI&lt;br /&gt;
File:canvas_inout.png|&#039;Inout&#039; port is available in canvas&lt;br /&gt;
File:canvas_basic_elec.png|Basic electronic circuit simulation&lt;br /&gt;
File:canvas_block_properties.png|Block equation can be viewed from &#039;block properties&#039;&lt;br /&gt;
File:canvas_quit_confirm.png|Warning dialog before quitting canvas is added&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5864</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5864"/>
		<updated>2016-08-31T03:02:55Z</updated>

		<summary type="html">&lt;p&gt;Mike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han (韩腾达) (Mike) &lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* How to use &#039;inout&#039; port: (see {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}} for detail)[[File:canvas_inout.png|thumb|alt=&#039;Inout&#039; port is available in canvas|Connecting &#039;inout&#039; port in canvas]]&lt;br /&gt;
** The resistor_basic model has normal &#039;inlet&#039; and &#039;outlet&#039; port. But the Ground model only has &#039;inout&#039; port, which can be connected with any kinds of ports in canvas. The definition of &#039;inout&#039; port is exactly the same as &#039;inlet&#039; or &#039;outlet&#039; ports. Part of the code is shown below:&lt;br /&gt;
 MODEL Ground;&lt;br /&gt;
 	NOTES&lt;br /&gt;
 		&#039;block&#039; SELF {Ground}&lt;br /&gt;
 		&#039;icon&#039; SELF {ground.png}&lt;br /&gt;
 		&#039;graphic&#039; SELF {5,0-5,5&lt;br /&gt;
 			0,5-10,5&lt;br /&gt;
 			2,7-8,7&lt;br /&gt;
 			4,9-6,9}&lt;br /&gt;
 		&#039;port_inout&#039; SELF {inout:5,0}&lt;br /&gt;
 	END NOTES;&lt;br /&gt;
 	inout &amp;quot;inout:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 	inout.V = 0 {volt};&lt;br /&gt;
 END Ground;&lt;br /&gt;
* Piping system introduction:&lt;br /&gt;
&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:canvas_GUI.png|Canvas GUI&lt;br /&gt;
File:canvas_inout.png|&#039;Inout&#039; port is available in canvas&lt;br /&gt;
File:canvas_basic_elec.png|Basic electronic circuit simulation&lt;br /&gt;
File:canvas_block_properties.png|Block equation can be viewed from &#039;block properties&#039;&lt;br /&gt;
File:canvas_quit_confirm.png|Warning dialog before quitting canvas is added&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5863</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5863"/>
		<updated>2016-08-31T03:01:23Z</updated>

		<summary type="html">&lt;p&gt;Mike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han (Mike) (韩腾达)&lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* How to use &#039;inout&#039; port: (see {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}} for detail)[[File:canvas_inout.png|thumb|alt=&#039;Inout&#039; port is available in canvas|Connecting &#039;inout&#039; port in canvas]]&lt;br /&gt;
** The resistor_basic model has normal &#039;inlet&#039; and &#039;outlet&#039; port. But the Ground model only has &#039;inout&#039; port, which can be connected with any kinds of ports in canvas. The definition of &#039;inout&#039; port is exactly the same as &#039;inlet&#039; or &#039;outlet&#039; ports. Part of the code is shown below:&lt;br /&gt;
 MODEL Ground;&lt;br /&gt;
 	NOTES&lt;br /&gt;
 		&#039;block&#039; SELF {Ground}&lt;br /&gt;
 		&#039;icon&#039; SELF {ground.png}&lt;br /&gt;
 		&#039;graphic&#039; SELF {5,0-5,5&lt;br /&gt;
 			0,5-10,5&lt;br /&gt;
 			2,7-8,7&lt;br /&gt;
 			4,9-6,9}&lt;br /&gt;
 		&#039;port_inout&#039; SELF {inout:5,0}&lt;br /&gt;
 	END NOTES;&lt;br /&gt;
 	inout &amp;quot;inout:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 	inout.V = 0 {volt};&lt;br /&gt;
 END Ground;&lt;br /&gt;
* Piping system introduction:&lt;br /&gt;
&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:canvas_GUI.png|Canvas GUI&lt;br /&gt;
File:canvas_inout.png|&#039;Inout&#039; port is available in canvas&lt;br /&gt;
File:canvas_basic_elec.png|Basic electronic circuit simulation&lt;br /&gt;
File:canvas_block_properties.png|Block equation can be viewed from &#039;block properties&#039;&lt;br /&gt;
File:canvas_quit_confirm.png|Warning dialog before quitting canvas is added&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5862</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5862"/>
		<updated>2016-08-31T00:19:55Z</updated>

		<summary type="html">&lt;p&gt;Mike: /* Final Review */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han (Mike)&lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* How to use &#039;inout&#039; port: (see {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}} for detail)[[File:canvas_inout.png|thumb|alt=&#039;Inout&#039; port is available in canvas|Connecting &#039;inout&#039; port in canvas]]&lt;br /&gt;
** The resistor_basic model has normal &#039;inlet&#039; and &#039;outlet&#039; port. But the Ground model only has &#039;inout&#039; port, which can be connected with any kinds of ports in canvas. The definition of &#039;inout&#039; port is exactly the same as &#039;inlet&#039; or &#039;outlet&#039; ports. Part of the code is shown below:&lt;br /&gt;
 MODEL Ground;&lt;br /&gt;
 	NOTES&lt;br /&gt;
 		&#039;block&#039; SELF {Ground}&lt;br /&gt;
 		&#039;icon&#039; SELF {ground.png}&lt;br /&gt;
 		&#039;graphic&#039; SELF {5,0-5,5&lt;br /&gt;
 			0,5-10,5&lt;br /&gt;
 			2,7-8,7&lt;br /&gt;
 			4,9-6,9}&lt;br /&gt;
 		&#039;port_inout&#039; SELF {inout:5,0}&lt;br /&gt;
 	END NOTES;&lt;br /&gt;
 	inout &amp;quot;inout:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 	inout.V = 0 {volt};&lt;br /&gt;
 END Ground;&lt;br /&gt;
* Piping system introduction:&lt;br /&gt;
&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:canvas_GUI.png|Canvas GUI&lt;br /&gt;
File:canvas_inout.png|&#039;Inout&#039; port is available in canvas&lt;br /&gt;
File:canvas_basic_elec.png|Basic electronic circuit simulation&lt;br /&gt;
File:canvas_block_properties.png|Block equation can be viewed from &#039;block properties&#039;&lt;br /&gt;
File:canvas_quit_confirm.png|Warning dialog before quitting canvas is added&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5861</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5861"/>
		<updated>2016-08-31T00:18:48Z</updated>

		<summary type="html">&lt;p&gt;Mike: /* Final Review */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han (Mike)&lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* How to use &#039;inout&#039; port: (see {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}} for detail)[[File:canvas_inout.png|thumb|alt=&#039;Inout&#039; port is available in canvas|Connecting &#039;inout&#039; port in canvas]]&lt;br /&gt;
** The resistor_basic model has normal &#039;inlet&#039; and &#039;outlet&#039; port. But the Ground model only has &#039;inout&#039; port, which can be connected with any kinds of ports in canvas. The definition of &#039;inout&#039; port is exactly the same as &#039;inlet&#039; or &#039;outlet&#039; ports. Part of the code is shown below:&lt;br /&gt;
 MODEL Ground;&lt;br /&gt;
 	NOTES&lt;br /&gt;
 		&#039;block&#039; SELF {Ground}&lt;br /&gt;
 		&#039;icon&#039; SELF {ground.png}&lt;br /&gt;
 		&#039;graphic&#039; SELF {5,0-5,5&lt;br /&gt;
 			0,5-10,5&lt;br /&gt;
 			2,7-8,7&lt;br /&gt;
 			4,9-6,9}&lt;br /&gt;
 		&#039;port_inout&#039; SELF {inout:5,0}&lt;br /&gt;
 	END NOTES;&lt;br /&gt;
 	inout &amp;quot;inout:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 	inout.V = 0 {volt};&lt;br /&gt;
 END Ground;&lt;br /&gt;
&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:canvas_GUI.png|Canvas GUI&lt;br /&gt;
File:canvas_inout.png|&#039;Inout&#039; port is available in canvas&lt;br /&gt;
File:canvas_basic_elec.png|Basic electronic circuit simulation&lt;br /&gt;
File:canvas_block_properties.png|Block equation can be viewed from &#039;block properties&#039;&lt;br /&gt;
File:canvas_quit_confirm.png|Warning dialog before quitting canvas is added&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5860</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5860"/>
		<updated>2016-08-31T00:18:26Z</updated>

		<summary type="html">&lt;p&gt;Mike: /* Final Review */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han (Mike)&lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* How to use &#039;inout&#039; port: (see {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}} for detail)[[File:canvas_inout.png|thumb|alt=&#039;Inout&#039; port is available in canvas|&#039;Inout&#039; port is available in canvas]]&lt;br /&gt;
** The resistor_basic model has normal &#039;inlet&#039; and &#039;outlet&#039; port. But the Ground model only has &#039;inout&#039; port, which can be connected with any kinds of ports in canvas. The definition of &#039;inout&#039; port is exactly the same as &#039;inlet&#039; or &#039;outlet&#039; ports. Part of the code is shown below:&lt;br /&gt;
 MODEL Ground;&lt;br /&gt;
 	NOTES&lt;br /&gt;
 		&#039;block&#039; SELF {Ground}&lt;br /&gt;
 		&#039;icon&#039; SELF {ground.png}&lt;br /&gt;
 		&#039;graphic&#039; SELF {5,0-5,5&lt;br /&gt;
 			0,5-10,5&lt;br /&gt;
 			2,7-8,7&lt;br /&gt;
 			4,9-6,9}&lt;br /&gt;
 		&#039;port_inout&#039; SELF {inout:5,0}&lt;br /&gt;
 	END NOTES;&lt;br /&gt;
 	inout &amp;quot;inout:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 	inout.V = 0 {volt};&lt;br /&gt;
 END Ground;&lt;br /&gt;
&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:canvas_GUI.png|Canvas GUI&lt;br /&gt;
File:canvas_inout.png|&#039;Inout&#039; port is available in canvas&lt;br /&gt;
File:canvas_basic_elec.png|Basic electronic circuit simulation&lt;br /&gt;
File:canvas_block_properties.png|Block equation can be viewed from &#039;block properties&#039;&lt;br /&gt;
File:canvas_quit_confirm.png|Warning dialog before quitting canvas is added&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5859</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5859"/>
		<updated>2016-08-31T00:17:33Z</updated>

		<summary type="html">&lt;p&gt;Mike: /* Final Review */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han (Mike)&lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* How to use &#039;inout&#039; port: (see {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}} for detail)[[File:canvas_inout.png|thumb|alt=&#039;Inout&#039; port is available in canvas]]&lt;br /&gt;
** The resistor_basic model has normal &#039;inlet&#039; and &#039;outlet&#039; port. But the Ground model only has &#039;inout&#039; port, which can be connected with any kinds of ports in canvas. The definition of &#039;inout&#039; port is exactly the same as &#039;inlet&#039; or &#039;outlet&#039; ports. Part of the code is shown below:&lt;br /&gt;
 MODEL Ground;&lt;br /&gt;
 	NOTES&lt;br /&gt;
 		&#039;block&#039; SELF {Ground}&lt;br /&gt;
 		&#039;icon&#039; SELF {ground.png}&lt;br /&gt;
 		&#039;graphic&#039; SELF {5,0-5,5&lt;br /&gt;
 			0,5-10,5&lt;br /&gt;
 			2,7-8,7&lt;br /&gt;
 			4,9-6,9}&lt;br /&gt;
 		&#039;port_inout&#039; SELF {inout:5,0}&lt;br /&gt;
 	END NOTES;&lt;br /&gt;
 	inout &amp;quot;inout:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 	inout.V = 0 {volt};&lt;br /&gt;
 END Ground;&lt;br /&gt;
&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:canvas_GUI.png|Canvas GUI&lt;br /&gt;
File:canvas_inout.png|&#039;Inout&#039; port is available in canvas&lt;br /&gt;
File:canvas_basic_elec.png|Basic electronic circuit simulation&lt;br /&gt;
File:canvas_block_properties.png|Block equation can be viewed from &#039;block properties&#039;&lt;br /&gt;
File:canvas_quit_confirm.png|Warning dialog before quitting canvas is added&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5858</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5858"/>
		<updated>2016-08-31T00:17:12Z</updated>

		<summary type="html">&lt;p&gt;Mike: /* Final Review */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han (Mike)&lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* How to use &#039;inout&#039; port: (see {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}} for detail)&lt;br /&gt;
[[File:canvas_inout.png|thumb|alt=&#039;Inout&#039; port is available in canvas]]&lt;br /&gt;
** The resistor_basic model has normal &#039;inlet&#039; and &#039;outlet&#039; port. But the Ground model only has &#039;inout&#039; port, which can be connected with any kinds of ports in canvas. The definition of &#039;inout&#039; port is exactly the same as &#039;inlet&#039; or &#039;outlet&#039; ports. Part of the code is shown below:&lt;br /&gt;
 MODEL Ground;&lt;br /&gt;
 	NOTES&lt;br /&gt;
 		&#039;block&#039; SELF {Ground}&lt;br /&gt;
 		&#039;icon&#039; SELF {ground.png}&lt;br /&gt;
 		&#039;graphic&#039; SELF {5,0-5,5&lt;br /&gt;
 			0,5-10,5&lt;br /&gt;
 			2,7-8,7&lt;br /&gt;
 			4,9-6,9}&lt;br /&gt;
 		&#039;port_inout&#039; SELF {inout:5,0}&lt;br /&gt;
 	END NOTES;&lt;br /&gt;
 	inout &amp;quot;inout:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 	inout.V = 0 {volt};&lt;br /&gt;
 END Ground;&lt;br /&gt;
&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:canvas_GUI.png|Canvas GUI&lt;br /&gt;
File:canvas_inout.png|&#039;Inout&#039; port is available in canvas&lt;br /&gt;
File:canvas_basic_elec.png|Basic electronic circuit simulation&lt;br /&gt;
File:canvas_block_properties.png|Block equation can be viewed from &#039;block properties&#039;&lt;br /&gt;
File:canvas_quit_confirm.png|Warning dialog before quitting canvas is added&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5857</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5857"/>
		<updated>2016-08-31T00:16:53Z</updated>

		<summary type="html">&lt;p&gt;Mike: /* Final Review */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han (Mike)&lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* How to use &#039;inout&#039; port: (see {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}} for detail)&lt;br /&gt;
** [[File:canvas_inout.png|thumb|alt=&#039;Inout&#039; port is available in canvas]]&lt;br /&gt;
** The resistor_basic model has normal &#039;inlet&#039; and &#039;outlet&#039; port. But the Ground model only has &#039;inout&#039; port, which can be connected with any kinds of ports in canvas. The definition of &#039;inout&#039; port is exactly the same as &#039;inlet&#039; or &#039;outlet&#039; ports. Part of the code is shown below:&lt;br /&gt;
 MODEL Ground;&lt;br /&gt;
 	NOTES&lt;br /&gt;
 		&#039;block&#039; SELF {Ground}&lt;br /&gt;
 		&#039;icon&#039; SELF {ground.png}&lt;br /&gt;
 		&#039;graphic&#039; SELF {5,0-5,5&lt;br /&gt;
 			0,5-10,5&lt;br /&gt;
 			2,7-8,7&lt;br /&gt;
 			4,9-6,9}&lt;br /&gt;
 		&#039;port_inout&#039; SELF {inout:5,0}&lt;br /&gt;
 	END NOTES;&lt;br /&gt;
 	inout &amp;quot;inout:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 	inout.V = 0 {volt};&lt;br /&gt;
 END Ground;&lt;br /&gt;
&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:canvas_GUI.png|Canvas GUI&lt;br /&gt;
File:canvas_inout.png|&#039;Inout&#039; port is available in canvas&lt;br /&gt;
File:canvas_basic_elec.png|Basic electronic circuit simulation&lt;br /&gt;
File:canvas_block_properties.png|Block equation can be viewed from &#039;block properties&#039;&lt;br /&gt;
File:canvas_quit_confirm.png|Warning dialog before quitting canvas is added&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5856</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5856"/>
		<updated>2016-08-31T00:16:01Z</updated>

		<summary type="html">&lt;p&gt;Mike: /* Final Review */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han (Mike)&lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* How to use &#039;inout&#039; port: (see {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}} for detail)&lt;br /&gt;
** [[File:canvas_inout.png|thumb|left|alt=&#039;Inout&#039; port is available in canvas]]&lt;br /&gt;
** The resistor_basic model has normal &#039;inlet&#039; and &#039;outlet&#039; port. But the Ground model only has &#039;inout&#039; port, which can be connected with any kinds of ports in canvas. The definition of &#039;inout&#039; port is exactly the same as &#039;inlet&#039; or &#039;outlet&#039; ports. Part of the code is shown below:&lt;br /&gt;
 MODEL Ground;&lt;br /&gt;
 	NOTES&lt;br /&gt;
 		&#039;block&#039; SELF {Ground}&lt;br /&gt;
 		&#039;icon&#039; SELF {ground.png}&lt;br /&gt;
 		&#039;graphic&#039; SELF {5,0-5,5&lt;br /&gt;
 			0,5-10,5&lt;br /&gt;
 			2,7-8,7&lt;br /&gt;
 			4,9-6,9}&lt;br /&gt;
 		&#039;port_inout&#039; SELF {inout:5,0}&lt;br /&gt;
 	END NOTES;&lt;br /&gt;
 	inout &amp;quot;inout:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 	inout.V = 0 {volt};&lt;br /&gt;
 END Ground;&lt;br /&gt;
&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:canvas_GUI.png|Canvas GUI&lt;br /&gt;
File:canvas_inout.png|&#039;Inout&#039; port is available in canvas&lt;br /&gt;
File:canvas_basic_elec.png|Basic electronic circuit simulation&lt;br /&gt;
File:canvas_block_properties.png|Block equation can be viewed from &#039;block properties&#039;&lt;br /&gt;
File:canvas_quit_confirm.png|Warning dialog before quitting canvas is added&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5855</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5855"/>
		<updated>2016-08-31T00:14:24Z</updated>

		<summary type="html">&lt;p&gt;Mike: /* Final Review */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han (Mike)&lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* How to use &#039;inout&#039; port: (see {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}} for detail)&lt;br /&gt;
** File:canvas_inout.png|&#039;Inout&#039; port is available in canvas&lt;br /&gt;
** The resistor_basic model has normal &#039;inlet&#039; and &#039;outlet&#039; port. But the Ground model only has &#039;inout&#039; port, which can be connected with any kinds of ports in canvas. The definition of &#039;inout&#039; port is exactly the same as &#039;inlet&#039; or &#039;outlet&#039; ports. Part of the code is shown below:&lt;br /&gt;
 MODEL Ground;&lt;br /&gt;
 	NOTES&lt;br /&gt;
 		&#039;block&#039; SELF {Ground}&lt;br /&gt;
 		&#039;icon&#039; SELF {ground.png}&lt;br /&gt;
 		&#039;graphic&#039; SELF {5,0-5,5&lt;br /&gt;
 			0,5-10,5&lt;br /&gt;
 			2,7-8,7&lt;br /&gt;
 			4,9-6,9}&lt;br /&gt;
 		&#039;port_inout&#039; SELF {inout:5,0}&lt;br /&gt;
 	END NOTES;&lt;br /&gt;
 	inout &amp;quot;inout:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 	inout.V = 0 {volt};&lt;br /&gt;
 END Ground;&lt;br /&gt;
&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:canvas_GUI.png|Canvas GUI&lt;br /&gt;
File:canvas_inout.png|&#039;Inout&#039; port is available in canvas&lt;br /&gt;
File:canvas_basic_elec.png|Basic electronic circuit simulation&lt;br /&gt;
File:canvas_block_properties.png|Block equation can be viewed from &#039;block properties&#039;&lt;br /&gt;
File:canvas_quit_confirm.png|Warning dialog before quitting canvas is added&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5854</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5854"/>
		<updated>2016-08-31T00:14:02Z</updated>

		<summary type="html">&lt;p&gt;Mike: /* Final Review */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han (Mike)&lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* How to use &#039;inout&#039; port: (see {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}} for detail)&lt;br /&gt;
** &lt;br /&gt;
** The resistor_basic model has normal &#039;inlet&#039; and &#039;outlet&#039; port. But the Ground model only has &#039;inout&#039; port, which can be connected with any kinds of ports in canvas. The definition of &#039;inout&#039; port is exactly the same as &#039;inlet&#039; or &#039;outlet&#039; ports. Part of the code is shown below:&lt;br /&gt;
 MODEL Ground;&lt;br /&gt;
 	NOTES&lt;br /&gt;
 		&#039;block&#039; SELF {Ground}&lt;br /&gt;
 		&#039;icon&#039; SELF {ground.png}&lt;br /&gt;
 		&#039;graphic&#039; SELF {5,0-5,5&lt;br /&gt;
 			0,5-10,5&lt;br /&gt;
 			2,7-8,7&lt;br /&gt;
 			4,9-6,9}&lt;br /&gt;
 		&#039;port_inout&#039; SELF {inout:5,0}&lt;br /&gt;
 	END NOTES;&lt;br /&gt;
 	inout &amp;quot;inout:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 	inout.V = 0 {volt};&lt;br /&gt;
 END Ground;&lt;br /&gt;
&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:canvas_GUI.png|Canvas GUI&lt;br /&gt;
File:canvas_inout.png|&#039;Inout&#039; port is available in canvas&lt;br /&gt;
File:canvas_basic_elec.png|Basic electronic circuit simulation&lt;br /&gt;
File:canvas_block_properties.png|Block equation can be viewed from &#039;block properties&#039;&lt;br /&gt;
File:canvas_quit_confirm.png|Warning dialog before quitting canvas is added&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5853</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5853"/>
		<updated>2016-08-31T00:13:38Z</updated>

		<summary type="html">&lt;p&gt;Mike: /* Final Review */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han (Mike)&lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* How to use &#039;inout&#039; port: (see {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}} for detail)&lt;br /&gt;
** The resistor_basic model has normal &#039;inlet&#039; and &#039;outlet&#039; port. But the Ground model only has &#039;inout&#039; port, which can be connected with any kinds of ports in canvas. The definition of &#039;inout&#039; port is exactly the same as &#039;inlet&#039; or &#039;outlet&#039; ports. Part of the code is shown below:&lt;br /&gt;
 MODEL Ground;&lt;br /&gt;
 	NOTES&lt;br /&gt;
 		&#039;block&#039; SELF {Ground}&lt;br /&gt;
 		&#039;icon&#039; SELF {ground.png}&lt;br /&gt;
 		&#039;graphic&#039; SELF {5,0-5,5&lt;br /&gt;
 			0,5-10,5&lt;br /&gt;
 			2,7-8,7&lt;br /&gt;
 			4,9-6,9}&lt;br /&gt;
 		&#039;port_inout&#039; SELF {inout:5,0}&lt;br /&gt;
 	END NOTES;&lt;br /&gt;
 	inout &amp;quot;inout:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 	inout.V = 0 {volt};&lt;br /&gt;
 END Ground;&lt;br /&gt;
** Img&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:canvas_GUI.png|Canvas GUI&lt;br /&gt;
File:canvas_inout.png|&#039;Inout&#039; port is available in canvas&lt;br /&gt;
File:canvas_basic_elec.png|Basic electronic circuit simulation&lt;br /&gt;
File:canvas_block_properties.png|Block equation can be viewed from &#039;block properties&#039;&lt;br /&gt;
File:canvas_quit_confirm.png|Warning dialog before quitting canvas is added&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5852</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5852"/>
		<updated>2016-08-31T00:13:03Z</updated>

		<summary type="html">&lt;p&gt;Mike: /* Final Review */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han (Mike)&lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* How to use &#039;inout&#039; port: (see {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}} for detail)&lt;br /&gt;
** The resistor_basic model has normal &#039;inlet&#039; and &#039;outlet&#039; port. But the Ground model only has &#039;inout&#039; port, which can be connected with any kinds of ports in canvas. The definition of &#039;inout&#039; port is exactly the same as &#039;inlet&#039; or &#039;outlet&#039; ports. Part of the code is shown below:&lt;br /&gt;
 MODEL Ground;&lt;br /&gt;
 	NOTES&lt;br /&gt;
 		&#039;block&#039; SELF {Ground}&lt;br /&gt;
 		&#039;icon&#039; SELF {ground.png}&lt;br /&gt;
 		&#039;graphic&#039; SELF {5,0-5,5&lt;br /&gt;
 			0,5-10,5&lt;br /&gt;
 			2,7-8,7&lt;br /&gt;
 			4,9-6,9}&lt;br /&gt;
 		&#039;port_inout&#039; SELF {inout:5,0}&lt;br /&gt;
 	END NOTES;&lt;br /&gt;
 	inout &amp;quot;inout:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 	inout.V = 0 {volt};&lt;br /&gt;
 END Ground;&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:canvas_GUI.png|Canvas GUI&lt;br /&gt;
File:canvas_inout.png|&#039;Inout&#039; port is available in canvas&lt;br /&gt;
File:canvas_basic_elec.png|Basic electronic circuit simulation&lt;br /&gt;
File:canvas_block_properties.png|Block equation can be viewed from &#039;block properties&#039;&lt;br /&gt;
File:canvas_quit_confirm.png|Warning dialog before quitting canvas is added&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5851</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5851"/>
		<updated>2016-08-31T00:12:54Z</updated>

		<summary type="html">&lt;p&gt;Mike: /* Final Review */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han (Mike)&lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* How to use &#039;inout&#039; port: (see {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}} for detail)&lt;br /&gt;
** The resistor_basic model has normal &#039;inlet&#039; and &#039;outlet&#039; port. But the Ground model only has &#039;inout&#039; port, which can be connected with any kinds of ports in canvas. The definition of &#039;inout&#039; port is exactly the same as &#039;inlet&#039; or &#039;outlet&#039; ports. Part of the code is shown below:&lt;br /&gt;
 MODEL Ground;&lt;br /&gt;
 	NOTES&lt;br /&gt;
 		&#039;block&#039; SELF {Ground}&lt;br /&gt;
 		&#039;icon&#039; SELF {ground.png}&lt;br /&gt;
 		&#039;graphic&#039; SELF {5,0-5,5&lt;br /&gt;
 			0,5-10,5&lt;br /&gt;
 			2,7-8,7&lt;br /&gt;
 			4,9-6,9}&lt;br /&gt;
 		&#039;port_inout&#039; SELF {inout:5,0}&lt;br /&gt;
 	END NOTES;&lt;br /&gt;
 	inout &amp;quot;inout:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 	inout.V = 0 {volt};&lt;br /&gt;
 END Ground;&lt;br /&gt;
 &lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:canvas_GUI.png|Canvas GUI&lt;br /&gt;
File:canvas_inout.png|&#039;Inout&#039; port is available in canvas&lt;br /&gt;
File:canvas_basic_elec.png|Basic electronic circuit simulation&lt;br /&gt;
File:canvas_block_properties.png|Block equation can be viewed from &#039;block properties&#039;&lt;br /&gt;
File:canvas_quit_confirm.png|Warning dialog before quitting canvas is added&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5850</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5850"/>
		<updated>2016-08-31T00:12:10Z</updated>

		<summary type="html">&lt;p&gt;Mike: /* Final Review */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han (Mike)&lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* How to use &#039;inout&#039; port: (see {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}} for detail)&lt;br /&gt;
** The resistor_basic model has normal &#039;inlet&#039; and &#039;outlet&#039; port. But the Ground model only has &#039;inout&#039; port, which can be connected with any kinds of ports in canvas. The definition of &#039;inout&#039; port is exactly the same as &#039;inlet&#039; or &#039;outlet&#039; ports. Part of the code is shown below:&lt;br /&gt;
 MODEL resistor_basic REFINES equipment;&lt;br /&gt;
 	NOTES&lt;br /&gt;
 		&#039;block&#039; SELF {Basic Resistor}&lt;br /&gt;
 		&#039;icon&#039; SELF {resistor.svg}&lt;br /&gt;
 		&#039;graphic&#039; SELF {0,5-2,5&lt;br /&gt;
 			2,5-2.5,8&lt;br /&gt;
 			2.5,8-3.5,2&lt;br /&gt;
 			3.5,2-4.5,8&lt;br /&gt;
 			4.5,8-5.5,2&lt;br /&gt;
 			5.5,2-6.5,8&lt;br /&gt;
 			6.5,8-7.5,2&lt;br /&gt;
 			7.5,2-8,5&lt;br /&gt;
 			8,5-10,5}&lt;br /&gt;
 	END NOTES;&lt;br /&gt;
 	Resistance &amp;quot;param: Resistance of the resisitor&amp;quot; IS_A resistance;&lt;br /&gt;
 	inlet.I = outlet.I;&lt;br /&gt;
 	outlet.V = inlet.V - (inlet.I * Resistance);&lt;br /&gt;
 END resistor_basic;&lt;br /&gt;
 &lt;br /&gt;
 MODEL Ground;&lt;br /&gt;
 	NOTES&lt;br /&gt;
 		&#039;block&#039; SELF {Ground}&lt;br /&gt;
 		&#039;icon&#039; SELF {ground.png}&lt;br /&gt;
 		&#039;graphic&#039; SELF {5,0-5,5&lt;br /&gt;
 			0,5-10,5&lt;br /&gt;
 			2,7-8,7&lt;br /&gt;
 			4,9-6,9}&lt;br /&gt;
 		&#039;port_inout&#039; SELF {inout:5,0}&lt;br /&gt;
 	END NOTES;&lt;br /&gt;
 	inout &amp;quot;inout:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 	inout.V = 0 {volt};&lt;br /&gt;
 END Ground;&lt;br /&gt;
 &lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:canvas_GUI.png|Canvas GUI&lt;br /&gt;
File:canvas_inout.png|&#039;Inout&#039; port is available in canvas&lt;br /&gt;
File:canvas_basic_elec.png|Basic electronic circuit simulation&lt;br /&gt;
File:canvas_block_properties.png|Block equation can be viewed from &#039;block properties&#039;&lt;br /&gt;
File:canvas_quit_confirm.png|Warning dialog before quitting canvas is added&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5849</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5849"/>
		<updated>2016-08-31T00:06:36Z</updated>

		<summary type="html">&lt;p&gt;Mike: /* Final Review */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han (Mike)&lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* How to use &#039;inout&#039; port: (use basic electronics model as an example) {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** &lt;br /&gt;
 MODEL resistor_basic REFINES equipment;&lt;br /&gt;
 	NOTES&lt;br /&gt;
 		&#039;block&#039; SELF {Basic Resistor}&lt;br /&gt;
 		&#039;icon&#039; SELF {resistor.svg}&lt;br /&gt;
 		&#039;graphic&#039; SELF {0,5-2,5&lt;br /&gt;
 			2,5-2.5,8&lt;br /&gt;
 			2.5,8-3.5,2&lt;br /&gt;
 			3.5,2-4.5,8&lt;br /&gt;
 			4.5,8-5.5,2&lt;br /&gt;
 			5.5,2-6.5,8&lt;br /&gt;
 			6.5,8-7.5,2&lt;br /&gt;
 			7.5,2-8,5&lt;br /&gt;
 			8,5-10,5}&lt;br /&gt;
 	END NOTES;&lt;br /&gt;
 	Resistance &amp;quot;param: Resistance of the resisitor&amp;quot; IS_A resistance;&lt;br /&gt;
 	inlet.I = outlet.I;&lt;br /&gt;
 	outlet.V = inlet.V - (inlet.I * Resistance);&lt;br /&gt;
 END resistor_basic;&lt;br /&gt;
 &lt;br /&gt;
 MODEL Ground;&lt;br /&gt;
 	NOTES&lt;br /&gt;
 		&#039;block&#039; SELF {Ground}&lt;br /&gt;
 		&#039;icon&#039; SELF {ground.png}&lt;br /&gt;
 		&#039;graphic&#039; SELF {5,0-5,5&lt;br /&gt;
 			0,5-10,5&lt;br /&gt;
 			2,7-8,7&lt;br /&gt;
 			4,9-6,9}&lt;br /&gt;
 		&#039;port_inout&#039; SELF {inout:5,0}&lt;br /&gt;
 	END NOTES;&lt;br /&gt;
 	inout &amp;quot;inout:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 	inout.V = 0 {volt};&lt;br /&gt;
 END Ground;&lt;br /&gt;
 &lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:canvas_GUI.png|Canvas GUI&lt;br /&gt;
File:canvas_inout.png|&#039;Inout&#039; port is available in canvas&lt;br /&gt;
File:canvas_basic_elec.png|Basic electronic circuit simulation&lt;br /&gt;
File:canvas_block_properties.png|Block equation can be viewed from &#039;block properties&#039;&lt;br /&gt;
File:canvas_quit_confirm.png|Warning dialog before quitting canvas is added&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5848</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5848"/>
		<updated>2016-08-31T00:05:57Z</updated>

		<summary type="html">&lt;p&gt;Mike: /* Final Review */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han (Mike)&lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* How to use &#039;inout&#039; port: (use basic electronics model as an example) {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** &lt;br /&gt;
 MODEL resistor_basic REFINES equipment;&lt;br /&gt;
	NOTES&lt;br /&gt;
		&#039;block&#039; SELF {Basic Resistor}&lt;br /&gt;
		&#039;icon&#039; SELF {resistor.svg}&lt;br /&gt;
		&#039;graphic&#039; SELF {0,5-2,5&lt;br /&gt;
			2,5-2.5,8&lt;br /&gt;
			2.5,8-3.5,2&lt;br /&gt;
			3.5,2-4.5,8&lt;br /&gt;
			4.5,8-5.5,2&lt;br /&gt;
			5.5,2-6.5,8&lt;br /&gt;
			6.5,8-7.5,2&lt;br /&gt;
			7.5,2-8,5&lt;br /&gt;
			8,5-10,5}&lt;br /&gt;
	END NOTES;&lt;br /&gt;
	Resistance &amp;quot;param: Resistance of the resisitor&amp;quot; IS_A resistance;&lt;br /&gt;
	inlet.I = outlet.I;&lt;br /&gt;
	outlet.V = inlet.V - (inlet.I * Resistance);&lt;br /&gt;
END resistor_basic;&lt;br /&gt;
&lt;br /&gt;
MODEL Ground;&lt;br /&gt;
	NOTES&lt;br /&gt;
		&#039;block&#039; SELF {Ground}&lt;br /&gt;
		&#039;icon&#039; SELF {ground.png}&lt;br /&gt;
		&#039;graphic&#039; SELF {5,0-5,5&lt;br /&gt;
			0,5-10,5&lt;br /&gt;
			2,7-8,7&lt;br /&gt;
			4,9-6,9}&lt;br /&gt;
		&#039;port_inout&#039; SELF {inout:5,0}&lt;br /&gt;
	END NOTES;&lt;br /&gt;
	inout &amp;quot;inout:&amp;quot; IS_A electron_stream;&lt;br /&gt;
	inout.V = 0 {volt};&lt;br /&gt;
END Ground;&lt;br /&gt;
 &lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:canvas_GUI.png|Canvas GUI&lt;br /&gt;
File:canvas_inout.png|&#039;Inout&#039; port is available in canvas&lt;br /&gt;
File:canvas_basic_elec.png|Basic electronic circuit simulation&lt;br /&gt;
File:canvas_block_properties.png|Block equation can be viewed from &#039;block properties&#039;&lt;br /&gt;
File:canvas_quit_confirm.png|Warning dialog before quitting canvas is added&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5847</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5847"/>
		<updated>2016-08-31T00:03:36Z</updated>

		<summary type="html">&lt;p&gt;Mike: /* Final Review */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han (Mike)&lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* How to use &#039;inout&#039; port: (use basic electronics model as an example) {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** &lt;br /&gt;
 MODEL resistor_basic REFINES equipment;&lt;br /&gt;
	 NOTES&lt;br /&gt;
 		&#039;block&#039; SELF {Basic Resistor}&lt;br /&gt;
 		&#039;icon&#039; SELF {resistor.svg}&lt;br /&gt;
 		&#039;graphic&#039; SELF {0,5-2,5&lt;br /&gt;
 			2,5-2.5,8&lt;br /&gt;
 			2.5,8-3.5,2&lt;br /&gt;
 			3.5,2-4.5,8&lt;br /&gt;
			4.5,8-5.5,2&lt;br /&gt;
			5.5,2-6.5,8&lt;br /&gt;
			6.5,8-7.5,2&lt;br /&gt;
			7.5,2-8,5&lt;br /&gt;
			8,5-10,5}&lt;br /&gt;
	END NOTES;&lt;br /&gt;
	Resistance &amp;quot;param: Resistance of the resisitor&amp;quot; IS_A resistance;&lt;br /&gt;
	inlet.I = outlet.I;&lt;br /&gt;
	outlet.V = inlet.V - (inlet.I * Resistance);&lt;br /&gt;
END resistor_basic;&lt;br /&gt;
&lt;br /&gt;
MODEL Ground;&lt;br /&gt;
	NOTES&lt;br /&gt;
		&#039;block&#039; SELF {Ground}&lt;br /&gt;
		&#039;icon&#039; SELF {ground.png}&lt;br /&gt;
		&#039;graphic&#039; SELF {5,0-5,5&lt;br /&gt;
			0,5-10,5&lt;br /&gt;
			2,7-8,7&lt;br /&gt;
			4,9-6,9}&lt;br /&gt;
		&#039;port_inout&#039; SELF {inout:5,0}&lt;br /&gt;
	END NOTES;&lt;br /&gt;
	inout &amp;quot;inout:&amp;quot; IS_A electron_stream;&lt;br /&gt;
	inout.V = 0 {volt};&lt;br /&gt;
END Ground;&lt;br /&gt;
&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:canvas_GUI.png|Canvas GUI&lt;br /&gt;
File:canvas_inout.png|&#039;Inout&#039; port is available in canvas&lt;br /&gt;
File:canvas_basic_elec.png|Basic electronic circuit simulation&lt;br /&gt;
File:canvas_block_properties.png|Block equation can be viewed from &#039;block properties&#039;&lt;br /&gt;
File:canvas_quit_confirm.png|Warning dialog before quitting canvas is added&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5846</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5846"/>
		<updated>2016-08-30T23:59:43Z</updated>

		<summary type="html">&lt;p&gt;Mike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han (Mike)&lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:canvas_GUI.png|Canvas GUI&lt;br /&gt;
File:canvas_inout.png|&#039;Inout&#039; port is available in canvas&lt;br /&gt;
File:canvas_basic_elec.png|Basic electronic circuit simulation&lt;br /&gt;
File:canvas_block_properties.png|Block equation can be viewed from &#039;block properties&#039;&lt;br /&gt;
File:canvas_quit_confirm.png|Warning dialog before quitting canvas is added&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5845</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5845"/>
		<updated>2016-08-30T23:59:08Z</updated>

		<summary type="html">&lt;p&gt;Mike: /* Final Review */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han (Mike)&lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5844</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5844"/>
		<updated>2016-08-30T23:56:56Z</updated>

		<summary type="html">&lt;p&gt;Mike: /* Final Review */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han (Mike)&lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Screenshots&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:canvas_GUI.png|Canvas GUI&lt;br /&gt;
File:canvas_inout.png|&#039;Inout&#039; port is available in canvas&lt;br /&gt;
File:canvas_basic_elec.png|Basic electronic circuit simulation&lt;br /&gt;
File:canvas_block_properties.png|Block equation can be viewed from &#039;block properties&#039;&lt;br /&gt;
File:canvas_quit_confirm.png|Warning dialog before quitting canvas is added&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=File:Canvas_basic_elec.png&amp;diff=5843</id>
		<title>File:Canvas basic elec.png</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=File:Canvas_basic_elec.png&amp;diff=5843"/>
		<updated>2016-08-30T23:53:25Z</updated>

		<summary type="html">&lt;p&gt;Mike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=File:Canvas_quit_confirm.png&amp;diff=5842</id>
		<title>File:Canvas quit confirm.png</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=File:Canvas_quit_confirm.png&amp;diff=5842"/>
		<updated>2016-08-30T23:53:14Z</updated>

		<summary type="html">&lt;p&gt;Mike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=File:Canvas_block_properties.png&amp;diff=5841</id>
		<title>File:Canvas block properties.png</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=File:Canvas_block_properties.png&amp;diff=5841"/>
		<updated>2016-08-30T23:52:59Z</updated>

		<summary type="html">&lt;p&gt;Mike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=File:Canvas_inout.png&amp;diff=5840</id>
		<title>File:Canvas inout.png</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=File:Canvas_inout.png&amp;diff=5840"/>
		<updated>2016-08-30T23:52:48Z</updated>

		<summary type="html">&lt;p&gt;Mike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=File:Canvas_GUI.png&amp;diff=5839</id>
		<title>File:Canvas GUI.png</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=File:Canvas_GUI.png&amp;diff=5839"/>
		<updated>2016-08-30T23:52:23Z</updated>

		<summary type="html">&lt;p&gt;Mike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5838</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5838"/>
		<updated>2016-08-30T23:50:39Z</updated>

		<summary type="html">&lt;p&gt;Mike: /* Final Review */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han (Mike)&lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Screenshots&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:canvas_GUI.png|Main window with absorber model&lt;br /&gt;
File:canvas_inout.png|Context menu for multiselection&lt;br /&gt;
File:canvas_basic_elec.png|After click &#039;fix&#039;&lt;br /&gt;
File:canvas_block_properties.png|After click &#039;free&#039;&lt;br /&gt;
File:canvas_quit_confirm.png|After click &#039;observe&#039;&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5837</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5837"/>
		<updated>2016-08-30T23:46:24Z</updated>

		<summary type="html">&lt;p&gt;Mike: /* Final Review */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han (Mike)&lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:mainwindow.png|Main window with absorber model&lt;br /&gt;
File:contextmenu.png|Context menu for multiselection&lt;br /&gt;
File:afterfix.png|After click &#039;fix&#039;&lt;br /&gt;
File:afterfree.png|After click &#039;free&#039;&lt;br /&gt;
File:afterobserve.png|After click &#039;observe&#039;&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5836</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5836"/>
		<updated>2016-08-28T06:49:26Z</updated>

		<summary type="html">&lt;p&gt;Mike: /* Discussion notes for August 10 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han (Mike)&lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* General discussion about piping system library.&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5835</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5835"/>
		<updated>2016-08-28T06:47:30Z</updated>

		<summary type="html">&lt;p&gt;Mike: /* Discussion notes of 30 May 2016 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han (Mike)&lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
::canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
::Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
::However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5834</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5834"/>
		<updated>2016-08-28T06:47:04Z</updated>

		<summary type="html">&lt;p&gt;Mike: /* Discussion notes of 30 May 2016 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han (Mike)&lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
   canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
   Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
   However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5833</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5833"/>
		<updated>2016-08-28T06:46:38Z</updated>

		<summary type="html">&lt;p&gt;Mike: /* Discussion notes of 30 May 2016 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han (Mike)&lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
** canvas.py doesn&#039;t work because of &lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
** Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
** However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Mike&amp;diff=5832</id>
		<title>User:Mike</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Mike&amp;diff=5832"/>
		<updated>2016-08-28T06:45:13Z</updated>

		<summary type="html">&lt;p&gt;Mike: /* Discussion notes of 12 May 2016 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GSOC2016]]&lt;br /&gt;
&lt;br /&gt;
Name: Tengda Han (Mike)&lt;br /&gt;
&lt;br /&gt;
University: [http://www.anu.edu.au/ ANU]&lt;br /&gt;
&lt;br /&gt;
Email: u5612799@anu.edu.au&lt;br /&gt;
&lt;br /&gt;
Summary: I am doing [[GSOC2016]] for ASCEND. I will do something on Canvas. &lt;br /&gt;
&lt;br /&gt;
* Browse my code here: {{srcbranchdir|mike|}}&lt;br /&gt;
* Check out my code using &amp;lt;tt&amp;gt;svn co http://svn.ascend4.org/branches/mike&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Discussion notes of 12 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
To get the canvas GUI running in the trunk code, I used:&lt;br /&gt;
&lt;br /&gt;
 python ~/ascend/trunk/pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
== May 12 to May 22 ==&lt;br /&gt;
&lt;br /&gt;
* Set development environment and play with canvas.&lt;br /&gt;
&lt;br /&gt;
* Find a problem about module &#039;ascpy&#039; in my branch, which cannot be found in canvas.py. &lt;br /&gt;
&lt;br /&gt;
* But when I run canvas.py of main trunk, module &#039;ascpy&#039; can be found, but another error is called:&#039;&#039;&#039;libascend.so.1: cannot open shared object file: No such file or directory&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 23 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* cannot find module &#039;ascpy&#039; is because I need to compile by &lt;br /&gt;
&lt;br /&gt;
 scons -j4&lt;br /&gt;
&lt;br /&gt;
* set paths properly before run canvas.py:&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=~/Desktop/ascend_mike/mike/:$LD_LIBRARY_PATH&lt;br /&gt;
 export PYTHONPATH=~/Desktop/ascend_mike/mike/models/johnpye/fprops/python:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
* find a bug of Adrian&#039;s branch, which is, when run the solver, ascend kills the background terminal. Trying different ubuntu system may work.&lt;br /&gt;
&lt;br /&gt;
== May 23 to May 29 ==&lt;br /&gt;
&lt;br /&gt;
* Tested Adrian&#039;s branch on ubuntu 16.04 LTS. Previous bug doesn&#039;t exist (ascend kills the terminal)&lt;br /&gt;
&lt;br /&gt;
* Try to understand Gaphas and libavoid.&lt;br /&gt;
&lt;br /&gt;
* Link &#039;libavoid&#039; on ASCEND wiki has 404 error.&lt;br /&gt;
&lt;br /&gt;
* When &#039;scons&#039; ASCEND in Ubuntu16.04, SWIG error comes. [https://github.com/georgyberdyshev/ascend/commit/6962ef6c2ca36ff6cfff85e98c2daeac82619b82/ sulution here]&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of 30 May 2016 ==&lt;br /&gt;
&lt;br /&gt;
* When try to run canvas.py, should set PYTHONPATH to &lt;br /&gt;
&lt;br /&gt;
 ascend_trunk/trunk/model/johnpye/fprops/python&lt;br /&gt;
&lt;br /&gt;
* For Adrian&#039;s version&lt;br /&gt;
&lt;br /&gt;
:: canvas.py doesn&#039;t work because of &lt;br /&gt;
&lt;br /&gt;
 Error: sys.path must be a list of directory names&lt;br /&gt;
&lt;br /&gt;
:: Reason: installed python-gaphas uses gtk2. But we require gtk3 branch of gaphas, Solution:&lt;br /&gt;
&lt;br /&gt;
 cd ~/desired directory&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas&lt;br /&gt;
 git checkout gtk3&lt;br /&gt;
 git pull&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
:: However, after canvas.py pops up, &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039;&#039;&#039; occurs when click on blank canvas&lt;br /&gt;
&lt;br /&gt;
== May 30 to June 5 ==&lt;br /&gt;
&lt;br /&gt;
* Solved &#039;&#039;TypeError: Couldn&#039;t find conversion for foreign struct &#039;cairo.Context&#039; &#039;&#039; by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get python-gi-cairo&lt;br /&gt;
&lt;br /&gt;
[http://packages.ubuntu.com/trusty/python-gi-cairo This package] is a Python Cairo bindings for the GObject library &lt;br /&gt;
&lt;br /&gt;
* If problems occur when installing gaphas by&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-gaphas&lt;br /&gt;
&lt;br /&gt;
[http://www.installion.co.uk/ubuntu/precise/universe/p/python-gaphas/install/index.html/ Check the universe repository] before installation may help&lt;br /&gt;
&lt;br /&gt;
* Undo button works (finishing the work of Adrian), redo haven&#039;t been implemented yet.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of June 6 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Buttons now have labels. By adding &#039;&#039;tb.set_style(Gtk.ToolbarStyle.BOTH)&#039;&#039; after &#039;&#039;tb = Gtk.Toolbar()&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Delete unnecessary .svg image files in {{srcbranchdir|mike|pygtk/canvas}} only leave defaultblock.svg&lt;br /&gt;
&lt;br /&gt;
* Block icons should be generated by strings, instead of load image. Example: {{srcbranch|mike|models/test/canvas/brayton_fprops_rachel.a4c}}&lt;br /&gt;
&lt;br /&gt;
* Currently svn version is updated to {{changeset|3110}}&lt;br /&gt;
&lt;br /&gt;
* I can improve blocks, firstly to make sure they can be properly solved in canvas.&lt;br /&gt;
&lt;br /&gt;
== June 6 to June 13 ==&lt;br /&gt;
&lt;br /&gt;
* models in {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}} have been updated.&lt;br /&gt;
&lt;br /&gt;
* Problems found: every time after using the model in canvas, a &#039;.svg&#039; file of that model will be generated.&lt;br /&gt;
&lt;br /&gt;
== June 13 to June 28 ==&lt;br /&gt;
&lt;br /&gt;
* Working on redo function. Implement redo function in {{srcbranch|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_canvas.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that rankine_stream_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* Fix a bug that ammonia_synthesis_v2.a4c in {{srcbranch|mike|models/test/canvas/}} cannot run in canvas&lt;br /&gt;
&lt;br /&gt;
* GUI update: Load Library (Ctrl+L) is enabled from menu bar&lt;br /&gt;
&lt;br /&gt;
* GUI update: Correct labels in Block Properties Dialog&lt;br /&gt;
&lt;br /&gt;
== June 29 to July 10 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a bug when adjusting Error/Status Reporter Console&lt;br /&gt;
&lt;br /&gt;
* Rotate(Ctrl+R) and Flip(Ctrl+F) operation is added to menu bar, and keyboard shortcuts of them are enabled.&lt;br /&gt;
&lt;br /&gt;
* Correct current value (I) in running results from {{srcbranch|mike|models/test/canvas/basic_electronics_model.a4c}}  library.&lt;br /&gt;
&lt;br /&gt;
* Find a bug: In basic_electronics_model.a4c, when connect 2 ports of T-piece/Branch together and run, Canvas will quit.&lt;br /&gt;
&lt;br /&gt;
* An Error occurs when load canvas files because blocks with same name exist. Solution: 1. add a checker before &#039;run&#039; or &#039;save&#039;. 2. avoid reduplicate names when generating blocks. &lt;br /&gt;
&lt;br /&gt;
* Also, a warning &#039;CompareStatements called with unknown statement&#039; always appears when load files, but seems don&#039;t affect the result.&lt;br /&gt;
&lt;br /&gt;
* Add reporter for loading libraries and files.&lt;br /&gt;
&lt;br /&gt;
* Errors including line number can be shown on canvas when loading is unsuccessful.&lt;br /&gt;
&lt;br /&gt;
* Update information in &#039;Help&#039; Menu&lt;br /&gt;
&lt;br /&gt;
== Discussion notes of July 11 2016 ==&lt;br /&gt;
&lt;br /&gt;
* Automatically generating .svg files when load libraries: save these images into ~/.ascend/tmp&lt;br /&gt;
&lt;br /&gt;
* Preference of units should be improved: modify pygtk/preference.py&lt;br /&gt;
&lt;br /&gt;
* Warning should be displayed when ports not connected&lt;br /&gt;
&lt;br /&gt;
* Models with degree of freedom should not be solved. Warning should be displayed&lt;br /&gt;
&lt;br /&gt;
* In &#039;Block Properties&#039;, equations of blocks should be displayed&lt;br /&gt;
&lt;br /&gt;
== July 11 to July 20 ==&lt;br /&gt;
&lt;br /&gt;
* Correct syntax error in some files&lt;br /&gt;
&lt;br /&gt;
* Improving Block Properties to display equations, by editing relating python files and glade files.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when load new libraries with canvas items existing.&lt;br /&gt;
&lt;br /&gt;
* Warning Dialog added when exiting without saving canvas (still need improve).&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for July 20 2016 ==&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* Next Step: Create a library for piping system. Read Mechanics of Fluids. Be careful with flow network &amp;amp; over constrain issues.&lt;br /&gt;
&lt;br /&gt;
== July 21 to Aug 2 ==&lt;br /&gt;
&lt;br /&gt;
* Solve an issue that .svg image files will be generated in pygtk/canvas after load library: create directory &#039;pygtk/canvas/.temp&#039; and save all the .svg files into that .temp directory. By modifying {{srcbranch|mike|models/test/canvas/blocktype.py}}&lt;br /&gt;
&lt;br /&gt;
* Piping system library can be loaded now. But still working on equations.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 3 2016 ==&lt;br /&gt;
&lt;br /&gt;
* generate .svg files to ~/.cache/ascend, fix the permission issue by function os.path.expanduser(path).&lt;br /&gt;
&lt;br /&gt;
* Combine Quit (Ctrl+Q) and close button together by assign &#039;dispensable&#039; argument i.e. Event=None.&lt;br /&gt;
&lt;br /&gt;
* Refresh the workflow for developing piping system model.&lt;br /&gt;
&lt;br /&gt;
== Aug 3 to Aug 9 ==&lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is partially implemented by adding similar &#039;inout&#039; elements with previous &#039;input&#039; and &#039;output&#039; elements properly. However error occurs when right click and view &#039;block properties&#039;.&lt;br /&gt;
&lt;br /&gt;
* Piping system library can solve simple piping problems under fluid mechanics approximation.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 10 ==&lt;br /&gt;
&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
== Aug 11 to Aug 18 == &lt;br /&gt;
&lt;br /&gt;
* &#039;inout&#039; port is fully implemented by checking glade file {{srcbranchdir|mike|pygtk/glade/bp.glade}} and match the variable names. Now, &#039;inout&#039; port works properly for drawing feedback (can be connected with input/output/inout) and solving.&lt;br /&gt;
&lt;br /&gt;
== Discussion notes for August 19 ==&lt;br /&gt;
&lt;br /&gt;
* Report current working status.&lt;br /&gt;
&lt;br /&gt;
* Schedule next meeting on Monday morning.&lt;br /&gt;
&lt;br /&gt;
== Aug 19 to Aug 22 ==&lt;br /&gt;
&lt;br /&gt;
* Potential connector and flow connector can be detected from library file via syntax &#039;potential:&#039; and &#039;flow:&#039;, however it only has effects for one layer. E.g. library like this doesn&#039;t work:&lt;br /&gt;
 MODEL electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END electron_stream;&lt;br /&gt;
 &lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
But library like this can work, but it doesn&#039;t help much for solving problems:&lt;br /&gt;
 MODEL equipment;&lt;br /&gt;
     inlet &amp;quot;in:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     outlet &amp;quot;out:&amp;quot; IS_A electron_stream;&lt;br /&gt;
     V &amp;quot;potential:&amp;quot; IS_A voltage;&lt;br /&gt;
     I &amp;quot;flow:&amp;quot; IS_A current;&lt;br /&gt;
 END equipment;&lt;br /&gt;
 &lt;br /&gt;
 MODEL something REFINES equipment;&lt;br /&gt;
     ...&lt;br /&gt;
 END something;&lt;br /&gt;
Therefore, further implement is required on this.&lt;br /&gt;
&lt;br /&gt;
== Work after GSOC ==&lt;br /&gt;
&lt;br /&gt;
* Viewing block equations from right click - block properties is enabled, details in {{srcbranchdir|mike|pygtk/canvas/blockproperties.py}}&lt;br /&gt;
&lt;br /&gt;
== Final Review ==&lt;br /&gt;
&lt;br /&gt;
* See previous logs for setup environment of my branch. &lt;br /&gt;
&lt;br /&gt;
* Contact me via u5612799@anu.edu.au if you encounter problems / have questions.&lt;br /&gt;
&lt;br /&gt;
* TODO List from me:&lt;br /&gt;
** Implement redo function in {{srcbranchdir|mike|pygtk/canvas/undo.py}}&lt;br /&gt;
** Improve quit check (quit_confirm) function in {{srcbranchdir|mike|pygtk/canvas/blocklist.py}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/basic_electronics_model.a4c}}&lt;br /&gt;
** Improve functions of {{srcbranchdir|mike|models/test/canvas/piping_system.a4c}}&lt;br /&gt;
** Improve potential and flow connectors in various files from {{srcbranchdir|mike|pygtk/canvas}}&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
</feed>