-
Notifications
You must be signed in to change notification settings - Fork 1
How it works
dmonsch edited this page Nov 11, 2019
·
3 revisions
Basically, the headless simulation is based on the use of a Java agent. This Java agent mocks the required Eclipse classes in a way that the simulation engines (SimuLizar and SimuCom) work flawlessly. Thus it is possible to execute simulations with SimuLizar very efficiently and without running an Eclipse instance.
For SimuCom we used another trick to make the simulations independent of Eclipse:
- We generated the source code for the simulation with the existing tasks.
- We add the necessary Java files and EMF models.
- We compile the Java files programmatically using the inline Java compiler.
- We load the resulting compiled files from the previous task into a child classloader and trigger the simulation. Afterwards we close the newly created classloader.
This procedure seems quite simple, but there were some pitfalls that had to be considered.
The core differences between the both simulation engines are:
- SimuLizar is much faster than SimuCom, as we do not need to compile Java files
- SimuCom supports some measuring points that are not supported by SimuLizar (see Limitations)
- The initial overhead for creating and compiling the source code of SimuCom is quite high, the simulations however are just as fast as with SimuLizar.
- As a guideline it can be said that a simulation with SimuLizar (one repetition) takes about 1-2 seconds and a simulation with SimuCom approx. 5-7 seconds. Therefore you should use SimuLizar in time-critical cases (if it is sufficient for your use case).