Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register
  • Index
  • » Users
  • » farhad323
  • » Profile

Posts

Posts

@sjoelund.se : thank you very much

Hi, could you please tell more about interactive simulation. If it is possible for you give me a simple sample or a resource to find about it.

Thank you very much

@sjoelund.se:

If I fully understand you mean I can change the values of parameters stored in the *_init.txt file during the interactive simulation.
You mean once the simulation started, we can change the *_init.txt file and save it for the rest of the simulation.

Is it right?

Thank you very much

As we know some parameters need to be initialized before running the simulation. In each execution of the simulation we can change them to get different simulation results. Some others have derived or calculated value that generated in during of the simulation runtime. My question is that how we should deal with these values?
Where they stored? In the RAM? Or in the *_init.txt file? If they are stored in the  *_init.txt file, is it possible to change them manually during the simulation runtime?
After all is it necessary to worry about them?

I am very thankful for any help.

Jan-19-11 16:14:38
how to use the pder function in OM

hello
is it possible to model Differential Equations in OpenModelica? I mean without dealing with partial concepts.

@sjoelund.se: thank you very much

Hello,
As we know after compiling Modelica model we get some files including $ModelName$.cpp

I am going to use this C++ code separately in a program. Preferably I want to make a dll file with it and use the dll file in my applications. How I can do this?
For example is it possible to compile the code with C++ compiler. How I should include the header files? After all is it possible to get the final results by using the  generated dll file?

Thanks a lot

Thank you mohsen for you great answer. I have another question please:

How the OpenModelica generates the $Modelname$_init.txt file and retrieve the parameters from it?
Does it have a standard mechanism for sequencing the values?
Are the values sequence is based on their definition or calling sequence in the simulation code? 

Thank you very much.

Hello
I am looking for an answer of following question:

I want to develop a simple simulation program working with user input as some required parameters. I mean i want to make a test.exe that generates simulation results based on user input. How I can do this? I stated that I just looking for a simple program with one or two parameters. Parameters can be typed by user or retrieved from a text file.

I will be very thankful for any help to show me how OpenModelica deals with parameters

Thank you for your good answer, i fixed the problem by your good reply:
            Process myProc = new Process();
            ProcessStartInfo _startInfo = new ProcessStartInfo();
            _startInfo.FileName= " dir..\\Sinulation.exe ";
            _startInfo.WorkingDirectory="dir..:\\";
            _startInfo.CreateNoWindow = true;
            myProc.StartInfo = _startInfo;
            myProc.Start();

thank you for your good answer
if it is possible i have another question:

Hello
I have a problem in executing an exe file from C# code:
I am working on OpenModelica that is a free open source simulation tool. Final executable result of simulating with OpenModelika is an exe file. Once we have this exe file, we can get the simulation result by double clicking on this file. However to executing truly the program needs a text file called *_init.txt to be along with exe file in the same directory. Executing the exe file generates final result as a *.plt file in the same directory.
Considering the above mentioned situation my problem begins here:
I am trying to execute the exe file programmatically by C# code:
            Process myProc = new Process();
            myProc.StartInfo.FileName = "dir..\\Sinulation.exe";
            myProc.StartInfo.UseShellExecute = true;
            myProc.Start();
executing the exe file with above code don’t generate the *.plt file.
Is it any way to solve this problem?
I will very thankful for any help

Hello everyone
I am new in OpenModelica. I am trying to use OpenModelica indirectly by developing an interface using java or C# and .NET. Here I have some questions and I will be grateful for any help.

1. I want to develop an interface for my users. Entering scripts of OpenModelica in an editor and pressing make button my program should send scripts to OpenModelica and get the results as a test.cpp file. Finally I should compile this test.cpp file. Is it any solution to do so?

2-is it any way to compile a test.cpp file using omc.exe indirectly by windows command window cmd.exe?

  • Index
  • » Users
  • » farhad323
  • » Profile
You are here: