HYBRID ATOMIC PDEVS am_bball

stored in DEVS_PATH/01-atomic-modelbase/bouncing_ball/am_bball.m

Contents

Description

Class definition file for an hybrid atomic PDEVS model that implements a simple bouncing ball that can be initiated by a discrete event

constructor call: obj = am_bball(name,inistates,c_inistates,elapsed,attenuation)

Superclass

hybridatomic (superclass acts as associated hybrid simulator)

Class Methods

characteristic functions:

display functions:

Inherited Properties

inherited from atomic:

inherited from hybridatomic:

Ports

has one input x: in1 for receiving 'start'-event and then start bouncing

has one output y: out1 for propagating hits

Note: continuous couplings need no ports. They are managed via continuous variables' indices.

States

discrete in s:

s.sigma: for time advance

s.active: 0 or 1, 1 if ball is currently bouncing

s.bounce_start: time of bounce begin

s.bounce_end: time of bounce end

continuous:

c_states = [height;velocity]

Hybrid Characteristics

mealy = 0: model is of Moore type (needs no inputs to calculate outputs)

output_length = 1: the function lamda_c returns 1 element (current height)

state events:

System Parameters in sysparams

sysparams.attenuation : attenuation/damping parameter 0.5 - 0.9

More

global SIMUSTOP : can be used to stop allover simulation





DEVS Tbx Home      Examples      Modelbase           << Back