]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
reg_test.mdl beta tests.
authorAndrei <andrei@changeme-desktop.(none)>
Mon, 21 Apr 2008 19:49:55 +0000 (22:49 +0300)
committerAndrei <andrei@changeme-desktop.(none)>
Mon, 21 Apr 2008 19:49:55 +0000 (22:49 +0300)
src/mcl/matlab/reg_test_beta_1.mdl [new file with mode: 0644]
src/mcl/matlab/reg_test_beta_2.mdl [new file with mode: 0644]

diff --git a/src/mcl/matlab/reg_test_beta_1.mdl b/src/mcl/matlab/reg_test_beta_1.mdl
new file mode 100644 (file)
index 0000000..3ee4a6b
--- /dev/null
@@ -0,0 +1,1710 @@
+Model {
+  Name                   "reg_test_beta_1"
+  Version                7.0
+  MdlSubVersion                  0
+  GraphicalInterface {
+    NumRootInports         0
+    NumRootOutports        0
+    ParameterArgumentNames  ""
+    ComputedModelVersion    "1.230"
+    NumModelReferences     0
+    NumTestPointedSignals   0
+  }
+  SavedCharacterEncoding  "iso-8859-2"
+  PreLoadFcn             "init"
+  PostLoadFcn            "figure(2); hold off\nfigure(1);\nsim('reg_test', 0); % show figures"
+  SaveDefaultBlockParams  on
+  SampleTimeColors       off
+  LibraryLinkDisplay     "none"
+  WideLines              off
+  ShowLineDimensions     on
+  ShowPortDataTypes      off
+  ShowLoopsOnError       on
+  IgnoreBidirectionalLines off
+  ShowStorageClass       off
+  ShowTestPointIcons     on
+  ShowViewerIcons        on
+  SortedOrder            off
+  ExecutionContextIcon   off
+  ShowLinearizationAnnotations on
+  ScopeRefreshTime       0.035000
+  OverrideScopeRefreshTime on
+  DisableAllScopes       off
+  DataTypeOverride       "UseLocalSettings"
+  MinMaxOverflowLogging          "UseLocalSettings"
+  MinMaxOverflowArchiveMode "Overwrite"
+  BlockNameDataTip       off
+  BlockParametersDataTip  off
+  BlockDescriptionStringDataTip        off
+  ToolBar                on
+  StatusBar              on
+  BrowserShowLibraryLinks off
+  BrowserLookUnderMasks          off
+  InitFcn                "figure(2); hold off\nfigure(1);"
+  Created                "Thu Mar 29 23:35:11 2007"
+  Creator                "wsh"
+  UpdateHistory                  "UpdateHistoryNever"
+  ModifiedByFormat       "%<Auto>"
+  LastModifiedBy         "andrei"
+  ModifiedDateFormat     "%<Auto>"
+  LastModifiedDate       "Mon Apr 21 22:45:10 2008"
+  RTWModifiedTimeStamp   0
+  ModelVersionFormat     "1.%<AutoIncrement:230>"
+  ConfigurationManager   "None"
+  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
+  covSaveCumulativeToWorkspaceVar on
+  CovSaveSingleToWorkspaceVar on
+  CovCumulativeVarName   "covCumulativeData"
+  CovCumulativeReport    off
+  CovReportOnPause       on
+  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            on
+  ShowModelReferenceBlockVersion off
+  ShowModelReferenceBlockIO off
+  Array {
+    Type                   "Handle"
+    Dimension              1
+    Simulink.ConfigSet {
+      $ObjectID                      1
+      Version                "1.3.0"
+      Array {
+       Type                    "Handle"
+       Dimension               7
+       Simulink.SolverCC {
+         $ObjectID               2
+         Version                 "1.3.0"
+         StartTime               "0.0"
+         StopTime                "100"
+         AbsTol                  "auto"
+         FixedStep               "0.05"
+         InitialStep             "auto"
+         MaxNumMinSteps          "-1"
+         MaxOrder                5
+         ConsecutiveZCsStepRelTol "10*128*eps"
+         MaxConsecutiveZCs       "1000"
+         ExtrapolationOrder      4
+         NumberNewtonIterations  1
+         MaxStep                 "auto"
+         MinStep                 "auto"
+         MaxConsecutiveMinStep   "1"
+         RelTol                  "1e-3"
+         SolverMode              "Auto"
+         Solver                  "ode45"
+         SolverName              "ode45"
+         ZeroCrossControl        "UseLocalSettings"
+         AlgebraicLoopSolver     "TrustRegion"
+         SolverResetMethod       "Fast"
+         PositivePriorityOrder   off
+         AutoInsertRateTranBlk   off
+         SampleTimeConstraint    "Unconstrained"
+         RateTranMode            "Deterministic"
+       }
+       Simulink.DataIOCC {
+         $ObjectID               3
+         Version                 "1.3.0"
+         Decimation              "1"
+         ExternalInput           "[t, u]"
+         FinalStateName          "xFinal"
+         InitialState            "xInitial"
+         LimitDataPoints         on
+         MaxDataPoints           "1000"
+         LoadExternalInput       off
+         LoadInitialState        off
+         SaveFinalState          off
+         SaveFormat              "Array"
+         SaveOutput              on
+         SaveState               off
+         SignalLogging           on
+         InspectSignalLogs       off
+         SaveTime                on
+         StateSaveName           "xout"
+         TimeSaveName            "tout"
+         OutputSaveName          "yout"
+         SignalLoggingName       "logsout"
+         OutputOption            "RefineOutputTimes"
+         OutputTimes             "[]"
+         Refine                  "1"
+       }
+       Simulink.OptimizationCC {
+         $ObjectID               4
+         Array {
+           Type                    "Cell"
+           Dimension               5
+           Cell                    "ZeroExternalMemoryAtStartup"
+           Cell                    "ZeroInternalMemoryAtStartup"
+           Cell                    "InitFltsAndDblsToZero"
+           Cell                    "OptimizeModelRefInitCode"
+           Cell                    "NoFixptDivByZeroProtection"
+           PropName                "DisabledProps"
+         }
+         Version                 "1.3.0"
+         BlockReduction          on
+         BooleanDataType         on
+         ConditionallyExecuteInputs on
+         InlineParams            off
+         InlineInvariantSignals  off
+         OptimizeBlockIOStorage  on
+         BufferReuse             on
+         EnforceIntegerDowncast  on
+         ExpressionFolding       on
+         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
+         OptimizeModelRefInitCode off
+         LifeSpan                "inf"
+         BufferReusableBoundary  on
+         SimCompilerOptimization "Off"
+         AccelVerboseBuild       off
+       }
+       Simulink.DebuggingCC {
+         $ObjectID               5
+         Version                 "1.3.0"
+         RTPrefix                "error"
+         ConsistencyChecking     "none"
+         ArrayBoundsChecking     "none"
+         SignalInfNanChecking    "none"
+         SignalRangeChecking     "none"
+         ReadBeforeWriteMsg      "UseLocalSettings"
+         WriteAfterWriteMsg      "UseLocalSettings"
+         WriteAfterReadMsg       "UseLocalSettings"
+         AlgebraicLoopMsg        "warning"
+         ArtificialAlgebraicLoopMsg "warning"
+         SaveWithDisabledLinksMsg "warning"
+         SaveWithParameterizedLinksMsg "none"
+         CheckSSInitialOutputMsg on
+         CheckExecutionContextPreStartOutputMsg off
+         CheckExecutionContextRuntimeOutputMsg off
+         SignalResolutionControl "TryResolveAllWithWarning"
+         BlockPriorityViolationMsg "warning"
+         MinStepSizeMsg          "warning"
+         TimeAdjustmentMsg       "none"
+         MaxConsecutiveZCsMsg    "error"
+         SolverPrmCheckMsg       "warning"
+         InheritedTsInSrcMsg     "warning"
+         DiscreteInheritContinuousMsg "warning"
+         MultiTaskDSMMsg         "error"
+         MultiTaskCondExecSysMsg "error"
+         MultiTaskRateTransMsg   "error"
+         SingleTaskRateTransMsg  "none"
+         TasksWithSamePriorityMsg "warning"
+         SigSpecEnsureSampleTimeMsg "warning"
+         CheckMatrixSingularityMsg "none"
+         IntegerOverflowMsg      "warning"
+         Int32ToFloatConvMsg     "warning"
+         ParameterDowncastMsg    "error"
+         ParameterOverflowMsg    "error"
+         ParameterUnderflowMsg   "none"
+         ParameterPrecisionLossMsg "warning"
+         ParameterTunabilityLossMsg "warning"
+         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"
+         ModelReferenceVersionMismatchMessage "none"
+         ModelReferenceIOMismatchMessage "none"
+         ModelReferenceCSMismatchMessage "none"
+         ModelReferenceSimTargetVerbose off
+         UnknownTsInhSupMsg      "warning"
+         ModelReferenceDataLoggingMessage "warning"
+         ModelReferenceSymbolNameMessage "warning"
+         ModelReferenceExtraNoncontSigs "error"
+         StateNameClashWarn      "warning"
+         StrictBusMsg            "Warning"
+         LoggingUnavailableSignals "error"
+       }
+       Simulink.HardwareCC {
+         $ObjectID               6
+         Version                 "1.3.0"
+         ProdBitPerChar          8
+         ProdBitPerShort         16
+         ProdBitPerInt           32
+         ProdBitPerLong          32
+         ProdIntDivRoundTo       "Undefined"
+         ProdEndianess           "Unspecified"
+         ProdWordSize            32
+         ProdShiftRightIntArith  on
+         ProdHWDeviceType        "32-bit Generic"
+         TargetBitPerChar        8
+         TargetBitPerShort       16
+         TargetBitPerInt         32
+         TargetBitPerLong        32
+         TargetShiftRightIntArith on
+         TargetIntDivRoundTo     "Undefined"
+         TargetEndianess         "Unspecified"
+         TargetWordSize          32
+         TargetTypeEmulationWarnSuppressLevel 0
+         TargetPreprocMaxBitsSint 32
+         TargetPreprocMaxBitsUint 32
+         TargetHWDeviceType      "Specified"
+         TargetUnknown           off
+         ProdEqTarget            on
+       }
+       Simulink.ModelReferenceCC {
+         $ObjectID               7
+         Version                 "1.3.0"
+         UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange"
+         CheckModelReferenceTargetMessage "error"
+         ModelReferenceNumInstancesAllowed "Multi"
+         ModelReferencePassRootInputsByReference on
+         ModelReferenceMinAlgLoopOccurrences off
+       }
+       Simulink.RTWCC {
+         $BackupClass            "Simulink.RTWCC"
+         $ObjectID               8
+         Array {
+           Type                    "Cell"
+           Dimension               1
+           Cell                    "IncludeHyperlinkInReport"
+           PropName                "DisabledProps"
+         }
+         Version                 "1.3.0"
+         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
+         IncludeHyperlinkInReport off
+         LaunchReport            off
+         TargetLang              "C"
+         IncludeBusHierarchyInRTWFileBlockHierarchyMap off
+         IncludeERTFirstTime     off
+         GenerateTraceInfo       off
+         RTWCompilerOptimization "Off"
+         Array {
+           Type                    "Handle"
+           Dimension               2
+           Simulink.CodeAppCC {
+             $ObjectID               9
+             Array {
+               Type                    "Cell"
+               Dimension               16
+               Cell                    "IgnoreCustomStorageClasses"
+               Cell                    "InsertBlockDesc"
+               Cell                    "SFDataObjDesc"
+               Cell                    "SimulinkDataObjDesc"
+               Cell                    "DefineNamingRule"
+               Cell                    "SignalNamingRule"
+               Cell                    "ParamNamingRule"
+               Cell                    "InlinedPrmAccess"
+               Cell                    "CustomSymbolStr"
+               Cell                    "CustomSymbolStrGlobalVar"
+               Cell                    "CustomSymbolStrType"
+               Cell                    "CustomSymbolStrField"
+               Cell                    "CustomSymbolStrFcn"
+               Cell                    "CustomSymbolStrBlkIO"
+               Cell                    "CustomSymbolStrTmpVar"
+               Cell                    "CustomSymbolStrMacro"
+               PropName                "DisabledProps"
+             }
+             Version                 "1.3.0"
+             ForceParamTrailComments off
+             GenerateComments        on
+             IgnoreCustomStorageClasses on
+             IncHierarchyInIds       off
+             MaxIdLength             31
+             PreserveName            off
+             PreserveNameWithParent  off
+             ShowEliminatedStatement off
+             IncAutoGenComments      off
+             SimulinkDataObjDesc     off
+             SFDataObjDesc           off
+             IncDataTypeInIds        off
+             MangleLength            1
+             CustomSymbolStrGlobalVar "$R$N$M"
+             CustomSymbolStrType     "$N$R$M"
+             CustomSymbolStrField    "$N$M"
+             CustomSymbolStrFcn      "$R$N$M$F"
+             CustomSymbolStrBlkIO    "rtb_$N$M"
+             CustomSymbolStrTmpVar   "$N$M"
+             CustomSymbolStrMacro    "$R$N$M"
+             DefineNamingRule        "None"
+             ParamNamingRule         "None"
+             SignalNamingRule        "None"
+             InsertBlockDesc         off
+             SimulinkBlockComments   on
+             EnableCustomComments    off
+             InlinedPrmAccess        "Literals"
+             ReqsInCode              off
+           }
+           Simulink.GRTTargetCC {
+             $BackupClass            "Simulink.TargetCC"
+             $ObjectID               10
+             Array {
+               Type                    "Cell"
+               Dimension               13
+               Cell                    "IncludeMdlTerminateFcn"
+               Cell                    "CombineOutputUpdateFcns"
+               Cell                    "SuppressErrorStatus"
+               Cell                    "ERTCustomFileBanners"
+               Cell                    "GenerateSampleERTMain"
+               Cell                    "GenerateTestInterfaces"
+               Cell                    "MultiInstanceERTCode"
+               Cell                    "PurelyIntegerCode"
+               Cell                    "SupportNonFinite"
+               Cell                    "SupportComplex"
+               Cell                    "SupportAbsoluteTime"
+               Cell                    "SupportContinuousTime"
+               Cell                    "SupportNonInlinedSFcns"
+               PropName                "DisabledProps"
+             }
+             Version                 "1.3.0"
+             TargetFcnLib            "ansi_tfl_tmw.mat"
+             TargetLibSuffix         ""
+             TargetPreCompLibLocation ""
+             GenFloatMathFcnCalls    "ANSI_C"
+             UtilityFuncGeneration   "Auto"
+             GenerateFullHeader      on
+             GenerateSampleERTMain   off
+             GenerateTestInterfaces  off
+             IsPILTarget             off
+             ModelReferenceCompliant on
+             CompOptLevelCompliant   on
+             IncludeMdlTerminateFcn  on
+             CombineOutputUpdateFcns off
+             SuppressErrorStatus     off
+             IncludeFileDelimiter    "Auto"
+             ERTCustomFileBanners    off
+             SupportAbsoluteTime     on
+             LogVarNameModifier      "rt_"
+             MatFileLogging          on
+             MultiInstanceERTCode    off
+             SupportNonFinite        on
+             SupportComplex          on
+             PurelyIntegerCode       off
+             SupportContinuousTime   on
+             SupportNonInlinedSFcns  on
+             EnableShiftOperators    on
+             ParenthesesLevel        "Nominal"
+             PortableWordSizes       off
+             ModelStepFunctionPrototypeControlCompliant off
+             ExtMode                 off
+             ExtModeStaticAlloc      off
+             ExtModeTesting          off
+             ExtModeStaticAllocSize  1000000
+             ExtModeTransport        0
+             ExtModeMexFile          "ext_comm"
+             ExtModeIntrfLevel       "Level1"
+             RTWCAPISignals          off
+             RTWCAPIParams           off
+             RTWCAPIStates           off
+             GenerateASAP2           off
+           }
+           PropName                "Components"
+         }
+       }
+       PropName                "Components"
+      }
+      Name                   "Configuration"
+      CurrentDlgPage         "Solver"
+    }
+    PropName               "ConfigurationSets"
+  }
+  Simulink.ConfigSet {
+    $PropName              "ActiveConfigurationSet"
+    $ObjectID              1
+  }
+  WSDataSource           "M-Code"
+  BlockDefaults {
+    Orientation                    "right"
+    ForegroundColor        "black"
+    BackgroundColor        "white"
+    DropShadow             off
+    NamePlacement          "normal"
+    FontName               "Arial"
+    FontSize               10
+    FontWeight             "normal"
+    FontAngle              "normal"
+    ShowName               on
+  }
+  BlockParameterDefaults {
+    Block {
+      BlockType                      Clock
+      DisplayTime            off
+    }
+    Block {
+      BlockType                      Demux
+      Outputs                "4"
+      DisplayOption          "none"
+      BusSelectionMode       off
+    }
+    Block {
+      BlockType                      Display
+      Format                 "short"
+      Decimation             "10"
+      Floating               off
+      SampleTime             "-1"
+    }
+    Block {
+      BlockType                      Gain
+      Gain                   "1"
+      Multiplication         "Element-wise(K.*u)"
+      ParamMin               "[]"
+      ParamMax               "[]"
+      ParameterDataTypeMode   "Same as input"
+      ParameterDataType              "fixdt(1,16,0)"
+      ParameterScalingMode    "Best Precision: Matrix-wise"
+      ParameterScaling       "[]"
+      OutMin                 "[]"
+      OutMax                 "[]"
+      OutDataTypeMode        "Same as input"
+      OutDataType            "fixdt(1,16,0)"
+      OutScaling             "[]"
+      LockScale                      off
+      RndMeth                "Floor"
+      SaturateOnIntegerOverflow        on
+      SampleTime             "-1"
+    }
+    Block {
+      BlockType                      Inport
+      Port                   "1"
+      UseBusObject           off
+      BusObject                      "BusObject"
+      BusOutputAsStruct              off
+      PortDimensions         "-1"
+      SampleTime             "-1"
+      OutMin                 "[]"
+      OutMax                 "[]"
+      DataType               "auto"
+      OutDataType            "fixdt(1,16,0)"
+      OutScaling             "[]"
+      SignalType             "auto"
+      SamplingMode           "auto"
+      LatchByDelayingOutsideSignal off
+      LatchByCopyingInsideSignal 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                      "M-S-Function"
+      FunctionName           "mlfile"
+      DisplayMFileStacktrace  on
+    }
+    Block {
+      BlockType                      Mux
+      Inputs                 "4"
+      DisplayOption          "none"
+      UseBusObject           off
+      BusObject                      "BusObject"
+      NonVirtualBus          off
+    }
+    Block {
+      BlockType                      Outport
+      Port                   "1"
+      UseBusObject           off
+      BusObject                      "BusObject"
+      BusOutputAsStruct              off
+      PortDimensions         "-1"
+      SampleTime             "-1"
+      OutMin                 "[]"
+      OutMax                 "[]"
+      DataType               "auto"
+      OutDataType            "fixdt(1,16,0)"
+      OutScaling             "[]"
+      SignalType             "auto"
+      SamplingMode           "auto"
+      OutputWhenDisabled      "held"
+      InitialOutput          "[]"
+    }
+    Block {
+      BlockType                      RateLimiter
+      RisingSlewLimit        "1"
+      FallingSlewLimit       "-1"
+      SampleTimeMode         "continuous"
+      InitialCondition       "0"
+      LinearizeAsGain        on
+    }
+    Block {
+      BlockType                      RateTransition
+      Integrity                      on
+      Deterministic          on
+      X0                     "0"
+      OutPortSampleTime              "-1"
+    }
+    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                      Selector
+      NumberOfDimensions      "1"
+      IndexMode                      "One-based"
+      InputPortWidth         "-1"
+      SampleTime             "-1"
+    }
+    Block {
+      BlockType                      "S-Function"
+      FunctionName           "system"
+      SFunctionModules       "''"
+      PortCounts             "[]"
+    }
+    Block {
+      BlockType                      SubSystem
+      ShowPortLabels         "FromPortIcon"
+      Permissions            "ReadWrite"
+      PermitHierarchicalResolution "All"
+      TreatAsAtomicUnit              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"
+      MinMaxOverflowLogging   "UseLocalSettings"
+    }
+    Block {
+      BlockType                      Sum
+      IconShape                      "rectangular"
+      Inputs                 "++"
+      CollapseMode           "All dimensions"
+      CollapseDim            "1"
+      InputSameDT            on
+      OutMin                 "[]"
+      OutMax                 "[]"
+      OutDataTypeMode        "Same as first input"
+      OutDataType            "fixdt(1,16,0)"
+      OutScaling             "[]"
+      LockScale                      off
+      RndMeth                "Floor"
+      SaturateOnIntegerOverflow        on
+      SampleTime             "-1"
+    }
+    Block {
+      BlockType                      Switch
+      Criteria               "u2 >= Threshold"
+      Threshold                      "0"
+      InputSameDT            on
+      OutMin                 "[]"
+      OutMax                 "[]"
+      OutDataTypeMode        "Inherit via internal rule"
+      OutDataType            "fixdt(1,16,0)"
+      OutScaling             "[]"
+      LockScale                      off
+      RndMeth                "Floor"
+      SaturateOnIntegerOverflow        on
+      ZeroCross                      on
+      SampleTime             "-1"
+    }
+    Block {
+      BlockType                      ToWorkspace
+      VariableName           "simulink_output"
+      MaxDataPoints          "1000"
+      Decimation             "1"
+      SampleTime             "0"
+      FixptAsFi                      off
+    }
+    Block {
+      BlockType                      UnitDelay
+      X0                     "0"
+      SampleTime             "1"
+      StateMustResolveToSignalObject off
+      RTWStateStorageClass    "Auto"
+    }
+    Block {
+      BlockType                      Constant
+      Value                  "1"
+      VectorParams1D         on
+      SamplingMode           "Sample based"
+      OutMin                 "[]"
+      OutMax                 "[]"
+      OutDataTypeMode        "Inherit from 'Constant value'"
+      OutDataType            "fixdt(1,16,0)"
+      ConRadixGroup          "Use specified scaling"
+      OutScaling             "[]"
+      SampleTime             "inf"
+      FramePeriod            "inf"
+    }
+    Block {
+      BlockType                      Saturate
+      UpperLimit             "0.5"
+      LowerLimit             "-0.5"
+      LinearizeAsGain        on
+      ZeroCross                      on
+      SampleTime             "-1"
+      OutMin                 "[]"
+      OutMax                 "[]"
+      OutDataTypeMode        "Same as input"
+      OutDataType            "fixdt(1,16,0)"
+      OutScaling             "[]"
+      LockScale                      off
+      RndMeth                "Floor"
+    }
+  }
+  AnnotationDefaults {
+    HorizontalAlignment            "center"
+    VerticalAlignment      "middle"
+    ForegroundColor        "black"
+    BackgroundColor        "white"
+    DropShadow             off
+    FontName               "Arial"
+    FontSize               10
+    FontWeight             "normal"
+    FontAngle              "normal"
+    UseDisplayTextAsClickCallback off
+  }
+  LineDefaults {
+    FontName               "Arial"
+    FontSize               9
+    FontWeight             "normal"
+    FontAngle              "normal"
+  }
+  System {
+    Name                   "reg_test_beta_1"
+    Location               [25, 195, 947, 651]
+    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"
+    ReportName             "simulink-default.rpt"
+    Block {
+      BlockType                      SubSystem
+      Name                   " "
+      Ports                  []
+      Position               [25, 14, 95, 48]
+      OpenFcn                "path=diag([area.w area.h])*rand(2,8)\nsim('reg_test',0)                   "
+      MinAlgLoopOccurrences   off
+      RTWSystemCode          "Auto"
+      FunctionWithSeparateData off
+      MaskDisplay            "disp('Random path')"
+      MaskIconFrame          on
+      MaskIconOpaque         on
+      MaskIconRotate         "none"
+      MaskIconUnits          "autoscale"
+      System {
+       Name                    " "
+       Location                [433, 403, 931, 703]
+       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                      Clock
+      Name                   "Clock"
+      Position               [455, 95, 475, 115]
+      Decimation             "10"
+    }
+    Block {
+      BlockType                      Display
+      Name                   "Display"
+      Ports                  [1]
+      Position               [505, 91, 590, 119]
+      Lockdown               off
+    }
+    Block {
+      BlockType                      Gain
+      Name                   "Gain"
+      Position               [260, 120, 290, 150]
+      Gain                   "[1 1]/desc.robot.wheelr"
+      ParameterDataTypeMode   "Inherit via internal rule"
+      ParameterDataType              "sfix(16)"
+      ParameterScaling       "2^0"
+      OutDataTypeMode        "Inherit via internal rule"
+      OutDataType            "sfix(16)"
+      OutScaling             "2^0"
+      SaturateOnIntegerOverflow        off
+    }
+    Block {
+      BlockType                      "M-S-Function"
+      Name                   "Level-2 M-file\nS-Function"
+      Ports                  [2]
+      Position               [635, 124, 695, 171]
+      BackgroundColor        "cyan"
+      FunctionName           "sfdrawrobot"
+      Parameters             "desc,0"
+      MaskDisplay            "disp('Drawer')\nport_label('input', 1, 'x')\nport_label('input', 2, 'y')\n"
+      MaskIconFrame          on
+      MaskIconOpaque         on
+      MaskIconRotate         "none"
+      MaskIconUnits          "autoscale"
+    }
+    Block {
+      BlockType                      "M-S-Function"
+      Name                   "Level-2 M-file\nS-Function1"
+      Ports                  [2]
+      Position               [805, 308, 870, 352]
+      ForegroundColor        "blue"
+      FunctionName           "sfdrawrobot"
+      Parameters             "desc,'--b'"
+      MaskDisplay            "disp('Drawer')\nport_label('input', 1, 'x')\nport_label('input', 2, 'y')\n"
+      MaskIconFrame          on
+      MaskIconOpaque         on
+      MaskIconRotate         "none"
+      MaskIconUnits          "autoscale"
+    }
+    Block {
+      BlockType                      "M-S-Function"
+      Name                   "Level-2 M-file\nS-Function2"
+      Ports                  [2]
+      Position               [635, 33, 700, 77]
+      ForegroundColor        "magenta"
+      FunctionName           "sfdrawrobot"
+      Parameters             "desc,'--m'"
+      MaskDisplay            "disp('Drawer')\nport_label('input', 1, 'x')\nport_label('input', 2, 'y')\n"
+      MaskIconFrame          on
+      MaskIconOpaque         on
+      MaskIconRotate         "none"
+      MaskIconUnits          "autoscale"
+    }
+    Block {
+      BlockType                      Reference
+      Name                   "Manual Switch"
+      Ports                  [2, 1]
+      Position               [130, 122, 160, 158]
+      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"
+      sw                     "1"
+      action                 "0"
+      varsize                off
+    }
+    Block {
+      BlockType                      RateTransition
+      Name                   "Rate Transition1"
+      Position               [130, 369, 170, 411]
+      Orientation            "left"
+      X0                     "desc.initpos"
+    }
+    Block {
+      BlockType                      RateTransition
+      Name                   "Rate Transition3"
+      Position               [360, 254, 400, 296]
+      Orientation            "left"
+    }
+    Block {
+      BlockType                      "S-Function"
+      Name                   "S-Function"
+      Ports                  [2, 1]
+      Position               [180, 116, 235, 149]
+      BackgroundColor        "green"
+      FunctionName           "sf_posreg"
+      Parameters             "[2 2 10],0.02"
+    }
+    Block {
+      BlockType                      "S-Function"
+      Name                   "S-Function2"
+      Ports                  [0, 1]
+      Position               [35, 74, 95, 106]
+      BackgroundColor        "green"
+      FunctionName           "sf_trgen"
+      Parameters             "path, desc.initpos, desc.wayconstraints"
+    }
+    Block {
+      BlockType                      SubSystem
+      Name                   "Sl. gains X,Y,A"
+      Ports                  [1, 1]
+      Position               [465, 169, 510, 211]
+      MinAlgLoopOccurrences   off
+      RTWSystemCode          "Auto"
+      FunctionWithSeparateData off
+      System {
+       Name                    "Sl. gains X,Y,A"
+       Location                [116, 203, 882, 663]
+       Open                    off
+       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"
+         Position                [145, 213, 175, 227]
+         IconDisplay             "Port number"
+         OutDataType             "sfix(16)"
+         OutScaling              "2^0"
+       }
+       Block {
+         BlockType               Demux
+         Name                    "Demux"
+         Ports                   [1, 3]
+         Position                [265, 201, 270, 239]
+         BackgroundColor         "black"
+         ShowName                off
+         Outputs                 "3"
+         DisplayOption           "bar"
+       }
+       Block {
+         BlockType               Mux
+         Name                    "Mux1"
+         Ports                   [3, 1]
+         Position                [445, 201, 450, 239]
+         ShowName                off
+         Inputs                  "3"
+         DisplayOption           "bar"
+       }
+       Block {
+         BlockType               Reference
+         Name                    "Slider\nGain ANGLE"
+         Ports                   [1, 1]
+         Position                [330, 280, 385, 310]
+         SourceBlock             "simulink/Math\nOperations/Slider\nGain"
+         SourceType              "Slider Gain"
+         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"
+         low                     "0"
+         gain                    "0"
+         high                    "6.28"
+       }
+       Block {
+         BlockType               Reference
+         Name                    "Slider\nGain X"
+         Ports                   [1, 1]
+         Position                [330, 135, 385, 165]
+         SourceBlock             "simulink/Math\nOperations/Slider\nGain"
+         SourceType              "Slider Gain"
+         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"
+         low                     "0"
+         gain                    "0.75138"
+         high                    "3"
+       }
+       Block {
+         BlockType               Reference
+         Name                    "Slider\nGain Y"
+         Ports                   [1, 1]
+         Position                [325, 205, 385, 235]
+         SourceBlock             "simulink/Math\nOperations/Slider\nGain"
+         SourceType              "Slider Gain"
+         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"
+         low                     "0"
+         gain                    "0.4593"
+         high                    "2.1"
+       }
+       Block {
+         BlockType               Outport
+         Name                    "Out1"
+         Position                [575, 213, 605, 227]
+         IconDisplay             "Port number"
+         OutDataType             "sfix(16)"
+         OutScaling              "2^0"
+       }
+       Line {
+         SrcBlock                "Slider\nGain X"
+         SrcPort                 1
+         Points                  [40, 0]
+         DstBlock                "Mux1"
+         DstPort                 1
+       }
+       Line {
+         SrcBlock                "Slider\nGain Y"
+         SrcPort                 1
+         DstBlock                "Mux1"
+         DstPort                 2
+       }
+       Line {
+         SrcBlock                "Slider\nGain ANGLE"
+         SrcPort                 1
+         Points                  [40, 0]
+         DstBlock                "Mux1"
+         DstPort                 3
+       }
+       Line {
+         SrcBlock                "Mux1"
+         SrcPort                 1
+         DstBlock                "Out1"
+         DstPort                 1
+       }
+       Line {
+         SrcBlock                "Demux"
+         SrcPort                 1
+         Points                  [20, 0; 0, -60]
+         DstBlock                "Slider\nGain X"
+         DstPort                 1
+       }
+       Line {
+         SrcBlock                "Demux"
+         SrcPort                 2
+         DstBlock                "Slider\nGain Y"
+         DstPort                 1
+       }
+       Line {
+         SrcBlock                "Demux"
+         SrcPort                 3
+         Points                  [20, 0; 0, 65]
+         DstBlock                "Slider\nGain ANGLE"
+         DstPort                 1
+       }
+       Line {
+         SrcBlock                "In1"
+         SrcPort                 1
+         DstBlock                "Demux"
+         DstPort                 1
+       }
+      }
+    }
+    Block {
+      BlockType                      SubSystem
+      Name                   "Subsystem"
+      Ports                  [1, 1]
+      Position               [310, 111, 435, 159]
+      BackgroundColor        "yellow"
+      MinAlgLoopOccurrences   off
+      RTWSystemCode          "Auto"
+      FunctionWithSeparateData off
+      MaskDisplay            "disp('Robot\\n\\n')\nport_label('input', 1, 'u=(w1,w2)')\nport_label('output', 1, 'x=(X,Y,th)')"
+      MaskIconFrame          on
+      MaskIconOpaque         on
+      MaskIconRotate         "none"
+      MaskIconUnits          "autoscale"
+      System {
+       Name                    "Subsystem"
+       Location                [165, 393, 999, 577]
+       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"
+         Position                [15, 38, 45, 52]
+         IconDisplay             "Port number"
+         OutDataType             "sfix(16)"
+         OutScaling              "2^0"
+         Port {
+           PortNumber              1
+           Name                    "rad/s"
+           RTWStorageClass         "Auto"
+           DataLoggingNameMode     "SignalName"
+         }
+       }
+       Block {
+         BlockType               Integrator
+         Name                    "Integrator"
+         Ports                   [1, 1]
+         Position                [530, 40, 560, 70]
+         InitialCondition        "desc.initpos"
+         UpperSaturationLimit    "[area.w area.h Inf]"
+         LowerSaturationLimit    "[0 0 -Inf]"
+         Port {
+           PortNumber              1
+           Name                    "x,y,phi [m,m,rad]"
+           RTWStorageClass         "Auto"
+           DataLoggingNameMode     "SignalName"
+         }
+       }
+       Block {
+         BlockType               Reference
+         Name                    "Manual Switch"
+         Ports                   [2, 1]
+         Position                [250, 27, 280, 63]
+         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"
+         sw                      "1"
+         action                  "0"
+         varsize                 off
+       }
+       Block {
+         BlockType               Mux
+         Name                    "Mux1"
+         Ports                   [2, 1]
+         Position                [380, 36, 385, 74]
+         ShowName                off
+         Inputs                  "2"
+         DisplayOption           "bar"
+       }
+       Block {
+         BlockType               Selector
+         Name                    "Selector"
+         Ports                   [1, 1]
+         Position                [420, 121, 460, 159]
+         Orientation             "left"
+         InputPortWidth          "3"
+         IndexOptions            "Index vector (dialog)"
+         Indices                 "[3]"
+         OutputSizes             "1"
+         Port {
+           PortNumber              1
+           Name                    "angle"
+           RTWStorageClass         "Auto"
+           DataLoggingNameMode     "SignalName"
+         }
+       }
+       Block {
+         BlockType               Gain
+         Name                    "Wheel\nradius"
+         Position                [90, 27, 135, 63]
+         Gain                    "robot.wheelr"
+         ParameterDataTypeMode   "Inherit via internal rule"
+         ParameterDataType       "sfix(16)"
+         ParameterScaling        "2^0"
+         OutDataTypeMode         "Inherit via internal rule"
+         OutDataType             "sfix(16)"
+         OutScaling              "2^0"
+         SaturateOnIntegerOverflow off
+         Port {
+           PortNumber              1
+           Name                    "m/s"
+           RTWStorageClass         "Auto"
+           DataLoggingNameMode     "SignalName"
+         }
+       }
+       Block {
+         BlockType               MATLABFcn
+         Name                    "kinematics"
+         Ports                   [1, 1]
+         Position                [430, 40, 490, 70]
+         MATLABFcn               "kinematics"
+       }
+       Block {
+         BlockType               RateLimiter
+         Name                    "max acc"
+         Position                [190, 20, 220, 50]
+         RisingSlewLimit         "3"
+         FallingSlewLimit        "-3"
+         SampleTimeMode          "inherited"
+       }
+       Block {
+         BlockType               Saturate
+         Name                    "max m/s"
+         Position                [320, 30, 350, 60]
+         UpperLimit              "2"
+         LowerLimit              "-2"
+       }
+       Block {
+         BlockType               Outport
+         Name                    "Out1"
+         Position                [725, 48, 755, 62]
+         IconDisplay             "Port number"
+         OutDataType             "sfix(16)"
+         OutScaling              "2^0"
+       }
+       Line {
+         SrcBlock                "kinematics"
+         SrcPort                 1
+         DstBlock                "Integrator"
+         DstPort                 1
+       }
+       Line {
+         Name                    "x,y,phi [m,m,rad]"
+         SrcBlock                "Integrator"
+         SrcPort                 1
+         Points                  [20, 0]
+         Branch {
+           Points                  [0, 85]
+           DstBlock                "Selector"
+           DstPort                 1
+         }
+         Branch {
+           Labels                  [1, 0; 1, 1]
+           DstBlock                "Out1"
+           DstPort                 1
+         }
+       }
+       Line {
+         SrcBlock                "Mux1"
+         SrcPort                 1
+         DstBlock                "kinematics"
+         DstPort                 1
+       }
+       Line {
+         Name                    "angle"
+         Labels                  [0, 0]
+         SrcBlock                "Selector"
+         SrcPort                 1
+         Points                  [-60, 0; 0, -75]
+         DstBlock                "Mux1"
+         DstPort                 2
+       }
+       Line {
+         Name                    "rad/s"
+         Labels                  [0, 0]
+         SrcBlock                "In1"
+         SrcPort                 1
+         DstBlock                "Wheel\nradius"
+         DstPort                 1
+       }
+       Line {
+         SrcBlock                "max m/s"
+         SrcPort                 1
+         DstBlock                "Mux1"
+         DstPort                 1
+       }
+       Line {
+         SrcBlock                "Manual Switch"
+         SrcPort                 1
+         DstBlock                "max m/s"
+         DstPort                 1
+       }
+       Line {
+         SrcBlock                "max acc"
+         SrcPort                 1
+         DstBlock                "Manual Switch"
+         DstPort                 1
+       }
+       Line {
+         Name                    "m/s"
+         Labels                  [0, 0]
+         SrcBlock                "Wheel\nradius"
+         SrcPort                 1
+         Points                  [20, 0]
+         Branch {
+           Points                  [0, -10]
+           DstBlock                "max acc"
+           DstPort                 1
+         }
+         Branch {
+           Points                  [0, 25; 75, 0]
+           DstBlock                "Manual Switch"
+           DstPort                 2
+         }
+       }
+      }
+    }
+    Block {
+      BlockType                      ToWorkspace
+      Name                   "To Workspace"
+      Position               [240, 75, 300, 105]
+      VariableName           "trajectory"
+      MaxDataPoints          "inf"
+      SampleTime             "-1"
+      SaveFormat             "Structure With Time"
+    }
+    Block {
+      BlockType                      MATLABFcn
+      Name                   "beacon_angles"
+      Ports                  [1, 1]
+      Position               [270, 260, 330, 290]
+      Orientation            "left"
+      BackgroundColor        "yellow"
+      NamePlacement          "alternate"
+      MATLABFcn                      "mod(beacon_angles(u), 2*pi)"
+      SampleTime             "1/10"
+    }
+    Block {
+      BlockType                      SubSystem
+      Name                   "localize"
+      Ports                  [2, 1]
+      Position               [590, 291, 745, 349]
+      MinAlgLoopOccurrences   off
+      RTWSystemCode          "Auto"
+      FunctionWithSeparateData off
+      MaskDisplay            "port_label('input', 1, '(dx,dy,da)')\nport_label('input', 2, '(th1,th2,th3)')\nport_label('output', 1, 'est_pos=(x,y,a)')"
+      MaskIconFrame          on
+      MaskIconOpaque         on
+      MaskIconRotate         "none"
+      MaskIconUnits          "autoscale"
+      System {
+       Name                    "localize"
+       Location                [149, 141, 1011, 488]
+       Open                    off
+       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"
+         Position                [30, 128, 60, 142]
+         IconDisplay             "Port number"
+         OutDataType             "sfix(16)"
+         OutScaling              "2^0"
+       }
+       Block {
+         BlockType               Inport
+         Name                    "In2"
+         Position                [30, 173, 60, 187]
+         Port                    "2"
+         IconDisplay             "Port number"
+         OutDataType             "sfix(16)"
+         OutScaling              "2^0"
+       }
+       Block {
+         BlockType               Scope
+         Name                    "Angle"
+         Ports                   [1]
+         Position                [645, 129, 675, 161]
+         Floating                off
+         Location                [625, 791, 1275, 973]
+         Open                    off
+         NumInputPorts           "1"
+         List {
+           ListType                AxesTitles
+           axes1                   "%<SignalLabel>"
+         }
+         TimeRange               "100"
+         YMin                    "0"
+         YMax                    "7"
+         SaveName                "ScopeData1"
+         DataFormat              "StructureWithTime"
+         SampleTime              "0"
+       }
+       Block {
+         BlockType               Reference
+         Name                    "Difference"
+         Ports                   [1, 1]
+         Position                [135, 117, 195, 153]
+         SourceBlock             "simulink/Discrete/Difference"
+         SourceType              "Difference"
+         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"
+         ICPrevInput             "0.0"
+         OutMin                  "[]"
+         OutMax                  "[]"
+         OutDataTypeStr          "Inherit: Inherit via internal rule"
+         OutputDataTypeScalingMode "Inherit via internal rule"
+         OutDataType             "sfix(16)"
+         OutScaling              "2^-10"
+         LockScale               off
+         RndMeth                 "Floor"
+         DoSatur                 off
+       }
+       Block {
+         BlockType               "S-Function"
+         Name                    "S-Function"
+         Ports                   [2, 2]
+         Position                [255, 129, 455, 196]
+         FunctionName            "sf_mcl"
+         Parameters              "100"
+         MaskDisplay             "port_label('input', 1, '(dx,dy,da)')\nport_label('input', 2, '(th1,th2,th3)')\nport_label('output', 1, 'est_pos=(x,y,a)')\nport_label('output', 2, 'particle bitmap')\n"
+         MaskIconFrame           on
+         MaskIconOpaque          on
+         MaskIconRotate          "none"
+         MaskIconUnits           "autoscale"
+       }
+       Block {
+         BlockType               Selector
+         Name                    "Selector"
+         Ports                   [1, 1]
+         Position                [570, 66, 610, 104]
+         InputPortWidth          "3"
+         IndexOptions            "Index vector (dialog)"
+         Indices                 "[1 2]"
+         OutputSizes             "1"
+       }
+       Block {
+         BlockType               Selector
+         Name                    "Selector1"
+         Ports                   [1, 1]
+         Position                [570, 126, 610, 164]
+         InputPortWidth          "3"
+         IndexOptions            "Index vector (dialog)"
+         Indices                 "3"
+         OutputSizes             "1"
+       }
+       Block {
+         BlockType               Scope
+         Name                    "XY"
+         Ports                   [1]
+         Position                [645, 69, 675, 101]
+         Floating                off
+         Location                [621, 562, 1275, 730]
+         Open                    off
+         NumInputPorts           "1"
+         ZoomMode                "xonly"
+         List {
+           ListType                AxesTitles
+           axes1                   "%<SignalLabel>"
+         }
+         TimeRange               "100"
+         YMin                    "-0.5"
+         YMax                    "3"
+         DataFormat              "StructureWithTime"
+         SampleTime              "0"
+       }
+       Block {
+         BlockType               "M-S-Function"
+         Name                    "draw probability bitmap"
+         Ports                   [1]
+         Position                [570, 228, 660, 262]
+         FunctionName            "sfdrawbitmap"
+       }
+       Block {
+         BlockType               Outport
+         Name                    "Out1"
+         Position                [750, 23, 780, 37]
+         IconDisplay             "Port number"
+         OutDataType             "sfix(16)"
+         OutScaling              "2^0"
+       }
+       Line {
+         SrcBlock                "S-Function"
+         SrcPort                 1
+         Points                  [50, 0]
+         Branch {
+           Points                  [25, 0]
+           Branch {
+             DstBlock                "Selector1"
+             DstPort                 1
+           }
+           Branch {
+             Points                  [0, -60]
+             DstBlock                "Selector"
+             DstPort                 1
+           }
+         }
+         Branch {
+           Points                  [0, -115]
+           DstBlock                "Out1"
+           DstPort                 1
+         }
+       }
+       Line {
+         SrcBlock                "Selector"
+         SrcPort                 1
+         DstBlock                "XY"
+         DstPort                 1
+       }
+       Line {
+         SrcBlock                "Selector1"
+         SrcPort                 1
+         DstBlock                "Angle"
+         DstPort                 1
+       }
+       Line {
+         SrcBlock                "S-Function"
+         SrcPort                 2
+         Points                  [45, 0; 0, 65]
+         DstBlock                "draw probability bitmap"
+         DstPort                 1
+       }
+       Line {
+         SrcBlock                "In2"
+         SrcPort                 1
+         DstBlock                "S-Function"
+         DstPort                 2
+       }
+       Line {
+         SrcBlock                "Difference"
+         SrcPort                 1
+         Points                  [15, 0; 0, 10]
+         DstBlock                "S-Function"
+         DstPort                 1
+       }
+       Line {
+         SrcBlock                "In1"
+         SrcPort                 1
+         DstBlock                "Difference"
+         DstPort                 1
+       }
+      }
+    }
+    Line {
+      SrcBlock               "S-Function"
+      SrcPort                1
+      DstBlock               "Gain"
+      DstPort                1
+    }
+    Line {
+      Labels                 [1, 0]
+      SrcBlock               "Subsystem"
+      SrcPort                1
+      Points                 [5, 0]
+      Branch {
+       DstBlock                "Level-2 M-file\nS-Function"
+       DstPort                 1
+      }
+      Branch {
+       Points                  [0, 45]
+       Branch {
+         Points                  [-345, 0; 0, -30]
+         DstBlock                "Manual Switch"
+         DstPort                 2
+       }
+       Branch {
+         Points                  [0, 10]
+         DstBlock                "Sl. gains X,Y,A"
+         DstPort                 1
+       }
+      }
+    }
+    Line {
+      SrcBlock               "Clock"
+      SrcPort                1
+      DstBlock               "Display"
+      DstPort                1
+    }
+    Line {
+      SrcBlock               "Manual Switch"
+      SrcPort                1
+      DstBlock               "S-Function"
+      DstPort                2
+    }
+    Line {
+      SrcBlock               "Rate Transition1"
+      SrcPort                1
+      Points                 [-30, 0; 0, -260]
+      DstBlock               "Manual Switch"
+      DstPort                1
+    }
+    Line {
+      SrcBlock               "Gain"
+      SrcPort                1
+      DstBlock               "Subsystem"
+      DstPort                1
+    }
+    Line {
+      SrcBlock               "S-Function2"
+      SrcPort                1
+      Points                 [65, 0]
+      Branch {
+       DstBlock                "S-Function"
+       DstPort                 1
+      }
+      Branch {
+       DstBlock                "To Workspace"
+       DstPort                 1
+      }
+      Branch {
+       Points                  [0, -45]
+       DstBlock                "Level-2 M-file\nS-Function2"
+       DstPort                 1
+      }
+    }
+    Line {
+      SrcBlock               "Rate Transition3"
+      SrcPort                1
+      DstBlock               "beacon_angles"
+      DstPort                1
+    }
+    Line {
+      SrcBlock               "localize"
+      SrcPort                1
+      Points                 [20, 0]
+      Branch {
+       DstBlock                "Level-2 M-file\nS-Function1"
+       DstPort                 1
+      }
+      Branch {
+       Points                  [0, 70]
+       DstBlock                "Rate Transition1"
+       DstPort                 1
+      }
+    }
+    Line {
+      SrcBlock               "Sl. gains X,Y,A"
+      SrcPort                1
+      Points                 [10, 0; 0, 85]
+      Branch {
+       Points                  [0, 30]
+       DstBlock                "localize"
+       DstPort                 1
+      }
+      Branch {
+       Labels                  [1, 0]
+       DstBlock                "Rate Transition3"
+       DstPort                 1
+      }
+    }
+    Line {
+      SrcBlock               "beacon_angles"
+      SrcPort                1
+      Points                 [-25, 0; 0, 60; 310, 0]
+      Branch {
+       DstBlock                "localize"
+       DstPort                 2
+      }
+      Branch {
+       Points                  [0, -175]
+       DstBlock                "Level-2 M-file\nS-Function"
+       DstPort                 2
+      }
+    }
+  }
+}
+# Finite State Machines
+#
+#    Stateflow Version 6.7 (R2007b) dated Aug  7 2007, 16:20:55
+#
+#
+
+
+Stateflow {
+  machine {
+    id                     1
+    name                   "reg_test_beta_1"
+    created                "29-Mar-2007 23:42:20"
+    isLibrary              0
+    firstTarget                    2
+    sfVersion              67014000.000001
+  }
+  target {
+    id                     2
+    name                   "sfun"
+    description                    "Default Simulink S-Function Target."
+    machine                1
+    linkNode               [1 0 0]
+  }
+}
diff --git a/src/mcl/matlab/reg_test_beta_2.mdl b/src/mcl/matlab/reg_test_beta_2.mdl
new file mode 100644 (file)
index 0000000..a2fc1b7
--- /dev/null
@@ -0,0 +1,1727 @@
+Model {
+  Name                   "reg_test_beta_2"
+  Version                7.0
+  MdlSubVersion                  0
+  GraphicalInterface {
+    NumRootInports         0
+    NumRootOutports        0
+    ParameterArgumentNames  ""
+    ComputedModelVersion    "1.224"
+    NumModelReferences     0
+    NumTestPointedSignals   0
+  }
+  SavedCharacterEncoding  "iso-8859-2"
+  PreLoadFcn             "init"
+  PostLoadFcn            "figure(2); hold off\nfigure(1);\nsim('reg_test', 0); % show figures"
+  SaveDefaultBlockParams  on
+  SampleTimeColors       off
+  LibraryLinkDisplay     "none"
+  WideLines              off
+  ShowLineDimensions     on
+  ShowPortDataTypes      off
+  ShowLoopsOnError       on
+  IgnoreBidirectionalLines off
+  ShowStorageClass       off
+  ShowTestPointIcons     on
+  ShowViewerIcons        on
+  SortedOrder            off
+  ExecutionContextIcon   off
+  ShowLinearizationAnnotations on
+  ScopeRefreshTime       0.035000
+  OverrideScopeRefreshTime on
+  DisableAllScopes       off
+  DataTypeOverride       "UseLocalSettings"
+  MinMaxOverflowLogging          "UseLocalSettings"
+  MinMaxOverflowArchiveMode "Overwrite"
+  BlockNameDataTip       off
+  BlockParametersDataTip  off
+  BlockDescriptionStringDataTip        off
+  ToolBar                on
+  StatusBar              on
+  BrowserShowLibraryLinks off
+  BrowserLookUnderMasks          off
+  InitFcn                "figure(2); hold off\nfigure(1);"
+  Created                "Thu Mar 29 23:35:11 2007"
+  Creator                "wsh"
+  UpdateHistory                  "UpdateHistoryNever"
+  ModifiedByFormat       "%<Auto>"
+  LastModifiedBy         "andrei"
+  ModifiedDateFormat     "%<Auto>"
+  LastModifiedDate       "Mon Apr 21 22:34:13 2008"
+  RTWModifiedTimeStamp   0
+  ModelVersionFormat     "1.%<AutoIncrement:224>"
+  ConfigurationManager   "None"
+  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
+  covSaveCumulativeToWorkspaceVar on
+  CovSaveSingleToWorkspaceVar on
+  CovCumulativeVarName   "covCumulativeData"
+  CovCumulativeReport    off
+  CovReportOnPause       on
+  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            on
+  ShowModelReferenceBlockVersion off
+  ShowModelReferenceBlockIO off
+  Array {
+    Type                   "Handle"
+    Dimension              1
+    Simulink.ConfigSet {
+      $ObjectID                      1
+      Version                "1.3.0"
+      Array {
+       Type                    "Handle"
+       Dimension               7
+       Simulink.SolverCC {
+         $ObjectID               2
+         Version                 "1.3.0"
+         StartTime               "0.0"
+         StopTime                "100"
+         AbsTol                  "auto"
+         FixedStep               "0.05"
+         InitialStep             "auto"
+         MaxNumMinSteps          "-1"
+         MaxOrder                5
+         ConsecutiveZCsStepRelTol "10*128*eps"
+         MaxConsecutiveZCs       "1000"
+         ExtrapolationOrder      4
+         NumberNewtonIterations  1
+         MaxStep                 "auto"
+         MinStep                 "auto"
+         MaxConsecutiveMinStep   "1"
+         RelTol                  "1e-3"
+         SolverMode              "Auto"
+         Solver                  "ode45"
+         SolverName              "ode45"
+         ZeroCrossControl        "UseLocalSettings"
+         AlgebraicLoopSolver     "TrustRegion"
+         SolverResetMethod       "Fast"
+         PositivePriorityOrder   off
+         AutoInsertRateTranBlk   off
+         SampleTimeConstraint    "Unconstrained"
+         RateTranMode            "Deterministic"
+       }
+       Simulink.DataIOCC {
+         $ObjectID               3
+         Version                 "1.3.0"
+         Decimation              "1"
+         ExternalInput           "[t, u]"
+         FinalStateName          "xFinal"
+         InitialState            "xInitial"
+         LimitDataPoints         on
+         MaxDataPoints           "1000"
+         LoadExternalInput       off
+         LoadInitialState        off
+         SaveFinalState          off
+         SaveFormat              "Array"
+         SaveOutput              on
+         SaveState               off
+         SignalLogging           on
+         InspectSignalLogs       off
+         SaveTime                on
+         StateSaveName           "xout"
+         TimeSaveName            "tout"
+         OutputSaveName          "yout"
+         SignalLoggingName       "logsout"
+         OutputOption            "RefineOutputTimes"
+         OutputTimes             "[]"
+         Refine                  "1"
+       }
+       Simulink.OptimizationCC {
+         $ObjectID               4
+         Array {
+           Type                    "Cell"
+           Dimension               5
+           Cell                    "ZeroExternalMemoryAtStartup"
+           Cell                    "ZeroInternalMemoryAtStartup"
+           Cell                    "InitFltsAndDblsToZero"
+           Cell                    "OptimizeModelRefInitCode"
+           Cell                    "NoFixptDivByZeroProtection"
+           PropName                "DisabledProps"
+         }
+         Version                 "1.3.0"
+         BlockReduction          on
+         BooleanDataType         on
+         ConditionallyExecuteInputs on
+         InlineParams            off
+         InlineInvariantSignals  off
+         OptimizeBlockIOStorage  on
+         BufferReuse             on
+         EnforceIntegerDowncast  on
+         ExpressionFolding       on
+         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
+         OptimizeModelRefInitCode off
+         LifeSpan                "inf"
+         BufferReusableBoundary  on
+         SimCompilerOptimization "Off"
+         AccelVerboseBuild       off
+       }
+       Simulink.DebuggingCC {
+         $ObjectID               5
+         Version                 "1.3.0"
+         RTPrefix                "error"
+         ConsistencyChecking     "none"
+         ArrayBoundsChecking     "none"
+         SignalInfNanChecking    "none"
+         SignalRangeChecking     "none"
+         ReadBeforeWriteMsg      "UseLocalSettings"
+         WriteAfterWriteMsg      "UseLocalSettings"
+         WriteAfterReadMsg       "UseLocalSettings"
+         AlgebraicLoopMsg        "warning"
+         ArtificialAlgebraicLoopMsg "warning"
+         SaveWithDisabledLinksMsg "warning"
+         SaveWithParameterizedLinksMsg "none"
+         CheckSSInitialOutputMsg on
+         CheckExecutionContextPreStartOutputMsg off
+         CheckExecutionContextRuntimeOutputMsg off
+         SignalResolutionControl "TryResolveAllWithWarning"
+         BlockPriorityViolationMsg "warning"
+         MinStepSizeMsg          "warning"
+         TimeAdjustmentMsg       "none"
+         MaxConsecutiveZCsMsg    "error"
+         SolverPrmCheckMsg       "warning"
+         InheritedTsInSrcMsg     "warning"
+         DiscreteInheritContinuousMsg "warning"
+         MultiTaskDSMMsg         "error"
+         MultiTaskCondExecSysMsg "error"
+         MultiTaskRateTransMsg   "error"
+         SingleTaskRateTransMsg  "none"
+         TasksWithSamePriorityMsg "warning"
+         SigSpecEnsureSampleTimeMsg "warning"
+         CheckMatrixSingularityMsg "none"
+         IntegerOverflowMsg      "warning"
+         Int32ToFloatConvMsg     "warning"
+         ParameterDowncastMsg    "error"
+         ParameterOverflowMsg    "error"
+         ParameterUnderflowMsg   "none"
+         ParameterPrecisionLossMsg "warning"
+         ParameterTunabilityLossMsg "warning"
+         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"
+         ModelReferenceVersionMismatchMessage "none"
+         ModelReferenceIOMismatchMessage "none"
+         ModelReferenceCSMismatchMessage "none"
+         ModelReferenceSimTargetVerbose off
+         UnknownTsInhSupMsg      "warning"
+         ModelReferenceDataLoggingMessage "warning"
+         ModelReferenceSymbolNameMessage "warning"
+         ModelReferenceExtraNoncontSigs "error"
+         StateNameClashWarn      "warning"
+         StrictBusMsg            "Warning"
+         LoggingUnavailableSignals "error"
+       }
+       Simulink.HardwareCC {
+         $ObjectID               6
+         Version                 "1.3.0"
+         ProdBitPerChar          8
+         ProdBitPerShort         16
+         ProdBitPerInt           32
+         ProdBitPerLong          32
+         ProdIntDivRoundTo       "Undefined"
+         ProdEndianess           "Unspecified"
+         ProdWordSize            32
+         ProdShiftRightIntArith  on
+         ProdHWDeviceType        "32-bit Generic"
+         TargetBitPerChar        8
+         TargetBitPerShort       16
+         TargetBitPerInt         32
+         TargetBitPerLong        32
+         TargetShiftRightIntArith on
+         TargetIntDivRoundTo     "Undefined"
+         TargetEndianess         "Unspecified"
+         TargetWordSize          32
+         TargetTypeEmulationWarnSuppressLevel 0
+         TargetPreprocMaxBitsSint 32
+         TargetPreprocMaxBitsUint 32
+         TargetHWDeviceType      "Specified"
+         TargetUnknown           off
+         ProdEqTarget            on
+       }
+       Simulink.ModelReferenceCC {
+         $ObjectID               7
+         Version                 "1.3.0"
+         UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange"
+         CheckModelReferenceTargetMessage "error"
+         ModelReferenceNumInstancesAllowed "Multi"
+         ModelReferencePassRootInputsByReference on
+         ModelReferenceMinAlgLoopOccurrences off
+       }
+       Simulink.RTWCC {
+         $BackupClass            "Simulink.RTWCC"
+         $ObjectID               8
+         Array {
+           Type                    "Cell"
+           Dimension               1
+           Cell                    "IncludeHyperlinkInReport"
+           PropName                "DisabledProps"
+         }
+         Version                 "1.3.0"
+         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
+         IncludeHyperlinkInReport off
+         LaunchReport            off
+         TargetLang              "C"
+         IncludeBusHierarchyInRTWFileBlockHierarchyMap off
+         IncludeERTFirstTime     off
+         GenerateTraceInfo       off
+         RTWCompilerOptimization "Off"
+         Array {
+           Type                    "Handle"
+           Dimension               2
+           Simulink.CodeAppCC {
+             $ObjectID               9
+             Array {
+               Type                    "Cell"
+               Dimension               16
+               Cell                    "IgnoreCustomStorageClasses"
+               Cell                    "InsertBlockDesc"
+               Cell                    "SFDataObjDesc"
+               Cell                    "SimulinkDataObjDesc"
+               Cell                    "DefineNamingRule"
+               Cell                    "SignalNamingRule"
+               Cell                    "ParamNamingRule"
+               Cell                    "InlinedPrmAccess"
+               Cell                    "CustomSymbolStr"
+               Cell                    "CustomSymbolStrGlobalVar"
+               Cell                    "CustomSymbolStrType"
+               Cell                    "CustomSymbolStrField"
+               Cell                    "CustomSymbolStrFcn"
+               Cell                    "CustomSymbolStrBlkIO"
+               Cell                    "CustomSymbolStrTmpVar"
+               Cell                    "CustomSymbolStrMacro"
+               PropName                "DisabledProps"
+             }
+             Version                 "1.3.0"
+             ForceParamTrailComments off
+             GenerateComments        on
+             IgnoreCustomStorageClasses on
+             IncHierarchyInIds       off
+             MaxIdLength             31
+             PreserveName            off
+             PreserveNameWithParent  off
+             ShowEliminatedStatement off
+             IncAutoGenComments      off
+             SimulinkDataObjDesc     off
+             SFDataObjDesc           off
+             IncDataTypeInIds        off
+             MangleLength            1
+             CustomSymbolStrGlobalVar "$R$N$M"
+             CustomSymbolStrType     "$N$R$M"
+             CustomSymbolStrField    "$N$M"
+             CustomSymbolStrFcn      "$R$N$M$F"
+             CustomSymbolStrBlkIO    "rtb_$N$M"
+             CustomSymbolStrTmpVar   "$N$M"
+             CustomSymbolStrMacro    "$R$N$M"
+             DefineNamingRule        "None"
+             ParamNamingRule         "None"
+             SignalNamingRule        "None"
+             InsertBlockDesc         off
+             SimulinkBlockComments   on
+             EnableCustomComments    off
+             InlinedPrmAccess        "Literals"
+             ReqsInCode              off
+           }
+           Simulink.GRTTargetCC {
+             $BackupClass            "Simulink.TargetCC"
+             $ObjectID               10
+             Array {
+               Type                    "Cell"
+               Dimension               13
+               Cell                    "IncludeMdlTerminateFcn"
+               Cell                    "CombineOutputUpdateFcns"
+               Cell                    "SuppressErrorStatus"
+               Cell                    "ERTCustomFileBanners"
+               Cell                    "GenerateSampleERTMain"
+               Cell                    "GenerateTestInterfaces"
+               Cell                    "MultiInstanceERTCode"
+               Cell                    "PurelyIntegerCode"
+               Cell                    "SupportNonFinite"
+               Cell                    "SupportComplex"
+               Cell                    "SupportAbsoluteTime"
+               Cell                    "SupportContinuousTime"
+               Cell                    "SupportNonInlinedSFcns"
+               PropName                "DisabledProps"
+             }
+             Version                 "1.3.0"
+             TargetFcnLib            "ansi_tfl_tmw.mat"
+             TargetLibSuffix         ""
+             TargetPreCompLibLocation ""
+             GenFloatMathFcnCalls    "ANSI_C"
+             UtilityFuncGeneration   "Auto"
+             GenerateFullHeader      on
+             GenerateSampleERTMain   off
+             GenerateTestInterfaces  off
+             IsPILTarget             off
+             ModelReferenceCompliant on
+             CompOptLevelCompliant   on
+             IncludeMdlTerminateFcn  on
+             CombineOutputUpdateFcns off
+             SuppressErrorStatus     off
+             IncludeFileDelimiter    "Auto"
+             ERTCustomFileBanners    off
+             SupportAbsoluteTime     on
+             LogVarNameModifier      "rt_"
+             MatFileLogging          on
+             MultiInstanceERTCode    off
+             SupportNonFinite        on
+             SupportComplex          on
+             PurelyIntegerCode       off
+             SupportContinuousTime   on
+             SupportNonInlinedSFcns  on
+             EnableShiftOperators    on
+             ParenthesesLevel        "Nominal"
+             PortableWordSizes       off
+             ModelStepFunctionPrototypeControlCompliant off
+             ExtMode                 off
+             ExtModeStaticAlloc      off
+             ExtModeTesting          off
+             ExtModeStaticAllocSize  1000000
+             ExtModeTransport        0
+             ExtModeMexFile          "ext_comm"
+             ExtModeIntrfLevel       "Level1"
+             RTWCAPISignals          off
+             RTWCAPIParams           off
+             RTWCAPIStates           off
+             GenerateASAP2           off
+           }
+           PropName                "Components"
+         }
+       }
+       PropName                "Components"
+      }
+      Name                   "Configuration"
+      CurrentDlgPage         "Solver"
+    }
+    PropName               "ConfigurationSets"
+  }
+  Simulink.ConfigSet {
+    $PropName              "ActiveConfigurationSet"
+    $ObjectID              1
+  }
+  WSDataSource           "M-Code"
+  BlockDefaults {
+    Orientation                    "right"
+    ForegroundColor        "black"
+    BackgroundColor        "white"
+    DropShadow             off
+    NamePlacement          "normal"
+    FontName               "Arial"
+    FontSize               10
+    FontWeight             "normal"
+    FontAngle              "normal"
+    ShowName               on
+  }
+  BlockParameterDefaults {
+    Block {
+      BlockType                      Clock
+      DisplayTime            off
+    }
+    Block {
+      BlockType                      Demux
+      Outputs                "4"
+      DisplayOption          "none"
+      BusSelectionMode       off
+    }
+    Block {
+      BlockType                      Display
+      Format                 "short"
+      Decimation             "10"
+      Floating               off
+      SampleTime             "-1"
+    }
+    Block {
+      BlockType                      Gain
+      Gain                   "1"
+      Multiplication         "Element-wise(K.*u)"
+      ParamMin               "[]"
+      ParamMax               "[]"
+      ParameterDataTypeMode   "Same as input"
+      ParameterDataType              "fixdt(1,16,0)"
+      ParameterScalingMode    "Best Precision: Matrix-wise"
+      ParameterScaling       "[]"
+      OutMin                 "[]"
+      OutMax                 "[]"
+      OutDataTypeMode        "Same as input"
+      OutDataType            "fixdt(1,16,0)"
+      OutScaling             "[]"
+      LockScale                      off
+      RndMeth                "Floor"
+      SaturateOnIntegerOverflow        on
+      SampleTime             "-1"
+    }
+    Block {
+      BlockType                      Inport
+      Port                   "1"
+      UseBusObject           off
+      BusObject                      "BusObject"
+      BusOutputAsStruct              off
+      PortDimensions         "-1"
+      SampleTime             "-1"
+      OutMin                 "[]"
+      OutMax                 "[]"
+      DataType               "auto"
+      OutDataType            "fixdt(1,16,0)"
+      OutScaling             "[]"
+      SignalType             "auto"
+      SamplingMode           "auto"
+      LatchByDelayingOutsideSignal off
+      LatchByCopyingInsideSignal 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                      "M-S-Function"
+      FunctionName           "mlfile"
+      DisplayMFileStacktrace  on
+    }
+    Block {
+      BlockType                      Mux
+      Inputs                 "4"
+      DisplayOption          "none"
+      UseBusObject           off
+      BusObject                      "BusObject"
+      NonVirtualBus          off
+    }
+    Block {
+      BlockType                      Outport
+      Port                   "1"
+      UseBusObject           off
+      BusObject                      "BusObject"
+      BusOutputAsStruct              off
+      PortDimensions         "-1"
+      SampleTime             "-1"
+      OutMin                 "[]"
+      OutMax                 "[]"
+      DataType               "auto"
+      OutDataType            "fixdt(1,16,0)"
+      OutScaling             "[]"
+      SignalType             "auto"
+      SamplingMode           "auto"
+      OutputWhenDisabled      "held"
+      InitialOutput          "[]"
+    }
+    Block {
+      BlockType                      RandomNumber
+      Mean                   "0"
+      Variance               "1"
+      Seed                   "0"
+      SampleTime             "-1"
+      VectorParams1D         on
+    }
+    Block {
+      BlockType                      RateLimiter
+      RisingSlewLimit        "1"
+      FallingSlewLimit       "-1"
+      SampleTimeMode         "continuous"
+      InitialCondition       "0"
+      LinearizeAsGain        on
+    }
+    Block {
+      BlockType                      RateTransition
+      Integrity                      on
+      Deterministic          on
+      X0                     "0"
+      OutPortSampleTime              "-1"
+    }
+    Block {
+      BlockType                      Reference
+    }
+    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                      Selector
+      NumberOfDimensions      "1"
+      IndexMode                      "One-based"
+      InputPortWidth         "-1"
+      SampleTime             "-1"
+    }
+    Block {
+      BlockType                      "S-Function"
+      FunctionName           "system"
+      SFunctionModules       "''"
+      PortCounts             "[]"
+    }
+    Block {
+      BlockType                      SubSystem
+      ShowPortLabels         "FromPortIcon"
+      Permissions            "ReadWrite"
+      PermitHierarchicalResolution "All"
+      TreatAsAtomicUnit              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"
+      MinMaxOverflowLogging   "UseLocalSettings"
+    }
+    Block {
+      BlockType                      Sum
+      IconShape                      "rectangular"
+      Inputs                 "++"
+      CollapseMode           "All dimensions"
+      CollapseDim            "1"
+      InputSameDT            on
+      OutMin                 "[]"
+      OutMax                 "[]"
+      OutDataTypeMode        "Same as first input"
+      OutDataType            "fixdt(1,16,0)"
+      OutScaling             "[]"
+      LockScale                      off
+      RndMeth                "Floor"
+      SaturateOnIntegerOverflow        on
+      SampleTime             "-1"
+    }
+    Block {
+      BlockType                      Switch
+      Criteria               "u2 >= Threshold"
+      Threshold                      "0"
+      InputSameDT            on
+      OutMin                 "[]"
+      OutMax                 "[]"
+      OutDataTypeMode        "Inherit via internal rule"
+      OutDataType            "fixdt(1,16,0)"
+      OutScaling             "[]"
+      LockScale                      off
+      RndMeth                "Floor"
+      SaturateOnIntegerOverflow        on
+      ZeroCross                      on
+      SampleTime             "-1"
+    }
+    Block {
+      BlockType                      ToWorkspace
+      VariableName           "simulink_output"
+      MaxDataPoints          "1000"
+      Decimation             "1"
+      SampleTime             "0"
+      FixptAsFi                      off
+    }
+    Block {
+      BlockType                      UnitDelay
+      X0                     "0"
+      SampleTime             "1"
+      StateMustResolveToSignalObject off
+      RTWStateStorageClass    "Auto"
+    }
+    Block {
+      BlockType                      Constant
+      Value                  "1"
+      VectorParams1D         on
+      SamplingMode           "Sample based"
+      OutMin                 "[]"
+      OutMax                 "[]"
+      OutDataTypeMode        "Inherit from 'Constant value'"
+      OutDataType            "fixdt(1,16,0)"
+      ConRadixGroup          "Use specified scaling"
+      OutScaling             "[]"
+      SampleTime             "inf"
+      FramePeriod            "inf"
+    }
+    Block {
+      BlockType                      Saturate
+      UpperLimit             "0.5"
+      LowerLimit             "-0.5"
+      LinearizeAsGain        on
+      ZeroCross                      on
+      SampleTime             "-1"
+      OutMin                 "[]"
+      OutMax                 "[]"
+      OutDataTypeMode        "Same as input"
+      OutDataType            "fixdt(1,16,0)"
+      OutScaling             "[]"
+      LockScale                      off
+      RndMeth                "Floor"
+    }
+  }
+  AnnotationDefaults {
+    HorizontalAlignment            "center"
+    VerticalAlignment      "middle"
+    ForegroundColor        "black"
+    BackgroundColor        "white"
+    DropShadow             off
+    FontName               "Arial"
+    FontSize               10
+    FontWeight             "normal"
+    FontAngle              "normal"
+    UseDisplayTextAsClickCallback off
+  }
+  LineDefaults {
+    FontName               "Arial"
+    FontSize               9
+    FontWeight             "normal"
+    FontAngle              "normal"
+  }
+  System {
+    Name                   "reg_test_beta_2"
+    Location               [22, 88, 883, 585]
+    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"
+    ReportName             "simulink-default.rpt"
+    Block {
+      BlockType                      SubSystem
+      Name                   " "
+      Ports                  []
+      Position               [25, 14, 95, 48]
+      OpenFcn                "path=diag([area.w area.h])*rand(2,8)\nsim('reg_test',0)                   "
+      MinAlgLoopOccurrences   off
+      RTWSystemCode          "Auto"
+      FunctionWithSeparateData off
+      MaskDisplay            "disp('Random path')"
+      MaskIconFrame          on
+      MaskIconOpaque         on
+      MaskIconRotate         "none"
+      MaskIconUnits          "autoscale"
+      System {
+       Name                    " "
+       Location                [433, 403, 931, 703]
+       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                      Clock
+      Name                   "Clock"
+      Position               [455, 95, 475, 115]
+      Decimation             "10"
+    }
+    Block {
+      BlockType                      Display
+      Name                   "Display"
+      Ports                  [1]
+      Position               [505, 91, 590, 119]
+      Lockdown               off
+    }
+    Block {
+      BlockType                      Gain
+      Name                   "Gain"
+      Position               [260, 120, 290, 150]
+      Gain                   "[1 1]/desc.robot.wheelr"
+      ParameterDataTypeMode   "Inherit via internal rule"
+      ParameterDataType              "sfix(16)"
+      ParameterScaling       "2^0"
+      OutDataTypeMode        "Inherit via internal rule"
+      OutDataType            "sfix(16)"
+      OutScaling             "2^0"
+      SaturateOnIntegerOverflow        off
+    }
+    Block {
+      BlockType                      "M-S-Function"
+      Name                   "Level-2 M-file\nS-Function"
+      Ports                  [2]
+      Position               [635, 124, 695, 171]
+      BackgroundColor        "cyan"
+      FunctionName           "sfdrawrobot"
+      Parameters             "desc,0"
+      MaskDisplay            "disp('Drawer')\nport_label('input', 1, 'x')\nport_label('input', 2, 'y')\n"
+      MaskIconFrame          on
+      MaskIconOpaque         on
+      MaskIconRotate         "none"
+      MaskIconUnits          "autoscale"
+    }
+    Block {
+      BlockType                      "M-S-Function"
+      Name                   "Level-2 M-file\nS-Function1"
+      Ports                  [2]
+      Position               [770, 303, 835, 347]
+      ForegroundColor        "blue"
+      FunctionName           "sfdrawrobot"
+      Parameters             "desc,'--b'"
+      MaskDisplay            "disp('Drawer')\nport_label('input', 1, 'x')\nport_label('input', 2, 'y')\n"
+      MaskIconFrame          on
+      MaskIconOpaque         on
+      MaskIconRotate         "none"
+      MaskIconUnits          "autoscale"
+    }
+    Block {
+      BlockType                      "M-S-Function"
+      Name                   "Level-2 M-file\nS-Function2"
+      Ports                  [2]
+      Position               [630, 33, 695, 77]
+      ForegroundColor        "magenta"
+      FunctionName           "sfdrawrobot"
+      Parameters             "desc,'--m'"
+      MaskDisplay            "disp('Drawer')\nport_label('input', 1, 'x')\nport_label('input', 2, 'y')\n"
+      MaskIconFrame          on
+      MaskIconOpaque         on
+      MaskIconRotate         "none"
+      MaskIconUnits          "autoscale"
+    }
+    Block {
+      BlockType                      Reference
+      Name                   "Manual Switch"
+      Ports                  [2, 1]
+      Position               [130, 122, 160, 158]
+      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"
+      sw                     "1"
+      action                 "0"
+      varsize                off
+    }
+    Block {
+      BlockType                      RandomNumber
+      Name                   "Random\nNumber"
+      Position               [245, 335, 275, 365]
+      BackgroundColor        "yellow"
+      Variance               "0.05/180*pi*[1 1 1]"
+      Seed                   "[1 2 3]"
+    }
+    Block {
+      BlockType                      RateTransition
+      Name                   "Rate Transition1"
+      Position               [105, 389, 145, 431]
+      Orientation            "left"
+      X0                     "desc.initpos"
+    }
+    Block {
+      BlockType                      RateTransition
+      Name                   "Rate Transition3"
+      Position               [390, 189, 430, 231]
+      Orientation            "left"
+    }
+    Block {
+      BlockType                      "S-Function"
+      Name                   "S-Function"
+      Ports                  [2, 1]
+      Position               [180, 116, 235, 149]
+      BackgroundColor        "green"
+      FunctionName           "sf_posreg"
+      Parameters             "[2 2 10],0.02"
+    }
+    Block {
+      BlockType                      "S-Function"
+      Name                   "S-Function2"
+      Ports                  [0, 1]
+      Position               [35, 74, 95, 106]
+      BackgroundColor        "green"
+      FunctionName           "sf_trgen"
+      Parameters             "path, desc.initpos, desc.wayconstraints"
+    }
+    Block {
+      BlockType                      Reference
+      Name                   "Slider\nGain"
+      Ports                  [1, 1]
+      Position               [305, 334, 350, 366]
+      SourceBlock            "simulink/Math\nOperations/Slider\nGain"
+      SourceType             "Slider Gain"
+      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"
+      low                    "0"
+      gain                   "0.37615"
+      high                   "2"
+    }
+    Block {
+      BlockType                      SubSystem
+      Name                   "Subsystem"
+      Ports                  [1, 1]
+      Position               [310, 111, 435, 159]
+      BackgroundColor        "yellow"
+      MinAlgLoopOccurrences   off
+      RTWSystemCode          "Auto"
+      FunctionWithSeparateData off
+      MaskDisplay            "disp('Robot\\n\\n')\nport_label('input', 1, 'u=(w1,w2)')\nport_label('output', 1, 'x=(X,Y,th)')"
+      MaskIconFrame          on
+      MaskIconOpaque         on
+      MaskIconRotate         "none"
+      MaskIconUnits          "autoscale"
+      System {
+       Name                    "Subsystem"
+       Location                [165, 393, 999, 577]
+       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"
+         Position                [15, 38, 45, 52]
+         IconDisplay             "Port number"
+         OutDataType             "sfix(16)"
+         OutScaling              "2^0"
+         Port {
+           PortNumber              1
+           Name                    "rad/s"
+           RTWStorageClass         "Auto"
+           DataLoggingNameMode     "SignalName"
+         }
+       }
+       Block {
+         BlockType               Integrator
+         Name                    "Integrator"
+         Ports                   [1, 1]
+         Position                [530, 40, 560, 70]
+         InitialCondition        "desc.initpos"
+         UpperSaturationLimit    "[area.w area.h Inf]"
+         LowerSaturationLimit    "[0 0 -Inf]"
+         Port {
+           PortNumber              1
+           Name                    "x,y,phi [m,m,rad]"
+           RTWStorageClass         "Auto"
+           DataLoggingNameMode     "SignalName"
+         }
+       }
+       Block {
+         BlockType               Reference
+         Name                    "Manual Switch"
+         Ports                   [2, 1]
+         Position                [250, 27, 280, 63]
+         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"
+         sw                      "1"
+         action                  "0"
+         varsize                 "off"
+       }
+       Block {
+         BlockType               Mux
+         Name                    "Mux1"
+         Ports                   [2, 1]
+         Position                [380, 36, 385, 74]
+         ShowName                off
+         Inputs                  "2"
+         DisplayOption           "bar"
+       }
+       Block {
+         BlockType               Selector
+         Name                    "Selector"
+         Ports                   [1, 1]
+         Position                [420, 121, 460, 159]
+         Orientation             "left"
+         InputPortWidth          "3"
+         IndexOptions            "Index vector (dialog)"
+         Indices                 "[3]"
+         OutputSizes             "1"
+         Port {
+           PortNumber              1
+           Name                    "angle"
+           RTWStorageClass         "Auto"
+           DataLoggingNameMode     "SignalName"
+         }
+       }
+       Block {
+         BlockType               Gain
+         Name                    "Wheel\nradius"
+         Position                [90, 27, 135, 63]
+         Gain                    "robot.wheelr"
+         ParameterDataTypeMode   "Inherit via internal rule"
+         ParameterDataType       "sfix(16)"
+         ParameterScaling        "2^0"
+         OutDataTypeMode         "Inherit via internal rule"
+         OutDataType             "sfix(16)"
+         OutScaling              "2^0"
+         SaturateOnIntegerOverflow off
+         Port {
+           PortNumber              1
+           Name                    "m/s"
+           RTWStorageClass         "Auto"
+           DataLoggingNameMode     "SignalName"
+         }
+       }
+       Block {
+         BlockType               MATLABFcn
+         Name                    "kinematics"
+         Ports                   [1, 1]
+         Position                [430, 40, 490, 70]
+         MATLABFcn               "kinematics"
+       }
+       Block {
+         BlockType               RateLimiter
+         Name                    "max acc"
+         Position                [190, 20, 220, 50]
+         RisingSlewLimit         "3"
+         FallingSlewLimit        "-3"
+         SampleTimeMode          "inherited"
+       }
+       Block {
+         BlockType               Saturate
+         Name                    "max m/s"
+         Position                [320, 30, 350, 60]
+         UpperLimit              "2"
+         LowerLimit              "-2"
+       }
+       Block {
+         BlockType               Outport
+         Name                    "Out1"
+         Position                [725, 48, 755, 62]
+         IconDisplay             "Port number"
+         OutDataType             "sfix(16)"
+         OutScaling              "2^0"
+       }
+       Line {
+         SrcBlock                "kinematics"
+         SrcPort                 1
+         DstBlock                "Integrator"
+         DstPort                 1
+       }
+       Line {
+         Name                    "x,y,phi [m,m,rad]"
+         SrcBlock                "Integrator"
+         SrcPort                 1
+         Points                  [20, 0]
+         Branch {
+           Points                  [0, 85]
+           DstBlock                "Selector"
+           DstPort                 1
+         }
+         Branch {
+           Labels                  [1, 0; 1, 1]
+           DstBlock                "Out1"
+           DstPort                 1
+         }
+       }
+       Line {
+         SrcBlock                "Mux1"
+         SrcPort                 1
+         DstBlock                "kinematics"
+         DstPort                 1
+       }
+       Line {
+         Name                    "angle"
+         Labels                  [0, 0]
+         SrcBlock                "Selector"
+         SrcPort                 1
+         Points                  [-60, 0; 0, -75]
+         DstBlock                "Mux1"
+         DstPort                 2
+       }
+       Line {
+         Name                    "rad/s"
+         Labels                  [0, 0]
+         SrcBlock                "In1"
+         SrcPort                 1
+         DstBlock                "Wheel\nradius"
+         DstPort                 1
+       }
+       Line {
+         SrcBlock                "max m/s"
+         SrcPort                 1
+         DstBlock                "Mux1"
+         DstPort                 1
+       }
+       Line {
+         SrcBlock                "Manual Switch"
+         SrcPort                 1
+         DstBlock                "max m/s"
+         DstPort                 1
+       }
+       Line {
+         SrcBlock                "max acc"
+         SrcPort                 1
+         DstBlock                "Manual Switch"
+         DstPort                 1
+       }
+       Line {
+         Name                    "m/s"
+         Labels                  [0, 0]
+         SrcBlock                "Wheel\nradius"
+         SrcPort                 1
+         Points                  [20, 0]
+         Branch {
+           Points                  [0, -10]
+           DstBlock                "max acc"
+           DstPort                 1
+         }
+         Branch {
+           Points                  [0, 25; 75, 0]
+           DstBlock                "Manual Switch"
+           DstPort                 2
+         }
+       }
+      }
+    }
+    Block {
+      BlockType                      Sum
+      Name                   "Sum"
+      Ports                  [2, 1]
+      Position               [355, 315, 375, 335]
+      ShowName               off
+      IconShape                      "round"
+      Inputs                 "|++"
+      CollapseMode           "All dimensions"
+      InputSameDT            off
+      OutDataTypeMode        "Inherit via internal rule"
+      OutDataType            "sfix(16)"
+      OutScaling             "2^0"
+      SaturateOnIntegerOverflow        off
+    }
+    Block {
+      BlockType                      ToWorkspace
+      Name                   "To Workspace"
+      Position               [240, 75, 300, 105]
+      VariableName           "trajectory"
+      MaxDataPoints          "inf"
+      SampleTime             "-1"
+      SaveFormat             "Structure With Time"
+    }
+    Block {
+      BlockType                      MATLABFcn
+      Name                   "beacon_angles"
+      Ports                  [1, 1]
+      Position               [305, 195, 365, 225]
+      Orientation            "left"
+      BackgroundColor        "yellow"
+      MATLABFcn                      "mod(beacon_angles(u), 2*pi)"
+      SampleTime             "1/10"
+    }
+    Block {
+      BlockType                      SubSystem
+      Name                   "localize"
+      Ports                  [2, 1]
+      Position               [520, 286, 685, 339]
+      MinAlgLoopOccurrences   off
+      RTWSystemCode          "Auto"
+      FunctionWithSeparateData off
+      MaskDisplay            "port_label('input', 1, '(dx,dy,da)')\nport_label('input', 2, '(th1,th2,th3)')\nport_label('output', 1, 'est_pos=(x,y,a)')"
+      MaskIconFrame          on
+      MaskIconOpaque         on
+      MaskIconRotate         "none"
+      MaskIconUnits          "autoscale"
+      System {
+       Name                    "localize"
+       Location                [95, 177, 1223, 724]
+       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"
+         Position                [15, 103, 45, 117]
+         IconDisplay             "Port number"
+         OutDataType             "sfix(16)"
+         OutScaling              "2^0"
+       }
+       Block {
+         BlockType               Inport
+         Name                    "In2"
+         Position                [320, 198, 350, 212]
+         Port                    "2"
+         IconDisplay             "Port number"
+         OutDataType             "sfix(16)"
+         OutScaling              "2^0"
+       }
+       Block {
+         BlockType               Scope
+         Name                    "Angle"
+         Ports                   [1]
+         Position                [935, 154, 965, 186]
+         Floating                off
+         Location                [625, 791, 1275, 973]
+         Open                    off
+         NumInputPorts           "1"
+         List {
+           ListType                AxesTitles
+           axes1                   "%<SignalLabel>"
+         }
+         TimeRange               "100"
+         YMin                    "0"
+         YMax                    "7"
+         SaveName                "ScopeData1"
+         DataFormat              "StructureWithTime"
+         SampleTime              "0"
+       }
+       Block {
+         BlockType               Demux
+         Name                    "Demux"
+         Ports                   [1, 3]
+         Position                [120, 91, 125, 129]
+         BackgroundColor         "black"
+         ShowName                off
+         Outputs                 "3"
+         DisplayOption           "bar"
+       }
+       Block {
+         BlockType               Reference
+         Name                    "Difference"
+         Ports                   [1, 1]
+         Position                [425, 142, 485, 178]
+         SourceBlock             "simulink/Discrete/Difference"
+         SourceType              "Difference"
+         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"
+         ICPrevInput             "0.0"
+         OutMin                  "[]"
+         OutMax                  "[]"
+         OutDataTypeStr          "Inherit: Inherit via internal rule"
+         OutputDataTypeScalingMode "Inherit via internal rule"
+         OutDataType             "sfix(16)"
+         OutScaling              "2^-10"
+         LockScale               off
+         RndMeth                 "Floor"
+         DoSatur                 off
+       }
+       Block {
+         BlockType               Mux
+         Name                    "Mux1"
+         Ports                   [3, 1]
+         Position                [300, 91, 305, 129]
+         ShowName                off
+         Inputs                  "3"
+         DisplayOption           "bar"
+       }
+       Block {
+         BlockType               "S-Function"
+         Name                    "S-Function"
+         Ports                   [2, 2]
+         Position                [545, 154, 745, 221]
+         FunctionName            "sf_mcl"
+         Parameters              "100"
+         MaskDisplay             "port_label('input', 1, '(dx,dy,da)')\nport_label('input', 2, '(th1,th2,th3)')\nport_label('output', 1, 'est_pos=(x,y,a)')\nport_label('output', 2, 'particle bitmap')\n"
+         MaskIconFrame           on
+         MaskIconOpaque          on
+         MaskIconRotate          "none"
+         MaskIconUnits           "autoscale"
+       }
+       Block {
+         BlockType               Selector
+         Name                    "Selector"
+         Ports                   [1, 1]
+         Position                [860, 91, 900, 129]
+         InputPortWidth          "3"
+         IndexOptions            "Index vector (dialog)"
+         Indices                 "[1 2]"
+         OutputSizes             "1"
+       }
+       Block {
+         BlockType               Selector
+         Name                    "Selector1"
+         Ports                   [1, 1]
+         Position                [860, 151, 900, 189]
+         InputPortWidth          "3"
+         IndexOptions            "Index vector (dialog)"
+         Indices                 "3"
+         OutputSizes             "1"
+       }
+       Block {
+         BlockType               Reference
+         Name                    "Slider\nGain ANGLE"
+         Ports                   [1, 1]
+         Position                [185, 170, 240, 200]
+         SourceBlock             "simulink/Math\nOperations/Slider\nGain"
+         SourceType              "Slider Gain"
+         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"
+         low                     "0"
+         gain                    "0"
+         high                    "6.28"
+       }
+       Block {
+         BlockType               Reference
+         Name                    "Slider\nGain X"
+         Ports                   [1, 1]
+         Position                [185, 25, 240, 55]
+         SourceBlock             "simulink/Math\nOperations/Slider\nGain"
+         SourceType              "Slider Gain"
+         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"
+         low                     "0"
+         gain                    "0.75138"
+         high                    "3"
+       }
+       Block {
+         BlockType               Reference
+         Name                    "Slider\nGain Y"
+         Ports                   [1, 1]
+         Position                [180, 95, 240, 125]
+         SourceBlock             "simulink/Math\nOperations/Slider\nGain"
+         SourceType              "Slider Gain"
+         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"
+         low                     "0"
+         gain                    "0.4593"
+         high                    "2.1"
+       }
+       Block {
+         BlockType               Scope
+         Name                    "XY"
+         Ports                   [1]
+         Position                [935, 94, 965, 126]
+         Floating                off
+         Location                [621, 562, 1275, 730]
+         Open                    off
+         NumInputPorts           "1"
+         ZoomMode                "xonly"
+         List {
+           ListType                AxesTitles
+           axes1                   "%<SignalLabel>"
+         }
+         TimeRange               "100"
+         YMin                    "-0.5"
+         YMax                    "3"
+         DataFormat              "StructureWithTime"
+         SampleTime              "0"
+       }
+       Block {
+         BlockType               "M-S-Function"
+         Name                    "draw probability bitmap"
+         Ports                   [1]
+         Position                [860, 253, 950, 287]
+         FunctionName            "sfdrawbitmap"
+       }
+       Block {
+         BlockType               Outport
+         Name                    "Out1"
+         Position                [1040, 48, 1070, 62]
+         IconDisplay             "Port number"
+         OutDataType             "sfix(16)"
+         OutScaling              "2^0"
+       }
+       Line {
+         SrcBlock                "S-Function"
+         SrcPort                 1
+         Points                  [50, 0]
+         Branch {
+           Points                  [25, 0]
+           Branch {
+             DstBlock                "Selector1"
+             DstPort                 1
+           }
+           Branch {
+             Points                  [0, -60]
+             DstBlock                "Selector"
+             DstPort                 1
+           }
+         }
+         Branch {
+           Points                  [0, -115]
+           DstBlock                "Out1"
+           DstPort                 1
+         }
+       }
+       Line {
+         SrcBlock                "Selector"
+         SrcPort                 1
+         DstBlock                "XY"
+         DstPort                 1
+       }
+       Line {
+         SrcBlock                "Selector1"
+         SrcPort                 1
+         DstBlock                "Angle"
+         DstPort                 1
+       }
+       Line {
+         SrcBlock                "S-Function"
+         SrcPort                 2
+         Points                  [45, 0; 0, 65]
+         DstBlock                "draw probability bitmap"
+         DstPort                 1
+       }
+       Line {
+         SrcBlock                "In2"
+         SrcPort                 1
+         DstBlock                "S-Function"
+         DstPort                 2
+       }
+       Line {
+         SrcBlock                "Difference"
+         SrcPort                 1
+         Points                  [15, 0; 0, 10]
+         DstBlock                "S-Function"
+         DstPort                 1
+       }
+       Line {
+         SrcBlock                "Slider\nGain X"
+         SrcPort                 1
+         Points                  [40, 0]
+         DstBlock                "Mux1"
+         DstPort                 1
+       }
+       Line {
+         SrcBlock                "Slider\nGain Y"
+         SrcPort                 1
+         DstBlock                "Mux1"
+         DstPort                 2
+       }
+       Line {
+         SrcBlock                "Slider\nGain ANGLE"
+         SrcPort                 1
+         Points                  [40, 0]
+         DstBlock                "Mux1"
+         DstPort                 3
+       }
+       Line {
+         SrcBlock                "Mux1"
+         SrcPort                 1
+         Points                  [75, 0; 0, 50]
+         DstBlock                "Difference"
+         DstPort                 1
+       }
+       Line {
+         SrcBlock                "Demux"
+         SrcPort                 1
+         Points                  [20, 0; 0, -60]
+         DstBlock                "Slider\nGain X"
+         DstPort                 1
+       }
+       Line {
+         SrcBlock                "Demux"
+         SrcPort                 2
+         DstBlock                "Slider\nGain Y"
+         DstPort                 1
+       }
+       Line {
+         SrcBlock                "Demux"
+         SrcPort                 3
+         Points                  [20, 0; 0, 65]
+         DstBlock                "Slider\nGain ANGLE"
+         DstPort                 1
+       }
+       Line {
+         SrcBlock                "In1"
+         SrcPort                 1
+         DstBlock                "Demux"
+         DstPort                 1
+       }
+      }
+    }
+    Line {
+      SrcBlock               "S-Function"
+      SrcPort                1
+      DstBlock               "Gain"
+      DstPort                1
+    }
+    Line {
+      Labels                 [1, 0]
+      SrcBlock               "Subsystem"
+      SrcPort                1
+      Points                 [25, 0]
+      Branch {
+       DstBlock                "Level-2 M-file\nS-Function"
+       DstPort                 1
+      }
+      Branch {
+       Points                  [0, 40]
+       Branch {
+         Points                  [-365, 0; 0, -25]
+         DstBlock                "Manual Switch"
+         DstPort                 2
+       }
+       Branch {
+         Points                  [0, 35]
+         Branch {
+           DstBlock                "Rate Transition3"
+           DstPort                 1
+         }
+         Branch {
+           Points                  [0, 90]
+           DstBlock                "localize"
+           DstPort                 1
+         }
+       }
+      }
+    }
+    Line {
+      SrcBlock               "Sum"
+      SrcPort                1
+      Points                 [110, 0]
+      Branch {
+       Points                  [0, -165]
+       DstBlock                "Level-2 M-file\nS-Function"
+       DstPort                 2
+      }
+      Branch {
+       DstBlock                "localize"
+       DstPort                 2
+      }
+    }
+    Line {
+      SrcBlock               "Random\nNumber"
+      SrcPort                1
+      DstBlock               "Slider\nGain"
+      DstPort                1
+    }
+    Line {
+      SrcBlock               "Clock"
+      SrcPort                1
+      DstBlock               "Display"
+      DstPort                1
+    }
+    Line {
+      SrcBlock               "Manual Switch"
+      SrcPort                1
+      DstBlock               "S-Function"
+      DstPort                2
+    }
+    Line {
+      SrcBlock               "Rate Transition1"
+      SrcPort                1
+      Points                 [-30, 0; 0, -280]
+      DstBlock               "Manual Switch"
+      DstPort                1
+    }
+    Line {
+      SrcBlock               "Gain"
+      SrcPort                1
+      DstBlock               "Subsystem"
+      DstPort                1
+    }
+    Line {
+      SrcBlock               "S-Function2"
+      SrcPort                1
+      Points                 [65, 0]
+      Branch {
+       DstBlock                "S-Function"
+       DstPort                 1
+      }
+      Branch {
+       DstBlock                "To Workspace"
+       DstPort                 1
+      }
+      Branch {
+       Points                  [0, -45]
+       DstBlock                "Level-2 M-file\nS-Function2"
+       DstPort                 1
+      }
+    }
+    Line {
+      SrcBlock               "Rate Transition3"
+      SrcPort                1
+      DstBlock               "beacon_angles"
+      DstPort                1
+    }
+    Line {
+      SrcBlock               "beacon_angles"
+      SrcPort                1
+      Points                 [-70, 0; 0, 115]
+      DstBlock               "Sum"
+      DstPort                1
+    }
+    Line {
+      SrcBlock               "Slider\nGain"
+      SrcPort                1
+      DstBlock               "Sum"
+      DstPort                2
+    }
+    Line {
+      SrcBlock               "localize"
+      SrcPort                1
+      Points                 [35, 0]
+      Branch {
+       DstBlock                "Level-2 M-file\nS-Function1"
+       DstPort                 1
+      }
+      Branch {
+       Points                  [0, 95]
+       DstBlock                "Rate Transition1"
+       DstPort                 1
+      }
+    }
+  }
+}
+# Finite State Machines
+#
+#    Stateflow Version 6.7 (R2007b) dated Aug  7 2007, 16:20:55
+#
+#
+
+
+Stateflow {
+  machine {
+    id                     1
+    name                   "reg_test_beta_2"
+    created                "29-Mar-2007 23:42:20"
+    isLibrary              0
+    firstTarget                    2
+    sfVersion              67014000.000001
+  }
+  target {
+    id                     2
+    name                   "sfun"
+    description                    "Default Simulink S-Function Target."
+    machine                1
+    linkNode               [1 0 0]
+  }
+}