Skip to content

Commit

Permalink
Merge pull request lbl-srg#70 from lbl-srg/issue65_cdl_spec_tran_fina…
Browse files Browse the repository at this point in the history
…lIgnored

Issue65 cdl spec tran final ignored
  • Loading branch information
mwetter authored Jan 8, 2020
2 parents 9d97e42 + f1375b4 commit 26205e5
Show file tree
Hide file tree
Showing 9 changed files with 389 additions and 822 deletions.
35 changes: 20 additions & 15 deletions specification/source/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,30 @@ a:link, a:hover, a:visited, a:focus{
}

td{
padding-inline-start: 15px;
padding: 0px !important;;
padding-left: 10px !important;
}

td.label{
color: #022e4d;
}

code, pre{
border: 0;
color: #750000;
table.citation > thead > tr > th, .table.citation > tbody > tr > th, .table.citation > tfoot > tr > th, .table.citation > thead > tr > td, .table.citation > tbody > tr > td, .table.citation > tfoot > tr > td{
border: none;
}

#references.section{
color: #022e4d;
}

.caption-text, .caption-number{
color: #022e4d;
font-style:italic;
}

code, pre{
border: 0;
color: #750000;
}

#markdown-toc{
Expand All @@ -127,17 +143,6 @@ color: #750000;
background-color: #f0f0f0;
}


td.label{
color: #022e4d;
}
table.citation > thead > tr > th, .table.citation > tbody > tr > th, .table.citation > tfoot > tr > th, .table.citation > thead > tr > td, .table.citation > tbody > tr > td, .table.citation > tfoot > tr > td{
border: none;
}
#references.section{
color: #022e4d;
}

h1{
font-size: 2em;
}
Expand Down
392 changes: 346 additions & 46 deletions specification/source/cdl.rst

Large diffs are not rendered by default.

16 changes: 5 additions & 11 deletions specification/source/codeGeneration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -480,16 +480,10 @@ use a global variable or virtual points.
Calculations in Parameter Assignments
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CDL allows calculations in the assignment statements of ``parameters``,
see :numref:`sec_ass_val_to_ins`.
CDL allows calculations in the assignment statements of ``parameters``.
If a building automation system does not support such calculations,
then the translator should extract the assignments as a separate operational
then the translator can optionally configured to evaluate such
calculations during the translation.
should extract the assignments as a separate operational
block and feed its outputs to the parameters of the block.
:numref:`fig_exp_par_prop` shows an illustrative example.

.. _fig_exp_par_prop:

.. figure:: img/codeGeneration/ParameterPropagation/ParameterAssignment.*
:width: 700px

Example of translating sequences with calculations for parameter assignment.
See :numref:`sec_par_eva_tra` for details.
19 changes: 16 additions & 3 deletions specification/source/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,14 @@ the Open Building Controls project.
pertaining to the building.

CDL
See :term:`Controls Description Language`.
See :term:`Control Description Language`.

Controls Description Language
CDL-JSON
The JSON representation of the :term:`Control Description Language`,
which can be generated with the ``modelica-json`` translator that
is available at https://github.com/lbl-srg/modelica-json.

Control Description Language
The Control Description Language (CDL) is the language
that is used to express control sequences and requirements.
It is a declarative language based on a subset of the
Expand All @@ -45,7 +50,7 @@ the Open Building Controls project.
* test the control sequences and the requirements with a model
of the HVAC system and the building in the loop, and
* export the control sequence and the verification test
in the :term:`Controls Description Language`.
in the :term:`Control Description Language`.

Control Sequence Requirement
A requirement is a condition that is tested and either passes, fails,
Expand Down Expand Up @@ -151,6 +156,14 @@ the Open Building Controls project.
has a state event when :math:`x=1`.

Structural parameter
We say that a parameter is a *structural parameter* if changing its value can change
the system of equations that is being evaluated in the control logic.
For example, a parameter that changes a controller from a P to a PI controller is a
structural parameter because an integrator is being added.
A parameter that enables an input or that changes the size of an array is a structural
parameter.

Time event
We say that a simulation has a time event if its model changes based on a test
that only depends on time. For example,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
block Controller "Controller with time sampling"
...
parameter Modelica.SIunits.Time samplePeriod=120
parameter Real samplePeriod(quantity="Time", unit="s")=120
"Sample period of component";
...
OBC.ASHRAE.G36_PR1.AHUs.MultiZone.VAV.SetPoints.SupplyFan
Expand Down
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 26205e5

Please sign in to comment.