CAPRI
images/capri_pic_01.jpg images/capri_pic_02.jpg images/capri_pic_03.jpg

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
capri:gui:gui [2011/04/11 10:59] 134.110.32.81capri:gui:gui [2013/02/19 15:08] – external edit 127.0.0.1
Line 1: Line 1:
 +<HTML>
 +    <div id="content"><!-- Start Inhalt -->
 +
 +
 +
 +         <div class=rightwindow>
 +
 +
 +
 +
 +
 +
 +
 +      <H1>Graphical User Interface</H1>
 +
 +
 +
 +      <H3>Overview</H3>
 +
 +
 +
 +      <P><a href="../docs/Gui2013.pdf">CAPRI user manual (pdf, 6 MB, 146 pages)</a></P>
 +
 +
 +
 +
 +
 +      <TABLE>
 +
 +      <TR valign="top">
 +
 +      <TD>
 +
 +
 +
 +      <P>The aim of the Graphical User Interface (GUI) is threefold. Firstly, it serves as a tool
 +
 +      to support the user in <B>controlling</B> the different work steps in CAPRI:</P>
 +
 +
 +
 +      <UL>
 +
 +         <P>Data base generation, from global to regional, and to 1x1 km grid scale</P>
 +
 +         <P>Generation of the <A HREF="/dokuwiki/doku.php?id=capri:concept:refrun">baseline</A></P>
 +
 +         <P>Defining and running scenarios</P>
 +
 +      </UL>
 +
 +
 +
 +      <P>That task is eased by the storing <A HREF="../docs/meta.pdf">meta-data information</A> along with the quantitative results
 +
 +      of the different work steps.</P>
 +
 +
 +
 +      <P>Secondly, it allows to <B>exploit</B> the results via tables, graphs and maps.</P>
 +
 +
 +
 +      <P>And thirdly, it offers <B>certain services</B> as <A HREF="../docs/batch.pdf">batch execution</A>, checking meta data, viewing GDX files,
 +
 +      <A HREF="../docs/javadoc.pdf">generation of HTML base documentation for the GAMS code</A> or integrating GIS geometries into the exploitation tools.</P>
 +
 +
 +
 +
 +
 +      <P>Technically, in order to steer the different working steps,
 +
 +      the GUI generates small snippets of GAMS code which are specific for a specific
 +
 +      run such as the Member States included, or the base year chosen, and then starts GAMS. That
 +
 +      concept allows to run CAPRI completely outside the GUI, e.g. in <A HREF="../docs/batch.pdf">batch mode</A>.</P>
 +
 +
 +
 +      <P>The different tasks are defined as objects with specific properties (base year, simulation year, scenario ..)
 +
 +      which can be modified by the user. Methods allow to retrieve the quantitative results generated by the task as well
 +
 +      as meta information.<A HREF="../docs/refactoringGUI.pdf"> Read more ..</P>
 +
 +
 +
 +      <A HREF="/dokuwiki/doku.php?id=capri:gui:regView">Try the exploitation tools out (loads 3 MByte data and java code, may take a minute) ...</A>
 +
 +
 +
 +
 +
 +      </TD>
 +
 +      <TD>
 +
 +
 +
 +      <P aligtn="CENTER"><a href="images\gui.jpg"><img style="text-decoration: none;border: none;" src="images\gui.jpg" width="600"/></a></P>
 +
 +
 +
 +      </TD>
 +
 +      </TR>
 +
 +      </TABLE>
 +
 +
 +
 +      <H3>Exploitation tools</H3>
 +
 +
 +
 +      <P>The GUI comprises a generic and powerful tool for exploitation of results. Results from
 +
 +      the different work steps of CAPRI generated by GAMS are stored in GDX format (see also next section)
 +
 +      as multi-dimensional sparse data cubes. A single scenario run at the NUTS 2 level will generate
 +
 +      close to 5 Mio non-zero data cells, a run at farm type level around 16 Mio non-zero.
 +
 +      The regional time series data base of CAPRI covers almost 15 Mio non-zeros,
 +
 +      and downscaling the regional scenario results to the 1x1 km grid resolution
 +
 +      will generate close to 30 Mio non-zero values. In order to access these huge data quantities in
 +
 +      a user-friendly and efficient way, an XML file defines <I>views</I> in the data.</P>
 +
 +
 +
 +      <P>Each <I>view</I> is firstly characterised by a selection or filter for the different
 +
 +      dimensions such as regions, activities, items or scenarios. Secondly, a pivot is defined which maps the
 +
 +      data base dimension to viewport dimensions, such as the columns or rows of a table, or the regions shown in
 +
 +      a map. And thirdly, it defines the view type: a table, different type of graphs or a map. Fourthly, views
 +
 +      may comprise links to other views, similar to the concept of hyperlinks in WEB pages, which allows a "drill-down"
 +
 +      like exploitation from general to specific aspects, or vice versa. The hyperlinks can also be used to
 +
 +      refer to tables with supporing information. And lastly, the view may
 +
 +      comprise supporting information as e.g. units used for specific elements or long text descriptions.</P>
 +
 +
 +
 +      <P>But the user maintains his freedom: he may tune the view to his own needs, by adding his own selections,
 +
 +      change the pivot or the view type. Equally, fonts, color, cell sizes or properties of the graphs may be
 +
 +      set by the user. His personal settings can be stored for future session. And finally, the mapping viewer
 +
 +      allows for rather flexible classifications and coloring options. The details with examples are discussed
 +
 +      in a chapter of the <A HREF='../docs/capri_documentation.pdf#search="Exploitation"'>CAPRI documentation</A>.</P>
 +
 +
 +
 +
 +
 +      <H3>Data base concept</H3>
 +
 +
 +
 +      <P>For more then a decade, CAPRI used a Data Base Management System (DBMS) realized in FORTRAN,
 +
 +      developed by the Institute for Food and Resource Economics specifically for agricultural sector
 +
 +      models. With the new GUI becoming operational, using a SQL based DBMS was discussed. However, as all data
 +
 +      and results in CAPRI are processed and produced by GAMS programs, a SQL solution would require
 +
 +      generation of intermediate temporary files to pass results back and forth between the DBMS and GAMS.</P>
 +
 +
 +
 +      <P>Fortunately, GAMS offers with the GDX format an interface to quickly pass data in and out, along
 +
 +      with a native interface definition to exchange data with applications. For a GAMS base system,
 +
 +      storing all data in GDX seemed therefore a good alternative. It allows using CAPRI solely
 +
 +      building on GAMS, which eases porting CAPRI to other Operation Systems. Equally, GDX files
 +
 +      can be accessed by the GDX viewer shipped with GAMS, but also with external tools.</P>
 +
 +
 +
 +      <P>The final concept hence let each working step in CAPRI produce GDX files. Consecutive
 +
 +      step read those results as input. The native interface of GDX is used in the JAVA based GUI
 +
 +      to read, and where appropriate, merge the content of several GDX files in memory, and pass
 +
 +      it to exploitation tools.</P>
 +
 +
 +
 +
 +
 +
 +
 +<font size=1>Last Updated:Tuesday, October 12, 2010
 +
 +</font>
 +
 +         </div><!-- Ende RightWindow -->
 +
 +      </div><!-- Ende content -->
 +</HTML>
  
   
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International