Both sides previous revision
Previous revision
Next revision
|
Previous revision
|
model_samples:xml_model_description [2014/09/30 15:07] labstudents |
model_samples:xml_model_description [2014/10/28 15:06] (current) labstudents |
======XML model description====== | |
| ====== XML model description ====== |
A model can involve different kinds of files (as mentioned in [[http://www.sce.carleton.ca/faculty/wainer/wbgraf/doku.php?id=model_samples:file_contents | File Contents]] ), in order to better understand and reuse it, an XML Model Description should be included. | A model can involve different kinds of files (as mentioned in [[http://www.sce.carleton.ca/faculty/wainer/wbgraf/doku.php?id=model_samples:file_contents | File Contents]] ), in order to better understand and reuse it, an XML Model Description should be included. |
| |
//**<Model>**// - It keeps the basic information for each atomic or coupled model, which includes model //name//, //type// (e.g. atomic or coupled), a //description// (a short paragraph to describe this model). | //**<Model>**// - It keeps the basic information for each atomic or coupled model, which includes model //name//, //type// (e.g. atomic or coupled), a //description// (a short paragraph to describe this model). |
| |
//**<Port>**// - optional, if the model contains input ports and output ports, it keeps them in <//Ports//> (<//Inputs//>or <//Outputs//>), including their //name//, //type//, and a //description//. The '//type//' is the message type that transmits in that port. In current implementation of CD++, the default type is “double”. If you have used other messages, please specify here. | //**<Port>**// - optional, if the model contains input ports and output ports, it keeps them in <//Ports//> (<//Inputs//>or <//Outputs//>), including their //name//, //type//, and a //description//. The '//type//' is the message type that transmits in that port. In current implementation of CD++, the default type is '//double//'. If you have used other messages, please specify here. |
| |
//**<File>**// - optional, a model can have multiple files, including file //name//, //type//, and //location//. The ‘//type//’ is the extension of a file (File Contents explain these extensions). For example, EV means this file is an external events file. A file location tells where the file is ('/' for the current folder, and '/xxx' for any subfolder in the model ZIP file). | //**<File>**// - optional, a model can have multiple files, including file //name//, //type//, and //location//. The ‘//type//’ is the extension of a file (File Contents explain these extensions). For example, EV means this file is an external events file. A file location tells where the file is ('/' for the current folder, and '/xxx' for any subfolder in the model ZIP file). |
| |
===== **XML Template and Example** ===== | ====== XML Template and Example ====== |
| |
[[http://www.sce.carleton.ca/faculty/wainer/wbgraf/doku.php?id=model_samples:file_contents | Empty XML model description template]]. | [[http://www.sce.carleton.ca/faculty/wainer/wbgraf/lib/exe/fetch.php?media=model_samples:xml:modeldescription-empty.zip | Empty XML model description template]]. |
| |
Example: [[http://www.sce.carleton.ca/faculty/wainer/wbgraf/doku.php?id=model_samples:file_contents | XMLModelDescription]] for the [[http://www.sce.carleton.ca/faculty/wainer/wbgraf/samples/barbershop.zip | model Barbershop]] | Example: [[http://www.sce.carleton.ca/faculty/wainer/wbgraf/lib/exe/fetch.php?media=model_samples:xml:modeldescription-barbershop.zip | XML Barbershop Description]] for [[http://www.sce.carleton.ca/faculty/wainer/wbgraf/samples/barbershop.zip | model Barbershop]] |
| |
===== **Please note that** ===== | ====== Please note that ====== |
| |
1) In order to increase readability, the ‘//name//’ of models and ports should be meaningful, instead of simple names like '//modelA/in1/out1//'. For example, a barber model has a ‘reception’ model, which has an input port named ‘new_customer’. | 1) In order to increase readability, the ‘//name//’ of models and ports should be meaningful, instead of simple names like '//modelA/in1/out1//'. For example, a barber model has a ‘reception’ model, which has an input port named ‘new_customer’. |
2) The 'description' in this XML file is a short sentence to describe a //model/port//, please keep it concise. | 2) The 'description' in this XML file is a short sentence to describe a //model/port//, please keep it concise. |
| |
3) Please include this kind of XML description in the model ZIP file (which contains all the files). | 3) You can edit the XML file in any text editor, please use the ones with spell/grammar checking (e.g. Notepad++, word). In addition, to make sure your XML file is in correct format, please check it in any XML editor (e.g. IE). |
| |
| 4) Please include this kind of XML description in the model ZIP file (which contains all the files). |
| |
| |
| |