A Java-Based P-Lingua Simulator for Enzymatic Numerical P Systems

A Java API for the simulation of Enzymatic Numerical P Systems (ENPSs) is available here. This API implements the following functionality.

  • Parameterized ENPSXML models are ENPS models whose header contains the main parameters of the model (i.e. number of programs, maximum number of repartition element per program, etc.). It is the input format for my GPU simulator for ENPSs. In order to transform an ENPS model into a parameterized ENPS model, open a command prompt and run the following command:

    java -jar pLinguaCore.jar plingua -ENPSXML model.xml -PENPSXML parameterized_model.xml -v 5
    

    where model.xml is the file containing the model to simulate and report.txt is the result of the simulation.

  • In order to call P-Lingua to simulate an ENPS model, open a command prompt console and type:

    java -jar pLinguaCore.jar plingua_sim -ENPSXML model.xml -o report.txt -v 5
    

    where model.xml is the file containing the model to simulate and report.txt is the result of the simulation.

If you want to customize the current release of pLinguaCore so it also accepts ENPSs, please follow these instructions:

  1. Download P-Lingua, a software API for the simulation of P Systems
  2. Download the Java API, available here
  3. In P-Lingua jar file, open the file “org/gcn/plinguacore/resources/original/models.xml”
  4. Include the line
     <model id="enps" class="org.gcn.plinguacore.simulator.enps.ENPSFactory"/>
  5. In P-Lingua jar file, open the file “org/gcn/plinguacore/resources/original/formats.xml”
  6. Include the lines
     <format id="ENPSXML" class="org.gcn.plinguacore.parser.output.XML.numerical.XMLNumericalOutputParser" option="-EXML" extension="exml"/>
          <format id="PENPSXML" class="org.gcn.plinguacore.parser.output.XML.numerical.ParameterizedXMLNumericalOutputParser" option="-PEXML" extension="pexml"/>

    as child labels of <output_format> label

  7. Include the line
     <format id="ENPSXML" class="org.gcn.plinguacore.parser.input.XML.numerical.XMLNumericalInputParser" option="-EXML" extension="xml"/>

    as a child label of <input_format> label

  8. In P-Lingua jar file, paste the file enps.xml inside the folder “org/gcn/plinguacore/resources/original/formats.xml”

To perform P-Lingua calls on this adapted version, just add -cp route/pLinguaENPSAdaptor.jar to the command line, where route is the route where the file pLinguaENPSAdaptor.jar is located.