25.07.2014 Views

pdf download - Software and Computer Technology - TU Delft

pdf download - Software and Computer Technology - TU Delft

pdf download - Software and Computer Technology - TU Delft

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Lydia Models<br />

C.2 Model of the Power Supply Example<br />

/ / ” Automated F a u l t D i a g n o s i s a t PMS” / /<br />

/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /<br />

/ / D e f i n i t i o n Cable<br />

system Cable<br />

(<br />

bool p ,<br />

bool q<br />

) {<br />

/ / d e c l a r a t i o n h e a l t h v a r i a b l e<br />

bool h ;<br />

a t t r i b u t e h e a l t h ( h ) = t r u e ;<br />

a t t r i b u t e p r o b a b i l i t y ( h ) = h ? 0 . 9 2 : 0 . 0 8 ;<br />

}<br />

/ / d e f i n i t i o n b e h a v i o r<br />

h => ( q = p ) ;<br />

/ / D e f i n i t i o n Fuse<br />

system Fuse<br />

(<br />

bool p ,<br />

bool q<br />

) {<br />

/ / d e c l a r a t i o n h e a l t h v a r i a b l e<br />

bool h ;<br />

a t t r i b u t e h e a l t h ( h ) = t r u e ;<br />

a t t r i b u t e p r o b a b i l i t y ( h ) = h ? 0 . 9 0 : 0 . 1 0 ;<br />

}<br />

/ / d e f i n i t i o n b e h a v i o r<br />

h => ( q = p ) ;<br />

/ / D e f i n i t i o n Low V o l t a g e Power Supply<br />

system L o w v o l t a g e p o w e r s u p p l y<br />

(<br />

bool i n p u t ,<br />

bool out1 , out2<br />

) {<br />

/ / d e c l a r a t i o n h e a l t h v a r i a b l e<br />

bool h ;<br />

a t t r i b u t e h e a l t h ( h ) = t r u e ;<br />

a t t r i b u t e p r o b a b i l i t y ( h ) = h ? 0 . 9 6 : 0 . 0 4 ;<br />

}<br />

/ / d e f i n i t i o n b e h a v i o r<br />

h => ( ( out1 = i n p u t ) <strong>and</strong> ( o ut2 = i n p u t ) ) ;<br />

95

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!