// ************************************************************************** // // eses eses // eses eses // eses eseses esesese eses Embedded Systems Group // ese ese ese ese ese // ese eseseses eseseses ese Department of Computer Science // eses eses ese eses // eses eseses eseseses eses University of Kaiserslautern // eses eses // // ************************************************************************** // In the third implementation of the water module a non-constant drift of the // water is defined by using sinus and cosinus functions. Although this water // movement is far from realistic, it nevertheless represents a kind of random // behavior for the motor, as direction and length of the drift vector changes // constantly. // // // The example has been taken from the following reference: // @phdthesis{Baue12, // key ={Baue12}, // author ={K. Bauer}, // title ={A New Modelling Language for Cyber-physical Systems}, // address ={Kaiserslautern, Germany}, // editor ={K. Schneider and R. Majumdar}, // month ={January}, // school ={Department of Computer Science, University of Kaiserslautern, Germany}, // year ={2012}, // note ={PhD}, // remark ={rsg} // } // ****************************************************************************** module Water3( hybrid real ?boatX, ?boatY, hybrid real !waterX, !waterY ) { waterX = 0.0; waterY = 0.0; flow{ drv(waterX) <− sin(cont(time) + 2.0); drv(waterX) <− 1.5∗cos(cont(time)∗4.0); } until (false); }