Cancel
Showing results for 
Search instead for 
Did you mean: 

Executing simulation runs within a method (subject redirected from Tecnomatix Developer Forum)

Hello

 

I recently posted the same question in the Tecnomatix Developer Forum. I hope I am in the right place this time.

 

I have developed a library in c++ to optimise simulation problems (similar to the GAWizard).

I access the optimisation procedure in the library through a Dialog object I created.

The Dialog object has a method (callback method) which allows for specifying the simulation model parameters such as decision variables and their ranges, as well as the output parameters to be optimised.

 

After I call the library and start the optimisation procedure, I desire to run the simulation problems/models from the library.

When the models are run however, the simulation run is unable to start unless the method calling the library (callback method) execute completely.

I read in the help guide that Tecnomatix Plant Simulation EventController (the object I use to run the models) cannot start or reset a simulation from within a method unless the method fully executes first. So in my case the callback method must fully execute before any simulation run is done in the library, which I do not desire as the optimisation procedure relies on iterative simulation run results.

 

Is there a way around this perhaps? Can't I start (or reset) a simulation run from within a method without fully executing the method?

To summarize, how can I run a TPS model from within a method in a Dialog object while the method is still executing?

 

Thank you in advance,

Simulationist

5 REPLIES

Re: Executing simulation runs within a method (subject redirected from Tecnomatix Developer Forum)

Phenom
Phenom

I'm getting confused from where you are opening/loading/calling/running exactly what.

 

Could you therefore please write down the opening/loading/calling/running  sequence  

 

 

 

 

Re: Executing simulation runs within a method (subject redirected from Tecnomatix Developer Forum)

I have described what I want to achieve in a document. It is too difficult to describe it here in short terms. Any suggestions would be appreciated.

Re: Executing simulation runs within a method (subject redirected from Tecnomatix Developer Forum)

Phenom
Phenom

so if I get it right.

 

You are loading/calling the dll from your callback method

 

the dll is taking over command of your model

 

and the simulations won't start as the callback hasn't finished due to the dll still processing.

Re: Executing simulation runs within a method (subject redirected from Tecnomatix Developer Forum)

Phenom
Phenom

One solution to this issue is to run / control the simulations through a 2. or multiple  TPS applications

 

e.g. load start and communicate through the COM interface.

 

 

 

 

Re: Executing simulation runs within a method (subject redirected from Tecnomatix Developer Forum)

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello Simulationist,


I would like to explain the basic idea by an example: The library calls eventcontroller.reset. If very many BEs need to be deleted, then the reset phase may take some time. You can change model parameters (such as Buffer.Capacity) after this reset phase. You can observe the value eventcontroller.isResetting.

 

After the call eventcontroller.start of your library you can observe eventcontroller.isRunning.
In this way, you catch the end of the simulation.


Regards,
Peter