Overview
Comment: | Put under RCS |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
d55e37d17234fd61141743fe90f2d0f6 |
User & Date: | gawthrop@users.sourceforge.net on 2000-12-28 11:43:16 |
Other Links: | branch diff | manifest | tags |
Context
2000-12-28
| ||
11:46:33 | *** empty log message *** check-in: 40e6c207b1 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
11:43:16 | Put under RCS check-in: d55e37d172 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
10:41:34 | Put under RCS check-in: 9de8b4080d user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Added mttroot/mtt/lib/comp/simple/PS_cause.m version [c1061e4855].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | function [bonds,status] = PS_cause(bonds); % Causality for PS component %SUMMARY PS: Power sensor %DESCRIPTION Port[in]: Inflowing bond %DESCRIPTION Port[out]: Outflowing bond e_2=e_1; f_2=f_1. %DESCRIPTION Port[power]: f = power = e_1*f_1 = e_2*f_2 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% Version control history % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %% $Id$ % %% $Log$ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Copyright (c) P.J. Gawthrop, 1997. status = -1; % Check that there are exactly three bonds. if check_bonds(bonds,3,'PS')==0 return end % Do the [in] and [out] ports -- like a TF inout_bonds = bonds(1:2,:); [inout_bonds,inout_status] = TF_cause(inout_bonds); % Do the power port -- must have flow out and effort in power_bonds = bonds(3,:); for i = 1:2 if (power_bonds(i)==1) power_status = 0; elseif (power_bonds(i)==0) power_bonds(i)==1; power_status = 0; else power_status = 1; end; end; % Reconstruct the bonds bonds = [inout_bonds; power_bonds]; % Generate an overall status if (inout_status==1)|(power_status==1) status = 1; elseif (inout_status==-1)|(power_status==-1) status=-1; else status = 0; end; |