Topic
4 replies Latest Post - ‏2013-06-25T15:18:52Z by myrmidon
myrmidon
myrmidon
23 Posts
ACCEPTED ANSWER

Pinned topic Rhapsody & Simulink - Algaibric Loop Problem & CruiseControlSystem example demand

‏2013-06-20T14:47:39Z |

Hello,

I am trying to explore the capabilities of Rhapsody with Simulink and I try to build a simple model. I am using Rhapsody v8 and Visual Studio 2008.

When I have lets say five blocks/classes like in the "png_ibd.png" (the green ones are Rhapsody blocks while the red ones Simulink blocks) and try to export them to Simulink (Export to Simulink for Simulation and Animation), I get an Algaibric Loop problem as it is shown in the "err_algebraicloop.png". I enclose the Rhaspody model in the zip file.

(Before this model, the "GenCotroller"-the bold green cirle in "png_ibd.png", did not exist and there was no problem with Simulink.)

I solved the problem by inserting  in the Simulink model that is generated by Rhapsody, either a unit delay block in the "TC" input of TemperatuceWatchdog_TC_2build, either two unit delay blocks in the "itsInputData_OnOff" and  "itsInputData_Temp" (see "err_sol.png")

I have three questions:

1) Is there any immediate solution to that problem? As if the model gets more compicated I do not know how easy will be to add a unit delay block at every block that maybe needs it ( I have already set to Simulink Simulation->Configuration Parameters->Diagnostics,  the setting for Algebraic loop from "error" to "warning" or "none")

2) I read the documentation http://pic.dhe.ibm.com/infocenter/rhaphlp/v8/index.jsp?topic=%2Fcom.ibm.rhp.sysml.doc%2Ftopics%2Ft_example1.html regarding the "CruiseControlSystem" but I did not find it in the Samples. Can you provide it please as I think it will be very useful!

3) I saw another approach for extracting to Simulink in this video https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/Wecb8ab5c4be5_4a1e_a0d0_e5a706eb66dc/page/Rhapsody%20and%20Simulink%20Integration ( @ minute 13:40) without using "StructureSimulink" block stereotype, but just connecting with flows, the classes in the bdd diagram. Do you know if something like this is possible? As I tried it and I got some linker errors and the S-Function could not be built by Rhapsody.

Thanks a lot in advance for your time!

  • SAKAIRITakashi
    SAKAIRITakashi
    20 Posts
    ACCEPTED ANSWER

    Re: Rhapsody & Simulink - Algaibric Loop Problem & CruiseControlSystem example demand

    ‏2013-06-21T02:05:35Z  in response to myrmidon

    Hi,

     

    Thank you very much for using Rhapsody.

     

    1) Please apply <<Delay>> stereotype to OnOff flowport and Temp flowport owned by InputData SimulinkBlock.

    <<Delay>> stereotype is applicable to a FlowPort. If you want to add a Unit Delay block to a generated Simulink model and link it to an output FlowPort, apply this stereotype to an output FlowPort owned by a <<SimulinkBlock>> block or a <<StructuredSimulinkBlock>> block.

     

    2) Please wait.

     

    3) We need <<StructuredSimulinkBlock>> stereotype to generate a Simulink model. I think the diagram is an Internal Block Diagram, and the block is applied <<StructuredSimulinkBlock>>.

     

    Cheers,

     

    SAKAIRI Takashi

    IBM Research - Tokyo

    • myrmidon
      myrmidon
      23 Posts
      ACCEPTED ANSWER

      Re: Rhapsody & Simulink - Algaibric Loop Problem & CruiseControlSystem example demand

      ‏2013-06-21T12:04:21Z  in response to SAKAIRITakashi

      1) , 3) Thank you so much!

      2) Ok I wait

      P.S. As you understand I have quite a few questions and as I will continue more will come, I work in a company in which we use licenced versions of Rhapsody but the problem is that they start now applying MBSE and using the tool, so there is not really many people that can help.

      Do you believe I can contact directly a department in IBM for questions like these (as many times the documentation does not really help)? Or maybe you can propose me something else.

      Thanks again for your time!

      Updated on 2013-06-24T10:12:40Z at 2013-06-24T10:12:40Z by myrmidon
      • SAKAIRITakashi
        SAKAIRITakashi
        20 Posts
        ACCEPTED ANSWER

        Re: Rhapsody & Simulink - Algaibric Loop Problem & CruiseControlSystem example demand

        ‏2013-06-24T14:39:38Z  in response to myrmidon

        Hi,

         

        2) Please use the attached model.

         

        > Do you believe I can contact directly a department in IBM for questions like these (as many times the documentation does not really help)? Or maybe you can propose me something else.

        I was wondering if you could contact to IBM sales team?

         

        Cheers,

         

        SAKAIRI Takashi

        IBM Research - Tokyo

        Attachments

        • myrmidon
          myrmidon
          23 Posts
          ACCEPTED ANSWER

          Re: Rhapsody & Simulink - Algaibric Loop Problem & CruiseControlSystem example demand

          ‏2013-06-25T15:18:52Z  in response to SAKAIRITakashi

          Thanks a lot once again Takashi. This example solved a lot of problems/questions. OK I will make a request in my company to check if this is possible (regarding the IBM sales team)

          Two last questions on that.

          1) In the CruiseControlSystemCpp model, there is a "TestDriver" class with a statechart that makes a testcase/scenario and is running/animating the whole model. Is it possible instead of a statemachine in a class, to implement this scenario and run the whole model with a sequence diagram (and maybe Test Conductor ?) or we need a statemachine/activity diagram?

          2)In the StructuredSimulinkBlock CruiseControlSystem there is a statemachine that executes this "driver.setC(getC()); c.setS(getS());" in the beggining. If I understood well this is done in order to instantiate the objects "driver","c", and "s" or this is due to the directed association between them in the bdd?

          Thanks a lot for your time.