Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated the style guide for #180 #181

Merged
merged 2 commits into from
Mar 12, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions Annex60/package.mo
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ In the Modelica package the following conventions are used:

<ol>
<li> Class and instance names are written in upper and lower case
letters, e.g., \"ElectricCurrent\". An underscore is only used
letters, e.g., \"ElectricCurrent\", and may contain numbers.
An underscore is only used
at the end of a name to characterize a lower or upper index,
e.g., \"pin_a\".</li>

Expand All @@ -41,19 +42,20 @@ In the Modelica package the following conventions are used:
<li> <b>Constant names</b>, i.e., names of variables declared with the
\"constant\" prefix, follow the usual naming conventions
(= upper and lower case letters) and start usually with an
upper case letter, e.g. UniformGravity, SteadyState.</li>
upper case letter, e.g. UniformGravity, SteadyState,
with only few exceptions such as \"pi\" and \"h_fg\".</li>
<li> The two connectors of a domain that have identical declarations
and different icons are usually distinguished by \"_a\", \"_b\"
or \"_p\", \"_n\", e.g., Flange_a/Flange_b, HeatPort_a, HeatPort_b.</li>

<li> The <b>instance name</b> of a component is always displayed in its icon
(= text string \"%name\") in <b>blue color</b>. A connector class has the instance
name definition in the diagram layer and not in the icon layer.
<b>Parameter</b> values, e.g., resistance, mass, gear ratio, are displayed
If displayed, <b>parameter</b> values, e.g., resistance, mass, gear ratio, are displayed
in the icon in <b>black color</b> in a smaller font size as the instance name.
</li>

<li> A main package has usually the following subpackages:
<li>Packages have usually the following subpackages:
<ul>
<li><b>UsersGuide</b> containing an overall description of the library
and how to use it.</li>
Expand Down Expand Up @@ -112,7 +114,9 @@ in addition to the ones of the Modelica Standard Library:
For one-line comments of parameters, variables and classes, no period should be used at the end of the comment.
</li>
<li>
Where applicable, all variable must have units, also if the variable is protected.
All variables that have a physical correspondence, including physical ratios, must have a unit.
Use (derived) SI units.
Non-SI units are to be kept at an absolute minimum, and they must be declared as <code>protected</code>.
</li>
<li>
To indicate that a class (i.e., a package, model, block etc.) has not been extensively tested or validated,
Expand Down