Multiple active blocks in a simulation

Moderator: Moderators

Multiple active blocks in a simulation

Postby tpen3219 » Thu Mar 07, 2013 5:32 pm

There might be another cause but I seem to have problems with my simulation when I have more than one block designated as active at start-up.

Are there rules or issues I need to be aware of when having multiple objects active in the same simulation?

Urgent request
tpen3219
Forum Beginner
Forum Beginner
 
Posts: 93
Posts Rating:3
Joined: Fri Nov 04, 2011 11:57 am

Re: Multiple active blocks in a simulation

Postby kritsana_u » Mon Mar 11, 2013 4:50 am

Dear Tom,

When the context is executed with AutoStartActiveObjects = true, the objects of its structural features will be initialized first. After that, their classifier behaviors will be executed asynchronously. Then, the classifier behavior of the context object will be executed. So, you could have the problem with synchronization, e.g. send signal between objects during initialization of the context.

For workaround, you could use a State-Machine as the classifier behavior of your active objects. Then, using signals to synchronize between them.

Best regards,

Kritsana U.
kritsana_u
Forum Expert
Forum Expert
 
Posts: 116
Posts Rating:3
Joined: Wed Jan 27, 2010 3:02 am

Re: Multiple active blocks in a simulation

Postby tpen3219 » Mon Mar 11, 2013 3:14 pm

Thank you, I am using state machines for the classifier behaviors. But knowing teh initialization sequence is helpful.

Where is this behavior documented?
tpen3219
Forum Beginner
Forum Beginner
 
Posts: 93
Posts Rating:3
Joined: Fri Nov 04, 2011 11:57 am

Re: Multiple active blocks in a simulation

Postby kritsana_u » Thu Mar 14, 2013 8:12 pm

Dear Tom,

We have section 5.4.3 and 5.4.4 in the Cameo Simulation Toolkit User Guide describe about the runtime objects creation. But we will update it for more information.

Kritsana U.
kritsana_u
Forum Expert
Forum Expert
 
Posts: 116
Posts Rating:3
Joined: Wed Jan 27, 2010 3:02 am

Re: Multiple active blocks in a simulation

Postby tpen3219 » Tue Mar 19, 2013 12:17 pm

These section don't actually speak to this issue.
tpen3219
Forum Beginner
Forum Beginner
 
Posts: 93
Posts Rating:3
Joined: Fri Nov 04, 2011 11:57 am


Return to Cameo Simulation Toolkits

Who is online

Users browsing this forum: No registered users and 1 guest