The MIRANA model is used to assess the impact of management transfer to local communities on sustainable development of their territories (including the ecological, social and economic aspects).
Distribution - This model distribution is made of three folders:
- mirana: is the plugin containing all the hard-coded behaviour of the model, to be unziped and put in the folder "plugins" where the mimosa application is.
- miranaModel: contains the model project together with the conceptual and concrete mirana models. Unzip this file in the Mimosa126.96.36.199/examples directory.
- Sites: contains an example of the parametrization of the model using excel and shape files with the following content:
- loaddb.sh *: is a shell script to load all the parametrization files into Postgresql
or Antontona.backup is the backup of the data base as created by loaddb.sh (just in case)
- Excel2DB: contains a java program to load individual excel sheets into Postgresql after modification (also called from loaddb.sh)
- Antontona.backup: the data base backup to be loaded in postgresql
- Antontona: contains the parameterization of a particular case and contains:
- Base de données.xls: the system description (only the sheets without a "U" are used)
- Moyens de gestion.xls: the regulations description (same convention!)
- shapefiles: the folder containing all the necessary maps.
Setup - Be sure to follow the following steps:
- Download and install Postgresql (http://www.postgresql.org/). Version 9.0 recommended.
- Download and install the PostGIS 1.5 extension of PostgreSQL 9.0 (http://postgis.refractions.net/)
- Download and install the last version of Mimosa (currently 188.8.131.52) (http://sourceforge.net/projects/mimosa) where you want (Windows: recommend C:\Mimosa184.108.40.206)
- Put the folder "mirana" into the plugins folder of the mimosa distribution
- In postgresql create the role "madagascar" with the password "mirana". Do this using the pgAdmin III interface using the following steps:
- Start pgAdmin III (under the Windows start menu find PostgrSQL 9.0 and select pgAdmin III)
- Highlight postgres in the Object browser then select the Query Tool under the Tools pull-down menu
- In the SQL Editor type exactly: CREATE ROLE madagascar WITH LOGIN PASSWORD 'mirana'
- Under the Query pull-down menu choose Execute (or F5)
- Close the Query Tool.
- or do:
- Highlight and open postgres in the Object browser
- Right click "Connexion roles"
- In the entry window, enter madagascar under the property tab
- Enter mirana under the definition tab
- Select "Superuser" and "Can create databases" under the role rights tab (otherwise loaddb.sh would not work)
- Click OK.
- Either create the "Antontona" data base (the owner must be madagascar) and restore it from "Antontona.backup", or run "./loaddb.sh Antontona" from a command line. Here is how to create and restore in pgAdmin III for PostgreSQL 9.0:
- Right Click "Databases" in teh Object browser and select New database
- In the entry window, Name = Antontona and choose the Owner = madagascar. Click OK. The new database shell will be in the Object browser.
- In the Object browser, right click Antontona and select Restore. You should have unzipped the Sites.zip file somewhere, then you can select that path and find the Antontona.backup file. Click OK and the restoration will begin and end with a long list of messages. Click Cancel when done. This is what Antontona should look like in the Object browser if you open up its folders:
Running Mirana - Be sure to follow the following steps:
- In Windows, create a shortcut to Mimosa by going into the Mimosa220.127.116.11 directory and right-clicking the file mimosa.jar and sending a shortcut to the windows desktop. Double click the icon to run Mimosa.
- CAUTION: if an archive extractor opens, you must fully install the latest Java distribution (http://www.java.com/)
- Within Mimosa, open "mirana.pml" project file that you should have unzipped from MiranaModel.zip
- Double click on "mirana" in the project browser then double click "Simulation models" and then select "simulation(Mirana1)"
- Click "Reset" to generate the model interface
- Click "Initialize" to create the initial state of the model
- Click either "Step" or "Run" (with an ending date) to run the model