Skip to content
Open
Show file tree
Hide file tree
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
43 changes: 18 additions & 25 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,33 +50,26 @@ before_install:
cd -;
echo "Set up modelica-buildings at ${MODELICAPATH}";

# For sphinx, we need to install specific package versions, otherwise
# the html output may have small formatting differences which causes
# the test to fail
install:
- pip3 install --upgrade pip wheel
- pip3 install sphinx==4.3.2 \
sphinx-bootstrap-theme==0.8.0 \
sphinxcontrib-bibtex==2.4.1 \
sphinxcontrib-plantuml==0.22 \
alabaster==0.7.12 \
MarkupSafe==1.1.1 \
Pygments==2.4.2 \
snowballstemmer==1.9.0 \
docutils==0.17.1 \
Babel==2.7.0 \
requests==2.27.0 \
Jinja2==2.11.3 \
latexcodec==1.0.7 \
pybtex==0.24.0 \
pybtex-docutils==1.0.1 \
oset==0.1.3 \
PyYAML==5.4
- pip3 install -r ${TRAVIS_BUILD_DIR}/software/verification/requirements.txt

# Execute tests
script:
- (cd specification; make clean html; cd ..)
- (cd specification; make latex; cd ..)
- (cd specification; make linkcheck SPHINXOPTS=-W; cd ..)
- (cd software/verification; make test-verification; cd ../..)
- |
cd specification
python -m venv venv
source venv/bin/activate
pip install -r ${TRAVIS_BUILD_DIR}/specification/requirements.txt
make clean html
make latex
make linkcheck SPHINXOPTS=-W
deactivate
rm -rf venv
- |
cd software/verification
python -m venv venv
source venv/bin/activate
pip install -r ${TRAVIS_BUILD_DIR}/software/verification/requirements.txt
make test-verification
deactivate
rm -rf venv
7 changes: 7 additions & 0 deletions specification/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Sphinx==5.3.0
sphinx-bootstrap-theme==0.8.1
sphinxcontrib-bibtex==2.6.5
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-plantuml==0.31
pillow==11.3.0
59 changes: 30 additions & 29 deletions specification/source/cdl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -796,20 +796,20 @@ a translator from ``CDL-JSON`` to a control product line is allowed to ignore th
Example 1: If a controller has two samplers called ``sam1`` and ``sam2`` and their parameter
``samplePeriod`` must satisfy ``sam1.samplePeriod = sam2.samplePeriod`` for the logic to work correctly,
then the controller can be implemented using
`CDL.Logical.Sources.SampleTrigger <https://simulationresearch.lbl.gov/modelica/releases/v10.0.0/help/Buildings_Controls_OBC_CDL_Logical_Sources.html#Buildings.Controls.OBC.CDL.Logical.Sources.SampleTrigger>`_
`CDL.Logical.Sources.SampleTrigger <https://simulationresearch.lbl.gov/modelica/releases/v12.1.0/help/Buildings_Controls_OBC_CDL_Logical_Sources.html#Buildings.Controls.OBC.CDL.Logical.Sources.SampleTrigger>`_
and connect its output to two instances of
`CDL.Discrete.TriggeredSampler <https://simulationresearch.lbl.gov/modelica/releases/v10.0.0/help/Buildings_Controls_OBC_CDL_Discrete.html#Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler>`_
`CDL.Discrete.TriggeredSampler <https://simulationresearch.lbl.gov/modelica/releases/v12.1.0/help/Buildings_Controls_OBC_CDL_Discrete.html#Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler>`_
that sample the corresponding signals.

Example 2: If a controller normalized two input signals by dividing it by a gain ``k1``, then
rather than using two instances of
`CDL.Reals.MultiplyByParameter <https://simulationresearch.lbl.gov/modelica/releases/v10.0.0/help/Buildings_Controls_OBC_CDL_Reals.html#Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter>`_
`CDL.Reals.MultiplyByParameter <https://simulationresearch.lbl.gov/modelica/releases/v12.1.0/help/Buildings_Controls_OBC_CDL_Reals.html#Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter>`_
with parameter ``k = 1/k1``, one could use
a constant source
`CDL.Reals.Sources.Constant <https://simulationresearch.lbl.gov/modelica/releases/v10.0.0/help/Buildings_Controls_OBC_CDL_Reals_Sources.html#Buildings.Controls.OBC.CDL.Reals.Sources.Constant>`_
`CDL.Reals.Sources.Constant <https://simulationresearch.lbl.gov/modelica/releases/v12.1.0/help/Buildings_Controls_OBC_CDL_Reals_Sources.html#Buildings.Controls.OBC.CDL.Reals.Sources.Constant>`_
with parameter ``k=k1`` and
two instances of
`CDL.Reals.Divide <https://simulationresearch.lbl.gov/modelica/releases/v10.0.0/help/Buildings_Controls_OBC_CDL_Reals.html#Buildings.Controls.OBC.CDL.Reals.Divide>`_,
`CDL.Reals.Divide <https://simulationresearch.lbl.gov/modelica/releases/v12.1.0/help/Buildings_Controls_OBC_CDL_Reals.html#Buildings.Controls.OBC.CDL.Reals.Divide>`_,
and then connect
the output of the constant source with the inputs of the division blocks.

Expand Down Expand Up @@ -1079,6 +1079,7 @@ Connectors can also have a vendor annotation of the form
__cdl(trend(interval=Real, enable=Boolean))

The field ``interval`` must be specified and its value is the trending interval in seconds.
Set ``interval = 0`` to trend the value each time it changes.
The field ``enable`` is optional, with default value of ``true``, and
it can be used to overwrite the value used in the sequence declaration.

Expand Down Expand Up @@ -1582,10 +1583,10 @@ Thus, extension blocks can contain any declarations that are allowed in a Modeli
- implement state machines.

For example, the demand response client
`Buildings.Controls.DemandResponse.Client <https://simulationresearch.lbl.gov/modelica/releases/v10.0.0/help/Buildings_Controls_DemandResponse.html#Buildings.Controls.DemandResponse.Client>`_
`Buildings.Controls.DemandResponse.Client <https://simulationresearch.lbl.gov/modelica/releases/v12.1.0/help/Buildings_Controls_DemandResponse.html#Buildings.Controls.DemandResponse.Client>`_
would be an extension block if it were to contain the annotation ``__cdl(extensionBlock=true)``,
as would the Kalman filter that is used in the Example
`Buildings.Utilities.IO.Python_3_8.Examples.KalmanFilter <https://simulationresearch.lbl.gov/modelica/releases/v10.0.0/help/Buildings_Utilities_IO_Python_3_8_Examples.html#Buildings.Utilities.IO.Python_3_8.Examples.KalmanFilter>`_.
`Buildings.Utilities.IO.Python_3_8.Examples.KalmanFilter <https://simulationresearch.lbl.gov/modelica/releases/v12.1.0/help/Buildings_Utilities_IO_Python_3_8_Examples.html#Buildings.Utilities.IO.Python_3_8.Examples.KalmanFilter>`_.

Translation of an extension block to json must reproduce the following:

Expand Down Expand Up @@ -1850,7 +1851,7 @@ Semantic Information

The buildings industry has started to integrate different metadata languages such as
`Brick <https://brickschema.org/>`_ and `Project Haystack <https://project-haystack.org/>`_ into their
control software and technology. `ASHRAE Standard 223p <https://www.ashrae.org/about/news/2018/ashrae-s-bacnet-committee-project-haystack-and-brick-schema-collaborating-to-provide-unified-data-semantic-modeling-solution>`_
control software and technology. `ASHRAE Standard 223p <https://www.ashrae.org/news/esociety/ashrae-bacnet-committee-works-with-other-organizations-on-new-standard>`_
is another upcoming metadata language that will describe the equipment topology in buildings and also
the flow of different media. This section specifies the syntax to support these metadata
languages and include the semantic information represented using these languages in a CDL class.
Expand Down Expand Up @@ -1879,8 +1880,8 @@ All semantic information shall be included under the ``semantic`` section within

where ``<semantic information>`` is a place holder for the semantic information.

The ``semantic`` annotation declared in the class definition shall
optionally contain the ``metadataLanguageDefinition`` or the
The ``semantic`` annotation declared in the class definition shall
optionally contain the ``metadataLanguageDefinition`` or the
``naturalLanguageDefinition`` for each of the languages used.
The ``metadataLanguageDefinition`` and ``naturalLanguageDefinition``
are used to provide additional information about the different metadata
Expand Down Expand Up @@ -1971,7 +1972,7 @@ language and
can also be represented in multiple formats such as ``text/zinc``,
``text/turtle`` and ``application/ld+json``.

Semantic information in the class definition annotations shall optionally be used to
Semantic information in the class definition annotations shall optionally be used to
define class
level information about the metadata languages. These include, but are not restricted to,
namespace definitions (namespaces in ontologies provide a means to unambiguously interpret
Expand Down Expand Up @@ -2055,17 +2056,17 @@ Example:

]

``<instanceName>``: The text ``<instanceName>`` (including the ``<``
and ``>`` characters) within the metadata of an annotation containing semantic
``<instanceName>``: The text ``<instanceName>`` (including the ``<``
and ``>`` characters) within the metadata of an annotation containing semantic
information shall be replaced with the fully qualified name of the instance
that contains the semantic annotation. A fully qualified name to an instance
refers to the complete hierarchical path that specifies the instance's
location within an object structure. This qualified name shall include all
parent instances leading up to the current instance, with each level of
refers to the complete hierarchical path that specifies the instance's
location within an object structure. This qualified name shall include all
parent instances leading up to the current instance, with each level of
instantiation separated by an underscore (“_”). If an instance is nested
within multiple levels of instance definitions, the text that
replaces ``<instanceName>`` shall reflect the entire chain of instantiation.
This avoids the user having to repeat the name of the instance and
within multiple levels of instance definitions, the text that
replaces ``<instanceName>`` shall reflect the entire chain of instantiation.
This avoids the user having to repeat the name of the instance and
makes it less prone to errors and inconsistencies.

[An example of CDL semantic information for an instance in a class with
Expand Down Expand Up @@ -2104,20 +2105,20 @@ Example:
]

``<parameter>``: This syntax allows for a value of a parameter to be used
within an annotation containing semantic information where the ``parameter``
shall refer to the name of a parameter instance within the
class. The text ``<parameter>`` (including the ``<`` and ``>`` characters)
shall be replaced by the value of the parameter. The class must have an
instance of a parameter with the name specified by ``<parameter>``,
within an annotation containing semantic information where the ``parameter``
shall refer to the name of a parameter instance within the
class. The text ``<parameter>`` (including the ``<`` and ``>`` characters)
shall be replaced by the value of the parameter. The class must have an
instance of a parameter with the name specified by ``<parameter>``,
otherwise the specification is not valid.

[In the below example, if the fully qualified name of ``reaFloSup`` is
``reaFloSup``, the ``<instanceName>`` will be replaced by ``reaFloSup``.
``reaFloSup``, the ``<instanceName>`` will be replaced by ``reaFloSup``.
The location of the sensor, represented by the ``brick:hasLocation``
relationship, after replacing ``<instanceName>`` will be ``bldg:<zon>``.
relationship, after replacing ``<instanceName>`` will be ``bldg:<zon>``.
``<zon>`` refers to the value of the ``zon`` parameter within the instantiated
``reaFloSup``, which is ``east``. Hence, the completely evaluated semantic
information becomes:
``reaFloSup``, which is ``east``. Hence, the completely evaluated semantic
information becomes:

.. code-block:: modelica

Expand All @@ -2130,7 +2131,7 @@ Example:

MyCompositeBlock.MyFlowSensor reaFloSup (zon="east") "Supply Air Flow Rate"
annotation ( __cdl(semantic(
metadataLanguage="Brick 1.3 text/turtle"
metadataLanguage="Brick 1.3 text/turtle"
"bldg:<instanceName> a brick:Supply_Air_Flow_Sensor;
brick:hasLocation bldg:<zon> .")));

Expand Down
4 changes: 2 additions & 2 deletions specification/source/codeGeneration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ Finally, to import the FMU-ME in a runtime environment, various tools can be use
* Dymola (https://www.3ds.com/products-services/catia/products/dymola/)
* MapleSim (https://www.maplesoft.com/products/maplesim/)
* SimulationX (https://www.esi-group.com/products/system-simulation)
* SystemModeler (https://www.wolfram.com/system-modeler/index.html)
* SystemModeler (https://www.wolfram.com/system-modeler/)

See also https://fmi-standard.org/tools/ for other tools.

Expand Down Expand Up @@ -347,7 +347,7 @@ be replaced.

Moreover, certain transformations that do not change the
response of the block are permissible: For example, consider the
`PID controller in the CDL library <https://simulationresearch.lbl.gov/modelica/releases/v10.0.0/help/Buildings_Controls_OBC_CDL_Reals.html#Buildings.Controls.OBC.CDL.Reals.PID>`_.
`PID controller in the CDL library <https://simulationresearch.lbl.gov/modelica/releases/v12.1.0/help/Buildings_Controls_OBC_CDL_Reals.html#Buildings.Controls.OBC.CDL.Reals.PID>`_.
The implementation has a parameter
for the time constant of the integrator block.
If a control vendor requires the specification of an integrator gain rather than
Expand Down
10 changes: 5 additions & 5 deletions specification/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
# ],

# Render the next and previous page links in navbar. (Default: true)
'navbar_sidebarrel': True,
'navbar_sidebarrel': False,

# Render the current pages TOC in the navbar. (Default: true)
'navbar_pagenav': True,
Expand All @@ -174,7 +174,7 @@

# Fix navigation bar to top of page?
# Values: "true" (default) or "false"
'navbar_fixed_top': "false",
'navbar_fixed_top': "true",

# Location of link to source.
# Options are "nav" (default), "footer" or anything else to exclude.
Expand Down Expand Up @@ -340,7 +340,7 @@
\end{center}
\hrule
~\\[2mm]
Copyright (c) 2017-2023\\
Copyright (c) 2017-2025\\
The Regents of the University of California
(through Lawrence Berkeley National Laboratory),\\
subject to receipt of any required approvals from U.S. Department of Energy.\\
Expand Down Expand Up @@ -519,8 +519,8 @@
%\hypersetup{hidelinks = true} % Makefile enables this for the 2 page printout

% Set format of table of content. Otherwise, the titles stick to the page numbers in some cases
\usepackage[tocgraduated]{tocstyle}
\usetocstyle{nopagecolumn}
%\usepackage[tocgraduated]{tocstyle}
%\usetocstyle{nopagecolumn}
\usepackage{pdfpages}

\usepackage{tikz}
Expand Down
4 changes: 2 additions & 2 deletions specification/source/example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ with their minimum and maximum values denoted by ``Min`` and ``Max``.
.. figure:: img/case_study1/SystemRequests.*

Composite block that implements the sequence for the VAV terminal units that output the system requests.
(`Browsable version <https://simulationresearch.lbl.gov/modelica/releases/v5.0.0/help/Buildings_Controls_OBC_ASHRAE_G36_TerminalUnits_Reheat.html#Buildings.Controls.OBC.ASHRAE.G36_PR1.TerminalUnits.Reheat.SystemRequests>`_.)
(`Browsable version <https://simulationresearch.lbl.gov/modelica/releases/v5.0.0/help/Buildings_Controls_OBC_ASHRAE_G36_PR1_TerminalUnits_Reheat.html#Buildings.Controls.OBC.ASHRAE.G36_PR1.TerminalUnits.Reheat.SystemRequests>`_.)


.. _fig_dam_val_reh:
Expand Down Expand Up @@ -708,7 +708,7 @@ implementations of the sequences published in Guideline 36.
Such implementations would encapsulate the complexity and provide
assurances that energy modeler and control providers have correct implementations.
With the implementation in
the Modelica package
the Modelica package
`Buildings.Controls.OBC.ASHRAE.G36 <https://simulationresearch.lbl.gov/modelica/releases/v10.0.0/help/Buildings_Controls_OBC_ASHRAE_G36.html#Buildings.Controls.OBC.ASHRAE.G36>`_,
we made
such an implementation and laid out the structure and conventions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ <h2>CustomPWithLimiter<a name="CustomPWithLimiter"></a></h2>
<p>Custom implementation of a P controller with variable output limiter</p>

<h3>Functionality</h3>

<p>
Block that outputs <code>y = min(yMax, k*e)</code>,
where
Expand Down Expand Up @@ -169,7 +169,7 @@ <h3>Blocks</h3>
<tr>
<td class="type">
<code>
<a href="http:&#x2F;&#x2F;simulationresearch.lbl.gov&#x2F;modelica&#x2F;releases&#x2F;v10.0.0&#x2F;help&#x2F;CDL_Interfaces.html#CDL.Interfaces.RealInput">CDL.Interfaces.RealInput</a>
<a href="http:&#x2F;&#x2F;simulationresearch.lbl.gov&#x2F;modelica&#x2F;releases&#x2F;v12.1.0&#x2F;help&#x2F;CDL_Interfaces.html#CDL.Interfaces.RealInput">CDL.Interfaces.RealInput</a>
</code>
</td>
<td>
Expand All @@ -184,7 +184,7 @@ <h3>Blocks</h3>
<tr>
<td class="type">
<code>
<a href="http:&#x2F;&#x2F;simulationresearch.lbl.gov&#x2F;modelica&#x2F;releases&#x2F;v10.0.0&#x2F;help&#x2F;CDL_Interfaces.html#CDL.Interfaces.RealInput">CDL.Interfaces.RealInput</a>
<a href="http:&#x2F;&#x2F;simulationresearch.lbl.gov&#x2F;modelica&#x2F;releases&#x2F;v12.1.0&#x2F;help&#x2F;CDL_Interfaces.html#CDL.Interfaces.RealInput">CDL.Interfaces.RealInput</a>
</code>
</td>
<td>
Expand All @@ -199,7 +199,7 @@ <h3>Blocks</h3>
<tr>
<td class="type">
<code>
<a href="http:&#x2F;&#x2F;simulationresearch.lbl.gov&#x2F;modelica&#x2F;releases&#x2F;v10.0.0&#x2F;help&#x2F;CDL_Interfaces.html#CDL.Interfaces.RealOutput">CDL.Interfaces.RealOutput</a>
<a href="http:&#x2F;&#x2F;simulationresearch.lbl.gov&#x2F;modelica&#x2F;releases&#x2F;v12.1.0&#x2F;help&#x2F;CDL_Interfaces.html#CDL.Interfaces.RealOutput">CDL.Interfaces.RealOutput</a>
</code>
</td>
<td>
Expand All @@ -214,7 +214,7 @@ <h3>Blocks</h3>
<tr>
<td class="type">
<code>
<a href="http:&#x2F;&#x2F;simulationresearch.lbl.gov&#x2F;modelica&#x2F;releases&#x2F;v10.0.0&#x2F;help&#x2F;CDL_Reals.html#CDL.Reals.MultiplyByParameter">CDL.Reals.MultiplyByParameter</a>
<a href="http:&#x2F;&#x2F;simulationresearch.lbl.gov&#x2F;modelica&#x2F;releases&#x2F;v12.1.0&#x2F;help&#x2F;CDL_Reals.html#CDL.Reals.MultiplyByParameter">CDL.Reals.MultiplyByParameter</a>
</code>
</td>
<td>
Expand All @@ -236,7 +236,7 @@ <h3>Blocks</h3>
<tr>
<td class="type">
<code>
<a href="http:&#x2F;&#x2F;simulationresearch.lbl.gov&#x2F;modelica&#x2F;releases&#x2F;v10.0.0&#x2F;help&#x2F;CDL_Reals.html#CDL.Reals.Min">CDL.Reals.Min</a>
<a href="http:&#x2F;&#x2F;simulationresearch.lbl.gov&#x2F;modelica&#x2F;releases&#x2F;v12.1.0&#x2F;help&#x2F;CDL_Reals.html#CDL.Reals.Min">CDL.Reals.Min</a>
</code>
</td>
<td>
Expand Down
4 changes: 2 additions & 2 deletions specification/source/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ @Article{WetterZuoNouiduiPang2014
number = {4},
pages = {253--270},
year = {2014},
doi = {DOI:10.1080/19401493.2013.765506}
url = {https://simulationresearch.lbl.gov/wetter/download/LBNL-1002944.pdf}
}


Expand Down Expand Up @@ -168,6 +168,6 @@ @inproceedings{KoehlerEtAl2016:1
Organization = {Modelica Association},
Pages = {35--42},
Title = {{Modelica-Association - Project "System Structure and Parameterization" - Early Insights}},
doi = {DOI:10.3384/ecp1612435},
doi = {10.3384/ecp1612435},
Url = {http://dx.doi.org/10.3384/ecp1612435},
Year = {2016}}
Loading