next up previous
Next: Glossary Up: User Manual: Building Simulator Previous: Accessing Simulation Objects

Subsections

   
Examples

The following examples are all taken from the simulation of the same building, but the examples are neither complete descriptions of the simulation objects and sensors/actuators, nor does the filestream input match the output.

   
Configuration File

[ objects, "team3_install1" ].
[ aggregates, "team3_install1" ].

[ simclock, "SimTime" ].

%%% clouding
[ file_shell, clouding, "clouding" ].

%%% input is from testcaseNset.str
%%% monitoring commands are from testcaseNget.str
%%% monitoring is to file and shell
%%% output is to testcaseN.prt

[ file_shell, testin, "testcase7set"].
[ file_shell, testout, "testcase7get"].
[ file_file, testfile, "testcase7get", "testcase7"].

[ controlstream, window, {168,00,00,00}, [fixed, cont, 1], []  ].

%%% for controlsystem
[socket, localnode, localhost,
 [ {sock_cs, 3000, [cache] } ,{sock_fault, 2999, [fault]} ],
 ["controlsystem"]
].

%%% for a user to test controlsystem
[socket, localnode, localhost,
 [ {sock_user, 3002, [nocache] } ],
 ["usersensor", "useractuator"]
].

%%% for developers
[socket, localnode, localhost, [ {sock_inspect, 3004, [inspect] } ], [] ].

   
Simulation Objects

[ location_time, -0.1356, 0.8631, -0.2618, 3600, 36000 ].
%%%         initial day of year (jun 21)
[ calendar, 172 ].
[ sun_position, 80, 0.4090 ].              

[ weather, 15 ].              
[ outdoor_brightness, 120000 ].

[ kernel, kernel ].

[ occupied_area, playground ].
[ person, person_0, playground ].
[ person, person_1, playground ].

[ occupied_area, occ_staircase_east ].
[ supervised_area, sup_staircase_east, occ_staircase_east ].

   
Sensors/Actuators

[ sensor, localtime, {location_time, local_time}, 's[d]', analog ].
[ sensor, truetime,  {location_time, true_time}, 's[d]', analog ].
[ actuator, cloudiness, {weather, cloudiness}, float, percentfloat ].
[ sensor, kernelfactor, {kernel, factor}, intnonneg, analog ].
[ actuator, person_0_loc, {person_0, location}, name, string ].
[ actuator, person_0_acc, {person_0, active}, 'active//inactive', twopoint ].

   
Filestream Input

Note that the name of an occupied_area given as new value must be a string, not an ERLANG-atom.

 
s:io( now, light_32_416_wall, performance_rate, get).
s:io( now, light_32_416_wall, performance_rate, mon).

s:io( now, light_32_416_window, performance_rate, get).
s:io( now, light_32_416_window, performance_rate, mon).

s:io( 240, person_4, location, {"occ_staircase_east", object}).
s:io( 241, door_32_4_1, aperture_state, {opened, 'opened//closed'}).
s:io( 242, person_4, location, {"occ_hallway_H1_1", object}).
s:io( 243, person_4, location, {"occ_hallway_H1_2", object}).
s:io( 244, person_4, location, {"occ_hallway_H1_3", object}).

s:io_period( 300, person_6, location, {"occ_room_32_429", object}, 610).

s:io_period( 360, person_6, location, {"occ_hallway_H1_4", object}, 610).

s:io_period( 2630, person_6, location, {"occ_room_32_429", object}, no_longer).
s:io_period( 2630, person_6, location, {"occ_hallway_H1_4", object}, no_longer).

Filestream Output

io({0,5,20,0}, la_32_416_wall, current_brightness, {173.878,lux}).
io({0,6,0,0}, light_32_416_window, performance_rate, {50.0000,'%'}).
io({0,6,0,0}, la_32_416_desk, current_brightness, {220.000,lux}).
io({0,6,0,0}, la_32_416_window, current_brightness, {231.837,lux}).



deiss@informatik.uni-kl.de