Home
User manual - P
Contents
1. 1 Welcome to Haskell n factorial n 1 We will calculate the factorial of 5 120 factorial 0 factorial n main do putStrLn Welcome to Haskell putStrLn We will calculate the factorial of 5 putStr show factorial 5 These plugins are under development and will be improved as soon as possible If you want to add your own Java plugins to MeCoSim supposed that you have the application developed independently as a jar file or a folder containing a main jar file the process is as follows 1 Include the jar file or complete folder in the plugins folder of MeCoSim Write some few lines in plugins properties file we illustrate with an example a plugin texteditor alvarotreeapp trail b pluginname texteditor Edit P lingua file c pluginmethod texteditor openPLinguarFile d pluginjar texteditor 1 TreeTestPlugin jar In this example we name a plugin texteditor implemented in the static method openPlinguaFile of the qualified class alvarotreeapp trail inside the jar file TreeTestPlugin jar visible in MeCoSim through the menu option Edit P Lingua file If you need some input parameters to your program you can set them with an additional line for each needed input parameter e g pluginparam texteditor 1 va
2. MeCoSim Membrane Computing Simulator User Manual 23 01 2012 Research Group on Natural Computing Luis Valencia Cabrera lvalencia us es Contents dl Cettime SLARCO ee ea ee a eee eee 2 General MeCoSim WINKOW cccccssssssseccccccsceesseeeccccesseeussseeececessaeessseceecessssuaaseeeeeeessaagaaeses 3 PUIG LO a ssa ro nose cedars ROO RAD ad E do EDAQCONIE TIO usasse eee een rece Ree de OO OO ae rade soda ned Dio E DE id a QUO a E a 6 IMU TO asd os E O O O tomuivanaumeeeatons de PINPIAS DEVO 0 90 9 eee een mee nnn nee ener ado ia ene ae 1 Getting Started Follow these simple steps to start using MeCoSim Membrane Computing Simulator e Visit MeCoSim page http www p lingua org mecosim docsite e Download the latest version of MeCoSim e Unzip the file o Now you have a MeCoSim folder including all the needed files o You are now ready to run MeCoSim by launching the file Run MeCoSim bat Additional info present in MeCoSim downloads web page e MeCoSim zip file includes among others the following files inside MeCoSim folder Run MeCoSim bat MeCoSim execution file lib MeCoSim2 0Core jar is the core of MeCoSim application lib pLinguaCore jar includes a recent version of pLinguaCore including different variants of cell like multienvironment tissue like and SN P systems Can be replaced for your own newer or custom version o prop config properties properties file to change some execution
3. e Data file path path to the ec2 file containing the input data of the current scenario e Sims number of simulations it makes sense when we want to perform several simulations to get averages deviations etc over the data across the different simulations e Cycles number of cycles to simulate it makes sense when we have models following some cyclic process repeating a sequence of steps each cycle without a halting condition otherwise we state O as the number of cycles running the simulation until we reach a halting configuration e Steps is the number of steps by cycle making sense when we have a non zero number of cycles By default we provide a general application with id 1 called General pre configured for a very simple example of a custom MeCoSim app We explain this later Below the list there are some buttons whose functionality is explained in specific sections of the manual but here you have a brief description e Run application runs the selected custom application showing the main window of the custom application as it was configured e Load config file creates a new custom application by loading a configuration file or modify an existing one by reloading total or partially the configuration file e Delete app deletes the selected custom application deleting all its related information for MeCoSim e Export custom app generates a self contained custom app from th
4. 1 step TRUE step 2 labellD TRUE labellD 3 abject TRUE object 4 multiplicity TRUE multiplicity As you can see this information provides an id name tooltip text a default value and an indicator to enable disable the edition of each particular column e Simulation params Param Name Param Value Index 1 Index 2 Index 3 Index 4 g 1 When a P systems designer models a problem usually tries to solve an abstract problem a family of problems not a single scenario For that reason P Lingua permits defining a model with some variable information in the form of parameters These parameters could be written in the model file but is more interesting to provide a way to permit the users introducing the relevant information about different scenarios without changing the model file Then we need a way to transform the input data provided by the user in parameters for P Lingua to populate the initial configuration and rules of the instantiated P system The designer can introduce in the spreadsheet file the name of a parameter optionally with a number of indexes between 1 and 4 joint with the value of the parameter This value is expressed in a language that permits the use of usual numbers mathematical operators input tables data access previously set parameters and some predefined functions As an example we include the parameter g with value 1 Examples of the use of other important ingredients are e Param x with value lt 1 2
5. 4 gt access to the data of the table with id 1 specifically to row 2 column 4 e Param p with value 1 lt ncdf T 1 2 0 5 IT 1 gt with index1 equals to 1 20 and index2 equals to 1 18 returns parameters from p 1 1 to p 20 18 each of them calculated like 1 minus the value of the normal distribution cumulative distribution function with parameters mu T 1 2 sigma 0 5 and x IT 1 T S1S S2SJ refers to a previously calculated parameter T replacing for each parameter SNS for the current value of the iterator with index N We are working in a detailed manual with the description of the language accepted for the mechanism for generate these parameters for P Lingua In addition an extensible mechanism to provide specific functions is provided These functions should be coded in your own jar files added to the plugins folder implementing the Algorithm interface and adding the function to ecosim properties file For example we have by the default in the file among other functions func floor algorithms Floor func ceil algorithms Ceil func min algorithms Min func eq algorithms Equal func if algorithms If func abs algorithms Abs func g algorithms Greater func log algorithms Log func exp algorithms Exp We are also working in incorporating a visual way to add functions written in Haskell inside MeCoSim since it is a purely functional language and we have defining mathematical functions e Simu
6. of steps by cycle in Set number of steps by cycle cyclic models set the number of steps that form a cycle In the present example if we choose the P Lingua model file pli we can see that the path is properly set Scenario Data C MeCosimRelease Release 20120121 123 1 MeCosimiuserfiles general ec P SYSTEM USER el C MeCosimReleaselRelease 20120121 123 1 MeCosimiuserfiles prueba pli e Simulation o Simulate runs the simulation of the model set in the P Lingua file If the model needs some Uy Plugins He parameters not assigned in the Simulate Ctri L pli file it has to be possible to Options gt generate them from the input 1 Debug gt data provided by the user as part of the current scenario Number of cycles Options permi lecting th i e on j AEE 7 E Number of simulations by cycle number of cycles to simulate y Simulation Algorithm for cyclic models zero otherwise running each simulation until a halting active membranes configuration is reached We can also select a specific binomial algorithm from a list of available probabilistic algorithms depending on the dndp loaded model e g active dndp seq membranes for the present dndp2 dndp seg no maximal dndp3 dndp4 bddcb case or dndp4 or bddcb chosen for a probabilistic model from the showed list o Debug available in designer mode some options to init model run step by step Step or re
7. with the data of a previously saved scenario SEE Edit Model Simulati o Save save the data of the New Ctri N n Cti 0 o Save As save the current data Save Cir current scenario Ope with a different name pave As Ctrl Shift S o Reset reset the behavior of the Reset Cirl R Exit Ctri app to the default state i j o Exit exit the MeCoSim custom app without exiting from the main window of MeCoSim By default when we load a config file for a new application or open the General example the path to the file is not set or is invalid We must select our scenario file clicking at Open Then we select the desired ec2 scenario data file Look In inal userfiles general ec File Name general ec Files of Type Scenario files eco ec2 Now we can see how the path to the scenario data file ec2 is properly set EE TT P SYSTEM USER Scenario Data C MeCoSimRelease Release 20120121 1231 MeCosimuserfiles general ec el Invalid path C MeCoSimRelease Release 20120121 1209 MeCoSimiuserfiles prueba pli e Edit mie Model Simulation Cut Ctrl x Copy Cria Paste Ctrl V As we can see this menu provides the basic functionality to Cut Copy Paste Delete and Select All Delete Delete Select All Ctri A e Model available in designer mode o Set Model permit the selection hese Simulation Plugins Help of a P Lingua model file pli Set Model o Set number
8. zero being each of them composed of the set number of steps by cycle If a number of simulations greater than 1 is set then the process is repeated the fixed number of simulations After the set of simulations has finished MeCoSim shows the user the required output tables and graphics as configured in the spreadsheet file as described in section 4 Load config file 7 Plugins Development In order to easily extend the functionality provided for MeCoSim and integrate it with other several applications existent or to be developed in a decoupled way in the sense of independent programs and developments we have provided a simple mechanism to add external independent programs in the form of jar files to MeCoSim By default we provide two plugins to serve as examples e Edit P Lingua file opens the selected P Lingua file in a very basic editor File Edit Format model membrane_division test def test m n fia Initial configuration mu M3 2 1 Initial multisets ms 3 a Set of rules d 2 gt y l 2 n 2 a gt b S Main module def main call Test 1 2 ms 2 d e Haskell Interpreter an experimental Java interface to compile and run Haskell code from MeCoSim showing the standard Haskell output in a textarea you need to have ghc interpreter installed da Haskell Interpreter Put your Haskell code here Output ofthe Haskell program
9. Select the user type End User Designer Export application The export dialog enables the choice of the user type along with the selection of the desired plugins to add to each custom application from the available set of plugins present in the database If we click the button a confirmation message is presented Are you sure you want to export the application with id 1 If confirmed a zip file is generated with the self contained custom application including all the needed files and folders After that an information message is showed Custom application successfully exported 6 Simulation Once we have set the model and the input data needed for our specific scenario we run the simulation by pressing the menu item Simulate or pressing Ctrl L General beta Scenario Edit Model Banik Plugins Help F TEE Output Simulate Ctri L z Options simulation Debug multiplicity 0 P SYSTEM USER Scenario Data CiMeCosSimReleaseiRelgase 20120121 1231MeCoSimiuserfilesigeneral ec odel CiMeCoSimReleaseiRelgase 20120121 1231MeCoSimiuserfilesiprueba pli imulated cycles O simulations by cycle 1 teps by cycle 50 elected simulator active membranes 0 c 2011 Research Group on Natural Computing hitp iwww gen us es Then the simulation is performed until a halting configuration is reached if the number of cycles is set to 0 or a number of cycles if they are set to more than
10. e info contained in MeCoSim providing a zip file with all the specific information and files ready to use by running the application for a P systems designer or an end user All the functionality provided by these buttons is also available from the Application menu Below the buttons we see a text area where the standard output is redirected showing the user information about the actions performed and possible running errors if you detect some errors or you have suggestions questions or comments please notify to lvalencia us es 3 Run application Whenever we run a custom MeCoSim application via button menu item or a previously exported app a MeCoSim Custom app window is showed similar to this 6 General betal scenario Edit Model Simulation Plugins Help Output Debug console labellD multiplicity 0 0 IP SYSTEM USER Scenario Data Invalid path C MeCoSimRelease Release 20120121 1209 MeCoSimiuserfiles general ece ydel Invalid path C MeCoSimRelease Release 20120121 1209 MeCosimiuserfiles prueba pli simulated cycles 0 Simulations by cycle 1 Steps by cycle 50 elected simulator active membranes 0 c 2011 Research Group on Natural Computing hitp iwww gen us es The title of the window corresponds to the name set in the configuration file that we loaded in MeCoSim In the menu bar we see some menus e Scenario o New enable the addition of a new scenario o Open open a file
11. ining rows should refer to 1 if we want to have these tabs at the first level that is to say its parent tab is the app or any other number greater than zero if zero they are not showed implying that they are children tabs of the referred tab parent id In this example we have only one tab Output at the first level containing another tab Simulation In addition if we are in Designer mode a Debug console tab is also included at the first level Thus the custom application will present this hierarchy General beta scenario Edit Model Simulation Plugins Help W Output Debug console e Tables config Table ld Table Name Tab Id Columns Init Rows Save To File Input Output Output Graphic 1 Simulation 3 4 1 TRUE Output Here we list the tables to include in the leaf tabs of the previous hierarchy each table in the specified tab id indicating the type of the table Input or Output the number of columns the initial number of rows it usually changes for output tables after simulating We also have to tell if the table should be saved as part of the scenario data file ec2 Along with this information more specific information about each table is needed This is done by means of a specific tab in the spreadsheet files for each table For example for Simulation table we must have a tab called TC Simulation TC means table config Column ld Column Name Default Value Editable Tooltip
12. lation results Result Table ld Result Table Name Table Id Referred Table Id 1 Simulation 1 0 Once the simulation have run and finished some result should be showed to the user but the type of result may be different in function of the problem so we must indicate which result we want MeCoSim permits defining output tables to show the desired processed results possibly visualizing the output in a graphical way if indicated in the column Graphic output in the tablesConfig tab of the spreadsheet To define each result we have to provide an Id a name the id of the output table to show this result 0 if we are defining an auxiliary table and a referred table id if the row corresponds to a result that depends on a previously defined auxiliary table In addition to this tab we have to fill a specific tab for each result For example for the Simulation result we have the SD_Simulation tab Criteria ld Select Where Group Criteria Formula ReferredCrite Argument Qualified Name Where Selec Where condition 1 Select step 2 Select labellD 3 Select object 4 Select multiplicity 5 Where simulation Integer 1 Here we set the fields to show in the output table Select rows some criteria to filter in function of different conditions Where rows and possibly some grouping criteria Group rows These types of criteria derive from the theory of databases as it provides a very general and flexible way to filter and processing data The co
13. nfigured results are translated internally to SQL language to launch a query on the embedded database HSQLDB on memory DB that contains the result of the computation One advantage of this approach is that we can use almost all the formula provided by the HSQLDB database all of them including two or less input arguments We are working in a detailed manual of the functionality of the language to define rich results but we include some example here to illustrate some possible ingredients Criteria ld Select Where Group Criteria Formula Referred Criteria ld Argument Qualified Name Where Select condition type Where condition 1 Select simulation 2 Select year 3 Select labellD 4 Auxiliary multiplicity 5 Select formula SUM 4 mult 6 WhereAux object String X 1 T Auxiliary step 8 WhereAux formula MOD 7 17 Integer 0 9 WhereAux labellD String 10 WhereAux formula AND 6 8 11 Where formula AND 9 10 12 Group simulation 13 Group year 14 Group labellD For any doubts questions or comments please feel free to contact with us in the e mail lvalencia us es 5 Export app MeCoSim includes a way to export a single custom application for P systems designers or end users deleting information about other applications and abstracting them the non relevant information depending on the type of user Designer or End User Teo ma Select the plugins to include These jar files will be added Haskell Javalnterpreter jar TreeTestPlugin jar
14. parameters for running MeCoSim max dedicated memory in MB main params prop ecosim properties some setup parameters used by MeCoSim plugins folder where we can include our own plugin jar files to be loaded for MeCoSim o prop plugins properties properties file to indicate to MeCoSim which method of which class it must call to run a specific plugin o userfiles folder where the user can include his her own files to use in MeCoSim xls ods spreadsheet config file pli P Lingua model files ec2 scenario data files etc 2 General MeCoSim Window When you enter MeCoSim a general graphical interface is showed fe MeCoSim Application Selection Application List of available applications run a pre loaded application or load a new one App Id App Name PLingua file path Data file path Current simulator Sims Cycles Steps 1 General C MeCoSimRelease Release 20120121 120 C MeCoSimRelease Rel active membranes 1 0 50 Run Application Load config file Delete app Export custom app This interface includes a list with the custom applications that we have previously loaded The list includes the following information e App id an ID that the users have to set in their applications to identify it uniquely e App name the desired name of the application it is advisable to provide unique names but not mandatory e P Lingua file path path to the pli file containing the current P Lingua model
15. set as we will see when describing the Debug console Init Model Ctrl Plugins permit running plugins that included in MeCoSim We provide a way to include some new features in MeCoSim by means of Haskell Interpreter external plugins integrated with Edit P lingua file the core of MeCoSim by filling mem Help some lines in the plugin properties file as we further describe in section 7 plugins development 4 Load config file The previous sections are based on a custom application previously configured and loaded in MeCoSim If we want to set up a new application we must fill a spreadsheet file with the desired inputs and outputs In what follows we describe the various tabs of the spreadsheet to populate e General information Version Simulation Simulations by Steps by cycles cycle cycle Mode App ld App Name Version Date Ec file path P Lingua File Path 1 General CA C4 1 1 50 Designer We set a unique app Id number the application name the default paths to scenario and model files simulation cycles number of simulations steps by cycle and mode Designer or End user This information has been described yet e Tabs hierarchy Tab Name Tab Parentld Order Rol optional MainTab 2 Output 1 3 Simulation This feature enables the user to set the tabs hierarchy to be showed in the main window of the custom app The first row with Tab parent id O plays the role of the application so the rema
Download Pdf Manuals
Related Search
Related Contents
Küppersbusch IKEF 2380-1 combi-fridge Thunder 200 User Manual Bedienungsanleitung - Service エコキュート 勢いのいこんな シャワーも・・・ T。T。株式会社 POP-K ORN, LA COMMUNICA TION AL TERN A TIVE - EUR HySpeed® HT2000® BMW 525i Service and Warranty Information Das Handbuch für den StarliX kann hier geladen ZA-Xシリ一ズ Copyright © All rights reserved.
Failed to retrieve file