trnsystor.trnsysmodel.MetaData

class trnsystor.trnsysmodel.MetaData(object=None, author=None, organization=None, editor=None, creationDate=None, modifictionDate=None, mode=None, validation=None, icon=None, type=None, maxInstance=None, keywords=None, details=None, comment=None, variables=None, plugin=None, variablesComment=None, cycles=None, source=None, externalFiles=None, compileCommand=None, model=None, specialCards=None, **kwargs)[source]

General information that is associated with a TrnsysModel.

Initialize object with arguments.

This information is contained in the General Tab of the Proforma.

Parameters
  • object (str) – A generic name describing the component model.

  • author (str) – The name of the person who wrote the model.

  • organization (str) – The name of organization with which the Author is affiliated.

  • editor (str) – Often, the person creating the Simulation Studio Proforma is not the original author and so the name of the Editor may also be important.

  • creationDate (str) – This is the date of when the model was first written.

  • modifictionDate (str) – This is the date when the Proforma was mostly recently revised.

  • mode (int) – 1-Detailed, 2-Simplified, 3-Empirical, 4- Conventional

  • validation (int) – Determine the type of validation that was performed on this model. This can be 1-qualitative, 2-numerical, 3-analytical, 4-experimental and 5-‘in assembly’ meaning that it was verified as part of a larger system which was verified.

  • icon (Path) – Path to the icon.

  • type (int) – The type number.

  • maxInstance (int) – The maximum number of instances this type can be used.

  • keywords (str) – keywords associated with this model.

  • details (str) – The detailed description contains an explanation of the model including a mathematical description of the model

  • comment (str) – The text entered here will appear as a comment in the TRNSYS input file. This allows to attach important information about the component to all its users, including users who prefer to edit the input file with a text editor. This text should be short, to avoid overloading the input file.

  • variables (dict, optional) – a list of TypeVariable.

  • plugin (Path) – The plug-in path contains the path to the an external application which will be executed to modify component properties instead of the classical properties window.

  • variablesComment (str) – #todo What is this?

  • cycles (list, optional) – List of TypeCycle.

  • source (Path) – Path of the source code.

  • externalFiles (trnsystor.external_file.ExternalFileCollection) – A class handling ExternalFiles for this object.

  • compileCommand (str) – Command used to recompile this type.

  • model (Path) – Path of the xml or tmf file.

  • specialCards (list of SpecialCards) – List of SpecialCards.

  • **kwargs – Other keyword arguments passed to the constructor.

classmethod from_tag(tag, **kwargs)[source]

Create a TrnsysModel from an xml tag.

Parameters
  • tag (Tag) – The XML tag with its attributes and contents.

  • **kwargs

check_extra_tags(kwargs)[source]

Detect extra tags in the proforma and warn.

Parameters

kwargs (dict) – dictionary of extra keyword-arguments that would be passed to the constructor.

classmethod from_xml(xml, **kwargs)[source]

Initialize MetaData from xml file.