test #6
Replies: 4 comments 6 replies
-
This discussion has been moved from issues to discussions section of the project. |
Beta Was this translation helpful? Give feedback.
-
Hello @daruoxiaoyu, The generated solvers are defined in C++ to allow greater flexibility in defining component model code compared to C. Moreover, many simulators and FPGA HLS tools support C++ alongside C. The ORTiS solver codegen tools are not capable of generating solvers within other languages (such as C or Python) at this time. The C++ defined solvers generated by the ORTiS codegen tools can be called from Simulink and PLECS models. In Simulink, the solver functions can be called from S-Function blocks. The C++ solver functions can be used in PLECS by building a DLL around the solver function with a C++ compiler suite and using the built DLL in a DLL block within PLECS. In both cases, since the solvers are defined as generic function templates in C++ rather than specific functions, the function call --given template parameters for instance and real data type-- will need to be wrapped within another function that is called by Simulink or PLECS. The component models used in generated solvers from the tool have been tested against Simulink and PLECS before, using the above mentioned approaches or by running the generated solvers in an independent C++ testbench and comparing results after. A few of the literature (see readme of the project) for the project show such comparison, such as this one (SoftwareX, public access): You mentioned you are having difficulties testing a model. Can you elaborate on what you are trying to do and the issue you are having? |
Beta Was this translation helpful? Give feedback.
-
I've generated h files with CLI tools, and c++ files written through the instructables, but no CSV files are output, which is bad. What is the solution ? |
Beta Was this translation helpful? Give feedback.
-
Discussion closed and locked due to inactivity. |
Beta Was this translation helpful? Give feedback.
-
Hi, thank you very much for your open source contribution.
I'm having some difficulties testing the generated model. Have you tried to convert the generated program into c so that it can be compared with the circuit model in plecs or simulink software.
Thanks again!
Beta Was this translation helpful? Give feedback.
All reactions