Simulation stops at readStructuralFeature

Moderator: Moderators

Simulation stops at readStructuralFeature

Postby jpinchak » Wed Sep 03, 2014 4:43 pm

Hello:

Why does simulation stop at every readStructuralFeature action with Cameo Simulation Toolkit? I have tried with several models, including example models that came with CSM installation, but all simulations come to a halt at readStructuralFeature actions.

I would be very interested in how to resolve this.

Thank you,

Julie
jpinchak
Forum Beginner
Forum Beginner
 
Posts: 81
Posts Rating:0
Joined: Tue Jan 14, 2014 2:49 pm

Re: Simulation stops at readStructuralFeature

Postby kritsana_u » Thu Sep 04, 2014 3:16 am

Dear Julie,

We have checked the readStructuralFeature action in CSM 18.0 and CSM 18.0 SP1 but we cannot found the problem.
Could you please specify the sample project you found the problem? and it would be great if you can provide us the step to reproduce.

The readStructuralFeature action is an action to read the value of the specified structural feature which is owned by the classifier of the Object coming through the object pin. Therefore, please make sure that there is a token flows through the object pin and the classifier of the object has the structural feature specified in the readStructuralFeature action. You can use breakpoint at the object pin of the action.

Another thing that could be the cause of the problem is, the Object which flows to the object pin of the readStructuralFeature action come from the readSelf action and you execute the Activity directly without context. Normally, readSelf action is the action that returns the Object of the context classifier of the Activity. If you execute the Activity without the context (using "Execute" menu), then readSelf action will return the BehaviorExecution (Object of the Activity) instead.

For example, if you open "StereoSystem.mdzip" in the .../samples/simulation folder. In the sendAudio activity diagram you can see a readStructuralFeature action that read the value of volume, which is a structure feature of a Player class, not the sendAudio activity. Therefore, if you execute the sendAudio without the context, it will stop execution at the readStructuralFeature because the object flows through the object pin is the Object of activity and it does not have "volume" feature.

Screen Shot 2557-09-04 at 4.09.36 PM.png


Best regards,

Kritsana U.
You do not have the required permissions to view the files attached to this post.
kritsana_u
Forum Expert
Forum Expert
 
Posts: 116
Posts Rating:3
Joined: Wed Jan 27, 2010 3:02 am

Re: Simulation stops at readStructuralFeature

Postby jpinchak » Thu Sep 04, 2014 9:19 am

Hi Kritsana,

Thanks, it looks as though executing with context made the difference.

Regards,

Julie
jpinchak
Forum Beginner
Forum Beginner
 
Posts: 81
Posts Rating:0
Joined: Tue Jan 14, 2014 2:49 pm


Return to Cameo Simulation Toolkits

Who is online

Users browsing this forum: No registered users and 0 guests

cron