understanding time in simulation.

Moderator: Moderators

understanding time in simulation.

Postby baudouin.martin@gmail.com » Sat Apr 20, 2013 11:34 am

Hello,

I'm using Cameo to simulate a system. My main problem is the time. I Cannot understand how it works. If I read the documentation, I can understand that there is a real time clock and a simulation clock. When I choose "Clock ratio" in the specifcation window of an Execution Configuration, it is written that this is the "ratio of the simulated time to modeled time". It seems to be clear but in a simulation it's not like I thought.
So I created a model to try to understand how it works. You can see with the images in attached files how I created it. It is very simple. I only use an OpaqueBehavior in my diagramme activity to get the current time. As you can see I only have a block with a state machine for the behavior. In that stm, I only have a state wich activates an activity. In that activity, I have a call behavior action to get the current time. In my simulation I used clock ratio = 2. As you can see my state machine is triggered every seconde. So I thought that the result of getTime() would be 1, 2, 3, etc (I divided the result by 1000). But when I see the console window I note that time equals the current time ! Thus, if the animation is slow, time continues to increase and the results are 2.24, 7.54, etc. So how can I get a modeled time wich 'stops' when an activity is being fired (because I Suppose that my activity is instantaneous).

I hope it's clear.

Thanks for your reponse.

Regards,

Baudouin Martin
You do not have the required permissions to view the files attached to this post.
baudouin.martin@gmail.com
Forum Newbie
Forum Newbie
 
Posts: 7
Posts Rating:0
Joined: Mon Feb 25, 2013 6:41 am
Full name: Buddy

Return to Cameo Simulation Toolkits

Who is online

Users browsing this forum: No registered users and 1 guest