<?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=Saheb</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=Saheb"/>
	<link rel="alternate" type="text/html" href="https://ascend4.org/Special:Contributions/Saheb"/>
	<updated>2026-04-28T21:46:02Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://ascend4.org/index.php?title=Canvas-based_modeller_for_ASCEND&amp;diff=4141</id>
		<title>Canvas-based modeller for ASCEND</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=Canvas-based_modeller_for_ASCEND&amp;diff=4141"/>
		<updated>2013-03-29T07:02:09Z</updated>

		<summary type="html">&lt;p&gt;Saheb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{task}}&lt;br /&gt;
[[Image:Gaphas-blocks.png|thumb|right|400px|Screenshot of the prototype Gaphas-based canvas for ASCEND]]&lt;br /&gt;
Many [[Other modelling tools|other modelling environments]] provide a graphical flowsheet modeller, or &#039;canvas&#039; onto which unit operations are arranged to create a process flow diagram (PFD). &#039;&#039;&#039;We would like to be able to do this in ASCEND too.&#039;&#039;&#039; The work on this was started by [[John Pye]], continued in [[GSOC2009]] by [[User:Arijit|Arijit]], and then as part of [[GSOC2010]] and [[GSOC2011]] by [[User:Grivan|Grivan]], and then as part of [[GSOC2012]] by [[User:Saheb|Saheb]]. We work closely with [[Arjan Molenaar]]. The current goals are:&lt;br /&gt;
&lt;br /&gt;
* fix and test our model load/save functionality (Grivan)&lt;br /&gt;
* some generic way for adding arcs in custom shaped icons (Saheb)&lt;br /&gt;
* &amp;lt;strike style=&amp;quot;color:green&amp;quot;&amp;gt;add support for basic custom-shaped blocks &amp;lt;/strike&amp;gt; (Done - Saheb)&lt;br /&gt;
* improve our parameter-setting dialog&lt;br /&gt;
* test with some more detailed flowsheets&lt;br /&gt;
* add support for annotations on flowsheets&lt;br /&gt;
* add support for reporting variable values on the flowsheet&lt;br /&gt;
* &amp;lt;strike style=&amp;quot;color:green&amp;quot;&amp;gt;create a new empty flowsheet&amp;lt;/strike&amp;gt; &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;(done)&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;strike style=&amp;quot;color:green&amp;quot;&amp;gt;plop &#039;blocks&#039; onto a canvas to represent various &#039;unit operations&#039; such as tank, turbine, pump, column, resistor, capacity, actuator, motor, etc.&amp;lt;/strike&amp;gt; &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;(done)&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;strike style=&amp;quot;color:green&amp;quot;&amp;gt;wire up the &#039;ports&#039; on these blocks using &#039;connectors&#039; that would correspond to &#039;streams&#039; with multiple variables and parameters within them, such as a steam flow, or single variables such as a voltage signal.&amp;lt;/strike&amp;gt; &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;(done)&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;strike style=&amp;quot;color:green&amp;quot;&amp;gt;view and edit parameters for the blocks in order to make adjustments to the system design.&amp;lt;/strike&amp;gt;&lt;br /&gt;
* view and edit constants and sets for the model (eg name of the fluid in a stream).&lt;br /&gt;
* solve the model: &amp;lt;strike style=&amp;quot;color:green&amp;quot;&amp;gt;export to solver&amp;lt;/strike&amp;gt;, give error message feedback, create linkage between blocks and solver vars. &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;(partially done)&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;strike style=&amp;quot;color:green&amp;quot;&amp;gt;see graphically the parts of the model which have not converged or which are out-of-bounds.&amp;lt;/strike&amp;gt; &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;(done)&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;strike style=&amp;quot;color:green&amp;quot;&amp;gt;view the values of variables within the blocks once it has solved&amp;lt;/strike&amp;gt; &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;(done)&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;strike style=&amp;quot;color:green&amp;quot;&amp;gt;save the flowsheet in such a way that when reloaded, it can again be solved afresh.&amp;lt;/strike&amp;gt; &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;(done)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Split-brayton-cycle-config.png|thumb|right|400px|Typical energy system diagram of the sort we would like to work with &#039;live&#039; in this modeller.]]&lt;br /&gt;
&lt;br /&gt;
== Getting it running ==&lt;br /&gt;
&lt;br /&gt;
Currently (29 March 2013) you can test our canvas-based GUI using the code from our {{srcbranchdir|saheb-canvas|}} branch. Tested with Ubuntu 12.04 32-bit.&lt;br /&gt;
&lt;br /&gt;
 cd ~&lt;br /&gt;
 sudo apt-get install python-gtksourceview2 python-setuptools&lt;br /&gt;
 # export http_proxy=...if required...&lt;br /&gt;
 # git config --global $http_proxy #...if required...&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas.git&lt;br /&gt;
 cd gaphas&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
 cd ..&lt;br /&gt;
 svn co svn://ascend4.org/code/branches/saheb-canvas ascend-canvas&lt;br /&gt;
 cd ~/ascend-canvas&lt;br /&gt;
 scons install INSTALL_PREFIX=/usr/local&lt;br /&gt;
 export LD_LIBRARY_PATH=~/ascend-canvas:/usr/local/lib&lt;br /&gt;
 export ASCENDLIBRARY=~/ascend-canvas/models:~/ascend-canvas/solvers/qrslv&lt;br /&gt;
 pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
During the above process make sure you have setuptools-git 0.4.2, because installing Gaphas requires version 0.4.2. Direclty using apt-get, you will get the newer version 0.6.2 that is stored in ubuntu 12.04 repository.&lt;br /&gt;
&lt;br /&gt;
P.S.- Note that this does &#039;&#039;not&#039;&#039; include the recent &#039;libavoid&#039; enhancements to Gaphas. You can try [[using Gaphas with libavoid]] for that, but don&#039;t expect immediate success.&lt;br /&gt;
&lt;br /&gt;
== Progress report ==&lt;br /&gt;
=== May - August 2012 === &lt;br /&gt;
&lt;br /&gt;
Saheb - I will add it soon, till then you can refer to my page for current status of canvas based modeller. [[User:Saheb|Saheb]]&lt;br /&gt;
&lt;br /&gt;
=== Mar 2011 ===&lt;br /&gt;
&lt;br /&gt;
Arjan Molenaar has incorporated Michael Wybrow&#039;s [[Using Gaphas with libavoid|libavoid into Gaphas]]. This improves the ability to write nice diagrams where lines do not cross over in front of blocks, but instead route around them automatically.&lt;br /&gt;
&lt;br /&gt;
=== Previous ===&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; Recent changes (svn trunk r2819) have restored the functioning of the Canvas GUI. You must be sure to use latest Gaphas&#039;&#039; (&amp;lt;tt&amp;gt;git clone http://github.com/amolenaar/gaphas.git &amp;amp;&amp;amp; cd gaphas &amp;amp;&amp;amp; sudo python setup.py install&amp;lt;/tt&amp;gt; &#039;&#039;).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
We have got a basically-functional &#039;canvas&#039; widget now based on [[Gaphas]], with &#039;blocks&#039;, &#039;ports&#039; and connector lines (see figure). A &#039;palette&#039; is created based on markup of ASCEND models in the model library with NOTES as specified below. Blocks can be created by clicking in the palette then clicking in the canvas. And connector lines are created by draging from one &#039;port&#039; to another. Blocks can be saved and restored, using Python Pickle functionality.&lt;br /&gt;
&lt;br /&gt;
Canvas models can now be exported to the solver and ASCEND can attempt to solve them. However, there is currently no means for setting the parameters of Blocks, so there is no simple way of using a canvas model to solve specific problems. There is also not yet any way of viewing the resulting solution!&lt;br /&gt;
&lt;br /&gt;
We &#039;mark up&#039; MODELs as being blocks suitable for canvas-based modelling, using the [[NOTES]] framework. We can mark blocks, and also mark variables within them as being inputs or outputs, as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;a4c&amp;quot;&amp;gt;MODEL pump_simple;&lt;br /&gt;
    ADD NOTES&lt;br /&gt;
        &#039;block&#039; SELF {Simple model of a pump}&lt;br /&gt;
&lt;br /&gt;
    END NOTES;&lt;br /&gt;
    inlet &amp;quot;in:&amp;quot; IS_A stream;&lt;br /&gt;
    outlet &amp;quot;out:&amp;quot; IS_A stream;&lt;br /&gt;
&lt;br /&gt;
    inlet.mdot, outlet.mdot ARE_THE_SAME;&lt;br /&gt;
    dp IS_A delta_pressure;&lt;br /&gt;
&lt;br /&gt;
    outlet.p = inlet.p + dp;&lt;br /&gt;
END pump_simple;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Metadata currently implemented is &lt;br /&gt;
&lt;br /&gt;
* name for the block (via NOTE of lang &#039;block&#039;, also is used to tell ASCEND that the object is indeed a block)&lt;br /&gt;
* what variables are the &#039;inputs&#039; (via inline NOTES starting with &#039;in:&#039;)&lt;br /&gt;
* what variables are the &#039;outputs&#039; (via inline NOTES starting with &#039;out:&#039;)&lt;br /&gt;
* what variables are parameters for a particular block (via inline NOTES starting with &#039;param:&#039;)&lt;br /&gt;
* icon used to display the block in the block palette (via NOTE with lang &#039;icon&#039;)&lt;br /&gt;
&lt;br /&gt;
=== Two possible approaches to canvas-based models ===&lt;br /&gt;
&lt;br /&gt;
There were two choices of ways that canvas-based &#039;blocks&#039; could be declared using the ASCEND modelling language: parametric models or non-parametric models, which are shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;a4c&amp;quot;&amp;gt;(* parametric model *)&lt;br /&gt;
MODEL pipesegment(&lt;br /&gt;
    inlet &amp;quot;in:&amp;quot; WILL_BE stream;&lt;br /&gt;
&lt;br /&gt;
    output &amp;quot;out:&amp;quot; WILL_BE stream;&lt;br /&gt;
    dp WILL_BE delta_pressure;&lt;br /&gt;
&lt;br /&gt;
);&lt;br /&gt;
    inlet.h = outlet.h;&lt;br /&gt;
    inlet.p + dp = outlet.p;&lt;br /&gt;
&lt;br /&gt;
END pipesegment;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;a4c&amp;quot;&amp;gt;(* non-parametric model *)&lt;br /&gt;
MODEL pipesegment;&lt;br /&gt;
&lt;br /&gt;
    inlet &amp;quot;in:&amp;quot; IS_A stream;&lt;br /&gt;
    output &amp;quot;out:&amp;quot; IS_A stream;&lt;br /&gt;
&lt;br /&gt;
    dp &amp;quot;param:&amp;quot; IS_A delta_pressure;&lt;br /&gt;
    inlet.h = outlet.h;&lt;br /&gt;
&lt;br /&gt;
    inlet.p + dp = outlet.p;&lt;br /&gt;
END pipesegment;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the first case, the pipesegment model does not contain all the necessary variables, and it is not possible to create the pipesegment object without first creating the necessary parameter models &#039;inlet&#039; and &#039;outlet&#039;. On the other hand, this type of model is clearer in some ways because it effectively makes a distinction between &#039;private&#039; (internal) variables and &#039;interface&#039; variables (the ones that define its relationship with other models).&lt;br /&gt;
&lt;br /&gt;
=== Problem with &#039;ARE_THE_SAME&#039; in parametric models ===&lt;br /&gt;
&lt;br /&gt;
In order to make models smaller, sometimes it&#039;s desirable to use [[ARE_THE_SAME]] to wire up variables that will always be the same, for example the mass flowrate into a unit and the mass flow rate out of the unit, in the case where there is no mass holdup. There are cases where it is mathematically preferable to use &#039;=&#039; instead of merging two variables, but it&#039;s nice to have the flexibility to choose between these.&lt;br /&gt;
&lt;br /&gt;
The problem with using parametric models, though, is that it&#039;s not possible to merge parameter variables inside a parametric model, because this is not implemented or supported in the ASCEND compiler.&lt;br /&gt;
&lt;br /&gt;
=== Problem with &#039;equality loops&#039; ===&lt;br /&gt;
&lt;br /&gt;
When wiring up loops of variables, such as constant flow rate through a loop, one cannot use &#039;=&#039; relations, because the system ends up overspecified. We would need a special solver to eliminate the unnecessary constraint, eg when three items are wired up in a constant-flow-rate loop:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;a4c&amp;quot;&amp;gt;mdot1 = mdot2;&lt;br /&gt;
mdot2 = mdot3;&lt;br /&gt;
mdot3 = mdot1; (* this equation is a redundant *)&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the other hand, using ARE_THE_SAME eliminates this problem, and rather than an overconstrained system, we just end up with one free variable:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;a4c&amp;quot;&amp;gt;mdot1, mdot2 ARE_THE_SAME;&lt;br /&gt;
mdot2, mdot3 ARE_THE_SAME;&lt;br /&gt;
&lt;br /&gt;
mdot3, mdot1 ARE_THE_SAME; (* ASCEND ignores this one, because the variables are already the same *)&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although it is possible to design a solver such that the redundant equations are ignored, it was considered (by John) to perhaps be &#039;safer&#039; modelling practise to require the user to specify a &#039;square&#039; system without the solver having to ignore particular equations. So the ARE_THE_SAME system of wiring up models is currently preferred, but perhaps in future we will want to revisit this.&lt;br /&gt;
&lt;br /&gt;
=== Parameters for blocks ===&lt;br /&gt;
&lt;br /&gt;
In creating a canvas-based model, it is certainly not enough just to &#039;wire up&#039; blocks are then expect the resulting model to do something useful. Most blocks will need to have some parameters set. For example, a pump may need to have its flow-rate or output pressure specified; a boiler will need to have its fuel supply rate and efficiency specified. Some blocks will require many parameters. It is also possible that blocks may need to be able to be used in multiple &#039;modes&#039;, for example a pump may have its efficiency and speed specified, or perhaps its efficiency and volumetric flow rate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, the parameters that a block provides can be marked up with NOTES as shown&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;a4c&amp;quot;&amp;gt;MODEL pump;&lt;br /&gt;
    eta &amp;quot;param:isentropic efficiency&amp;quot; IS_A fraction;&lt;br /&gt;
&lt;br /&gt;
    f &amp;quot;param:rotational speed&amp;quot; IS_A inverse_time;&lt;br /&gt;
    (* ... *)&lt;br /&gt;
END pump;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In these cases, the canvas GUI can then specify (FIX and set) these variables in the resulting auto-generated MODEL. We still need to provide a GUI to allow the user to set and adjust these variables. It remains to determine what should happen in the case of multiple parameter &#039;modes&#039; for a model.&lt;br /&gt;
&lt;br /&gt;
=== Pickling to load/save canvasses ===&lt;br /&gt;
&lt;br /&gt;
We are using the Python &#039;pickle&#039; module to save and load canvas data. The models are loaded and saved divorced from and corresponding ASCEND instance data, in other words, they are a recipe for how to build up the ASCEND model, rather than a saved copy of the model itself. When the canvas is loaded, each block is &#039;reconnected&#039; to the appropriate ASCEND objects, such as TypeDescription objects for the MODEL which each Block represents.&lt;br /&gt;
&lt;br /&gt;
When we get further along, the pickles will also need to include the values of user-set parameters, and perhaps optionally the current solved value of the model, so that different canvases can be saved with different scenarios recorded therein.&lt;br /&gt;
&lt;br /&gt;
=== What do do about connections? ===&lt;br /&gt;
&lt;br /&gt;
When connecting two blocks together, up to now we have simply been providing ARE_THE_SAME statements to merge the two connector port sub-models. This approach is not fully general, and still leaves the possibility of equality loops in the model, for the case where, &#039;&#039;within the blocks&#039;&#039;&#039;, &amp;quot;=&amp;quot; statements are used to express equality between, for example, input and output flowrates in a block.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To allow dynamic models to be represented on the canvas, we can&#039;t expect to use ARE_THE_SAME statements within blocks, because that would eliminate the possibility of modelling mass holdups. So, we need to think about using another kind of model generation that fixes this problem relating to the degrees of freedom in models generated from the canvas GUI. We&#039;re still discussing a solution.&lt;br /&gt;
&lt;br /&gt;
=== Zoom and Pan ===&lt;br /&gt;
&lt;br /&gt;
The canvas currently supports some mouse-friendly zoom and pan manipulations:&lt;br /&gt;
&lt;br /&gt;
* Zoom using ctrl+wheel&lt;br /&gt;
* Pan using middle-button drag&lt;br /&gt;
* Zoom using ctrl+middle-button drag (up and down) (this option is provided for easier use on laptops with trackpads)&lt;br /&gt;
* Pan up and down using mouse wheel.&lt;br /&gt;
&lt;br /&gt;
We still need to implement support for zoom-to-fit in the GUI.&lt;br /&gt;
&lt;br /&gt;
== Next steps ==&lt;br /&gt;
&lt;br /&gt;
It remains to implement:&lt;br /&gt;
&lt;br /&gt;
* what do do where there is are multiple &#039;parameter modes&#039; for the model.&lt;br /&gt;
* what to do about &#039;constants&#039; in the model, eg when specifying a fluid, what fluid is to be used? when specifying a [[data reader]] block, what is the input file?&lt;br /&gt;
* customisable appearance of the block (perhaps via a NOTE of lang &#039;graphic&#039;, which might point to an SVG file, for example?)&lt;br /&gt;
* an alternative way of specifying inputs and outputs that doesn&#039;t use inline NOTES (eg a NOTE lang named &#039;in&#039;, perhaps? Would allow inputs to be declared elsewhere from the model itself.&lt;br /&gt;
* type-checking to ensure that only compatible ports are connected (this is not straightforward, could be done by exporting to the compiler and checking for error messages?)&lt;br /&gt;
&lt;br /&gt;
== Loading, saving and solving canvas-based models ==&lt;br /&gt;
&lt;br /&gt;
The above contains the minimal data required for the [[Library]] to be parsed and a &#039;palette&#039; of available model &#039;blocks&#039; presented to the user. The next question is: how should the resulting model be loaded, saved, and solved?&lt;br /&gt;
&lt;br /&gt;
For the canvas-based model the essential data structures would contain&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:solid 1pt #DDDDDD; width:40em&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* list of modules used in the canvas&lt;br /&gt;
* list of blocks&lt;br /&gt;
** type of each block&lt;br /&gt;
** size and position of the block on the canvas&lt;br /&gt;
** name of the block&lt;br /&gt;
** block styling: colour, style?&lt;br /&gt;
** type of each block&lt;br /&gt;
** size and position of the block on the canvas&lt;br /&gt;
** name of the block&lt;br /&gt;
** block styling: colour, style?&lt;br /&gt;
* type of each block&lt;br /&gt;
* size and position of the block on the canvas&lt;br /&gt;
* name of the block&lt;br /&gt;
* block styling: colour, style?&lt;br /&gt;
* list of connections&lt;br /&gt;
** starting block and port (as blockname.portname)&lt;br /&gt;
** ending block and port&lt;br /&gt;
** line routing (a series of x,y points)&lt;br /&gt;
** line styling: colour, width, etc?&lt;br /&gt;
** starting block and port (as blockname.portname)&lt;br /&gt;
** ending block and port&lt;br /&gt;
** line routing (a series of x,y points)&lt;br /&gt;
** line styling: colour, width, etc?&lt;br /&gt;
* starting block and port (as blockname.portname)&lt;br /&gt;
* ending block and port&lt;br /&gt;
* line routing (a series of x,y points)&lt;br /&gt;
* line styling: colour, width, etc?&lt;br /&gt;
* list of other canvas objects&lt;br /&gt;
** text labels, headings etc&lt;br /&gt;
** possible &#039;output cells&#039; that report current values of variables in the model&lt;br /&gt;
** possible &#039;method buttons&#039; that run methods on the model.&lt;br /&gt;
** possible &#039;input cells&#039; that allow variable values to be specified&lt;br /&gt;
** text labels, headings etc&lt;br /&gt;
** possible &#039;output cells&#039; that report current values of variables in the model&lt;br /&gt;
** possible &#039;method buttons&#039; that run methods on the model.&lt;br /&gt;
** possible &#039;input cells&#039; that allow variable values to be specified&lt;br /&gt;
* text labels, headings etc&lt;br /&gt;
* possible &#039;output cells&#039; that report current values of variables in the model&lt;br /&gt;
* possible &#039;method buttons&#039; that run methods on the model.&lt;br /&gt;
* possible &#039;input cells&#039; that allow variable values to be specified&lt;br /&gt;
* list of parameter values&lt;br /&gt;
** block to which the parameter blocks (maybe recursive).&lt;br /&gt;
** value of the parameter.&lt;br /&gt;
** units in which parameter has been specified.&lt;br /&gt;
** block to which the parameter blocks (maybe recursive).&lt;br /&gt;
** value of the parameter.&lt;br /&gt;
** units in which parameter has been specified.&lt;br /&gt;
* block to which the parameter blocks (maybe recursive).&lt;br /&gt;
* value of the parameter.&lt;br /&gt;
* units in which parameter has been specified.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the above information it would be possible to save and reload a canvas-based model without loss of information, but note that the model would still have to be solved; it would not be saving the full state. It would have to be assumed that the model library upon which the canvas was based had not changed; certain debugging would be required to ensure that such a situation didn&#039;t result in a corrupted canvas-model. The above data might possibly be stored in a new file format &#039;.a4g&#039; specific to canvas-based modelling. (We could see the &#039;.a4g&#039; format as a sub-type of the &#039;.a4c&#039; format (in which case the above metadata might be embedded in NOTES, or similar?)&lt;br /&gt;
&lt;br /&gt;
To solve a model with the above information, the approach would depend on whether the parametric or non-parametric modelling style is chosen. &lt;br /&gt;
&lt;br /&gt;
For the parametric style, we would need to create definitions of the different streams &#039;&#039;before&#039;&#039; the blocks could be declared. This could lead to some ambiguity in the way that different streams are initialised, possible.&lt;br /&gt;
&lt;br /&gt;
For the non-parametric style, we would only need to declare the blocks using [[IS_A]], then declare the connections using [[ARE_THE_SAME]]. We would want to have some sort of hierarchical system of [[METHODS]] to ensure that the necessary variables were FIXed and initialised for each block in the model (similar to the proposed &#039;default_self&#039; recursion that is currently a bit broken).&lt;br /&gt;
&lt;br /&gt;
There need to be some protocols about how the model would be intialised, in any case.&lt;br /&gt;
&lt;br /&gt;
It should be possible to re-solve the model after the user changes a value of a parameter. This would mean that canvas-gui would have exported the model to the solver, and would then know how its blocks corresponded to variables in the model, and would call var_fixed or similar routines via the &#039;libascend&#039; API.&lt;br /&gt;
&lt;br /&gt;
It appears that the right approach would be for the canvas-based GUI to generate a string or file-based representation of the model it has in member, using the above hierarchy of objects (modules, blocks, connectors, but &#039;&#039;not&#039;&#039; parameter values), then to instruct ASCEND to load that model, then to [[FIX]] and set the values of the parameters, then attempt to &#039;solve&#039; the model. This might be done in cooperation with the existing PyGTK GUI, or might be done directly with calls to the libascend engine. the canvas-based GUI would have no awareness of the variables it contained other than that provided by the connector end-point names and the parameter names. Using those names it would be able to get/set values in the simulation.&lt;br /&gt;
&lt;br /&gt;
It would be possible to avoid the need for the canvas GUI to be able to [[FIX]] or [[FREE]] variables in the model. When a &#039;source&#039; block was required, it could be set up as a new &#039;block&#039; and the necessary un-FIXed variables left as parameters to the model. Changing the source block to another type would allow other parameters to be fixed. When greater flexibility was required, the user could switch to the non-canvas GUI.&lt;br /&gt;
&lt;br /&gt;
== Design considerations ==&lt;br /&gt;
&lt;br /&gt;
Do connections have properties and variables that need to be accessible, or is it always OK to access those variables/values via the connected blocks at either end?&lt;br /&gt;
&lt;br /&gt;
What to do with the standard [[METHODS]] like  [[Specify]], [[Default self]], [[Values]]?&lt;br /&gt;
&lt;br /&gt;
How can we store the current state of the model? Should we try to do that?&lt;br /&gt;
&lt;br /&gt;
How do we keep track of the fixed/free variables? Do we need to?&lt;br /&gt;
&lt;br /&gt;
What about clashes between the [[Values]] methods in different submodels setting values on their &#039;connection&#039; members. Is this the corner-case that makes the parametric approach more desirable? Or does that not actually solve the problem?&lt;br /&gt;
&lt;br /&gt;
How can the canvas modeller determine when a model is &#039;complete&#039;?&lt;br /&gt;
&lt;br /&gt;
Is it OK to leave dangling lines?&lt;br /&gt;
&lt;br /&gt;
Is it OK to leave unconnected &#039;ports&#039; on the sub-models?&lt;br /&gt;
&lt;br /&gt;
Is it better to use &#039;=&#039; relationships instead of ARE_THE_SAME? It seems that in some cases this leads to models that solve more reliably.&lt;br /&gt;
&lt;br /&gt;
Line routing is tricky and something that is not often done well. Could use some cool [http://immi.inesc-id.pt/cali/applications.html calligraphic code] to make this work better&lt;br /&gt;
&lt;br /&gt;
Could it be possible to highlight parts of the flowsheet corresponding to solved and un-solved portions of the model?&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
&lt;br /&gt;
[[Image:Freeda-screenshot.jpg|thumb|right|307px|The canvas-based model of [http://www.freeda.org/ fREEDA], an electrical circuit simulator. This canvas is based on [http://trolltech.com/downloads/opensource Qt].]]&lt;br /&gt;
[[Image:Gaphor-screenshot.png|thumb|right|307px|Screenshot from [http://gaphor.sourceforge.net/ Gaphor] a [http://en.wikipedia.org/wiki/Unified_Modeling_Language UML] tool. This canvas is pure Python on top of Cairo.]]&lt;br /&gt;
Programs that implement these types of GUIs include&lt;br /&gt;
&lt;br /&gt;
* [http://gaphor.sourceforge.net/ Gaphor], written in pure python, uses [[Gaphas]] on top of [http://www.cairographics.org/ Cairo].&lt;br /&gt;
* [http://www.freeda.org/ fREEDA] ([http://www.freeda.org/screenshots.html screenshot]) (FOSS, Windows-based, uses a [http://en.wikipedia.org/wiki/Qt_(toolkit) Qt] canvas widget)&lt;br /&gt;
* [http://www.geda.seul.org/ gEDA]&#039;s schematic editor, [http://www.geda.seul.org/tools/gschem/ gschem] is a GPLed GTK+ application that appears to use its own bespoke canvas implementation ([http://www.geda.seul.org/screenshots/ screenshots]). In a very quick and superficial test-drive, it appeared to be a little clumsy to use -- hard to identify when a connection has successfully been made, and fairly dated bitmap-style graphics.&lt;br /&gt;
* [http://www.lis.inpg.fr/realise_au_lis/kicad/ kicad] is another free electronic circuit schematic editor.&lt;br /&gt;
* [http://opencircuitdesign.com/xcircuit/index.html XCircuit] is a Tcl/Tk-based circuit editor.&lt;br /&gt;
* TRNSYS, Simulink, Visio, Dia, OOo Draw&lt;br /&gt;
* [http://kepler-project.org/ Kepler] (nice multi-domain canvas-based simulation, in Java)&lt;br /&gt;
* [http://www.cocosimulator.org/index.html COCO simulator] (windows, closed-source freeward)&lt;br /&gt;
* [http://www.conduit-project.org/wiki/Screenshots Conduit] (uses goocanvas)&lt;br /&gt;
* [http://www.gnome.org/projects/dia/ Dia] (seems to use GnomeCanvas?)&lt;br /&gt;
* [http://gstreamer.freedesktop.org/modules/gst-editor.html GStreamer Editor] (uses GnomeCanvas)&lt;br /&gt;
* [http://dwsim.inforside.com.br/ DWSIM] (sequential-modular simulator implemented in VB.net)&lt;br /&gt;
* Dunnart (testbed for libavoid)&lt;br /&gt;
* Inkscape (apparently includes support for libavoid, for automatic connector routing)&lt;br /&gt;
* [http://jmcad.sourceforge.net/ JMCAD] (java-based tool, seems to focus on nonlinear control)&lt;br /&gt;
* [https://sourceforge.net/apps/mediawiki/flowdesigner/index.php?title=Main_Page FlowDesigner] (used Qt, written in C++)&lt;br /&gt;
* [http://gnuradio.org/redmine/projects/gnuradio/wiki/GNURadioCompanion GNU Radio Companion] ([http://www.joshknows.com/grc#screenshots screenshots here) Allows connection of signal processing pipelines for software radio projects. Has dependencies on wxGTK and also QT, not sure how its GUI works.&lt;br /&gt;
&lt;br /&gt;
Software libraries that could be used for this functionality (most are discuss [http://live.gnome.org/ProjectRidley/CanvasOverview here]):&lt;br /&gt;
&lt;br /&gt;
* [[Gaphas]] (uses only Cairo, via pure Python)&lt;br /&gt;
* [http://live.gnome.org/ProjectRidley/CanvasOverview/Canvases/#goocanvas GooCanvas] (uses Cairo inside)&lt;br /&gt;
* [http://developer.gnome.org/doc/books/WGA/gnome-canvas.html GnomeCanvas] (not sure if it&#039;s deprecated yet or not, uses libart inside)&lt;br /&gt;
* [http://live.gnome.org/Criawips/CriaCanvas libccc/CriaCanvas] (uses Cairo inside)&lt;br /&gt;
* [http://www.cairographics.org/ Cairo] (directly)&lt;br /&gt;
* [http://www-eleves-isia.cma.fr/documentation/OpenInventorDoc/SoGtk/classSoGtk.html SoGTK] (use the OpenInventor 3D scenegraph for 2D work here?)&lt;br /&gt;
* Papyrus&lt;br /&gt;
* [http://adaptagrams.sourceforge.net/libavoid/ libavoid] (automatic connector-line routing including obstacle avoidance)&lt;br /&gt;
&lt;br /&gt;
... it needs to be something that works within GTK and perhaps also PyGTK.&lt;br /&gt;
... we want to choose something that will be around for a while. The only canvas widgets from the above that is in Ubuntu and linked against are GooCanvas and GnomeCanvas, with GnomeCanvas being much more used than GooCanvas. libccc is available in Ubuntu but noone is linking against it yet (as of Hardy release)&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=Canvas-based_modeller_for_ASCEND&amp;diff=4140</id>
		<title>Canvas-based modeller for ASCEND</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=Canvas-based_modeller_for_ASCEND&amp;diff=4140"/>
		<updated>2013-03-29T06:51:48Z</updated>

		<summary type="html">&lt;p&gt;Saheb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{task}}&lt;br /&gt;
[[Image:Gaphas-blocks.png|thumb|right|400px|Screenshot of the prototype Gaphas-based canvas for ASCEND]]&lt;br /&gt;
Many [[Other modelling tools|other modelling environments]] provide a graphical flowsheet modeller, or &#039;canvas&#039; onto which unit operations are arranged to create a process flow diagram (PFD). &#039;&#039;&#039;We would like to be able to do this in ASCEND too.&#039;&#039;&#039; The work on this was started by [[John Pye]], continued in [[GSOC2009]] by [[User:Arijit|Arijit]], and then as part of [[GSOC2010]] and [[GSOC2011]] by [[User:Grivan|Grivan]], and then as part of [[GSOC2012]] by [[User:Saheb|Saheb]]. We work closely with [[Arjan Molenaar]]. The current goals are:&lt;br /&gt;
&lt;br /&gt;
* fix and test our model load/save functionality (Grivan)&lt;br /&gt;
* &amp;lt;strike&amp;gt;add support for custom-shaped blocks&amp;lt;/strike&amp;gt; (Done - Saheb)&lt;br /&gt;
* improve our parameter-setting dialog&lt;br /&gt;
* test with some more detailed flowsheets&lt;br /&gt;
* add support for annotations on flowsheets&lt;br /&gt;
* add support for reporting variable values on the flowsheet&lt;br /&gt;
* &amp;lt;strike style=&amp;quot;color:green&amp;quot;&amp;gt;create a new empty flowsheet&amp;lt;/strike&amp;gt; &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;(done)&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;strike style=&amp;quot;color:green&amp;quot;&amp;gt;plop &#039;blocks&#039; onto a canvas to represent various &#039;unit operations&#039; such as tank, turbine, pump, column, resistor, capacity, actuator, motor, etc.&amp;lt;/strike&amp;gt; &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;(done)&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;strike style=&amp;quot;color:green&amp;quot;&amp;gt;wire up the &#039;ports&#039; on these blocks using &#039;connectors&#039; that would correspond to &#039;streams&#039; with multiple variables and parameters within them, such as a steam flow, or single variables such as a voltage signal.&amp;lt;/strike&amp;gt; &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;(done)&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;strike style=&amp;quot;color:green&amp;quot;&amp;gt;view and edit parameters for the blocks in order to make adjustments to the system design.&amp;lt;/strike&amp;gt;&lt;br /&gt;
* view and edit constants and sets for the model (eg name of the fluid in a stream).&lt;br /&gt;
* solve the model: &amp;lt;strike style=&amp;quot;color:green&amp;quot;&amp;gt;export to solver&amp;lt;/strike&amp;gt;, give error message feedback, create linkage between blocks and solver vars. &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;(partially done)&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;strike style=&amp;quot;color:green&amp;quot;&amp;gt;see graphically the parts of the model which have not converged or which are out-of-bounds.&amp;lt;/strike&amp;gt; &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;(done)&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;strike style=&amp;quot;color:green&amp;quot;&amp;gt;view the values of variables within the blocks once it has solved&amp;lt;/strike&amp;gt; &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;(done)&amp;lt;/span&amp;gt;&lt;br /&gt;
* &amp;lt;strike style=&amp;quot;color:green&amp;quot;&amp;gt;save the flowsheet in such a way that when reloaded, it can again be solved afresh.&amp;lt;/strike&amp;gt; &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;(done)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Split-brayton-cycle-config.png|thumb|right|400px|Typical energy system diagram of the sort we would like to work with &#039;live&#039; in this modeller.]]&lt;br /&gt;
&lt;br /&gt;
== Getting it running ==&lt;br /&gt;
&lt;br /&gt;
Currently (29 March 2013) you can test our canvas-based GUI using the code from our {{srcbranchdir|saheb-canvas|}} branch. Tested with Ubuntu 12.04 32-bit.&lt;br /&gt;
&lt;br /&gt;
 cd ~&lt;br /&gt;
 sudo apt-get install python-gtksourceview2 python-setuptools&lt;br /&gt;
 # export http_proxy=...if required...&lt;br /&gt;
 # git config --global $http_proxy #...if required...&lt;br /&gt;
 git clone https://github.com/amolenaar/gaphas.git&lt;br /&gt;
 cd gaphas&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
 cd ..&lt;br /&gt;
 svn co svn://ascend4.org/code/branches/saheb-canvas ascend-canvas&lt;br /&gt;
 cd ~/ascend-canvas&lt;br /&gt;
 scons install INSTALL_PREFIX=/usr/local&lt;br /&gt;
 export LD_LIBRARY_PATH=~/ascend-canvas:/usr/local/lib&lt;br /&gt;
 export ASCENDLIBRARY=~/ascend-canvas/models:~/ascend-canvas/solvers/qrslv&lt;br /&gt;
 pygtk/canvas/canvas.py&lt;br /&gt;
&lt;br /&gt;
During the above process make sure you have setuptools-git 0.4.2, because installing Gaphas requires version 0.4.2. Direclty using apt-get, you will get the newer version 0.6.2 that is stored in ubuntu 12.04 repository.&lt;br /&gt;
&lt;br /&gt;
P.S.- Note that this does &#039;&#039;not&#039;&#039; include the recent &#039;libavoid&#039; enhancements to Gaphas. You can try [[using Gaphas with libavoid]] for that, but don&#039;t expect immediate success.&lt;br /&gt;
&lt;br /&gt;
== Progress report ==&lt;br /&gt;
=== May - August 2012 === &lt;br /&gt;
&lt;br /&gt;
Saheb - I will add it soon, till then you can refer to my page for current status of canvas based modeller. [[User:Saheb|Saheb]]&lt;br /&gt;
&lt;br /&gt;
=== Mar 2011 ===&lt;br /&gt;
&lt;br /&gt;
Arjan Molenaar has incorporated Michael Wybrow&#039;s [[Using Gaphas with libavoid|libavoid into Gaphas]]. This improves the ability to write nice diagrams where lines do not cross over in front of blocks, but instead route around them automatically.&lt;br /&gt;
&lt;br /&gt;
=== Previous ===&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; Recent changes (svn trunk r2819) have restored the functioning of the Canvas GUI. You must be sure to use latest Gaphas&#039;&#039; (&amp;lt;tt&amp;gt;git clone http://github.com/amolenaar/gaphas.git &amp;amp;&amp;amp; cd gaphas &amp;amp;&amp;amp; sudo python setup.py install&amp;lt;/tt&amp;gt; &#039;&#039;).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
We have got a basically-functional &#039;canvas&#039; widget now based on [[Gaphas]], with &#039;blocks&#039;, &#039;ports&#039; and connector lines (see figure). A &#039;palette&#039; is created based on markup of ASCEND models in the model library with NOTES as specified below. Blocks can be created by clicking in the palette then clicking in the canvas. And connector lines are created by draging from one &#039;port&#039; to another. Blocks can be saved and restored, using Python Pickle functionality.&lt;br /&gt;
&lt;br /&gt;
Canvas models can now be exported to the solver and ASCEND can attempt to solve them. However, there is currently no means for setting the parameters of Blocks, so there is no simple way of using a canvas model to solve specific problems. There is also not yet any way of viewing the resulting solution!&lt;br /&gt;
&lt;br /&gt;
We &#039;mark up&#039; MODELs as being blocks suitable for canvas-based modelling, using the [[NOTES]] framework. We can mark blocks, and also mark variables within them as being inputs or outputs, as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;a4c&amp;quot;&amp;gt;MODEL pump_simple;&lt;br /&gt;
    ADD NOTES&lt;br /&gt;
        &#039;block&#039; SELF {Simple model of a pump}&lt;br /&gt;
&lt;br /&gt;
    END NOTES;&lt;br /&gt;
    inlet &amp;quot;in:&amp;quot; IS_A stream;&lt;br /&gt;
    outlet &amp;quot;out:&amp;quot; IS_A stream;&lt;br /&gt;
&lt;br /&gt;
    inlet.mdot, outlet.mdot ARE_THE_SAME;&lt;br /&gt;
    dp IS_A delta_pressure;&lt;br /&gt;
&lt;br /&gt;
    outlet.p = inlet.p + dp;&lt;br /&gt;
END pump_simple;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Metadata currently implemented is &lt;br /&gt;
&lt;br /&gt;
* name for the block (via NOTE of lang &#039;block&#039;, also is used to tell ASCEND that the object is indeed a block)&lt;br /&gt;
* what variables are the &#039;inputs&#039; (via inline NOTES starting with &#039;in:&#039;)&lt;br /&gt;
* what variables are the &#039;outputs&#039; (via inline NOTES starting with &#039;out:&#039;)&lt;br /&gt;
* what variables are parameters for a particular block (via inline NOTES starting with &#039;param:&#039;)&lt;br /&gt;
* icon used to display the block in the block palette (via NOTE with lang &#039;icon&#039;)&lt;br /&gt;
&lt;br /&gt;
=== Two possible approaches to canvas-based models ===&lt;br /&gt;
&lt;br /&gt;
There were two choices of ways that canvas-based &#039;blocks&#039; could be declared using the ASCEND modelling language: parametric models or non-parametric models, which are shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;a4c&amp;quot;&amp;gt;(* parametric model *)&lt;br /&gt;
MODEL pipesegment(&lt;br /&gt;
    inlet &amp;quot;in:&amp;quot; WILL_BE stream;&lt;br /&gt;
&lt;br /&gt;
    output &amp;quot;out:&amp;quot; WILL_BE stream;&lt;br /&gt;
    dp WILL_BE delta_pressure;&lt;br /&gt;
&lt;br /&gt;
);&lt;br /&gt;
    inlet.h = outlet.h;&lt;br /&gt;
    inlet.p + dp = outlet.p;&lt;br /&gt;
&lt;br /&gt;
END pipesegment;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;a4c&amp;quot;&amp;gt;(* non-parametric model *)&lt;br /&gt;
MODEL pipesegment;&lt;br /&gt;
&lt;br /&gt;
    inlet &amp;quot;in:&amp;quot; IS_A stream;&lt;br /&gt;
    output &amp;quot;out:&amp;quot; IS_A stream;&lt;br /&gt;
&lt;br /&gt;
    dp &amp;quot;param:&amp;quot; IS_A delta_pressure;&lt;br /&gt;
    inlet.h = outlet.h;&lt;br /&gt;
&lt;br /&gt;
    inlet.p + dp = outlet.p;&lt;br /&gt;
END pipesegment;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the first case, the pipesegment model does not contain all the necessary variables, and it is not possible to create the pipesegment object without first creating the necessary parameter models &#039;inlet&#039; and &#039;outlet&#039;. On the other hand, this type of model is clearer in some ways because it effectively makes a distinction between &#039;private&#039; (internal) variables and &#039;interface&#039; variables (the ones that define its relationship with other models).&lt;br /&gt;
&lt;br /&gt;
=== Problem with &#039;ARE_THE_SAME&#039; in parametric models ===&lt;br /&gt;
&lt;br /&gt;
In order to make models smaller, sometimes it&#039;s desirable to use [[ARE_THE_SAME]] to wire up variables that will always be the same, for example the mass flowrate into a unit and the mass flow rate out of the unit, in the case where there is no mass holdup. There are cases where it is mathematically preferable to use &#039;=&#039; instead of merging two variables, but it&#039;s nice to have the flexibility to choose between these.&lt;br /&gt;
&lt;br /&gt;
The problem with using parametric models, though, is that it&#039;s not possible to merge parameter variables inside a parametric model, because this is not implemented or supported in the ASCEND compiler.&lt;br /&gt;
&lt;br /&gt;
=== Problem with &#039;equality loops&#039; ===&lt;br /&gt;
&lt;br /&gt;
When wiring up loops of variables, such as constant flow rate through a loop, one cannot use &#039;=&#039; relations, because the system ends up overspecified. We would need a special solver to eliminate the unnecessary constraint, eg when three items are wired up in a constant-flow-rate loop:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;a4c&amp;quot;&amp;gt;mdot1 = mdot2;&lt;br /&gt;
mdot2 = mdot3;&lt;br /&gt;
mdot3 = mdot1; (* this equation is a redundant *)&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the other hand, using ARE_THE_SAME eliminates this problem, and rather than an overconstrained system, we just end up with one free variable:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;a4c&amp;quot;&amp;gt;mdot1, mdot2 ARE_THE_SAME;&lt;br /&gt;
mdot2, mdot3 ARE_THE_SAME;&lt;br /&gt;
&lt;br /&gt;
mdot3, mdot1 ARE_THE_SAME; (* ASCEND ignores this one, because the variables are already the same *)&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although it is possible to design a solver such that the redundant equations are ignored, it was considered (by John) to perhaps be &#039;safer&#039; modelling practise to require the user to specify a &#039;square&#039; system without the solver having to ignore particular equations. So the ARE_THE_SAME system of wiring up models is currently preferred, but perhaps in future we will want to revisit this.&lt;br /&gt;
&lt;br /&gt;
=== Parameters for blocks ===&lt;br /&gt;
&lt;br /&gt;
In creating a canvas-based model, it is certainly not enough just to &#039;wire up&#039; blocks are then expect the resulting model to do something useful. Most blocks will need to have some parameters set. For example, a pump may need to have its flow-rate or output pressure specified; a boiler will need to have its fuel supply rate and efficiency specified. Some blocks will require many parameters. It is also possible that blocks may need to be able to be used in multiple &#039;modes&#039;, for example a pump may have its efficiency and speed specified, or perhaps its efficiency and volumetric flow rate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, the parameters that a block provides can be marked up with NOTES as shown&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;a4c&amp;quot;&amp;gt;MODEL pump;&lt;br /&gt;
    eta &amp;quot;param:isentropic efficiency&amp;quot; IS_A fraction;&lt;br /&gt;
&lt;br /&gt;
    f &amp;quot;param:rotational speed&amp;quot; IS_A inverse_time;&lt;br /&gt;
    (* ... *)&lt;br /&gt;
END pump;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In these cases, the canvas GUI can then specify (FIX and set) these variables in the resulting auto-generated MODEL. We still need to provide a GUI to allow the user to set and adjust these variables. It remains to determine what should happen in the case of multiple parameter &#039;modes&#039; for a model.&lt;br /&gt;
&lt;br /&gt;
=== Pickling to load/save canvasses ===&lt;br /&gt;
&lt;br /&gt;
We are using the Python &#039;pickle&#039; module to save and load canvas data. The models are loaded and saved divorced from and corresponding ASCEND instance data, in other words, they are a recipe for how to build up the ASCEND model, rather than a saved copy of the model itself. When the canvas is loaded, each block is &#039;reconnected&#039; to the appropriate ASCEND objects, such as TypeDescription objects for the MODEL which each Block represents.&lt;br /&gt;
&lt;br /&gt;
When we get further along, the pickles will also need to include the values of user-set parameters, and perhaps optionally the current solved value of the model, so that different canvases can be saved with different scenarios recorded therein.&lt;br /&gt;
&lt;br /&gt;
=== What do do about connections? ===&lt;br /&gt;
&lt;br /&gt;
When connecting two blocks together, up to now we have simply been providing ARE_THE_SAME statements to merge the two connector port sub-models. This approach is not fully general, and still leaves the possibility of equality loops in the model, for the case where, &#039;&#039;within the blocks&#039;&#039;&#039;, &amp;quot;=&amp;quot; statements are used to express equality between, for example, input and output flowrates in a block.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To allow dynamic models to be represented on the canvas, we can&#039;t expect to use ARE_THE_SAME statements within blocks, because that would eliminate the possibility of modelling mass holdups. So, we need to think about using another kind of model generation that fixes this problem relating to the degrees of freedom in models generated from the canvas GUI. We&#039;re still discussing a solution.&lt;br /&gt;
&lt;br /&gt;
=== Zoom and Pan ===&lt;br /&gt;
&lt;br /&gt;
The canvas currently supports some mouse-friendly zoom and pan manipulations:&lt;br /&gt;
&lt;br /&gt;
* Zoom using ctrl+wheel&lt;br /&gt;
* Pan using middle-button drag&lt;br /&gt;
* Zoom using ctrl+middle-button drag (up and down) (this option is provided for easier use on laptops with trackpads)&lt;br /&gt;
* Pan up and down using mouse wheel.&lt;br /&gt;
&lt;br /&gt;
We still need to implement support for zoom-to-fit in the GUI.&lt;br /&gt;
&lt;br /&gt;
== Next steps ==&lt;br /&gt;
&lt;br /&gt;
It remains to implement:&lt;br /&gt;
&lt;br /&gt;
* what do do where there is are multiple &#039;parameter modes&#039; for the model.&lt;br /&gt;
* what to do about &#039;constants&#039; in the model, eg when specifying a fluid, what fluid is to be used? when specifying a [[data reader]] block, what is the input file?&lt;br /&gt;
* customisable appearance of the block (perhaps via a NOTE of lang &#039;graphic&#039;, which might point to an SVG file, for example?)&lt;br /&gt;
* an alternative way of specifying inputs and outputs that doesn&#039;t use inline NOTES (eg a NOTE lang named &#039;in&#039;, perhaps? Would allow inputs to be declared elsewhere from the model itself.&lt;br /&gt;
* type-checking to ensure that only compatible ports are connected (this is not straightforward, could be done by exporting to the compiler and checking for error messages?)&lt;br /&gt;
&lt;br /&gt;
== Loading, saving and solving canvas-based models ==&lt;br /&gt;
&lt;br /&gt;
The above contains the minimal data required for the [[Library]] to be parsed and a &#039;palette&#039; of available model &#039;blocks&#039; presented to the user. The next question is: how should the resulting model be loaded, saved, and solved?&lt;br /&gt;
&lt;br /&gt;
For the canvas-based model the essential data structures would contain&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:solid 1pt #DDDDDD; width:40em&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* list of modules used in the canvas&lt;br /&gt;
* list of blocks&lt;br /&gt;
** type of each block&lt;br /&gt;
** size and position of the block on the canvas&lt;br /&gt;
** name of the block&lt;br /&gt;
** block styling: colour, style?&lt;br /&gt;
** type of each block&lt;br /&gt;
** size and position of the block on the canvas&lt;br /&gt;
** name of the block&lt;br /&gt;
** block styling: colour, style?&lt;br /&gt;
* type of each block&lt;br /&gt;
* size and position of the block on the canvas&lt;br /&gt;
* name of the block&lt;br /&gt;
* block styling: colour, style?&lt;br /&gt;
* list of connections&lt;br /&gt;
** starting block and port (as blockname.portname)&lt;br /&gt;
** ending block and port&lt;br /&gt;
** line routing (a series of x,y points)&lt;br /&gt;
** line styling: colour, width, etc?&lt;br /&gt;
** starting block and port (as blockname.portname)&lt;br /&gt;
** ending block and port&lt;br /&gt;
** line routing (a series of x,y points)&lt;br /&gt;
** line styling: colour, width, etc?&lt;br /&gt;
* starting block and port (as blockname.portname)&lt;br /&gt;
* ending block and port&lt;br /&gt;
* line routing (a series of x,y points)&lt;br /&gt;
* line styling: colour, width, etc?&lt;br /&gt;
* list of other canvas objects&lt;br /&gt;
** text labels, headings etc&lt;br /&gt;
** possible &#039;output cells&#039; that report current values of variables in the model&lt;br /&gt;
** possible &#039;method buttons&#039; that run methods on the model.&lt;br /&gt;
** possible &#039;input cells&#039; that allow variable values to be specified&lt;br /&gt;
** text labels, headings etc&lt;br /&gt;
** possible &#039;output cells&#039; that report current values of variables in the model&lt;br /&gt;
** possible &#039;method buttons&#039; that run methods on the model.&lt;br /&gt;
** possible &#039;input cells&#039; that allow variable values to be specified&lt;br /&gt;
* text labels, headings etc&lt;br /&gt;
* possible &#039;output cells&#039; that report current values of variables in the model&lt;br /&gt;
* possible &#039;method buttons&#039; that run methods on the model.&lt;br /&gt;
* possible &#039;input cells&#039; that allow variable values to be specified&lt;br /&gt;
* list of parameter values&lt;br /&gt;
** block to which the parameter blocks (maybe recursive).&lt;br /&gt;
** value of the parameter.&lt;br /&gt;
** units in which parameter has been specified.&lt;br /&gt;
** block to which the parameter blocks (maybe recursive).&lt;br /&gt;
** value of the parameter.&lt;br /&gt;
** units in which parameter has been specified.&lt;br /&gt;
* block to which the parameter blocks (maybe recursive).&lt;br /&gt;
* value of the parameter.&lt;br /&gt;
* units in which parameter has been specified.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the above information it would be possible to save and reload a canvas-based model without loss of information, but note that the model would still have to be solved; it would not be saving the full state. It would have to be assumed that the model library upon which the canvas was based had not changed; certain debugging would be required to ensure that such a situation didn&#039;t result in a corrupted canvas-model. The above data might possibly be stored in a new file format &#039;.a4g&#039; specific to canvas-based modelling. (We could see the &#039;.a4g&#039; format as a sub-type of the &#039;.a4c&#039; format (in which case the above metadata might be embedded in NOTES, or similar?)&lt;br /&gt;
&lt;br /&gt;
To solve a model with the above information, the approach would depend on whether the parametric or non-parametric modelling style is chosen. &lt;br /&gt;
&lt;br /&gt;
For the parametric style, we would need to create definitions of the different streams &#039;&#039;before&#039;&#039; the blocks could be declared. This could lead to some ambiguity in the way that different streams are initialised, possible.&lt;br /&gt;
&lt;br /&gt;
For the non-parametric style, we would only need to declare the blocks using [[IS_A]], then declare the connections using [[ARE_THE_SAME]]. We would want to have some sort of hierarchical system of [[METHODS]] to ensure that the necessary variables were FIXed and initialised for each block in the model (similar to the proposed &#039;default_self&#039; recursion that is currently a bit broken).&lt;br /&gt;
&lt;br /&gt;
There need to be some protocols about how the model would be intialised, in any case.&lt;br /&gt;
&lt;br /&gt;
It should be possible to re-solve the model after the user changes a value of a parameter. This would mean that canvas-gui would have exported the model to the solver, and would then know how its blocks corresponded to variables in the model, and would call var_fixed or similar routines via the &#039;libascend&#039; API.&lt;br /&gt;
&lt;br /&gt;
It appears that the right approach would be for the canvas-based GUI to generate a string or file-based representation of the model it has in member, using the above hierarchy of objects (modules, blocks, connectors, but &#039;&#039;not&#039;&#039; parameter values), then to instruct ASCEND to load that model, then to [[FIX]] and set the values of the parameters, then attempt to &#039;solve&#039; the model. This might be done in cooperation with the existing PyGTK GUI, or might be done directly with calls to the libascend engine. the canvas-based GUI would have no awareness of the variables it contained other than that provided by the connector end-point names and the parameter names. Using those names it would be able to get/set values in the simulation.&lt;br /&gt;
&lt;br /&gt;
It would be possible to avoid the need for the canvas GUI to be able to [[FIX]] or [[FREE]] variables in the model. When a &#039;source&#039; block was required, it could be set up as a new &#039;block&#039; and the necessary un-FIXed variables left as parameters to the model. Changing the source block to another type would allow other parameters to be fixed. When greater flexibility was required, the user could switch to the non-canvas GUI.&lt;br /&gt;
&lt;br /&gt;
== Design considerations ==&lt;br /&gt;
&lt;br /&gt;
Do connections have properties and variables that need to be accessible, or is it always OK to access those variables/values via the connected blocks at either end?&lt;br /&gt;
&lt;br /&gt;
What to do with the standard [[METHODS]] like  [[Specify]], [[Default self]], [[Values]]?&lt;br /&gt;
&lt;br /&gt;
How can we store the current state of the model? Should we try to do that?&lt;br /&gt;
&lt;br /&gt;
How do we keep track of the fixed/free variables? Do we need to?&lt;br /&gt;
&lt;br /&gt;
What about clashes between the [[Values]] methods in different submodels setting values on their &#039;connection&#039; members. Is this the corner-case that makes the parametric approach more desirable? Or does that not actually solve the problem?&lt;br /&gt;
&lt;br /&gt;
How can the canvas modeller determine when a model is &#039;complete&#039;?&lt;br /&gt;
&lt;br /&gt;
Is it OK to leave dangling lines?&lt;br /&gt;
&lt;br /&gt;
Is it OK to leave unconnected &#039;ports&#039; on the sub-models?&lt;br /&gt;
&lt;br /&gt;
Is it better to use &#039;=&#039; relationships instead of ARE_THE_SAME? It seems that in some cases this leads to models that solve more reliably.&lt;br /&gt;
&lt;br /&gt;
Line routing is tricky and something that is not often done well. Could use some cool [http://immi.inesc-id.pt/cali/applications.html calligraphic code] to make this work better&lt;br /&gt;
&lt;br /&gt;
Could it be possible to highlight parts of the flowsheet corresponding to solved and un-solved portions of the model?&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
&lt;br /&gt;
[[Image:Freeda-screenshot.jpg|thumb|right|307px|The canvas-based model of [http://www.freeda.org/ fREEDA], an electrical circuit simulator. This canvas is based on [http://trolltech.com/downloads/opensource Qt].]]&lt;br /&gt;
[[Image:Gaphor-screenshot.png|thumb|right|307px|Screenshot from [http://gaphor.sourceforge.net/ Gaphor] a [http://en.wikipedia.org/wiki/Unified_Modeling_Language UML] tool. This canvas is pure Python on top of Cairo.]]&lt;br /&gt;
Programs that implement these types of GUIs include&lt;br /&gt;
&lt;br /&gt;
* [http://gaphor.sourceforge.net/ Gaphor], written in pure python, uses [[Gaphas]] on top of [http://www.cairographics.org/ Cairo].&lt;br /&gt;
* [http://www.freeda.org/ fREEDA] ([http://www.freeda.org/screenshots.html screenshot]) (FOSS, Windows-based, uses a [http://en.wikipedia.org/wiki/Qt_(toolkit) Qt] canvas widget)&lt;br /&gt;
* [http://www.geda.seul.org/ gEDA]&#039;s schematic editor, [http://www.geda.seul.org/tools/gschem/ gschem] is a GPLed GTK+ application that appears to use its own bespoke canvas implementation ([http://www.geda.seul.org/screenshots/ screenshots]). In a very quick and superficial test-drive, it appeared to be a little clumsy to use -- hard to identify when a connection has successfully been made, and fairly dated bitmap-style graphics.&lt;br /&gt;
* [http://www.lis.inpg.fr/realise_au_lis/kicad/ kicad] is another free electronic circuit schematic editor.&lt;br /&gt;
* [http://opencircuitdesign.com/xcircuit/index.html XCircuit] is a Tcl/Tk-based circuit editor.&lt;br /&gt;
* TRNSYS, Simulink, Visio, Dia, OOo Draw&lt;br /&gt;
* [http://kepler-project.org/ Kepler] (nice multi-domain canvas-based simulation, in Java)&lt;br /&gt;
* [http://www.cocosimulator.org/index.html COCO simulator] (windows, closed-source freeward)&lt;br /&gt;
* [http://www.conduit-project.org/wiki/Screenshots Conduit] (uses goocanvas)&lt;br /&gt;
* [http://www.gnome.org/projects/dia/ Dia] (seems to use GnomeCanvas?)&lt;br /&gt;
* [http://gstreamer.freedesktop.org/modules/gst-editor.html GStreamer Editor] (uses GnomeCanvas)&lt;br /&gt;
* [http://dwsim.inforside.com.br/ DWSIM] (sequential-modular simulator implemented in VB.net)&lt;br /&gt;
* Dunnart (testbed for libavoid)&lt;br /&gt;
* Inkscape (apparently includes support for libavoid, for automatic connector routing)&lt;br /&gt;
* [http://jmcad.sourceforge.net/ JMCAD] (java-based tool, seems to focus on nonlinear control)&lt;br /&gt;
* [https://sourceforge.net/apps/mediawiki/flowdesigner/index.php?title=Main_Page FlowDesigner] (used Qt, written in C++)&lt;br /&gt;
* [http://gnuradio.org/redmine/projects/gnuradio/wiki/GNURadioCompanion GNU Radio Companion] ([http://www.joshknows.com/grc#screenshots screenshots here) Allows connection of signal processing pipelines for software radio projects. Has dependencies on wxGTK and also QT, not sure how its GUI works.&lt;br /&gt;
&lt;br /&gt;
Software libraries that could be used for this functionality (most are discuss [http://live.gnome.org/ProjectRidley/CanvasOverview here]):&lt;br /&gt;
&lt;br /&gt;
* [[Gaphas]] (uses only Cairo, via pure Python)&lt;br /&gt;
* [http://live.gnome.org/ProjectRidley/CanvasOverview/Canvases/#goocanvas GooCanvas] (uses Cairo inside)&lt;br /&gt;
* [http://developer.gnome.org/doc/books/WGA/gnome-canvas.html GnomeCanvas] (not sure if it&#039;s deprecated yet or not, uses libart inside)&lt;br /&gt;
* [http://live.gnome.org/Criawips/CriaCanvas libccc/CriaCanvas] (uses Cairo inside)&lt;br /&gt;
* [http://www.cairographics.org/ Cairo] (directly)&lt;br /&gt;
* [http://www-eleves-isia.cma.fr/documentation/OpenInventorDoc/SoGtk/classSoGtk.html SoGTK] (use the OpenInventor 3D scenegraph for 2D work here?)&lt;br /&gt;
* Papyrus&lt;br /&gt;
* [http://adaptagrams.sourceforge.net/libavoid/ libavoid] (automatic connector-line routing including obstacle avoidance)&lt;br /&gt;
&lt;br /&gt;
... it needs to be something that works within GTK and perhaps also PyGTK.&lt;br /&gt;
... we want to choose something that will be around for a while. The only canvas widgets from the above that is in Ubuntu and linked against are GooCanvas and GnomeCanvas, with GnomeCanvas being much more used than GooCanvas. libccc is available in Ubuntu but noone is linking against it yet (as of Hardy release)&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3930</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3930"/>
		<updated>2012-08-19T07:55:42Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* Week 9 -12 : Post Mid-term Evaluation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) &amp;lt;strike&amp;gt;Relocation of blocks using equation constraints.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple blocks on the same time on the canvas&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c) &amp;lt;strike&amp;gt;Saving and Loading of Canvas.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) &amp;lt;strike&amp;gt;Scaling after rotation and flips.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
e) &amp;lt;strike&amp;gt;Mimimum Size of inlet in Turbine Custom Icon.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Adding ports in the custom icons.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strike&amp;gt;Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Normalizing the user-defined co-ordinates to canvas co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Draw the polylines from the normalized co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Doing the same thing for inlet and outlet ports.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Additional improvements to ports labeling can be done to increase usability.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Dynamic Icon Palette.png|thumb|none|500px|Improved Graphical Representation with Dynamic Icon Palette ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports located by GR in models.png|thumb|none|500px|Ports in custom icons by GR mechanism in model files, still loses connections on moving]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This week was very fruitful:). Did resolve the issues of minimum-inlet length in turbine and relocation-on-resizing, which were troubling from a long time. Even did the task of Simple Intuitive Graphical Representation of the custom icons by writing simple text in model files. I was able to render these shapes in icon palette making it dynamic now.The above screen shot represents the work done.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (2nd July to 8th July) ===&lt;br /&gt;
&lt;br /&gt;
Complete the remaining one additional improvement of adding label to ports, document the entire code written till mid-term and organize it.&lt;br /&gt;
  &lt;br /&gt;
a) &amp;lt;strike&amp;gt;Port labels should be referring to port/variable names and not numbers.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple Items to be deleted simultaneously.&amp;lt;/strike&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
c) &amp;lt;strike&amp;gt;Connections to remain after moving in Graphical Icons with self-defined port location.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) Port labels to be shown for connect-able ports when connection a connector.&lt;br /&gt;
&lt;br /&gt;
e) Enforcing an aspect ratio on the Graphical Blocks. &lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Block labels to be added for Graphical Blocks.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports lables.png|thumb|none|500px|Nice initial prototype of port labels when context hovered]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Improved Ports_labels.png|thumb|none|500px|Improved Port Labels corresponding to port/variable names]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Blocklabels.png|thumb|none|500px|Block labels added and hovered changed to focused for port labels]]&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (9th July to 15th July) ===&lt;br /&gt;
&lt;br /&gt;
a) Resolving the bugs left out in previous weeks.&lt;br /&gt;
&lt;br /&gt;
b) Deciding direction for the rest of my GSOC project time which will be decided by discussion with John and Kannan.&lt;br /&gt;
&lt;br /&gt;
c) Goals for the next month till August 13th i.e. till GSOC ends.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mid Term Evaluation passed successfully:):):)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 9 -12 : Post Mid-term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
[[Image:brayton.png|thumb|none|700px|First Making of Brayton_Regen_Reheat_Intercool]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Self Generated Model.png|thumb|none|700px|Self-generated model of above brayton model]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Self Description_column.png|thumb|none|700px|Description column added to parameter window, left window is before calling &amp;quot;Set Default Values&amp;quot; and right window is after calling &amp;quot;Set Default Values&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Self Initial states and values.png|thumb|none|700px| Here left parameter window is for pump_simple which shows the fixed state and initial value form model file. Right parameter window is for turbine_simple which shows free state and initial value. Lower text file&#039;s highlighted text shows syntax for free state and &amp;quot;turbine&amp;quot; MODEL ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resolving Issues 1.png|thumb|none|700px|Ports on perimeter of turbine and pump_simple changed to compressor_simple]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resolving Issues 2.png|thumb|none|700px|Regenerator Icon created and important parameters added in parameter window]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Port Colors.png|thumb|none|700px|Green when connect-able, red when not connect-able and black as default]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Generic Ports.png|thumb|none|700px|Generic ports using dictionaries(resolving regenerator issue i.e. inlet--outlet and inlet_hot--outlet_hot) using port names and red color removed]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Icon Palette.png|thumb|none|700px|All blocks in icon palette are custom icons now]]&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=File:Icon_Palette.png&amp;diff=3929</id>
		<title>File:Icon Palette.png</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=File:Icon_Palette.png&amp;diff=3929"/>
		<updated>2012-08-19T07:54:55Z</updated>

		<summary type="html">&lt;p&gt;Saheb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3902</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3902"/>
		<updated>2012-08-14T18:04:56Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* Week 9 -12 : Post Mid-term Evaluation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) &amp;lt;strike&amp;gt;Relocation of blocks using equation constraints.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple blocks on the same time on the canvas&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c) &amp;lt;strike&amp;gt;Saving and Loading of Canvas.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) &amp;lt;strike&amp;gt;Scaling after rotation and flips.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
e) &amp;lt;strike&amp;gt;Mimimum Size of inlet in Turbine Custom Icon.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Adding ports in the custom icons.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strike&amp;gt;Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Normalizing the user-defined co-ordinates to canvas co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Draw the polylines from the normalized co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Doing the same thing for inlet and outlet ports.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Additional improvements to ports labeling can be done to increase usability.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Dynamic Icon Palette.png|thumb|none|500px|Improved Graphical Representation with Dynamic Icon Palette ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports located by GR in models.png|thumb|none|500px|Ports in custom icons by GR mechanism in model files, still loses connections on moving]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This week was very fruitful:). Did resolve the issues of minimum-inlet length in turbine and relocation-on-resizing, which were troubling from a long time. Even did the task of Simple Intuitive Graphical Representation of the custom icons by writing simple text in model files. I was able to render these shapes in icon palette making it dynamic now.The above screen shot represents the work done.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (2nd July to 8th July) ===&lt;br /&gt;
&lt;br /&gt;
Complete the remaining one additional improvement of adding label to ports, document the entire code written till mid-term and organize it.&lt;br /&gt;
  &lt;br /&gt;
a) &amp;lt;strike&amp;gt;Port labels should be referring to port/variable names and not numbers.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple Items to be deleted simultaneously.&amp;lt;/strike&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
c) &amp;lt;strike&amp;gt;Connections to remain after moving in Graphical Icons with self-defined port location.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) Port labels to be shown for connect-able ports when connection a connector.&lt;br /&gt;
&lt;br /&gt;
e) Enforcing an aspect ratio on the Graphical Blocks. &lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Block labels to be added for Graphical Blocks.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports lables.png|thumb|none|500px|Nice initial prototype of port labels when context hovered]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Improved Ports_labels.png|thumb|none|500px|Improved Port Labels corresponding to port/variable names]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Blocklabels.png|thumb|none|500px|Block labels added and hovered changed to focused for port labels]]&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (9th July to 15th July) ===&lt;br /&gt;
&lt;br /&gt;
a) Resolving the bugs left out in previous weeks.&lt;br /&gt;
&lt;br /&gt;
b) Deciding direction for the rest of my GSOC project time which will be decided by discussion with John and Kannan.&lt;br /&gt;
&lt;br /&gt;
c) Goals for the next month till August 13th i.e. till GSOC ends.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mid Term Evaluation passed successfully:):):)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 9 -12 : Post Mid-term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
[[Image:brayton.png|thumb|none|700px|First Making of Brayton_Regen_Reheat_Intercool]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Self Generated Model.png|thumb|none|700px|Self-generated model of above brayton model]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Self Description_column.png|thumb|none|700px|Description column added to parameter window, left window is before calling &amp;quot;Set Default Values&amp;quot; and right window is after calling &amp;quot;Set Default Values&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Self Initial states and values.png|thumb|none|700px| Here left parameter window is for pump_simple which shows the fixed state and initial value form model file. Right parameter window is for turbine_simple which shows free state and initial value. Lower text file&#039;s highlighted text shows syntax for free state and &amp;quot;turbine&amp;quot; MODEL ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resolving Issues 1.png|thumb|none|700px|Ports on perimeter of turbine and pump_simple changed to compressor_simple]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resolving Issues 2.png|thumb|none|700px|Regenerator Icon created and important parameters added in parameter window]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Port Colors.png|thumb|none|700px|Green when connect-able, red when not connect-able and black as default]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Generic Ports.png|thumb|none|700px|Generic ports using dictionaries(resolving regenerator issue i.e. inlet--outlet and inlet_hot--outlet_hot) using port names and red color removed]]&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=File:Generic_Ports.png&amp;diff=3901</id>
		<title>File:Generic Ports.png</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=File:Generic_Ports.png&amp;diff=3901"/>
		<updated>2012-08-14T18:04:08Z</updated>

		<summary type="html">&lt;p&gt;Saheb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3894</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3894"/>
		<updated>2012-08-11T18:03:50Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* Week 9 -12 : Post Mid-term Evaluation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) &amp;lt;strike&amp;gt;Relocation of blocks using equation constraints.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple blocks on the same time on the canvas&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c) &amp;lt;strike&amp;gt;Saving and Loading of Canvas.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) &amp;lt;strike&amp;gt;Scaling after rotation and flips.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
e) &amp;lt;strike&amp;gt;Mimimum Size of inlet in Turbine Custom Icon.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Adding ports in the custom icons.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strike&amp;gt;Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Normalizing the user-defined co-ordinates to canvas co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Draw the polylines from the normalized co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Doing the same thing for inlet and outlet ports.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Additional improvements to ports labeling can be done to increase usability.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Dynamic Icon Palette.png|thumb|none|500px|Improved Graphical Representation with Dynamic Icon Palette ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports located by GR in models.png|thumb|none|500px|Ports in custom icons by GR mechanism in model files, still loses connections on moving]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This week was very fruitful:). Did resolve the issues of minimum-inlet length in turbine and relocation-on-resizing, which were troubling from a long time. Even did the task of Simple Intuitive Graphical Representation of the custom icons by writing simple text in model files. I was able to render these shapes in icon palette making it dynamic now.The above screen shot represents the work done.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (2nd July to 8th July) ===&lt;br /&gt;
&lt;br /&gt;
Complete the remaining one additional improvement of adding label to ports, document the entire code written till mid-term and organize it.&lt;br /&gt;
  &lt;br /&gt;
a) &amp;lt;strike&amp;gt;Port labels should be referring to port/variable names and not numbers.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple Items to be deleted simultaneously.&amp;lt;/strike&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
c) &amp;lt;strike&amp;gt;Connections to remain after moving in Graphical Icons with self-defined port location.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) Port labels to be shown for connect-able ports when connection a connector.&lt;br /&gt;
&lt;br /&gt;
e) Enforcing an aspect ratio on the Graphical Blocks. &lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Block labels to be added for Graphical Blocks.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports lables.png|thumb|none|500px|Nice initial prototype of port labels when context hovered]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Improved Ports_labels.png|thumb|none|500px|Improved Port Labels corresponding to port/variable names]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Blocklabels.png|thumb|none|500px|Block labels added and hovered changed to focused for port labels]]&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (9th July to 15th July) ===&lt;br /&gt;
&lt;br /&gt;
a) Resolving the bugs left out in previous weeks.&lt;br /&gt;
&lt;br /&gt;
b) Deciding direction for the rest of my GSOC project time which will be decided by discussion with John and Kannan.&lt;br /&gt;
&lt;br /&gt;
c) Goals for the next month till August 13th i.e. till GSOC ends.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mid Term Evaluation passed successfully:):):)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 9 -12 : Post Mid-term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
[[Image:brayton.png|thumb|none|700px|First Making of Brayton_Regen_Reheat_Intercool]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Self Generated Model.png|thumb|none|700px|Self-generated model of above brayton model]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Self Description_column.png|thumb|none|700px|Description column added to parameter window, left window is before calling &amp;quot;Set Default Values&amp;quot; and right window is after calling &amp;quot;Set Default Values&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Self Initial states and values.png|thumb|none|700px| Here left parameter window is for pump_simple which shows the fixed state and initial value form model file. Right parameter window is for turbine_simple which shows free state and initial value. Lower text file&#039;s highlighted text shows syntax for free state and &amp;quot;turbine&amp;quot; MODEL ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resolving Issues 1.png|thumb|none|700px|Ports on perimeter of turbine and pump_simple changed to compressor_simple]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resolving Issues 2.png|thumb|none|700px|Regenerator Icon created and important parameters added in parameter window]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Port Colors.png|thumb|none|700px|Green when connect-able, red when not connect-able and black as default]]&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=File:Port_Colors.png&amp;diff=3893</id>
		<title>File:Port Colors.png</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=File:Port_Colors.png&amp;diff=3893"/>
		<updated>2012-08-11T17:57:01Z</updated>

		<summary type="html">&lt;p&gt;Saheb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3892</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3892"/>
		<updated>2012-08-09T19:16:43Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* Week 9 -12 : Post Mid-term Evaluation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) &amp;lt;strike&amp;gt;Relocation of blocks using equation constraints.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple blocks on the same time on the canvas&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c) &amp;lt;strike&amp;gt;Saving and Loading of Canvas.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) &amp;lt;strike&amp;gt;Scaling after rotation and flips.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
e) &amp;lt;strike&amp;gt;Mimimum Size of inlet in Turbine Custom Icon.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Adding ports in the custom icons.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strike&amp;gt;Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Normalizing the user-defined co-ordinates to canvas co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Draw the polylines from the normalized co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Doing the same thing for inlet and outlet ports.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Additional improvements to ports labeling can be done to increase usability.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Dynamic Icon Palette.png|thumb|none|500px|Improved Graphical Representation with Dynamic Icon Palette ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports located by GR in models.png|thumb|none|500px|Ports in custom icons by GR mechanism in model files, still loses connections on moving]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This week was very fruitful:). Did resolve the issues of minimum-inlet length in turbine and relocation-on-resizing, which were troubling from a long time. Even did the task of Simple Intuitive Graphical Representation of the custom icons by writing simple text in model files. I was able to render these shapes in icon palette making it dynamic now.The above screen shot represents the work done.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (2nd July to 8th July) ===&lt;br /&gt;
&lt;br /&gt;
Complete the remaining one additional improvement of adding label to ports, document the entire code written till mid-term and organize it.&lt;br /&gt;
  &lt;br /&gt;
a) &amp;lt;strike&amp;gt;Port labels should be referring to port/variable names and not numbers.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple Items to be deleted simultaneously.&amp;lt;/strike&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
c) &amp;lt;strike&amp;gt;Connections to remain after moving in Graphical Icons with self-defined port location.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) Port labels to be shown for connect-able ports when connection a connector.&lt;br /&gt;
&lt;br /&gt;
e) Enforcing an aspect ratio on the Graphical Blocks. &lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Block labels to be added for Graphical Blocks.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports lables.png|thumb|none|500px|Nice initial prototype of port labels when context hovered]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Improved Ports_labels.png|thumb|none|500px|Improved Port Labels corresponding to port/variable names]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Blocklabels.png|thumb|none|500px|Block labels added and hovered changed to focused for port labels]]&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (9th July to 15th July) ===&lt;br /&gt;
&lt;br /&gt;
a) Resolving the bugs left out in previous weeks.&lt;br /&gt;
&lt;br /&gt;
b) Deciding direction for the rest of my GSOC project time which will be decided by discussion with John and Kannan.&lt;br /&gt;
&lt;br /&gt;
c) Goals for the next month till August 13th i.e. till GSOC ends.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mid Term Evaluation passed successfully:):):)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 9 -12 : Post Mid-term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
[[Image:brayton.png|thumb|none|700px|First Making of Brayton_Regen_Reheat_Intercool]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Self Generated Model.png|thumb|none|700px|Self-generated model of above brayton model]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Self Description_column.png|thumb|none|700px|Description column added to parameter window, left window is before calling &amp;quot;Set Default Values&amp;quot; and right window is after calling &amp;quot;Set Default Values&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Self Initial states and values.png|thumb|none|700px| Here left parameter window is for pump_simple which shows the fixed state and initial value form model file. Right parameter window is for turbine_simple which shows free state and initial value. Lower text file&#039;s highlighted text shows syntax for free state and &amp;quot;turbine&amp;quot; MODEL ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resolving Issues 1.png|thumb|none|700px|Ports on perimeter of turbine and pump_simple changed to compressor_simple]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resolving Issues 2.png|thumb|none|700px|Regenerator Icon created and important parameters added in parameter window]]&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=File:Resolving_Issues_2.png&amp;diff=3891</id>
		<title>File:Resolving Issues 2.png</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=File:Resolving_Issues_2.png&amp;diff=3891"/>
		<updated>2012-08-09T19:16:11Z</updated>

		<summary type="html">&lt;p&gt;Saheb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3879</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3879"/>
		<updated>2012-08-08T13:56:46Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* Week 9 -12 : Post Mid-term Evaluation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) &amp;lt;strike&amp;gt;Relocation of blocks using equation constraints.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple blocks on the same time on the canvas&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c) &amp;lt;strike&amp;gt;Saving and Loading of Canvas.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) &amp;lt;strike&amp;gt;Scaling after rotation and flips.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
e) &amp;lt;strike&amp;gt;Mimimum Size of inlet in Turbine Custom Icon.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Adding ports in the custom icons.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strike&amp;gt;Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Normalizing the user-defined co-ordinates to canvas co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Draw the polylines from the normalized co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Doing the same thing for inlet and outlet ports.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Additional improvements to ports labeling can be done to increase usability.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Dynamic Icon Palette.png|thumb|none|500px|Improved Graphical Representation with Dynamic Icon Palette ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports located by GR in models.png|thumb|none|500px|Ports in custom icons by GR mechanism in model files, still loses connections on moving]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This week was very fruitful:). Did resolve the issues of minimum-inlet length in turbine and relocation-on-resizing, which were troubling from a long time. Even did the task of Simple Intuitive Graphical Representation of the custom icons by writing simple text in model files. I was able to render these shapes in icon palette making it dynamic now.The above screen shot represents the work done.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (2nd July to 8th July) ===&lt;br /&gt;
&lt;br /&gt;
Complete the remaining one additional improvement of adding label to ports, document the entire code written till mid-term and organize it.&lt;br /&gt;
  &lt;br /&gt;
a) &amp;lt;strike&amp;gt;Port labels should be referring to port/variable names and not numbers.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple Items to be deleted simultaneously.&amp;lt;/strike&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
c) &amp;lt;strike&amp;gt;Connections to remain after moving in Graphical Icons with self-defined port location.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) Port labels to be shown for connect-able ports when connection a connector.&lt;br /&gt;
&lt;br /&gt;
e) Enforcing an aspect ratio on the Graphical Blocks. &lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Block labels to be added for Graphical Blocks.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports lables.png|thumb|none|500px|Nice initial prototype of port labels when context hovered]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Improved Ports_labels.png|thumb|none|500px|Improved Port Labels corresponding to port/variable names]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Blocklabels.png|thumb|none|500px|Block labels added and hovered changed to focused for port labels]]&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (9th July to 15th July) ===&lt;br /&gt;
&lt;br /&gt;
a) Resolving the bugs left out in previous weeks.&lt;br /&gt;
&lt;br /&gt;
b) Deciding direction for the rest of my GSOC project time which will be decided by discussion with John and Kannan.&lt;br /&gt;
&lt;br /&gt;
c) Goals for the next month till August 13th i.e. till GSOC ends.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mid Term Evaluation passed successfully:):):)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 9 -12 : Post Mid-term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
[[Image:brayton.png|thumb|none|700px|First Making of Brayton_Regen_Reheat_Intercool]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Self Generated Model.png|thumb|none|700px|Self-generated model of above brayton model]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Self Description_column.png|thumb|none|700px|Description column added to parameter window, left window is before calling &amp;quot;Set Default Values&amp;quot; and right window is after calling &amp;quot;Set Default Values&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Self Initial states and values.png|thumb|none|700px| Here left parameter window is for pump_simple which shows the fixed state and initial value form model file. Right parameter window is for turbine_simple which shows free state and initial value. Lower text file&#039;s highlighted text shows syntax for free state and &amp;quot;turbine&amp;quot; MODEL ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resolving Issues 1.png|thumb|none|700px|Ports on perimeter of turbine and pump_simple changed to compressor_simple]]&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=File:Resolving_Issues_1.png&amp;diff=3878</id>
		<title>File:Resolving Issues 1.png</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=File:Resolving_Issues_1.png&amp;diff=3878"/>
		<updated>2012-08-08T13:56:14Z</updated>

		<summary type="html">&lt;p&gt;Saheb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3876</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3876"/>
		<updated>2012-08-05T13:25:01Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* Week 9 -12 : Post Mid-term Evaluation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) &amp;lt;strike&amp;gt;Relocation of blocks using equation constraints.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple blocks on the same time on the canvas&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c) &amp;lt;strike&amp;gt;Saving and Loading of Canvas.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) &amp;lt;strike&amp;gt;Scaling after rotation and flips.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
e) &amp;lt;strike&amp;gt;Mimimum Size of inlet in Turbine Custom Icon.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Adding ports in the custom icons.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strike&amp;gt;Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Normalizing the user-defined co-ordinates to canvas co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Draw the polylines from the normalized co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Doing the same thing for inlet and outlet ports.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Additional improvements to ports labeling can be done to increase usability.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Dynamic Icon Palette.png|thumb|none|500px|Improved Graphical Representation with Dynamic Icon Palette ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports located by GR in models.png|thumb|none|500px|Ports in custom icons by GR mechanism in model files, still loses connections on moving]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This week was very fruitful:). Did resolve the issues of minimum-inlet length in turbine and relocation-on-resizing, which were troubling from a long time. Even did the task of Simple Intuitive Graphical Representation of the custom icons by writing simple text in model files. I was able to render these shapes in icon palette making it dynamic now.The above screen shot represents the work done.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (2nd July to 8th July) ===&lt;br /&gt;
&lt;br /&gt;
Complete the remaining one additional improvement of adding label to ports, document the entire code written till mid-term and organize it.&lt;br /&gt;
  &lt;br /&gt;
a) &amp;lt;strike&amp;gt;Port labels should be referring to port/variable names and not numbers.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple Items to be deleted simultaneously.&amp;lt;/strike&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
c) &amp;lt;strike&amp;gt;Connections to remain after moving in Graphical Icons with self-defined port location.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) Port labels to be shown for connect-able ports when connection a connector.&lt;br /&gt;
&lt;br /&gt;
e) Enforcing an aspect ratio on the Graphical Blocks. &lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Block labels to be added for Graphical Blocks.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports lables.png|thumb|none|500px|Nice initial prototype of port labels when context hovered]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Improved Ports_labels.png|thumb|none|500px|Improved Port Labels corresponding to port/variable names]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Blocklabels.png|thumb|none|500px|Block labels added and hovered changed to focused for port labels]]&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (9th July to 15th July) ===&lt;br /&gt;
&lt;br /&gt;
a) Resolving the bugs left out in previous weeks.&lt;br /&gt;
&lt;br /&gt;
b) Deciding direction for the rest of my GSOC project time which will be decided by discussion with John and Kannan.&lt;br /&gt;
&lt;br /&gt;
c) Goals for the next month till August 13th i.e. till GSOC ends.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mid Term Evaluation passed successfully:):):)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 9 -12 : Post Mid-term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
[[Image:brayton.png|thumb|none|700px|First Making of Brayton_Regen_Reheat_Intercool]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Self Generated Model.png|thumb|none|700px|Self-generated model of above brayton model]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Self Description_column.png|thumb|none|700px|Description column added to parameter window, left window is before calling &amp;quot;Set Default Values&amp;quot; and right window is after calling &amp;quot;Set Default Values&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Self Initial states and values.png|thumb|none|700px| Here left parameter window is for pump_simple which shows the fixed state and initial value form model file. Right parameter window is for turbine_simple which shows free state and initial value. Lower text file&#039;s highlighted text shows syntax for free state and &amp;quot;turbine&amp;quot; MODEL ]]&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=File:Self_Initial_states_and_values.png&amp;diff=3875</id>
		<title>File:Self Initial states and values.png</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=File:Self_Initial_states_and_values.png&amp;diff=3875"/>
		<updated>2012-08-05T13:21:20Z</updated>

		<summary type="html">&lt;p&gt;Saheb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3874</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3874"/>
		<updated>2012-08-04T12:57:16Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* Week 9 -12 : Post Mid-term Evaluation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) &amp;lt;strike&amp;gt;Relocation of blocks using equation constraints.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple blocks on the same time on the canvas&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c) &amp;lt;strike&amp;gt;Saving and Loading of Canvas.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) &amp;lt;strike&amp;gt;Scaling after rotation and flips.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
e) &amp;lt;strike&amp;gt;Mimimum Size of inlet in Turbine Custom Icon.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Adding ports in the custom icons.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strike&amp;gt;Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Normalizing the user-defined co-ordinates to canvas co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Draw the polylines from the normalized co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Doing the same thing for inlet and outlet ports.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Additional improvements to ports labeling can be done to increase usability.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Dynamic Icon Palette.png|thumb|none|500px|Improved Graphical Representation with Dynamic Icon Palette ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports located by GR in models.png|thumb|none|500px|Ports in custom icons by GR mechanism in model files, still loses connections on moving]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This week was very fruitful:). Did resolve the issues of minimum-inlet length in turbine and relocation-on-resizing, which were troubling from a long time. Even did the task of Simple Intuitive Graphical Representation of the custom icons by writing simple text in model files. I was able to render these shapes in icon palette making it dynamic now.The above screen shot represents the work done.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (2nd July to 8th July) ===&lt;br /&gt;
&lt;br /&gt;
Complete the remaining one additional improvement of adding label to ports, document the entire code written till mid-term and organize it.&lt;br /&gt;
  &lt;br /&gt;
a) &amp;lt;strike&amp;gt;Port labels should be referring to port/variable names and not numbers.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple Items to be deleted simultaneously.&amp;lt;/strike&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
c) &amp;lt;strike&amp;gt;Connections to remain after moving in Graphical Icons with self-defined port location.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) Port labels to be shown for connect-able ports when connection a connector.&lt;br /&gt;
&lt;br /&gt;
e) Enforcing an aspect ratio on the Graphical Blocks. &lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Block labels to be added for Graphical Blocks.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports lables.png|thumb|none|500px|Nice initial prototype of port labels when context hovered]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Improved Ports_labels.png|thumb|none|500px|Improved Port Labels corresponding to port/variable names]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Blocklabels.png|thumb|none|500px|Block labels added and hovered changed to focused for port labels]]&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (9th July to 15th July) ===&lt;br /&gt;
&lt;br /&gt;
a) Resolving the bugs left out in previous weeks.&lt;br /&gt;
&lt;br /&gt;
b) Deciding direction for the rest of my GSOC project time which will be decided by discussion with John and Kannan.&lt;br /&gt;
&lt;br /&gt;
c) Goals for the next month till August 13th i.e. till GSOC ends.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mid Term Evaluation passed successfully:):):)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 9 -12 : Post Mid-term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
[[Image:brayton.png|thumb|none|700px|First Making of Brayton_Regen_Reheat_Intercool]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Self Generated Model.png|thumb|none|700px|Self-generated model of above brayton model]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Self Description_column.png|thumb|none|700px|Description column added to parameter window, left window is before calling &amp;quot;Set Default Values&amp;quot; and right window is after calling &amp;quot;Set Default Values&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3873</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3873"/>
		<updated>2012-08-04T12:55:48Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* Week 9 -12 : Post Mid-term Evaluation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) &amp;lt;strike&amp;gt;Relocation of blocks using equation constraints.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple blocks on the same time on the canvas&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c) &amp;lt;strike&amp;gt;Saving and Loading of Canvas.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) &amp;lt;strike&amp;gt;Scaling after rotation and flips.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
e) &amp;lt;strike&amp;gt;Mimimum Size of inlet in Turbine Custom Icon.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Adding ports in the custom icons.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strike&amp;gt;Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Normalizing the user-defined co-ordinates to canvas co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Draw the polylines from the normalized co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Doing the same thing for inlet and outlet ports.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Additional improvements to ports labeling can be done to increase usability.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Dynamic Icon Palette.png|thumb|none|500px|Improved Graphical Representation with Dynamic Icon Palette ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports located by GR in models.png|thumb|none|500px|Ports in custom icons by GR mechanism in model files, still loses connections on moving]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This week was very fruitful:). Did resolve the issues of minimum-inlet length in turbine and relocation-on-resizing, which were troubling from a long time. Even did the task of Simple Intuitive Graphical Representation of the custom icons by writing simple text in model files. I was able to render these shapes in icon palette making it dynamic now.The above screen shot represents the work done.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (2nd July to 8th July) ===&lt;br /&gt;
&lt;br /&gt;
Complete the remaining one additional improvement of adding label to ports, document the entire code written till mid-term and organize it.&lt;br /&gt;
  &lt;br /&gt;
a) &amp;lt;strike&amp;gt;Port labels should be referring to port/variable names and not numbers.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple Items to be deleted simultaneously.&amp;lt;/strike&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
c) &amp;lt;strike&amp;gt;Connections to remain after moving in Graphical Icons with self-defined port location.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) Port labels to be shown for connect-able ports when connection a connector.&lt;br /&gt;
&lt;br /&gt;
e) Enforcing an aspect ratio on the Graphical Blocks. &lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Block labels to be added for Graphical Blocks.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports lables.png|thumb|none|500px|Nice initial prototype of port labels when context hovered]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Improved Ports_labels.png|thumb|none|500px|Improved Port Labels corresponding to port/variable names]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Blocklabels.png|thumb|none|500px|Block labels added and hovered changed to focused for port labels]]&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (9th July to 15th July) ===&lt;br /&gt;
&lt;br /&gt;
a) Resolving the bugs left out in previous weeks.&lt;br /&gt;
&lt;br /&gt;
b) Deciding direction for the rest of my GSOC project time which will be decided by discussion with John and Kannan.&lt;br /&gt;
&lt;br /&gt;
c) Goals for the next month till August 13th i.e. till GSOC ends.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mid Term Evaluation passed successfully:):):)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 9 -12 : Post Mid-term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
[[Image:brayton.png|thumb|none|500px|First Making of Brayton_Regen_Reheat_Intercool]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Self Generated Model.png|thumb|none|500px|Self-generated model of above brayton model]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Self Description_column.png|thumb|none|500px|Description column added to parameter window, left window is before calling &amp;quot;Set Default Values&amp;quot; and right window is after calling &amp;quot;Set Default Values&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=File:Self_Description_column.png&amp;diff=3872</id>
		<title>File:Self Description column.png</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=File:Self_Description_column.png&amp;diff=3872"/>
		<updated>2012-08-04T12:55:19Z</updated>

		<summary type="html">&lt;p&gt;Saheb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3866</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3866"/>
		<updated>2012-07-30T16:13:26Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* GSOC Weekly Report */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) &amp;lt;strike&amp;gt;Relocation of blocks using equation constraints.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple blocks on the same time on the canvas&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c) &amp;lt;strike&amp;gt;Saving and Loading of Canvas.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) &amp;lt;strike&amp;gt;Scaling after rotation and flips.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
e) &amp;lt;strike&amp;gt;Mimimum Size of inlet in Turbine Custom Icon.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Adding ports in the custom icons.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strike&amp;gt;Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Normalizing the user-defined co-ordinates to canvas co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Draw the polylines from the normalized co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Doing the same thing for inlet and outlet ports.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Additional improvements to ports labeling can be done to increase usability.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Dynamic Icon Palette.png|thumb|none|500px|Improved Graphical Representation with Dynamic Icon Palette ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports located by GR in models.png|thumb|none|500px|Ports in custom icons by GR mechanism in model files, still loses connections on moving]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This week was very fruitful:). Did resolve the issues of minimum-inlet length in turbine and relocation-on-resizing, which were troubling from a long time. Even did the task of Simple Intuitive Graphical Representation of the custom icons by writing simple text in model files. I was able to render these shapes in icon palette making it dynamic now.The above screen shot represents the work done.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (2nd July to 8th July) ===&lt;br /&gt;
&lt;br /&gt;
Complete the remaining one additional improvement of adding label to ports, document the entire code written till mid-term and organize it.&lt;br /&gt;
  &lt;br /&gt;
a) &amp;lt;strike&amp;gt;Port labels should be referring to port/variable names and not numbers.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple Items to be deleted simultaneously.&amp;lt;/strike&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
c) &amp;lt;strike&amp;gt;Connections to remain after moving in Graphical Icons with self-defined port location.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) Port labels to be shown for connect-able ports when connection a connector.&lt;br /&gt;
&lt;br /&gt;
e) Enforcing an aspect ratio on the Graphical Blocks. &lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Block labels to be added for Graphical Blocks.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports lables.png|thumb|none|500px|Nice initial prototype of port labels when context hovered]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Improved Ports_labels.png|thumb|none|500px|Improved Port Labels corresponding to port/variable names]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Blocklabels.png|thumb|none|500px|Block labels added and hovered changed to focused for port labels]]&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (9th July to 15th July) ===&lt;br /&gt;
&lt;br /&gt;
a) Resolving the bugs left out in previous weeks.&lt;br /&gt;
&lt;br /&gt;
b) Deciding direction for the rest of my GSOC project time which will be decided by discussion with John and Kannan.&lt;br /&gt;
&lt;br /&gt;
c) Goals for the next month till August 13th i.e. till GSOC ends.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mid Term Evaluation passed successfully:):):)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 9 -12 : Post Mid-term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
[[Image:brayton.png|thumb|none|500px|First Making of Brayton_Regen_Reheat_Intercool]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Self Generated Model.png|thumb|none|500px|Self-generated model of above brayton model]]&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=File:Self_Generated_Model.png&amp;diff=3865</id>
		<title>File:Self Generated Model.png</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=File:Self_Generated_Model.png&amp;diff=3865"/>
		<updated>2012-07-30T16:12:41Z</updated>

		<summary type="html">&lt;p&gt;Saheb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=File:Brayton.png&amp;diff=3864</id>
		<title>File:Brayton.png</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=File:Brayton.png&amp;diff=3864"/>
		<updated>2012-07-30T16:11:46Z</updated>

		<summary type="html">&lt;p&gt;Saheb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3863</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3863"/>
		<updated>2012-07-30T16:06:46Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* Week 9 (16th July to 22nd July) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) &amp;lt;strike&amp;gt;Relocation of blocks using equation constraints.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple blocks on the same time on the canvas&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c) &amp;lt;strike&amp;gt;Saving and Loading of Canvas.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) &amp;lt;strike&amp;gt;Scaling after rotation and flips.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
e) &amp;lt;strike&amp;gt;Mimimum Size of inlet in Turbine Custom Icon.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Adding ports in the custom icons.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strike&amp;gt;Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Normalizing the user-defined co-ordinates to canvas co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Draw the polylines from the normalized co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Doing the same thing for inlet and outlet ports.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Additional improvements to ports labeling can be done to increase usability.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Dynamic Icon Palette.png|thumb|none|500px|Improved Graphical Representation with Dynamic Icon Palette ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports located by GR in models.png|thumb|none|500px|Ports in custom icons by GR mechanism in model files, still loses connections on moving]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This week was very fruitful:). Did resolve the issues of minimum-inlet length in turbine and relocation-on-resizing, which were troubling from a long time. Even did the task of Simple Intuitive Graphical Representation of the custom icons by writing simple text in model files. I was able to render these shapes in icon palette making it dynamic now.The above screen shot represents the work done.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (2nd July to 8th July) ===&lt;br /&gt;
&lt;br /&gt;
Complete the remaining one additional improvement of adding label to ports, document the entire code written till mid-term and organize it.&lt;br /&gt;
  &lt;br /&gt;
a) &amp;lt;strike&amp;gt;Port labels should be referring to port/variable names and not numbers.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple Items to be deleted simultaneously.&amp;lt;/strike&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
c) &amp;lt;strike&amp;gt;Connections to remain after moving in Graphical Icons with self-defined port location.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) Port labels to be shown for connect-able ports when connection a connector.&lt;br /&gt;
&lt;br /&gt;
e) Enforcing an aspect ratio on the Graphical Blocks. &lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Block labels to be added for Graphical Blocks.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports lables.png|thumb|none|500px|Nice initial prototype of port labels when context hovered]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Improved Ports_labels.png|thumb|none|500px|Improved Port Labels corresponding to port/variable names]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Blocklabels.png|thumb|none|500px|Block labels added and hovered changed to focused for port labels]]&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (9th July to 15th July) ===&lt;br /&gt;
&lt;br /&gt;
a) Resolving the bugs left out in previous weeks.&lt;br /&gt;
&lt;br /&gt;
b) Deciding direction for the rest of my GSOC project time which will be decided by discussion with John and Kannan.&lt;br /&gt;
&lt;br /&gt;
c) Goals for the next month till August 13th i.e. till GSOC ends.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mid Term Evaluation passed successfully:):):)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 9 -12 : Post Mid-term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3860</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3860"/>
		<updated>2012-07-20T08:16:58Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* Week 4 and 5 (11th June to 25th June) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) &amp;lt;strike&amp;gt;Relocation of blocks using equation constraints.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple blocks on the same time on the canvas&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c) &amp;lt;strike&amp;gt;Saving and Loading of Canvas.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) &amp;lt;strike&amp;gt;Scaling after rotation and flips.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
e) &amp;lt;strike&amp;gt;Mimimum Size of inlet in Turbine Custom Icon.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Adding ports in the custom icons.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strike&amp;gt;Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Normalizing the user-defined co-ordinates to canvas co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Draw the polylines from the normalized co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Doing the same thing for inlet and outlet ports.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Additional improvements to ports labeling can be done to increase usability.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Dynamic Icon Palette.png|thumb|none|500px|Improved Graphical Representation with Dynamic Icon Palette ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports located by GR in models.png|thumb|none|500px|Ports in custom icons by GR mechanism in model files, still loses connections on moving]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This week was very fruitful:). Did resolve the issues of minimum-inlet length in turbine and relocation-on-resizing, which were troubling from a long time. Even did the task of Simple Intuitive Graphical Representation of the custom icons by writing simple text in model files. I was able to render these shapes in icon palette making it dynamic now.The above screen shot represents the work done.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (2nd July to 8th July) ===&lt;br /&gt;
&lt;br /&gt;
Complete the remaining one additional improvement of adding label to ports, document the entire code written till mid-term and organize it.&lt;br /&gt;
  &lt;br /&gt;
a) &amp;lt;strike&amp;gt;Port labels should be referring to port/variable names and not numbers.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple Items to be deleted simultaneously.&amp;lt;/strike&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
c) &amp;lt;strike&amp;gt;Connections to remain after moving in Graphical Icons with self-defined port location.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) Port labels to be shown for connect-able ports when connection a connector.&lt;br /&gt;
&lt;br /&gt;
e) Enforcing an aspect ratio on the Graphical Blocks. &lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Block labels to be added for Graphical Blocks.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports lables.png|thumb|none|500px|Nice initial prototype of port labels when context hovered]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Improved Ports_labels.png|thumb|none|500px|Improved Port Labels corresponding to port/variable names]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Blocklabels.png|thumb|none|500px|Block labels added and hovered changed to focused for port labels]]&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (9th July to 15th July) ===&lt;br /&gt;
&lt;br /&gt;
a) Resolving the bugs left out in previous weeks.&lt;br /&gt;
&lt;br /&gt;
b) Deciding direction for the rest of my GSOC project time which will be decided by discussion with John and Kannan.&lt;br /&gt;
&lt;br /&gt;
c) Goals for the next month till August 13th i.e. till GSOC ends.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mid Term Evaluation passed successfully:):):)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 9 (16th July to 22nd July) ===&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3856</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3856"/>
		<updated>2012-07-16T10:32:56Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* GSOC Weekly Report */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) &amp;lt;strike&amp;gt;Relocation of blocks using equation constraints.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple blocks on the same time on the canvas&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c) &amp;lt;strike&amp;gt;Saving and Loading of Canvas.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) Scaling after rotation and flips.&lt;br /&gt;
&lt;br /&gt;
e) &amp;lt;strike&amp;gt;Mimimum Size of inlet in Turbine Custom Icon.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Adding ports in the custom icons.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strike&amp;gt;Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Normalizing the user-defined co-ordinates to canvas co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Draw the polylines from the normalized co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Doing the same thing for inlet and outlet ports.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Additional improvements to ports labeling can be done to increase usability.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Dynamic Icon Palette.png|thumb|none|500px|Improved Graphical Representation with Dynamic Icon Palette ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports located by GR in models.png|thumb|none|500px|Ports in custom icons by GR mechanism in model files, still loses connections on moving]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This week was very fruitful:). Did resolve the issues of minimum-inlet length in turbine and relocation-on-resizing, which were troubling from a long time. Even did the task of Simple Intuitive Graphical Representation of the custom icons by writing simple text in model files. I was able to render these shapes in icon palette making it dynamic now.The above screen shot represents the work done.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (2nd July to 8th July) ===&lt;br /&gt;
&lt;br /&gt;
Complete the remaining one additional improvement of adding label to ports, document the entire code written till mid-term and organize it.&lt;br /&gt;
  &lt;br /&gt;
a) &amp;lt;strike&amp;gt;Port labels should be referring to port/variable names and not numbers.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple Items to be deleted simultaneously.&amp;lt;/strike&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
c) &amp;lt;strike&amp;gt;Connections to remain after moving in Graphical Icons with self-defined port location.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) Port labels to be shown for connect-able ports when connection a connector.&lt;br /&gt;
&lt;br /&gt;
e) Enforcing an aspect ratio on the Graphical Blocks. &lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Block labels to be added for Graphical Blocks.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports lables.png|thumb|none|800px|Nice initial prototype of port labels when context hovered]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Improved Ports_labels.png|thumb|none|800px|Improved Port Labels corresponding to port/variable names]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Blocklabels.png|thumb|none|800px|Block labels added and hovered changed to focused for port labels]]&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (9th July to 15th July) ===&lt;br /&gt;
&lt;br /&gt;
a) Resolving the bugs left out in previous weeks.&lt;br /&gt;
&lt;br /&gt;
b) Deciding direction for the rest of my GSOC project time which will be decided by discussion with John and Kannan.&lt;br /&gt;
&lt;br /&gt;
c) Goals for the next month till August 13th i.e. till GSOC ends.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mid Term Evaluation passed successfully:):):)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 9 (16th July to 22nd July) ===&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3855</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3855"/>
		<updated>2012-07-16T10:29:59Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* Week 4 and 5 (11th June to 25th June) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) &amp;lt;strike&amp;gt;Relocation of blocks using equation constraints.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple blocks on the same time on the canvas&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c) &amp;lt;strike&amp;gt;Saving and Loading of Canvas.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) Scaling after rotation and flips.&lt;br /&gt;
&lt;br /&gt;
e) &amp;lt;strike&amp;gt;Mimimum Size of inlet in Turbine Custom Icon.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Adding ports in the custom icons.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strike&amp;gt;Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Normalizing the user-defined co-ordinates to canvas co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Draw the polylines from the normalized co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Doing the same thing for inlet and outlet ports.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Additional improvements to ports labeling can be done to increase usability.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Dynamic Icon Palette.png|thumb|none|500px|Improved Graphical Representation with Dynamic Icon Palette ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports located by GR in models.png|thumb|none|500px|Ports in custom icons by GR mechanism in model files, still loses connections on moving]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This week was very fruitful:). Did resolve the issues of minimum-inlet length in turbine and relocation-on-resizing, which were troubling from a long time. Even did the task of Simple Intuitive Graphical Representation of the custom icons by writing simple text in model files. I was able to render these shapes in icon palette making it dynamic now.The above screen shot represents the work done.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (2nd July to 8th July) ===&lt;br /&gt;
&lt;br /&gt;
Complete the remaining one additional improvement of adding label to ports, document the entire code written till mid-term and organize it.&lt;br /&gt;
  &lt;br /&gt;
a) &amp;lt;strike&amp;gt;Port labels should be referring to port/variable names and not numbers.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple Items to be deleted simultaneously.&amp;lt;/strike&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
c) &amp;lt;strike&amp;gt;Connections to remain after moving in Graphical Icons with self-defined port location.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) Port labels to be shown for connect-able ports when connection a connector.&lt;br /&gt;
&lt;br /&gt;
e) Enforcing an aspect ratio on the Graphical Blocks. &lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Block labels to be added for Graphical Blocks.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports lables.png|thumb|none|800px|Nice initial prototype of port labels when context hovered]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Improved Ports_labels.png|thumb|none|800px|Improved Port Labels corresponding to port/variable names]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Blocklabels.png|thumb|none|800px|Block labels added and hovered changed to focused for port labels]]&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (9th July to 15th July) ===&lt;br /&gt;
&lt;br /&gt;
a) Resolving the bugs left out in previous weeks.&lt;br /&gt;
&lt;br /&gt;
b) Deciding direction for the rest of my GSOC project time which will be decided by discussion with John  and Kannan.&lt;br /&gt;
&lt;br /&gt;
c) Goals for the next month till August 13th i.e. till GSOC ends.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3854</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3854"/>
		<updated>2012-07-16T10:28:28Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* Exact Goals to be achieved before Mid-Term Evaluation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) &amp;lt;strike&amp;gt;Relocation of blocks using equation constraints.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple blocks on the same time on the canvas&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c) Saving and Loading of Canvas.&lt;br /&gt;
&lt;br /&gt;
d) Scaling after rotation and flips.&lt;br /&gt;
&lt;br /&gt;
e) &amp;lt;strike&amp;gt;Mimimum Size of inlet in Turbine Custom Icon.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Adding ports in the custom icons.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strike&amp;gt;Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Normalizing the user-defined co-ordinates to canvas co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Draw the polylines from the normalized co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Doing the same thing for inlet and outlet ports.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Additional improvements to ports labeling can be done to increase usability.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Dynamic Icon Palette.png|thumb|none|500px|Improved Graphical Representation with Dynamic Icon Palette ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports located by GR in models.png|thumb|none|500px|Ports in custom icons by GR mechanism in model files, still loses connections on moving]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This week was very fruitful:). Did resolve the issues of minimum-inlet length in turbine and relocation-on-resizing, which were troubling from a long time. Even did the task of Simple Intuitive Graphical Representation of the custom icons by writing simple text in model files. I was able to render these shapes in icon palette making it dynamic now.The above screen shot represents the work done.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (2nd July to 8th July) ===&lt;br /&gt;
&lt;br /&gt;
Complete the remaining one additional improvement of adding label to ports, document the entire code written till mid-term and organize it.&lt;br /&gt;
  &lt;br /&gt;
a) &amp;lt;strike&amp;gt;Port labels should be referring to port/variable names and not numbers.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple Items to be deleted simultaneously.&amp;lt;/strike&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
c) &amp;lt;strike&amp;gt;Connections to remain after moving in Graphical Icons with self-defined port location.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) Port labels to be shown for connect-able ports when connection a connector.&lt;br /&gt;
&lt;br /&gt;
e) Enforcing an aspect ratio on the Graphical Blocks. &lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Block labels to be added for Graphical Blocks.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports lables.png|thumb|none|800px|Nice initial prototype of port labels when context hovered]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Improved Ports_labels.png|thumb|none|800px|Improved Port Labels corresponding to port/variable names]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Blocklabels.png|thumb|none|800px|Block labels added and hovered changed to focused for port labels]]&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (9th July to 15th July) ===&lt;br /&gt;
&lt;br /&gt;
a) Resolving the bugs left out in previous weeks.&lt;br /&gt;
&lt;br /&gt;
b) Deciding direction for the rest of my GSOC project time which will be decided by discussion with John  and Kannan.&lt;br /&gt;
&lt;br /&gt;
c) Goals for the next month till August 13th i.e. till GSOC ends.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3853</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3853"/>
		<updated>2012-07-16T10:26:32Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* Week 7 (2nd July to 8th July) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) &amp;lt;strike&amp;gt;Relocation of blocks using equation constraints.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple blocks on the same time on the canvas&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c) Saving and Loading of Canvas.&lt;br /&gt;
&lt;br /&gt;
d) Scaling after rotation and flips.&lt;br /&gt;
&lt;br /&gt;
e) &amp;lt;strike&amp;gt;Mimimum Size of inlet in Turbine Custom Icon.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Adding ports in the custom icons.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strike&amp;gt;Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Normalizing the user-defined co-ordinates to canvas co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Draw the polylines from the normalized co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Doing the same thing for inlet and outlet ports.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# Additional improvements to ports labeling can be done to increase usability.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Dynamic Icon Palette.png|thumb|none|500px|Improved Graphical Representation with Dynamic Icon Palette ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports located by GR in models.png|thumb|none|500px|Ports in custom icons by GR mechanism in model files, still loses connections on moving]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This week was very fruitful:). Did resolve the issues of minimum-inlet length in turbine and relocation-on-resizing, which were troubling from a long time. Even did the task of Simple Intuitive Graphical Representation of the custom icons by writing simple text in model files. I was able to render these shapes in icon palette making it dynamic now.The above screen shot represents the work done.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (2nd July to 8th July) ===&lt;br /&gt;
&lt;br /&gt;
Complete the remaining one additional improvement of adding label to ports, document the entire code written till mid-term and organize it.&lt;br /&gt;
  &lt;br /&gt;
a) &amp;lt;strike&amp;gt;Port labels should be referring to port/variable names and not numbers.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple Items to be deleted simultaneously.&amp;lt;/strike&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
c) &amp;lt;strike&amp;gt;Connections to remain after moving in Graphical Icons with self-defined port location.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) Port labels to be shown for connect-able ports when connection a connector.&lt;br /&gt;
&lt;br /&gt;
e) Enforcing an aspect ratio on the Graphical Blocks. &lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Block labels to be added for Graphical Blocks.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports lables.png|thumb|none|800px|Nice initial prototype of port labels when context hovered]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Improved Ports_labels.png|thumb|none|800px|Improved Port Labels corresponding to port/variable names]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Blocklabels.png|thumb|none|800px|Block labels added and hovered changed to focused for port labels]]&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (9th July to 15th July) ===&lt;br /&gt;
&lt;br /&gt;
a) Resolving the bugs left out in previous weeks.&lt;br /&gt;
&lt;br /&gt;
b) Deciding direction for the rest of my GSOC project time which will be decided by discussion with John  and Kannan.&lt;br /&gt;
&lt;br /&gt;
c) Goals for the next month till August 13th i.e. till GSOC ends.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3831</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3831"/>
		<updated>2012-07-10T07:01:20Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* Week 7 (2nd July to 8th July) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) &amp;lt;strike&amp;gt;Relocation of blocks using equation constraints.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple blocks on the same time on the canvas&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c) Saving and Loading of Canvas.&lt;br /&gt;
&lt;br /&gt;
d) Scaling after rotation and flips.&lt;br /&gt;
&lt;br /&gt;
e) &amp;lt;strike&amp;gt;Mimimum Size of inlet in Turbine Custom Icon.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Adding ports in the custom icons.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strike&amp;gt;Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Normalizing the user-defined co-ordinates to canvas co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Draw the polylines from the normalized co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Doing the same thing for inlet and outlet ports.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# Additional improvements to ports labeling can be done to increase usability.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Dynamic Icon Palette.png|thumb|none|500px|Improved Graphical Representation with Dynamic Icon Palette ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports located by GR in models.png|thumb|none|500px|Ports in custom icons by GR mechanism in model files, still loses connections on moving]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This week was very fruitful:). Did resolve the issues of minimum-inlet length in turbine and relocation-on-resizing, which were troubling from a long time. Even did the task of Simple Intuitive Graphical Representation of the custom icons by writing simple text in model files. I was able to render these shapes in icon palette making it dynamic now.The above screen shot represents the work done.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (2nd July to 8th July) ===&lt;br /&gt;
&lt;br /&gt;
Complete the remaining one additional improvement of adding label to ports, document the entire code written till mid-term and organize it.&lt;br /&gt;
  &lt;br /&gt;
a) &amp;lt;strike&amp;gt;Port labels should be referring to port/variable names and not numbers.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple Items to be deleted simultaneously.&amp;lt;/strike&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
c) Connections to remain after moving in Graphical Icons with self-defined port location.&lt;br /&gt;
&lt;br /&gt;
d) Port labels to be shown for connect-able ports when connection a connector.&lt;br /&gt;
&lt;br /&gt;
e) Enforcing an aspect ratio on the Graphical Blocks. &lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Block labels to be added for Graphical Blocks.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports lables.png|thumb|none|800px|Nice initial prototype of port labels when context hovered]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Improved Ports_labels.png|thumb|none|800px|Improved Port Labels corresponding to port/variable names]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Blocklabels.png|thumb|none|800px|Block labels added and hovered changed to focused for port labels]]&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (9th July to 15th July) ===&lt;br /&gt;
&lt;br /&gt;
a) Resolving the bugs left out in previous weeks.&lt;br /&gt;
&lt;br /&gt;
b) Deciding direction for the rest of my GSOC project time which will be decided by discussion with John  and Kannan.&lt;br /&gt;
&lt;br /&gt;
c) Goals for the next month till August 13th i.e. till GSOC ends.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=File:Blocklabels.png&amp;diff=3830</id>
		<title>File:Blocklabels.png</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=File:Blocklabels.png&amp;diff=3830"/>
		<updated>2012-07-10T07:00:50Z</updated>

		<summary type="html">&lt;p&gt;Saheb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3829</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3829"/>
		<updated>2012-07-10T06:57:31Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* Week 7 (2nd July to 8th July) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) &amp;lt;strike&amp;gt;Relocation of blocks using equation constraints.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple blocks on the same time on the canvas&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c) Saving and Loading of Canvas.&lt;br /&gt;
&lt;br /&gt;
d) Scaling after rotation and flips.&lt;br /&gt;
&lt;br /&gt;
e) &amp;lt;strike&amp;gt;Mimimum Size of inlet in Turbine Custom Icon.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Adding ports in the custom icons.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strike&amp;gt;Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Normalizing the user-defined co-ordinates to canvas co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Draw the polylines from the normalized co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Doing the same thing for inlet and outlet ports.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# Additional improvements to ports labeling can be done to increase usability.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Dynamic Icon Palette.png|thumb|none|500px|Improved Graphical Representation with Dynamic Icon Palette ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports located by GR in models.png|thumb|none|500px|Ports in custom icons by GR mechanism in model files, still loses connections on moving]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This week was very fruitful:). Did resolve the issues of minimum-inlet length in turbine and relocation-on-resizing, which were troubling from a long time. Even did the task of Simple Intuitive Graphical Representation of the custom icons by writing simple text in model files. I was able to render these shapes in icon palette making it dynamic now.The above screen shot represents the work done.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (2nd July to 8th July) ===&lt;br /&gt;
&lt;br /&gt;
Complete the remaining one additional improvement of adding label to ports, document the entire code written till mid-term and organize it.&lt;br /&gt;
  &lt;br /&gt;
a) &amp;lt;strike&amp;gt;Port labels should be referring to port/variable names and not numbers.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple Items to be deleted simultaneously.&amp;lt;/strike&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
c) Connections to remain after moving in Graphical Icons with self-defined port location.&lt;br /&gt;
&lt;br /&gt;
d) Port labels to be shown for connect-able ports when connection a connector.&lt;br /&gt;
&lt;br /&gt;
e) Enforcing an aspect ratio on the Graphical Blocks. &lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Block labels to be added for Graphical Blocks.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports lables.png|thumb|none|800px|Nice initial prototype of port labels when context hovered]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Improved Ports_labels.png|thumb|none|800px|Improved Port Labels corresponding to port/variable names]]&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (9th July to 15th July) ===&lt;br /&gt;
&lt;br /&gt;
a) Resolving the bugs left out in previous weeks.&lt;br /&gt;
&lt;br /&gt;
b) Deciding direction for the rest of my GSOC project time which will be decided by discussion with John  and Kannan.&lt;br /&gt;
&lt;br /&gt;
c) Goals for the next month till August 13th i.e. till GSOC ends.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3828</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3828"/>
		<updated>2012-07-10T06:56:58Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* Week 7 (2nd July to 8th July) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) &amp;lt;strike&amp;gt;Relocation of blocks using equation constraints.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple blocks on the same time on the canvas&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c) Saving and Loading of Canvas.&lt;br /&gt;
&lt;br /&gt;
d) Scaling after rotation and flips.&lt;br /&gt;
&lt;br /&gt;
e) &amp;lt;strike&amp;gt;Mimimum Size of inlet in Turbine Custom Icon.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Adding ports in the custom icons.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strike&amp;gt;Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Normalizing the user-defined co-ordinates to canvas co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Draw the polylines from the normalized co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Doing the same thing for inlet and outlet ports.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# Additional improvements to ports labeling can be done to increase usability.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Dynamic Icon Palette.png|thumb|none|500px|Improved Graphical Representation with Dynamic Icon Palette ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports located by GR in models.png|thumb|none|500px|Ports in custom icons by GR mechanism in model files, still loses connections on moving]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This week was very fruitful:). Did resolve the issues of minimum-inlet length in turbine and relocation-on-resizing, which were troubling from a long time. Even did the task of Simple Intuitive Graphical Representation of the custom icons by writing simple text in model files. I was able to render these shapes in icon palette making it dynamic now.The above screen shot represents the work done.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (2nd July to 8th July) ===&lt;br /&gt;
&lt;br /&gt;
Complete the remaining one additional improvement of adding label to ports, document the entire code written till mid-term and organize it.&lt;br /&gt;
  &lt;br /&gt;
a) &amp;lt;strike&amp;gt;Port labels should be referring to port/variable names and not numbers.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple Items to be deleted simultaneously.&amp;lt;/strike&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
c) Connections to remain after moving in Graphical Icons with self-defined port location.&lt;br /&gt;
&lt;br /&gt;
d) Port labels to be shown for connect-able ports when connection a connector.&lt;br /&gt;
&lt;br /&gt;
e) Enforcing an aspect ratio on the Graphical Blocks. &lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Block labels to be added for Graphical Blocks&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports lables.png|thumb|none|800px|Nice initial prototype of port labels when context hovered]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Improved Ports_labels.png|thumb|none|800px|Improved Port Labels corresponding to port/variable names]]&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (9th July to 15th July) ===&lt;br /&gt;
&lt;br /&gt;
a) Resolving the bugs left out in previous weeks.&lt;br /&gt;
&lt;br /&gt;
b) Deciding direction for the rest of my GSOC project time which will be decided by discussion with John  and Kannan.&lt;br /&gt;
&lt;br /&gt;
c) Goals for the next month till August 13th i.e. till GSOC ends.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3827</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3827"/>
		<updated>2012-07-08T19:15:36Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* GSOC Weekly Report */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) &amp;lt;strike&amp;gt;Relocation of blocks using equation constraints.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple blocks on the same time on the canvas&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c) Saving and Loading of Canvas.&lt;br /&gt;
&lt;br /&gt;
d) Scaling after rotation and flips.&lt;br /&gt;
&lt;br /&gt;
e) &amp;lt;strike&amp;gt;Mimimum Size of inlet in Turbine Custom Icon.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Adding ports in the custom icons.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strike&amp;gt;Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Normalizing the user-defined co-ordinates to canvas co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Draw the polylines from the normalized co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Doing the same thing for inlet and outlet ports.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# Additional improvements to ports labeling can be done to increase usability.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Dynamic Icon Palette.png|thumb|none|500px|Improved Graphical Representation with Dynamic Icon Palette ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports located by GR in models.png|thumb|none|500px|Ports in custom icons by GR mechanism in model files, still loses connections on moving]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This week was very fruitful:). Did resolve the issues of minimum-inlet length in turbine and relocation-on-resizing, which were troubling from a long time. Even did the task of Simple Intuitive Graphical Representation of the custom icons by writing simple text in model files. I was able to render these shapes in icon palette making it dynamic now.The above screen shot represents the work done.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (2nd July to 8th July) ===&lt;br /&gt;
&lt;br /&gt;
Complete the remaining one additional improvement of adding label to ports, document the entire code written till mid-term and organize it.&lt;br /&gt;
  &lt;br /&gt;
a) &amp;lt;strike&amp;gt;Port labels should be referring to port/variable names and not numbers.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple Items to be deleted simultaneously.&amp;lt;/strike&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
c) Connections to remain after moving in Graphical Icons with self-defined port location.&lt;br /&gt;
&lt;br /&gt;
d) Port labels to be shown for connect-able ports when connection a connector.&lt;br /&gt;
&lt;br /&gt;
e) Enforcing an aspect ratio on the Graphical Blocks. &lt;br /&gt;
&lt;br /&gt;
[[Image:Ports lables.png|thumb|none|800px|Nice initial prototype of port labels when context hovered]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Improved Ports_labels.png|thumb|none|800px|Improved Port Labels corresponding to port/variable names]]&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (9th July to 15th July) ===&lt;br /&gt;
&lt;br /&gt;
a) Resolving the bugs left out in previous weeks.&lt;br /&gt;
&lt;br /&gt;
b) Deciding direction for the rest of my GSOC project time which will be decided by discussion with John  and Kannan.&lt;br /&gt;
&lt;br /&gt;
c) Goals for the next month till August 13th i.e. till GSOC ends.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3826</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3826"/>
		<updated>2012-07-08T19:08:32Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* Week 7 (2nd July to 8th July) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) &amp;lt;strike&amp;gt;Relocation of blocks using equation constraints.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple blocks on the same time on the canvas&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c) Saving and Loading of Canvas.&lt;br /&gt;
&lt;br /&gt;
d) Scaling after rotation and flips.&lt;br /&gt;
&lt;br /&gt;
e) &amp;lt;strike&amp;gt;Mimimum Size of inlet in Turbine Custom Icon.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Adding ports in the custom icons.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strike&amp;gt;Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Normalizing the user-defined co-ordinates to canvas co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Draw the polylines from the normalized co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Doing the same thing for inlet and outlet ports.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# Additional improvements to ports labeling can be done to increase usability.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Dynamic Icon Palette.png|thumb|none|500px|Improved Graphical Representation with Dynamic Icon Palette ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports located by GR in models.png|thumb|none|500px|Ports in custom icons by GR mechanism in model files, still loses connections on moving]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This week was very fruitful:). Did resolve the issues of minimum-inlet length in turbine and relocation-on-resizing, which were troubling from a long time. Even did the task of Simple Intuitive Graphical Representation of the custom icons by writing simple text in model files. I was able to render these shapes in icon palette making it dynamic now.The above screen shot represents the work done.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (2nd July to 8th July) ===&lt;br /&gt;
&lt;br /&gt;
Complete the remaining one additional improvement of adding label to ports, document the entire code written till mid-term and organize it.&lt;br /&gt;
  &lt;br /&gt;
a) &amp;lt;strike&amp;gt;Port labels should be referring to port/variable names and not numbers.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple Items to be deleted simultaneously.&amp;lt;/strike&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
c) Connections to remain after moving in Graphical Icons with self-defined port location.&lt;br /&gt;
&lt;br /&gt;
d) Port labels to be shown for connect-able ports when connection a connector.&lt;br /&gt;
&lt;br /&gt;
e) Enforcing an aspect ratio on the Graphical Blocks. &lt;br /&gt;
&lt;br /&gt;
[[Image:Ports lables.png|thumb|none|800px|Nice initial prototype of port labels when context hovered]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Improved Ports_labels.png|thumb|none|800px|Improved Port Labels corresponding to port/variable names]]&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3825</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3825"/>
		<updated>2012-07-07T07:59:38Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* Week 7 (2nd July to 8th July) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) &amp;lt;strike&amp;gt;Relocation of blocks using equation constraints.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple blocks on the same time on the canvas&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c) Saving and Loading of Canvas.&lt;br /&gt;
&lt;br /&gt;
d) Scaling after rotation and flips.&lt;br /&gt;
&lt;br /&gt;
e) &amp;lt;strike&amp;gt;Mimimum Size of inlet in Turbine Custom Icon.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Adding ports in the custom icons.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strike&amp;gt;Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Normalizing the user-defined co-ordinates to canvas co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Draw the polylines from the normalized co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Doing the same thing for inlet and outlet ports.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# Additional improvements to ports labeling can be done to increase usability.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Dynamic Icon Palette.png|thumb|none|500px|Improved Graphical Representation with Dynamic Icon Palette ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports located by GR in models.png|thumb|none|500px|Ports in custom icons by GR mechanism in model files, still loses connections on moving]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This week was very fruitful:). Did resolve the issues of minimum-inlet length in turbine and relocation-on-resizing, which were troubling from a long time. Even did the task of Simple Intuitive Graphical Representation of the custom icons by writing simple text in model files. I was able to render these shapes in icon palette making it dynamic now.The above screen shot represents the work done.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (2nd July to 8th July) ===&lt;br /&gt;
&lt;br /&gt;
Complete the remaining one additional improvement of adding label to ports, document the entire code written till mid-term and organize it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports lables.png|thumb|none|800px|Nice initial prototype of port labels when context hovered]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Improved Ports_labels.png|thumb|none|800px|Improved Port Labels corresponding to port/variable names]]&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=File:Improved_Ports_labels.png&amp;diff=3824</id>
		<title>File:Improved Ports labels.png</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=File:Improved_Ports_labels.png&amp;diff=3824"/>
		<updated>2012-07-07T07:59:15Z</updated>

		<summary type="html">&lt;p&gt;Saheb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3803</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3803"/>
		<updated>2012-07-02T18:07:11Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* Week 7 (2nd July to 8th July) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) &amp;lt;strike&amp;gt;Relocation of blocks using equation constraints.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple blocks on the same time on the canvas&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c) Saving and Loading of Canvas.&lt;br /&gt;
&lt;br /&gt;
d) Scaling after rotation and flips.&lt;br /&gt;
&lt;br /&gt;
e) &amp;lt;strike&amp;gt;Mimimum Size of inlet in Turbine Custom Icon.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Adding ports in the custom icons.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strike&amp;gt;Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Normalizing the user-defined co-ordinates to canvas co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Draw the polylines from the normalized co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Doing the same thing for inlet and outlet ports.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# Additional improvements to ports labeling can be done to increase usability.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Dynamic Icon Palette.png|thumb|none|500px|Improved Graphical Representation with Dynamic Icon Palette ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports located by GR in models.png|thumb|none|500px|Ports in custom icons by GR mechanism in model files, still loses connections on moving]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This week was very fruitful:). Did resolve the issues of minimum-inlet length in turbine and relocation-on-resizing, which were troubling from a long time. Even did the task of Simple Intuitive Graphical Representation of the custom icons by writing simple text in model files. I was able to render these shapes in icon palette making it dynamic now.The above screen shot represents the work done.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (2nd July to 8th July) ===&lt;br /&gt;
&lt;br /&gt;
Complete the remaining one additional improvement of adding label to ports, document the entire code written till mid-term and organize it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports lables.png|thumb|none|800px|Nice initial prototype of port labels when context hovered]]&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3802</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3802"/>
		<updated>2012-07-02T18:06:01Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* GSOC Weekly Report */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) &amp;lt;strike&amp;gt;Relocation of blocks using equation constraints.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple blocks on the same time on the canvas&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c) Saving and Loading of Canvas.&lt;br /&gt;
&lt;br /&gt;
d) Scaling after rotation and flips.&lt;br /&gt;
&lt;br /&gt;
e) &amp;lt;strike&amp;gt;Mimimum Size of inlet in Turbine Custom Icon.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Adding ports in the custom icons.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strike&amp;gt;Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Normalizing the user-defined co-ordinates to canvas co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Draw the polylines from the normalized co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Doing the same thing for inlet and outlet ports.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# Additional improvements to ports labeling can be done to increase usability.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Dynamic Icon Palette.png|thumb|none|500px|Improved Graphical Representation with Dynamic Icon Palette ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports located by GR in models.png|thumb|none|500px|Ports in custom icons by GR mechanism in model files, still loses connections on moving]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This week was very fruitful:). Did resolve the issues of minimum-inlet length in turbine and relocation-on-resizing, which were troubling from a long time. Even did the task of Simple Intuitive Graphical Representation of the custom icons by writing simple text in model files. I was able to render these shapes in icon palette making it dynamic now.The above screen shot represents the work done.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (2nd July to 8th July) ===&lt;br /&gt;
&lt;br /&gt;
Complete the remaining one additional improvement of adding label to ports, document the entire code written till mid-term and organize it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports lables.png|thumb|none|500px|Nice initial prototype of port labels when context hovered]]&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=File:Ports_lables.png&amp;diff=3801</id>
		<title>File:Ports lables.png</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=File:Ports_lables.png&amp;diff=3801"/>
		<updated>2012-07-02T18:05:38Z</updated>

		<summary type="html">&lt;p&gt;Saheb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3800</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3800"/>
		<updated>2012-07-02T15:31:17Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* Week 6 (26th June to 1st July) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) &amp;lt;strike&amp;gt;Relocation of blocks using equation constraints.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple blocks on the same time on the canvas&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c) Saving and Loading of Canvas.&lt;br /&gt;
&lt;br /&gt;
d) Scaling after rotation and flips.&lt;br /&gt;
&lt;br /&gt;
e) &amp;lt;strike&amp;gt;Mimimum Size of inlet in Turbine Custom Icon.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Adding ports in the custom icons.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strike&amp;gt;Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Normalizing the user-defined co-ordinates to canvas co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Draw the polylines from the normalized co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Doing the same thing for inlet and outlet ports.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# Additional improvements to ports labeling can be done to increase usability.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Dynamic Icon Palette.png|thumb|none|500px|Improved Graphical Representation with Dynamic Icon Palette ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Ports located by GR in models.png|thumb|none|500px|Ports in custom icons by GR mechanism in model files, still loses connections on moving]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This week was very fruitful:). Did resolve the issues of minimum-inlet length in turbine and relocation-on-resizing, which were troubling from a long time. Even did the task of Simple Intuitive Graphical Representation of the custom icons by writing simple text in model files. I was able to render these shapes in icon palette making it dynamic now.The above screen shot represents the work done.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (2nd July to 8th July) ===&lt;br /&gt;
&lt;br /&gt;
Complete the remaining one additional improvement of adding label to ports, document the entire code written till mid-term and organize it.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=File:Ports_located_by_GR_in_models.png&amp;diff=3799</id>
		<title>File:Ports located by GR in models.png</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=File:Ports_located_by_GR_in_models.png&amp;diff=3799"/>
		<updated>2012-07-02T15:30:38Z</updated>

		<summary type="html">&lt;p&gt;Saheb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3798</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3798"/>
		<updated>2012-07-02T15:26:12Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* GSOC Weekly Report */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) &amp;lt;strike&amp;gt;Relocation of blocks using equation constraints.&amp;lt;/strike&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple blocks on the same time on the canvas&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c) Saving and Loading of Canvas.&lt;br /&gt;
&lt;br /&gt;
d) Scaling after rotation and flips.&lt;br /&gt;
&lt;br /&gt;
e) &amp;lt;strike&amp;gt;Mimimum Size of inlet in Turbine Custom Icon.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Adding ports in the custom icons.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strike&amp;gt;Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Normalizing the user-defined co-ordinates to canvas co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Draw the polylines from the normalized co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Doing the same thing for inlet and outlet ports.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# Additional improvements to ports labeling can be done to increase usability.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Dynamic Icon Palette.png|thumb|none|500px|Improved Graphical Representation with Dynamic Icon Palette ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This week was very fruitful:). Did resolve the issues of minimum-inlet length in turbine and relocation-on-resizing, which were troubling from a long time. Even did the task of Simple Intuitive Graphical Representation of the custom icons by writing simple text in model files. I was able to render these shapes in icon palette making it dynamic now.The above screen shot represents the work done.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
=== Week 7 (2nd July to 8th July) ===&lt;br /&gt;
&lt;br /&gt;
Complete the remaining one additional improvement of adding label to ports, document the entire code written till mid-term and organize it.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3797</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3797"/>
		<updated>2012-07-02T15:23:52Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* GSOC Weekly Report */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) &amp;lt;strike&amp;gt;Relocation of blocks using equation constraints.&lt;br /&gt;
   &lt;br /&gt;
b) &amp;lt;strike&amp;gt;Multiple blocks on the same time on the canvas&lt;br /&gt;
&lt;br /&gt;
c) Saving and Loading of Canvas&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
d) Scaling after rotation and flips.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
e) &amp;lt;strike&amp;gt;Mimimum Size of inlet in Turbine Custom Icon.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
f) &amp;lt;strike&amp;gt;Adding ports in the custom icons.&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strike&amp;gt;Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Normalizing the user-defined co-ordinates to canvas co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Draw the polylines from the normalized co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Doing the same thing for inlet and outlet ports.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# Additional improvements to ports labeling can be done to increase usability.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Dynamic Icon Palette.png|thumb|none|500px|Improved Graphical Representation with Dynamic Icon Palette ]]&lt;br /&gt;
&lt;br /&gt;
This week was very fruitful:). Did resolve the issues of minimum-inlet length in turbine and relocation-on-resizing, which were troubling from a long time. Even did the task of Simple Intuitive Graphical Representation of the custom icons by writing simple text in model files. I was able to render these shapes in icon palette making it dynamic now.The above screen shot represents the work done. &lt;br /&gt;
&lt;br /&gt;
=== Week 7 (2nd July to 8th July) ===&lt;br /&gt;
&lt;br /&gt;
Complete the remaining one additional improvement of adding label to ports, document the entire code written till mid-term and organize it.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3796</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3796"/>
		<updated>2012-07-02T15:15:12Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* Exact Goals to be achieved before Mid-Term Evaluation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) Relocation of blocks using equation constraints.&lt;br /&gt;
   &lt;br /&gt;
b) Multiple blocks on the same time on the canvas&lt;br /&gt;
&lt;br /&gt;
c) Saving and Loading of Canvas&lt;br /&gt;
&lt;br /&gt;
d) Scaling after rotation and flips.&lt;br /&gt;
&lt;br /&gt;
e) Mimimum Size of inlet in Turbine Custom Icon.&lt;br /&gt;
&lt;br /&gt;
f) Adding ports in the custom icons.&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strike&amp;gt;Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Normalizing the user-defined co-ordinates to canvas co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Draw the polylines from the normalized co-ordinates.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# &amp;lt;strike&amp;gt;Doing the same thing for inlet and outlet ports.&amp;lt;/strike&amp;gt;&lt;br /&gt;
# Additional improvements to ports labeling can be done to increase usability.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Dynamic Icon Palette.png|thumb|none|500px|Improved Graphical Representation with Dynamic Icon Palette ]]&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3783</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3783"/>
		<updated>2012-06-27T13:15:04Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* Week 6 (26th June to 1st July) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) Relocation of blocks using equation constraints.&lt;br /&gt;
   &lt;br /&gt;
b) Multiple blocks on the same time on the canvas&lt;br /&gt;
&lt;br /&gt;
c) Saving and Loading of Canvas&lt;br /&gt;
&lt;br /&gt;
d) Scaling after rotation and flips.&lt;br /&gt;
&lt;br /&gt;
e) Mimimum Size of inlet in Turbine Custom Icon.&lt;br /&gt;
&lt;br /&gt;
f) Adding ports in the custom icons.&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&lt;br /&gt;
# Normalizing the user-defined co-ordinates to canvas co-ordinates.&lt;br /&gt;
# Draw the polylines from the normalized co-ordinates.&lt;br /&gt;
# Doing the same thing for inlet and outlet ports.&lt;br /&gt;
# Additional improvements to ports labeling can be done to increase usability.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Dynamic Icon Palette.png|thumb|none|500px|Improved Graphical Representation with Dynamic Icon Palette ]]&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=File:Dynamic_Icon_Palette.png&amp;diff=3782</id>
		<title>File:Dynamic Icon Palette.png</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=File:Dynamic_Icon_Palette.png&amp;diff=3782"/>
		<updated>2012-06-27T13:14:39Z</updated>

		<summary type="html">&lt;p&gt;Saheb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3781</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3781"/>
		<updated>2012-06-27T08:48:17Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* Week 6 (26th June to 1st July) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) Relocation of blocks using equation constraints.&lt;br /&gt;
   &lt;br /&gt;
b) Multiple blocks on the same time on the canvas&lt;br /&gt;
&lt;br /&gt;
c) Saving and Loading of Canvas&lt;br /&gt;
&lt;br /&gt;
d) Scaling after rotation and flips.&lt;br /&gt;
&lt;br /&gt;
e) Mimimum Size of inlet in Turbine Custom Icon.&lt;br /&gt;
&lt;br /&gt;
f) Adding ports in the custom icons.&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&lt;br /&gt;
# Normalizing the user-defined co-ordinates to canvas co-ordinates.&lt;br /&gt;
# Draw the polylines from the normalized co-ordinates.&lt;br /&gt;
# Doing the same thing for inlet and outlet ports.&lt;br /&gt;
# Additional improvements to ports labeling can be done to increase usability.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Resizing Enabled.png|thumb|none|500px|Resizing Enabled by Generalization of normalization factor ]]&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=File:Resizing_Enabled.png&amp;diff=3780</id>
		<title>File:Resizing Enabled.png</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=File:Resizing_Enabled.png&amp;diff=3780"/>
		<updated>2012-06-27T08:47:43Z</updated>

		<summary type="html">&lt;p&gt;Saheb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3779</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3779"/>
		<updated>2012-06-26T19:53:45Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* GSOC Weekly Report */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) Relocation of blocks using equation constraints.&lt;br /&gt;
   &lt;br /&gt;
b) Multiple blocks on the same time on the canvas&lt;br /&gt;
&lt;br /&gt;
c) Saving and Loading of Canvas&lt;br /&gt;
&lt;br /&gt;
d) Scaling after rotation and flips.&lt;br /&gt;
&lt;br /&gt;
e) Mimimum Size of inlet in Turbine Custom Icon.&lt;br /&gt;
&lt;br /&gt;
f) Adding ports in the custom icons.&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
# Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&lt;br /&gt;
# Normalizing the user-defined co-ordinates to canvas co-ordinates.&lt;br /&gt;
# Draw the polylines from the normalized co-ordinates.&lt;br /&gt;
# Doing the same thing for inlet and outlet ports.&lt;br /&gt;
# Additional improvements to ports labeling can be done to increase usability.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Intuitive Graphical Representation.png|thumb|none|500px|Intuitive Graphical Icons using simple text strings ]]&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=File:Intuitive_Graphical_Representation.png&amp;diff=3778</id>
		<title>File:Intuitive Graphical Representation.png</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=File:Intuitive_Graphical_Representation.png&amp;diff=3778"/>
		<updated>2012-06-26T19:53:28Z</updated>

		<summary type="html">&lt;p&gt;Saheb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3776</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3776"/>
		<updated>2012-06-26T19:19:21Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* GSOC Weekly Report */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) Relocation of blocks using equation constraints.&lt;br /&gt;
   &lt;br /&gt;
b) Multiple blocks on the same time on the canvas&lt;br /&gt;
&lt;br /&gt;
c) Saving and Loading of Canvas&lt;br /&gt;
&lt;br /&gt;
d) Scaling after rotation and flips.&lt;br /&gt;
&lt;br /&gt;
e) Mimimum Size of inlet in Turbine Custom Icon.&lt;br /&gt;
&lt;br /&gt;
f) Adding ports in the custom icons.&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Exact Goals to be achieved before Mid-Term Evaluation ===&lt;br /&gt;
&lt;br /&gt;
#1) Parsing of Intutive Graphical Representation String and store them in list of lists(these lists will be co-ordinates which user will mention for polylines and we will draw icons using them).&lt;br /&gt;
&lt;br /&gt;
#2) Normalizing the user-defined co-ordinates to canvas co-ordinates.&lt;br /&gt;
&lt;br /&gt;
#3) Draw the polylines from the normalized co-ordinates.&lt;br /&gt;
&lt;br /&gt;
#4) Doing the same thing for inlet and outlet ports.&lt;br /&gt;
&lt;br /&gt;
#5) Additional improvements to ports labeling can be done to increase usability.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (26th June to 1st July) ===&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
	<entry>
		<id>https://ascend4.org/index.php?title=User:Saheb&amp;diff=3775</id>
		<title>User:Saheb</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=User:Saheb&amp;diff=3775"/>
		<updated>2012-06-26T19:11:06Z</updated>

		<summary type="html">&lt;p&gt;Saheb: /* GSOC Weekly Report */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India.&lt;br /&gt;
I have been working with ASCEND since Jan 2012. Initially I was involved in  [[Student_Projects#GUI_improvements]], but now I am totally involved in [[canvas-based modeller for ASCEND]].&lt;br /&gt;
&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb-canvas|}} (for work on the canvas)&lt;br /&gt;
:Code branch: {{srcbranchdir|saheb|}} (for earlier work on default units of measurement)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Enhancement of Canvas Based Modeller by implementing feature of custom icons for blocks which will help in better creation of flow charts of the models.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Project Description&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Original Description of the project is present here([[Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29]])&lt;br /&gt;
&lt;br /&gt;
Writing very long models has always been cumbersome, so this is something which takes care of the lazy people. Creating models can be very easy after the implementation of canvas-based modeller. You just have to do some steps in order to create a model of your choice.&lt;br /&gt;
&lt;br /&gt;
a) Clicking icons on the icon editor&lt;br /&gt;
&lt;br /&gt;
b) Creating connections between the icons&lt;br /&gt;
&lt;br /&gt;
c) Enforcing few constraints if any on the blocks &lt;br /&gt;
&lt;br /&gt;
d) Explicitly mentioning values of varibles of the blocks.&lt;br /&gt;
&lt;br /&gt;
After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.&lt;br /&gt;
&lt;br /&gt;
My project deals with creating customizable icons for the canvas using Gaphas module of Python. Right now canvas creates only rectangles blocks, which are unconstrainted at the moment but I will enforce constriants on them soon. By custom blocks we mean, more intutive user-friendly icons which resmeble the original shape of the model. e.g. We want to put pumps in our station, so in order to create a good-resembling flow chart of working of the station we need pump and not rectangles. If I complete my project successfully we will have custom blocks desired by the user.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Milestones&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
a) Implementing constraints on present blocks.&lt;br /&gt;
&lt;br /&gt;
Rectangle should remain a rectangle and should not turn into a square, this will help me in understanding how the constraint solver works in Gaphas.&lt;br /&gt;
&lt;br /&gt;
b) Hard-coding few custom blocks.&lt;br /&gt;
&lt;br /&gt;
Means specifying the geometry and constraints on the blocks directly into the python code. This is for confirming that Gaphas works the way we want with custom blocks or not.&lt;br /&gt;
&lt;br /&gt;
c) Storage of custom icons and costraints&lt;br /&gt;
&lt;br /&gt;
Genrealizing the custom blocks for all user-defined icons and find a way to store this geometry and constraints. It is still an open question of how will we store this specifications externally. Maybe we have to create an icon-editor.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;GSOC Weekly Report&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Community Bonding Period&#039;&#039;&#039; (Before 21st May) &amp;gt;&amp;gt; Discussed the goals of the project with mentor and community in more details, even had a good conversation with Grivan(past developer working on this project) and griped myself with the tools used by ASCEND.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (21st May to 27th May) ===&lt;br /&gt;
&lt;br /&gt;
* Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.&lt;br /&gt;
&lt;br /&gt;
[[Image:Hardcoding_pump_no_constraints.png|thumb|none|500px|hardcoded pump into canvas without constraints]] &lt;br /&gt;
&lt;br /&gt;
[[Image:leaky-pump.png|thumb|none|500px|something wrong with the constraints here, but making progress...]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;By the end of week I am able to draw images quite well using cairo functions, but Gaphas constraints are troubling me as you can see in the screen shots&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (28th May to 3rd June) ===&lt;br /&gt;
 &lt;br /&gt;
* Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-week02.png|thumb|none|500px|improved constraints, still some issues with the circle exceeding the &#039;bounding&#039; box.]]&lt;br /&gt;
&lt;br /&gt;
[[Image:pump-end_of_week02.png|thumb|none|500px|improved constraints using equation constraint, only problem is it changes it location on resizing.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have got some understanding of constraints, have used them for making the pump look better, but still having problems of relocation when I used EquationConstraint&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
=== Week 3 (4th June to 10th June) ===&lt;br /&gt;
&lt;br /&gt;
* Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine-week03.png|thumb|none|500px|almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:turbine_errors-week03.png|thumb|none|500px|errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero ]]&lt;br /&gt;
&lt;br /&gt;
[[Image:rotation and flips-week03.png|thumb|none|500px|rotation in clockwise and anti direction possible, even flips working properly ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I coded the turbine, it looks as desired now. Even some constraints work, but minimum inlet size is not working. Rotation and flips is possible for icons now(about the center), but they loose connection with the canvas there-after  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 and 5 (11th June to 25th June) ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;Addressing the following problems&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
a) Relocation of blocks using equation constraints.&lt;br /&gt;
   &lt;br /&gt;
b) Multiple blocks on the same time on the canvas&lt;br /&gt;
&lt;br /&gt;
c) Saving and Loading of Canvas&lt;br /&gt;
&lt;br /&gt;
d) Scaling after rotation and flips.&lt;br /&gt;
&lt;br /&gt;
e) Mimimum Size of inlet in Turbine Custom Icon.&lt;br /&gt;
&lt;br /&gt;
f) Adding ports in the custom icons.&lt;br /&gt;
&lt;br /&gt;
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The above goals will be completed gradually during my GSOC project. This week was focused on re-planning of Goals, better understanding of project and feedback questions in IIT-b with Kannan and his team. I met Prof. Kannan personally in Mumbai and discussed my current status of work and my future plans of the project. After a good discussion, we planned few Goals to be completed by mid-term evaluation and than decide to redirect the project or continue in the same direction.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Bug Solving&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
(1) I recently submitted patch for {{bug|529}}. Patch is present in the bug reporter, you can check it from the previous link.&lt;br /&gt;
&lt;br /&gt;
Bug 529 - Deleting multiple rows simultaneously from observer tab was a problem, i.e currently when we used to right click after selecting, it used to deselect the selection. Solution was selection should remain static on right clicking and hence user should be able to delete multiple rows simultaneously.It will be quite useful to delete multiple rows after a Study if some rows have failed to solve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(2) I am currently working on {{bug|429}}.&lt;br /&gt;
&lt;br /&gt;
Bug 429 - If there are no preferred units, what is currently used is base SI dimensions and my task is to display smart intuitive units in place of SI dimensions( i.e. N in place of kg*m/s^2). I will use the units present after the Default value in Default statements for instance in force DEFAULT defvalue{N}, and so will have to store the braced text while parsing through it. So the hierarchy after the feature gets implemented will be:&lt;br /&gt;
&lt;br /&gt;
a) User Defined Units.&lt;br /&gt;
&lt;br /&gt;
b) Preferred Units if present in ascend.ini.&lt;br /&gt;
&lt;br /&gt;
c) Smart Intuitive Default Units.&lt;br /&gt;
&lt;br /&gt;
d) Base Dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tasks&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Understanding the working of various layers involved.&lt;br /&gt;
&lt;br /&gt;
- Modify the C Layer code and modify the typedesc struct to get default unit included in it.&lt;br /&gt;
&lt;br /&gt;
- Write a CUnit Code to test the initial modification of C layer code.&lt;br /&gt;
&lt;br /&gt;
- Understand the C++ wrapping and SWIG tool.&lt;br /&gt;
&lt;br /&gt;
- Write C++ functions to get the default unit and then pass it to the PyGTK layer.&lt;br /&gt;
&lt;br /&gt;
- Modify test.py to test the final feature.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;I have completed first three tasks and looking forward to quickly solve the bug&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ASCEND_Contributors]]&lt;br /&gt;
[[Category:GSOC2012]]&lt;/div&gt;</summary>
		<author><name>Saheb</name></author>
	</entry>
</feed>