.Buildings.Utilities.IO.BCVTB.BCVTB

Information

Block that exchanges data with the Building Controls Virtual Test Bed (BCVTB).

At the start of the simulation, this block establishes a socket connection using the Berkeley Software Distribution socket (BSD socket). At each sampling interval, data are exchanged between Modelica and the BCVTB. When Dymola terminates, a signal is sent to the BCVTB so that it can terminate gracefully.

For each element in the input vector uR[nDblWri], the value of the flag flaDblWri[nDblWri] determines whether the current value, the average over the sampling interval or the integral over the sampling interval is sent to the BCVTB. The following three options are allowed:
flaDblWri[i] Value sent to the BCVTB
0 Current value of uR[i]
1 Average value of uR[i] over the sampling interval
2 Integral of uR[i] over the sampling interval

For the first call to the BCVTB interface, the value of the parameter uStart[nDblWri] will be used instead of uR[nDblWri]. This avoids an algebraic loop when determining the initial conditions. If uR[nDblWri] were to be used, then computing the initial conditions may require an iterative solution in which the function exchangeWithSocket may be called multiple times. Unfortunately, it does not seem possible to use a parameter that would give a user the option to either select uR[i] or uStart[i] in the first data exchange. The reason is that the symbolic solver does not evaluate the test that picks uR[i] or uStart[i], and hence there would be an algebraic loop.

If the parameter activateInterface is set to false, then no data is exchanged with the BCVTB. The output of this block is then equal to the value of the parameter yRFixed[nDblRea]. This option can be helpful during debugging. Since during model translation, the functions are still linked to the C library, the header files and libraries need to be present in the current working directory even if activateInterface=false.

Revisions


Generated at 2024-04-28T18:16:21Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos