Home
The Graphical User Interface for CAPRI version 2011
Contents
1. simulation ref 5 Generate HTML documentation iw The GUI comprises tool to generate for each GAMS file and each symbol used HTML pages which are interlinked For details on the code documentation facility see the technical document Javadoc like technical documentation for CAPRI to be found on the Capri web page under technical documents The controls on top allow the user e define in which directory the EXP and GDX files are stored which serve as input into the documentation generator choose the directory where the HTML files will be generated e To select the tasks covered by the documentation generator 37 Exploitation of gdx files GDX files are generated by GAMS and typically serve either an exchange format between different GAMS applications or for exploitation purposes as the GAMS IDE comprises a view for GDX files Further tools for GDX files are available from GAMS company and are described in different documents In opposite to listings generated by GAMS programs the GDX files store the data in full numerical precision in an internal format The new CAPRI version passes information from one task to the next with the help of GDX files so generates CoCo a gdx files with the time series at national level which is read by CAPREG And the regional time series generated by CAPREG are inputted by the trend projectio
2. 78 Changing the classification and the legend 79 Adding a histogram window to a 80 Shrinking polygons according to nennen eene nennen nnns 81 82 Excluding zeros from classification and removing small and large values 82 TA 82 Integration distribution information in the map window sess 85 COOC TAD tentes ptem 85 Changineihe way the le Send 1S merci eo sunset 89 Copying map to the clipboard or saving to 91 Chane me tne title OF LNG AAD ce he Dot name anes anres e 92 Zooming in and out and navigating in the 92 Gettine data Tor POly CONS a 93 Hiehlibeh ne Specilic gions AN UNG cose sel ieri eot uero a A ea tds 94 Updanne tbe farts Nene 98 ZXdaimesresronmdabel To th d113 p3 98 SHOW 1S Ve and CICS an iden tete 99 Storms and te VOUT SCUINGS
3. 27 Detnne Scenario TASK 2 fi toa ua ca aestas ful aac Mua pa M ils 28 RSM AON i und usata en Ia aea ss d asp nai dii assu ed odd d asa n ma eas E dU EU on 20 Th task Exploit scenario TOS tS ico oleo rans 22 The task Collect meta TUurOf FOOUIOTL s ecce ee eua etae oae nere a aou de nt nodu id eu 33 Bate e eC O dadas a aS Run aestu 35 Task Generate GAMS documentation ccccccceeseeeseeeeeeeeeseeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeees 37 Exploration OL IOS 38 An example loading data from the spatial 39 ENGEL ACTION 42 GPC 43 Generating co ordinate files for the exploitations tools from 43 Editing the table definitions underlying the exploitation 1008 44 Views as the basic concept for exploitation in CAPRI esses 44 Wiya XMI dehinition bles TOF VIEWS aoo eor ete cb oto ose ouod Lie sas ds 45 Defining and changing the view definition via the GUI 46 o aS ig cla
4. FreeHEP Graphics Interchange Format giF Standard PNG image writer Standard BMP Image Writer bmp 91 Changing the title of the When using output to clipboard or disk the user may often prefer to choose his own title or no title at all on top of the map This will be helpful when producing a caption for the map in another application In order to refrain from drawing a title on top of the map click into the legend part of the map and in the dialog at the bottom choose none in the row labeled Title on top of Alternatively the user can simply write something in the box Standard map title m Standard map title map title Zooming in and out and navigating in the map In order to zoom in part of the map press the Q button The mouse pointer will change to a magnifying glass with a cross in it You can then mark an area on the map by pressing the mouse button dragging and then releasing the mouse After the mouse is released solely the selected zone of the map will be drawn without changing the class limits or any other setting Clicking with the mouse while being in zoom in mode will increase the map resolution step wise by 2596 and center the map at the current mouse position Heus ou a eee a irc Q UK O5 By clicking with the zoom out pointer point of the map the point
5. Now in the left hand side only the results for the base year should be shown That can be accomplished by deselecting the column for 2013 use the column selection button to do so Activity Items Table uaa z 55 Selection dialog for Table columns 1 Enter search pattern in field and use buttons or use mouse to define selections Clear selection add pattern to labels Add pattern to labels Remove pattern From labels 2013 The very same trick should be applied for the other view only deselecting the results for 2002 Now we see something as below 128 CAPRI e capril gams View Handling Windows Scenario exploitation Data View 2 IBi xd Activity Items Table Activity Items Table uaa 5 a Mineral Fertilizer Consumption Nitrogen kg N ha agr Env indicators driving forces uaa 5 a Mineral Fertilizer Consumption Nitrogen kg N ha agr Env indicators driving Forces m EB i A EAN E frase x Now for the map with the results for 2013 we should switch to percentage difference to the year 2002 by opening the tool dialog There under Comparison output choose Only percentage difference Select Years under Data dimension used for comparisons and ensure that 2002 is selected in Element used for comparisons Customize view
6. 135 Cent Based 136 ti y Mode T ET 136 The str cture of the XML definition files for ViCWS eoe reete onde roue eret v ee t conu o ee eaae 138 Giese DIS 138 Nece sa Se srt tae saa treats 138 Permin e teatems obthe Fable savent oco ted etes bas tas e atomes tls 139 140 Soe NU 140 141 PE 141 Alternative texts the dimensions DeL EROR OR AR URNA EUER 141 Filters for the elements in the different dimensions nene 142 Attaching long texts and filt rs to elements err UR Re QUAE ER deu eU 142 144 Background The use of the CAPRI modelling system is increasing and the user group becomes more diversified Whereas in the first years almost all users had directly contributed to model development and were familiar with the underlying GAMS code more and more users now get to know about the system during training sessions and have only a limited knowledge of GAMS and the CAPRI GAMS code Already a few years back a Gr
7. a 100 the data tinder Map 101 What are the HSMUs and what information is available 113 How the HSMU information onu aea e tI E bo edat a x avo e eva uda 113 Loading data based on the GUT Presets cose det perde uet 113 AMOLKITIP SIEHT Se Verbal oL aset 117 Fe KARI 119 Drawing a map showing the nitrate surplus for EU27 at regional level in the base 119 Drawing a map of the High Nature Value Farmland indicator for Belgium amp Luxembourg for the base Drawing a map showing changes between the base year and the ex ante results from the baseline 125 Drawing a map with the base year results next to one showing changes from the base year to the Dase line resulis 25e tot E 128 The software behind the mapping viewer and the CAPRI exploitation 1008 131 CAPRItdsks asDustHess Tode uei tied ridet tees tud ria dede 132 Execution of tasks via a GamsStarter and GamsThread c ccccccecceccecscecceccscescescecescescecescascusens 132 Retactorimneo the sy io tls 133 Views aS Ne CONCEDE 134 US E
8. x5 amp xdndc PT 0202 gdx 8 xobs CZ 0202 gdx amp xobs FI 0 xdndc_PT_0213MTRSTD gdx xobs CZ 0213MTRSTD gdx a xobs_FI_0 amp xdndc RO 0213MTRSTD gdx xobs DE 0202 gdx amp xobs FR xdndc SE 0202 gdx xobs DE O0213BIOF D10E10 gdx a xobs FR Zuletzt verwendete Dokumente az a xdndc_5E_0213MTRSTD gdx amp xobs_DE_0213BIOF_D2E2 qdx a xobs_HU_ xdndc_SI_0213MTRSTD adx xobs DE 0213MTRSTD adx a xobs_HU_ amp xdnde_Sk_0213MTRSTD gdx amp xobs IR xdndc UK 0202 gdx 8 xobs 0213MTRSTD gdx a xobs IR xdndc LK O0213MTRSTD gdx amp xobs EE 0202 g9dx a xobs IT 0 amp xobs AT 0202 gdx xobs EE 0213MTRSTD gdx xobs IT Eigene Dateien a xobs_AT_0213MTRSTD gdx amp xobs_EL_0202 gdx a xobs LT f amp xobs BG 0202 gdx amp xobs EL 0213MRSTD gdx xobs LT amp xobs BG 0213MTRSTD gdx amp xobs EL 0213MTRSTD gdx xobs LV 48 a xobs_BL_0202 gdx amp xobs_E5_0202 gdx xobs LV Arbeitsplatz xobs_BL_0213MTRSTD gdx xobs ES 0213MTRSTD gdx a xobs MT lt gt Dateiname xobs DK 0202 gdx Netzwerkumgebt Dateityp CAMS gdx files Load gdx file Load selected tables s CAPRI GUI ersion 1 6 November 2008 User name Wolfgang Britz User type Administrator 39 If one wishes to see the information for several Member States simultaneously one may click on Load f
9. be used as filters in table definitions or interactively by the user A specific tag is lt aggreg gt yes lt aggreg gt When found for an item in the rows it will be shown twice in the table once in the top part and then again 143 Index CAPRI installation 11 Changing fonts 55 Column and row selection 51 Comparison output 56 Cut off limit to determine empty cells 55 drag 92 drawing several maps 128 file export 91 Flow maps 76 full extent 92 Gams settings 11 Graphics Bar charts 68 Box and whisker charts 73 Clipboard export 68 Export to file 68 Histograms 74 Line and point charts 70 Markov charts 75 Pie charts 71 Spider plots 72 Hiding empty columns or rows 55 Histogram 56 info pointer 93 legend continuous linear scaling 89 continuous logarithmic scaling bar 90 Loggin in 10 map with percentage changes 125 Maps Classification Area weighted classification 82 Classification method 82 Color table 85 Equal interval 83 Excluding zeros from classification 82 Manual classification 84 Mean standard dev 84 Natural breaks 83 Nested mean 84 Quantile 83 clipboard export 91 Frequency diagram in map 85 Getting data for specific polygons 93 Highlighting specific regions in the map 94 Histogram window 80 Info pointer and window 93 Regional labels in map 98 Rivers and cities 99 144 Shrinking polygons according to UAA share 81 Store settings 100 Updating the map 98 Number format and rounding 55 numeric fi
10. 2 CAPRI e caprilgams View Handling Windows Exploitation of spatial results Data View 1 Activity Items Table uaa 5 a Mineral Fertilizer Consumption Nitrogen kg Agri Env indicators driving Forces BASE El Now according to the guidelines for RD indicators HNV 15 to be found under Pressures and benefits which is stored as another table So opening the drop down list for the tables allows us to select the correct table View Handling Windows 2 Exploitation of spatial results Data View 1 Activity Items Table uaa 5 aj Mineral Fertilizer Consumption Nitrogen Miha Agri Eny indicators driving Forces S E Agri Enw indicators driving Forces 4gri Eny indicators pressures and benefits ABT Economic indicators at HSMU level 2866 Climate soil slope and 2867 Results From meta model 2868 Next we need to find the correct item and in order to do so the drop down list for the items must be selected and the indicator 23 selected as seen below 122 Exploitation of spatial results Data View 1 Activity Items Table 15 Gross Nitrogen Balance E Aor Env indicators pressures and benefits 15 Gross Nitrogen Balance N ha No 16 Risk of Pollution by Phosphorous surplus in P2OS ha 18 Ammonia emissions kg 19 Green Ho
11. Pie charts Pie charts are useful to show shares on total as e g trade flows The shares are calculated from the columns whereas each column group typically scenarios receives its own pie Only one row is allowed exploitation Data View 11 s a DEAT e LE market model aggregated Norwa Imported quanbties 1000 t 2013 iot pot turopean mE Rest of Europe Russia Rest of india China Australia and Turkey B x balcans Bolar zm jac 1107 23 1 EX E T exploitation Data View 1 Table Importer activity Years reor Je Import flows market model agaregated Norway imported quantties 1000 t 2013 Product Cereals BIOF_D2E2 BIOF_D10E10 The user has the following options to modify the presentation of pie charts 71 Options pie charts Maximal number of plots Maximal number of observations P T hd Minimum percentage to draw label 100 Foreground transparency in 94 20 T 3D effect Labels inside of pies Circular pie The maximum number of plots refers to the number of elements in the dimensions of the column group The example above shows two plots The number of observations defines the numbers of pies if more columns are available the cake will eventually give a wrong impression if not all values are used to define the sum and the shares The minimum per
12. Show small circles showing distribution of regions Min 418 65323 A Mean 358 84164 Show rectangle representating distribution of classes Median 345 89148 Draw outline of all polygons v Max 1392 846 Std Dey 4468 262 Dimension shown in columns of result window for current region ears Y Dimension shown in rows of result window for current region Activity Y ok to UM P Y y 4 low high Copying the map to the clipboard or saving to disk In order to export the map to other applications the easiest way is to use the clipboard in order to do so press the copy to clipboard button Afterwards the current map can be imported into other applications as e g MS Word Another possibility is to store the current map in jpeg format on disk to do so use the export button which will open a file dialog to choose the name of the file and select between different graphic formats For MS Office users the Windows Enhanced Metafile emf format is especially interesting as it allows to change the graphic afterwards e g by moving the legend or changing the text Export view as C Dokumente und Einstellungen britz export pdf Portable Document Format pdf iv Windows Enhanced Gem N Portable Document Format Scalable Vector Graphics svg svgz MacroMedia Flash File Format swf Encapsulated PostScript eps epi epsi epsf
13. BL HSMU DBF E 200000001 gdbindexes E 200000003 gdbindexes 400000005 gdbtable E 200000005 gdbtablx E 200000006 freelist E 200000006 gdbindexes wW a00000006 gdbtable a00000006 gdbtablx a00000007 gdbtable a00000007 gdbtablx E 400000008 gdbtable a00000008 gdbtablx 20000001c Freelist zi 20000001c gdbindexes X 102 If desired the pane allows openening selection lists for the different data dimensions 2 Please choose a file format for export X Export Data Set export dimensions Export selection For Activities Select Export selection For Input and outputs Select Select You can next the tables for export 103 2 Please choose file format for export Export Data Set Eables to export Select the tables be seen by user in internet browser Agri Env indicators driving Forces Economic indicators at HSILI level Climate soil slope and alitude Results From meta model nitrogen Results From DNOC meta model water Back Beware the pre defined table structure will be lost as will long texts and units attached to the tables However in the case of DBF export a second file with that information will be automatically created If you solely want to export the table you have currently up front use the copy to clipboard button The clipboard export will retain the pivoting a
14. The exploitation tools of CAPRI build on a rather simple structure Each CAPRI work step stores its results as GAMS parameter representing a multi dimensional sparse cube which is stored as a file The exploitation loads the non zeros from one or several GDX files into memory However given the length of the different dimensions and the use of short codes the user would be typically lost on his own in the large tables The XML definition file is the equivalent of a collection of SQL queries as it defines views which combine filters in the dimensions of the cube with information on how to show the results pivot table graph or map 137 The structure of the XML definition files for the views General comments It is not intended to let the user edit this file but in order to have a complete documentation some information about the structure is included in here The XML parser used by the GUI s java code 15 not a general XML parser as tests revealed that the java base general XML parsers were rather slow For the XML file used for the definition the views the standard name is tables xml using a simple parser has some consequences only one tag is allowed per line and tags are not allowed to span several lines Also error handling is so far only rudimentary as users are not supposed to edit that file The table viewer currently supports up to 6 dimensions which are named as 1 Region 2 Activity 3 Product
15. lowest class which shows the lower limit Legend Separate rectangles 0 00 lt lt 49 28 lt 59 92 lt 74 08 lt 80 19 lt 86 45 113 44 450 86 89 2 A continuous linear scaling bar That gives an optical idea about the distribution of the class limits Overlapping of the number is avoided by skipping class limits close to each other Legend Continous bar linear scale ee T 0 00 49 28 74 08 113 44 450 86 3 A continuous logarithmic scaling bar end Continous bar lag scale 0 00 1 57 49 28 74 08 113 44 450 86 In all the cases the tool dialogue can be used to set number of digits shown e g reducing the number of digits to zero leads to a linear bar as shown below I lI 0 4960 74 86 113 451 The reader is reminded that the label can be changed manually as shown below 90 M ci daats mappia view M l m Ei f Color table Green yellow red Set value for color change for Green yellow red 345 89148 Years Classification method Quantile Y Number of classes Number of regions with small values to remove from class definition Number of regions with large values to remove From class definition O Legend separate rectangles a 1 392 846 345 89 250 i 418 65 487 10 1392 85 Cummulative distribution graph v n 249 0
16. Clear selection add pattern to labels Afterwards the map will look as shown below CAPRI e caprii gams xl View Handling Windows Exploitation of spatial results Data iew 1 O xl Activity Items Table uaa Y 5 a Mineral Fertilizer Consumption Nitrogen N ha v agri env indicators driving forces Y Scenario BASE mc 0 00 0 00 1 lt 450 86 CAPRI GUI Version 1 2 3 March 2007 User name Wolfgang Britz User type Administrator 95 The tabular view opens up the possibility of using numeric filters option discussed in the following Take for example the task to select all regions where the Nitrogen Fertilizer Consumption is between 100 and 150 kg ha First switch from map to tabular view In the table click with the right mouse button in the column header of that column holding the values to which the filter should be applied as shown below We will need to apply the filter step wise first e g selecting all values greater than 100 and then removing those which are above 150 lection View Handling Windows Build database Exploitation of spatial results Data iew 1 Generate baseline Activity Items Table Edit simulation uaa 5 a Mineral Fertilizer Consumption Nitrogen Agri Env indicators driving Forces Y Run simulation MOERS BASE Define numerical selection Filter For table row
17. Mineral Fertilizer Consumption Nitrogen N ha indicators driving Forces Scenario BASE kb i gt r z a a 4 m 1 x b Boom LSI E p EM 0 00 0 00 0 00 49 28 49 28 lt 74 08 74 08 lt 86 45 86 45 lt 450 86 Updating the map Generally the map is updated automatically when the user changes an option with an impact on its layout as long as the number of visible polygons is below 20 000 If that amount is exceeded the classification dialogue is updated immediately but not the underlying map In order to apply the changes the apply button must be clicked on The user is informed that the ok button will also update the map so that an apply immediately before an 15 not necessary Adding region label to the map In the map option dialogue tick the box Show regions labels in map _ Region labels Label options to add labels to the largest polygon for each region as shown below 98 Build regional database 0 By clicking on the button the Region label steering dialogue box opens which allows changing some settings For maps with just a few regions or when zooming it might be worthwhile trying to play around with the action to improve labeling Region labels steering Font size For region labels x location For region labels
18. Number of classes 54 Number of regions with small values to remove from class definition 024 Scenario Number of regions with large values to remove from class definition 024 BASE Treat zeros as missing values Use area weights for classification Draw in high quality v Shrink polygons according to share of UAA Set value For middle color 39 v cumulative distribution graph Frequency groups 1002 v Draw me 0 00 1 08 1 39 1 5 1229 D d i i Preview Ai E i centri 4 H gt Ps m BH Sample Text Sample Text 1 Sane Text Sample Text 0 33 0 98 1 L E Sample Text Sample Text Show small circles showing distribution of regions n 1230 0 v Show rectangle representating distribution of classes D Reset 3 ee Legend Separate rectangles v EIOS 9 SUM praw outline in same color v Std Dev 0 64539707 ptandard map title v Dimension shown in columns of result window For current region Dimension shown in rows of result window For current region he ok store settings load settings 86 10 a Cropping Livestock pattern livestock density Livestock units UAAJ hd eel Q 9 il nd es Qs Map option dialogue Classification method Quantile Number of classes amp Number of regions with small values to remove fro
19. selection SVN password 000000 SVN URL For results https svn1 agp uni bonn de svn old trunk results tploit sce Scenario 5 The runner can enter the additional SVN urls relating to the different sub directories of a CAPRI installation That should give some flexibility when working with branches on the server Option Option User Settings CAPRI System Settings GAMS SVN Other options SVN user id SVN password SYN URL for Gams SVN URL for results SVN URL for restart https j svni agp uni bonn de svn oldjtrunk gams https lisent agp uni bonn dejsvnjoldjtrunk results https j svni agp uni bonn dejsvnjoldjtrunk restart SVN URL For data https svni agp uni bonn de svn old trunk dat Save in T britz CAPRIVGUI capri ini Performing an update The second functionality for an exploiter and runner is to update all directories with the menu item britz capri gams ITE Help S N update Gen A ate GUI geometry from shapefile Utilities SVN update Fait table definitions 2 An update will download updated versions of files into hidden directories and if the related files in the local working copy have not been modified will also replace the local files Choosing that menu item will open a dialogue with just one button termed update and an area into which messages fro
20. 2006 eps eps eps 100 100 100 eps DPBULF 2006 eps 75 eps eps eps eps eps DPDCOW 2006 eps eps eps eps eps eps eps DPSHGM 2006 eps 50 eps eps 50 50 eps DPEXTENS 2006 eps eps eps eps eps eps eps DPPOTA 2006 60 60 60 60 60 60 60 DPNE SHGM 2006 eps eps eps eps eps eps eps DPNE DCOW 2006 eps eps eps eps eps eps eps DPNE MEAT 2006 eps eps eps eps eps eps eps DPSL ADCT 2006 100 eps eps eps 40 40 eps DPSL CALV 2006 100 eps eps eps 100 100 eps DPNATMILK 2006 100 100 100 100 100 100 100 DPENERCRP 2006 100 100 100 100 100 100 100 Storing the scenario then generates a file as shown below user name the reference to CAPMOD GMS and the date and time are automatically added by the GUI The files will be added to the files stored in gamsWpol input Run simulation task At the core of CAPRI stands its simulation engine which iteratively links different types of economic models aggregate programming models at regional or farm type level with an explicit representation of agricultural production technology aggregated versions of these models at Member States model linked together to derive market clearing prices for young animals and finally a global spatial multi commodity model for main agricultural products and selected secondary processed products Differences in results between simulations may be rooted in three different blocks 1 Differences in the in going base year data and baseline CAPRI allows several base years and cali
21. 4 Scenario 5 Year 6 Dim5 in the XML file These logical dimensions can be mapped to any dimension of the original data cube read in by the java code Pivoting can then be used to map these logical dimensions to viewport dimensions seen by the user such as the columns and rows of a table Necessary tags for tables A table definition is found between the lt table gt lt table gt tags It must at least define The table theme such as theme Welfarec theme The themes are shown as a drop down menu in the exploitation tools The table name such as name Welfare comparison between Member States lt name gt The names must be unique e The items of the tables The order of the themes and table names will define their order in the drop down menu 138 Defining the items of the table The underlying idea of having a hand defined list of items for one of the definitions stems from the observation that most tables have only a very limited number of columns and that these are normally formatted with care regarding their text comprised Each table therefore requires a definition of items but the items must not necessarily be mapped in the column viewport item lt itemName gt Money metric lt itemName gt lt key gt CSSP lt key gt lt unit gt Mio Euro lt unit gt lt longtext gt Consumer welfare measurement expenditures necessary to reach utility in current simulation under prices of re
22. BUILD REGIONAL DATABASE DATE OF VERSION w 2008 05 28 18 09 34 ires 02 gdx Modified Member state WorkStep Item Content File name and SVN status 1000000 BASELINE CALIBRATION TITLE OF DATA SET Baseline calibration MTRSTD res_2_0213MTRSTD gdx Modified ALOOO000 BASELINE CALIBRATION 4 WORKSTEP Generate baseline res 2 0213MTRSTD adx Modified 4L000000 BASELINE CALIBRATION KEY MTRSTD res_2_0213MTRSTD gdx Modified ALOOO0000 BASELINE CALIBRATION NAME OF PROCESSOR ORGANISATION Wolfgang Britz res 2 0213MTRSTD gdx Modified 4000000 BASELINE CALIBRATION TEMPORAL COVERAGE 2013 res_2_0213MTRSTD gdx Modified 1000000 BASELINE CALIBRATION DATE OF VERSION 2008 09 26 15 53 45 res_2_0213MTRSTD gdx Modified 1000000 BASEYEAR 2002 res 2 0213MTRSTD gdx Modified A4L000000 SIMYEAR 2013 res 2 0213MTRSTD gdx Modified 4L000000 BASELINE CALIBRATION MODEL SWITCHES REC OFF MARKET M OFF YANI M OFF res 2 0213MTRSTD gdx Modified 1000000 BASELINE CALIBRATION MEMBER STATES BL DK DE EL ES FR IR IT NL AT PT FI SE UK CZ EE HU LT LY PL SI SK RO BG CY MT AL MK CS HR MO KO res 2 0213MTRSTD gdx Modified 4000000 BASELINE CALIBRATION LANGUAGE WITHIN THE DATA SET ENGLISH res_2_0213MTRSTD gdx Modified 1000000 BASELINE CALIBRATION NAME OF EXCHANGE FORMAT GDX res_2_0213MTRSTD gdx Modified 1000000 NAME OF OWNER ORGANISATION CAPRI network res_2_0213MTRSTD gdx Modified 4L000000 BASELINE CALIBRATION 4 NAME OF ORIGINATOR ORGANISATION CAPRI network re
23. administrator Choosing a initialization file Some users require several CAPRI versions installed in parallel In order to ease the task the user can call the GUI with a specific ini file by defining the ini file in the batch command file calling the GUI Alternatively the ini file can be changed the options menu Each ini file may then point to different directories according to the settings discussed in the following 10 Choose the ini file to load v 4 svn Zuletzt GAMSDOC Remove task specific settings Netzwerkumo Datentyp ini file for CAPRI Generate baseline Linking the GUI to the local CAPRI installation Next the GUI needs to know where your CAPRI system is installed Option Option CAPRI model files directory a a gams t i brit i lt Result Directory britz capri results Restart Directory ti britz capri restart tr brit dat Data Files Directory eae seeps Default policy file baseline MTR_RD Default policy expost AGENDA Rename capmod Ist etc by task settings Ist The CAPRI model files directory points to the location of the GAMS sources for CAPRI whereas the Result directory points to the location where results from CAPRI tasks will be read from and written from and accordingly for Restart and Data Files directories Changing these settings allows switchin
24. y location For region labels Labels Use shadow effect Weight For distances to neighbouring labels Weight For overlap Only short labels Use mass center Showing river and cities The NUTS2 map comprises geometry information about major rivers and cities above around 75 5000 inhabitants which can be added to the map Rivers Min width 4 City labels Min city size 1000000 0 99 Storing and re loading your settings Open the map option dialogue by pressing the map option button 19 Change the settings according to your needs and then press the store settings button in the lower part of the dialogue Choose a file name and a location You may later use load settings to retrieve them again and apply them to another map 100 x Classification method Quanti Y Number of classes 8o Number of regions with small values to remove from class definition 04 Number of regions with large values to remove from class definition Treat zeros as missing values Draw in high quality Set value For middle color 76 v abs Use area weights for classification v Shrink polygons according to share of UAA e 00 lt 32 78 782 20 lt 59 60 59 602 20 _ lt 90 76 90 764 20 012 4 lt 13744 drin 438 19 589 5 370 97 370 969 20 375 Cummulative dis
25. 21 4958 71 83 113 451 In order to ease the exploitation of the results pre defined tables are set up Currently they are broken down into five categories 1 Agri environmental indicators driving forces mineral fertilizer consumption consumption of pesticides irrigation shares energy consumption livestock densities shares or arable grass land or permanent crops 2 Agri environmental indicators pressures and benefits Gross nitrogen and phosphorous balance greenhouse gas emissions High Nature Value Farm land indicator 3 Economic indicators at HSMU level market revenues variable production costs income 4 Climate soil slope and altitude 5 Results from the DNDC meat model gas losses for different nitrogen compartments mineralization leaching 115 The tables on agri environmental indicators driving forces pressures and benefits are set up as close as possible according to the official EU Guidelines for Rural Development indicators CAPRI e capril gams Work step selection Build database 4 Scenario exploitation Data iew 1 Generate baseline R Activity Items Table Edit simulation rm 7 5 a Mineral Fertilizer Consumption Nitrogen N ha zl indicators driving Forces zl Run simulation Exploit data base results Exploit base line results Exploit scenario results Exploit gdx files Delete scenario results Basel
26. Activity Items Tabl uaa M 5 a Mineral Fertilizer Consumption Nitrogen kg N ha Y Ao Customize view Arial v il plain Fraction digits and decimal separator 2 w Separator between merged data dimensions Cut off limit to determine empty cells 089 mm Column width 750 7 Row width 7503 Hide empty rows Hide empty columns oF Show items highlight selected Long texts only V Use default pivoting for tables Show histogram Use dassification colors for tables m rp Show only selected items Show all items highlight selected Element used for comparisons ok define colors define statistics store settings load settings When we now draw the outlines of the selected polygons only see map option dialogue the map will draw the outline of the selected regions in cyan and thus highlight them The row selection will be maintained when the pivot or the table is changed as long as one of the selected items can be found in the rows of the new table The example map shown below is certainly not so interesting as changed class limits could have done basically the same job However we could switch e g to grass land shares to see if fertilizer input is more often found on arable or on grass land 97 181 Exploitation of spatial results Data View 1 Activity Items Table o e e 4 Q Q 1 Map gt 4 Juaa 5 a
27. C Show COCO results C Show CAPREG time series C Show CAPREG farm type results C Show CAPREG base year data Show HSMU base year data Input area Base year 2002 Member States DK Denmark Load and show reading information over existing runs CAPRI is ready loading data 2 Comparing the results for the base with the baseline projection results comparison between two points in time Again the user can select the Member States CAPRI e capril gams File User Options Work step selection Build database C Generate baseline Edit simulation Run simulation Exploit data base results Exploit scenario results Exploit gd files Delete scenario results Baseline result exploitation mode selection C Show trend results Show baseline and expost results Input area Base year Simulation year Member States Regional Break dovin reading information over existing runs CAPRI is ready loading data 3 Comparing results from different scenarios comparisons for one point in time but changes in drivers assumptions relevant for the CAPRI economic model CAPRI e capril gams Work step selection Build database Generate baseline Edit simulation Run simulation Exploit data base results Exploit base line results Exploit scenario results Exploit gd files C Delete scenar
28. EE A OAE NE T E EE TUN 47 Defining the list of activities products regions or 4198 48 EPOa ONO D TN 49 The structureor the GAMS generated recette o ete oos ao ped 49 Gade the data sd c Ile sos deese mde Dead ce acus icd dis 49 Multi dimensional viewer with pivoting and exporting 50 Pre denned View sen LAE erica 50 NTO SEO atas eue Dd 50 Navigating in the outer dimensions of the 51 COMMING Al LOW See C 51 Fredermed selection CLOMDS a es cese aces acus ied 53 SElECHON tiat acu 53 champ mg Chie 53 view uuo debes oat tease cen nM MU E MM M saa 54 bhowine MSto ran Vindo W o toa be eta iet tu la lo e edu 56 aio pia a mM OVI on er yee ety CE 58 THC Top NND m UT austen nusdundehaatiadeateased 58 Tooltips Tor column and row headers cepit rna tre IU Tp ptu 58 B jg doy ooi i intu ndi DERE eer M
29. IE MM MU UE 58 PO OT TOU E sre rer tee 59 SON UE 59 Numerical based on ge ee re prece pas nh 59 Changing the row height and column width with the mouse 60 Adano SU AIS UTC Soest tenter cU 60 Outher detection Implemented suono ce po abet tame eie re 63 VY AT TT ORO DIOS 65 General wants 65 Trou TRE Cala ono teet S detalles 67 POPS cance nda 68 Exporting the graphite toC PDO ALG 68 che eee tere Mtr eS TNT Tmt tl NDS 68 Friis A Ponte 70 PPS IR 71 72 boxaud Whisker alfo osse toot item PUR 73 Ses E 74 IVT RO TOUS E EE 75 76 AY 10 Qed MI 78 Colored themate Inap aa idus
30. M matching items whereas L Remove pattern from labets_ will remove matching items from the selection Predefined selection groups For some tables pre defined selection groups for columns or rows are stored When the mouse is moved over the selection button and rests there for some time and such groups exists a dialogue will show as below where the groups can be selected CAPRI t britz capri gams View Handling Windows Product Balances 0 Region Years Germany 2020 o Selection of predefined groups List of key words For groups 4 show 115 Cereals click 1 p in NUTBAL 3 Vegetables and Perma al 145 Another Ay All other crops dairy products 11 feed 12 Meat market 63 Other Animal products Meat 4 Young animals Other arable field crops 2UGB 1 Selection of the view type As discussed below the data can be shown as tables graphics or maps to do so use the view selection drop down box Crop share Ai or 0 01 99 and Whisker chart Histogramm Manually changing the pivot Normally the predefined views will link the data dimension in an appropriate way to columns and rows However the user is free to change the pivot to e g generate a cross sectional series A dialog opens zm E a when double clicking the 83 button to pivot th
31. Start of the related GAMS code GAMS is started as a sub process in an own thread The output from GAMS which is typically shown in command processor window is redirected into a pipe and its content read from there and shown in a window on the CAPRI user interface so that the user can check GAMS execution at run time The code allows filtering out specific statements generated by GAMS to be shown in the windows title bar to give an indication about program progress There are two final control mechanisms Firstly the return code by GAMS which indicates if the GAMS program was correctly compiled and then executed Typical execution time errors are math errors as division by zeros or read write errors on external files Secondly the user can apply different type of exploitation tools to check the logical content of the results 42 Utilities Generating co ordinate files for the exploitations tools from shapefiles CAPRI t britz capri gams File Settings Utilities Help Work step seli SYN update Generate GUI geometry from shapefile e definitions o Simulation year Coo file generation from shape file Coordinate file output britz capri guiNutsII zip Id string Name string Scaling for coordinates 1 Fill up mask for ids 100000000 Id string Name string Scaling for coordinates 1 Fill up mask for ids Id string v string
32. Y Income Hectares or Crop Production per or herd size share Animal 1000 ha or hds density or 0 01 animals heads ha 3317 92 373 27 63 49 2 28 67 13 Oilseeds 1086 43 140 57 5 05 1977 45 Other arable crops Next select a different selection of tables by pressing on the button below Table which currently shows the topic Supply details In the drop down list go to Environment and select Nutrient balances mapping view 119 CAPRI e capri1 gams View Handling Windows CAPREG base year Data View 1 Table Region se Welfare a E HE Markets b Prices d E mme Hectares or Crop Production per iro ha or herd size share Animal UAAR DNDC ad 1000 ha or hds density or 0 04 Environment gt Manure output per animal animals Multi Functionality P Environmental indicators per activity heads ha Energy b Nutrient balances 53 27 3317 92 table Nutrient balances soil details Nutrient balances gas losses DEEEdE Nutrient balances compare Member States 228 67 13 Nutrient balances mapping view Methane emissions N20 emissions Other arable 5 05 1977 45 crops Energy and Ressource consumptian The following map should appear You may select different elements of the balance now by using the drop down box b
33. about 11 second for the full data set Classification in Java is typically faster Views as the basic concept The concept of the CAPRI exploitation tools is centred on the idea of a view Content wise each view may be understood as showing one or several indicators relating to results of CAPRI working steps e g environmental effects of farming prices or market balances Each view thus extracts a certain collection of numerical values e labels them so that they carry information to the user long texts units e chooses a matching presentation as a table map or graphic e and arranges them in a suitable way on screen The views can be linked to each other allowing a WEB like navigation through the data cube Views can be grouped to themes The user may open several views in parallel and he may change the views interactively according to his needs e g switch from a map to a tabular presentation or change the pivot of the table sort the rows etc Internally each view is stored in an XML schema Technically a view can be understood as a combination of a pre defined selection query along with reporting information The XML schema allows to attach long texts units and tooltips to the items of a table and thus to show meta data information to the user The XML schema hence replaces look up tables in a DBMS It may equally store information regarding the pivoting the view type table map different graphic types and for maps
34. application rates Environmental indicators How to visualize the HSMU information Given the 1x1 grid resolution the most obvious way to look at the information is to produce maps with the CAPRI GUI There 15 a co ordinate set available called HSMU zip which comprises the geometry for about 1 8 Mio Polygon which represent the HSMUs There are four options to view HSMU data 1 Loading data for one or several Member States for the base year dis aggregated information from the NUTS II CAPRI data base 2 Loading data for one or several Member States for the base year and the baseline the latter representing dis aggregated data from NUTS II results of the baseline calibration 3 Loading data for one or more scenarios for a given year 4 Loading data manually Loading data based on the GUI presets As for the results at NUTS II level there are three pre defined exploitation possibilities included in the CAPRI GUI 1 Viewing the results for the base year Given the tremendous number of HSMUs the user can select for which Member States the information should be loaded 113 CAPRI 11 File User Options Work step selection Build database Generate baseline Edit simulation Run simulation Exploit data base results Exploit base line results Exploit scenario results Exploit gd files Delete scenario results Data exploitation mode selection
35. batch execution facility is a tool which e Allows executing many different CAPRI tasks after each other without requiring user input Reports the settings used any errors and GAMS result codes in a HTML page from which they may queried at a later time e Ensures that each new run generates its own listing file which can be opened from the HTML page Allows storing the output of the different runs in a separate directory while reading input from unchanged result directories 35 The purpose of the batch execution facility 15 therefore at least twofold the one hand it allows to set up test suits for the CAPRI GAMS code such as checking for compilation without errors for all tasks and different settings such as with and without market parts etc Secondly production runs of e g different scenarios can be started automatically It 1s planned to add timer facilities to the batch execution so that the GUI will start a suite of runs at a pre scheduled time Along with the planned functionalities to compare in a more or less automated way differences in results between versions the batch facility is one important step towards quality control For details on the batch execution facility see the technical document Batch execution of CAPRI tasks to be found on the Capri web page under technical documents If the suite of tasks comprises execute statements those can be downgraded to compile with Only c
36. becomes the new center point of the map and the map resolution is reduced stepwise by 25 Equally you may drag the map while keeping the current resolution by choosing the drag pointer Kel Finally in order to return to the original full sized map use the full extent button The reader should note that the full extent button shows a rectangle around the arrows 02 Getting data for specific polygons The info pointer will open an additional window as shown below which displays information on the current polygon the circle above the 1 being the focus point The title bar of the new window shows the code and if available the long text of the polygon currently pointed to with the info pointer The content of the info window is continuously updated when the mouse is moved over the map and all polygons belonging to the same region as the one pointed on with the mouse is highlighted 2 0 2 4254 2425 44 If the user opts to use one of the comparison options to be shown percentages differences normalization Frecton digits and Gear separator 2 Separstor between merged data dimensons an additional column is automatically added to the info window showing the comparison value used That by clicking on the customize button is especially helpful when the map shows only differences 03 The content shown in the info window is not fixed rather the user
37. classification and removing small and large values In GAMS zeros and missing values cannot be distinguished For certain results zero results are therefore coded as very small numbers to allow for that distinction Zero observation can be excluded from classification and the polygons with zero observations will not be filled Equally a number of regions with small and large values can be excluded from classification Classification method A first important feature is called classification method and defines how internally the class limits are set For all types of automatic classification methods a clean up procedure is used which removes classes with identical limits It is generally recommended to use a number of classes which can be easily identified by the user and to consult the frequency or cumulative distribution graphs present in the map option dialogue to check to what extent the class limits chosen represent the data well The following classification methods are currently supported 82 Natural breaks Natural breaks classification is a method to cluster the data into classes so that differences between the means of the classes become high while the standard deviation inside the classes becomes low FISHER W D 1958 ON GROUPING FOR MAXIMAL HOMOGENEITY JOURNAL OF THE AMERICAN STATISTICAL ASSOCIATION 53 789 798 Code based on HARTIGAN J A 1975 CLUSTERING ALGORITHMS JOHN WILEY amp SONS INC NEW YORK PAGE
38. defined views An XML file links pre defined views to the result content of the tasks Each view defines selections in the different data dimensions the view type table graph or map and the pivot plus some other information Graph A pre defined view Welfare overview 0 TBR Region Years m View type Germany 2020 Arr 01GWPBUR bal Total 18302 26 Mio Euro o Agricultural income 22957 85 Mio Euro Premiums 55 59 Mio Euro EAA Output 57403 86 Mio Euro Output crops 23831 03 Mio Euro Output animals 33572 84 MMioEuro ooo EAA Input 39101 61 Mio Euro Crop specific Input 8414 88 Mio Euro Animal specific Input 18713 32 Mio Euro Other Input 11973 40 Mio Euro Tax payers cost total 4655 59 Mio Euro Cost EU Mio Euro Cost EU under Pillar Mio Euro View selection The currently selected view 1s shown as a description of the window title 50 Welfare overview 0 It can be changed by pressing the view ____ button Pressing the button opens a pop up menu to select another view The available views will depend on the results you have loaded The views are logically grouped under heading and moving the cursor on the heading will show the single views Some views will be opened as graphics see chapter or maps see chapter No table Mio Euro Output crops Mio Euro Output animals Mio Euro EAA Input Mio Euro Crop specific In
39. ideal product was not available Some of the products were not able to allow for the necessary link between newly imported tables with region codes and an existing geo referenced geometry Others had very complex user interfaces or produced run time errors took ages to draw the HSMU maps or were quite expensive From the different options tested the gvSIG http www gvsig com index php idioma en freeware GIS seemed to be the only option allowing user to import data from a CSV which must however be semi colon delimited and join one of the columns to a shapefile At least the version installed at that time was however running not very stable In the end it was decided to build on the existing code base and let Wolfgang Britz write the additional code on demand The main advantage of that approach is the fact that the mapping view is transparently integrated in the CAPRI GUI it is sufficient to switch from Table to Map in a drop down list to produce a colored map and that user demands regarding additional functionality may be and had been added taking into account the specific needs of the CAPRI network Compared to ArcGIS where the EU27 HSMU geometry plus codes and centroids requires about 340 Mbytes the CAPRI version requires about 27Mbytes solely Reading in the CAPRI GUI is somewhat 133 slower compared to ArcGIS due to unzip on demand The actual drawing operation takes about the same time as in ArcGIS
40. of result window For current region niae v ok store settings load settings Manual set colors 2 Map option dialogue E xj Classification method Manual Y Number of classes om Number of regions with small values to remove from class definition 024 Number of regions with large values to remove From class definition ps Treat zeros as missing values Use area weights For classification Draw in high quality v Shrink polygons according to share of v Set value for middle color 112 82 M 1 2 lt 28 41 28 407 17 398 3 lt 51 86 51 865 17 398 4 lt 112 82 112 821 17 398 5 lt 586 84 586 835 17 317 Cumulative distribution graph Frequency groups 1002 v Draw mean and 1 std dev 0 00 51 86 112 82 1227 1 0 00 i 293 42 586 84 55 96 141 55 Show small circles showing distribution of regions n 1230 0 Min 0 0 v Show rectangle representating distribution of classes Mean 55 963432 Lesend Separate rectangles v Median 30 241 Max 586 8354 Draw outline in same color w Std Dev 85 59119 btandard map title Dimension shown columns of result window for current region Scenario Y Dimension shown in rows of result window for current region Y ok store settings load settings Finally the user can choose its own colors by double clicking in a color field in the legend table That shou
41. of steps with a lower one Consequently results from steps with a higher order should be younger then those from steps with a lower order Item the different types of Meta data provided e Content actual Meta data for the item e File name and SVN status the GDX file from which meta information is loaded plus information about its status in the SVN versioning system Modified means that the file in the local copy was modified since the last update and was not committed afterward Out of date means that a newer version is available on the server Conflicting means that an updated version of the file is available to the local copy but that the file was modified Not under version control means that the file is not handled by the version system It allows checking the internal consistency 1 e if results entering certain work steps are outdated In that case the line with the date stamp is shown in red The scroll down boxes above the table can be used to select in the table The first entry selects all items Clicking on the table columns allows sorting 33 Graph Table with meta information Meta data information PREPARE NATIONAL DATABASE TITLE OF DATA SET Prepare national database COCO1 coco output tmp gdx Normal
42. point in sequences of work steps A new data base for the model needs to be constructed either after updates of the underlying statistical raw data or after methodological changes in the code affecting content and structure of the data base Controlling if updating the model yielded satisfactory results possibly for the different tasks is a time demanding task which requires in depth knowledge about the quality of the different in going data and the logical relations between the different elements of the data base Users interested in ex ante policy analysis are usually better off by taking the data base as given and consequently the work step is disabled for users which have no administrator status The work step consists of six different tasks l Prepare national data base Generation of complete and consistent time series at national level mainly based on Eurostat data CoCO from Complete amp Consistent CoCo runs per Member State simultaneously for all years if data from other Member States are used to derive fallbacks as an EU average only the raw statistical data are used The user can only choose which countries to run and which years to cover Finish national data base Completion of the CoCo data by time series on consumer prices and certain feeding stuffs In both cases it turned out that only the complete and consistent time series for all Member States from 1 provide a good basis for that step The s
43. show only selected items m texts only Comparison output onty values m Data dimension used For comparisons Years Y Data dimension 126 Years 2013 a ae eee 100 00 lt 31 46 31 46 lt 13 4196 13 41 lt 2 88 2 88 lt 8 01 8 01 lt 463350 69 Now there two things we would most probably like to change the number of digits shown in the legend and getting rid of very large values shown in the legend The number of digits can be changed with the tool dialogue by changing the fraction digits Large numbers can be excluded from the classification by increasing the Number of regions with larger numbers to exclude from class definition in the example below the number had been set to 20 2 Map option dialogue Color table Green yellow red v Classification method v Number of classes 5m Number of regions with small values to remove from class definition 024 2013 Number of regions with large values to remove from class definition b Legend Separate rectangles v N 32 lt 14 4 lt 7 7 lt 163 1 2 3 149 lt 4 4 063 4 5 4 1 3 1 1 1 1 I 100 Show small circles showing distribution of regions n 920 0 Show rectangle representating distribution of clas
44. side shows the key again Entering a new key allows adding new items The link allows placing a hyperlink for that item to another table Probably at some later stage the editor tool and Java code will be changed in a way that allows for more properties of the view hide empty columns rows specificities for the views to be edited Beware before editing a new item save your last changes Once all items and properties of a table had been entered save your changes 47 Defining the list of activities products regions or dim5s The screen shot below shows as an example the list for the products Their keys under which they are loaded from the GDX file s are shown in a selection list on the left hand side The right hand side shows the properties for each item Changing the key allows to add a new item to the list The name is the one shown to the user in the views setting Aggreg to yes will let item be shown twice once in a block on top showing only aggregates and a second time in the list of all items Components of aggregates should be placed underneath an aggregate in the list The selection should be entered comma separated in brackets Tables Regions Region selection groups Activities Products DimSs TOOU CERE E WHEA SWHE D WHE RYEM BARL CUD OCER PARI OILS RAPE SUNF SOYA PULS Aggreg POTA SUGB VGPM TOMA OVEG APPL TAGR CITR OFRU OLIV TABO TWIN OCRP
45. the data from the gdx file into hash tables for exploitation purposes That is done in a two step procedure In the first step all records from the gdx file are read and vectors of all found indices are stored The length of each data dimension is only known when all data records are read and is equal to the number of unique indices for each dimension Once all records are read the final length of these index vectors then defines a linear index room for the multi dimensional table In a second step the records are read again and the index vectors for each record now allow to define a linear index in the total table A hash code is derived from that linear index to store the numerical values into a hash table As the number of items to store in the hash table is known beforehand a rather simple hash table implementation can be used If necessary step one can be run over several parameters which may be hosted in several gdx files so that results from different runs can be merged into one hash table As the gdx files provide lists of all labels used in any parameters stored in that gdx file the index vectors allows to build lists of labels linked for each index in a data dimension There exists an additional storage type in the gdx files to retrieve long texts to the labels as defined in GAMS set definitions However one label may occur in different sets with different long texts and the gdx file does not store a possibly user defined relation bet
46. the exploitation tools Views as the basic concept for exploitation in CAPRI The concept of the CAPRI exploitation tools is centred on the idea of a view Content wise each view may be understood as showing one or several indicators relating to results of CAPRI working steps e g environmental effects of farming prices or market balances Each view thus e extracts a certain collection of numerical values e labels them so that they carry information to the user long texts units e chooses a matching presentation as a table map or graphic arranges them in a suitable way on screen The views can be linked to each others allowing a WEB like navigation through the data cube Views can be grouped to themes The user may open several views in parallel and he may change the views 44 interactively according to its needs e g switch from a map to a tabular presentation or change the pivot of the table sort the rows etc Internally each view is stored in XML schema Technically a view can be understood as a combination of a pre defined selection query along with reporting information The XML schema allows to attach long texts units and tooltips to the items of a table and thus to show meta data information to the user The XML schema does hence replace look up tables in a DBMS It may equally store information regarding the pivoting the view type table map different graphic types and for maps classification colo
47. the step and the included tasks are only for user type administrator According to current planning the baseline will be updated in close co operation with DG AGRI twice a year in early summer and early winter following the release of a new medium term market outlook by DG AGRI The CAPRI baseline is a mix of trends expert knowledge and automated checks for logical consistency and is constructed by a sequences of tasks 1 Generation of ex post results Albeit not strictly necessary for the base line the ex post results often prove quite helpful when analysing the reference run The ex post results are model run for the base at base year policy and other exogenous parameters inflated to the chosen simulation year 2 Generation of policy shifts In order to capture in the later trend projection the effect of policy changes between the base and the simulation year so called policy shifts are calculated by applying the ex ante policy to the state of world technical progress management practises population numbers per capita income consumption patterns etc in the base year The policy shifts are defined as the relative changes against the base year of implementing the ex ante policy 3 Generation of the trend projection The trend projection task is rather time consuming and may run several days when the farm types are included It consists of several sub tasks Firstly 25 independent trend lines for many
48. to GAMS engine It may take while until GAMS reacts and stops with an error message after running its finalization routines e show results loads the results form the task in the CAPRI exploitation tools e show meta data loads the meta data for the results from the task in the CAPRI exploitation tools Note for exploiters the three buttons referring to GAMS will not be visible The same holds for runners and the work steps Build data base and Generate baseline 20 Graph Basic layout of the GUI CAPRI t britz capri gams File Settings Utilities Help Work step selection Task properties for run scenario Base year 2004 Generate baseline Simulation year 2020 DK Denmark DE Germany Collect meta information Countries EL Greece ES Spain Batch execution franca Regional break down NUTS 2 Run scenario Generate GAMS documentation Exploit gdx fil Number of iterations 50 xploit gdx files Scenario definition file TSTCAL1 GMS Task selection Market models Define scenario C Global market model C Young animal market model C Regional CGEs Run scenario Reporting i v Aggregates for actitivities and commodities v Environmental indicators Life cycle assessment for energy Downscale scenario results v Multi functionality indicators C Iteration tracking Exploit scenario results f compil
49. v Scaling for coordinates 1 Fill up mask for ids u Get fields from cooFile Start coordinate generation As a first step the shapefiles must be analyzed by using the Get field from coofile button 43 Coo file generation from shape file shapefile input Coordinate file output EXbritzWcapri gui WutsILzip Id string NURGCDL2 Name string NURGCDL2 v Scaling for coordinates 1 Fill up mask for ids 00000000 Id string v Name string NAME Scaling for coordinates ao Fill up mask for ids Id string INT NAME Name string INT MAME v Scaling for coordinates 1 Fill up mask for ids AW Lr 4 4 a NUTSO aToooooo 1 Center 4611506 3703 2 the geom POINT 5235807 800088232 5248294 163399193 0 Murmansk 0 COUNTRY Russia O POPULATION 468000 1 CAPITAL N 1 the geom MULTILINESTRING 5847750 3741850 5847750 3742050 5847650 3742150 5847650 3742550 5847850 3742750 584775 ID 11 WSO ID 1456942 2 PFAFSTETTE 1 0 3 MAINDRAIN 5000 4 INT NAME Oka Volga 4 WINDOW 2013 5 MAIN PER W y 5 OBJECTID 1 6 SHAPE Leng 3710847 47957 7 Get fields from cooFile Start coordinate generation Once that is done the fields from the shapefiles used for keys and the long texts can be chosen and some other settings The interface will assume treat line strings as river points as cities and polygons as regions Editing the table definitions underlying
50. web page Build Open GUI document CAPRI web Open CAPRI documentation the web Open CAPRI web page Run simuli Send mail to CAPRI user list Last year The Help menu allows opening the online help system which can be invoked by pressing F1 A copy of the content is also stored on the CAPRI web page and can be accessed via the second menu item Open GUI document on CAPRI web page will open the current document 19 Basic layout of the GUI The GUI is generally structured as seen below The left upper hand panel allows the selection of the different CAPRI work steps The left lower hand panel lists the tasks belonging to the work steps In both cases only one selection is allowed The right hand side offers controls depending on the properties of the task There are buttons allowing starting the task and typically a window which collects information at runtime The footer lists the user name and type and comprises a progress bar For tasks linked to a GAMS program the buttons as shown below will be active compile GAMS starts the GAMS compiler but does not execute the program A listing file will be generated Used to test if a program compiles without errors run GAMS tries to execute the GAMS program A listing file will be generated where possible compilation or run time errors are reported e stop GAMS sends a signal interrupt
51. ATETIME REC DYN RECDYN EXPOST POLSHIFT Unit BASELINE MARKET_M Longtext YAMI M NTSLVL Link Theme Meta Default pivot DIOS Items in rows scenarios in columns Default view Table Coordinates for maps Items are from Activities Region text and selection hide Activity text and selection Activity Product text and selection hide mE Dim5 text and selection hide Name Time and date Save add item Delete item Save table New table Delete table The new tool is structured according to the underlying logic and file Tabs in the bottom line let the user select tables or the different collections of items for regions activities products or dim5 such as premium schemes or trading partners Defining a table The pane for the table definition shows four sections The upper left section allows selecting the table to edit To the right the basic attributes for the table are shown its name to which theme it belongs the pivot and the view selected when the view is shown and the coordinate file to use when a map is generated from the data Below are the descriptions for the logical dimensions for the table and selection strings Entering a new name allows generation of a new table The lower part relates the items of the tables They can be selected on the left hand side according to their key under which they are stored in the GDX file The right hand
52. Fraction digits and decimal separator x Column width 624 Row width ey Separator between merged data dimensions v Use default pivoting For tables Hide empty rows Hide empty columns Comparison output Only percentage difference Data dimension used For comparisons 28 Element used for comparisons poo s Now we should get a result as below CAPRI e capril gams View Handling Windows Scenario exploitation Data View 2 4 Scenario exploitation Data View 1 Activity Items Table Activity Items Table uaa 5 a Mineral Fertilizer Consumption Nitrogen N ha agri env indicators driving Forces uaa hal 5 Mineral Fertilizer Consumption Nitrogen kg N ha X Jagri env indicators driving Forces z Percentage diff to Table W Years 2002 S 6 x RERE 12 11 4 97 83 82 31 73 41 23 55 25 39 94 25 65 37 16 91 120 99 Now for both views the output should be switched to maps and there we are 129 CAPRI e capril gams View Handling Windows Scenario exploitation Data View 2 Activity Items lal x o x Scenario exploitation Data View 1 xl Table Activity Items uas No 5 a Mineral Fertilizer Consumption Nitrogen kg N ha v agr Env indicators driving Forces v rm z 5 Mineral Fertilizer Consumption Nitrogen N ha 7 Agri Env indicators driv
53. Java GUI with direct access to GDX files which is the current state of the art in CAPRI GDX files are an internal file format used by GAMS which allows a rather efficient I O for large sparse tables An API library allows to access GDX files from other applications That design has the obvious advantage to be firstly based onto the portable JAVA language Secondly as no external DBMS is used it is possible to use CAPRI by solely executing GAMS programs CAPRI might hence run on any system supported by GAMS without the need to install additional software The GUI consists of three rather independent components Firstly a GUI to control the different work steps of CAPRI The code deals mostly with defining GUI controls button scroll down lists etc to manipulate properties of CAPRI tasks and then to start them as GAMS processes That part has been thoroughly refactored with the revision of 2008 A second important part is the CAPRI exploitation tool which are basically generic enough to be used for other modeling systems as well The current refactoring left most of the code untouched compared to the code developed since 2006 with the exemption of the graphics which is now based on the JFreeChart library However as discussed below in 2007 the mapping viewer was refactored in larger part to host the 1 1 km grid solution developed in the CAPRI Dynaspat project The exploitation tool is a rather unique solution to exploit result sets from econom
54. OOIL TEXT TOBA OIND NURS FLOW Selections all market E44 OCRO FODC MATE Save add item Delete item The buttons should be self explaining 48 Exploitation tools The structure of the GAMS generated files The exploitation tools load directly the gdx files generated by the GAMS processes linked to the tasks described above The gdx files only store non zero numerical values The main content of a gdx file are two types of records The first type provides a list of all labels used to identify the numerical data in the file as GAMS does not support numerical indices but requires character labels The list does not distinguish for which data dimensions the labels are used They are hence typically a mix of product activity region and further labels The second type of records belongs to GAMS parameters scalars vectors or multi dimensional tables Each non zero numerical item in each parameter has its own record Each of these records provides the numerical data in double precision depending on the parameter type there may be different data stored in one record as for variables its upper and lower bound current level and marginal value etc and a vector of indices pointing in the list of codes described above Loading the data from gdx files The data matrices generated by the different tasks as described above and stored in gdx files are typically rather sparse so that it seemed appropriate to load
55. R Build regional database DEAR Build regional database view Region View Region view Region View Region Product Balances Danmark Product Balances Danmark Product Balances Danmark mum 3 og Supply 1000 t 1000 t 1000 4 gt C gt 9244 00 Cereals 9244 00 Cereals 9244 00 250 54 Oilseeds 250 54 Oilseeds 250 54 Other arable 4371 75 Other arable 4371 75 4371 75 Oilseeds Vegetables 248 46 Vegetables 5005 67 5005 67 248 46 5005 67 38944 26 38944 26 Other arable er 2168 92 2168 92 field crops 38944 26 Other Animal 7655 62 7655 62 2168 92 25601 70 25601 70 Vegetables Other Animal 7655 62 1116 83 1116 83 and nroduct gt Permanent 25601 70 crops Fertiliser 965 77 Fertiliser 965 77 v Adding statistics The user may add different statistics as rows to the table as reported in the following table The observations are assumed to be mapped into the rows of the current views Zeros can be treated as missing values The statistics summarize the observation separately for each column Statistics Shortcut 60 First value in fourth quartile mum of fie varus nm NM Minimum limit for outlier detection as defined minOutlier from user settings Maximum limit for outlier detection as defined maxOutlier from user settings The above related options can be either found in the customize dialogue box which opens by clicking the button on the
56. S 130 142 The algorithm does not only find the approximate best solution but often gives rather appealing class limit definitions It works rather well if no extreme outliers are present in the distribution In the latter case classes solely comprising the outliers will be generated and the vast majority of the values will be put in one or two classes The clustering algorithm is rather expensive to calculate so that in cases in which the population exceeds 500 observations a somewhat simplified version is implemented in the CAPRI GUI From the original observations a condensed population 15 generated whose members represented means of consecutive observations of the original one The members are set so that the number of observations from which the mean is calculated is not bigger then 1 500 of the original population size and that the spread of those observations is smaller than the minimum of 1 500 of the spread of the total population and 10 of the standard deviation The actual calculations are then done taking the size of the resulting classes into account Quantile The observations of the regions are split in a way so that approximately the same number of observations fall into each class Quantiles are cheap to calculate and are therefore the default setting and often appealing as colors occupy similar areas in the maps as long as the polygons have approximately the same size If unique values are found a
57. S lt isActivity gt allows only items from the product dimension and lets the table loop over the activities A typical example provides a table showing activity levels yield or economic indicators for the production activities Additional tags lt defpivot gt Defines the default pivot used for the table The pivot string consists of characters The first character position is for the table row blocks the second for the table rows the third for the column blocks and the last for the columns The logical dimensions are labelled with the following characters R regions products I Items 5 Scenario D Dim5 A Activity 140 The definition lt defpivot gt OROS lt defpivot gt thus means regions are in the rows scenarios in the columns The definition lt defpivot gt PISR lt defpivot gt puts the products in the row blocks the items in the rows the scenarios in the column blocks and the regions in the columns lt defview gt Defines the default view used for the tables the list of default views is equal to what the user can select in the drop down box lt COO gt This tag defines the geometry to use for maps Currently the following geometry files are available NUTSI zip NUTS 2 geometry for countries covered by the supply module MS zip NUTS 0 geometry for the countries covered by the supply module RMS zip Global geometry for the regions with behavioural functions in the market model RM zip Global geo
58. Scenario exploitation Data View 1 4 x Table Ragion Years Ole meere Pr Bar chart Supply dotais European Union 27 2013 B gt 5000 z amp 5 2 5 A NU lt gt mm o 2 75 000 4 gt 50 000 B 25 D 4 30 000 m gt 00 SEP z 4 500 000 1008000 E od SEP ap gap 4 9 8 5 5 30 4 204 Bol SEED ae P 500 gt 00 5 8000 B 2 500 2 amp Options For bar charts Maximal number of plots Maximal number of bar blocks Maximal number of bars per blocks Foreground transparency in 25 3D effect Plot vertical The user has a number of options for the bar charts By pressing the Cereals ly Oilseeds Vegetables and Permanent Fodder activities crops Other arable crops Scenarios 4r FI wm Stacked Cylinder for 3D non stacked 2 E c a Y button in the toolbar a dialog box including the section of Options for bar charts opens The number of plots refers to the number of columns in the underlying tables each column will receive an own plot with a matching value axis The bar blocks refer to the rows each bar block may comprise several bars taken from the column groups typically scenarios As seen above it is also possible to gene
59. The Graphical User Interface for CAPRI version 2011 Wolfgang Britz Institute for Food and Resource Economics Chair of Economic and Agricultural Policy University of Bonn Bonn October 2011 Acknowledgments Many people have over the years contributed to the development maintenance and application of the CAPRI modelling system After now ten years since a first prototype was constructed it is almost impossible to list them all and name their specific contributions The author opted for this rather technical paper to refrain from citing the different working papers which shed more light on methodological questions but rather refers in general to the CAPRI documentation Nevertheless it is only fair to mention Hans Josef Greuel and Andrea Zintl who both long before CAPRI was born have already developed software concepts and code which underlined to a large extent until 2006 the DBMS of CAPRI and in parts its Graphical User Interface Finally Alexander Gocht contributed over last years to the Java code underlying the GUI Dashja a student assistance checked in 2011 the user manual against the actual interface changed the text where necessary and corrected typos The work described in here would have been impossible without the funds by different donors mainly the EU Commission All errors in text and code remain with the author The author Dr Wolfgang Britz is a senior researcher and lecturer with the Ins
60. add layers again and add the dfb file you have generated in the step explained above You may also add the file with the meta data ELL Lookin gt e 6984 Ex 51 shrinked shp SK Csv Ex SK shrinked shp smu dbf csv solagra shp Ex std eo shp tpe dbf 5 Text File Shapefile dBASE Table Text File Shapefile Shapefile dBASE Table dBASE Table Text File Mame Jtest dbf Add Show of type Datasets and Layers lpr Lancel Next we need to connect the HSMU geometry with newly loaded data a process called joining in ArcGis In the context of HSMU_ EU27 choose Join and Relates then Join 106 f Layers ArcTaalbax E m 11515 1 8 3D Analyst Tools HSMLI ELI27 Analysis Tools ag ols test E 5 Open Attribute Table ability Tools CR zoom Layer Remove Joints p fa Zoom Make visibile Relate Visible Scale Range b Remove Relate s gt Use Symbol Levels Selection Label Features Convert Labels to 4nnotation Convert Features to Graphics Convert Symbology to Representation Data Save As Layer File Properties p That will open the join dialogue as shown below 107 x Jain lets you append additional data to this layer s attribute table so you can for example symbo
61. am will be shown It will use the current classification and color model to visualize the distribution of the values reports some basic statistics and shows a box and whisker diagram Shrinking polygons according to UAA share The optical impression received of a map where colors are used to distinguish between values depends to large extent on the area covered by a certain color If the majority of the pixels is drawn in red that will send a warning message to the user In the case of the HSMUs and information relating to agriculture that message can be strongly biased as almost all HSMU comprise some other land cover then agriculture and some of the HSMU comprise only very little agriculture but e g forest shrub lands water bodies or artificial land cover The HSMU geometry therefore comprises the information about the share of UAA assigned in the base year to each HSMU That information can be used to shrink the area of the polygons when drawn on screen accordingly That is done by drawing all points of the polygons towards the centroid of the polygon and then multiplying the distance between the point and the centroid with the square root of the share of the UAA In the original HSMU geometry such polygons had been broken down to simpler ones where the connection between a point and a centroid would cut through a segment of the polygon In such cases shrinking could let the new polygon hide other ones The graphs below show t
62. an Union 12 European Union 10 Bulgaria and Romania Select sources to show Flows Min Display Width 0 Flows Max Display Width 2 Show histogram V Show distribution circles for observations V Show distribution rectangles for classes Region labels Label options Legend Separate rectangles outline of all polygons Standard map title Dimension shown in columns of result window for current region Exporter X Dimension shown in rows of result window for current region Activity Resolution factor for printing file output compared to screen 15 ok apply store settings load settings The main options of interest for flow maps are the scaling model and the display width The following scaling models available e Linear the width is determined by relating the flow quantity to the sum of all flows for the same scenario Log the width is determined by multiplying the log of the relation between the flow quantity and the minimal flow with the log of the relation of the maximal and minimal flows for the same scenario e Polynomial the relation between the current flow and the maximal flow is raised to a power determined by taking the log of the relation between the maximal and minimal display width divided by the log of the regional between the maximal and minimal flow The user can prevent that small flows are drawn by setting a minimal width relative
63. andard title m ES Customize view plain Fraction digits and decimal separator 2 Column width 625 Row width 624 Separator between merged data dime Use default pivoting For tables Hide empty rows Hide empty columns Comparison output ovas Data dimension used for comparisons Element used for comparisons ok That should give the following map which then can be exported to other applications via the clipboard or can be send to the printer 2 124 Scenario BASE Drawing a map showing changes between the base year and the ex ante results from the baseline When scenarios or different points are compared with each other it is often useful to draw maps which show relative or absolute changes The following map is the typical starting point when the baseline is analyzed two maps with identical class definitions one for the base and one for the projection year el Diag 5 amp aaHTENS 2 Years 125 In order to draw a map with changes we must first get rid of the base year by de selecting the first map gt This is done by using column selection button LE which is found in the upper right corner of the window When the button is double clicked a dialog opens and one can select the projection year with the mouse only Afterwards the left map will no longer be present Selection dial
64. aphical User Interface GUI was developed in order to supports users to apply CAPRI for simulations and exploit results For reasons laid down further in a short chapter this GUI needs was now revised in major parts The paper both explains the usage of the new GUI as well the underlying software concept It is structured as follows The first chapter gives a short overview over the different work steps necessary to finally allow simulations with CAPRI The new GUI is as the old one realized in Java The small technical background paper Refactoring of CAPRI GUI and integration of new functionalities informs about the underlying software design Initialization Logging in The first step when the CAPRI GUI is opened for the first time 1s to set the user name and level This is done by selecting the user menu from the menu bar As long as no user name 15 entered the user cannot change its type and will only have exploitation rights The user type runner has additionally the right to run scenarios A user of type administrator can perform all operations including generation of a new data base and calibration of the modelling system In order to access the user settings choose CAPRI T britz CAPRI gams User e Wolfgang Britz The user and user types can also be seen in the bottom panel of the GUI CAPRI GUI Version 3 0 August 2010 Ini file capri ini User name Wolfgang Britz User type
65. ass below 392 70 the middle class were drawn in yellow When the user now selects another class limit the colors assigned to the classes change Here one of the shades of green is dropped and shades of red are added 67 Map option dialogue Classification method Manual Y Number of classes 8 Number of regions with small values to remove from class definition 02d Number of regions with large values to remove from class definition 024 Treat zeros as missing values Use area weights for classification Draw in high quality JV Shrink polygons according to share of UAA t 51 86 Loo 0o del desimt _ ofobs 1 0 00 0 00 0 30 488 TT 2 28 41 28 407 17 398 3 51 86 51 865 17 398 4 lt 112 82 112 821 17 398 5 586 84 586 835 17 317 Cumulative distribution graph Frequency groups 1 0024 Draw mean and 1 std dev 0 00 51 86 112 82 1227 i il it 1 1 1i bog i ou 1 0 00 i i 293 42 586 84 55 96 141 55 Show small circles showing distribution of regions n 1230 0 Min 0 0 v Show rectangle representating distribution of classes Mean 55 963432 Legend Separate rectangles v Median 30 241 Max 586 8354 Draw outline in same color Std Dev 85 59119 title v Dimension shown in columns of result window for current region scenario v Dimension shown in rows
66. ay be helpful to add the file with the meta data to the map and to open the meta data table with the help of its context menu It will give us the long description and units belonging to the data fields in the exported data table 109 E Attributes of Fest meta E B x ob Key Mame it LongTex oiin _ NosQm MmersFetizerConsumpion Non O W9Nma MN 5 6 Mineral Fertilizer Consumption Phosphorus SSRN L 2 SWHENoS c MmersNtroenAppicatonrate Softwhest 3 PLaP Mo amp ConsumlonofPesicdes OO Oo 4 WoTmhmesonshae _ SQWATSURPNoTU absacion _ T No 8 a Energy Electricty Ema reas Most Eros NENNEN 8 cj Energy Fuels Eura ha Moi s Croppingkivestockpeern Ivestock densty Livestock units ha IAA NENNEN L 10 RUM No1 bCropppingiivestockpettem rummantsdensy Livestockunits fha Fodder area NENNEN 11 M 12 NENNEN P 0 Coppingltivestockpatiern nonruminris dency Coppingsivestock pater grass land densty amp 14 PERM Na 10 d Cropping Livestack pattern permanent crops density d Mm E 0 ew meduinsigh it terning nd ees E es econ F iejeser eo praes eo praes dd E c j
67. bration points to co exist and users may choose the base and baseline year 2 Difference in what economic models are linked together and in the regionalisation level as the user may switch the market modules on or off may run the model at Member State NUTS II and farm type level or in comparative static or recursive dynamic mode 3 And finally the most common differences in the exogenous assumptions including the policy definition 29 Graph The interface for the task run simulation Task properties for run simulation Base year 2002 Simulation year 2013 BL Belgium amp Luxembourg Member States DE Denmark DE Germany Regional Break down Member States Sumber of iterations T scenario file name Global market model Young animal market model Aggregates for actitivities and commodities Environmental indicators Life cycle assessment for energy Multi functionality indicators The following discussed the settings e Base year determines the three year average underlying the regional see Build regional data base and global data base see Build regional data base and the trends see Generate trend projection e Simulation year the year for which results are generated and trends are loaded Member States if the global market model is switched off the user may run a simulation for selected Member States only e Regional break down the level of reg
68. but can trigger updates for the different parts separately 15 SYM settings Update GAS Update results Update restart Update data Update GUI Usage for installation purposes Since quite a while the CAPRI network discusses how installations specifically for training sessions can be organized more easily The newly embedded SVN functionalities in the GUI should ease that task somewhat specifically in cases where only exploitation functionalities are asked for The installation of CAPRI based on the new functionality is relatively straightforward As before a JAVA run time engine must be installed for the GUI to run For an exploiter only a minimum GUI installation e g without the large geometries for the 1 km layer and the necessary results files to view can then be copied to a local directory At first start the user must then only enter where the results had been copied to 1f the result files are not parallel to the GUI and save the information to his new CAPRI INI file 16 CAPRI capri gams f ox File Options Version control Help aC Set XML table definition file C Use table definitions from null Sort code lists Show dialog to link dimensions to sets Exploit gdx files List of tables loaded from GDX file s Nachricht 1 Result directory Acaprilresults does not exist Load file Load selected tables s CAPRI GUI ersion 2 0 March 2009 Ini file capri
69. by invoking the method checkSettings Check settings returns a string with a description of the first error encountered That layout eases dramatically the update process of CAPRI Definition of new tasks or changes to existing ones will generally not require changes in the GUI but simply creates the necessity of either implementing a new object with the required methods or updating an existing one Execution of tasks via a GamsStarter and GamsThread Execution of tasks with the property isGams is handled by a GamsStarter object An instance of GamsStarter lets the task write out the necessary include file s in GAMS format to generate a specific instance of the specific task a simulation run for a specific scenario simulation year with the market model switched on or off A GamsStarter also knows about the working directory or other specific GAMS settings as the scratch directory It may generate a pipe for the GAMS output to the console to show it in a GUI An AgpTask can be executed by a GamsStarter who will then create a GamsThread A GamsThread extends the SwingWorker interface of Java so that it may communicate with the normal event queue of JVM A GamsThread can be gracefully terminated by sending a SIGNT signal to the GAMS process That 132 will let the GAMS execution stop at a specific point determined by the GAMS engine itself and start the finalisation handling of GAMS as well as the removal of intermediate files and direc
70. can decide which data dimensions to use for the columns and rows by using the map option dialogue by clicking on the legend of the map If the user e g switches to items instead of activity the info window will look like shown below An alternative 15 to use a second tabular view in addition to the map I Map option dialogue 1 Color table Classification method Quantile Y Number of classes 55 Number of regions with small values to remove From class definition 024 Number of regions with large values to remove From class definition 024 Legend separate rectangles 1 0 00 lt 0 00 O 2 0 00 lt 49 28 49 282 3 49 28 lt 74 08 4 74 08 86 45 86 447 altixi 5 86 45 lt 450 86 450 861 NNNM errr r T M auem e i CEEE T 0 00 49 2940645 406 i did 0 00 225 43 450 86 Show small circles showing distribution of regions n 1312 0 v Show rectangle representating distribution of classes Min 0 0 Mean 60 723194 Draw outline of polygons Median 60 272877 Max 450 86072 Std Dev 2399 8152 Set value For color change from Green yellow red Dimension shown in columns of result window for current region Scenario Y Dimension shown in rows of result window For current region Items ooo rr SS CAPRI GUI Verse 0 2 3 Perch 2007 Ujer same gt Molga Dte t
71. centage to draw label defines a lower cut off limit if a cake s size is below the threshold no label will be drawn As shown in the example above setting the threshold to 10046 will erase the labels see Pie chart maps for an example It 1s also possible to place the labels in the pies and not outside of the cake as shown in the example above Spider plots Spider charts are useful to compare several dimensions simultaneously across a range of alternatives It 1s assumed that the columns show the items of which each receives its own axis whereas the column groups are the alternatives to compare The axis are not ticked with numerical values instead they are always scaled to cover the minimum and maximum found in any alternative T2 Scenario exploitation Data View 1 Table Region Years B i Multi Functionality overview European Union 27 v 2013 v BIOF 02 2 Scenario exploitation Data View 1 OX Tabie Regen Years cR Spider chart filled v Ie js gt Multi Funticnality overview European Union 27 2013 EL e gt Product Total eor 0252 BIOF_D2E10 Deee D 010 2 BIOF D10E 0 alb E Options For spidercharts Maximal number Maximal number of series Foreground transparency in o 4 Filled shapes The options for spider charts which are found under the 1 button in the toolbar are rather limited The user can determine how man
72. classification color ramp and number of classes The views can be grouped into logical entities and are shown as a popup menu to the user Tabular views may feature column and row groups Empty columns and rows can be hidden tables can be sorted by column with multiple sort columns supported Numerical filter can be applied to columns 134 User View definitions GUI Selection pivot supplied filters Data model The underlying data model is very simple and straightforward data are kept in one large multi dimensional data cube and all values must either be float values or strings Currently only read only 1s supported Each data dimension 15 linked to a vector of string keys Those keys are the base for the filter definitions Currently data cubes with up to six dimensions are used regions activities items trading partners years policy scenarios The data storage model is equally optimised to the specific needs As only float values or strings are supported all data can be stored as one primitive array of either floats or strings To allow fast and efficient indexing a linear index is constructed from the multi dimensional data cube and the non zero data and their indices are stored in a hash table That renders data retrieval very fast All data are loaded in memory at initialisation time For moderately long linear indices about 10 Bytes are required to store a non zero f
73. current view 54 Customize view viv Fraction digits and decimal separator 2 v Separator between merged data dimensions Vv Column width 750 Row width 567 Hide empty rows Hide empty columns Cut off limit to determine empty cells 0 Use default pivoting for tables Show histogram Use classification colors For tables Show only selected items v texts only v Comparison output only values v Data dimension used for comparisons Region v Element used For comparisons Denmark v define statistics store settings load settings e Fonts set font family size and style affects tabular views Number formatting chose the number of digits and define the decimal separator The tool supports rounding numbers before the decimal point by allowing for negative fraction digits Choosing e g 1 will round all numbers to tens The numbers shown in graphics or tables are based on the rounded results is applied e Hide empty rows and hide empty columns will suppress in the currently seen view any columns and rows which would show only blank cells e Cut off limit to determine empty cells In standard mode the interface will treat zeros as missing values and items will be shown as blanks But the user might also enter a different value any value in absolute terms below the threshold will be treated as if it was zero e Use default pivo
74. d Press on the button left of SWHE in the table headers Open 40 selection dialog for table column and select with the mouse one of the codes then press o k The table should now comprise only one column Afterwards use the drop down list with the viewing options and choose map as shown below Choose HSMU to select the geometry for the HSMUs The program will now load the geometry for the HSMU and draw the map which takes several seconds 4 Interaction with GAMS The interaction with GAMS consists of three parts e Generating GAMS code based on user input e Starting GAMS e Controlling the GAMS run There are two types of input files generated based on user input The first one are so called scenario files and define the exogenous drivers for a CAPRI run as population growth macro economic environment or policy definitions Here the final aim 15 to integrate the scenario editor from SEAMLESS into the CAPRI user interface The scenario files are typically stored for longer period on disk both to provide templates for other scenarios as well as for documentation purposes The name of the file to load 15 passed to GAMS either as an argument or stored in an input file with a fixed name The second types are rather small files with a fixed name which typically comprise the information for which years and regions to run the GAMS program along with a small number of methodological switches These files are overwritten with each
75. different variables and all regions are estimated and for each of these trends lines statistics as R variance of the error terms etc are calculated These results together with the base period data and the policy shifts are used to define so called supports 1 e the most probable values for the final projection These sub tasks are relatively fast The final consistency sub task is broken down in two iterations In the first iteration only the Member States consistency problems are solved For the different projection years the problem will look for minimal deviation from the supports which may be interpreted as a priori information in a Bayesian interpretation such that different necessary logical relations between the data are not violated the data information in a Bayesian estimator These relations define e g production as the product of yield and activity level or force close market balances The details can be found in the methodological documentation Once that step is done the Member states are added up to the EU level and new support are defined which take given expert projection into account currently mainly a baseline provided by DG AGRI In the second round the Member State problems are solved again and then problems for all NUTS II regions in each Member State and for all farm types inside of each NUTS II region Baseline calibration In the final task the results from the trend projection serve as the major i
76. e GAMS runGAMS show results show meta data CAPRI GUI Version 3 0 August 2010 file capri ini User name Wolfgang Britz User type administrator 2 The different work steps Each work step may comprise different tasks No task will require starting more than one GAMS program but some tasks will start the very same GAMS program with different settings Some tasks will not start GAMS but other tools inside the GUI The different work steps are shown in a panel in the lower left corner of the GUI and are presented by so called radio buttons which means that only one button can be selected at any time Graph the work step panel Work step selection C Build database Generate baseline Run simulation Collect meta information C Batch execution Generate GAMS documentation Exploit gdx files Each work step may comprise several tasks which are shown in the second panel below the work step panel The content of the panel hence changes when the user selects a different work step Again the different task panels comprise radio buttons for selections purposes Build database Graph the task panel for build database Task selection Prepare national database C Finish national database C Build regional database time series C Build regional database Build global database C5 Build HSMU database 27 Building data base is the logical starting
77. e a specific dash The picture below shows a screen shot of a flow map for two scenarios Table Active Product Export flows map Exported quantities 1000 Cereals m BIOF D2 2 European Union European Union EU European Union European Union Bulgaria and Western nla Y m 15 E baicans dn MAR 1 18228473 17692051 2139412 17492219 5 Union 15 European 51642 41 51182 92 3060 45 2415 1 4859121 15 44 459 43 c awe ue pow Worway 157 157 1107 31 157 Ce aee Basigaria and 15672 57 49134 4583 12 ma 106 35 Romania Western 36 54 2192 13868 34 ne 530 158 balcans Rest ef 103 82 10222 1095 37 103 00 002 Europe When pressing the map option button the following dialogue 15 opened 76 1 1 5 Map option dialogue X Treat zeros as missing values Use area weights for classification E Draw in high quality Emboss map gt 0 gray 0 none 0 colored embossing ols Scaling model for flows Linear Log Poly European Union 27 European Union 25 European Union 15 European Union 12 European Union 10 Bulgaria and Romania Europe Non EU Mediterranean countries induding Turkey and Morocco Middle East Africa North America USA Canada Mexico Middle and South America Asia Australia and New Zealand European Union 27 European Union 25 European Union 15 Europe
78. e currently shown or selected part of the view 53 Transposing and Merging Table control area Animation Box 1 Region 273 Box 2 hide 1 Box 3 Years 1 Box 4 Table area 2 Table column groups Scenarios 2 Table columns Item 6 L 0 L 83 Table row groups Table rows Table cells area Activity 83 cancel The boxes show the data dimension and their lengths They can be dragged to the different viewport dimensions as shown in the screen shot above Assigning several dimensions to the BIOF DE Income Euro ha or head Table columns columns leads to spanned dimensions gt Cereals Oilseeds ot 1 BIOF_D2E2 Income 438 65 454 55 Euro ha or head 17 73 30 01 Hectares or herd size 59217 85 8335 37 1000 ha or hds 2 08 13 24 Yield 4958 80 2271 59 kg or 1 1000 head ha or head 3 58 5 17 BIOF_D10E1 Income 533 21 649 48 0 Euro ha or head 0 00 6 0 00 Hectares or herd size 60473 37 9607 46 1000 ha or hds 0 00 0 00 m 5142 97 2421 03 Alternatively columns and rows can have row block kg or 1 1000 or nead n combination with the selections for columns and rows and column and row blocks the view can be adjusted to the need of the user e g to export the data in a specific ordering to an external file Changing view options d A dialog opens when pressing the button to change various options of the
79. ed the user may open the same file several time The content of the different parameters 1s merged together and the parameters themselves span an additional data dimension If the user does not provide input in the first column of the tables labelled user 38 input the program will generate names automatically The data loaded are shown in the table tool described above The user can use view definitions stored in a XML file to tables by pressing the enabling the Use table definitions from tick box and may use the Set XML table definition file button to change the file to use An example loading data from the spatial downscaling The option described here is introduced for completeness The names of the file generated by the dis aggregation programs start with XOBS followed with the two character code of the Member state then an underscore followed by the base year and the simulation year and if applicable the code for the simulation which is identical to the name of GAMS files used from pol input which was used to run the scenario CAPRI T britz CAPRI gams BE File Options Help Work step selection List of tables loaded from file s Build database Generate baseline Run simulation Collect meta information Batch execution Generate GAMS documentation Choose the file to load Exploit gdx files Suchen in 6 Capdis i 2
80. elow activity or change the nutrient by using the drop down box under nutrient 120 CAPRI e capril gams View Handling Windows 2 CAPREG base year Data View 1 SEE Table Activity Nutrient ET oles CAPRI GUI Version 1 2 4 Oct 2007 User name Wolfgang Britz User type Administrator Drawing a map of the High Nature Value Farmland indicator for Belgium amp Luxembourg for the base year Firstly we need to select Exploit data base results in the work step selection panel and then choose the radio button Show HSMU base year data Then in the Member States drop down list Belgium amp Luxembourg must be selected as shown below 121 CAPRI 1 Work step selection Input area Build database Base year 2002 C Generate baseline Member States DK Denmark C Edit simulation C Run simulation Exploit data base results C Exploit base line results C Exploit scenario results C Exploit gdx files C Delete scenario results Data exploitation mode selection Load and show Show CAPREG time series reading information over existing runs CAPRI is ready loading data C Show COCO results C Show CAPREG farm type results C Show CAPREG base year data preparing table view Show HSMU base year data Pressing the load and show button will then bring up the first table links to the HSMU results as shown below
81. ended D 5 z into the target table from the join table Join table Target table Target table 2 Choose the table to join to this layer or load the table from disk Keep only matching records Py E test If a record in the target table doesn t have Show the attribute tables of layers in this list match in the join table that record is removed from the resulting target table Note If the target table is the attribute table of a layer features that don t have data 3 Choose the field in the table to base the join on joined to them will not be represented in the layer when you use this option Regions a Advanced About Joining Data OK Cancel If anything has worked well you should now see the country countries you had in original map B 1 D E Join table Target table Target table Cancel aa gt There is a trap though If you export several tables or results for several scenarios your table will normally have several fields used as a row header e g year scenario activity If that is the case the join will not work properly as several rows for the same regions will be joined to the very same polygon Unfortunately ArcGIS will not warn you about that First you have to execute a definition query in the table while selecting the rows which you are later going to draw a map from In order to draw a thematic map now it m
82. er ones from green to red This should be applied e g to environmental indicators where the damage increases with the value of the indicator Yellow Green as above only that high values are shown in green Should be used e g for income indicators or environmental benefits Gray Green Green Gray Red more available for historic reasons as they mimic the color tables of the original JAV A applet e Blue Gray Green Green Gray Blue introduced on demand of DG AGRI A good choice if the good bad interpretation of the distribution is to be avoided e Shades of grey sometimes needed for publications when color printing is not available in the final hardcopy Beware to use a limited number of classes e Shades of blue useful where the notion of bad or good inheritably comprised in greenish and reddish colors is to be avoided Defining an self created color model Once a color model is chosen the user can re define the start middle and end color using the three buttons on the color table selection row as shown below given a lot of freedom to generate color ramps Exploitation of spatial results Data View 1 Table Indicator Agri Env indicators driving forces No 10 Cropping Livestock pattern livestock density Livestock units M 1 ion dial Map WwW Map option dialogue Classification method Quantile
83. ereals v Income Euro ha or head Q 01GWPBUR b4 Nobs 301 00 Mean 573 32 Median 550 26 StdDev 625 66 41 410 20 43 687 49 min 533 03 max 1667 07 minOutlier 678 00 maxOutlier 1824 64 European Union 27 646 43 European Union 25 672 55 European Union 15 732 82 European Union 10 534 48 Ralainm 824 52 Perhaps the most interesting option is to show only the outlier rows besides the statistics in the table as illustrated below 62 Build regional database Data View 1 SEE Table Production activity View Supply details mapping view Sener arabe CODE eh S EN Euro ha or head IF 270 00 3164 16 Nobs Mean StdDev 40975 38 Utrecht 48807 4 25 earn 109324 08 438378 94 Ahvenanmaa Aaland Outlier detection algorithms implemented The GUI offers currently the following ways to look up possible outliers For all the methods the user may additionally define a maximum percentage of observations show in which case only the largest or smallest outliers according to the outlier detection algorithm shown will be selected Standard deviation around the mean The user can define the factor B before the standard deviation Observations are marked as outliers when their distance to the arithmetic mean exceeds the value defined by the multiplication of the standard deviation o and a user defined factor p x 5 gt gt Large outliers can easily bias the resu
84. es made to CAPRI code to the server a process called commit TortoiseSVN http tortoisesvn tigris org is the recommended tool TortoiseSVN is integrated nicely into windows but it might take a while until the logic behind the SVN operations 15 fully understood by a novice user For users which do not contribute to the code basis of CAPRI or use TortoiseSVN in other contexts installing and learning to master TortoiseSVN as an additional tool is an unnecessary burden Therefore the client based SVN basic operations which allow a user to keep its local copy synchronized with the server are now embedded in the java code of the GUI For those who only need read only access to the CAPRI server repository an installation of TortoiseSVN is no longer necessary 12 The changes necessary in the GUI be summarized as follows Firstly new SVN related entries in the initialisation file can be edited by the user And secondly a new dialogue allows starting an update The following sections give a quick overview over the new functionalities Case one Exploiter and runner Entering the necessary information to link to the SVN server An exploiter by definition only accesses GDX files from the result directory He is not allowed to run GAMS programs and thus does not need access to the GAMS source code data and restart files read in by the different GAMS based working steps of CAPRI Accordingly in order to work with SVN only t
85. esm pem eo dM Assuming we want to draw a map now with the ruminant stocking density we find it 1n row 10 under the key RUMI In order to produce a map now we have to open the context menu of HSMU EU27 and choose properties symbology and choose Quantities Under values choose RUMI the name before is the name of the DBF file General Source Selection Display symbology Fields Definition Query Labels Joins amp Relates Show D raw quantities using color to show values Import Features Fields Classification Categories Quantities Value Manual Graduated colors a Classi Graduated symbols Normalization 127 Classes 7 tes Proportional symbols ELIZ7 X Color Ramp EU2PY est Symbol Ran test GRAS Multiple Attributes test LU test PLAP test ELEC tes EGAS test E FUL test HMIM test ARAB test PERM test PF tesh WAT SURP Z ET test RMIN SWHE SEMI es TERRITUS mee Advanced 110 Afterwards under classification choose your preferred one As there are many small polygons the outline of the polygons should not be drawn Therefore click on one of the colors choose Properties for all symbols and under Outline color chose No Color General So
86. ew Region PS d View Regi egion Bar chart MZ Product Balances Danmark Product Balances Danmark 9 500 40000 37 500 4 amp 500 4 35000 4 TN 32 500 4 30 000 4 6 500 275004 6 000 4 25000 4 5500 225007 8 5000 4 8 gt 20000 4 4 500 4 000 17 500 4 3500 15 000 4 12500 2500 10 000 4 000 75004 1500 1000 5000 500 2500 E LLL Gg p Oilseeds Other arable field crops Vegetables and Permanent other crops Fodder crops Product R 67 Exporting the graphic to file The graphics can be saved to file in different formats by pressing the export button The following dialogue will appear which allows the user to define the file and a range of different file formats For MS Office users the Windows Enhanced Metafile format is interesting as it allows changing later the graphics manually e g by adding new text Export view as Portable Document Format pdf v Windows Enhanced Metafile emF a Portable Document Format Scalable Vector Graphics svg svgz MacroMedia Flash File Format si Encapsulated PostScript teps epsi epst FreeHEP Graphics Interchange Format gif Standard PNG image writer png Standard BMP Image Writer Exporting the graphic to clipboard Alternatively the graphic can be placed into the clipboard where it is stored as a bitmap or as jpeg by B double clicking the t
87. ference scenario lt longtext gt lt link gt Money metric lt link gt lt item gt An item definition is enclosed in the lt item gt lt item gt tags It must at least comprise a lt key gt and an lt itemName gt tag The case sensitive key must match the symbol identifier as found in the GDX file whereas the itemName can be freely chosen Facultative tags are lt unit gt a physical unit shown in table lt longtext gt a text shown when the mouse hovers of the column lt link gt a link to another table for the table cells under the column lt colormode gt the color mode used when a map is drawn for the item The following modes are supported GYR Green Yellow Red e Red Yellow Green e GR Green Red e Red Green e BG _ Blue Green e GB Green Blue 139 WB White Black BW Black White e LD Light Blue Dark Blue e DL Dark Blue Light Blue Items can only stem from the product or activity dimension In order to define from which dimension they are taken the user can set either lt isActivity gt NO lt isActivity gt Which means that the table loops over the products and the items refer to the activity dimension A typically example is a table with market balance elements items such as are found in columns of the CAPRI tables where also the activities are stored Consequently the table will loop over the products and not over the activities Alternatively lt isActivity gt YE
88. g between different installations for advanced users e g when different branches from the CAPRI software versioning system are installed GAMS settings In order to generate results a GAMS installation and license are required The relevant settings are found on GAMS tab 11 Option Option Path to GAMS exe D GAMS23 5 qams exe GAMS scratch Directory d serdir GAMS Options maxProcDir Number of processors used in GAMS Get the number of processors Options Capri The Path to Gams exe points to the actual GAMS engine to use Currently versions 22 8 and higher are supported It is recommended to use GAMS 23 3 and above to benefit from calling CONOPT in memory The button get the number of processors will retrieve the number of available processors in the computer The Scratch Directory will be passed to GAMS and determines where GAMS stores temporary files A directory on a local disk not one on a file server should be chosen The GAMS options field allows the user to send its own settings to GAMS e g as shown above the page width used in GAMS listings and the number of maximal process dirs generates by GAMs SVN settings CAPRI is hosted on the SVN software versioning system see e g http en wikipedia org wiki Apache Subversion which ensures that CAPRI users and developers can operate smoothly in a distributed network For developers who need to upload chang
89. g with the left mouse button in the column headers Adding additional sorting columns is achieved by pressing the shift key and then using the mouse as explained before A sorting symbol will show sort direction and its size will show the sorting order 60473 37 9607 46 0 00 0 00 59217 85 8335 37 2 08 13 24 5142 97 2421 03 0 00 0 00 Numerical filtering based on cell content Clicking with the right mouse button on one of the column headers will open the filter dialog which can be used to apply numerical filters to remove rows not matching the filter from the view 59 Filter dialog Define numerical selection filter Uk rows Comparison operator EB v Clear selection and select according to filter Comparison value Add result of filter to existing selection Remove result of filter from existing selection Changing the row height and column width with the mouse While dragging with the mouse the bottom of the first row header the cell height of each row the height of each row is changed at the same time But the column width can be changed selectively per each desired column if you change the width on one column the widths of the other columns do not change The column width can be changed in a similar way by dragging the right border of the column header Alternatively the size can set in the Changing view options dialogue Build regional database DER Build regional database DEA
90. hat the data base and GAMS code are managed via a Software versioning system which is a kind of client server environment The geometry model The mapping viewer of CAPRI is based on very simple and straightforward concepts First of all it basically supports solely polygon geometries not comprising holes line strings interpreted as rivers and points for labelling The storage model is optimised to host rectangles and is especially efficient if the polygons vertexes are all points in a raster The topology is not read from a shapefile but stored in a generic rather simple format However a shapefile interface to generate the generic format is available The vertices are stored in x y coordinates already projected in a rectangular coordinate system and the viewer does not deal with the geographic coordinate system but simply scales the rectangular coordinates in the viewport The viewer in its current version solely supports one layer of quantities Those restrictions naturally allow reducing memory needs and thanks to the rather simple data structures also rather allow performing drawing operations It should be noted that the JIT compiler of JAVA 15 indeed rather fast The biggest topology currently handled simultaneously covers an intersection of Corinne Land Cover slope classes and Soil Morphological Units and comprises around 2 7 Million polygons for EU27 As the majority of the polygons are rectangles not more then 6 7 Million poin
91. he very same map same input data classification and coloring for the High Nature Value indicator for a part of Belgium The right hand side map draws the HSMUs into their full size the one on the left hand side one uses shrinking The message perceived is probably very different In the unshrinked right map one may conclude that there is a lot of highly intensive agriculture low HNV indicator drawn in red in the lower diagonal triangle and some important areas of high nature farmland in the protruding area This optical impression differs strongly from the polygons drawn with corrected shares for agricultural cover It turns out that in the lower diagonal triangle the density of agriculture 15 often low and especially low in the intensively managed HSMUs Equally it turns out that the area covered by High Natural Farmland in the protruding part is relatively small 81 Q all Ge Co LLL GS Ge Co LLL lt 0 lt 1 lt 2 3 49 lt 58 lt 691 1 Bio 088 000 099 198 lt 2 355 49 58 681 lt 1 lt 088 Area weighted classification The classification can be generally applied treating each region a NUTS II or a HSMU as an observation with equal weight or using the areas of the underlying polygons as weights Those weights are multiplied with the share of 1f shrinking is used as explained above Excluding zeros from
92. her type aboe Mst Bes ore e em om caras pa iterare imm cee green acer ime mmm Nm Highlighting specific regions in the map Sometimes it may be interesting to see the spatial distribution of specific data or data constellations views open the possibility to de select columns and rows allowing e g to use the NUTS code in front of the numerical HSMU code to select only the HSMU belonging to specific administrative regions That possibility is explained in short First double click the row selection button Open selection dialog for table rows which will open the following dialogue 94 4 Selection dialog for Table rows Enter search pattern in Field and use buttons use mouse to define selections pkoo1 2 3 Clear selection add pattern to labels Clear selection add pattern to keys Add pattern to ka list of selected items and define the selected items according ti Remove pattern From labels Remove pattern From keys DEDD1 23 4 22676 DKOOL 23 4 22677 DEDD1 2 3 4 22678 DKOOL 2 3 4 22679 DEDD1 2 3 4122680 DEDD1 2 3 4822681 DEDD1 2 3 4H22582 DKOOL 23 4 22683 DEDD1 23 4 22684 DKOOL 2 3 4122685 DEDD1 23 4122686 DKOOL 23 4 22687 OK Cancel Now we may e g select only the HSMU belonging to the FSS region DK000 1 2 3 by typing DK001 2 3 in the left input box and then choosing
93. hown in the graph can be set in three different ways for all types of graphics 65 e Using the selection dialog upper left corner of the table or the buttons next to the graphic type selection drop down box double click F Selection for column groups Selection for columns peur for rows e Using those buttons in graphic mode single clicks with the left mouse button will scroll down in the list right mouse single clicks will scroll up e Scrolling the table with the scroll bar to a specific position The column row in the upper left corner of the table will define the starting point for the graphic All types of graphics support tooltips to query the numerical values underlying the graphic The tooltips appear when moving the mouse on a graphic element linked to the value as e g a bar D2E2 Other arable field crops 188 745 641 a Pp Pp Perhaps an unexpected feature is the zooming in and out with the mouse The graphs support saving to the disk via a popup menu and printing The popup menu also allows changing certain properties for the current graph temporarily Some settings which will pertain can be edited by opening the graphics E option dialogue press 66 j Graphics settings Options For bar charts Maximal number of plots Maximal number of bar blocks Maximal number of bars per blocks Foreground transparency in 95 3D effect Plot vertical Options For spidercharts Maximal
94. hree pieces of information have to be entered under CAPRI t britz capri gams File Utilities Help Edit settings from ini file O Save current settings to ini file Settings Edit Settings I 1 Remove task specific settings in the SVN tab e The SVN user id e The SVN password e The url of the result directory The first two fields are not visible and the related entries in the ini file are encrypted The last entry can be set to a specific branch relating e g to a training session That allows for CAPRI mini installations These mini installations do not need to be distributed as SVN installations as the SVN interface in the GUI will also allow to checkout over existing sub directories and files That ensures some additional safety regarding access information to sensible branches of the server a bystander cannot read the user id and password But users should always place local copies of such branches including the directory from which the GUI is started on secured parts of their file system The local directory for the GUI is simply taken from the start directory of the GUI whereas the SVN address for the GUI is stored in the default ini file 13 database Base year 2004 2020 nerate baseline Simulation year in scenario EUO25 tploit gdx Option Option SYN Other options User Settings CAPRI System Settings SVN user id
95. ic models based on the definitions of views which are defined in XML tables It combines features from 131 DBMS reporting data mining spreadsheet functionalities and GIS into one package And thirdly there are some specialized pieces as the HTML based GAMS documentation generator which are linked into the GUI CAPRI tasks as business model A core concept in the new layout is a business object called AgpTask Technically defined as an interface such an object represents a work task in the overall CAPRI system such a run of CAPREG to build the regional data base The interface requires getters and setters for properties such as baseYear simYear or MemberStates The setters can be accessed either by a GUI interface or by the batch execution facility formally by a class implementing the interface AgpTaskHandler Most tasks are GAMS executable tasks according to their isGams property These tasks also provide access to the name of the related GAMS program via getGamsProgramName Each of these tasks has also a method called generateIncludeFile which generates the specific so called include file in GAMS format for that task The objects also know about the main GDX file they are generating via getGdxResultFiles Related to that they allow setting the logical names of the data dimension in the result data set via setDimNames and setXMLTablesDims Once the properties of a task had been defined their logical consistency can be checked
96. ick the map option button 4 The following dialogue will open 79 User options to change colors and classification Map option dialogue Number of classes Number of regions with small large values excluded Fromm classification Use area weights For classificatm Classification method ETETE nan Current class definitions labels limits colors Treat zeros as missing values Draw in high quality Emboss map 20 gray lt 0 colored embossing l8 Set value for middle color label class limit 9 abs 1 170 73 lt 337 30 337 296 Be Click to show histogram window showing current class limits and colors window Show histogram Show distribution circles Far observations Show distribution rectangles Far classes City labels Min city size 1000000 0 ij Rivers Min width 4 Region labels Label options Options for info window Dimension shown in columns of result window Far current region Dimension shown in rows af result window For current region Resolution Factor For printings file output compared to screen apply store settings load settings It offers different options to change the way the map is drawn on screen and information supporting the classification Adding a histogram window to a map In the map option dialogue tick Show histogram and a separate window with a Histogr
97. ile again and add additional files Afterwards the lines with the parameters XOBS should be selected CAPRI T britz CAPRI gams File Options Help Work step selection List of tables loaded from file s Build database T britz CAPRI results Capdis xobs_DK_0202 gdx Generate baseline user input name type dims records text XOBS parameter 3 127309 Result area used by CAPDIS Run simulation 5 4 424 T britz CAPRI results Capdis xobs_SE_0202 gdx user input name type dims records long text XOBS parameter 3 344083 Result area used by CAPDIS Collect meta information Batch execution Generate GAMS documentation Exploit gdx files Load gdx file Load selected tables s CAPRI GUI Version 1 6 November 2008 User name Wolfgang Britz User type Administrator Pressing load selected tables will open the following dialogue choose 1 Choose how to join the information From the parameters Merge parameters or files Cancel As otherwise the program will introduce a new dimension for the data loaded from the different files and you will not be able to see the information for DK and SE together in one map Afterwards the selected records will be loaded from the files Depending on the amounts of records that may take several seconds Before turning to the mapping view only one column should be selecte
98. imes IQR and Q3 plus 3 times IQR but bounded by the minimum and maximum of the observations In many applications any value falling outside that range is classified as a stronger outlier The user can restrict the plotted range as to exclude stronger outliers If outliers are present the red dotted whiskers at the tail with strong outliers are removed 56 The blue dotted lines show the mean and one standard deviation around the mean For a normal distribution that would cover around 2 3 of the observations The black dotted lines in the histogram show the class limits used for the colour model The bottom reports some descriptive statistics The technical implementation is set up according to the way maps are drawn the population consists of all values in the rows and the columns of the table and thus differs from the outlier control which treats each column as a separate set of observations Histogram for Build regional database 0 Cummulative distribution graph Frequency groups wot 271 Median plus 1 5 IQR Mean plus one std dev 0 00 5839 51 11677 03 272 Arithmetic mean 0 00 1891 01 Median 3139 70 Mean 3493 46 Q3 4437 06 Max 11677 03 IQR 2546 05 Std Dev 2069 33 The colours are typically used to visualize the distribution in maps but as a second option they can also be applied to the numerical values in tables Alternatively histograms and box and wh
99. in Purdue for the proposal In tables the and options will show two lines in each data cell one with the observations and BIOF_D2E2 165 Income Hectares or Yield Supply Euro ha or herd size kg or 1 1000 1000 t or 1000 head 1000 or head ha or animals hds head gt uade 438 65 59217 85 4958 80 293649 34 17 73 2 08 3 58 5 58 Pe 454 55 8335 37 2271 59 18934 54 30 01 13 24 6 17 18 60 Other arable 1693 24 7938 25 32743 16 259923 47 crops 4 26 2 27 2 99 0 78 one with the comparison output as seen below The Data dimension used for comparisons offers a drop down list to select the Element used for comparisons defined the comparison point Showing a histogram window The system offers different ways to retrieve information about the distribution For maps and tables the user can show an additional window with a box and whisker diagram histogram and some descriptive statistics as shown below The box and whisker diagram 15 defined as follows the green box shows the first Q1 to third quartile Q3 so that the width of the box is equal to the so called inner quartile range IRQ The blue whiskers are defined by Q1 minus 1 5 times IQR and Q3 plus 1 5 times IQR but bounded by the minimum and maximum of the observations In many applications any value falling outside that range is classified as mild outlier The red dotted whiskers are at Q1 minus 3 t
100. ine result exploitation mode selection Show trend results Show baseline and expost results H22619 H22620 H22624 H22622 H22623 22624 H22628 116 Working with several views The interface allows to open additional views which will be stacked on each other as can be seen below Memmi CAPRI t britz capri gams Windows FUE HHHH E 5 ul New Data View y a View Windows Close all Exit Cascade Tile horizontal HEHH HHE EE Tile vertical New Data View Close all Data View Windows Exit Cascade A 2 a Tile vertical TH HE SI HIHHIBHEIH Mew Data View Close all Data View Windows Exit Cascade Tile horizontal or vertically 1 Tievertical 117 118 Examples Drawing a map showing the nitrate surplus for EU27 at regional level in the base year First we need to select Exploit data base results in the work step selection panel and then choose the radio button Show CAPREG base year data Then in the Member States drop down list right click mouse and select EU27 The Load and show button will then load the results CAPRI e capri1 gams View Handling Windows CAPREG base year Data View 1 Table Region Supply details Danmark Table v
101. ing Forces v Fa a Percentage diff to Qo gt W Years 2002 Years Years 2013 130 The software behind the mapping viewer and the CAPRI exploitation tools Reading the following chapter is not necessary to work with the GUI but rather intended for a reader who is technically interested The original software implementation of CAPRI was based on software available at ILR at that time and comprised a DBMS realized in FORTRAN with C C code for the GUI The very first maps in CAPRI in 1998 were produced with an MS EXCEL mapping plug in which was at that time a cost free add on However moving the data to EXCEL and then loading them in the viewer was not a real option for the daily debugging work on the data base and the model Therefore shortly before the first CAPRI project ended in 1999 a JAVA applet was programmed by W Britz which was able to draw simple maps from CSV Files automatically produced by the CAPMOD GAMS code That code with slight modification remained active for quite a while and some of the features are still to be found in the current mapping viewer Then for a while the exploitation tools were based on XML XSLT SVG and a mapping viewer in SVG was realized However the XML solution had the big disadvantage of requiring a large amount of single ASCII input files and was not really performant when complex pivoting was used Therefore the next evolution step was a pure
102. ini User name User type exploiter The interface is set up such that only the results of those work steps are visible where result files are found For a training session concentrating on analysing scenarios only those result files can be distributed An installation with four scenarios at NUTS2 level plus all the necessary GUI files will require under 100 MByte disk space Option Option User Settings CAPRI System Settings SVN Other options d TSChe ltenham2010 results Result Directory _ Rename etc by task settings Save in capri ini 4 Once user has optionally entered results directory and stored it to the ini user will face a rather clean interface which only allows to exploit existing scenarios and to exploit GDX files also that option could be removed for exploiters 17 CAPRI capri gams File Options Version control Help k Work step selection Task properties for exploit scenario results Base year Simulation year Exploit gdx files Countries BL Belgium amp Luxembourg DK Denmark Regional break down Task selection B Scenario 1 Scenario 2 Exploit scenario results Scenario 3 Scenario 4 Scenario 5 showresults showmetadata Getting help CAPRI T britz CAPRI gams File Options EX Work step sel Help Open content of Online Help via CAPRI
103. io results Workstep information 21 03 2006 database Build national database coco a 1 21 03 2006 Build database Estimate consumer prices coco 7 31 08 2006 Generate baseline Generate policy shifts POLSHIFT 6 03 09 2006 Generate baseline Generate expost results EXPOST 11 04 09 2006 Run simulation Run simulation BASELINE Fully iterated Baseline 11 04 09 2006 Run simulation Run simulation MTRAGD AGENDA 2000 policy 11 04 09 2006 Run simulation Run simulation MTRFDC Full decoupling scenario 11 05 09 2006 Run simulation Run simulation BASELINE Fully iterated Baseline 11 05 09 2006 Run simulation Run simulation EUMEDP Partial liberalisation EL M 05 09 2006 Run simulation Run simulation MEDLIB Liberalisation EU Mediterr Scenario selection for exploitation Base year 2002 Simulation year 2013 m Regional Break dovin x Member States Denmark Scenarios ENER_REF X ENER_SIM10 Y 114 Once the loading is accomplished the right hand side of the GUI is filled with a tabular view of the results which can easily be turned into maps other forms of exploitation as for example graphs are less suited given the large number of observations Details on how to work with the exploitation tools are found in a separate document The screen shot below shows results for Denmark as an example Years 2002 2013 Q
104. ion approach nor a uni modal distribution as in the case of the IQR method and it 64 is rather easy to compute It may be worth to continue with a literature research the direction of similar outlier detection methods The factor describes how distances between succeeding values are assessed Outliers are defined when the maximum of the above and below conformity is above a predefined threshold gt Last amp Kandel have tested their algorithm for B 0 001 a 0 05 m 10 There seems to a rich literature on that kind of neighbourhood distance where outlier control based with different algorithms is analyzed in detail The different parameter can be set by the user interface Reference Last M amp Kandel M 2001 Automated Detection of Outliers in Real World Data Proc of the Second International Conference on Intelligent Technologies Working with graphics The exploitation tools allow showing the current content of a tabular view as a graphic Most of the graphic types are based on the JFreeChart library see http www jfree org jfreechart General handling of graphs In the system the selection of graphs is based under the bottom in the tool bar and the following graphic types are currently supported e Bar charts Line charts e Area chart e Spider chart e Pie chart e Box and Whisker chart e Histogram e Markov chart The selection of rows and columns s
105. ional dis aggregation in the supply part It is not longer recommended to use the Member State level for production runs e Number of iterations with market models switched on CAPRI sequentially calibrates the market models to supply model results which are solved at prices from the market models Usually fifteen iterations are recommended e Scenario file name the GAMS file which comprises the settings for policy and further exogenous variables for a simulation The files are stored in gams pol input and must be valid GAMS code Use a text editor as e g the GAMS GUI to manipulate the files and generate new ones Global market model Switch the spatial global market model for agricultural products on and off If switched off output prices will be fixed to the baseline results If switched on the supply model will work with prices provided by the global market model and the global market model will be iteratively calibrated to the results of the supply models aggregated to Member State level 0 Young animal market model switch endogenous prices and market clearing for young animals on and off The last four settings relate to post model reporting Currently the reporting part is still embedded in the GAMS code and cannot be started separately That means that the full runs needs to be repeated if results from one of the reports are needed later 3l The task Exploit scenario results The task allows l
106. isker diagrams can be drawn via the graphics 57 Working with tables Tool bar Controls for column and row selection S CAPRI t britz capri gams Handling Windows O f Supply details 0 v view type Region Years 2020 TE 01GWPBUR Yield kg or 1 1000 head ha or head Production per UAAR kg ha Supply 1000 1 Crop share Animal density or 0 01 animals ha Hectares or herd size 1000 ha or hds Income Euro ha or head 394 15 6205 83 7487 76 46467 77 38 54 2885 66 261 27 691 33 3676 42 2541 64 4 29 157 84 Bu 831 38 826 74 39804 98 32908 47 5 13 2043 62 The toolbar Region Years Scenarios Germany 2020 c1GWwP E Tooltips for column and row headers View For predefined tables tooltips may be stored which give additional information on the columns and rows They will appear when the mouse is moved over the respective column or row header Y Income Hectares or herd size Yield Supply Crop share Euro ha or head 1000 ha or hds kg 1 1000 head ha or head 1000 t or 1000 animals or 0 01 Amiums Revenues variable costs according to the definition of Economic Accounts for Agriculture income available to farmers to pay For land labour capital and profits 75 53 45 345 70 1171 26 140 57 39192 45 5509 33 30713 87 14 42 285446 28 4116 05 Drill down So
107. istribution rectangles Far classes That gives a rather intuitive feel on how well the class limits represent the data distribution In our example below it is obvious that the majority of the values lie in the first class 0 00 lt 49 28 2 450 86 Less suitable for final out but useful while playing around with classification methods and class definition are the distribution dots which can be added They carry additional information on the locationof values in different classes C o E o0 gt mo CX a qi puni O 1 1 0 00 48 28 71 56 82 68 450 86 Finally switching to linear or logarithmic may be a way to help reading the map 0 49 7283 451 Color table The color table defines the colors used for the classes When choosing the color model keep in mind that colors carry a meaning red e g is generally interpreted as dangerous Equally it is important to think about the final medium with which the map will be published Exporting colored maps to a black white device will render it almost impossible to read the map It is best to try different color tables and different classification methods on your data The following color models are currently available named according to the data order from minimal to maximal value 85 e Green Yellow Red standard Normally the middle class is drawn in yellow smaller values in shades between yellow and green and larg
108. ition Take as an example the following XML tag lt regionSel gt MS lt regionSel gt It means that the table will only show elements with the tag lt region gt see below which comprise MS in their lt sel gt field The example would refer to the Member States There is a specific selection list lt regionSel gt FromDataCube lt regionSel gt Which will neglect the elements under lt region gt as defined in the file but rather takes any one found in the data cube The option was introduced to avoid the necessity to define all 180 000 HSMU codes in the file Attaching long texts and filters to elements Items for activities products regions and dim5 are typically defined in file see the following example 142 lt region gt lt key gt SK020038 lt key gt lt itemName gt SK020 FT41 GT100 Specialist dairying FT 41 lt itemName gt lt sel gt all RS SK FA SKFA FT41 GT100 FT41GT100 lt sel gt lt region gt The definitions for one item are enclosed in the tag lt region gt lt region gt lt activity gt lt activity gt lt product gt lt product gt lt dim5 gt lt dim5 gt The order of the items in the tables is defined by these lists Each item has a key which corresponds to the symbol identifier found in the GDX file The keys are case sensitive The itemName 15 a long text which 15 typically shown to the user The elements found between the lt sel gt lt sel gt tags
109. km resolution underlying the spatial down scaling component The geometries always linked to the rows of the underlying table 78 The most obvious way to visualize results is the use of thematic maps This holds true for NUTS2 results but even more so for the results at the HSMU level When starting the GUI the mapping view uses some pre sets which can be interactively changed as described below The following screen shot shows the result of first loading the base year results from the spatial dis aggregation for Denmark and then switching from the tabular to the mapping view As with other views the content of the map can be changed by working with the drop down boxes or by de selecting columns and rows There are specific possibilities to change class limits colors and further features for maps which are discussed in the following 2 Exploitation of spatial results Data Y iew 1 P f Table Indicator Agri i Env indicators drivingforces 5 a Mineral Fertilizer Consumption Nitrogen kg N ha X Selection of table item Selection of tables will open popup menu Button to open selection dialog for table columns in case of several maps Button to open selection dialog for table rows 0 00 0 00 28 41 51 86 112 82 586 84 Changing the classification and the legend In order to change the layout of the map click the mouse in the area of the legend or double cl
110. ld only be done after the final definition of the class limits is set as otherwise the manually set color will be lost 88 Map option dialogue Classification method Quantile v Number of classes 5 Number of regions with small values to remove from class definition Number of regions with large values to remove From class definition 024 Treat zeros as missing values Use area weights For classification Draw in high quality v Shrink polygons according to share of UAA Set value for middle color NENNT EC So lt 1 08 lt 1 39 1 388 4 n DEEEFEEFFEFFNEWEBNEESEESSMENENMEMENE MME eee IEEE Preview 0 00 LI Sample Text Sample Text Show small circ H E Sample Text Sample Text v Show rectangle OK Reset Legend Separate ax Draw outline in same color Std Dev 0 54539707 btandard map title Dimension shown in columns of result window For current region Scenario Y Dimension shown in rows of result window for current region hide v ok store settings load settings Changing the way the legend is drawn The map viewer always puts the legend below the map Currently it offers three options how legends are drawn 1 Separate equally sized rectangles which show the upper class limit with the exemption of the
111. lize the layers features using this data What do vau want to oin to this layer Join attributes from a table 1 Choose the field in this layer that the joi will be based FID GRIDCODE et EHSL Iw Show the attribute tables of layers in this list 3 Choose the field in the table ta base the join an Advanced About Joining Data Cancel Make sure that Join attributes from a table is set in the first drop down box and under 1 select HSMU i e the filed in HSMU 27 geometry where the codes for HSMU polygons are stored Use the name of the exported dbf table under 2 and select the field Regions a the field name are restriced to 10 chars under 3 Then press the button labeled advanced and chose the radiobutton keep only matching records If you are asked to build index confirm 108 x Join lets you append additional data to this layer s attribute table so you e Editor kh 9 v Task Create New Feature Target for example symbolize the layer s features using this data What do you want to join to this layer Advanced Join Options X Join attributes from a table Keep all records default If a record in the target table doesn t have a B 1 B 2 1 Choose the field in this layer that the join will be based on match in the join table that record is given D 2 wb null values for all the fields being app
112. loat and its index as an integer If the maximal linear index is very large the index is stored as a long and the storage need goes up to about 16 Bytes For moderately sized data cubes 20 Million numbers can hence be hosted in about 200 Mbytes The data are read from a generic file format generated by GAMS General Algebraic Modelling System a commonly used software package in economic modelling called GDX the software package on which CAPRI is based Access to is handled via an API provided by GAMS 135 Client based solution Technically the exploitation tool is completely client based That reflects the specific user profile of the CAPRI modelling system where the exploitation tool is integrated with an economic model and tools building up its data base The main aim of the tool is to support forward looking policy analysis For this purpose users will create their own scenarios and in some cases even own variants of the export data which will lead to processes requiring considerable processing and storage resources A client server solution where the production process and data storage would need to be hosted on a web server is therefore not a preferred solution also as users will often develop variants of the modelling system by code modification in GAMS and contribute to its development The structure of the data driver would however very easily support linkage to a network or WEB based data bases It should however be noted t
113. lt as they will change both the mean and the standard deviation of the observation sample Further on many time series in the CAPRI data base have by definition a lower limit of zero so that the assumption of normally distributed data sets cannot hold Therefore other outlier detection methods are also implemented as discussed below The dialog allows changing the factor from its default of 2 which covers 95 of the values for normally distributed data Standard deviation of values normalized by median The values are all divided by the median and the new series is classified as under the option discussed above The main advantage of that method is the shift to a mid point which is less vulnerable to large outliers in the observations 63 Standard deviation of trend line error A regression 15 estimated by using the index position in the unsorted values as explanatory values The resulting errors are then classified according to the first option discussed above The typical application would be a table where consecutive time points e g years are shown along the rows Median and inner quartile range Box and whisker charts which are also supported by the graphics view are using the median and quartile to visualize the distribution They are also an easy and robust way to detect possible outliers First the so called inner quartile range IQR is calculated as the difference in values between the beginning value
114. lter 96 Online help 19 Pie chart maps 78 Pivoting 53 SVN settings 12 Tables Drill down 58 Filtering 59 Outlier detection 63 Sorting 59 Statistics 60 title of the map 92 View scenario result 114 View data Base year 113 baseline 114 View Selection 50 View type selection 53 zoom in 92 zoom out 92 145
115. m Cereals 59217 85 Oilseeds 454 55 Selection for rows Other arable crops 1693 24 Double clicking the button will open a selection dialogue E Selection dialog for Table rows Enter search pattern in Field and use buttons or use mouse to define selections Clear selection add pattern to labels Clear selection add pattern to keys Add pattern to labels Add pattern to keys Remove pattern From labels Remove pattern From keys CERE OILS Vegetables and Permanent crops PERM Fodder activities FODD Set aside and Fallow land SEN All activities Beef meat activities BEFM Mon cattle PEPL Cereals Ces be selected with the mau Soft wheat SW HE Durum wheat Luv HE The selections can be done by mouse following the convention of the operation systems Additionally a selection string can be entered in the field above with the following possibilities e 7 select all C select all items starting with will select a string starting with C followed by any 3 characters After entering the selection string in the text field one of the three buttons must be right clicked The Clear selection add pattern to labels button will remove any selection and select only those items which 52 Add pattern to labels match the pattern entered in the text field will keep the selection and add the n Remove pattern From labels
116. m class definition 024 Number of regions with large values to remove from class definition 04 Scenario BASE Treat zeros as missing values Use area weights For classification Draw in high quality v Shrink polygons according to share of UAA Set value for middle color ee a ee d 1 2 1 08 579 18 618 3 lt 1 39 1 388 18 618 4 lt 1 56 1 563 18 615 5 lt 1 97 1 973 18 537 0 00 1 08 1 39 1 56 0 00 i 0 99 0 33 0 98 1 62 Show small circles showing distribution of regions n 1230 0 Min 0 0 v Show rectangle representating distribution of classes Mean 097528593 SS n Legends Separate rectangles m a k 0 00 lt 0 00 raw outline in same color Std Dev 0 64539707 btandard map title Dimension shown in columns of result window For current region Scenario hd Dimension shown in rows of result window for current region hide ok store settings load settings Changing the value for the medium color Normally the medium color yellow or gray 15 assigned to the middle class Sometimes the user may wish to change the class where the color switches First the Set value for color change must be ticked Next in the now enabled drop down box choose the class limit for which the middle color should be used The effect is shown below Before values in the cl
117. m the SVN updates checkouts are reported 14 SYN settings Pressing the update bottom will trigger an unpdate Possible conflicts merges etc are shown in the reporting area Update for t britz capri gqui completed at revision 5310 Files sub directories updated t britz capri results 1 Update for t britz capri results completed at revision 5310 Update for t britz capri dat completed at revision 5310 Skipped ti britz capri restart fert fert FR gdx Files sub directories updated t britz capri restart fert Skipped t britz capri restart inputs LAaB EXPTVAL GDX Files sub directories updated t britz capri restart inputs Files sub directories updated t britz capri restart 2 files were skipped probable conflicts Update for t britz capri restart completed at revision 5310 Update for t britz capri gams completed at revision 5310 lt If the directory 15 not yet under version control the GUI will perform checkout instead 1 setting up first installation of the hidden copies from the server Before an update a clean up operation will remove any possible local locks related to earlier unsuccessful SVN operations As long as an internet connection 15 available that should ensure smooth updates in most cases and avoid some of the more tricky problems TortoiseSVN users might face Case two Administrator An administrator can enter the same SVN directories as a runner
118. me views comprise hyper links to other tables Numbers with hyperlinks are shown in blue 2515 60 22 3i ble click to table Supply details and a tooltip will appear when the mouse is moved over them Double clicking in the cell will jump to the connected table 58 Clipboard export The content of the currently shown view can be copied to the clipboard by pressing the button Tables are placed as tab delimited text in the clipboard so that they can be pasted into spreadsheets Graphics and maps are placed as graphics in the clipboard and can be copied e g into word processing Export to file JEL i A dialog opens when pressing the button to export the full dataset of the view to a file The action provoked by the button depends on the view type In tabular view in opposite to the clipboard export the export file will scroll through the outer dimensions and will copy all stacked tables after each other into a file Take the table below as an example Clipboard export will export the data for Belgium and 1984 File export fill export data for all regions and for all years if the user does not apply filters in the export dialog An example is discussed on page 101 Prepare national database Region Years FE i Belgium 1984 v E RAW Unit value EAA Quantity Eurot 1000 t 2515 60 22 00 2515 60 4227 4n Sorting The rows can be sorted by one or several columns by clickin
119. metry for the trade blocks in the market model HSMU zip 1 1 km pixel clusters for EU 27 without Malta and Cyprus There are also 1x1 km pixel clusters for individual Member States but these are internally passed to the viewer when only one country is shown Alternative texts for the dimensions Normally the names for the dimensions are passed in the view by Java However their name can be changed by lt regionText gt lt regionText gt lt activityText gt lt activityText gt 141 lt regionText gt lt regionText gt lt productText gt lt productText gt lt scenText gt lt scenText gt lt dim5Text gt lt dim5Text gt lt yearlText gt lt yearText gt That text is shown e As description above the outer drop down selection boxes Region Years European Union 27 v 2013 v thon 1 Region 273 Box 2 hide 1 3 Years 1 Box 4 2 Table column gro Scenarios 2 Activity 8 t Table row groups Table rows Table cells area Product 1 In the pivot dialogue e And in gaphics map titles and the like Filters for the elements in the different dimensions Without filters all elements found on a logical dimension will be shown to the user in any table The exemptions are the items either defined for the product or the activity dimension see above In order to restrict the selection in the other logical dimensions a selection list can be defined in the table defin
120. n tool CAPTRD These gdx files are accessed when the different tasks of Data base exploitation are chosen The user has on top the possibility to load one or several tables from one or several freely chosen gdx files Graph Panel to GDX file exploitation Load file Load selected tables s Set XML table definition file Use table definitions from tables xml List of tables loaded from file s britz CAPRI results Capreg fert_out gdx user input name type dims records long text fert out parameter britz CAPRTIresultsCapregsfert out F gdx userinput type dims records long text fert out parameter 2 9768 When the task exploit gdx files is selected by pressing the related button four buttons are shown in the task panel The first one labelled load gdx files will open a file selection menu when pressed When the ok button of the dialogue is operated the content of the gdx file is partially loaded and a table 15 added to the right upper window of the application showing the parameters and sets comprised in the gdx files along with their number of dimensions and records When the close button next to the table is pressed the table is deleted Pressing the load gdx file again will add more tables One parameter from each table may be selected pressing crtl key when clicking with the mouse de selects If several parameters from one file need to be load
121. nd further information 104 2 Please choose a file format for export x Export Data Start Export Maximum number of non zero items to export 6951227 Open File in Editor after File was created Define column List output na data dimension in columns List output data dimension in columns Regions and H5MLIS Activities Input and outputs cenario Back Stark The last pane let you decide for DBF export if you want a list or if you want the data dimension spanned across the columns For exporting the HSMU tables it is recommended to put Inputs and outputs in the columns If everything has worked well we should now find two files one with the data named as chosen in the file dialog and a second one with meta introduced before the file extension The following section will briefly explain how to work with the data in ArcGIS Under Layers choose add Data Untitled ArcMap ArcInfo D ngli x p Mew Group Laver i Paste 105 and in the case of the HSMUs add the HSMU_EU27 shp shapefile LT ij x Look in 1 3015 sp s Exi capri shp 5 Folder Shapetile Shapefile Shapefile Name HSMU EUZ7 shp Add show of type Datasets and Layers Lancel Then choose
122. nput to generate the baseline 26 The task run simulation Graph the task panel for Run Simulation Task selection Define scenario Run simulation Downscale simulation results Exploit scenario results 27 Define scenario task CAPRI D TS2009 gams File Options Help Work step selection Scenario description Build database Enter scenario name myScenario Generate baseline WTO Harbinson with Bio Fuels Run simulation Enter scenario description Collect meta information Batch execution Scenario elements Generate GAMS documentation D TS2009 gamsiscen baseScenarios mtrstd gms Define basis scenario file Exploit gdx files Scenario categories Task selection 2 173 Biofuels 010 2 4 Premiums WTO Policy Define scenario Run simulation Downscale simulation results Exploit scenario results CAPRI GUI Version 2 0 March 2009 User name Wolfgang Britz User type Administrator Choosing the task adds the panel with GUI elements shown above The panel consist of two major panes 1 A top pane where the user can enter a name for his new scenario and a description text 2 A bottom pane where the user can define the base scenario to start with currently in the trunk MTDSTD gms and the snippet to add The available snippets and their structure are shown on the left hand side in an expandable
123. nscaling of regional results for the base year to 1x1 km grid cells The underlying methodology for the different work steps is described in detail in the CAPRI model documentation The sequence of the tasks as described above follows the work flows It should be mentioned that certain preparatory steps as downloading updated data from EuroStat and converting these data into GAMS tables read by CoCo and CAPREG are no yet integrated in the GUI The actual controls available will depend on task Please use the button to open the online help to get detailed information on settings for the tasks 24 The work step Generate baseline Graph the task panel for Generate baseline Task selection Generate expost results Generate policy shifts Generate trend projection Baseline calibration HSMU baseline For manifold reasons discussed in methodological papers economic models as CAPRI are not suited for projections but as tools for counterfactual analysis against an existing comparison point or an existing set of ex ante time series The point in time or these time series are called base line or reference run CAPRI runners which use the model for ex ante policy simulation do not need to construct their own baseline but are typically better off by sticking to the baseline provided on a yearly basis along with the latest version of the GAMS code data base and software Accordingly
124. number of axis Maximal number of series QC on 4 ee 4 4 Stacked Cylinder fonly for 3D nan stacked Options For line and area charts Maximal number of plots Maximal number of series Maximal number of observations Foreground transparency in 95 3D effect Draw lines Options For pie charts Maximal number of plots Maximal number of observations Plot vertical Draw Shapes nra Minimum percentage to draw label Foreground transparency in 95 un lt Oo r2 e Foreground transparency in 95 3D effect _ Circular pie Treat zeros as missing values Filled shapes P Labels inside of pies Options For all charks Font size relative to tables in Use shades of blue Include zero in value axis range The chart type s specific settings are discussed in more detail below The general options should be self explanatory it is best to try them out interactively Walking through the data As the maximal numbers of elements shown 15 restricted see above typically not all columns and or rows will be shown in a graph The user basically has two possibilities to change the visible columns or rows Firstly columns and rows can be selected by the selection dialogues Secondly the user can click with the right or left mouse button on the buttons for table dimensions to mode one row or column up or down Vi
125. o clipboard button Bar charts Bar charts treat the columns typically the table items as having different units and consequently assign an own plot with a value axis to each of them The observations are taken from the table rows and define the domain the horizontal axis Each groups of bar columns present typically the scenarios receives its own colour example is given below 68 FB Scenario exploitation Data View 1 Table Supply datats European Union 27 Region EBENE 4 2013 BOF t J income Hectares or herd Supply Crop share Animal Production per UAAR income Hectares or herd Supply Crop share Aces Production per VAAR bead or 1900 1900 t density or head mre ikg ec T ha 1096 t 8 1000 ec hda head 1 or 0 01 animals 11000 ha b s ex head 5 ec 0 01 animals heads ha hal masa nn 1673 12 51315 78 4989 15 290986 19 31 15 158417 22421 34 3 121 55 crass 1035 36 1 45 24015 5 50 26168673 ars 1043 TOSON snnt 76075 53 an 1409 70 21056 19 fess 557815 101176 2191507 1160 28 107 43 166359212 Re 057 99 218 61 mna 21171 64 1675251 23 42 08 9121 45 mao 12 11 24 82 00 12837 19 160 90 nas 1 56 147 102 83 an ma 32532 54 36 05 2052 35 50 96 A145 10679 91 161 88 14 129 3331 62 34 259 16 55 Ln
126. oading simultaneously results from different scenarios into the exploitation tools Graph The interface in exploit scenario result mode Task properties for exploit scenario results Base year M 5 Simulation year BL Belgium amp Luxembourg Member States DE Denmark DE Germany Regional Break down o 2 The task Collect meta information The task scans the GDX files from the different tasks and collects Meta information user date of execution etc from there and shows it in a table Besides the result directory stored in the settings the task performs a passive crawl such that it will collect information on all files in the result directory which could technically be generated by the tasks Settings as base year or simulation year in the interface are not taken into account The processing depends on availability of the META symbol in the GDX file Using the new GUI with files based on older version of CAPRI could lead to situations where files are not included in the reporting system The following information is provided e Member State the Member State for which Meta information is provided Depending on the task the program may have run for that Member State separately e g CAPREG or along with other Member States e g CAPMOD e Work step the task run as reported in the GDX file e logical order of the work steps Steps with a higher order build on results
127. of the first and the ending value of the third quartile The IQR then consists of the 50 range of values around the median The IQR is multiplied with a user defined factor added to respectively subtracted from QI to define the lower and upper bound for regular values The factor default value is 1 5 The quartiles and the median are not affected by outliers at the tails of the distribution allowing for a rather robust way to filter outliers 03 gt x gt Ql 108 Conformity based on relation of distances Here the following formulae are used taken from Last amp Kandel 2001 af ise Pme f ise Pme Xm They define conformity from below and above by comparing the distance from the current value to its neighbour in relation to the average distance for a predefined group size Before the formulae are applied the values are sorted In opposite to the outliers based on first and second moment the method is also able to detect outliers in between clusters of values Inside such a cluster differences in distances between values are small so that the relation between the distance to the next neighbour and the average distance between the neighbour and its m th neighbour is around unity The big advantage of the approach is that it does neither assume a certain functional form for the distribution as in the case of the mean standard deviat
128. og for Table columns Enter search pattern in field and use buttons or use mouse to define selections Clear selection add pattern to labels Add pattern to labels Remove pattern from labels be selected with the mouse OK Next we need to change the absolute values shown in the map to relative changes to the base year That can be accomplished by using the tool dialogue press button In the tool dialogue select only percentage differences in the drop down box labeled comparison output and then put the data dimension used for comparisons to Years The Element used for comparisons should be 2002 After pressing the map will change as shown Li i i x plain Fraction digits and decimal separator 2 Y m Column width 69 Row width 5692 Separator between merged data dimensions x Arial plain Fraction digits and decimal separator 2 Column width 692 Row width 6924 Separator between merged data dimensions v v Use default pivoting For tables v Use default pivoting for tables Hide empty rows Hide empty rows Hide empty columns Comparison output values Only values Values and percentage difference Values and absolute difference Element used For 5 an Only absolute difference R Normalisation Hide empty columns
129. oit scenario results 0 Item Years a View type Qo AiG Box and Whisker chart 4 Supply details mapping view Cereals Income Euro ha or head v 2013 2300 00 4 2200 00 4 2100 00 4 2000 00 4 1800 00 1800 00 4 1700 00 1800 00 4 1500 00 4 1400 00 4 1300 00 1200 00 4 1100 00 4 c 2 1000 00 900 00 800 00 4 700 00 600 00 4 500 00 400 00 4 300 00 4 200 00 100 00 4 0 00 4 100 00 4 200 00 4 300 00 4 BN 2 2 010 10 Histograms As for whisker charts and statistics shown in tables the observations are taken from rows and different columns are charted individually So far there no specific options for that type of diagram Please note that it is also possible to generate a separate Histogram window but then the observations refer to all columns simultaneously 74 Exploit scenario results 0 Table Production activity Item Years View type 2 30 4 Supply details mapping view Cereals w Income Euro ha or head v v v 16 5 BIOF 02 2 BIOF 010 10 Markov charts A still explorative type of graphics visualizes flows between entities which are placed in a two dimensional co ordinate system It 1s currently not yet used in CAPRI itself but applied to show flows between farm groups classified by economic size and
130. ompile GAMS programs check box The check box Generate EXP REF files for HTML documentation adds settings to the GAMS calls which generate two specific reference files by the GAMS compiler which comprise information of files and symbols used by GAMS For details on the code documentation facility see the technical document Javadoc like technical documentation for CAPRI to be found on the Capri web page under technical documents The directory for exp ref files defines where those files will be stored The batch language allows definition of a timer 1 to start the execution at a specified time 36 Task Generate GAMS documentation Graph Panel to steer GAMS documentation generation GAMS documentation generation Directory with input files E sbribzscapri codeDocInput Set directory Directory for HTML documentation files bribzscapri GAMSDac Set directory tbrit2 caprijcodeDocInput Baseline_calibration ref bE britz caprijcodeDocInput Build_global_database ref britz caprijcodeDocInput Build database ref regional database ref pO IEEE EPIS EbritzicaprieodeDocInpuriFinish database ref EbritzicapriceadeDocInputaenerate expost resulEs ref policy shifts ref generate trend projection ref Ebritz capricadeDacInputlPrepare national database ref
131. ools button and choose 0 in the Fraction digits scroll down box 123 option dialogue Set value for middle color 2 96 v Treat zeros as missing values exlcude from classification and don t draw Use area weights For classification Classification method Equal interval hd Number of classes Number of regions with small values to remove from class definition Number of regions with large values to remove from class definition 1 0 00 0 99 0 988 28 034 Ds 2 lt 1 98 1 975 9 972 Ss 3 lt 2 96 2 963 18 063 Ss 4 lt 3 95 3 951 7 123 IEEE 5 lt 4 94 4 938 6 lt 5 93 5 926 6 781 lt 6 91 6 914 7 066 3 lt 7 90 7 901 4 93 Ss 9 lt 8 89 8 889 5 812 Ds 10 z 9 88 9 877 2 507 Ds Cummulative distribution graph Frequency groups 1 004 v Draw mean and 1 std dev 0 99 1 8 2 96 3 95 4 94 5 93 6 91 7 90 8 89 1754 i 1 0 00 k 0 46 3 23 6 00 Show small circles showing distribution of regions n 1755 0 Min 0 0 v Show rectangle representating distribution of classes Mean 3227785 9 876518 v Shrink polygons according to share of Std Dev 2 772104 Draw outline in same color Dimension shown in columns of result window For current region Dimension shown in rows of result window For current region activity Title on top of map Bt
132. put Mio Euro Animal specific Input Mio Euro Other Input Mio Euro Welfare overview 0 Welfare gt CAP gt Markets bo Prices o Supply details Supply details mapping view n DNDC Income Indicators A Environment gt Labour use per activity Dual analysis Decomposition Multi Functionality Yield decomposition Income indicators mapping view Income indicators across Member States Land supply and use Revenues Costs Further cost breakdown Energy and maintenance costs Fertilizer input Feed Distribution Feed requirements A B C sugarbeet regime Main crop areas Main crop area pie map Tax payers cost total IMin Fiir nl Navigating in the outer dimensions of the viewport In many views some data dimensions will not be shown in the columns and rows but as drop down boxes in the toolbar Use the mouse to select within the boxes You can also use the keyboard to search items by Region Tears European Union 2 120135 typing An example for these controls is shown here Note If an outer dimension does only comprise one element no drop box list is shown Column and row selection Columns and rows can be hidden and included in the current view by using the buttons shown below 51 Selection for column groups Selection for columns Income ectares or herd head size kg 1000 ha or hds lorh X
133. r ArcGIS or EXCEL comma separated text file for e g EXCEL as GAMS table text format tabulator separated text format fixed field width Bin binary format for exploitation with exploit applet MSAccess 5 Access Database XLS MS Excel new workbook Once next is pressed the next pane will open a file dialog to choose a file In the case of export to a Microsoft Access Data Base the file must exist Exploitation of spatial results Data View 1 Table Indicator Aari Eny indicators driving Forces anas BL21H2865 EN BL21H2866 BL21H2867 BL21H2868 BL21H2869 BL21H2870 BL21H2871 Select a DBFfile BL21H2872 3 HSMU gdb fa a00000005 gdbindexes BL21H2874 BL21H2875 BL21H2876 BL21H2877 BL21H2878 BL21H2879 BL21H2880 BL21H2881 BL21H2882 BL21H2883 BL21H2884 BL21H2885 RI My Recent Documents 6 A My Documents My Computer LA My Network Places BL21H2873 Fe gdb DO1RIO601420 2764 sr lock gdb DO1RIO601420 3112 sr lock 800000001 freelist E 200000001 gdbtable 00000001 gdbtablx E 200000002 gdbtable E a00000002 gdbtablx 800000003 gdbtable a00000003 gdbtablx a00000004 gdbtable 800000004 gdbtablx m w 45 rmn
134. rate stacked bars from the column groups or to generate cylinders instead of cubes 69 Line and point charts Line and point charts assume that the columns of the table present some ordered sets e g years or iterations There is currently a default of 25 such observations which can be increased by the user The different series to plot are taken from the table rows If different column groups are present those receive their own plot with an own value axis m 4 e ar e em os a n 3 na mar Am an w w TALL 8 88 Crop sharelArimal 9 or 001 animals hea siha 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 gt Cereals O Oilseeds o Other arable crops Vegetables and Permanent crops gt Fodder activities v al number of 30 effect ivl Plot e Draw lines I Draw Shapes 70 The options for line and area charts are similar to the ones for bar charts The number of plots refers to the column groups the number of series to the rows of the table Area charts are equivalent to stacked bars 1 e the observations are added The number of observations is linked to the columns
135. res_2_0202mtrstd gdx Normal 4000000 GENERATE EXPOST RESULTS 2 NAME OF EXCHANGE FORMAT GDX lres_2 O202mtrstd gdx Normal 1000000 GENERATE EXPOST RESULTS 2 NAME OF OWNER ORGANISATION CAPRI network res_2_0202mtrstd gdx Normal ALOOO000 GENERATE EXPOST RESULTS 2 ORIGINATOR ORGANISATION CAPRI network res 2 202mtrstd adx Normal A4L000000 GENERATE EXPOST RESULTS 2 DESCRIPTION OF PROCESS STEP Generate baseline Generate expost results res_2_0202mtrstd gdx Normal 1000000 GENERATE EXPOST RESULTS 2 GEOGRAPHIC COVERAGE BY NAME BL DK DE EL ES FR IR IT NL AT PT FI SE UK CZ EE HU LT LY PL SI SK RO BG MT AL MK CS HR MO res 2 O202mtrstd gdx Normal 1000000 GENERATE TREND PROJECTION 3 TITLE OF DATA SET Generate trend projection CAPTRD results 0213 gdx Modified 4L000000 GENERATE TREND PROJECTION 3 DATE OF VERSION 2008 09 24 22 53 35 results 0213 gdx Modified 1000000 GENERATE TREND PROJECTION 3 TEMPORAL COVERAGE 1984 2030 results 0213 gdx Modified A4L000000 GENERATE TREND PROJECTION 3 LANGUAGE WITHIN THE DATA SET ENGLISH results 0213 gdx Modified 1000000 GENERATE TREND PROJECTION 3 NAME OF EXCHANGE FORMAT GDX results 0213 gdx Modified 1000000 GENERATE TREND PROJECTION 3 GEOGRAPHIC COVERAGE BY BL DK DE EL ES FR IR IT NL AT PT FI SE UK CZ EE HU LT LY PL SI SK RO BG AL MK CS HR MO results 0213 gdx Modified 1000000 GENERATE TREND PROJECTION 3 NAME OF ORIGINATOR ORGANISATION CAPRI network re
136. rget a i3 E ER E EX m ArcToolbox 9 3D Analyst Tools Qi Analysis Tools 9 Cartography Tools g Conversion Tools S Coverage Tools 9 Data Interoperability Tools Data Management Tools we S Geocoding Tools penat 9o Geostatistical Analyst Tools d Linear Referencing Tools w Sp Network Analyst Tools Xa E Faby y Samples mU gm L g Spatial Analyst Tools 9o Spatial Statistics Tools amp Layers WS E caprit GIs HSMU EU27 test RUMI E 0 000000 0 873586 0 873587 1 471440 9 1 471441 2 068693 2 068694 3 354081 3 354082 147674546176 0000 SA E CaPRiigis test test_meta E HR ER RT 112 What are the HSMUs and what information is available The HSMU are the so called Homogenous Soil Mapping Units Each HSMU contains one or several 1x1 km grid cells which are not necessarily adjacent and are defined so that these are more or less homogenous regarding climate soil slope CORINE land cover class and NUTS II region There are about 110 000 HSMUs for EU15 The spatial downscaling introduced in CAPRI Dynaspat provides following information per HSMU Cropping shares and animal stocking densities Yields Economic indicators per crop and animal as well as in relation to UAA Fertilizer
137. s Ex Comparison operator Comparison value Ex gt M 100 De Clear selection and select according to Filter Add result of filter to existing sel stion Remove result of filter From existing selection OK 22516 After clicking on clear selection and select according to filter and then on the table will only show such regions where the value in the column BASE is above 100 as shown below Next we must exclude the regions above 150 kg ha To do so set the filter to gt 150 and then press remove result of filter from existing selection Generate baseline Activity Items m Filter dialog xP kg Define numerical selection Filter Far table rows t Ex Comparison operator Comparison value nm Ex gt 150 147 70 169 36 Ex Clear selection and select according to Filter aR ar Add result of filter to existing selection 164 02 De Remove result of Filter From existing selection 95 50 anc 130 30 99 90 H2873 160 19 H2874 134 33 H2875 29 19 H2876 7 36 H2877 125 38 FaFinn mode zelertinn H2878 113 30 96 Now drawing a map with just those regions is not so interesting However with the tool dialogue we highlight the selected value instead of hiding all others The selected rows are now shown in red in the tabular view Exploitation of spatial results Data View 2
138. s_2_0213MTRSTD gdx Modified A4L000000 BASELINE CALIBRATION 4 DESCRIPTION OF PROCESS STEP Generate baseline Baseline calibration res_2_0213MTRSTD gdx Modified 1000000 BASELINE CALIBRATION 4 GEOGRAPHIC COVERAGE BY NAME BL DK DE EL ES FR IR IT NL AT PT FI SE UK CZ EE HU LT LY PL SI SK RO BG AL MK CS HR MO res 2 0213MTRSTD gdx Modified 4000000 GENERATE EXPOST RESULTS 2 TITLE DATA SET Generate expost results EXPOST res_2_0202mtrstd gdx Normal ALOOD000 GEMERATE EXPOST RESULTS 2 WORKSTEP Generate baseline res 2 O202mtrstd gdx Normal ALOOO000 GENERATE EXPOST RESULTS 2 KEY 5 res_2_0202mtrstd adx Normal 1000000 GENERATE EXPOST RESULTS 2 NAME OF PROCESSOR ORGANISATION Alexander Gocht res 2 O202mtrstd gdx Normal ALOOO0000 GENERATE EXPOST RESULTS 2 TEMPORAL COVERAGE 2002 res_2_0202mtrstd gdx Normal 1000000 GENERATE EXPOST RESULTS 2 DATE OF VERSION 2008 09 01 11 25 55 res_2_0202mtrstd gdx Normal 1000000 GENERATE EXPOST RESULTS 2 BASEYEAR 2002 res_2_0202mtrstd gdx Normal 4L000000 GENERATE EXPOST RESULTS 2 SIMYEAR 2013 res 2 202mtrstd gdx Normal A4L000000 GENERATE EXPOST RESULTS 2 MODEL_SWITCHES REC DYN OM MARKET ON YAMI M ON res 2 202mtrstd gdx Normal 1000000 GENERATE EXPOST RESULTS 2 MEMBER STATES BL DK DE EL ES FR IR IT NL AT PT FI SE UK CZ EE HU LT LV PL SI SK RO BG MT NO AL MK CS HR MO KO res 2 0202mtrstd gdx Normal 1000000 GENERATE EXPOST RESULTS 2 LANGUAGE WITHIN THE DATA SET ENGLISH
139. ses Min 100 0 Mean 9 734732 Draw outline b Median 8 673334 162 76825 Std Dev 810 98126 Set value for color change from Green yellow red Dimension shown in columns of result window For current region Years b Dimension shown in rows of result window For current region Activity v EH ES um ok CL 2 100 32 32 14 14 496 4 7 7 163 127 Drawing map with the base year results next to one showing changes from the base year to the baseline results There are two ways to draw different maps If more then one column is selected in the underlying table view several maps with identical coloring and scaling will be drawn as shown in the sample above That is not advisable in our example we need two different scales one appropriate for the absolute values and one appropriate for changes In order to do so choose View Handling New Data View and then Tile vertical CAPRI e capril gams View Handling Windows 5 Data View 1 Close View Windows Exit Tabl Indicator Index 1 10 Tile horizontal Tile vertical We will then see something similar to the one shown below CAPRI e caprii gams 181 View Handling Windows enario exploitation Data View 2 O xj o x Activity Items Table Activity Items Table M M
140. specialization As with the flow maps below the major code based for the graphics is based on work of Doantam Phan The positions on the x and y co ordinate are deducted from the codes taken from a specific section of the underlying XML definitions which refers to a matching of sub strings of the codes and x respectively y positions The size of the dots is taken from the diagonal elements Flow Map Layout Doantam Phan Ling Xiaol Ron Yehl Pat Hanrahan and Terry Winograd Stanford University see http graphics stanford edu papers flow_map_layout flow_map_layout pdf I would like to thank Doantam Phan for letting the CAPRI team use and modify his source code 75 m o E MARKOV 0 TES DARA cod POLT MEDI fis my mos eae qu SMAL SHGM SMA 252 40 BEEF_SMAL 2035 00 SMAL 1100 00 ARAB SMA 248 00 6542 00 pes nsa POLT MEDI 135 00 POLT LARG 135 00 190 DARY SMAL 251 00 SMAL 937 00 122 00 122 00 480 00 55 00 PH Flow maps Flow maps visualize flows between regions The maps are constructed by taken the elements in the rows as the origins of the flows and the elements in the columns as the destinations Flows from the same origin are drawn in the same color the width of the flows relates to their size Counterfactuals are taken from the column groups and receiv
141. sults 0213 gdx Modified 1000000 GENERATE TREND PROJECTION d NAME OF OWNER ORGANISATION CAPRI network results 0213 gdx Modified ALOOO000 GENERATE TREND PROJECTION 3 OF PROCESSOR ORGANISATION Wolfgang Britz results 0213 adx Modified a GFNFRATF TREND PROIFCTION 3 DFSCRIPTION OF PROCFSS STFP Generate haseline Generate trend nrniectinn results 213 Modified vi U 4 JM s a 34 Batch execution Graph Batch execution panel Batch execution Batch file to execute E britzsjavastrunk de capri task testBatchUni tat Set file Directory for exp retf files t bribzscapri codeDocInput Set directory Generate EXP and REF Files For HTML documentation Only compile the SAMS programs Start batch execution End batch execution after next finalised GAMS step End batch execution immediately we The batch execution allows starting a file defining settings and tasks from the different CAPRI work steps and executing them without user intervention Once started the batch processor may be stopped so that the currently running GAMS program ends on its own end batch execution after next finalised GAMS step or by sending a CTRL C to GAMS program It will continue to run until GAMS processor notices the CTRL C which may take a while and then end with an error code However the GAMS processor will run some finalisation tasks as removing temporary files and directories The
142. t class is dropped and 50 added and so forth up to 3 standard deviations Nested mean The nested mean classification will only work with 2 4 or 8 classes The classes will be defined such that one break is found at the mean of the sample The resulting two halves of population are then again divided by their mean to get four classes and the resulting quarters divided by their means to define eight classes This works well with rather skewed distributions Manual classification Finally the user may set the class limits by hand In order to do so double click the mouse on the appropriate row in the table with the classification results in the column class limit The value can now be changed with the keyboard When this is done click into another cell The labels will be adjusted accordingly Afterwards when all class limits are defined the user may also overwrite the label e g using words as low or high Please keep in mind that currently the values will be lost if you load other data or change the classification number of classes etc a e L AN 1 00 lt 0 00 20 40 NEC BEN 51 86 12 821 5 586 84 586 835 17 3177 l 84 Integration distribution information in the map window The GUI allows the user to enter distribution information in the map in different ways The first possibility 15 to print a simple frequency diagram above the legend Ll Show d
143. t the end of a quantile the algorithm will either exclude all observation with that unique value from the class or include all of them The decision will be based on the fact if with or without inclusion the size of the class comes closer to the desired size If the user has e g chosen five classes the desired class size should cover 2046 of the observations or area weights Equal interval The differences between the current minimum and maximum value is divided into classes of equal spread This may lead to rather curious class limits when outliers are present In those cases it may be appropriate 83 to exclude some regions from the classification See below for details how to exclude regions from classification Mean standard dev The class limits are defined according to the mean and the portions of the standard deviation of the data It works best with normally distributed data but may result in very small classes if the distribution 15 skewed e g long tailed The algorithm will always introduce at least four classes then six eight ten and twelve More than twelve classes are neglected The algorithm takes into account the spread of the data and sets the class limits accordingly If all observations fall into 25 of a standard deviation class limits are introduced at 25 and 10 for four classes If the number of classes is higher new limits are introduced at 5 2 5 1 and 0 5 In case of 50 the smalles
144. tep is hence run simultaneously for all Member States and years based on the results of the CoCo task Here only the years to cover can be chosen by the user Build regional data base time series Generation of time series at regional level CAPREG The treatment of years in CAPREG is not identical For all years activity levels output coefficients and input coefficients excluding feed inputs are generated However only for the base period a three year weighted average around the chosen base year feed input coefficients are estimated and the supply models are calibrated based on techniques borrowed from Positive Mathematical Programming The user can hence choose for which Member States to run CAPREG for which years and for which base year Equally the farm type module may be switched on or off Build regional data base CAPREG Currently the same as three only that the base year data will be loaded instead of time series Build global data base GLOBAL Building up the international data base The step includes aggregation of Supply Utilization Accounts and bilateral trade flow matrices from FAO to the product and country definitions of CAPRI aggregation of the supply and demand elasticities from the World Food Model to the product and country estimation of bi lateral transport costs and conversion of the FAPRI baseline to the product and regional aggregation of CAPRI 23 6 Build HSMU data base CAPDIS_GRID spatial dow
145. that format was chosen The user may change the information in two ways 1 by using a tool built in the GUI and 2 by editing the XML files directly with an editor The latter is only recommended for advanced users Defining and changing the view definition via the GUI interface As a new add on to the CAPRI GUI the user can now edit the view interactively In order to do so chose Utilities Edit table definitions from the toolbar F capri t britz capriigams File Options Help Work step sel Generate GUI geometry from shapefile p Edit table definitions A new window will open as shown below It may stay open while the GUI is operated allowing to check the effect of changes directly in the exploitation tools The changes are only stored to the disk at the end of the session Experimenting will hence do no immediate harm a restart without saving to the disk will recover the original views 46 Aone Scenario information Welfare overview Welfare comparison across Member States Feoga Feoga stocks Economic Accounts for Agriculture Money metric Welfare market model Premium overview Product Balances Demand Balances Product balances detailed Prices Product balances market model Prices market model Human consumption Milk Fat and protein Milk products Import Flows price and tariffs market model aggregated Import Flows price and tariffs market model aggregated v DATETIME Key D
146. ting for table That is the normal mode where the pivot is defined by the table views By clicking that off the currently chosen pivot from the current table or manually defined will be kept even if a different table is chosen e Show histogram A histogram is shown additionally to the current view as a separate window The current window might however hide the histogram window so that minimizing other windows might be required e Use classification colors for tables Use the colours which would be used to colour the regions in a thematic map to colour the numbers shown in tables e Use of short code and or long texts e Comparison output the exploitation tools can add different types of comparison output They also affect what is shown in maps and graphics 55 Comparison output Only values Data dimension used For comparisans Only values values and percentage difference Values and absolute difference stionly percentage difFerence only absolute difference Mormalisation Values and GTAP difference Only difference Element used comparisons define colors options Normalisation means that the value is divided by the comparison points allowing e g also to calculate shares The GTAP difference is a compromise between a percentage and an absolute difference it multiplies the difference in the logs with the difference thanks to Rob McDougall from the GTAP team
147. titute for Food and Resource Economics at the University of Bonn and has co ordinated since several years the activities based on the CAPRI modelling system His responsibilities further on include the methodological concept of CAPRI and to a larger extent its software implementation Contact Dr Wolfgang Britz Institute for Food and Resource Economics University Bonn Nussallee 21 D 53115 Bonn Tel 49 0 228 732502 Wolfgang Britz ilr uni bonn de Content emu 9 E 10 10 Choosimo a TT 10 Linking the GUI to the local CAPRI installation 11 foo Motu tenet c cu 11 NDC WA Reon UL ML iE e ee 12 Case one x plotter TUNDET a 13 ns atat EOD DU Se anata 16 19 BasicTa voutor Mie err E 20 The CU tferent Work SUC Soie end Lad ntu a 22 duit onn at iban ean pa uat a lande eame pae digan E 22 Thesvork Step Generale base IB aae 25 ua nu eon Meta sn
148. to the size of the window equally the maximal possible size of a flow relative to the size of the window can be determined em In order to show only a selection of the flows the selection buttons can be used The lower left one relates to the rows of the underlying tables and thus allows excluding origins from the maps The lower right one opens a dialogue to exclude destinations whereas the upper right one allows exclusion of scenarios T1 Most options described below for thematic maps such as zooming and dragging are also available for flow maps However classifications and color models cannot be supported Pie chart maps Another rarely used application of maps is the possibility to place pie charts above the geometry The regions must as always with maps be placed in the rows of the underlying tables and the cakes are calculated from the data in the columns It is possible to produce maps for different scenarios when those are placed in the column groups as shown below The size of the charts depends mainly on the bounds of the underlying polygon so that smaller countries have smaller pies The settings for pie chart diagrams see Pie charts can be applied to that view Colored thematic maps The GUI currently provides geometries for NUTS 2 regions Member States the regions with behavioral functions in the market model trade blocks in the market model and finally the Homogenous Soil Mapping Units 1x1
149. toolbar using the define statistics button or by right clicking on any cell inside the 2 table to open popup menu and choosing Statistics Customize view 0v plain h Fraction digits and decimal separator 2 v v Separator between merged data dimensions v Column width 306 gt Row width 306 Hide empty rows Hide empty columns 3450 79 Cut off limit to determine empty cells 0 Reload Copy to Clipboard 3450 79 Use default pivoting For tables Export Data gt E Pivoting 794 17 Show only selected items v Long texts only v Customize Table Comparison output Only values v i 2618 16 Data dimension used for comparisons Region v A Table Vi Element used For comparisons European Union 15 v 6088 17 define statistics store settings load settings 6049 71 The dialog has the options as shown below which in parts are dynamically changing depending on the detection algorithm 61 Set statistics Set Factor Far outlier detection will be multiplied with StEDDev inner quartile range 23 Set maximum percentage of outliers Standard deviation around mean Select statistics Mobs Mean Median StdDev ql q3 min max The selected statistic options will appear as first rows of table Supply details mapping view 0 Production activity Item C
150. tories Refactoring the mapping part When the 1x1 km grid layer was added to CAPRI during the CAPRI Dynaspat project it became obvious that the existing JAVA code to produce maps needed some revision especially regarding the way the geometry was stored In this context the question of using an existing GIS independently from CAPRI or the use of existing GIS classes plugged into the CAPRI GUI was raised again and some tests with open source products were undertaken A stand alone GIS as the sole option was certainly the less appealing solution Firstly it would have required producing rather large intermediate files and would have left the user with the time consuming and often error prone task of exporting and importing the data Secondly the user would need to switch between two different programs and GUI standards And thirdly all the usual problems with installing and maintaining additional software on a work station would occur However as indicated later the GUI naturally allows passing data over to external applications and does hence not prevent the user from using a full fledged GIS solution The main points taken into account during the search of a map viewing solution for CAPRI were 1 possibility to import data from the CAPRI GUI efficiently 2 user friendliness 3 performance and 4 in the case of plug in libraries expected realization and maintenance resource need and naturally 5 license costs It turned quickly that an
151. tree which shows the sub directories found under gams cen with the exclusion of a sub directory called baseScenarios and the svn directories Empty directories are not shown The user may select any number of snippets even several from the same sub directory Double clicking on one of the snippets shows the content of the file on the right hand side so that the user can inspect the code as seen below in more detail GAMS keywords are shown in red comments in yellow and strings in green He can also edit the file changes are shown in blue Once changes had been saved the tree shows a user modified behind the category The user can also remove the changes from snippets 28 Scenario elements D TS2009 gams scen baseScenarios mtrstd gms Define basis scenario file Scenario categories 5 09 Biofuels biof D10E2 ce Premiums 9 Coupling Fully decoupled partial decoupling 5 Distribution Farm premium option kill COPT 5 WTO Policy wtohrb HABER corti Coupling degree for each payment and member state BLOOOOOO DEOOOOD00 1000000 ESOOO000 0000 IROOO000 DPGRCU 2006 eps eps eps eps 40 25 eps DPPULS 2006 100 100 100 100 100 100 1087 DPDWHETR 2006 eps eps eps eps eps eps eps DPDWHEES 2006 100 100 100 100 100 100 100 DPPARI 2006 100 100 100 100 100 100 100 DPSILA 2006 eps eps eps eps eps eps eps DPPARI fa 2006 eps eps eps eps eps eps eps DPSCOW
152. tribution graph Frequency groups 1 0024 Fe 78 90 76 1653 0 00 16 42 86 87 157 31 Show small circles showing distribution of regions n My Computer Min E v Show rectangle representating distribution of classes ww a i default ler pump uas Median File name Separate rectangles My Network Max Files of type options setting Files F Draw outline in same color btandard map title Dimension shown in columns of result window For current region Scenario m Dimension shown in rows of result window for current region ride m ok apply store settings load settings Exporting the Choose the file to store the current settings x Look in persSettings v id 95 313 Recent Documents Desktop My Documents Mean Places w Std Dey data underlying the map As mentioned above the mapping viewer is part of the CAPRI exploitation tools which is in its core based on pivot tables In Afterwards the order to export the data e g to GIS system the view must first be changed to tables button will open a file dialog as shown below For GIS export e g to ArcGIS DBF is the recommended format 101 Please choose a file format for export Select the format of the file to export HTML basic table format for internet browser DBASE data base file e g fo
153. ts needed to be stored The topology handler and the drawing routines separate rectangles for which only the two outer points are stored from polygons for which the vertices and centroids are stored The viewer is written in Java There are two variants One is a stand alone version of the viewer realised as an applet It reads from an internal portable binary data format and java classes data and geometry can be packed into one jar file e g to ship it to a client The second version is transparently integrated in the GUI of the CAPRI modelling system 136 Swing is used for the GUI in order to profit from the most simple implementation the viewer has been written completely new and is not based on existing GIS libraries Even certain standard JAVA classes as e g for hash tables have been replaced by own implementations to reduce implementation overhead Some care was given to support flexibility in classification given that only quantities are supported so that the tool covers natural breaks quantiles equal spread mean standard and nested means Area weighting 1s supported as well In order to export data to other applications the tools support first of all tab delimited clipboard export allowing import e g into EXCEL Maps can be exported as JPEGs over the clipboard Alternatively the user may export to external file in CSV format DBF to MS Access or to GAMS DBF export will generate a second file comprising meta data
154. ur ramp and number of classes The views can be grouped into logical entities and are shown as a popup menu to the user Tabular views may feature column and row groups Empty columns and rows can be hidden tables can be sorted by column with multiple sort columns supported Numerical filter can be applied to columns User View definitions GUI supplied Selection pivot filters Why a XML definition files for views The exploitation tools of CAPRI build on a rather simple structure Each CAPRI work step stores its results as GAMS parameter representing a multi dimensional sparse cube which is stored as a GDX file The exploitation loads the non zeros from one or several GDX files into memory However given the 45 length of the different dimensions the use of short codes the user would be typically lost on his own in the large tables which can comprise several million non zero data and basically an unlimited amount of zero cells The XML definition file defines the views explained above and allows a structured and user friendly way to exploit the results of the different work steps It also separates raw data from the views and from the GUI code itself which requires relatively little information about the underlying data and their structure besides what is provided by the definition files XML is an industry standard to store structured information in non binary text files which explains why
155. urce Selection Display symbology Fields Definition Query Labels Joins amp Relates Show Draw quantities using color to show values Import Features Categories Fields Classification Quantities Value test RUMI m Graduated colors Graduated symbols Mormalizatian none Z Proportional symbols Dot density Color E Charts Multiple Attributes mte m 0 6 3586 faa 1 477440 1441 2 066693 3 394061 1476745467 76 000000 Classes 5 Classify Flip Symbols Ramp Colors Properties Selected Symbolist Properties For All Symbols Reverse Sorting Remove Classtes Gombine Glasses Advanced Format Labels Edit Description 111 Symbol Selector Category All Preview Options Fill Color Outline Width 040 Outline Color Beige Yellow E LIN ELLIDCICIEL E EJ UI IM primim EL E M ropertie More Symt i E More Colors Afterwards if everything went well you should see your map amp Untitled ArcMap ArcInfo 101 xi File Edit View Insert Selection Tools Window Help O ea gt amp ux Q Q 3x Bes amp 7 eao 2 Task Create New Feature z Ta
156. use Gas Emissions CO equivalents ha 23 High value Farmland Indicator Index 1 10 234 Shannon index nan grass land crop dex 0 1 236 Share of arable crops 0 1 23c N Fertilising index arable Index 0 1 H2870 Those numbers should now be shown as a map To do so select from the drop down list where Table 15 shown 2 Exploitation of spatial results Data View 1 Activity Items Table v No 23 High Value Farmland Indicator Index 1 10 v Agri Env indicators pressures and benefits BASE 2865 0 17 H2866 1 43 H2867 0 98 H2868 1 17 H2869 1 60 2 1 38 The hour glass cursor is shown and the geometry will be loaded which may take a few seconds Afterwards the standard map comes up green yellow red color model quantile classification polygons shrinked no area weights zeros included in classification Now for the indicator ranging from 0 10 where 10 15 the best possible index value and real zeros indicate missing values the following settings could be appropriate Equal interval classification with 10 classes e Zeros treated as missing values e And using area weights may be appropriate so that the frequency graph below the maps shows the share of UAA in each of the ten classes e As linear scale works nicer for our example and as the data only ranges to 9 88 we should round the number to an integer use the t
157. ween a data dimension of a parameter and a specific set an option termed domain checking in GAMS In order to link hence long texts to the labels used for a specific data dimension two 49 options are possible Firstly at run time the user may interactively re establish the link between data dimensions and specific sets and thus add long texts to the labels used on that data dimension based on his knowledge Or the relation may be hard coded in the JAVA code Multi dimensional viewer with pivoting and exporting possibilities The multi dimensional table is then loaded in a spreadsheet like viewer with pivot possibilities The user may switch between a tabular view of the data or different types of graphs line bar pie spider or maps Scroll down boxes allow the user to rotate through data dimension not shown in the view port columns and rows Several data dimensions may be merged into one view port dimension The user can use column and rows groups and may apply selection to columns and rows as well as to columns and column groups Rows carrying zero values may only be hidden Rows may be sorted by size of the numerical values in one or several columns The current table may be loaded into the clipboard Alternatively all or a selection of tables may be exported to an external file in different formats HTML CSV tab separated GAMS fixed width tables There are further possibilities as changing fonts or the number of decimals Pre
158. y axes taken from the columns are included in the diagram and the maximum number of series which typically consist of scenarios Box and Whisker charts In descriptive statistics a box plot or boxplot also known as a box and whisker diagram or plot is a convenient way of graphically depicting groups of numerical data through their five number summaries the smallest observation sample minimum lower quartile Q1 median Q2 upper quartile Q3 and 73 largest observation sample maximum boxplot may also indicate which observations if any might be considered outliers Boxplots can be useful to display differences between populations without making any assumptions of the underlying statistical distribution they are non parametric The spacings between the different parts of the box help indicate the degree of dispersion spread and skewness in the data and identify outliers Boxplots can be drawn either horizontally or vertically text so far from Wikipedia The box and whisker chart uses the rows as the observations and generates an own graph per column The box shows 25 of the observations around the median which is shown as a grey line whereas the arithmetic mean 15 shown as a grey circle The whiskers show the median three times the inner quartile range Mild outliers are drawn as dots and strong outliers are indicated by arrows So far there are no specific options for that type of diagram Expl
Download Pdf Manuals
Related Search
Related Contents
製品紹介: MX370104A Multi Utica Boilers H2OST Operation and Installation Manual FEATURES Ahuyentador de Murciélagos, Roedores e Insectos Descargar las INSTRUCCIONES Copyright © All rights reserved.
Failed to retrieve file