Please check our Instructions to Authors and send your manuscripts to nifs.journal@gmail.com. Next issue: September/October 2024.
Deadline for submissions: 16 November 2024.
Help:Genedit/XML format: Difference between revisions
Jump to navigation
Jump to search
→XML tags: Alphabetical order: ! ==> | |
|||
Line 27: | Line 27: | ||
{| width="100%" class="wikitable" style="font-family:courier;" | {| width="100%" class="wikitable" style="font-family:courier;" | ||
| width="30%" | Tag | |||
| width="30%" | Tag parameters | |||
| width="40%" | Tag body | |||
|- valign="top" | |- valign="top" | ||
| <arc> </arc> | |||
| - | | - | ||
| <point/> | | <point/> | ||
Line 39: | Line 39: | ||
|- valign="top" | |- valign="top" | ||
| <char> </char> | |||
| | | | ||
* name | * name | ||
Line 52: | Line 52: | ||
|- valign="top" | |- valign="top" | ||
| <functions> </functions> | |||
| - | | - | ||
| - | | - | ||
Line 58: | Line 58: | ||
|- valign="top" | |- valign="top" | ||
| <gn> </gn> | |||
| | | | ||
* xmlns | * xmlns | ||
Line 74: | Line 74: | ||
|- valign="top" | |- valign="top" | ||
| <input> </input> | |||
| ref | | ref | ||
| <arc> </arc> | | <arc> </arc> | ||
Line 80: | Line 80: | ||
|- valign="top" | |- valign="top" | ||
| <inputs> </inputs> | |||
| - | | - | ||
| <input> </input> | | <input> </input> | ||
Line 86: | Line 86: | ||
|- valign="top" | |- valign="top" | ||
| <output> </output> | |||
| ref | | ref | ||
| <arc> </arc> | | <arc> </arc> | ||
Line 92: | Line 92: | ||
|- valign="top" | |- valign="top" | ||
| <outputs> </outputs> | |||
| - | | - | ||
| <output> </output> | | <output> </output> | ||
Line 98: | Line 98: | ||
|- valign="top" | |- valign="top" | ||
| <place/> | |||
| | | | ||
* id | * id | ||
Line 112: | Line 112: | ||
|- valign="top" | |- valign="top" | ||
| <places> </places> | |||
| - | | - | ||
| <place> </place> | | <place> </place> | ||
Line 118: | Line 118: | ||
|- valign="top" | |- valign="top" | ||
| <point/> | |||
| | | | ||
* positionX | * positionX | ||
Line 126: | Line 126: | ||
|- valign="top" | |- valign="top" | ||
| <predicate> </predicate> | |||
| | | | ||
* input | * input | ||
Line 137: | Line 137: | ||
|- valign="top" | |- valign="top" | ||
| <predicates> </predicates> | |||
| - | | - | ||
| <predicate> </predicate> | | <predicate> </predicate> | ||
Line 143: | Line 143: | ||
|- valign="top" | |- valign="top" | ||
| <token> </token> | |||
| | | | ||
* id | * id | ||
Line 155: | Line 155: | ||
|- valign="top" | |- valign="top" | ||
| <tokens> </tokens> | |||
| - | | - | ||
| <token> </token> | | <token> </token> | ||
Line 161: | Line 161: | ||
|- valign="top" | |- valign="top" | ||
| <transition> </transition> | |||
| | | | ||
* id | * id | ||
Line 178: | Line 178: | ||
|- valign="top" | |- valign="top" | ||
| <transitions> </transitions> | |||
| - | | - | ||
| <transition> </transition> | | <transition> </transition> |
Revision as of 19:17, 13 April 2010
XML tags: Logical order
<gn> <transitions> <transition> <inputs> <input> <arc> <point/> ... <point/> </arc> </input> <input> .... </input> ..... <input> .... </input> </inputs>
XML tags: Alphabetical order
Tag | Tag parameters | Tag body |
<arc> </arc> | - | <point/> |
<char> </char> |
|
|
<functions> </functions> | - | - |
<gn> </gn> |
|
|
<input> </input> | ref | <arc> </arc> |
<inputs> </inputs> | - | <input> </input> |
<output> </output> | ref | <arc> </arc> |
<outputs> </outputs> | - | <output> </output> |
<place/> |
|
- |
<places> </places> | - | <place> </place> |
<point/> |
|
- |
<predicate> </predicate> |
|
|
<predicates> </predicates> | - | <predicate> </predicate> |
<token> </token> |
|
<char> </char> |
<tokens> </tokens> | - | <token> </token> |
<transition> </transition> |
|
|
<transitions> </transitions> | - | <transition> </transition> |
Example: Defines Chars
<?xml version="1.0" ?>
<gn xmlns="http://www.clbme.bas.bg/GN" name="example-define-chars" time="256" timeStart="0" timeStep="1" root="true">
<transitions>
<transition id="T" name="T" priority="0" startTime="0" lifeTime="-1" positionX="130" positionY="100" sizeY="100">
<inputs>
<input ref="LStart">
<arc>
<point positionX="80" positionY="140"/>
<point positionX="130" positionY="140"/>
</arc>
</input>
</inputs>
<outputs>
<output ref="LEnd">
<arc>
<point positionX="130" positionY="140"/>
<point positionX="180" positionY="140"/>
</arc>
</output>
</outputs>
<predicates>
<predicate input="LStart" output="LEnd">true</predicate>
</predicates>
</transition>
</transitions>
<places>
<place id="LStart" name="LStart" priority="1" capacity="-1" char="CharLStart" merge="false" positionX="80" positionY="140"/>
<place id="LEnd" name="LEnd" priority="1" capacity="-1" char="CharLEnd" merge="false" positionX="180" positionY="140"/>
</places>
<tokens>
<token id="Tkn" name="Tkn" priority="0" host="LStart" entering="0" leaving="-1">
<char name="Default" type="double" history="1">0</char>
<char name="array" type="vector" history="1">[ 1 2 3]</char>
<char name="testDouble" type="double" history="1">0</char>
</token>
</tokens>
<functions><![CDATA[; CHAR FUNCTIONS
; ----------
(defun getParam "" (tkn param) (distribution)
(if (= (get-named tkn (+ param "/type")) "explicit")
;--------- explicit parameter
(get-named tkn param)
;---------- manual parameter?
(if (= (get-named tkn (+ param "/type")) "manual")
(begin
(print "Please enter the value of " param " :")
(read-double)
);begin manual parameter
;--------- random parameter
(begin
(let distribution (get-named tkn (+ param "/distribution")))
(if (= distribution "uniform")
;------------ uniform distribution
(random (get-named tkn (+ param "/interval-end")))
;---------------------------------
(if (= distribution "normal")
;------------ normal distribution
(random-normal (get-named tkn (+ param "/mean"))
(get-named tkn (+ param "/variance")))
;--------------------------------
(if (= distribution "exponential")
;------------ exponential distribution
(random-exp (get-named tkn (+ param "/mean")))
;---------------------------------
(+ 0)
);if exp
);if norm
);if uniform
);begin
);if manual
);if explicit
); defun
(defun CharLStart "" () ()
(print "start")
)
(defun CharLEnd "" () ()
(def-ch tokenobj )
(print (xml-output tokenobj))
(print "Parameter 'array': " (getParam tokenobj "array")) (newline)
(print "Parameter 'testDouble': " (getParam tokenobj "testDouble")) (newline)
)]]></functions>
</gn>