User:Saheb: Difference between revisions

From ASCEND
Jump to navigation Jump to search
Saheb (talk | contribs)
Saheb (talk | contribs)
Line 95: Line 95:


[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]
[[Image:Custom+Default.png|thumb|none|500px|temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously ]]
'''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.'''


== '''Bug Solving''' ==
== '''Bug Solving''' ==

Revision as of 19:11, 26 June 2012

I am an undergraduate student from Dhirubhai Ambani Institute of Information and Communication Technology(DA-IICT), Gandhinagar, Gujarat, India. 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.

Code branch: saheb-canvas: (for work on the canvas)
Code branch: saheb: (for earlier work on default units of measurement)

GSOC Project

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.

GSOC Project Description

Original Description of the project is present here(Student_Projects#Canvas-based_modeller_for_ASCEND_.28more_work_is_possible.29)

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.

a) Clicking icons on the icon editor

b) Creating connections between the icons

c) Enforcing few constraints if any on the blocks

d) Explicitly mentioning values of varibles of the blocks.

After completing this steps, your text-based model will be automatically created and can be solved even with the same ASCEND Solvers.

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.

GSOC Milestones

a) Implementing constraints on present blocks.

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.

b) Hard-coding few custom blocks.

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.

c) Storage of custom icons and costraints

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.

GSOC Weekly Report

Community Bonding Period (Before 21st May) >> 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.

Week 1 (21st May to 27th May)

  • Getting grip on Gaphas, learn rendering images using cairo and hardcoding pump into the canvas.
Error creating thumbnail: File missing
hardcoded pump into canvas without constraints
Error creating thumbnail: File missing
something wrong with the constraints here, but making progress...

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

Week 2 (28th May to 3rd June)

  • Getting grip on applying constraints on blocks using Gaphas, and make the pump behave in a sane way on scaling.
Error creating thumbnail: File missing
improved constraints, still some issues with the circle exceeding the 'bounding' box.
Error creating thumbnail: File missing
improved constraints using equation constraint, only problem is it changes it location on resizing.

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

Week 3 (4th June to 10th June)

  • Improve the handling of pump, creating a new CustomIcon and make sure have used all constraints available and try creating some of your own.
Error creating thumbnail: File missing
almost perfect flexible turbine, only fault is minimum size of inlet constraint is not working
Error creating thumbnail: File missing
errors, faults, due to improper constraints in turbine- minimum inlet length is going less than zero
Error creating thumbnail: File missing
rotation in clockwise and anti direction possible, even flips working properly

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

Week 4 and 5 (11th June to 25th June)

Addressing the following problems

a) Relocation of blocks using equation constraints.

b) Multiple blocks on the same time on the canvas

c) Saving and Loading of Canvas

d) Scaling after rotation and flips.

e) Mimimum Size of inlet in Turbine Custom Icon.

f) Adding ports in the custom icons.

Error creating thumbnail: File missing
temporary version of all icons(pumps turbine and default icons) on the canvas simultaneously

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.

Bug Solving

(1) I recently submitted patch for bug 529. Patch is present in the bug reporter, you can check it from the previous link.

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.


(2) I am currently working on bug 429.

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:

a) User Defined Units.

b) Preferred Units if present in ascend.ini.

c) Smart Intuitive Default Units.

d) Base Dimensions.

Tasks

- Understanding the working of various layers involved.

- Modify the C Layer code and modify the typedesc struct to get default unit included in it.

- Write a CUnit Code to test the initial modification of C layer code.

- Understand the C++ wrapping and SWIG tool.

- Write C++ functions to get the default unit and then pass it to the PyGTK layer.

- Modify test.py to test the final feature.

I have completed first three tasks and looking forward to quickly solve the bug