pdf download - Software and Computer Technology - TU Delft
pdf download - Software and Computer Technology - TU Delft
pdf download - Software and Computer Technology - TU Delft
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
C.2 Model of the Power Supply Example Lydia Models<br />
/ / D e f i n i t i o n Power D i s t r i b u t i o n U nit<br />
system PDU<br />
(<br />
bool s t a r t u p ,<br />
bool out1 , out2 , o ut3<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 5 : 0 . 0 5 ;<br />
}<br />
h => ( ( out1 = s t a r t u p ) <strong>and</strong> ( o ut2 = s t a r t u p ) <strong>and</strong> ( o ut3<br />
= s t a r t u p ) ) ;<br />
/ / D e f i n i t i o n of one of a u n i t t h a t need v o l t a g e<br />
/ / ( e . g . , c o l l i m a t o r , c h i l l e r )<br />
system Unit<br />
(<br />
bool i n p u t ,<br />
bool on<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 9 : 0 . 0 1 ;<br />
}<br />
/ / d e f i n i t i o n b e h a v i o r<br />
h => ( on = i n p u t ) ;<br />
/ / D e f i n i t i o n power s u p p l y example system<br />
system Power Supply<br />
(<br />
bool s t a r t u p , / / i n p u t<br />
bool s t a t u s F D , status TBCB , status CRCB , / / o u t p u t s<br />
bool status COL , s t a t u s c h i l l e r / / o u t p u t s<br />
) {<br />
/ / d e c l a r a t i o n i n t e r m e d i a t e v a r i a b l e s<br />
bool c a b l e A i n , c a b l e A o u t ;<br />
bool c a b l e B i n , c a b l e B o u t ;<br />
bool c a b l e C i n , c a b l e C o u t ;<br />
bool f u s e A i n , f u s e A o u t ;<br />
bool f u s e B i n , f u s e B o u t ;<br />
bool f u s e C i n , f u s e C o u t ;<br />
bool f u s e D i n , f u s e D o u t ;<br />
96