- Index
- » Users
- » pranay2612
- » Profile
Posts
Posts
Can you elaborate a bit more on what you mean by sampled systems? I am already using time as an input to the function in the DLL and its working. I can also control the time steps if needed.
Thanks,
PK
Hello all,
I have a separate tire model DLL working with Modelica solver. The DLL has been used with different solver and I am trying to replicate the results with Modelica. However, the DLL requires knowledge of the mode of the time steps taken by the solver.
Is there any way to find out which steps in Modelica simulations are predictor, corrector and converged (using DASSL solver)?
Thanks,
Pranay
Hi guys,
Is there a way to query the step size details from Modelica Solver during the simulation?
I am using some external DLLs for implementing some functionalities in Modelica and that requires the current step size of the simulation.
There are other queries required as well, for ex. unit details and step mode (converged, predictor or corrector step), but finding the current step size is the most important for now.
Thanks in advance.
Regards,
Pranay Kumar
Thanks for your reply.
If it comes out as a bug. please let me know how i can track the issue or how can i get to know about the fixed build if there is a fix submitted for this.
I am a new user of modelica and i am not sure of the different forums used.
For now, I will add the path to the env variable "PATH".
Thanks,
Pranay Kumar
I have written a simple add function and made a DLL from it in Visual studio 2015. Ignore the int return, that was not necessary, I was just trying out something.
# define CLINKAGE extern "C"
# define STDCALL __stdcall
# define DLLFUNC __declspec(dllexport)
CLINKAGE
DLLFUNC int STDCALL ADD(int a, int b, int *c)
{
*c = a + b;
return *c;
}
When i access the same function in modelica as follows it compiles but throws an error while running.
function ADD
input Integer a;
input Integer b;
output Integer c;
external "C" ADD(a,b,c) annotation (
Library = "GSE",
Include = {"#include \"GSE\\GSE.h\"", "#include <stdlib.h>"},
IncludeDirectory = "modelica://CrtVehicle/Resources/Include/GSE",
LibraryDirectory = "modelica://CrtVehicle/Resources/Library/GSE");
end ADD;
The error says: Process crashed Simulation process failed. Exited with code -1073741515.
The DLL and the Lib are placed in the folder GSE in path shown above. I also tried including a win64 folder in between but it gave the same error.
The only way the simulation works if i place the DLL and lib in the working directory. I can't do that for other reasons. How can i solve this issue?
Thanks in advance.
- Index
- » Users
- » pranay2612
- » Profile