XML model description

A model can involve different kinds of files (as mentioned in File Contents ), in order to better understand and reuse it, an XML Model Description should be included.

It is like a short version of “ReadMe” file for the model. The idea is to provide a brief description about coupled/atomic models, input/output ports, and related files.

<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.

<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

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’.

2) The 'description' in this XML file is a short sentence to describe a model/port, please keep it concise.

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).

 
model_samples/xml_model_description.txt · Last modified: 2014/10/28 15:06 by labstudents