ndr_format(n)							 ndr_format(n)



1mNAME0m
       ndr_format   - graphic file format for Time Petri nets

       Part  of	 Tina  Toolbox	for analysis of	Petri nets and Time Petri nets
       (see also nd, tina, plan, struct, ktzio,	selt).


1mDESCRIPTION0m
       Format ndr is the format	of graphic files produced by the nd editor.  A
       net  is	described by a	series of declarations of  places, transitions
       and edges, followed  by a net name declaration.	 The net described  is
       the superposition of these declarations.

       1mGrammar :0m

       .ndr	 ::= (<trdesc>|<pldesc>)* (<edgedesc>|<prdesc>)* <netdesc>
       trdesc	      ::= 't' <xpos> <ypos> <transition> <eft> <lft> <anchor>
		  |  't' <xpos>	<ypos> <transition> <anchor> <eft> <lft> <anchor> <label> <anchor>
       pldesc	      ::= 'p' <xpos> <ypos> <place> <marking> <anchor> {<label>	<anchor>}
       edgedesc	 ::= 'e' <place> <transition> {<arckind>}<weight> <anchor>
		  |  'e' <place> <ang> <rad> <transition> <ang>	<rad> {<arckind>}<weight> <anchor>
		  |  'e' <transition> <place> <weight> <anchor>
		  |  'e' <transition> <ang> <rad> <place> <ang>	<rad> <weight> <anchor>
       prdesc	      ::= 'e' <transition> <transition>	1 <anchor>
		  |  'e' <transition> <ang> <rad> <transition> <ang> <rad> 1 <anchor>
       netdesc	      ::= 'h' <net> {<nodesize>	{<bgcolor>}}
       eft	 ::= {-}INT
       lft	 ::= {-}INT | 'w'
       weight, marking	   ::= INT{'K'|'M'}
       arckind	      ::= '?'			    // test (read) arc
		  |  '?-'		  // inhibitor
		  |  '!'		       // stopwatch
		  |  '?-'		  // stopwatch-inhibitor
       xpos, ypos, rad	   ::= FLOAT
       ang	 ::= UFLOAT
       net, place, transition, label	  ::= ANAME | '{'QNAME'}'
       anchor	      ::= 'n' |	'nw' | 'w' | 'sw' | 's'	| 'se' | 'e' | 'ne' | 'c'
       FLOAT	      ::= unsigned float (without exponent)
       UFLOAT	      ::= unsigned float between 0 and 1 (without exponent)
       INT	 ::= unsigned integer
       ANAME	      ::= see notes below
       QNAME	      ::= see notes below
       <nodesize>     ::= 'small' | 'normal' | 'large'
       <bgcolor> ::= any tcl-tk	color

       1mNotes:0m

       Node declarations must precede edge declarations.

       The last	declaration must be the	netname	declaration (h).

       Empty lines and lines beginning with '#'are considered comments.

       A '-' starting an eft or	lft denotes an open interval end.

       In any transition declaration, one must have `lft >= `eft or lft	= 'w',
       where `e	denotes	e if e>=0, or (-e)-1 otherwise

       If eft =	lft, then they may not be both negative	(intervals may not  be
       empty).

       The  letter 'K' (resp. 'M') following a weight or marking multiplies it
       by 10^3 (resp. 10^6).

       Two forms are admitted for net, place and transition names:
	 - ANAME : any non empty string	of letters,  digits,  primes  '''  and
       underscores '_'
	 -  '{'QNAME'}'	 :  any	 chain between braces, and in which characters
       '{', '}', and ''	     are prefixed by ''


1mEXAMPLES0m
       p 120.0 50.0 p1 1 n
       p 340.0 50.0 p2 2 n
       p 120.0 190.0 p3	0 n
       p 280.0 200.0 p4	0 e
       p 390.0 200.0 p5	0 e
       t 180.0 120.0 t1	4 9 w
       t 280.0 120.0 t2	0 2 e
       t 390.0 120.0 t3	1 3 e
       t 120.0 260.0 t4	0 2 s
       t 60.0 120.0 t5 0 3 w
       e t5 p1 1 n
       e p1 t1 1 n
       e p3 t5 1 n
       e p3 0.628881058409 29.0	t4 0.357388356261 32.0156211872	1 n
       e t4 0.143423651709 30.61045573 p3 0.859887966581 29.8328677804 1 n
       e p2 0.5	58.0 t1	0.17119709363 56.8242905807 2 n
       e t1 0.841581677509 44.1021541424 p4 0.456549315397 51.923019943	1 n
       e p4 t2 1 n
       e t2 p2 1 n
       e t1 0.778624573524 67.082039325	p5 0.592215460534 96.7987603226	1 n
       e p5 t3 1 n
       e t3 p2 1 n
       e t1 p3 1 n
       h ifip

       (see example "ndr" files	in the "net" directory of distributions).


1mSEE ALSO0m
       tina_formats, nd, tina, plan, struct, ktzio, selt


1mAUTHORS0m
       Bernard Berthomieu, LAAS/CNRS, 2000-2010, Bernard.Berthomieu@laas.fr.




Tina Formats			Version	2.9.10			 ndr_format(n)
