Skip to content

DiNeROS by PNML Examples

This page gives some example for newly by DiNeROS into PNML introduced concepts. The base concepts of pnml, such as places, transitions and pages can be studies on the offical pnml documentation page. All extensions are implemented within the PNML-toolspecifics, to guarantee compatility to other tools using PNML.

Rules for Locations and Subnets

  • Subnets/nodes for channels are always channel
  • Publisher, Subscriber, Clients and Servers have unique subnet
  • If a node hase a client and is a server, they both share the same subnet

Rules for Names and Identifiers

Their are some simple rules for names and identifiers of all elements:

  • No special characters
  • No Dashes
  • Identifiers and names are not allowed to have the prefix DINEROS, because its a reserved keyword

PNML Examples

Inputsignals

Inputsignals and their initial values are defined globally within the petri net element toolspecifics and bound within a clause, which is requiered to be a conjunctive normal form. The initialvalue of a signal is (as its an binary signal) either 0 or 1.

<inputsignals>
    <inputsignal>
        <inputsignalID>SignalRed</inputsignalID>
        <initialvalue>false</initialvalue>
    </inputsignal>
</transition>
</inputsignals>
<transition id="SortGreen">
    <toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
        <node>SelectorNode</node>
        <subnet>SelectorNodeGreen</subnet>
        <type>discreteTransitionType</type>
        <inputsignalclause>(Signal1 OR Signal2) AND (Signal3 OR Signal4)</inputsignalclause>
     </toolspecific>
     <name>
        text>SortGreen</text>
      </name>
</transition>

Initial Balloon Marking

<place id="p1">
   <toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
      <node>nodeA</node>
      <subnet>locA</subnet>
      <balloonMarking>
         <tokens>
            <token>{"samplefield1": "data", "samplefield2": "more data"}</token>
         </tokens>
      </balloonMarking>
   </toolspecific>
   <name>
      <text>p1</text>
      <graphics>
         <offset x="0" y="-10" />
      </graphics>
   </name>
   <graphics>
      <position x="635" y="90" />
   </graphics>
   <initialMarking>
      <text>1</text>
   </initialMarking>
</place>

Balloon-tokens within dineros are defined as json-formatted strings which are mapped my jackson to an token java object. The number of tokens within the initial marking must be the same as the number of balloontokens.

Transition Types

Global DiNeROS Petri nets are typed based on their functionality:

<!-- normal P/T-transition -->
<type>discreteTransitionType</type>

<!-- topic channel transition -->
<type>topicTransitionType</type>

<!-- service channel transition -->
<type>serviceTransitionType</type>

Topics

The topic channel is modelled within a transition, where the channel transitions node and subnet is always channel. Subscribers and publisher places are referenced by ID within ports, which also define the according channel limits.

<transition id="LeftCellObjectsTopicTransition">
    <toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
        <type>topicTransitionType</type>
        <topicName>LeftCellObjects</topicName>
        <publishers>
            <publisher>
                <id>RedPublisher</id>
                <limit>10</limit>
            </publisher>
            <publisher>
                <id>GreenPublisher</id>
                <limit>10</limit>
            </publisher>
        </publishers>
        <subscribers>
            <subscriber>
                <id>L-AwaitingControl</id>
                <limit>20</limit>
            </subscriber>
        </subscribers>
    </toolspecific>
    <name>
        <text>LeftCellObjectsTopicTransition</text>
    </name>
</transition>

Services

Service channels are modelled within a transition. The location and subnet is always channel. Again as in topics we define channel ports for the client side and on a higher xml-level the service name aswell the services input and output place.

<transition id="GetControlServiceTransition">
    <toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
        <type>serviceTransitionType</type>
        <serviceName>GetControl</serviceName>
        <serverInput>GetServerIn</serverInput>
        <serverOutput>GetServerout</serverOutput>
        <serverCapacity>16</serverCapacity>
        <channels>
            <channel>
                <cid>LeftCellChannel</cid>
                <request>L-AwaitingControl</request>
                <response>L-Ready</response>
            </channel>
            <channel>
                <cid>RightCellChannel</cid>
                <request>R-AwaitingControl</request>
                <response>R-Ready</response>
            </channel>
        </channels>
    </toolspecific>
    <name>
        <text>GetControlServiceTransition</text>
    </name>
</transition>