function [ZVe,NVe,Q,IN,OU,MT,NV,BRF]=struc999(SOR,OU,P1,P2)
%         [ZVe,NVe,Q,IN,OU,MT,NV,BRF]=struc999(SOR,OU,P1,P2)
%STRUC999 form file for structure definition applied in bod_es.m,
%         for explanation of definitions see: struc000.m
%APPLICATION:
%          - copy this file and replace "999" in name as well as file internal
%            by any three-digit number - not used in example collection already;
%          - define respective plant and control structure inside places
%            marked with: %******
%          - delete rows 3 till 12 of this copy and replace by short description
%            of the structure in consideration
%          - use new file name as an argument for calling bod_es.m

%AUXILIARY FILE for symbolical definition - no stand-alone calling !!!
%	  SOR:   switch - to shift between plant or control structure
%	  OU:    vector using continuous output numbers for discretized plant state
%            description
%     P1,P2: posibility of any parameter transfer via bod_es.m

% KEY WORDS: Digital Magnitude Optimum, symbolical plant and control structure
%            definition, application basis for: bod_es. / bod_esg.m / bod_esp.m

% Copyright (c) 2011-2023 Dr. Gert-Helge Geitner, TU Dresden,
%                     https://wwwpub.zih.tu-dresden.de/~geitner/ae_1_0e.htm
% Digital Magnitude Optimum reference: Geitner, G.-H.:
%                    Entwurf digitaler Regler für elektrische Antriebe.
%                    VDE-Verlag GmbH Berlin und Offenbach 1996
%                    ISBN 3-8007-1847-2

if SOR==0  %plant structure definition

% ****** beginning ******
  sz1=';';           sn1=';';
   .                  .
   .                  .
  szx=';';           snx=';';
   Q=[];
  IN=[];             OU=[];
  MT=[];
  NV=['; '];
% ****** ending ******

s=0; zae=0; ZVe=[]; NVe=[]; BRF=0;
while s==0 zae=zae+1;  eval(['ZVe=[ZVe sz' num2str(zae) '];'],'s=1;');
                       eval(['NVe=[NVe sn' num2str(zae) '];'],'s=1;'); end

else  %control structure definition

% ****** beginning ******
  rzy=';';           rny=';';
   .                  .
   .                  .
  rzz=';';           rnz=';';
   QQ=[];
  BME=[];
  BMA=[];
  BM=[0];
  BRF=[];
  NV=['; '];
% ****** ending ******

s=0; zae=length(OU); ZVe=[]; NVe=[];
while s==0 zae=zae+1;  eval(['ZVe=[ZVe rz' num2str(zae) '];'],'s=1;');
                       eval(['NVe=[NVe rn' num2str(zae) '];'],'s=1;'); end
Q=QQ;IN=BME;OU=BMA;MT=BM;
end

