Dear Garron,
First of all, sorry for the late answer. I am just back from holiday.
Regarding your questions:
>
It appears that Dymola generates the Algorithm Code and then TargetLink uses this code to produce Production Code.
That is correct. TargetLink is what we call a eFMI Production Code generator; it can import an eFMU, read its Algorithm Code container (the GALEC code and manifest) and generate a Production Code container (C code and manifest) for any of the target platforms the "ordinary" (i.e., without eFMI stuff) TargetLink supports.
Since the "ordinary" TargetLink code generation supports Simulink as target, the eFMI enhanced TargetLink 22.1 does so too. Anything you can do with the "ordinary" TargetLink you can do now also with its new eFMI facilities, for example targeting a dSPACE hardware-in-the-loop (HiL) environment. eFMU Algorithm Code containers are just a new kind of source for TargetLink 22.1 (that can be translated to any of its supported target platforms).
Thus, your question
>
My question is how is the Algorithm Code imported into Simulink so that TargetLink can be used?
is somehow missing the point. The Algorithm Code container is imported by TargetLink; then TargetLink can be used to target the Simulink environment or any other of its targets. It is TargetLink that supports eFMI import/export, not Simulink.
I am not sure about this. If "ordinary" TargetLink supports this, the answer is yes I guess. But you have to ask Jörg Niere of dSPACE about it.
As a side note, we (Dassault Systèmes, Torsten Sommer) are working on eFMU import in Simulink by means of FMPy (
https://github.com/CATIA-Systems/FMPy). This should provide the same functionality as FMIKit-Simulink (
https://github.com/CATIA-Systems/FMIKit-Simulink) does for FMI, only that it are eFMUs with production source code. Torsten will give a short demonstartion next Tuesday, 16:00 CET; please let me know if you are interested and I can invite you.
Best Regards,
Christoff