Model {
  Name			  "Diabetes_simulation"
  Version		  7.7
  MdlSubVersion		  0
  GraphicalInterface {
    NumRootInports	    0
    NumRootOutports	    0
    ParameterArgumentNames  ""
    ComputedModelVersion    "1.791"
    NumModelReferences	    0
    NumTestPointedSignals   0
  }
  SavedCharacterEncoding  "windows-1252"
  SaveDefaultBlockParams  on
  ScopeRefreshTime	  0.035000
  OverrideScopeRefreshTime on
  DisableAllScopes	  off
  DataTypeOverride	  "UseLocalSettings"
  DataTypeOverrideAppliesTo "AllNumericTypes"
  MinMaxOverflowLogging	  "UseLocalSettings"
  MinMaxOverflowArchiveMode "Overwrite"
  MaxMDLFileLineLength	  120
  Created		  "Tue Dec 18 09:41:54 2001"
  Creator		  "magni"
  UpdateHistory		  "UpdateHistoryNever"
  ModifiedByFormat	  "%<Auto>"
  LastModifiedBy	  "Fredrik"
  ModifiedDateFormat	  "%<Auto>"
  LastModifiedDate	  "Wed Nov 27 15:42:32 2013"
  RTWModifiedTimeStamp	  307467750
  ModelVersionFormat	  "1.%<AutoIncrement:791>"
  ConfigurationManager	  "none"
  SampleTimeColors	  off
  SampleTimeAnnotations	  off
  LibraryLinkDisplay	  "none"
  WideLines		  off
  ShowLineDimensions	  off
  ShowPortDataTypes	  off
  ShowLoopsOnError	  on
  IgnoreBidirectionalLines off
  ShowStorageClass	  off
  ShowTestPointIcons	  on
  ShowSignalResolutionIcons on
  ShowViewerIcons	  on
  SortedOrder		  off
  ExecutionContextIcon	  off
  ShowLinearizationAnnotations on
  BlockNameDataTip	  off
  BlockParametersDataTip  off
  BlockDescriptionStringDataTip	off
  ToolBar		  on
  StatusBar		  on
  BrowserShowLibraryLinks off
  BrowserLookUnderMasks	  off
  SimulationMode	  "normal"
  LinearizationMsg	  "none"
  Profile		  off
  ParamWorkspaceSource	  "MATLABWorkspace"
  AccelSystemTargetFile	  "accel.tlc"
  AccelTemplateMakefile	  "accel_default_tmf"
  AccelMakeCommand	  "make_rtw"
  TryForcingSFcnDF	  off
  RecordCoverage	  off
  CovPath		  "/"
  CovSaveName		  "covdata"
  CovMetricSettings	  "dw"
  CovNameIncrementing	  off
  CovHtmlReporting	  on
  CovForceBlockReductionOff on
  covSaveCumulativeToWorkspaceVar on
  CovSaveSingleToWorkspaceVar on
  CovCumulativeVarName	  "covCumulativeData"
  CovCumulativeReport	  off
  CovReportOnPause	  on
  CovModelRefEnable	  "Off"
  CovExternalEMLEnable	  off
  ExtModeBatchMode	  off
  ExtModeEnableFloating	  on
  ExtModeTrigType	  "manual"
  ExtModeTrigMode	  "normal"
  ExtModeTrigPort	  "1"
  ExtModeTrigElement	  "any"
  ExtModeTrigDuration	  1000
  ExtModeTrigDurationFloating "auto"
  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 off
  BufferReuse		  off
  ShowModelReferenceBlockVersion off
  ShowModelReferenceBlockIO off
  Array {
    Type		    "Handle"
    Dimension		    1
    Simulink.ConfigSet {
      $ObjectID		      1
      Version		      "1.11.0"
      Array {
	Type			"Handle"
	Dimension		8
	Simulink.SolverCC {
	  $ObjectID		  2
	  Version		  "1.11.0"
	  StartTime		  "0.0"
	  StopTime		  "2880"
	  AbsTol		  "auto"
	  FixedStep		  "parameters.passo_int"
	  InitialStep		  "auto"
	  MaxNumMinSteps	  "-1"
	  MaxOrder		  5
	  ZcThreshold		  "auto"
	  ConsecutiveZCsStepRelTol "10*128*eps"
	  MaxConsecutiveZCs	  "1000"
	  ExtrapolationOrder	  4
	  NumberNewtonIterations  1
	  MaxStep		  "auto"
	  MinStep		  "auto"
	  MaxConsecutiveMinStep	  "1"
	  RelTol		  "1e-3"
	  SolverMode		  "SingleTasking"
	  ConcurrentTasks	  off
	  Solver		  "ode4"
	  SolverName		  "ode4"
	  SolverJacobianMethodControl "auto"
	  ShapePreserveControl	  "DisableAll"
	  ZeroCrossControl	  "UseLocalSettings"
	  ZeroCrossAlgorithm	  "Nonadaptive"
	  AlgebraicLoopSolver	  "TrustRegion"
	  SolverResetMethod	  "Fast"
	  PositivePriorityOrder	  off
	  AutoInsertRateTranBlk	  off
	  SampleTimeConstraint	  "Unconstrained"
	  InsertRTBMode		  "Whenever possible"
	}
	Simulink.DataIOCC {
	  $ObjectID		  3
	  Version		  "1.11.0"
	  Decimation		  "1"
	  ExternalInput		  "[t, u]"
	  FinalStateName	  "xFinal"
	  InitialState		  "xInitial"
	  LimitDataPoints	  on
	  MaxDataPoints		  "1000"
	  LoadExternalInput	  off
	  LoadInitialState	  off
	  SaveFinalState	  off
	  SaveCompleteFinalSimState off
	  SaveFormat		  "Array"
	  SignalLoggingSaveFormat "ModelDataLogs"
	  SaveOutput		  on
	  SaveState		  off
	  SignalLogging		  on
	  DSMLogging		  on
	  InspectSignalLogs	  off
	  SaveTime		  on
	  ReturnWorkspaceOutputs  off
	  StateSaveName		  "xout"
	  TimeSaveName		  "tout"
	  OutputSaveName	  "yout"
	  SignalLoggingName	  "logsout"
	  DSMLoggingName	  "dsmout"
	  OutputOption		  "RefineOutputTimes"
	  OutputTimes		  "[]"
	  ReturnWorkspaceOutputsName "out"
	  Refine		  "1"
	}
	Simulink.OptimizationCC {
	  $ObjectID		  4
	  Version		  "1.11.0"
	  Array {
	    Type		    "Cell"
	    Dimension		    4
	    Cell		    "ZeroExternalMemoryAtStartup"
	    Cell		    "ZeroInternalMemoryAtStartup"
	    Cell		    "NoFixptDivByZeroProtection"
	    Cell		    "OptimizeModelRefInitCode"
	    PropName		    "DisabledProps"
	  }
	  BlockReduction	  off
	  BooleanDataType	  off
	  ConditionallyExecuteInputs on
	  InlineParams		  off
	  UseIntDivNetSlope	  off
	  UseSpecifiedMinMax	  off
	  InlineInvariantSignals  off
	  OptimizeBlockIOStorage  on
	  BufferReuse		  off
	  EnhancedBackFolding	  off
	  StrengthReduction	  off
	  ExpressionFolding	  on
	  BooleansAsBitfields	  off
	  BitfieldContainerType	  "uint_T"
	  EnableMemcpy		  on
	  MemcpyThreshold	  64
	  PassReuseOutputArgsAs	  "Structure reference"
	  ExpressionDepthLimit	  2147483647
	  FoldNonRolledExpr	  on
	  LocalBlockOutputs	  on
	  RollThreshold		  5
	  SystemCodeInlineAuto	  off
	  StateBitsets		  off
	  DataBitsets		  off
	  UseTempVars		  off
	  ZeroExternalMemoryAtStartup on
	  ZeroInternalMemoryAtStartup on
	  InitFltsAndDblsToZero	  on
	  NoFixptDivByZeroProtection off
	  EfficientFloat2IntCast  off
	  EfficientMapNaN2IntZero on
	  OptimizeModelRefInitCode off
	  LifeSpan		  "inf"
	  MaxStackSize		  "Inherit from target"
	  BufferReusableBoundary  on
	  SimCompilerOptimization "Off"
	  AccelVerboseBuild	  off
	  AccelParallelForEachSubsystem	on
	}
	Simulink.DebuggingCC {
	  $ObjectID		  5
	  Version		  "1.11.0"
	  RTPrefix		  "error"
	  ConsistencyChecking	  "none"
	  ArrayBoundsChecking	  "none"
	  SignalInfNanChecking	  "none"
	  SignalRangeChecking	  "none"
	  ReadBeforeWriteMsg	  "UseLocalSettings"
	  WriteAfterWriteMsg	  "UseLocalSettings"
	  WriteAfterReadMsg	  "UseLocalSettings"
	  AlgebraicLoopMsg	  "none"
	  ArtificialAlgebraicLoopMsg "warning"
	  SaveWithDisabledLinksMsg "warning"
	  SaveWithParameterizedLinksMsg	"none"
	  CheckSSInitialOutputMsg on
	  UnderspecifiedInitializationDetection	"Classic"
	  MergeDetectMultiDrivingBlocksExec "none"
	  CheckExecutionContextPreStartOutputMsg off
	  CheckExecutionContextRuntimeOutputMsg	off
	  SignalResolutionControl "TryResolveAllWithWarning"
	  BlockPriorityViolationMsg "warning"
	  MinStepSizeMsg	  "warning"
	  TimeAdjustmentMsg	  "none"
	  MaxConsecutiveZCsMsg	  "error"
	  MaskedZcDiagnostic	  "warning"
	  IgnoredZcDiagnostic	  "warning"
	  SolverPrmCheckMsg	  "none"
	  InheritedTsInSrcMsg	  "warning"
	  DiscreteInheritContinuousMsg "warning"
	  MultiTaskDSMMsg	  "warning"
	  MultiTaskCondExecSysMsg "none"
	  MultiTaskRateTransMsg	  "error"
	  SingleTaskRateTransMsg  "none"
	  TasksWithSamePriorityMsg "warning"
	  SigSpecEnsureSampleTimeMsg "warning"
	  CheckMatrixSingularityMsg "none"
	  IntegerOverflowMsg	  "warning"
	  Int32ToFloatConvMsg	  "warning"
	  ParameterDowncastMsg	  "error"
	  ParameterOverflowMsg	  "error"
	  ParameterUnderflowMsg	  "none"
	  ParameterPrecisionLossMsg "warning"
	  ParameterTunabilityLossMsg "warning"
	  FixptConstUnderflowMsg  "none"
	  FixptConstOverflowMsg	  "none"
	  FixptConstPrecisionLossMsg "none"
	  UnderSpecifiedDataTypeMsg "none"
	  UnnecessaryDatatypeConvMsg "none"
	  VectorMatrixConversionMsg "none"
	  InvalidFcnCallConnMsg	  "error"
	  FcnCallInpInsideContextMsg "Use local settings"
	  SignalLabelMismatchMsg  "none"
	  UnconnectedInputMsg	  "warning"
	  UnconnectedOutputMsg	  "warning"
	  UnconnectedLineMsg	  "warning"
	  SFcnCompatibilityMsg	  "none"
	  UniqueDataStoreMsg	  "none"
	  BusObjectLabelMismatch  "warning"
	  RootOutportRequireBusObject "warning"
	  AssertControl		  "UseLocalSettings"
	  EnableOverflowDetection off
	  ModelReferenceIOMsg	  "none"
	  ModelReferenceMultiInstanceNormalModeStructChecksumCheck "error"
	  ModelReferenceVersionMismatchMessage "none"
	  ModelReferenceIOMismatchMessage "none"
	  ModelReferenceCSMismatchMessage "none"
	  UnknownTsInhSupMsg	  "warning"
	  ModelReferenceDataLoggingMessage "warning"
	  ModelReferenceSymbolNameMessage "warning"
	  ModelReferenceExtraNoncontSigs "error"
	  StateNameClashWarn	  "warning"
	  SimStateInterfaceChecksumMismatchMsg "warning"
	  SimStateOlderReleaseMsg "error"
	  InitInArrayFormatMsg	  "warning"
	  StrictBusMsg		  "None"
	  BusNameAdapt		  "WarnAndRepair"
	  NonBusSignalsTreatedAsBus "none"
	  LoggingUnavailableSignals "error"
	  BlockIODiagnostic	  "none"
	  SFUnusedDataAndEventsDiag "warning"
	  SFUnexpectedBacktrackingDiag "warning"
	  SFInvalidInputDataAccessInChartInitDiag "warning"
	  SFNoUnconditionalDefaultTransitionDiag "warning"
	  SFTransitionOutsideNaturalParentDiag "warning"
	}
	Simulink.HardwareCC {
	  $ObjectID		  6
	  Version		  "1.11.0"
	  ProdBitPerChar	  8
	  ProdBitPerShort	  16
	  ProdBitPerInt		  32
	  ProdBitPerLong	  32
	  ProdBitPerFloat	  32
	  ProdBitPerDouble	  64
	  ProdBitPerPointer	  32
	  ProdLargestAtomicInteger "Char"
	  ProdLargestAtomicFloat  "None"
	  ProdIntDivRoundTo	  "Undefined"
	  ProdEndianess		  "Unspecified"
	  ProdWordSize		  32
	  ProdShiftRightIntArith  on
	  ProdHWDeviceType	  "32-bit Generic"
	  TargetBitPerChar	  8
	  TargetBitPerShort	  16
	  TargetBitPerInt	  32
	  TargetBitPerLong	  32
	  TargetBitPerFloat	  32
	  TargetBitPerDouble	  64
	  TargetBitPerPointer	  32
	  TargetLargestAtomicInteger "Char"
	  TargetLargestAtomicFloat "None"
	  TargetShiftRightIntArith on
	  TargetIntDivRoundTo	  "Undefined"
	  TargetEndianess	  "Unspecified"
	  TargetWordSize	  32
	  TargetTypeEmulationWarnSuppressLevel 0
	  TargetPreprocMaxBitsSint 32
	  TargetPreprocMaxBitsUint 32
	  TargetHWDeviceType	  "Specified"
	  TargetUnknown		  on
	  ProdEqTarget		  on
	}
	Simulink.ModelReferenceCC {
	  $ObjectID		  7
	  Version		  "1.11.0"
	  UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange"
	  CheckModelReferenceTargetMessage "error"
	  EnableParallelModelReferenceBuilds off
	  ParallelModelReferenceErrorOnInvalidPool on
	  ParallelModelReferenceMATLABWorkerInit "None"
	  ModelReferenceNumInstancesAllowed "Multi"
	  PropagateVarSize	  "Infer from blocks in model"
	  ModelReferencePassRootInputsByReference on
	  ModelReferenceMinAlgLoopOccurrences off
	  PropagateSignalLabelsOutOfModel off
	  SupportModelReferenceSimTargetCustomCode off
	}
	Simulink.SFSimCC {
	  $ObjectID		  8
	  Version		  "1.11.0"
	  SFSimEnableDebug	  on
	  SFSimOverflowDetection  on
	  SFSimEcho		  on
	  SimBlas		  on
	  SimCtrlC		  on
	  SimExtrinsic		  on
	  SimIntegrity		  on
	  SimUseLocalCustomCode	  off
	  SimParseCustomCode	  on
	  SimBuildMode		  "sf_incremental_build"
	}
	Simulink.RTWCC {
	  $BackupClass		  "Simulink.RTWCC"
	  $ObjectID		  9
	  Version		  "1.11.0"
	  Array {
	    Type		    "Cell"
	    Dimension		    1
	    Cell		    "IncludeHyperlinkInReport"
	    PropName		    "DisabledProps"
	  }
	  SystemTargetFile	  "grt.tlc"
	  GenCodeOnly		  off
	  MakeCommand		  "make_rtw"
	  GenerateMakefile	  on
	  TemplateMakefile	  "grt_default_tmf"
	  GenerateReport	  off
	  SaveLog		  off
	  RTWVerbose		  on
	  RetainRTWFile		  off
	  ProfileTLC		  off
	  TLCDebug		  off
	  TLCCoverage		  off
	  TLCAssert		  off
	  ProcessScriptMode	  "Default"
	  ConfigurationMode	  "Optimized"
	  ConfigAtBuild		  off
	  RTWUseLocalCustomCode	  off
	  RTWUseSimCustomCode	  off
	  IncludeHyperlinkInReport off
	  LaunchReport		  off
	  TargetLang		  "C"
	  IncludeBusHierarchyInRTWFileBlockHierarchyMap	off
	  IncludeERTFirstTime	  on
	  GenerateTraceInfo	  off
	  GenerateTraceReport	  off
	  GenerateTraceReportSl	  off
	  GenerateTraceReportSf	  off
	  GenerateTraceReportEml  off
	  GenerateCodeInfo	  off
	  GenerateSLWebview	  off
	  GenerateCodeMetricsReport off
	  RTWCompilerOptimization "Off"
	  CheckMdlBeforeBuild	  "Off"
	  CustomRebuildMode	  "OnUpdate"
	  Array {
	    Type		    "Handle"
	    Dimension		    2
	    Simulink.CodeAppCC {
	      $ObjectID		      10
	      Version		      "1.11.0"
	      Array {
		Type			"Cell"
		Dimension		9
		Cell			"IgnoreCustomStorageClasses"
		Cell			"InsertBlockDesc"
		Cell			"SFDataObjDesc"
		Cell			"SimulinkDataObjDesc"
		Cell			"DefineNamingRule"
		Cell			"SignalNamingRule"
		Cell			"ParamNamingRule"
		Cell			"InlinedPrmAccess"
		Cell			"CustomSymbolStr"
		PropName		"DisabledProps"
	      }
	      ForceParamTrailComments off
	      GenerateComments	      on
	      IgnoreCustomStorageClasses on
	      IgnoreTestpoints	      off
	      IncHierarchyInIds	      off
	      MaxIdLength	      31
	      PreserveName	      off
	      PreserveNameWithParent  off
	      ShowEliminatedStatement off
	      IncAutoGenComments      off
	      SimulinkDataObjDesc     off
	      SFDataObjDesc	      off
	      MATLABFcnDesc	      off
	      IncDataTypeInIds	      off
	      MangleLength	      1
	      CustomSymbolStrGlobalVar "$R$N$M"
	      CustomSymbolStrType     "$N$R$M"
	      CustomSymbolStrField    "$N$M"
	      CustomSymbolStrFcn      "$R$N$M$F"
	      CustomSymbolStrFcnArg   "rt$I$N$M"
	      CustomSymbolStrBlkIO    "rtb_$N$M"
	      CustomSymbolStrTmpVar   "$N$M"
	      CustomSymbolStrMacro    "$R$N$M"
	      DefineNamingRule	      "None"
	      ParamNamingRule	      "None"
	      SignalNamingRule	      "None"
	      InsertBlockDesc	      off
	      InsertPolySpaceComments off
	      SimulinkBlockComments   on
	      MATLABSourceComments    off
	      EnableCustomComments    off
	      InlinedPrmAccess	      "Literals"
	      ReqsInCode	      off
	      UseSimReservedNames     off
	    }
	    Simulink.GRTTargetCC {
	      $BackupClass	      "Simulink.TargetCC"
	      $ObjectID		      11
	      Version		      "1.11.0"
	      Array {
		Type			"Cell"
		Dimension		11
		Cell			"IncludeMdlTerminateFcn"
		Cell			"CombineOutputUpdateFcns"
		Cell			"SuppressErrorStatus"
		Cell			"ERTCustomFileBanners"
		Cell			"GenerateSampleERTMain"
		Cell			"MultiInstanceERTCode"
		Cell			"PurelyIntegerCode"
		Cell			"SupportNonInlinedSFcns"
		Cell			"SupportComplex"
		Cell			"SupportAbsoluteTime"
		Cell			"SupportContinuousTime"
		PropName		"DisabledProps"
	      }
	      TargetFcnLib	      "ansi_tfl_tmw.mat"
	      TargetLibSuffix	      ""
	      TargetPreCompLibLocation ""
	      TargetFunctionLibrary   "ANSI_C"
	      UtilityFuncGeneration   "Auto"
	      ERTMultiwordTypeDef     "System defined"
	      FunctionExecutionProfile off
	      CodeExecutionProfiling  off
	      ERTCodeCoverageTool     "None"
	      ERTMultiwordLength      256
	      MultiwordLength	      2048
	      GenerateFullHeader      on
	      GenerateSampleERTMain   off
	      GenerateTestInterfaces  off
	      IsPILTarget	      off
	      ModelReferenceCompliant on
	      ParMdlRefBuildCompliant on
	      CompOptLevelCompliant   on
	      IncludeMdlTerminateFcn  on
	      GeneratePreprocessorConditionals "Disable all"
	      CombineOutputUpdateFcns off
	      CombineSignalStateStructs	off
	      SuppressErrorStatus     off
	      ERTFirstTimeCompliant   off
	      IncludeFileDelimiter    "Auto"
	      ERTCustomFileBanners    off
	      SupportAbsoluteTime     on
	      LogVarNameModifier      "rt_"
	      MatFileLogging	      on
	      MultiInstanceERTCode    off
	      SupportNonFinite	      on
	      SupportComplex	      on
	      PurelyIntegerCode	      off
	      SupportContinuousTime   on
	      SupportNonInlinedSFcns  on
	      SupportVariableSizeSignals off
	      EnableShiftOperators    on
	      ParenthesesLevel	      "Nominal"
	      PortableWordSizes	      off
	      ModelStepFunctionPrototypeControlCompliant off
	      CPPClassGenCompliant    off
	      AutosarCompliant	      off
	      UseMalloc		      off
	      ExtMode		      off
	      ExtModeStaticAlloc      off
	      ExtModeTesting	      off
	      ExtModeStaticAllocSize  1000000
	      ExtModeTransport	      0
	      ExtModeMexFile	      "ext_comm"
	      ExtModeIntrfLevel	      "Level1"
	      RTWCAPISignals	      off
	      RTWCAPIParams	      off
	      RTWCAPIStates	      off
	      RTWCAPIRootIO	      off
	      GenerateASAP2	      off
	    }
	    PropName		    "Components"
	  }
	}
	PropName		"Components"
      }
      Name		      "Configuration"
      CurrentDlgPage	      "Solver"
      ConfigPrmDlgPosition     [ 360, 135, 1240, 765 ] 
    }
    PropName		    "ConfigurationSets"
  }
  Simulink.ConfigSet {
    $PropName		    "ActiveConfigurationSet"
    $ObjectID		    1
  }
  BlockDefaults {
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    NamePlacement	    "normal"
    FontName		    "Helvetica"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
    ShowName		    on
    BlockRotation	    0
    BlockMirror		    off
  }
  AnnotationDefaults {
    HorizontalAlignment	    "center"
    VerticalAlignment	    "middle"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    FontName		    "Helvetica"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
    UseDisplayTextAsClickCallback off
  }
  LineDefaults {
    FontName		    "Helvetica"
    FontSize		    9
    FontWeight		    "normal"
    FontAngle		    "normal"
  }
  BlockParameterDefaults {
    Block {
      BlockType		      Clock
      DisplayTime	      off
    }
    Block {
      BlockType		      Constant
      Value		      "1"
      VectorParams1D	      on
      SamplingMode	      "Sample based"
      OutMin		      "[]"
      OutMax		      "[]"
      OutDataTypeStr	      "Inherit: Inherit from 'Constant value'"
      LockScale		      off
      SampleTime	      "inf"
      FramePeriod	      "inf"
      PreserveConstantTs      off
    }
    Block {
      BlockType		      DataStoreMemory
      DataStoreName	      "A"
      ReadBeforeWriteMsg      "none"
      WriteAfterWriteMsg      "none"
      WriteAfterReadMsg	      "none"
      InitialValue	      "0"
      StateMustResolveToSignalObject off
      RTWStateStorageClass    "Auto"
      VectorParams1D	      on
      ShowAdditionalParam     off
      OutMin		      "[]"
      OutMax		      "[]"
      OutDataTypeStr	      "Inherit: auto"
      LockScale		      off
      SignalType	      "auto"
      Dimensions	      "-1"
      DataLogging	      off
      DataLoggingLimitDataPoints off
      DataLoggingMaxPoints    "5000"
      DataLoggingDecimateData off
      DataLoggingDecimation   "2"
      DataLoggingNameMode     "SignalName"
    }
    Block {
      BlockType		      DataStoreRead
      DataStoreName	      "A"
      SampleTime	      "-1"
    }
    Block {
      BlockType		      DataStoreWrite
      DataStoreName	      "A"
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Demux
      Outputs		      "4"
      DisplayOption	      "none"
      BusSelectionMode	      off
    }
    Block {
      BlockType		      Derivative
      LinearizePole	      "inf"
    }
    Block {
      BlockType		      Gain
      Gain		      "1"
      Multiplication	      "Element-wise(K.*u)"
      ParamMin		      "[]"
      ParamMax		      "[]"
      ParamDataTypeStr	      "Inherit: Same as input"
      OutMin		      "[]"
      OutMax		      "[]"
      OutDataTypeStr	      "Inherit: Same as input"
      LockScale		      off
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Inport
      Port		      "1"
      OutputFunctionCall      off
      OutMin		      "[]"
      OutMax		      "[]"
      OutDataTypeStr	      "Inherit: auto"
      LockScale		      off
      BusOutputAsStruct	      off
      PortDimensions	      "-1"
      VarSizeSig	      "Inherit"
      SampleTime	      "-1"
      SignalType	      "auto"
      SamplingMode	      "auto"
      LatchByDelayingOutsideSignal off
      LatchInputForFeedbackSignals off
      Interpolate	      on
    }
    Block {
      BlockType		      Integrator
      ExternalReset	      "none"
      InitialConditionSource  "internal"
      InitialCondition	      "0"
      LimitOutput	      off
      UpperSaturationLimit    "inf"
      LowerSaturationLimit    "-inf"
      ShowSaturationPort      off
      ShowStatePort	      off
      AbsoluteTolerance	      "auto"
      IgnoreLimit	      off
      ZeroCross		      on
      ContinuousStateAttributes	"''"
    }
    Block {
      BlockType		      MATLABFcn
      MATLABFcn		      "sin"
      OutputDimensions	      "-1"
      OutputSignalType	      "auto"
      Output1D		      on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Mux
      Inputs		      "4"
      DisplayOption	      "none"
      UseBusObject	      off
      BusObject		      "BusObject"
      NonVirtualBus	      off
    }
    Block {
      BlockType		      Outport
      Port		      "1"
      OutMin		      "[]"
      OutMax		      "[]"
      OutDataTypeStr	      "Inherit: auto"
      LockScale		      off
      BusOutputAsStruct	      off
      PortDimensions	      "-1"
      VarSizeSig	      "Inherit"
      SampleTime	      "-1"
      SignalType	      "auto"
      SamplingMode	      "auto"
      SourceOfInitialOutputValue "Dialog"
      OutputWhenDisabled      "held"
      InitialOutput	      "[]"
    }
    Block {
      BlockType		      Product
      Inputs		      "2"
      Multiplication	      "Element-wise(.*)"
      CollapseMode	      "All dimensions"
      CollapseDim	      "1"
      InputSameDT	      on
      OutMin		      "[]"
      OutMax		      "[]"
      OutDataTypeStr	      "Inherit: Same as first input"
      LockScale		      off
      RndMeth		      "Zero"
      SaturateOnIntegerOverflow	on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      S-Function
      FunctionName	      "system"
      SFunctionModules	      "''"
      PortCounts	      "[]"
      SFunctionDeploymentMode off
    }
    Block {
      BlockType		      Saturate
      UpperLimitSource	      "Dialog"
      UpperLimit	      "0.5"
      LowerLimitSource	      "Dialog"
      LowerLimit	      "-0.5"
      LinearizeAsGain	      on
      ZeroCross		      on
      SampleTime	      "-1"
      OutMin		      "[]"
      OutMax		      "[]"
      OutDataTypeStr	      "Inherit: Same as input"
      LockScale		      off
      RndMeth		      "Floor"
    }
    Block {
      BlockType		      Scope
      ModelBased	      off
      TickLabels	      "OneTimeTick"
      ZoomMode		      "on"
      Grid		      "on"
      TimeRange		      "auto"
      YMin		      "-5"
      YMax		      "5"
      SaveToWorkspace	      off
      SaveName		      "ScopeData"
      LimitDataPoints	      on
      MaxDataPoints	      "5000"
      Decimation	      "1"
      SampleInput	      off
      SampleTime	      "-1"
    }
    Block {
      BlockType		      SubSystem
      ShowPortLabels	      "FromPortIcon"
      Permissions	      "ReadWrite"
      PermitHierarchicalResolution "All"
      TreatAsAtomicUnit	      off
      CheckFcnCallInpInsideContextMsg off
      SystemSampleTime	      "-1"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      RTWMemSecFuncInitTerm   "Inherit from model"
      RTWMemSecFuncExecute    "Inherit from model"
      RTWMemSecDataConstants  "Inherit from model"
      RTWMemSecDataInternal   "Inherit from model"
      RTWMemSecDataParameters "Inherit from model"
      SimViewingDevice	      off
      DataTypeOverride	      "UseLocalSettings"
      DataTypeOverrideAppliesTo	"AllNumericTypes"
      MinMaxOverflowLogging   "UseLocalSettings"
      Variant		      off
      GeneratePreprocessorConditionals off
    }
    Block {
      BlockType		      Sum
      IconShape		      "rectangular"
      Inputs		      "++"
      CollapseMode	      "All dimensions"
      CollapseDim	      "1"
      InputSameDT	      on
      AccumDataTypeStr	      "Inherit: Inherit via internal rule"
      OutMin		      "[]"
      OutMax		      "[]"
      OutDataTypeStr	      "Inherit: Same as first input"
      LockScale		      off
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      ToWorkspace
      VariableName	      "simulink_output"
      MaxDataPoints	      "1000"
      Decimation	      "1"
      SampleTime	      "0"
      FixptAsFi		      off
      NumInputs		      "1"
    }
    Block {
      BlockType		      TriggerPort
      TriggerType	      "rising"
      StatesWhenEnabling      "inherit"
      PropagateVarSize	      "During execution"
      ShowOutputPort	      off
      OutputDataType	      "auto"
      SampleTimeType	      "triggered"
      SampleTime	      "1"
      ZeroCross		      on
      PortDimensions	      "-1"
      TriggerSignalSampleTime "-1"
      OutMin		      "[]"
      OutMax		      "[]"
      OutDataTypeStr	      "Inherit: auto"
      Interpolate	      on
    }
  }
  System {
    Name		    "Diabetes_simulation"
    Location		    [152, 111, 1588, 847]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    200
    ScreenColor		    "white"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "usletter"
    PaperUnits		    "inches"
    TiledPaperMargins	    [0.196850, 0.196850, 0.196850, 0.196850]
    TiledPageScale	    1
    ShowPageBoundaries	    off
    ZoomFactor		    "100"
    ReportName		    "simulink-default.rpt"
    SIDHighWatermark	    "161"
    Block {
      BlockType		      Constant
      Name		      "BG_reference"
      SID		      "144"
      Position		      [85, 455, 115, 485]
      Value		      "150"
    }
    Block {
      BlockType		      Scope
      Name		      "Control"
      SID		      "157"
      Ports		      [1]
      Position		      [665, 259, 695, 291]
      Floating		      off
      Location		      [107, 466, 1288, 798]
      Open		      off
      NumInputPorts	      "1"
      ZoomMode		      "yonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      YMin		      "-1050"
      YMax		      "-100"
      SaveName		      "ScopeData10"
      DataFormat	      "StructureWithTime"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Scope
      Name		      "Endogeneous Glucose Production"
      SID		      "119"
      Ports		      [1]
      Position		      [1175, 209, 1205, 241]
      Floating		      off
      Location		      [43, 434, 1224, 596]
      Open		      off
      NumInputPorts	      "1"
      ZoomMode		      "xonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      YMin		      "-25000"
      YMax		      "350000"
      SaveName		      "ScopeData3"
      DataFormat	      "StructureWithTime"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Scope
      Name		      "Glucose"
      SID		      "47"
      Ports		      [1]
      Position		      [1175, 119, 1205, 151]
      Floating		      off
      Location		      [104, 66, 1285, 398]
      Open		      off
      NumInputPorts	      "1"
      ZoomMode		      "xonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      YMin		      "70"
      YMax		      "270"
      SaveName		      "ScopeData12"
      DataFormat	      "StructureWithTime"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Scope
      Name		      "Glucose Utliization"
      SID		      "121"
      Ports		      [1]
      Position		      [1175, 329, 1205, 361]
      Floating		      off
      Location		      [45, 628, 1226, 849]
      Open		      off
      NumInputPorts	      "1"
      ZoomMode		      "xonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      YMin		      "-25000"
      YMax		      "350000"
      SaveName		      "ScopeData7"
      DataFormat	      "StructureWithTime"
      SampleTime	      "0"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "Glucose in ISF"
      SID		      "129"
      Ports		      [1]
      Position		      [1015, 45, 1075, 75]
      VariableName	      "G_ISF"
      MaxDataPoints	      "inf"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      Scope
      Name		      "Infused Insulin"
      SID		      "148"
      Ports		      [1]
      Position		      [1175, 669, 1205, 701]
      Floating		      off
      Location		      [164, 321, 1345, 653]
      Open		      off
      NumInputPorts	      "1"
      ZoomMode		      "yonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      YMin		      "-0.375"
      YMax		      "0.125"
      DataFormat	      "StructureWithTime"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Reference
      Name		      "Manual Switch"
      SID		      "160"
      Ports		      [2, 1]
      Position		      [270, 210, 335, 270]
      LibraryVersion	      "1.236"
      SourceBlock	      "simulink/Signal\nRouting/Manual Switch"
      SourceType	      "Manual Switch"
      ShowPortLabels	      "FromPortIcon"
      SystemSampleTime	      "-1"
      FunctionWithSeparateData off
      RTWMemSecFuncInitTerm   "Inherit from model"
      RTWMemSecFuncExecute    "Inherit from model"
      RTWMemSecDataConstants  "Inherit from model"
      RTWMemSecDataInternal   "Inherit from model"
      RTWMemSecDataParameters "Inherit from model"
      GeneratePreprocessorConditionals off
      sw		      "1"
      action		      "0"
      varsize		      off
    }
    Block {
      BlockType		      SubSystem
      Name		      "Model"
      SID		      "2"
      Ports		      [1, 10]
      Position		      [730, 74, 920, 666]
      MinAlgLoopOccurrences   off
      PropExecContextOutsideSubsystem off
      RTWSystemCode	      "Auto"
      FunctionWithSeparateData off
      Opaque		      off
      RequestExecContextInheritance off
      MaskHideContents	      off
      System {
	Name			"Model"
	Location		[110, 104, 1490, 893]
	Open			on
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
	TiledPageScale		1
	ShowPageBoundaries	off
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "your controller"
	  SID			  "3"
	  Position		  [490, 288, 520, 302]
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Clock
	  Name			  "Clock1"
	  SID			  "4"
	  Position		  [25, 285, 45, 305]
	  Decimation		  "10"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant1"
	  SID			  "6"
	  Position		  [275, 512, 365, 538]
	  Value			  "1/parameters.BW"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain1"
	  SID			  "7"
	  Position		  [305, 180, 335, 210]
	  Gain			  "parameters.errpasti"
	  ParamDataTypeStr	  "Inherit: Inherit via internal rule"
	  OutDataTypeStr	  "Inherit: Inherit via internal rule"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Product
	  Name			  "Product1"
	  SID			  "8"
	  Ports			  [2, 1]
	  Position		  [400, 402, 430, 433]
	  InputSameDT		  off
	  OutDataTypeStr	  "Inherit: Inherit via internal rule"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Saturate
	  Name			  "Saturation"
	  SID			  "9"
	  Ports			  [1, 1]
	  Position		  [735, 380, 765, 410]
	  InputPortMap		  "u0"
	  UpperLimit		  "10000"
	  LowerLimit		  "0"
	}
	Block {
	  BlockType		  Scope
	  Name			  "Scope3"
	  SID			  "10"
	  Ports			  [1]
	  Position		  [570, 29, 600, 61]
	  Floating		  off
	  Location		  [347, 77, 871, 452]
	  Open			  off
	  NumInputPorts		  "1"
	  ZoomMode		  "xonly"
	  List {
	    ListType		    AxesTitles
	    axes1		    "%<SignalLabel>"
	  }
	  YMin			  "0"
	  YMax			  "25000"
	  SaveName		  "ScopeData4"
	  DataFormat		  "StructureWithTime"
	  LimitDataPoints	  off
	  SampleTime		  "0"
	}
	Block {
	  BlockType		  Scope
	  Name			  "Scope4"
	  SID			  "11"
	  Ports			  [1]
	  Position		  [305, 599, 335, 631]
	  Floating		  off
	  Location		  [353, 479, 871, 871]
	  Open			  off
	  NumInputPorts		  "1"
	  ZoomMode		  "xonly"
	  List {
	    ListType		    AxesTitles
	    axes1		    "%<SignalLabel>"
	  }
	  YMin			  "0"
	  YMax			  "25000"
	  SaveName		  "ScopeData5"
	  DataFormat		  "StructureWithTime"
	  LimitDataPoints	  off
	  SampleTime		  "0"
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Subsystem1"
	  SID			  "12"
	  Ports			  [2, 9]
	  Position		  [805, 95, 1010, 495]
	  MinAlgLoopOccurrences	  off
	  PropExecContextOutsideSubsystem off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  Opaque		  off
	  RequestExecContextInheritance	off
	  MaskHideContents	  off
	  System {
	    Name		    "Subsystem1"
	    Location		    [49, 88, 1218, 806]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "A4"
	    PaperUnits		    "centimeters"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "In1"
	      SID		      "13"
	      Position		      [45, 188, 75, 202]
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "In2"
	      SID		      "14"
	      Position		      [45, 233, 75, 247]
	      Port		      "2"
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      DataStoreMemory
	      Name		      "Data Store"
	      SID		      "15"
	      Position		      [180, 407, 221, 440]
	      ForegroundColor	      "white"
	      DataStoreName	      "qstot"
	      SignalType	      "real"
	    }
	    Block {
	      BlockType		      DataStoreRead
	      Name		      "Data Store\nRead"
	      SID		      "16"
	      Ports		      [0, 1]
	      Position		      [65, 360, 95, 390]
	      DataStoreName	      "qstot"
	    }
	    Block {
	      BlockType		      SubSystem
	      Name		      "Data Store write"
	      SID		      "17"
	      Ports		      [1, 0, 0, 1]
	      Position		      [177, 570, 223, 625]
	      BlockRotation	      270
	      BlockMirror	      on
	      TreatAsAtomicUnit	      on
	      MinAlgLoopOccurrences   off
	      PropExecContextOutsideSubsystem off
	      RTWSystemCode	      "Auto"
	      FunctionWithSeparateData off
	      Opaque		      off
	      RequestExecContextInheritance off
	      MaskHideContents	      off
	      System {
		Name			"Data Store write"
		Location		[624, 133, 1088, 428]
		Open			off
		ModelBrowserVisibility	off
		ModelBrowserWidth	200
		ScreenColor		"white"
		PaperOrientation	"landscape"
		PaperPositionMode	"auto"
		PaperType		"A4"
		PaperUnits		"centimeters"
		TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
		TiledPageScale		1
		ShowPageBoundaries	off
		ZoomFactor		"100"
		Block {
		  BlockType		  Inport
		  Name			  "qsto"
		  SID			  "18"
		  Position		  [40, 33, 70, 47]
		  IconDisplay		  "Port number"
		  LatchByDelayingOutsideSignal on
		}
		Block {
		  BlockType		  TriggerPort
		  Name			  "Trigger"
		  SID			  "19"
		  Ports			  []
		  Position		  [205, 30, 225, 50]
		  StatesWhenEnabling	  "held"
		}
		Block {
		  BlockType		  DataStoreWrite
		  Name			  "Data Store\nWrite"
		  SID			  "20"
		  Ports			  [1]
		  Position		  [125, 25, 155, 55]
		  DataStoreName		  "qstot"
		}
		Line {
		  SrcBlock		  "qsto"
		  SrcPort		  1
		  Points		  [0, 0]
		  DstBlock		  "Data Store\nWrite"
		  DstPort		  1
		}
	      }
	    }
	    Block {
	      BlockType		      Mux
	      Name		      "Mux2"
	      SID		      "21"
	      Ports		      [3, 1]
	      Position		      [135, 171, 140, 309]
	      ShowName		      off
	      Inputs		      "3"
	      DisplayOption	      "bar"
	    }
	    Block {
	      BlockType		      S-Function
	      Name		      "S-Function1"
	      SID		      "22"
	      Ports		      [1, 1]
	      Position		      [195, 216, 305, 264]
	      FunctionName	      "Padova_model"
	      Parameters	      "parameters"
	      EnableBusSupport	      off
	    }
	    Block {
	      BlockType		      SubSystem
	      Name		      "Subsystem2"
	      SID		      "23"
	      Ports		      [1, 9]
	      Position		      [350, 40, 420, 440]
	      MinAlgLoopOccurrences   off
	      PropExecContextOutsideSubsystem off
	      RTWSystemCode	      "Auto"
	      FunctionWithSeparateData off
	      Opaque		      off
	      RequestExecContextInheritance off
	      MaskHideContents	      off
	      System {
		Name			"Subsystem2"
		Location		[266, 82, 1278, 835]
		Open			off
		ModelBrowserVisibility	off
		ModelBrowserWidth	200
		ScreenColor		"white"
		PaperOrientation	"landscape"
		PaperPositionMode	"auto"
		PaperType		"A4"
		PaperUnits		"centimeters"
		TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
		TiledPageScale		1
		ShowPageBoundaries	off
		ZoomFactor		"100"
		Block {
		  BlockType		  Inport
		  Name			  "In1"
		  SID			  "24"
		  Position		  [80, 273, 110, 287]
		  IconDisplay		  "Port number"
		}
		Block {
		  BlockType		  Demux
		  Name			  "Demux2"
		  SID			  "25"
		  Ports			  [1, 21]
		  Position		  [190, 24, 215, 726]
		  BackgroundColor	  "black"
		  ShowName		  off
		  Outputs		  "21"
		}
		Block {
		  BlockType		  Mux
		  Name			  "Mux"
		  SID			  "103"
		  Ports			  [13, 1]
		  Position		  [385, 263, 405, 697]
		  ShowName		  off
		  Inputs		  "13"
		  DisplayOption		  "bar"
		}
		Block {
		  BlockType		  Outport
		  Name			  "G_{ISF}"
		  SID			  "28"
		  Position		  [445, 18, 475, 32]
		  IconDisplay		  "Port number"
		}
		Block {
		  BlockType		  Outport
		  Name			  "G_p"
		  SID			  "29"
		  Position		  [445, 53, 475, 67]
		  Port			  "2"
		  IconDisplay		  "Port number"
		}
		Block {
		  BlockType		  Outport
		  Name			  "EGP"
		  SID			  "30"
		  Position		  [445, 88, 475, 102]
		  Port			  "3"
		  IconDisplay		  "Port number"
		}
		Block {
		  BlockType		  Outport
		  Name			  "Ra"
		  SID			  "31"
		  Position		  [445, 123, 475, 137]
		  Port			  "4"
		  IconDisplay		  "Port number"
		}
		Block {
		  BlockType		  Outport
		  Name			  "Util"
		  SID			  "99"
		  Position		  [445, 158, 475, 172]
		  Port			  "5"
		  IconDisplay		  "Port number"
		}
		Block {
		  BlockType		  Outport
		  Name			  "Ra_I"
		  SID			  "100"
		  Position		  [445, 193, 475, 207]
		  Port			  "6"
		  IconDisplay		  "Port number"
		}
		Block {
		  BlockType		  Outport
		  Name			  "I_p"
		  SID			  "101"
		  Position		  [445, 228, 475, 242]
		  Port			  "7"
		  IconDisplay		  "Port number"
		}
		Block {
		  BlockType		  Outport
		  Name			  "all_states"
		  SID			  "102"
		  Position		  [445, 473, 475, 487]
		  Port			  "8"
		  IconDisplay		  "Port number"
		}
		Block {
		  BlockType		  Outport
		  Name			  "q_tot"
		  SID			  "104"
		  Position		  [435, 718, 465, 732]
		  Port			  "9"
		  IconDisplay		  "Port number"
		}
		Line {
		  SrcBlock		  "In1"
		  SrcPort		  1
		  Points		  [60, 0]
		  DstBlock		  "Demux2"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Demux2"
		  SrcPort		  1
		  DstBlock		  "G_{ISF}"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Demux2"
		  SrcPort		  2
		  DstBlock		  "G_p"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Demux2"
		  SrcPort		  3
		  DstBlock		  "EGP"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Demux2"
		  SrcPort		  4
		  DstBlock		  "Ra"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Demux2"
		  SrcPort		  5
		  DstBlock		  "Util"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Demux2"
		  SrcPort		  6
		  DstBlock		  "Ra_I"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Demux2"
		  SrcPort		  7
		  DstBlock		  "I_p"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Demux2"
		  SrcPort		  8
		  DstBlock		  "Mux"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Demux2"
		  SrcPort		  9
		  DstBlock		  "Mux"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Demux2"
		  SrcPort		  10
		  DstBlock		  "Mux"
		  DstPort		  3
		}
		Line {
		  SrcBlock		  "Demux2"
		  SrcPort		  11
		  DstBlock		  "Mux"
		  DstPort		  4
		}
		Line {
		  SrcBlock		  "Demux2"
		  SrcPort		  12
		  DstBlock		  "Mux"
		  DstPort		  5
		}
		Line {
		  SrcBlock		  "Demux2"
		  SrcPort		  13
		  DstBlock		  "Mux"
		  DstPort		  6
		}
		Line {
		  SrcBlock		  "Demux2"
		  SrcPort		  14
		  DstBlock		  "Mux"
		  DstPort		  7
		}
		Line {
		  SrcBlock		  "Demux2"
		  SrcPort		  15
		  DstBlock		  "Mux"
		  DstPort		  8
		}
		Line {
		  SrcBlock		  "Demux2"
		  SrcPort		  16
		  DstBlock		  "Mux"
		  DstPort		  9
		}
		Line {
		  SrcBlock		  "Demux2"
		  SrcPort		  17
		  DstBlock		  "Mux"
		  DstPort		  10
		}
		Line {
		  SrcBlock		  "Demux2"
		  SrcPort		  18
		  DstBlock		  "Mux"
		  DstPort		  11
		}
		Line {
		  SrcBlock		  "Demux2"
		  SrcPort		  19
		  DstBlock		  "Mux"
		  DstPort		  12
		}
		Line {
		  SrcBlock		  "Demux2"
		  SrcPort		  20
		  DstBlock		  "Mux"
		  DstPort		  13
		}
		Line {
		  SrcBlock		  "Mux"
		  SrcPort		  1
		  DstBlock		  "all_states"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Demux2"
		  SrcPort		  21
		  DstBlock		  "q_tot"
		  DstPort		  1
		}
	      }
	    }
	    Block {
	      BlockType		      Scope
	      Name		      "qstot"
	      SID		      "32"
	      Ports		      [1]
	      Position		      [65, 424, 95, 456]
	      BlockMirror	      on
	      Floating		      off
	      Location		      [180, 135, 1147, 759]
	      Open		      off
	      NumInputPorts	      "1"
	      ZoomMode		      "yonly"
	      List {
		ListType		AxesTitles
		axes1			"%<SignalLabel>"
	      }
	      YMin		      "-25000"
	      YMax		      "350000"
	      SaveName		      "ScopeData2"
	      DataFormat	      "StructureWithTime"
	      SampleTime	      "0"
	    }
	    Block {
	      BlockType		      Scope
	      Name		      "qstot1"
	      SID		      "33"
	      Ports		      [1]
	      Position		      [360, 609, 390, 641]
	      BlockMirror	      on
	      Floating		      off
	      Location		      [86, 107, 1366, 713]
	      Open		      off
	      NumInputPorts	      "1"
	      List {
		ListType		AxesTitles
		axes1			"%<SignalLabel>"
	      }
	      TimeRange		      "2000"
	      YMin		      "-1"
	      YMax		      "1"
	      SaveName		      "ScopeData1"
	      DataFormat	      "StructureWithTime"
	      SampleTime	      "0"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "G_{ISF}"
	      SID		      "34"
	      Position		      [570, 53, 600, 67]
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "G_p"
	      SID		      "105"
	      Position		      [570, 98, 600, 112]
	      Port		      "2"
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "EGP"
	      SID		      "106"
	      Position		      [570, 143, 600, 157]
	      Port		      "3"
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Ra"
	      SID		      "107"
	      Position		      [570, 188, 600, 202]
	      Port		      "4"
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Util"
	      SID		      "108"
	      Position		      [570, 233, 600, 247]
	      Port		      "5"
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Ra_I"
	      SID		      "109"
	      Position		      [570, 278, 600, 292]
	      Port		      "6"
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "I_p"
	      SID		      "110"
	      Position		      [570, 323, 600, 337]
	      Port		      "7"
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "all_states"
	      SID		      "111"
	      Position		      [570, 368, 600, 382]
	      Port		      "8"
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "q_tot"
	      SID		      "112"
	      Position		      [570, 413, 600, 427]
	      Port		      "9"
	      IconDisplay	      "Port number"
	    }
	    Line {
	      SrcBlock		      "S-Function1"
	      SrcPort		      1
	      DstBlock		      "Subsystem2"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Subsystem2"
	      SrcPort		      1
	      DstBlock		      "G_{ISF}"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "In2"
	      SrcPort		      1
	      DstBlock		      "Mux2"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Mux2"
	      SrcPort		      1
	      DstBlock		      "S-Function1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "In1"
	      SrcPort		      1
	      Points		      [25, 0]
	      Branch {
		DstBlock		"Mux2"
		DstPort			1
	      }
	      Branch {
		Points			[0, -65; -85, 0; 0, 395]
		DstBlock		"Data Store write"
		DstPort			trigger
	      }
	    }
	    Line {
	      SrcBlock		      "Data Store\nRead"
	      SrcPort		      1
	      Points		      [10, 0]
	      Branch {
		DstBlock		"qstot"
		DstPort			1
	      }
	      Branch {
		Points			[0, -90]
		DstBlock		"Mux2"
		DstPort			3
	      }
	    }
	    Line {
	      SrcBlock		      "Subsystem2"
	      SrcPort		      9
	      Points		      [25, 0]
	      Branch {
		Points			[-5, 0; 0, 105]
		Branch {
		  Points		  [-245, 0]
		  DstBlock		  "Data Store write"
		  DstPort		  1
		}
		Branch {
		  Points		  [0, 100]
		  DstBlock		  "qstot1"
		  DstPort		  1
		}
	      }
	      Branch {
		DstBlock		"q_tot"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Subsystem2"
	      SrcPort		      2
	      DstBlock		      "G_p"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Subsystem2"
	      SrcPort		      3
	      DstBlock		      "EGP"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Subsystem2"
	      SrcPort		      4
	      DstBlock		      "Ra"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Subsystem2"
	      SrcPort		      5
	      DstBlock		      "Util"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Subsystem2"
	      SrcPort		      6
	      DstBlock		      "Ra_I"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Subsystem2"
	      SrcPort		      7
	      DstBlock		      "I_p"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Subsystem2"
	      SrcPort		      8
	      DstBlock		      "all_states"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  SID			  "38"
	  Ports			  [2, 1]
	  Position		  [495, 410, 515, 430]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "|++"
	  InputSameDT		  off
	  OutDataTypeStr	  "Inherit: Inherit via internal rule"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum1"
	  SID			  "154"
	  Ports			  [2, 1]
	  Position		  [660, 385, 680, 405]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "|++"
	  InputSameDT		  off
	  OutDataTypeStr	  "Inherit: Inherit via internal rule"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Constant
	  Name			  "insulin basal"
	  SID			  "42"
	  Position		  [470, 510, 500, 540]
	  Value			  "parameters.u2ss"
	}
	Block {
	  BlockType		  MATLABFcn
	  Name			  "insulin bolus"
	  SID			  "40"
	  Ports			  [1, 1]
	  Position		  [155, 389, 235, 431]
	  MATLABFcn		  "boluses(1,floor(u/parameters.passo_int)+1)"
	  OutputDimensions	  "1"
	  Output1D		  off
	}
	Block {
	  BlockType		  MATLABFcn
	  Name			  "meals"
	  SID			  "41"
	  Ports			  [1, 1]
	  Position		  [150, 174, 240, 216]
	  MATLABFcn		  "meals(1,floor(u/parameters.passo_int)+1)"
	  OutputDimensions	  "1"
	  Output1D		  off
	}
	Block {
	  BlockType		  Outport
	  Name			  "G_{ISF}"
	  SID			  "43"
	  Position		  [1150, 108, 1180, 122]
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Outport
	  Name			  "G_p"
	  SID			  "44"
	  Position		  [1150, 153, 1180, 167]
	  Port			  "2"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Outport
	  Name			  "EGP"
	  SID			  "45"
	  Position		  [1150, 198, 1180, 212]
	  Port			  "3"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Ra_g"
	  SID			  "46"
	  Position		  [1150, 243, 1180, 257]
	  Port			  "4"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Util"
	  SID			  "113"
	  Position		  [1150, 288, 1180, 302]
	  Port			  "5"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Ra_I"
	  SID			  "114"
	  Position		  [1150, 333, 1180, 347]
	  Port			  "6"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Outport
	  Name			  "I_p"
	  SID			  "115"
	  Position		  [1150, 378, 1180, 392]
	  Port			  "7"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Outport
	  Name			  "all_states"
	  SID			  "116"
	  Position		  [1150, 423, 1180, 437]
	  Port			  "8"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Outport
	  Name			  "q_tot"
	  SID			  "117"
	  Position		  [1150, 468, 1180, 482]
	  Port			  "9"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Infused Insulin"
	  SID			  "155"
	  Position		  [825, 558, 855, 572]
	  Port			  "10"
	  IconDisplay		  "Port number"
	}
	Line {
	  SrcBlock		  "Subsystem1"
	  SrcPort		  1
	  DstBlock		  "G_{ISF}"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "insulin basal"
	  SrcPort		  1
	  DstBlock		  "Sum"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "meals"
	  SrcPort		  1
	  DstBlock		  "Gain1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Product1"
	  SrcPort		  1
	  DstBlock		  "Sum"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Gain1"
	  SrcPort		  1
	  Points		  [160, 0]
	  Branch {
	    DstBlock		    "Subsystem1"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, -150]
	    DstBlock		    "Scope3"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Constant1"
	  SrcPort		  1
	  Points		  [5, 0; 0, -100]
	  DstBlock		  "Product1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "insulin bolus"
	  SrcPort		  1
	  Points		  [15, 0]
	  Branch {
	    DstBlock		    "Product1"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 205]
	    DstBlock		    "Scope4"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Subsystem1"
	  SrcPort		  2
	  DstBlock		  "G_p"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Subsystem1"
	  SrcPort		  3
	  DstBlock		  "EGP"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Subsystem1"
	  SrcPort		  4
	  DstBlock		  "Ra_g"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Subsystem1"
	  SrcPort		  5
	  DstBlock		  "Util"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Subsystem1"
	  SrcPort		  6
	  DstBlock		  "Ra_I"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Subsystem1"
	  SrcPort		  7
	  DstBlock		  "I_p"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Subsystem1"
	  SrcPort		  8
	  DstBlock		  "all_states"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Subsystem1"
	  SrcPort		  9
	  DstBlock		  "q_tot"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  DstBlock		  "Sum1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Sum1"
	  SrcPort		  1
	  DstBlock		  "Saturation"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Clock1"
	  SrcPort		  1
	  Points		  [45, 0]
	  Branch {
	    Points		    [0, -100]
	    DstBlock		    "meals"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 115]
	    DstBlock		    "insulin bolus"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Saturation"
	  SrcPort		  1
	  Points		  [10, 0]
	  Branch {
	    DstBlock		    "Subsystem1"
	    DstPort		    2
	  }
	  Branch {
	    Points		    [0, 170]
	    DstBlock		    "Infused Insulin"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "your controller"
	  SrcPort		  1
	  Points		  [60, 0; 0, 100]
	  DstBlock		  "Sum1"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Mux
      Name		      "Mux"
      SID		      "126"
      Ports		      [2, 1]
      Position		      [1100, 71, 1105, 189]
      ShowName		      off
      Inputs		      "2"
      DisplayOption	      "bar"
    }
    Block {
      BlockType		      SubSystem
      Name		      "PID controller"
      SID		      "133"
      Ports		      [1, 1]
      Position		      [480, 349, 580, 391]
      MinAlgLoopOccurrences   off
      PropExecContextOutsideSubsystem off
      RTWSystemCode	      "Auto"
      FunctionWithSeparateData off
      Opaque		      off
      RequestExecContextInheritance off
      MaskHideContents	      off
      System {
	Name			"PID controller"
	Location		[716, 177, 1298, 784]
	Open			on
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
	TiledPageScale		1
	ShowPageBoundaries	off
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "In1"
	  SID			  "134"
	  Position		  [25, 108, 55, 122]
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Derivative
	  Name			  "Derivative"
	  SID			  "151"
	  Position		  [300, 300, 330, 330]
	}
	Block {
	  BlockType		  Integrator
	  Name			  "Integrator"
	  SID			  "137"
	  Ports			  [1, 1]
	  Position		  [300, 100, 330, 130]
	}
	Block {
	  BlockType		  Gain
	  Name			  "K"
	  SID			  "158"
	  Position		  [200, 189, 265, 261]
	  Gain			  "-0.06"
	  ParamDataTypeStr	  "Inherit: Inherit via internal rule"
	  OutDataTypeStr	  "Inherit: Inherit via internal rule"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Gain
	  Name			  "K_d"
	  SID			  "152"
	  Position		  [210, 293, 255, 337]
	  Gain			  "-4"
	  ParamDataTypeStr	  "Inherit: Inherit via internal rule"
	  OutDataTypeStr	  "Inherit: Inherit via internal rule"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Gain
	  Name			  "K_i"
	  SID			  "147"
	  Position		  [200, 84, 265, 146]
	  Gain			  "-0.06/1000"
	  ParamDataTypeStr	  "Inherit: Inherit via internal rule"
	  OutDataTypeStr	  "Inherit: Inherit via internal rule"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  SID			  "146"
	  Ports			  [2, 1]
	  Position		  [380, 105, 400, 125]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "|++"
	  InputSameDT		  off
	  OutDataTypeStr	  "Inherit: Inherit via internal rule"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum1"
	  SID			  "153"
	  Ports			  [2, 1]
	  Position		  [340, 215, 360, 235]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "|++"
	  InputSameDT		  off
	  OutDataTypeStr	  "Inherit: Inherit via internal rule"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Outport
	  Name			  "Out1"
	  SID			  "135"
	  Position		  [445, 108, 475, 122]
	  IconDisplay		  "Port number"
	}
	Line {
	  SrcBlock		  "In1"
	  SrcPort		  1
	  Points		  [95, 0]
	  Branch {
	    DstBlock		    "K_i"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 110]
	    Branch {
	      Points		      [0, 90]
	      DstBlock		      "K_d"
	      DstPort		      1
	    }
	    Branch {
	      DstBlock		      "K"
	      DstPort		      1
	    }
	  }
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  DstBlock		  "Out1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Integrator"
	  SrcPort		  1
	  DstBlock		  "Sum"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "K_i"
	  SrcPort		  1
	  DstBlock		  "Integrator"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "K_d"
	  SrcPort		  1
	  DstBlock		  "Derivative"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Derivative"
	  SrcPort		  1
	  Points		  [15, 0]
	  DstBlock		  "Sum1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Sum1"
	  SrcPort		  1
	  Points		  [25, 0]
	  DstBlock		  "Sum"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "K"
	  SrcPort		  1
	  DstBlock		  "Sum1"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "Plasma Glucose"
      SID		      "130"
      Ports		      [1]
      Position		      [1015, 175, 1075, 205]
      VariableName	      "G_P"
      MaxDataPoints	      "inf"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      Scope
      Name		      "Plasma Insulin"
      SID		      "123"
      Ports		      [1]
      Position		      [1175, 449, 1205, 481]
      Floating		      off
      Location		      [143, 165, 1324, 425]
      Open		      off
      NumInputPorts	      "1"
      ZoomMode		      "xonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      YMin		      "-25000"
      YMax		      "350000"
      SaveName		      "ScopeData9"
      DataFormat	      "StructureWithTime"
      SampleTime	      "0"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "Ra_I"
      SID		      "145"
      Ports		      [1]
      Position		      [1295, 425, 1355, 455]
      VariableName	      "Ra_I"
      MaxDataPoints	      "inf"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      Scope
      Name		      "Rate of Glucose Appearance"
      SID		      "120"
      Ports		      [1]
      Position		      [1175, 269, 1205, 301]
      Floating		      off
      Location		      [43, 112, 1224, 423]
      Open		      off
      NumInputPorts	      "1"
      ZoomMode		      "xonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      YMin		      "-25000"
      YMax		      "350000"
      SaveName		      "ScopeData6"
      DataFormat	      "StructureWithTime"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Scope
      Name		      "Rate of Insulin Appearance"
      SID		      "122"
      Ports		      [1]
      Position		      [1175, 389, 1205, 421]
      Floating		      off
      Location		      [143, 489, 1324, 770]
      Open		      off
      NumInputPorts	      "1"
      ZoomMode		      "xonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      YMin		      "-25000"
      YMax		      "350000"
      SaveName		      "ScopeData8"
      DataFormat	      "StructureWithTime"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Scope
      Name		      "Stomach content"
      SID		      "125"
      Ports		      [1]
      Position		      [1175, 569, 1205, 601]
      Floating		      off
      Location		      [193, 206, 1374, 725]
      Open		      off
      NumInputPorts	      "1"
      ZoomMode		      "xonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      YMin		      "-25000"
      YMax		      "350000"
      SaveName		      "ScopeData11"
      DataFormat	      "StructureWithTime"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Sum
      Name		      "Sum"
      SID		      "143"
      Ports		      [2, 1]
      Position		      [360, 360, 380, 380]
      NamePlacement	      "alternate"
      ShowName		      off
      IconShape		      "round"
      Inputs		      "-+"
      InputSameDT	      off
      OutDataTypeStr	      "Inherit: Inherit via internal rule"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      Scope
      Name		      "e(t)"
      SID		      "159"
      Ports		      [1]
      Position		      [440, 224, 470, 256]
      Floating		      off
      Location		      [133, 454, 1314, 786]
      Open		      off
      NumInputPorts	      "1"
      ZoomMode		      "yonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      YMin		      "-100"
      YMax		      "150"
      SaveName		      "ScopeData13"
      DataFormat	      "StructureWithTime"
      SampleTime	      "0"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "endo"
      SID		      "131"
      Ports		      [1]
      Position		      [1315, 240, 1375, 270]
      VariableName	      "endo"
      MaxDataPoints	      "inf"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "util"
      SID		      "132"
      Ports		      [1]
      Position		      [1315, 365, 1375, 395]
      VariableName	      "util"
      MaxDataPoints	      "inf"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "util1"
      SID		      "156"
      Ports		      [1]
      Position		      [1295, 615, 1355, 645]
      ShowName		      off
      VariableName	      "infused"
      MaxDataPoints	      "inf"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Line {
      SrcBlock		      "Model"
      SrcPort		      3
      Points		      [0, 5; 180, 0]
      Branch {
	DstBlock		"Endogeneous Glucose Production"
	DstPort			1
      }
      Branch {
	Points			[0, 30]
	DstBlock		"endo"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Model"
      SrcPort		      4
      Points		      [0, 5]
      DstBlock		      "Rate of Glucose Appearance"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Model"
      SrcPort		      5
      Points		      [0, 5; 205, 0]
      Branch {
	DstBlock		"Glucose Utliization"
	DstPort			1
      }
      Branch {
	Points			[0, 35]
	DstBlock		"util"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Model"
      SrcPort		      6
      Points		      [0, 5; 190, 0]
      Branch {
	DstBlock		"Rate of Insulin Appearance"
	DstPort			1
      }
      Branch {
	Points			[0, 35]
	DstBlock		"Ra_I"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Model"
      SrcPort		      7
      Points		      [0, 5]
      DstBlock		      "Plasma Insulin"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Model"
      SrcPort		      9
      Points		      [0, 5]
      DstBlock		      "Stomach content"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Mux"
      SrcPort		      1
      Points		      [0, 5]
      DstBlock		      "Glucose"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Model"
      SrcPort		      1
      Points		      [70, 0]
      Branch {
	DstBlock		"Mux"
	DstPort			1
      }
      Branch {
	Points			[0, -40]
	Branch {
	  DstBlock		  "Glucose in ISF"
	  DstPort		  1
	}
	Branch {
	  Points		  [-750, 0; 0, 165]
	  DstBlock		  "Manual Switch"
	  DstPort		  1
	}
      }
    }
    Line {
      SrcBlock		      "Model"
      SrcPort		      2
      Points		      [70, 0]
      Branch {
	DstBlock		"Mux"
	DstPort			2
      }
      Branch {
	Points			[0, 30]
	DstBlock		"Plasma Glucose"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Sum"
      SrcPort		      1
      Points		      [15, 0]
      Branch {
	DstBlock		"PID controller"
	DstPort			1
      }
      Branch {
	Points			[0, -130]
	DstBlock		"e(t)"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "BG_reference"
      SrcPort		      1
      Points		      [85, 0]
      Branch {
	Points			[165, 0]
	DstBlock		"Sum"
	DstPort			2
      }
      Branch {
	Points			[0, -215]
	DstBlock		"Manual Switch"
	DstPort			2
      }
    }
    Line {
      SrcBlock		      "PID controller"
      SrcPort		      1
      Points		      [55, 0]
      Branch {
	DstBlock		"Model"
	DstPort			1
      }
      Branch {
	Points			[0, -95]
	DstBlock		"Control"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Manual Switch"
      SrcPort		      1
      Points		      [30, 0]
      DstBlock		      "Sum"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Model"
      SrcPort		      10
      Points		      [115, 0; 0, -10]
      Branch {
	Points			[0, 55]
	DstBlock		"Infused Insulin"
	DstPort			1
      }
      Branch {
	DstBlock		"util1"
	DstPort			1
      }
    }
    Annotation {
      Position		      [679, 238]
    }
  }
}
