Submit your research to the International Journal "Notes on Intuitionistic Fuzzy Sets". Contact us at nifs.journal@gmail.com

Call for Papers for the 27th International Conference on Intuitionistic Fuzzy Sets is now open!
Conference: 5–6 July 2024, Burgas, Bulgaria • EXTENDED DEADLINE for submissions: 15 APRIL 2024.

Help:Genedit/XML format: Difference between revisions

From Ifigenia, the wiki for intuitionistic fuzzy sets and generalized nets
Jump to navigation Jump to search
(New page: == Example: Defines Chars == <source lang="xml"> <?xml version="1.0" ?> <gn xmlns="http://www.clbme.bas.bg/GN" name="example-define-chars" time="256" timeStart="0" timeStep="1" root="tru...)
 
(general structure')
Line 1: Line 1:
== XML tags: Logical order ==
<pre>
<gn>
    <transitions>
          <transition>
              <inputs>
                    <input>
                        <arc>
                              <point/>
                              ...
                              <point/>
                        </arc>
                    </input>
                    <input>
                    ....
                    </input>
                    .....
                    <input>
                    ....
                    </input>
              </inputs>
 
</pre>
== XML tags: Alphabetical order ==
{| width="100%" class="wikitable" style="font-family:courier;"
! width="30%" | Tag
! width="30%" | Tag parameters
! width="40%" | Tag body
|- valign="top"
| <arc>
|
|
|- valign="top"
| <functions>
|
|
|- valign="top"
| <gn>
|
* xmlns
* name
* time
* timeStart
* timeStep
* root
|
* <transitions>
* <places>
* <tokens>
* <functions>
|- valign="top"
| <input>
|
|
|- valign="top"
| <inputs>
|
|
|- valign="top"
| <output>
|
|
|- valign="top"
| <outputs>
|
|
|- valign="top"
| <place>
|
|
|- valign="top"
| <places>
|
|
|- valign="top"
| <point>
|
|
|- valign="top"
| <predicate>
|
|
|- valign="top"
| <predicates>
|
|
|- valign="top"
| <token>
|
|
|- valign="top"
| <tokens>
|
|
|- valign="top"
| <transition>
|
* id
* name
* priority
* startTime
* lifeTime
* positionX
* positionY
* sizeY
|
* <inputs>
* <outputs>
* <predicates>
|- valign="top"
| <transitions>
| -
|
* <transition>
|- valign="top"
|}
== Example: Defines Chars ==
== Example: Defines Chars ==



Revision as of 19:57, 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>
<functions>
<gn>
  • xmlns
  • name
  • time
  • timeStart
  • timeStep
  • root
  • <transitions>
  • <places>
  • <tokens>
  • <functions>
<input>
<inputs>
<output>
<outputs>
<place>
<places>
<point>
<predicate>
<predicates>
<token>
<tokens>
<transition>
  • id
  • name
  • priority
  • startTime
  • lifeTime
  • positionX
  • positionY
  • sizeY
  • <inputs>
  • <outputs>
  • <predicates>
<transitions> -
  • <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>