Model {
  Name			  "CD1_CityDrain_Library"
  Version		  5.0
  SaveDefaultBlockParams  on
  SampleTimeColors	  off
  LibraryLinkDisplay	  "none"
  WideLines		  off
  ShowLineDimensions	  off
  ShowPortDataTypes	  off
  ShowLoopsOnError	  on
  IgnoreBidirectionalLines off
  ShowStorageClass	  on
  ExecutionOrder	  off
  RecordCoverage	  off
  CovPath		  "/"
  CovSaveName		  "covdata"
  CovMetricSettings	  "dw"
  CovNameIncrementing	  off
  CovHtmlReporting	  on
  covSaveCumulativeToWorkspaceVar on
  CovSaveSingleToWorkspaceVar on
  CovCumulativeVarName	  "covCumulativeData"
  CovCumulativeReport	  off
  DataTypeOverride	  "UseLocalSettings"
  MinMaxOverflowLogging	  "UseLocalSettings"
  MinMaxOverflowArchiveMode "Overwrite"
  BlockNameDataTip	  off
  BlockParametersDataTip  off
  BlockDescriptionStringDataTip	off
  ToolBar		  on
  StatusBar		  on
  BrowserShowLibraryLinks off
  BrowserLookUnderMasks	  on
  Created		  "Tue Mar 09 11:34:14 2004"
  UpdateHistory		  "UpdateHistoryNever"
  ModifiedByFormat	  "%<Auto>"
  LastModifiedBy	  "c81523"
  ModifiedDateFormat	  "%<Auto>"
  LastModifiedDate	  "Tue Jun 14 14:05:46 2005"
  ModelVersionFormat	  "1.%<AutoIncrement:244>"
  ConfigurationManager	  "None"
  SimParamPage		  "Solver"
  LinearizationMsg	  "none"
  Profile		  off
  ParamWorkspaceSource	  "MATLABWorkspace"
  AccelSystemTargetFile	  "accel.tlc"
  AccelTemplateMakefile	  "accel_default_tmf"
  AccelMakeCommand	  "make_rtw"
  TryForcingSFcnDF	  off
  ExtModeMexFile	  "ext_comm"
  ExtModeBatchMode	  off
  ExtModeTrigType	  "manual"
  ExtModeTrigMode	  "normal"
  ExtModeTrigPort	  "1"
  ExtModeTrigElement	  "any"
  ExtModeTrigDuration	  1000
  ExtModeTrigHoldOff	  0
  ExtModeTrigDelay	  0
  ExtModeTrigDirection	  "rising"
  ExtModeTrigLevel	  0
  ExtModeArchiveMode	  "off"
  ExtModeAutoIncOneShot	  off
  ExtModeIncDirWhenArm	  off
  ExtModeAddSuffixToVar	  off
  ExtModeWriteAllDataToWs off
  ExtModeArmWhenConnect	  on
  ExtModeSkipDownloadWhenConnect off
  ExtModeLogAll		  on
  ExtModeAutoUpdateStatusClock on
  BufferReuse		  on
  RTWExpressionDepthLimit 5
  SimulationMode	  "normal"
  Solver		  "FixedStepDiscrete"
  SolverMode		  "Auto"
  StartTime		  "0"
  StopTime		  "36000"
  MaxOrder		  5
  MaxStep		  "auto"
  MinStep		  "auto"
  MaxNumMinSteps	  "-1"
  InitialStep		  "auto"
  FixedStep		  "300"
  RelTol		  "1e-3"
  AbsTol		  "auto"
  OutputOption		  "RefineOutputTimes"
  OutputTimes		  "[]"
  Refine		  "1"
  LoadExternalInput	  off
  ExternalInput		  "[t, u]"
  LoadInitialState	  off
  InitialState		  "xInitial"
  SaveTime		  on
  TimeSaveName		  "cd_time"
  SaveState		  off
  StateSaveName		  "xout"
  SaveOutput		  on
  OutputSaveName	  "yout"
  SaveFinalState	  off
  FinalStateName	  "xFinal"
  SaveFormat		  "Array"
  Decimation		  "1"
  LimitDataPoints	  off
  MaxDataPoints		  "1000"
  SignalLoggingName	  "sigsOut"
  ConsistencyChecking	  "none"
  ArrayBoundsChecking	  "none"
  AlgebraicLoopMsg	  "warning"
  BlockPriorityViolationMsg "warning"
  MinStepSizeMsg	  "warning"
  InheritedTsInSrcMsg	  "warning"
  DiscreteInheritContinuousMsg "warning"
  MultiTaskRateTransMsg	  "error"
  SingleTaskRateTransMsg  "none"
  CheckForMatrixSingularity "none"
  IntegerOverflowMsg	  "warning"
  Int32ToFloatConvMsg	  "warning"
  ParameterDowncastMsg	  "error"
  ParameterOverflowMsg	  "error"
  ParameterPrecisionLossMsg "warning"
  UnderSpecifiedDataTypeMsg "none"
  UnnecessaryDatatypeConvMsg "none"
  VectorMatrixConversionMsg "none"
  InvalidFcnCallConnMsg	  "error"
  SignalLabelMismatchMsg  "none"
  UnconnectedInputMsg	  "warning"
  UnconnectedOutputMsg	  "warning"
  UnconnectedLineMsg	  "warning"
  SfunCompatibilityCheckMsg "none"
  RTWInlineParameters	  off
  BlockReductionOpt	  on
  BooleanDataType	  on
  ConditionallyExecuteInputs on
  ParameterPooling	  on
  OptimizeBlockIOStorage  on
  ZeroCross		  on
  AssertionControl	  "UseLocalSettings"
  ProdHWDeviceType	  "Microprocessor"
  ProdHWWordLengths	  "8,16,32,32"
  RTWSystemTargetFile	  "grt.tlc"
  RTWTemplateMakefile	  "grt_default_tmf"
  RTWMakeCommand	  "make_rtw"
  RTWGenerateCodeOnly	  off
  RTWRetainRTWFile	  off
  TLCProfiler		  off
  TLCDebug		  off
  TLCCoverage		  off
  TLCAssertion		  off
  BlockDefaults {
    Orientation		    "right"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    NamePlacement	    "normal"
    FontName		    "Helvetica"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
    ShowName		    on
  }
  BlockParameterDefaults {
    Block {
      BlockType		      Constant
      Value		      "1"
      VectorParams1D	      on
      ShowAdditionalParam     off
      OutDataTypeMode	      "Inherit from 'Constant value'"
      OutDataType	      "sfix(16)"
      ConRadixGroup	      "Use specified scaling"
      OutScaling	      "2^0"
    }
    Block {
      BlockType		      Demux
      Outputs		      "4"
      DisplayOption	      "none"
      BusSelectionMode	      off
    }
    Block {
      BlockType		      Inport
      Port		      "1"
      PortDimensions	      "-1"
      SampleTime	      "-1"
      ShowAdditionalParam     off
      LatchInput	      off
      DataType		      "auto"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      SignalType	      "auto"
      SamplingMode	      "auto"
      Interpolate	      on
    }
    Block {
      BlockType		      Mux
      Inputs		      "4"
      DisplayOption	      "none"
    }
    Block {
      BlockType		      Outport
      Port		      "1"
      OutputWhenDisabled      "held"
      InitialOutput	      "[]"
    }
    Block {
      BlockType		      Selector
      InputType		      "Vector"
      ElementSrc	      "Internal"
      Elements		      "1"
      RowSrc		      "Internal"
      Rows		      "1"
      ColumnSrc		      "Internal"
      Columns		      "1"
      InputPortWidth	      "-1"
    }
    Block {
      BlockType		      "S-Function"
      FunctionName	      "system"
      PortCounts	      "[]"
      SFunctionModules	      "''"
    }
    Block {
      BlockType		      SubSystem
      ShowPortLabels	      on
      Permissions	      "ReadWrite"
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      SimViewingDevice	      off
      DataTypeOverride	      "UseLocalSettings"
      MinMaxOverflowLogging   "UseLocalSettings"
    }
    Block {
      BlockType		      Terminator
    }
    Block {
      BlockType		      ToFile
      Filename		      "untitled.mat"
      MatrixName	      "ans"
      Decimation	      "1"
      SampleTime	      "-1"
    }
    Block {
      BlockType		      ToWorkspace
      VariableName	      "simulink_output"
      MaxDataPoints	      "1000"
      Decimation	      "1"
      SampleTime	      "0"
    }
  }
  AnnotationDefaults {
    HorizontalAlignment	    "center"
    VerticalAlignment	    "middle"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    FontName		    "Helvetica"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
  }
  LineDefaults {
    FontName		    "Helvetica"
    FontSize		    9
    FontWeight		    "normal"
    FontAngle		    "normal"
  }
  System {
    Name		    "CD1_CityDrain_Library"
    Location		    [60, 80, 1039, 827]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    200
    ScreenColor		    "white"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "usletter"
    PaperUnits		    "inches"
    ZoomFactor		    "100"
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      SubSystem
      Name		      " "
      Ports		      [1, 2]
      Position		      [725, 362, 805, 413]
      BackgroundColor	      "[0.752941, 0.752941, 0.752941]"
      TreatAsAtomicUnit	      off
      MaskType		      "Splitter"
      MaskDescription	      "Splitter parameter."
      MaskHelp		      "Splits stream in 2 streams. Split by percent or"
" by value."
      MaskPromptString	      "Number of components|Fraction / Amount directed"
" to Q1|Splitting mode"
      MaskStyleString	      "edit,edit,popup(Fraction [0-1]|Percent [0-100]|"
"m³/s)"
      MaskTunableValueString  "on,on,on"
      MaskCallbackString      "||"
      MaskEnableString	      "on,on,on"
      MaskVisibilityString    "on,on,on"
      MaskToolTipString	      "on,on,on"
      MaskVarAliasString      ",,"
      MaskVariables	      "n_comp=@1;values=@2;mode=@3;"
      MaskInitialization      "% reading the toplevel systems' name \n% --> Pl"
"ant file name;\ntls=bdroot(gcb); \n% Obtaining the fixed sampling time\nt_sam"
"p_char=get_param(tls, 'FixedStep');\n% Convertion to numeric value\ntstep = s"
"tr2num(t_samp_char); "
      MaskDisplay	      "plot(0,0,100,100);\n\nplot([30,50],[50,50]);\np"
"lot([50,70],[50,70]);\nplot([50,70],[50,30]);\n\ntext(50,10,'SPLITTER','Horiz"
"ontalAlignment','center');\nport_label('input',1,'Qi');\nport_label('output',"
"1,'Q1');\nport_label('output',2,'Q2');\n"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "1|40|Percent [0-100]"
      System {
	Name			" "
	Location		[175, 276, 731, 562]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  " 1"
	  Position		  [25, 38, 55, 52]
	  ShowName		  off
	  Port {
	    PortNumber		    1
	    Name		    "inpt"
	    TestPoint		    off
	    LinearAnalysisOutput    off
	    LinearAnalysisInput	    off
	    RTWStorageClass	    "Auto"
	    DataLogging		    off
	    DataLoggingNameMode	    "SignalName"
	    DataLoggingDecimateData off
	    DataLoggingDecimation   "2"
	    DataLoggingLimitDataPoints off
	    DataLoggingMaxPoints    "5000"
	  }
	}
	Block {
	  BlockType		  Demux
	  Name			  "Demux"
	  Ports			  [1, 2]
	  Position		  [285, 26, 290, 64]
	  BackgroundColor	  "black"
	  ShowName		  off
	  Outputs		  "2"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function"
	  Ports			  [1, 1]
	  Position		  [125, 29, 235, 61]
	  FunctionName		  "CD1_sfun_splitter"
	  Parameters		  "n_comp,values,mode,tstep"
	}
	Block {
	  BlockType		  Outport
	  Name			  " 3"
	  Position		  [370, 28, 400, 42]
	  ShowName		  off
	}
	Block {
	  BlockType		  Outport
	  Name			  " 2"
	  Position		  [370, 48, 400, 62]
	  ShowName		  off
	  Port			  "2"
	}
	Line {
	  Name			  "inpt"
	  Labels		  [0, 0]
	  SrcBlock		  " 1"
	  SrcPort		  1
	  DstBlock		  "S-Function"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "S-Function"
	  SrcPort		  1
	  DstBlock		  "Demux"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  1
	  DstBlock		  " 3"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  2
	  DstBlock		  " 2"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      " 1"
      Ports		      [2, 2]
      Position		      [725, 425, 805, 485]
      BackgroundColor	      "[0.752941, 0.752941, 0.752941]"
      TreatAsAtomicUnit	      off
      MaskType		      "Wrong Connect"
      MaskDescription	      "The block simulates wrong connections given in "
"a seperate sewer system. MAgnitudes of wrong connections are described by fra"
"ction percentages (or quanities) diverted from or to the stormwater pipe."
      MaskPromptString	      "Number of components|Fraction Qr --> Qdwf|Split"
"ting mode|Fraction Qdwf --> Qr|Splitting mode"
      MaskStyleString	      "edit,edit,popup(Fraction [0-1]|Percent [0-100]|"
"m³/s),edit,popup(Fraction [0-1]|Percent [0-100]|m³/s)"
      MaskTunableValueString  "on,on,on,on,on"
      MaskCallbackString      "||||"
      MaskEnableString	      "on,on,on,on,on"
      MaskVisibilityString    "on,on,on,on,on"
      MaskToolTipString	      "on,on,on,on,on"
      MaskVarAliasString      ",,,,"
      MaskVariables	      "n_comp=@1;values_rain=@2;mode_rain=@3;values_dw"
"f=@4;mode_dwf=@5;"
      MaskInitialization      "% reading the toplevel systems' name \n% --> Pl"
"ant file name;\ntls=bdroot(gcb); \n% Obtaining the fixed sampling time\nt_sam"
"p_char=get_param(tls, 'FixedStep');\n% Convertion to numeric value\ntstep = s"
"tr2num(t_samp_char); "
      MaskDisplay	      "plot(0,0,100,100);\n\n\nplot([30,70],[30,30]);"
"\nplot([30,70],[70,70]);\nplot([40,60],[30,70]);\nplot([40,60],[70,30]);\n\n"
"\n\n\ntext(50,10,'WRONG Connect','HorizontalAlignment','center');\nport_label"
"('input',1,'Qr');\nport_label('input',2,'Qdwf');\nport_label('output',1,'Qr')"
";\nport_label('output',2,'Qdwf');\n"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "1|15|Percent [0-100]|23|Percent [0-100]"
      System {
	Name			" 1"
	Location		[157, 339, 1002, 716]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  " 1"
	  Position		  [25, 38, 55, 52]
	  ShowName		  off
	  Port {
	    PortNumber		    1
	    Name		    "Qrain"
	    TestPoint		    off
	    LinearAnalysisOutput    off
	    LinearAnalysisInput	    off
	    RTWStorageClass	    "Auto"
	    DataLogging		    off
	    DataLoggingNameMode	    "SignalName"
	    DataLoggingDecimateData off
	    DataLoggingDecimation   "2"
	    DataLoggingLimitDataPoints off
	    DataLoggingMaxPoints    "5000"
	  }
	}
	Block {
	  BlockType		  Inport
	  Name			  " 4"
	  Position		  [30, 138, 60, 152]
	  NamePlacement		  "alternate"
	  ShowName		  off
	  Port			  "2"
	  Port {
	    PortNumber		    1
	    Name		    "Qdwf"
	    TestPoint		    off
	    LinearAnalysisOutput    off
	    LinearAnalysisInput	    off
	    RTWStorageClass	    "Auto"
	    DataLogging		    off
	    DataLoggingNameMode	    "SignalName"
	    DataLoggingDecimateData off
	    DataLoggingDecimation   "2"
	    DataLoggingLimitDataPoints off
	    DataLoggingMaxPoints    "5000"
	  }
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "DWF - Pipe"
	  Ports			  [1, 1]
	  Position		  [515, 149, 625, 181]
	  FunctionName		  "CD1_sfun_mixing_QC"
	  Parameters		  "n_comp,tstep"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "DWF splitter"
	  Ports			  [1, 1]
	  Position		  [130, 129, 240, 161]
	  FunctionName		  "CD1_sfun_splitter"
	  Parameters		  "n_comp,values_dwf,mode_dwf,tstep"
	}
	Block {
	  BlockType		  Demux
	  Name			  "Demux"
	  Ports			  [1, 2]
	  Position		  [285, 26, 290, 64]
	  BackgroundColor	  "black"
	  ShowName		  off
	  Outputs		  "2"
	}
	Block {
	  BlockType		  Demux
	  Name			  "Demux1"
	  Ports			  [1, 2]
	  Position		  [290, 126, 295, 164]
	  BackgroundColor	  "black"
	  ShowName		  off
	  Outputs		  "2"
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux"
	  Ports			  [2, 1]
	  Position		  [465, 46, 470, 84]
	  ShowName		  off
	  Inputs		  "2"
	  DisplayOption		  "bar"
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux1"
	  Ports			  [2, 1]
	  Position		  [470, 146, 475, 184]
	  ShowName		  off
	  Inputs		  "2"
	  DisplayOption		  "bar"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "Rainsplitter"
	  Ports			  [1, 1]
	  Position		  [125, 29, 235, 61]
	  FunctionName		  "CD1_sfun_splitter"
	  Parameters		  "n_comp,values_rain,mode_rain,tstep"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "Stormwater Pipe"
	  Ports			  [1, 1]
	  Position		  [510, 49, 620, 81]
	  FunctionName		  "CD1_sfun_mixing_QC"
	  Parameters		  "n_comp,tstep"
	}
	Block {
	  BlockType		  Outport
	  Name			  " 3"
	  Position		  [750, 58, 780, 72]
	  ShowName		  off
	}
	Block {
	  BlockType		  Outport
	  Name			  " 2"
	  Position		  [750, 158, 780, 172]
	  ShowName		  off
	  Port			  "2"
	}
	Line {
	  Name			  "Qrain"
	  Labels		  [0, 0]
	  SrcBlock		  " 1"
	  SrcPort		  1
	  DstBlock		  "Rainsplitter"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Rainsplitter"
	  SrcPort		  1
	  DstBlock		  "Demux"
	  DstPort		  1
	}
	Line {
	  Name			  "Qdwf"
	  Labels		  [0, 0]
	  SrcBlock		  " 4"
	  SrcPort		  1
	  DstBlock		  "DWF splitter"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "DWF splitter"
	  SrcPort		  1
	  DstBlock		  "Demux1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Mux"
	  SrcPort		  1
	  DstBlock		  "Stormwater Pipe"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  2
	  DstBlock		  "Mux"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux1"
	  SrcPort		  1
	  Points		  [65, 0; 0, -60]
	  DstBlock		  "Mux"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Mux1"
	  SrcPort		  1
	  DstBlock		  "DWF - Pipe"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  1
	  Points		  [110, 0; 0, 120]
	  DstBlock		  "Mux1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux1"
	  SrcPort		  2
	  Points		  [80, 0; 0, 20]
	  DstBlock		  "Mux1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "DWF - Pipe"
	  SrcPort		  1
	  DstBlock		  " 2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Stormwater Pipe"
	  SrcPort		  1
	  DstBlock		  " 3"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      " Catchment 1"
      Ports		      [2, 1]
      Position		      [265, 204, 380, 266]
      BackgroundColor	      "darkGreen"
      TreatAsAtomicUnit	      off
      MaskType		      "Catchment CSS - Type A"
      MaskDescription	      "Simple model of an urban catchment with Combine"
"d sewer system (CSS). \nInput ( r ) is a continuous stream of rain data in [m"
"m/DT]. Input (dwf) is the dry weather flow in [m3/s]. \n\nPollutants concentr"
"ations are considered as constant over time.\nThe block contains an initial l"
"oss model for runoff generation, a time-area model for overland flow computat"
"ion and a mixing model for computing runoff concentrations for n components. "
" "
      MaskPromptString	      "Area in [ha]|Runoff coefficient (0 - 1)|Initial"
" Loss in [mm]|Permanent loss in [mm/day]|No of Timesteps (transport time) / N"
"o of subareas n [-]|No of pollutant components|Vector of Rain-Conc. [g/m3]|Ve"
"ctor of DWF-Conc. [g/m3]"
      MaskStyleString	      "edit,edit,edit,edit,edit,edit,edit,edit"
      MaskTunableValueString  "on,on,on,on,on,on,on,on"
      MaskCallbackString      "|||||||"
      MaskEnableString	      "on,on,on,on,on,on,on,on"
      MaskVisibilityString    "on,on,on,on,on,on,on,on"
      MaskToolTipString	      "on,on,on,on,on,on,on,on"
      MaskVarAliasString      ",,,,,,,"
      MaskVariables	      "area=@1;rfcoeff=@2;initloss=@3;permloss=@4;n_ta"
"=@5;n_comp=@6;Rain_C=@7;DWF_C=@8;"
      MaskInitialization      "% location of catchment drawing\nx=0;\ny=-10;\n"
"% reading the toplevel systems' name \n% --> Plant file name;\ntls=bdroot(gcb"
"); \n% Obtaining the fixed sampling time\nt_samp_char=get_param(tls, 'FixedSt"
"ep');\n% Convertion to numeric value\ntstep = str2num(t_samp_char); \n\n%conv"
"ertion form mm/day --> mm/DT\npermloss=permloss/86400*tstep;\narea=area*10000"
";"
      MaskDisplay	      "plot(0,0,100,100,\n[17 20 25 30 40 50 55 60 70 "
"75 80]+x,\n[60 40 38 35 32 32 32 35 38 45 60]+y,\n[17 20 25 30 40 50 55 60 70"
" 75 80]+x,\n[60 80 82 85 88 88 88 85 82 75 60]+y);\n\nplot(\n[20 80]+x,\n[60 "
"60]+y);\n\nplot([20 30]+x,[80 60]+y,[25 35]+x,[40 60]+y);\nplot([30 40]+x,[75"
" 60]+y,[35 45]+x,[35 60]+y);\nplot([45 60]+x,[75 60]+y,[45 60]+x,[40 60]+y);"
"\n\nport_label('input',1,'r');\nport_label('input',2,'dwf');\nport_label('out"
"put',1,'Qe');\n\ntext(50,90,'CATCHMENT CSS','HorizontalAlignment','center');"
"\ntext(50,10,'Typ A','HorizontalAlignment','center');\n"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "100|0.5|1|1|5|1|[0.5]|[1]"
      System {
	Name			" Catchment 1"
	Location		[172, 94, 1160, 544]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "Rain (mm/dt)"
	  Position		  [20, 43, 50, 57]
	}
	Block {
	  BlockType		  Inport
	  Name			  "DWF(m3/s)"
	  Position		  [20, 148, 50, 162]
	  Port			  "2"
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux1"
	  Ports			  [2, 1]
	  Position		  [710, 81, 715, 119]
	  ShowName		  off
	  Inputs		  "[n_comp+1,n_comp+1]"
	  DisplayOption		  "bar"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function"
	  Ports			  [1, 1]
	  Position		  [70, 31, 240, 69]
	  FunctionName		  "CD1_sfun_catchment_lossmodel"
	  Parameters		  "initloss,permloss,rfcoeff"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function1"
	  Ports			  [1, 1]
	  Position		  [260, 31, 410, 69]
	  FunctionName		  "CD1_sfun_catchment_tamodel"
	  Parameters		  "n_ta"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function2"
	  Ports			  [1, 1]
	  Position		  [450, 30, 655, 70]
	  FunctionName		  "CD1_sfun_catchment_flowmodel_SW"
	  Parameters		  "area,n_comp,Rain_C,tstep"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function3"
	  Ports			  [1, 1]
	  Position		  [755, 84, 865, 116]
	  FunctionName		  "CD1_sfun_mixing_QC"
	  Parameters		  "n_comp,tstep"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function4"
	  Ports			  [1, 1]
	  Position		  [450, 135, 655, 175]
	  FunctionName		  "CD1_sfun_catchment_flowmodel_DWF"
	  Parameters		  "n_comp,DWF_C,tstep"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "SEWER TL Model1"
	  Ports			  [1, 1]
	  Position		  [255, 139, 405, 171]
	  FunctionName		  "CD1_sfun_sewer_tlmodel"
	  Parameters		  "n_ta,0,tstep"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Runoff vector Q,C"
	  Position		  [910, 93, 940, 107]
	}
	Line {
	  SrcBlock		  "S-Function"
	  SrcPort		  1
	  DstBlock		  "S-Function1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Rain (mm/dt)"
	  SrcPort		  1
	  DstBlock		  "S-Function"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "DWF(m3/s)"
	  SrcPort		  1
	  DstBlock		  "SEWER TL Model1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Mux1"
	  SrcPort		  1
	  DstBlock		  "S-Function3"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "S-Function3"
	  SrcPort		  1
	  DstBlock		  "Runoff vector Q,C"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "S-Function1"
	  SrcPort		  1
	  DstBlock		  "S-Function2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "SEWER TL Model1"
	  SrcPort		  1
	  DstBlock		  "S-Function4"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "S-Function2"
	  SrcPort		  1
	  Points		  [15, 0; 0, 40]
	  DstBlock		  "Mux1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "S-Function4"
	  SrcPort		  1
	  Points		  [15, 0; 0, -45]
	  DstBlock		  "Mux1"
	  DstPort		  2
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      " Catchment 2"
      Ports		      [3, 1]
      Position		      [265, 290, 380, 350]
      BackgroundColor	      "darkGreen"
      TreatAsAtomicUnit	      off
      MaskType		      "Catchment CSS - Type B"
      MaskDescription	      "Simple model of an urban catchment. \nInput ( r"
" ) is a continuous stream of rain data in [mm/DT]. Input (DWF) is the dry wea"
"ther flow. Input (QP) is the parasite water flow entering.\n\nPollutants conc"
"entrations for rain are considered constant over time. The block contains an "
"initial loss model for runoff generation, a time/area model for overland flow"
" computation and a mixing model for computing runoff concentrations for n com"
"ponents.  "
      MaskPromptString	      "Area in [ha]|Runoff coefficient (0 - 1)|Initial"
" Loss in [mm]|Permanent loss in [mm/day]|No of Timesteps (transport time) / N"
"o of subareas n [-]|No of pollutant components|Vector of Rain-Conc. [g/m3]"
      MaskStyleString	      "edit,edit,edit,edit,edit,edit,edit"
      MaskTunableValueString  "on,on,on,on,on,on,on"
      MaskCallbackString      "||||||"
      MaskEnableString	      "on,on,on,on,on,on,on"
      MaskVisibilityString    "on,on,on,on,on,on,on"
      MaskToolTipString	      "on,on,on,on,on,on,on"
      MaskVarAliasString      ",,,,,,"
      MaskVariables	      "area=@1;rfcoeff=@2;initloss=@3;permloss=@4;n_ta"
"=@5;n_comp=@6;Rain_C=@7;"
      MaskInitialization      "% location of catchment drawing\nx=0;\ny=-10;\n"
"% reading the toplevel systems' name \n% --> Plant file name;\ntls=bdroot(gcb"
"); \n% Obtaining the fixed sampling time\nt_samp_char=get_param(tls, 'FixedSt"
"ep');\n% Convertion to numeric value\ntstep = str2num(t_samp_char); \n\n%conv"
"ertion form mm/day --> mm/DT\npermloss=permloss/86400*tstep;\narea=area*10000"
";"
      MaskDisplay	      "plot(0,0,100,100,\n[17 20 25 30 40 50 55 60 70 "
"75 80]+x,\n[60 40 38 35 32 32 32 35 38 45 60]+y,\n[17 20 25 30 40 50 55 60 70"
" 75 80]+x,\n[60 80 82 85 88 88 88 85 82 75 60]+y);\n\nplot(\n[20 80]+x,\n[60 "
"60]+y);\n\nplot([20 30]+x,[80 60]+y,[25 35]+x,[40 60]+y);\nplot([30 40]+x,[75"
" 60]+y,[35 45]+x,[35 60]+y);\nplot([45 60]+x,[75 60]+y,[45 60]+x,[40 60]+y);"
"\n\nport_label('input',1,'r');\nport_label('input',2,'DWF');\nport_label('inp"
"ut',3,'QP');\nport_label('output',1,'Qe');\n\ntext(50,90,'CATCHMENT CSS','Hor"
"izontalAlignment','center');\ntext(50,10,'Typ B','HorizontalAlignment','cente"
"r');\n"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "20|0.5|1|1|5|1|[0.5]"
      System {
	Name			" Catchment 2"
	Location		[192, 451, 1226, 1111]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "Rain (mm/dt)"
	  Position		  [20, 88, 50, 102]
	}
	Block {
	  BlockType		  Inport
	  Name			  "DWF(m3/s)"
	  Position		  [20, 178, 50, 192]
	  Port			  "2"
	}
	Block {
	  BlockType		  Inport
	  Name			  "QP"
	  Position		  [15, 273, 45, 287]
	  Port			  "3"
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux1"
	  Ports			  [2, 1]
	  Position		  [715, 131, 720, 169]
	  ShowName		  off
	  Inputs		  "[n_comp+1,n_comp+1]"
	  DisplayOption		  "bar"
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux2"
	  Ports			  [2, 1]
	  Position		  [185, 196, 190, 234]
	  ShowName		  off
	  Inputs		  "[n_comp+1,n_comp+1]"
	  DisplayOption		  "bar"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function"
	  Ports			  [1, 1]
	  Position		  [70, 76, 240, 114]
	  FunctionName		  "CD1_sfun_catchment_lossmodel"
	  Parameters		  "initloss,permloss,rfcoeff"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function1"
	  Ports			  [1, 1]
	  Position		  [260, 76, 410, 114]
	  FunctionName		  "CD1_sfun_catchment_tamodel"
	  Parameters		  "n_ta"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function2"
	  Ports			  [1, 1]
	  Position		  [230, 199, 340, 231]
	  FunctionName		  "CD1_sfun_mixing_QC"
	  Parameters		  "n_comp,tstep"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function3"
	  Ports			  [1, 1]
	  Position		  [455, 80, 660, 120]
	  FunctionName		  "CD1_sfun_catchment_flowmodel_SW"
	  Parameters		  "area,n_comp,Rain_C,tstep"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function4"
	  Ports			  [1, 1]
	  Position		  [760, 134, 870, 166]
	  FunctionName		  "CD1_sfun_mixing_QC"
	  Parameters		  "n_comp,tstep"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "SEWER TL Model1"
	  Ports			  [1, 1]
	  Position		  [460, 199, 610, 231]
	  FunctionName		  "CD1_sfun_sewer_tlmodel"
	  Parameters		  "n_ta,n_comp,tstep"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Runoff vector Q,C"
	  Position		  [915, 143, 945, 157]
	}
	Line {
	  SrcBlock		  "S-Function"
	  SrcPort		  1
	  DstBlock		  "S-Function1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Rain (mm/dt)"
	  SrcPort		  1
	  DstBlock		  "S-Function"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Mux1"
	  SrcPort		  1
	  DstBlock		  "S-Function4"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "S-Function4"
	  SrcPort		  1
	  DstBlock		  "Runoff vector Q,C"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "S-Function3"
	  SrcPort		  1
	  Points		  [15, 0; 0, 40]
	  DstBlock		  "Mux1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "S-Function1"
	  SrcPort		  1
	  Points		  [10, 0; 0, 5]
	  DstBlock		  "S-Function3"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Mux2"
	  SrcPort		  1
	  DstBlock		  "S-Function2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "S-Function2"
	  SrcPort		  1
	  DstBlock		  "SEWER TL Model1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "DWF(m3/s)"
	  SrcPort		  1
	  Points		  [55, 0; 0, 20]
	  DstBlock		  "Mux2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "QP"
	  SrcPort		  1
	  Points		  [60, 0; 0, -55]
	  DstBlock		  "Mux2"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "SEWER TL Model1"
	  SrcPort		  1
	  Points		  [40, 0; 0, -55]
	  DstBlock		  "Mux1"
	  DstPort		  2
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      " Catchment 3"
      Ports		      [2, 2]
      Position		      [260, 384, 375, 446]
      BackgroundColor	      "green"
      TreatAsAtomicUnit	      off
      MaskType		      "Catchment SSS - Type A"
      MaskDescription	      "Simple model of an urban catchment with Seperat"
"e sewer system (SSS). \nInput ( r ) is a continuous stream of rain data in [m"
"m/DT]. Input ( dwf ) is the dry weather flow in [m3/s]. \n\nPollutants concen"
"trations are considered constant over time.The block contains an initial loss"
" model for runoff generation, a time-area model for overland flow computation"
" and a mixing model for computing runoff concentrations for n components.  "
      MaskPromptString	      "Area in [ha]|Runoff coefficient (0 - 1)|Initial"
" Loss in [mm]|Permanent loss in [mm/day]|No of Timesteps (transport time) / N"
"o of subareas n [-]|No of pollutant components|Vector of Rain-Conc. [g/m3]|Ve"
"ctor of DWF-Conc. [g/m3]"
      MaskStyleString	      "edit,edit,edit,edit,edit,edit,edit,edit"
      MaskTunableValueString  "on,on,on,on,on,on,on,on"
      MaskCallbackString      "|||||||"
      MaskEnableString	      "on,on,on,on,on,on,on,on"
      MaskVisibilityString    "on,on,on,on,on,on,on,on"
      MaskToolTipString	      "on,on,on,on,on,on,on,on"
      MaskVarAliasString      ",,,,,,,"
      MaskVariables	      "area=@1;rfcoeff=@2;initloss=@3;permloss=@4;n_ta"
"=@5;n_comp=@6;Rain_C=@7;DWF_C=@8;"
      MaskInitialization      "% location of catchment drawing\nx=0;\ny=-10;\n"
"% reading the toplevel systems' name \n% --> Plant file name;\ntls=bdroot(gcb"
"); \n% Obtaining the fixed sampling time\nt_samp_char=get_param(tls, 'FixedSt"
"ep');\n% Convertion to numeric value\ntstep = str2num(t_samp_char); \n\n%conv"
"ertion form mm/day --> mm/DT\npermloss=permloss/86400*tstep;\narea=area*10000"
";"
      MaskDisplay	      "plot(0,0,100,100,\n[17 20 25 30 40 50 55 60 70 "
"75 80]+x,\n[60 80 82 85 88 88 88 85 82 75 60]+y);\n\nplot([20 80]+x,[60 60]+y"
");\nplot([20 30]+x,[80 60]+y);\nplot([30 40]+x,[75 60]+y);\nplot([45 60]+x,[7"
"5 60]+y);\n\ncolor('white');\nplot([20 80]+x,[55 55]+y);\nplot([20 30]+x,[40 "
"55]+y);\nplot([30 40]+x,[45 55]+y);\nplot([45 60]+x,[30 55]+y);\n\ncolor('bla"
"ck');\nport_label('input',1,'r');\nport_label('input',2,'dwf');\nport_label('"
"output',1,'Qr');\nport_label('output',2,'DWF');\n\ntext(50,90,'CATCHMENT SSS'"
",'HorizontalAlignment','center');\ntext(50,10,'Typ A','HorizontalAlignment','"
"center');\n"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "20|0.5|1|1|5|2|[0.5 0.2]|[2 3]"
      System {
	Name			" Catchment 3"
	Location		[182, 377, 998, 915]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "Rain (mm/dt)"
	  Position		  [20, 43, 50, 57]
	}
	Block {
	  BlockType		  Inport
	  Name			  "dwf (m3/s)"
	  Position		  [20, 118, 50, 132]
	  Port			  "2"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function"
	  Ports			  [1, 1]
	  Position		  [70, 31, 240, 69]
	  FunctionName		  "CD1_sfun_catchment_lossmodel"
	  Parameters		  "initloss,permloss,rfcoeff"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function1"
	  Ports			  [1, 1]
	  Position		  [260, 31, 410, 69]
	  FunctionName		  "CD1_sfun_catchment_tamodel"
	  Parameters		  "n_ta"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function2"
	  Ports			  [1, 1]
	  Position		  [435, 30, 640, 70]
	  FunctionName		  "CD1_sfun_catchment_flowmodel_SW"
	  Parameters		  "area,n_comp,Rain_C,tstep"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function3"
	  Ports			  [1, 1]
	  Position		  [435, 105, 640, 145]
	  FunctionName		  "CD1_sfun_catchment_flowmodel_DWF"
	  Parameters		  "n_comp,DWF_C,tstep"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "SEWER TL Model1"
	  Ports			  [1, 1]
	  Position		  [260, 109, 410, 141]
	  FunctionName		  "CD1_sfun_sewer_tlmodel"
	  Parameters		  "n_ta,0,tstep"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Rain Q,C"
	  Position		  [685, 43, 715, 57]
	}
	Block {
	  BlockType		  Outport
	  Name			  "DWF Q,C"
	  Position		  [685, 118, 715, 132]
	  Port			  "2"
	}
	Line {
	  SrcBlock		  "S-Function2"
	  SrcPort		  1
	  DstBlock		  "Rain Q,C"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "S-Function"
	  SrcPort		  1
	  DstBlock		  "S-Function1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Rain (mm/dt)"
	  SrcPort		  1
	  DstBlock		  "S-Function"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "dwf (m3/s)"
	  SrcPort		  1
	  DstBlock		  "SEWER TL Model1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "S-Function1"
	  SrcPort		  1
	  DstBlock		  "S-Function2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "SEWER TL Model1"
	  SrcPort		  1
	  DstBlock		  "S-Function3"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "S-Function3"
	  SrcPort		  1
	  DstBlock		  "DWF Q,C"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      " Catchment 4"
      Ports		      [3, 2]
      Position		      [260, 478, 375, 542]
      BackgroundColor	      "green"
      TreatAsAtomicUnit	      off
      MaskType		      "Catchment SSS - Type B"
      MaskDescription	      "Simple model of an urban catchment. \nInput ( r"
" ) is a continuous stream of rain data in [mm/DT]. Input (DWF) is the dry wea"
"ther flow. Input (QP) is parasite water flow entering diluting the DWF. \n\nP"
"ollutants concentrations for stormwater Qr are considered constant over time."
" The block contains an initial loss model for runoff generation, a time/area "
"model for overland flow computation and a mixing model for computing runoff c"
"oncentrations for n components.  "
      MaskPromptString	      "Area in [ha]|Runoff coefficient (0 - 1)|Initial"
" Loss in [mm]|Permanent loss in [mm/day]|No of Timesteps (transport time) / N"
"o of subareas n [-]|No of pollutant components|Vector of Rain-Conc. [g/m3]"
      MaskStyleString	      "edit,edit,edit,edit,edit,edit,edit"
      MaskTunableValueString  "on,on,on,on,on,on,on"
      MaskCallbackString      "||||||"
      MaskEnableString	      "on,on,on,on,on,on,on"
      MaskVisibilityString    "on,on,on,on,on,on,on"
      MaskToolTipString	      "on,on,on,on,on,on,on"
      MaskVarAliasString      ",,,,,,"
      MaskVariables	      "area=@1;rfcoeff=@2;initloss=@3;permloss=@4;n_ta"
"=@5;n_comp=@6;Rain_C=@7;"
      MaskInitialization      "% location of catchment drawing\nx=0;\ny=-10;\n"
"% reading the toplevel systems' name \n% --> Plant file name;\ntls=bdroot(gcb"
"); \n% Obtaining the fixed sampling time\nt_samp_char=get_param(tls, 'FixedSt"
"ep');\n% Convertion to numeric value\ntstep = str2num(t_samp_char); \n\n%conv"
"ertion form mm/day --> mm/DT\npermloss=permloss/86400*tstep;\narea=area*10000"
";"
      MaskDisplay	      "plot(0,0,100,100,\n[17 20 25 30 40 50 55 60 70 "
"75 80]+x,\n[60 80 82 85 88 88 88 85 82 75 60]+y);\n\nplot([20 80]+x,[60 60]+y"
");\nplot([20 30]+x,[80 60]+y);\nplot([30 40]+x,[75 60]+y);\nplot([45 60]+x,[7"
"5 60]+y);\n\ncolor('white');\nplot([20 80]+x,[55 55]+y);\nplot([20 30]+x,[40 "
"55]+y);\nplot([30 40]+x,[45 55]+y);\nplot([45 60]+x,[30 55]+y);\n\ncolor('bla"
"ck');\n\nport_label('input',1,'r');\nport_label('input',2,'DWF');\nport_label"
"('input',3,'QP');\nport_label('output',1,'Qr');\nport_label('output',2,'DWF')"
";\n\ntext(50,90,'CATCHMENT SSS','HorizontalAlignment','center');\ntext(50,10,"
"'Typ B','HorizontalAlignment','center');\n"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "20|0.5|1|1|5|1|[0.5]"
      System {
	Name			" Catchment 4"
	Location		[197, 94, 931, 632]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "Rain (mm/dt)"
	  Position		  [20, 88, 50, 102]
	}
	Block {
	  BlockType		  Inport
	  Name			  "DWF Q,C (m3/s)"
	  Position		  [30, 173, 60, 187]
	  Port			  "2"
	}
	Block {
	  BlockType		  Inport
	  Name			  "QP"
	  Position		  [30, 253, 60, 267]
	  Port			  "3"
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux2"
	  Ports			  [2, 1]
	  Position		  [215, 201, 220, 239]
	  ShowName		  off
	  Inputs		  "[n_comp+1,n_comp+1]"
	  DisplayOption		  "bar"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function"
	  Ports			  [1, 1]
	  Position		  [70, 76, 240, 114]
	  FunctionName		  "CD1_sfun_catchment_lossmodel"
	  Parameters		  "initloss,permloss,rfcoeff"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function1"
	  Ports			  [1, 1]
	  Position		  [260, 76, 410, 114]
	  FunctionName		  "CD1_sfun_catchment_tamodel"
	  Parameters		  "n_ta"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function2"
	  Ports			  [1, 1]
	  Position		  [430, 74, 640, 116]
	  FunctionName		  "CD1_sfun_catchment_flowmodel_SW"
	  Parameters		  "area,n_comp,Rain_C,tstep"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function3"
	  Ports			  [1, 1]
	  Position		  [260, 204, 370, 236]
	  FunctionName		  "CD1_sfun_mixing_QC"
	  Parameters		  "n_comp,tstep"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "SEWER TL Model1"
	  Ports			  [1, 1]
	  Position		  [475, 204, 625, 236]
	  FunctionName		  "CD1_sfun_sewer_tlmodel"
	  Parameters		  "n_ta,n_comp,tstep"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Rain Q,C"
	  Position		  [680, 88, 710, 102]
	}
	Block {
	  BlockType		  Outport
	  Name			  "DWF Q,C"
	  Position		  [680, 213, 710, 227]
	  Port			  "2"
	}
	Line {
	  SrcBlock		  "S-Function2"
	  SrcPort		  1
	  DstBlock		  "Rain Q,C"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "S-Function"
	  SrcPort		  1
	  DstBlock		  "S-Function1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Rain (mm/dt)"
	  SrcPort		  1
	  DstBlock		  "S-Function"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "S-Function1"
	  SrcPort		  1
	  DstBlock		  "S-Function2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "SEWER TL Model1"
	  SrcPort		  1
	  DstBlock		  "DWF Q,C"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Mux2"
	  SrcPort		  1
	  DstBlock		  "S-Function3"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "S-Function3"
	  SrcPort		  1
	  DstBlock		  "SEWER TL Model1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "DWF Q,C (m3/s)"
	  SrcPort		  1
	  Points		  [65, 0; 0, 30]
	  DstBlock		  "Mux2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "QP"
	  SrcPort		  1
	  Points		  [65, 0; 0, -30]
	  DstBlock		  "Mux2"
	  DstPort		  2
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      " Hydropower 01"
      Ports		      [2, 1]
      Position		      [575, 570, 690, 630]
      ForegroundColor	      "blue"
      TreatAsAtomicUnit	      off
      MaskType		      "HYDROPOWER"
      MaskDescription	      "Hydropower block for modelling downstream relea"
"se of water. Upstream concnetration of baseflow ( qo ) and additional flow ( "
"qa ) are considered constant.\n\nUsed function:\nCD1_sfun_hydropower"
      MaskPromptString	      "No of components|Vector of Stream-Conc. g/m3"
      MaskStyleString	      "edit,edit"
      MaskTunableValueString  "on,on"
      MaskCallbackString      "|"
      MaskEnableString	      "on,on"
      MaskVisibilityString    "on,on"
      MaskToolTipString	      "on,on"
      MaskVarAliasString      ","
      MaskVariables	      "n_comp=@1;C_Stream=@2;"
      MaskInitialization      "\n\n% reading the toplevel systems' name \n% --"
"> Plant file name;\ntls=bdroot(gcb); \n% Obtaining the fixed sampling time\nt"
"_samp_char=get_param(tls, 'FixedStep');\n% Convertion to numeric value\ntstep"
" = str2num(t_samp_char); "
      MaskDisplay	      "plot(0,0,100,100,\n[30 30 32 34 36 38 40 44 46 "
"50],\n[28 60 62 65 67 70 70 67 65 25],\n[15 80],[30 20],\n[30 50],[34 30],[30"
" 50],[38 34],\n[15 33],[65 65],\n[50 80],[45 40]\n);\ntext(50,90,'HYDROPOWER'"
",'HorizontalAlignment','center');\ntext(50,10,'baseflow','HorizontalAlignment"
"','center');\nport_label('input',1,'qa');\nport_label('input',2,'qo');\nport_"
"label('output',1,'Qe');"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "3|[1 2 3]"
      System {
	Name			" Hydropower 01"
	Location		[370, 310, 1033, 614]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "qa [m³/s] ... additional flow"
	  Position		  [75, 53, 105, 67]
	}
	Block {
	  BlockType		  Inport
	  Name			  "q0 [m³/s] ... baseflow"
	  Position		  [75, 98, 105, 112]
	  Port			  "2"
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux"
	  Ports			  [2, 1]
	  Position		  [330, 35, 335, 130]
	  ShowName		  off
	  Inputs		  "2"
	  DisplayOption		  "bar"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function2"
	  Ports			  [1, 1]
	  Position		  [370, 68, 510, 102]
	  FunctionName		  "CD1_sfun_hydropower"
	  Parameters		  "n_comp,C_Stream,tstep"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Runoff vector Q,C"
	  Position		  [550, 78, 580, 92]
	}
	Line {
	  SrcBlock		  "Mux"
	  SrcPort		  1
	  DstBlock		  "S-Function2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "S-Function2"
	  SrcPort		  1
	  DstBlock		  "Runoff vector Q,C"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "q0 [m³/s] ... baseflow"
	  SrcPort		  1
	  DstBlock		  "Mux"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "qa [m³/s] ... additional flow"
	  SrcPort		  1
	  DstBlock		  "Mux"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      " Mixer QD"
      Ports		      [2, 2]
      Position		      [725, 274, 805, 336]
      BackgroundColor	      "[0.752941, 0.752941, 0.752941]"
      TreatAsAtomicUnit	      off
      MaskType		      "Mixer QD"
      MaskDescription	      "Performes mixing of pollutant fluxes Qw  and Qo"
" in accordance to their hydraulic load. Qo is considered to be the less polll"
"uted flux. In addition the required increase of Qo is calculated for meeting "
"required MCL (maximum concentration limits) defined by user input. \n\nFuncti"
"on used:\nCD1_sfun_mixing_QC_QD.m"
      MaskPromptString	      "Number of pollutants [ - ]|MCL - Vector of max."
" concentration limits [g/m3]"
      MaskStyleString	      "edit,edit"
      MaskTunableValueString  "on,on"
      MaskCallbackString      "|"
      MaskEnableString	      "on,on"
      MaskVisibilityString    "on,on"
      MaskToolTipString	      "on,on"
      MaskVarAliasString      ","
      MaskVariables	      "n_comp=@1;Cmcl=@2;"
      MaskInitialization      "% reading the toplevel systems' name \n% --> Pl"
"ant file name;\ntls=bdroot(gcb); \n% Obtaining the fixed sampling time\nt_sam"
"p_char=get_param(tls, 'FixedStep');\n% Convertion to numeric value\ntstep = s"
"tr2num(t_samp_char); "
      MaskDisplay	      "plot(0,0,100,100);\n\ntext(50,60,'Mixing','Hori"
"zontalAlignment','center');\ntext(50,35,'QD','HorizontalAlignment','center');"
"\n\n\nport_label('input',1,'Qw');\nport_label('input',2,'Qo');\nport_label('o"
"utput',1,'Qe');\nport_label('output',2,'QD');"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "3|[3 3 3]"
      System {
	Name			" Mixer QD"
	Location		[362, 464, 882, 688]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  " 1"
	  Position		  [25, 28, 55, 42]
	  ShowName		  off
	}
	Block {
	  BlockType		  Inport
	  Name			  " "
	  Position		  [25, 48, 55, 62]
	  Port			  "2"
	}
	Block {
	  BlockType		  Demux
	  Name			  "Demux"
	  Ports			  [1, 2]
	  Position		  [360, 22, 365, 78]
	  BackgroundColor	  "black"
	  ShowName		  off
	  Outputs		  "[ (n_comp+1) (n_comp+1)]"
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux"
	  Ports			  [2, 1]
	  Position		  [80, 26, 85, 64]
	  ShowName		  off
	  Inputs		  "2"
	  DisplayOption		  "bar"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function"
	  Ports			  [1, 1]
	  Position		  [125, 27, 260, 63]
	  FunctionName		  "CD1_sfun_mixing_QC_QD"
	  Parameters		  "n_comp,tstep,Cmcl"
	}
	Block {
	  BlockType		  Outport
	  Name			  " 3"
	  Position		  [435, 23, 465, 37]
	  ShowName		  off
	}
	Block {
	  BlockType		  Outport
	  Name			  " 2"
	  Position		  [435, 73, 465, 87]
	  ShowName		  off
	  Port			  "2"
	}
	Line {
	  SrcBlock		  " "
	  SrcPort		  1
	  DstBlock		  "Mux"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  " 1"
	  SrcPort		  1
	  DstBlock		  "Mux"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Mux"
	  SrcPort		  1
	  DstBlock		  "S-Function"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  1
	  Points		  [25, 0; 0, -5]
	  DstBlock		  " 3"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  2
	  Points		  [25, 0; 0, 15]
	  DstBlock		  " 2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "S-Function"
	  SrcPort		  1
	  Points		  [40, 0; 0, 5]
	  DstBlock		  "Demux"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "CD Parameters"
      Ports		      []
      Position		      [160, 50, 331, 99]
      BackgroundColor	      "green"
      FontName		      "Arial"
      FontSize		      12
      FontWeight	      "bold"
      TreatAsAtomicUnit	      off
      MaskType		      "City Drain 1.0 - Simulation parameters "
      MaskDescription	      "Block that sets the global parameters required "
"in City Drain 1.0. Following paramters are set without user's input:\n\n- 'So"
"lver' --> 'FixedStepDiscrete'\n- 'TimeSaveName' --> 'cd_time'\n- 'Decimation'"
" --> '1'\n- 'LimitDataPoints' -->  'off'"
      MaskPromptString	      "Sampling Time [s]|Start Time [s]|Stop Time [s]"
      MaskStyleString	      "edit,edit,edit"
      MaskTunableValueString  "on,on,on"
      MaskCallbackString      "||"
      MaskEnableString	      "on,on,on"
      MaskVisibilityString    "on,on,on"
      MaskToolTipString	      "on,on,on"
      MaskVarAliasString      ",,"
      MaskVariables	      "t_step=@1;t_start=@2;t_stop=@3;"
      MaskInitialization      "% toplevel systems' name --> Plant file name;\n"
"tls=bdroot(gcb); \nset_param(tls, 'Solver', 'FixedStepDiscrete'); \nset_param"
"(tls, 'TimeSaveName', 'cd_time');\nset_param(tls, 'Decimation', '1');\nset_pa"
"ram(tls, 'LimitDataPoints', 'off');\nset_param(tls, 'ScreenColor', 'white');"
"\n\ntstep_char=num2str(t_step); % Setting the discrete time step\nset_param(t"
"ls, 'FixedStep', tstep_char); \n\ntstart_char=num2str(t_start); % Setting the"
" start time\nset_param(tls, 'StartTime', tstart_char); \n\ntstop_char=num2str"
"(t_stop); % Setting the stop time\nset_param(tls, 'StopTime', tstop_char); "
      MaskDisplay	      "\nplot(0,0,100,100);\n\ntext(50,65,'CITY DRAIN'"
",'HorizontalAlignment','center');\ntext(50,35,'PARAMETERS','HorizontalAlignme"
"nt','center');\n\n\nimage(imread('CityDrain_SimParam.jpg'))\n\n"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "300|0|36000"
      System {
	Name			"CD Parameters"
	Location		[555, 438, 1070, 628]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "CSO_QC_v01"
      Ports		      [1, 3]
      Position		      [440, 216, 515, 264]
      BackgroundColor	      "gray"
      TreatAsAtomicUnit	      off
      MaskType		      "CSO Typ A - Combined sewer overflow"
      MaskDescription	      "Combined sewer overflow structure. \nDiverts th"
"e inflow given into effluent and overflow. The model implemented consideres h"
"ydraulics and pollutant routing by full mixing in the structure. \n\nFunction"
" used:\nCD1_sfun_cso_A.m"
      MaskPromptString	      "Basin Volume [m3]|Maximum Effluent flow [m3/s]|"
"Number of Pollutants [-]"
      MaskStyleString	      "edit,edit,edit"
      MaskTunableValueString  "on,on,on"
      MaskCallbackString      "||"
      MaskEnableString	      "on,on,on"
      MaskVisibilityString    "on,on,on"
      MaskToolTipString	      "on,on,on"
      MaskVarAliasString      ",,"
      MaskVariables	      "Vmax=@1;Qemax=@2;n_comp=@3;"
      MaskInitialization      "% reading the toplevel systems' name \n% --> Pl"
"ant file name;\ntls=bdroot(gcb); \n% Obtaining the fixed sampling time\nt_sam"
"p_char=get_param(tls, 'FixedStep');\n% Convertion to numeric value\ntstep = s"
"tr2num(t_samp_char); "
      MaskDisplay	      "plot(0,0,100,100);\n\ntext(50,60,'CSO','Horizon"
"talAlignment','center');\ntext(50,30,'Typ A','HorizontalAlignment','center');"
"\n\n\nport_label('input',1,'Qi');\nport_label('output',1,'Qw');\nport_label('"
"output',2,'Qe');\nport_label('output',3,'Vi');\n"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "300|0.1|2"
      System {
	Name			"CSO_QC_v01"
	Location		[497, 320, 1154, 580]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "In"
	  Position		  [15, 108, 45, 122]
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "CSO FirstFlush1"
	  Ports			  [1, 1]
	  Position		  [80, 95, 210, 135]
	  FunctionName		  "CD1_sfun_cso_A"
	  Parameters		  "Vmax,Qemax,n_comp,tstep"
	}
	Block {
	  BlockType		  Demux
	  Name			  "Demux"
	  Ports			  [1, 3]
	  Position		  [260, 32, 275, 198]
	  BackgroundColor	  "black"
	  ShowName		  off
	  Outputs		  "[ (n_comp+1) (n_comp+1) (n_comp+1)]"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Qw"
	  Position		  [360, 53, 390, 67]
	}
	Block {
	  BlockType		  Outport
	  Name			  "Qe"
	  Position		  [360, 108, 390, 122]
	  Port			  "2"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Vi"
	  Position		  [360, 163, 390, 177]
	  Port			  "3"
	}
	Line {
	  SrcBlock		  "In"
	  SrcPort		  1
	  DstBlock		  "CSO FirstFlush1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "CSO FirstFlush1"
	  SrcPort		  1
	  DstBlock		  "Demux"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  1
	  DstBlock		  "Qw"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  2
	  DstBlock		  "Qe"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  3
	  DstBlock		  "Vi"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "CSO_QC_v02"
      Ports		      [1, 3]
      Position		      [440, 295, 515, 355]
      BackgroundColor	      "gray"
      TreatAsAtomicUnit	      off
      MaskType		      "CSO Typ B - Combined sewer overflow"
      MaskDescription	      "Combined sewer overflow structure. \nDiverts th"
"e inflow given into effluent and overflow. The model implemented consideres h"
"ydraulics and pollutant routing by full mixing in the structure. \n\nIn addit"
"ion to Type A a retenetion/sedimentation factor is introduced. The factor may"
" be used for applying different ratios in pollutant concentration for effluen"
"t flow (QE) and overflow (QW).\n\nFunction used:\nCD1_sfun_cso_B.m"
      MaskPromptString	      "Basin Volume (m3)|Maximum Effluent flow [m3/s]|"
"Number of Pollutants [-]|n-sed (Vect. of Sed. Coefficients)"
      MaskStyleString	      "edit,edit,edit,edit"
      MaskTunableValueString  "on,on,on,on"
      MaskCallbackString      "|||"
      MaskEnableString	      "on,on,on,on"
      MaskVisibilityString    "on,on,on,on"
      MaskToolTipString	      "on,on,on,on"
      MaskVarAliasString      ",,,"
      MaskVariables	      "Vmax=@1;Qemax=@2;n_comp=@3;n_sed=@4;"
      MaskInitialization      "% reading the toplevel systems' name \n% --> Pl"
"ant file name;\ntls=bdroot(gcb); \n% Obtaining the fixed sampling time\nt_sam"
"p_char=get_param(tls, 'FixedStep');\n% Convertion to numeric value\ntstep = s"
"tr2num(t_samp_char); "
      MaskDisplay	      "\nplot(0,0,100,100);\n\n\ntext(50,60,'CSO','Hor"
"izontalAlignment','center');\ntext(50,30,'Typ B','HorizontalAlignment','cente"
"r');\n\n\nport_label('input',1,'Qi');\nport_label('output',1,'Qw');\nport_lab"
"el('output',2,'Qe');\nport_label('output',3,'Vi');\n"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "300|0.1|1|[0.2]"
      System {
	Name			"CSO_QC_v02"
	Location		[436, 289, 1093, 549]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "In"
	  Position		  [15, 108, 45, 122]
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "CSO FirstFlush1"
	  Ports			  [1, 1]
	  Position		  [80, 95, 210, 135]
	  FunctionName		  "CD1_sfun_cso_B"
	  Parameters		  "Vmax,Qemax,n_comp,n_sed,tstep"
	}
	Block {
	  BlockType		  Demux
	  Name			  "Demux"
	  Ports			  [1, 3]
	  Position		  [260, 32, 275, 198]
	  BackgroundColor	  "black"
	  ShowName		  off
	  Outputs		  "[ (n_comp+1) (n_comp+1) (n_comp+1)]"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Qw"
	  Position		  [360, 53, 390, 67]
	}
	Block {
	  BlockType		  Outport
	  Name			  "Qe"
	  Position		  [360, 108, 390, 122]
	  Port			  "2"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Vi"
	  Position		  [360, 163, 390, 177]
	  Port			  "3"
	}
	Line {
	  SrcBlock		  "In"
	  SrcPort		  1
	  DstBlock		  "CSO FirstFlush1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "CSO FirstFlush1"
	  SrcPort		  1
	  DstBlock		  "Demux"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  1
	  DstBlock		  "Qw"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  2
	  DstBlock		  "Qe"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  3
	  DstBlock		  "Vi"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Constant
      Name		      "Constant"
      Position		      [845, 407, 905, 433]
      BackgroundColor	      "yellow"
    }
    Block {
      BlockType		      Demux
      Name		      "Demux"
      Ports		      [1, 2]
      Position		      [885, 274, 890, 321]
      BackgroundColor	      "black"
      Outputs		      "[13,1]"
      DisplayOption	      "bar"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Flowread"
      Ports		      [0, 1]
      Position		      [140, 214, 235, 266]
      BackgroundColor	      "orange"
      ShowPortLabels	      off
      TreatAsAtomicUnit	      off
      MaskType		      "CD1_Flowread"
      MaskDescription	      "Reads flowdata (Q) and substance concentration "
"(Ci) associated from ascii file. \n\nUsed function: \nCD1_sfun_flowread.m\nCD"
"1_mfun_flowread.m"
      MaskPromptString	      "Filename|Data type|Cylic repitition"
      MaskStyleString	      "edit,popup(Composite sample|Grab sample),checkb"
"ox"
      MaskTunableValueString  "on,on,on"
      MaskCallbackString      "||"
      MaskEnableString	      "on,on,on"
      MaskVisibilityString    "on,on,on"
      MaskToolTipString	      "on,on,on"
      MaskVarAliasString      ",,"
      MaskVariables	      "table0=@1;dtype=&2;crep=&3;"
      MaskInitialization      "table=CD1_mfun_flowread(table0);\n\n\n% reading"
" the toplevel systems' name \n% --> Plant file name;\ntls=bdroot(gcb); \n% Ob"
"taining the fixed sampling time\nt_samp_char=get_param(tls, 'FixedStep');\n% "
"Convertion to numeric value\ntstep = str2num(t_samp_char); \n"
      MaskDisplay	      "\nplot(0,0,100,100);\n\ntext(50,20,'FLOWREAD','"
"HorizontalAlignment','center');\n\nplot(\n[5 10 10 15 15 20 20 25 25 30 30 35"
" 35 40],\n[0 0 10 10 20 20 40 40 20 20 0 0 0 0]+50);\nplot(\n[5 10 15 20 25 3"
"0 35 ]+50,\n[0 5 10 15 30 20 0]+50);"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "'Input_CSO_QC_Test_01.txt'|Composite sample|off"
      System {
	Name			"Flowread"
	Location		[387, 341, 888, 700]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  "S-Function"
	  Name			  "flowread"
	  Ports			  [0, 1]
	  Position		  [45, 54, 170, 86]
	  FunctionName		  "CD1_sfun_flowread"
	  Parameters		  "dtype,crep,table,tstep"
	  MaskIconFrame		  on
	  MaskIconOpaque	  on
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "autoscale"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_1"
	  Position		  [250, 60, 270, 80]
	}
	Line {
	  SrcBlock		  "flowread"
	  SrcPort		  1
	  DstBlock		  "out_1"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "LOGO"
      Ports		      []
      Position		      [636, 17, 887, 137]
      ForegroundColor	      "white"
      TreatAsAtomicUnit	      off
      MaskType		      "LOGO CITY DRAIN"
      MaskDescription	      "Displays the City Drain Logo in Color\n\nSource"
" file: \nCityDrainLogo_C1.jpg"
      MaskDisplay	      "image(imread('CityDrainLogo_C1.jpg'));\ntext(10"
",50,'CITY DRAIN 1.0','HorizontalAlignment','left');\ntext(10,20,'Logo could n"
"ot be displayed','HorizontalAlignment','left');"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"LOGO"
	Location		[230, 112, 1254, 932]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "LOGO1"
      Ports		      []
      Position		      [514, 18, 598, 140]
      ForegroundColor	      "white"
      TreatAsAtomicUnit	      off
      MaskType		      "LOGO CITY DRAIN"
      MaskDescription	      "Displays the City Drain Logo in Color\n\nSource"
" file: \nCityDrainLogo_C1.jpg"
      MaskDisplay	      "image(imread('LOGO_IUT4C.jpg'));\ntext(10,50,'I"
"UT, University of Innsbruck','HorizontalAlignment','left');\ntext(10,20,'Logo"
" could not be displayed','HorizontalAlignment','left');"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"LOGO1"
	Location		[230, 112, 1254, 932]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Mixer "
      Ports		      [2, 1]
      Position		      [725, 203, 800, 252]
      BackgroundColor	      "[0.752941, 0.752941, 0.752941]"
      TreatAsAtomicUnit	      off
      MaskType		      "Mixer"
      MaskDescription	      "Performes mixing of pollutant fluxes Q1 and Q2 "
"in accordance to their hydraulic load.\n\nFunction used:\nCD1_sfun_mixing_QC."
"m"
      MaskPromptString	      "Number of pollutants [ - ]"
      MaskStyleString	      "edit"
      MaskTunableValueString  "on"
      MaskEnableString	      "on"
      MaskVisibilityString    "on"
      MaskToolTipString	      "on"
      MaskVariables	      "n_comp=@1;"
      MaskInitialization      "% reading the toplevel systems' name \n% --> Pl"
"ant file name;\ntls=bdroot(gcb); \n% Obtaining the fixed sampling time\nt_sam"
"p_char=get_param(tls, 'FixedStep');\n% Convertion to numeric value\ntstep = s"
"tr2num(t_samp_char); "
      MaskDisplay	      "plot(0,0,100,100);\n\ntext(50,50,'Mixing','Hori"
"zontalAlignment','center');\n\n\nport_label('input',1,'Q1');\nport_label('inp"
"ut',2,'Q2');\nport_label('output',1,'Qe');\n"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "1"
      System {
	Name			"Mixer "
	Location		[731, 409, 1137, 554]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  " 1"
	  Position		  [25, 28, 55, 42]
	  ShowName		  off
	}
	Block {
	  BlockType		  Inport
	  Name			  " "
	  Position		  [25, 48, 55, 62]
	  Port			  "2"
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux"
	  Ports			  [2, 1]
	  Position		  [80, 26, 85, 64]
	  ShowName		  off
	  Inputs		  "[n_comp+1,n_comp+1]"
	  DisplayOption		  "bar"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function"
	  Ports			  [1, 1]
	  Position		  [125, 29, 235, 61]
	  FunctionName		  "CD1_sfun_mixing_QC"
	  Parameters		  "n_comp,tstep"
	}
	Block {
	  BlockType		  Outport
	  Name			  " 3"
	  Position		  [320, 38, 350, 52]
	  ShowName		  off
	}
	Line {
	  SrcBlock		  " "
	  SrcPort		  1
	  DstBlock		  "Mux"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "S-Function"
	  SrcPort		  1
	  DstBlock		  " 3"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  " 1"
	  SrcPort		  1
	  DstBlock		  "Mux"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Mux"
	  SrcPort		  1
	  DstBlock		  "S-Function"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Musk oM-Q - 01"
      Ports		      [1, 2]
      Position		      [575, 288, 690, 352]
      BackgroundColor	      "lightBlue"
      TreatAsAtomicUnit	      off
      MaskType		      "Muskingum - Cunge flood rooting (original schem"
"e)"
      MaskDescription	      "Flood routing using the original scheme by Musk"
"ingum-Cunge for multiple river stretches for hydraulic routing only.\nThe blo"
"ck accepts flow inputs and returns effluent fluxes and current stated of reta"
"ined volume.\nIntial Conditions: V=0; and Qe=0;\n\nFunction used:\nCD1_sfun_M"
"uskingum_oM_Q.m"
      MaskPromptString	      "K (travel time of one subreach) [ s ]|X (weighi"
"ng factor) [ - ]|N (Number of sub-reaches) [ - ]"
      MaskStyleString	      "edit,edit,edit"
      MaskTunableValueString  "on,on,on"
      MaskCallbackString      "||"
      MaskEnableString	      "on,on,on"
      MaskVisibilityString    "on,on,on"
      MaskToolTipString	      "on,on,on"
      MaskVarAliasString      ",,"
      MaskVariables	      "K=@1;X=@2;N=@3;"
      MaskInitialization      "m=[5,5];%Offset for arrow \nl=[65,15];%Offset f"
"or arrow \nx=0; \ny=-15; %Offset for river\n\n% reading the toplevel systems'"
" name-> Plant file name;\ntls=bdroot(gcb); \n% Obtaining the fixed sampling t"
"ime\ntstep_char=get_param(tls, 'FixedStep');\n% Convertion to numeric value\n"
"dt = str2num(tstep_char); \n\n\n\n%Muskingum parameters\nD=K.*(1-X)+0.5.*dt;"
"\nC0=(0.5.*dt-K.*X)./D;\nC1=(0.5.*dt+K.*X)./D;\nC2=(K.*(1-X)-0.5.*dt)./D;\n"
      MaskDisplay	      "\nplot(0,0,100,100,\n[20,30,40,50,60,70,80]+x,"
"\n[35,40,45,50,45,40,45]+y,\n[20,30,40,50,60,70,80]+x,\n[75,85,90,95,90,85,90"
"]+y,\n[30,30]+x,[40,85]+y,\n[50,50]+x,[50,95]+y,\n[70,70]+x,[40,85]+y\n);\n\n"
"plot(\n[10,10,15,15,20,15,15,10]+m(1),\n[40,30,30,22,35,48,40,40]+m(2),\n[10,"
"10,15,15,20,15,15,10]+l(1),\n[40,30,30,22,35,48,40,40]+l(2)\n);\n\ntext(40+x,"
"65+y,'j');\ntext(55+x,65+y,'j+1');\n\ntext(50,90,'river q','HorizontalAlignme"
"nt','center');\ntext(50,10,'muskingum-oM-Q','HorizontalAlignment','center');"
"\n\nport_label('input',1,'qi');\nport_label('output',1,'qe');\nport_label('ou"
"tput',2,'v');\n"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "900|0.2|2"
      System {
	Name			"Musk oM-Q - 01"
	Location		[549, 617, 1063, 801]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "Qi"
	  Position		  [25, 98, 55, 112]
	}
	Block {
	  BlockType		  Demux
	  Name			  "Demux"
	  Ports			  [1, 2]
	  Position		  [310, 77, 315, 133]
	  BackgroundColor	  "black"
	  ShowName		  off
	  Outputs		  "[N+1,N]"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function1"
	  Ports			  [1, 1]
	  Position		  [90, 87, 265, 123]
	  FunctionName		  "CD1_sfun_Muskingum_oM_Q"
	  Parameters		  "dt,N,K,X,C0,C1,C2"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Q"
	  Position		  [390, 68, 420, 82]
	}
	Block {
	  BlockType		  Outport
	  Name			  "V"
	  Position		  [390, 128, 420, 142]
	  Port			  "2"
	}
	Line {
	  SrcBlock		  "Qi"
	  SrcPort		  1
	  DstBlock		  "S-Function1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  2
	  Points		  [40, 0; 0, 15]
	  DstBlock		  "V"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  1
	  Points		  [40, 0; 0, -15]
	  DstBlock		  "Q"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "S-Function1"
	  SrcPort		  1
	  DstBlock		  "Demux"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Musk oS-Q - 01"
      Ports		      [1, 2]
      Position		      [575, 199, 690, 266]
      BackgroundColor	      "lightBlue"
      TreatAsAtomicUnit	      off
      MaskType		      "Muskingum - Cunge flood rooting (original schem"
"e)"
      MaskDescription	      "Flood routing unsing the original scheme by Mus"
"kingum-Cunge for a single river stretch for hydraulic routing only.\nThe bloc"
"k accepts flow inputs and returns effluent fluxes and current stated of retai"
"ned volume.\nIntial Conditions: V=0; and Qe=0;\n\nFunction used:\nCD1_sfun_Mu"
"skingum_oS_Q.m\n"
      MaskPromptString	      "K (travel time of the reach) [s]|X (weighing fa"
"ctor)  [ - ]"
      MaskStyleString	      "edit,edit"
      MaskTunableValueString  "on,on"
      MaskCallbackString      "|"
      MaskEnableString	      "on,on"
      MaskVisibilityString    "on,on"
      MaskToolTipString	      "on,on"
      MaskVarAliasString      ","
      MaskVariables	      "K=@1;X=@2;"
      MaskInitialization      "% reading the toplevel systems' name \n% --> Pl"
"ant file name;\ntls=bdroot(gcb); \n% Obtaining the fixed sampling time\nt_sam"
"p_char=get_param(tls, 'FixedStep');\n% Convertion to numeric value\ndt = str2"
"num(t_samp_char); \n\n%Muskingum parameters\nD=K.*(1-X)+0.5.*dt;\nC0=(0.5.*dt"
"-K.*X)./D;\nC1=(0.5.*dt+K.*X)./D;\nC2=(K.*(1-X)-0.5.*dt)./D;\n\n"
      MaskDisplay	      "plot(0,0,100,100,\n[20,80],[30,20],[20,80],[80,"
"50],\n[20,20],[30,80],[80,80],[20,50],\n[15,27],[55,50],[24,27,24,24],[53,50,"
"48,53],\n[75,87],[35,30],[84,87,84,84],[33,30,28,33])\nplot([20,80],[60,50])"
"\n\ntext(50,40,'V');\ntext(50,90,'river q','HorizontalAlignment','center');\n"
"text(50,10,'muskingum-oS-Q','HorizontalAlignment','center');\n\nport_label('i"
"nput',1,'qi');\nport_label('output',1,'qe');\nport_label('output',2,'v');\n"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "300|0.2"
      System {
	Name			"Musk oS-Q - 01"
	Location		[421, 438, 1157, 919]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "Qi"
	  Position		  [25, 98, 55, 112]
	}
	Block {
	  BlockType		  Demux
	  Name			  "Demux"
	  Ports			  [1, 2]
	  Position		  [310, 77, 315, 133]
	  BackgroundColor	  "black"
	  ShowName		  off
	  Outputs		  "2"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function1"
	  Ports			  [1, 1]
	  Position		  [90, 87, 265, 123]
	  FunctionName		  "CD1_sfun_Muskingum_oS_Q"
	  Parameters		  "dt, K, X, C0, C1, C2"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Qe"
	  Position		  [390, 68, 420, 82]
	}
	Block {
	  BlockType		  Outport
	  Name			  "V"
	  Position		  [390, 128, 420, 142]
	  Port			  "2"
	}
	Line {
	  SrcBlock		  "S-Function1"
	  SrcPort		  1
	  DstBlock		  "Demux"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  1
	  Points		  [40, 0; 0, -15]
	  DstBlock		  "Qe"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  2
	  Points		  [40, 0; 0, 15]
	  DstBlock		  "V"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Qi"
	  SrcPort		  1
	  DstBlock		  "S-Function1"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Musk sM-QC - 01"
      Ports		      [1, 2]
      Position		      [575, 478, 690, 547]
      BackgroundColor	      "lightBlue"
      TreatAsAtomicUnit	      off
      MaskType		      "Muskingum - Cunge flood rooting - simplified sc"
"heme"
      MaskDescription	      "Flood routing using the Muskingum-Cunge scheme "
"for multiple river stretches for hydraulic and pollutant routing.\nThe block "
"accepts flow inputs and returns effluent fluxes and current stated of retaine"
"d volume.\nIntial Conditions: V=0; and Qe=0;\n\nFunction used:\nCD1_sfun_Musk"
"ingum_sM_QC.m"
      MaskPromptString	      "K (travel time of a subreach) [s]|X (weighing f"
"actor)  [ - ]|Number of pollutants [ - ]|N (Number of sub-reaches) [ - ]"
      MaskStyleString	      "edit,edit,edit,edit"
      MaskTunableValueString  "on,on,on,on"
      MaskCallbackString      "|||"
      MaskEnableString	      "on,on,on,on"
      MaskVisibilityString    "on,on,on,on"
      MaskToolTipString	      "on,on,on,on"
      MaskVarAliasString      ",,,"
      MaskVariables	      "K=@1;X=@2;n_comp=@3;N=@4;"
      MaskInitialization      "m=[5,5];%Offset for arrow \nl=[65,15];%Offset f"
"or arrow \nx=0; \ny=-15; %Offset for river\n\n% reading the toplevel systems'"
" name \n% --> Plant file name;\ntls=bdroot(gcb); \n% Obtaining the fixed samp"
"ling time\nt_samp_char=get_param(tls, 'FixedStep');\n% Convertion to numeric "
"value\ndt = str2num(t_samp_char); \n\n%Muskingum parameters\nCA=0.5.*dt-K.*X;"
"\nCB=0.5.*dt+K.*(1-X);\n\n\n"
      MaskDisplay	      "\nplot(0,0,100,100,\n[20,30,40,50,60,70,80]+x,"
"\n[35,40,45,50,45,40,45]+y,\n[20,30,40,50,60,70,80]+x,\n[75,85,90,95,90,85,90"
"]+y,\n[30,30]+x,[40,85]+y,\n[50,50]+x,[50,95]+y,\n[70,70]+x,[40,85]+y\n);\n\n"
"plot(\n[10,10,15,15,20,15,15,10]+m(1),\n[40,30,30,22,35,48,40,40]+m(2),\n[10,"
"10,15,15,20,15,15,10]+l(1),\n[40,30,30,22,35,48,40,40]+l(2)\n);\n\ntext(40+x,"
"65+y,'j');\ntext(55+x,65+y,'j+1');\n\ntext(50,90,'RIVER QC','HorizontalAlignm"
"ent','center');\ntext(50,10,'MUSKINGUM-sM-QC','HorizontalAlignment','center')"
";\n\nport_label('input',1,'Qi');\nport_label('output',1,'Qe');\nport_label('o"
"utput',2,'V');"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "300|0.3|1|1"
      System {
	Name			"Musk sM-QC - 01"
	Location		[231, 167, 967, 648]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "Qi"
	  Position		  [25, 98, 55, 112]
	}
	Block {
	  BlockType		  Demux
	  Name			  "Demux"
	  Ports			  [1, 2]
	  Position		  [310, 77, 315, 133]
	  BackgroundColor	  "black"
	  ShowName		  off
	  Outputs		  "2"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function1"
	  Ports			  [1, 1]
	  Position		  [90, 87, 265, 123]
	  FunctionName		  "CD1_sfun_Muskingum_sM_QC"
	  Parameters		  "dt, K, X, CA, CB, n_comp,N"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Qe"
	  Position		  [390, 68, 420, 82]
	}
	Block {
	  BlockType		  Outport
	  Name			  "V"
	  Position		  [390, 128, 420, 142]
	  Port			  "2"
	}
	Line {
	  SrcBlock		  "S-Function1"
	  SrcPort		  1
	  DstBlock		  "Demux"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  1
	  Points		  [40, 0; 0, -15]
	  DstBlock		  "Qe"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  2
	  Points		  [40, 0; 0, 15]
	  DstBlock		  "V"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Qi"
	  SrcPort		  1
	  DstBlock		  "S-Function1"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Musk sS-QC - 01"
      Ports		      [1, 2]
      Position		      [575, 379, 690, 446]
      BackgroundColor	      "lightBlue"
      TreatAsAtomicUnit	      off
      MaskType		      "Muskingum - Cunge flood rooting "
      MaskDescription	      "Flood routing using the Muskingum-Cunge scheme "
"for a single river stretch. Routing is provide for hydraulics and pollutants "
"using a simplified discrete scheme.\nThe block accepts flow inputs and return"
"s effluent fluxes and current states of retained volume.\nIntial Conditions: "
"V=0; and Qe=0;\n\nFunction used:\nCD1_sfun_Muskingum_sS_QC.m"
      MaskPromptString	      "K (travel time of the reach) [s]|X (weighing fa"
"ctor)  [ - ]|Number of pollutants n [ - ]"
      MaskStyleString	      "edit,edit,edit"
      MaskTunableValueString  "on,on,on"
      MaskCallbackString      "||"
      MaskEnableString	      "on,on,on"
      MaskVisibilityString    "on,on,on"
      MaskToolTipString	      "on,on,on"
      MaskVarAliasString      ",,"
      MaskVariables	      "K=@1;X=@2;n_comp=@3;"
      MaskInitialization      "% reading the toplevel systems' name \n% --> Pl"
"ant file name;\ntls=bdroot(gcb); \n% Obtaining the fixed sampling time\nt_sam"
"p_char=get_param(tls, 'FixedStep');\n% Convertion to numeric value\ndt = str2"
"num(t_samp_char); \n\n%Muskingum parameters\nCA=0.5.*dt-K.*X;\nCB=0.5.*dt+K.*"
"(1-X);\n\n\n"
      MaskDisplay	      "plot(0,0,100,100,\n[20,80],[30,20],[20,80],[80,"
"50],\n[20,20],[30,80],[80,80],[20,50],\n[15,27],[55,50],[24,27,24,24],[53,50,"
"48,53],\n[75,87],[35,30],[84,87,84,84],[33,30,28,33]);\nplot([20,80],[60,50])"
"\n\n\ntext(50,40,'V');\n\ntext(50,90,'RIVER QC','HorizontalAlignment','center"
"');\ntext(50,10,'MUSKINGUM sS-QC','HorizontalAlignment','center');\n\nport_la"
"bel('input',1,'Qi');\nport_label('output',1,'Qe');\nport_label('output',2,'V'"
");\n"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "300|0.2|1"
      System {
	Name			"Musk sS-QC - 01"
	Location		[504, 402, 1240, 883]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "Qi"
	  Position		  [25, 98, 55, 112]
	}
	Block {
	  BlockType		  Demux
	  Name			  "Demux"
	  Ports			  [1, 2]
	  Position		  [310, 77, 315, 133]
	  BackgroundColor	  "black"
	  ShowName		  off
	  Outputs		  "2"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function1"
	  Ports			  [1, 1]
	  Position		  [90, 87, 265, 123]
	  FunctionName		  "CD1_sfun_Muskingum_sS_QC"
	  Parameters		  "dt, K, X, CA, CB, n_comp"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Qe"
	  Position		  [390, 68, 420, 82]
	}
	Block {
	  BlockType		  Outport
	  Name			  "V"
	  Position		  [390, 128, 420, 142]
	  Port			  "2"
	}
	Line {
	  SrcBlock		  "S-Function1"
	  SrcPort		  1
	  DstBlock		  "Demux"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  1
	  Points		  [40, 0; 0, -15]
	  DstBlock		  "Qe"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  2
	  Points		  [40, 0; 0, 15]
	  DstBlock		  "V"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Qi"
	  SrcPort		  1
	  DstBlock		  "S-Function1"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Mux
      Name		      "Mux"
      Ports		      [2, 1]
      Position		      [850, 274, 855, 321]
      Inputs		      "[13,1]"
      DisplayOption	      "bar"
    }
    Block {
      BlockType		      SubSystem
      Name		      "RAINGENERATOR"
      Ports		      [0, 1]
      Position		      [140, 385, 235, 435]
      BackgroundColor	      "orange"
      TreatAsAtomicUnit	      off
      MaskType		      "Rain Generator"
      MaskDescription	      "Generates rain pattern by means of stochstics."
      MaskPromptString	      "Parameters [a,b,c,d]"
      MaskStyleString	      "edit"
      MaskTunableValueString  "on"
      MaskEnableString	      "on"
      MaskVisibilityString    "on"
      MaskToolTipString	      "on"
      MaskVariables	      "param=@1;"
      MaskInitialization      "a=param(1);\nb=param(2);\nc=param(3);\nd=param("
"4);\n\n% reading the toplevel systems' name \n% --> Plant file name;\ntls=bdr"
"oot(gcb); \n% Obtaining the fixed sampling time\nt_samp_char=get_param(tls, '"
"FixedStep');\n% Convertion to numeric value\nt_step = str2num(t_samp_char); "
      MaskDisplay	      "plot(0,0,100,100);\n\ntext(60,40,'RAIN');\ntext"
"(20,10,'GENERATOR');\n\nplot([4 4],[20 40]);\nplot([6 6],[20 30]);\nplot([8 8"
"],[20 35]);\nplot([10 10],[20 50]);\nplot([12 12],[20 55]);\nplot([14 14],[20"
" 20]);\nplot([16 16],[20 22]);\nplot([18 18],[20 22]);\nplot([20 20],[20 45])"
";\nplot([22 22],[20 50]);\nplot([24 24],[20 20]);\nplot([26 26],[20 20]);\npl"
"ot([28 28],[20 20]);\nplot([30 30],[20 60]);"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "[1,3,0.2,0.3]"
      System {
	Name			"RAINGENERATOR"
	Location		[516, 474, 1003, 653]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function"
	  Ports			  [0, 1]
	  Position		  [25, 26, 160, 64]
	  FunctionName		  "CD1_sfun_raingenerator"
	  Parameters		  "t_step,a,b,c,d"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Output Signal: mm/timestep"
	  Position		  [335, 38, 365, 52]
	}
	Line {
	  SrcBlock		  "S-Function"
	  SrcPort		  1
	  DstBlock		  "Output Signal: mm/timestep"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Rainread"
      Ports		      [0, 1]
      Position		      [140, 299, 235, 351]
      BackgroundColor	      "orange"
      ShowPortLabels	      off
      TreatAsAtomicUnit	      off
      MaskType		      "Rain Read"
      MaskDescription	      "Read raindata from ASCII File in following form"
"ats:\n\n*.ixx ... Format used by the Austrian Hydrographic Service.\n*.km2 .."
". Format used in the Mouse Software from DHI (Danish Hydraulic Institute)\n*."
"mse ... modified mse format used in  Mouse Software from DHI (Danish Hydrauli"
"c Institute)\n\nUsed function: CD1_mfun_rainread.m"
      MaskPromptString	      "Filename|Cylic repitition"
      MaskStyleString	      "edit,checkbox"
      MaskTunableValueString  "on,on"
      MaskCallbackString      "|"
      MaskEnableString	      "on,on"
      MaskVisibilityString    "on,on"
      MaskToolTipString	      "on,on"
      MaskVarAliasString      ","
      MaskVariables	      "table0=@1;crep=&2;"
      MaskInitialization      "% cache table size set to 1000\n%table=zeros(10"
"00,2)\n[table,tablestep]=CD1_mfun_rainread(table0);\n\n% reading the toplevel"
" systems' name \n% --> Plant file name;\ntls=bdroot(gcb); \n% Obtaining the f"
"ixed sampling time\nt_samp_char=get_param(tls, 'FixedStep');\n% Convertion to"
" numeric value\ntstep = str2num(t_samp_char); \n"
      MaskDisplay	      "plot(0,0,100,100);\n\ntext(40,40,'RAIN READ');"
"\nplot(\n[5 10 10 15 15 20 20 25 25 30 30 40 40 45],\n[0 0 20 20 40 40 60 60 "
"30 30 0 0 0 0]+20);\n"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "'test2.km2'|off"
      System {
	Name			"Rainread"
	Location		[755, 519, 1237, 653]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  "S-Function"
	  Name			  "rainread"
	  Ports			  [0, 1]
	  Position		  [45, 54, 170, 86]
	  FunctionName		  "CD1_sfun_rainread"
	  Parameters		  "crep,table,tablestep,tstep"
	  MaskIconFrame		  on
	  MaskIconOpaque	  on
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "autoscale"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_1"
	  Position		  [250, 60, 270, 80]
	}
	Line {
	  SrcBlock		  "rainread"
	  SrcPort		  1
	  DstBlock		  "out_1"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Sewer TL Model"
      Ports		      [1, 1]
      Position		      [425, 479, 540, 521]
      BackgroundColor	      "red"
      TreatAsAtomicUnit	      off
      MaskType		      "SEWER Translation Model"
      MaskDescription	      "Block accepts Qi as inflow carrying a number of"
" pollutants (n_comp)\nOutput is the flow at the end of sewer Qe\n\nFunction u"
"sed: \nCD1_sfun_sewer_tlmodel.m\n"
      MaskPromptString	      "Transport time in No of Timesteps ()|Number of "
"Components ()"
      MaskStyleString	      "edit,edit"
      MaskTunableValueString  "on,on"
      MaskCallbackString      "|"
      MaskEnableString	      "on,on"
      MaskVisibilityString    "on,on"
      MaskToolTipString	      "on,on"
      MaskVarAliasString      ","
      MaskVariables	      "n_elem=@1;n_comp=@2;"
      MaskInitialization      "%arrow location in icon\nkx=70;\nky=25;\n% pict"
"ure location\nx=20;y=25;\n\n\n% reading the toplevel systems' name \n% --> Pl"
"ant file name;\ntls=bdroot(gcb); \n% Obtaining the fixed sampling time\nt_sam"
"p_char=get_param(tls, 'FixedStep');\n% Convertion to numeric value\ntstep = s"
"tr2num(t_samp_char); \n"
      MaskDisplay	      "\nplot(0,0,100,50,\n[0,50,50,0,0]+x,[-10,-10,10"
",10,-10]+y,\n[10,10]+x,[-10,10]+y,\n[20,20]+x,[-10,10]+y,\n[30,30]+x,[-10,10]"
"+y,\n[40,40]+x,[-10,10]+y,\n[0,0,5,5,10,5,5,0]+kx,\n[5,-5,-5,-13,0,13,5,5]+ky"
"\n);\n\n\ntext(50,7,'SEWER TL MODEL','HorizontalAlignment','center');\n\nport"
"_label('input',1,'Qi');\nport_label('output',1,'Qe');\n"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "5|1"
      System {
	Name			"Sewer TL Model"
	Location		[516, 245, 1039, 640]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "Qi"
	  Position		  [25, 98, 55, 112]
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "SEWER TL Model1"
	  Ports			  [1, 1]
	  Position		  [140, 89, 290, 121]
	  FunctionName		  "CD1_sfun_sewer_tlmodel"
	  Parameters		  "n_elem,n_comp,tstep"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Qe"
	  Position		  [385, 98, 415, 112]
	}
	Line {
	  SrcBlock		  "Qi"
	  SrcPort		  1
	  DstBlock		  "SEWER TL Model1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "SEWER TL Model1"
	  SrcPort		  1
	  DstBlock		  "Qe"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Sewer TL Model1"
      Ports		      [2, 1]
      Position		      [425, 549, 540, 591]
      BackgroundColor	      "red"
      TreatAsAtomicUnit	      off
      MaskType		      "SEWER TL - Translation Model"
      MaskDescription	      "Block accepts Qi as inflow carrying a number of"
" pollutants (n_comp). Flow of parasite water (Qp) is optional.\nOutput is the"
" flow at the end of sewer Qe.\n\nFunction used: \nCD1_sfun_sewer_tlmodel.m\n"
      MaskPromptString	      "Transport time in No of Timesteps ()|Number of "
"Components ()"
      MaskStyleString	      "edit,edit"
      MaskTunableValueString  "on,on"
      MaskCallbackString      "|"
      MaskEnableString	      "on,on"
      MaskVisibilityString    "on,on"
      MaskToolTipString	      "on,on"
      MaskVarAliasString      ","
      MaskVariables	      "n_elem=@1;n_comp=@2;"
      MaskInitialization      "%arrow location in icon\nkx=70;\nky=25;\n% pict"
"ure location\nx=20;y=25;\n\n\n% reading the toplevel systems' name \n% --> Pl"
"ant file name;\ntls=bdroot(gcb); \n% Obtaining the fixed sampling time\nt_sam"
"p_char=get_param(tls, 'FixedStep');\n% Convertion to numeric value\ntstep = s"
"tr2num(t_samp_char); \n"
      MaskDisplay	      "\nplot(0,0,100,50,\n[0,50,50,0,0]+x,[-10,-10,10"
",10,-10]+y,\n[10,10]+x,[-10,10]+y,\n[20,20]+x,[-10,10]+y,\n[30,30]+x,[-10,10]"
"+y,\n[40,40]+x,[-10,10]+y,\n[0,0,5,5,10,5,5,0]+kx,\n[5,-5,-5,-13,0,13,5,5]+ky"
"\n);\n\n\ntext(50,7,'SEWER TL','HorizontalAlignment','center');\n\nport_label"
"('input',1,'Qi');\nport_label('input',2,'Qp');\nport_label('output',1,'Qe');"
"\n\n"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "5|1"
      System {
	Name			"Sewer TL Model1"
	Location		[363, 445, 1134, 840]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "Qi"
	  Position		  [25, 78, 55, 92]
	}
	Block {
	  BlockType		  Inport
	  Name			  "qp"
	  Position		  [25, 128, 55, 142]
	  Port			  "2"
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Parasite water"
	  Ports			  [2, 1]
	  Position		  [190, 94, 290, 136]
	  TreatAsAtomicUnit	  off
	  System {
	    Name		    "Parasite water"
	    Location		    [262, 546, 1106, 930]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "Qi"
	      Position		      [60, 58, 90, 72]
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "Qp"
	      Position		      [60, 108, 90, 122]
	      Port		      "2"
	    }
	    Block {
	      BlockType		      Mux
	      Name		      "Mux"
	      Ports		      [2, 1]
	      Position		      [375, 66, 380, 104]
	      ShowName		      off
	      Inputs		      "[n_comp+1,n_comp+1]"
	      DisplayOption	      "bar"
	    }
	    Block {
	      BlockType		      "S-Function"
	      Name		      "S-Function"
	      Ports		      [1, 1]
	      Position		      [410, 69, 520, 101]
	      FunctionName	      "CD1_sfun_mixing_QC"
	      Parameters	      "n_comp,tstep"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Oi+Qp"
	      Position		      [550, 78, 580, 92]
	    }
	    Line {
	      SrcBlock		      "Mux"
	      SrcPort		      1
	      DstBlock		      "S-Function"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "S-Function"
	      SrcPort		      1
	      DstBlock		      "Oi+Qp"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Qi"
	      SrcPort		      1
	      Points		      [130, 0; 0, 10]
	      DstBlock		      "Mux"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Qp"
	      SrcPort		      1
	      Points		      [240, 0; 0, -20]
	      DstBlock		      "Mux"
	      DstPort		      2
	    }
	  }
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "SEWER TL Model1"
	  Ports			  [1, 1]
	  Position		  [520, 89, 670, 121]
	  FunctionName		  "CD1_sfun_sewer_tlmodel"
	  Parameters		  "n_elem,n_comp,tstep"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Qe"
	  Position		  [710, 98, 740, 112]
	}
	Line {
	  SrcBlock		  "SEWER TL Model1"
	  SrcPort		  1
	  DstBlock		  "Qe"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Qi"
	  SrcPort		  1
	  Points		  [55, 0; 0, 20]
	  DstBlock		  "Parasite water"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "qp"
	  SrcPort		  1
	  Points		  [55, 0; 0, -10]
	  DstBlock		  "Parasite water"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Parasite water"
	  SrcPort		  1
	  Points		  [105, 0; 0, -10]
	  DstBlock		  "SEWER TL Model1"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      "S-Function"
      Name		      "Sum QC (t)1"
      Ports		      [1, 1]
      Position		      [840, 358, 905, 382]
      FunctionName	      "CD1_sfun_sum_QC"
      Parameters	      "n_p, tstep"
      MaskType		      "Cumulation of Masses"
      MaskDescription	      "This block returns the total hydraulic load V ["
"m3] and the pollutant load M [g] during the simulation run.\n\nFunction used:"
"\nCD1_sfun_sum_QC_t.m"
      MaskPromptString	      "Number of pollutants [ - ]"
      MaskStyleString	      "edit"
      MaskTunableValueString  "on"
      MaskEnableString	      "on"
      MaskVisibilityString    "on"
      MaskToolTipString	      "on"
      MaskVariables	      "n_p=@1;"
      MaskInitialization      "\n\n% reading the toplevel systems' name \n% --"
"> Plant file name;\ntls=bdroot(gcb); \n% Obtaining the fixed sampling time\nt"
"_samp_char=get_param(tls, 'FixedStep');\n% Convertion to numeric value\ntstep"
" = str2num(t_samp_char); "
      MaskDisplay	      "plot(0,0,100,100);\ntext(50,50,'Sum QC(t)','Hor"
"izontalAlignment','center');"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "1"
    }
    Block {
      BlockType		      Terminator
      Name		      "Terminator"
      Position		      [870, 470, 890, 490]
    }
    Block {
      BlockType		      ToFile
      Name		      "To File"
      Position		      [850, 579, 915, 611]
      BackgroundColor	      "cyan"
      Filename		      "output.mat"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "To Workspace1"
      Position		      [850, 519, 910, 551]
      BackgroundColor	      "cyan"
      VariableName	      "yout"
      MaxDataPoints	      "inf"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Tutorial"
      Ports		      []
      Position		      [15, 364, 95, 445]
      BackgroundColor	      "orange"
      OpenFcn		      "open('CD1_B_Tutorial.pdf');"
      ShowPortLabels	      off
      TreatAsAtomicUnit	      off
      MaskType		      "Open Usermanual"
      MaskInitialization      "\n"
      MaskDisplay	      "text(50,70,'CITY DRAIN 1.0','HorizontalAlignmen"
"t','center');\ntext(50,40,'Tutorial','HorizontalAlignment','center');\nimage("
"imread('CD1_start_tutorial.jpg'));\n"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"Tutorial"
	Location		[574, 421, 1168, 915]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "User Manual"
      Ports		      []
      Position		      [15, 214, 98, 316]
      BackgroundColor	      "orange"
      OpenFcn		      "open('CD1_A_UserManual.pdf');"
      ShowPortLabels	      off
      TreatAsAtomicUnit	      off
      MaskType		      "Open Usermanual"
      MaskInitialization      "\n"
      MaskDisplay	      "\n\ntext(50,70,'CITY DRAIN 1.0','HorizontalAlig"
"nment','center');\ntext(50,40,'User Manual','HorizontalAlignment','center');"
"\nimage(imread('CD1_start_user_manual.jpg'));\n"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"User Manual"
	Location		[574, 421, 1168, 915]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "WWTP"
      Ports		      [1, 1]
      Position		      [430, 391, 530, 449]
      TreatAsAtomicUnit	      off
      MaskType		      "WWTP"
      MaskDescription	      "Simple WWTP model. Inflow given is treated acco"
"rding to userdefined maximum concnetration limits and treatment efficiencies."
" \n\nFunction used:\nCD1_sfun_WWTP.m"
      MaskPromptString	      "Removal Efficiency REmin [-]|Maximum effluent c"
"oncnetration Cemax [g/m³]|Number of Components ()"
      MaskStyleString	      "edit,edit,edit"
      MaskTunableValueString  "on,on,on"
      MaskCallbackString      "||"
      MaskEnableString	      "on,on,on"
      MaskVisibilityString    "on,on,on"
      MaskToolTipString	      "on,on,on"
      MaskVarAliasString      ",,"
      MaskVariables	      "REmin=@1;Cemax=@2;n_comp=@3;"
      MaskInitialization      "% reading the toplevel systems' name \n% --> Pl"
"ant file name;\ntls=bdroot(gcb); \n% Obtaining the fixed sampling time\nt_sam"
"p_char=get_param(tls, 'FixedStep');\n% Convertion to numeric value\ntstep = s"
"tr2num(t_samp_char); \n\nRE=REmin;\nfor i=1:n_comp\n	if REmin(i) < 0 "
"\n		RE(i)=0;\n		fprintf('WARNING, Block WWTP:  Re"
"moval efficientc of component %u has set to 0, User input REmin <0 \\n',i);\n"
"	elseif REmin(i) > 1\n		RE(i)=1;\n		fprint"
"f('WARNING, Block WWTP:  Removal efficientc of component %u has set to 1, Use"
"r input REmin >1 \\n',i);\n	else\n		RE(i)=REmin(i);\n"
"	end\nend\nfprintf('\\n');"
      MaskDisplay	      "\nplot(0,0,100,100);\nplot(\n[20,50,50,20,20],["
"30,30,55,55,30],\n[60,80,70,60],[60,60,20,60],\n[50, 65],[40,40]\n);\n\n\ntex"
"t(50,80,'WWTP','HorizontalAlignment','center');\ntext(50,20,'--','HorizontalA"
"lignment','center');\n\n\nport_label('input',1,'Qi');\nport_label('output',1,"
"'Qw');"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "[0.85 0.8 0.75]|[5 .2 .5]|3"
      System {
	Name			"WWTP"
	Location		[449, 422, 1106, 682]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "In"
	  Position		  [15, 108, 45, 122]
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "WWTP v01 - 1"
	  Ports			  [1, 1]
	  Position		  [80, 95, 210, 135]
	  FunctionName		  "CD1_sfun_WWTP"
	  Parameters		  "n_comp,RE,Cemax,tstep"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Qw"
	  Position		  [290, 108, 320, 122]
	}
	Line {
	  SrcBlock		  "In"
	  SrcPort		  1
	  DstBlock		  "WWTP v01 - 1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "WWTP v01 - 1"
	  SrcPort		  1
	  DstBlock		  "Qw"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Selector
      Name		      "x,V1"
      Ports		      [1, 1]
      Position		      [840, 211, 890, 249]
      Elements		      "(1:14)"
      InputPortWidth	      "3*14"
    }
    Annotation {
      Name		      "TOOLS"
      Position		      [798, 178]
      DropShadow	      on
      FontName		      "Arial"
      FontSize		      12
      FontWeight	      "bold"
    }
    Annotation {
      Name		      "SOURCE"
      Position		      [173, 178]
      DropShadow	      on
      FontName		      "Arial"
      FontSize		      12
      FontWeight	      "bold"
    }
    Annotation {
      Name		      "RIVER"
      Position		      [633, 178]
      DropShadow	      on
      FontName		      "Arial"
      FontSize		      12
      FontWeight	      "bold"
    }
    Annotation {
      Name		      "CATCHMENT\nSEWER"
      Position		      [403, 173]
      DropShadow	      on
      FontName		      "Arial"
      FontSize		      12
      FontWeight	      "bold"
    }
    Annotation {
      Name		      "MANUALS"
      Position		      [48, 178]
      DropShadow	      on
      FontName		      "Arial"
      FontSize		      12
      FontWeight	      "bold"
    }
  }
}
