- Index
- » Users
- » Ueda
- » Profile
Posts
Posts
Thank you for your introduction.
I'm interested in transition OMEdit.
I have never used Qt, so let's check the translation flow first.
Thank you very much for permission to translate and thank for answering the email.
I would like to publish it using CC BY 4.
I hope this will help to progress of Modelica in any way.
Regards,
Hello,
My name is Ueda.
I'm member of the Open CAE Society of Japan that is promoting the spread of CAE on open source.
I would like to ask if there is any problem to translate the OpenModelica User's Guide into Japanese.
I also use OpenModelica and I apricate you for developing great software.
As part of academic activities, I would like to translate to Japanese the OpenModelica User's Guide and release it for free under GPL v3 license.
Is there anything I should be aware of when it comes to translation?
I read User's Guide license and there will be no problem with translation activities.
I sent Open Source Modelica Consortium similar mail at May, but I can't find reply mail yet.
Therefore I would like to take this forum to ask a question.
I will cancel the question immediately if it is inappropriate.
Hello,
OpenModelica can't save the model with errors.
So if you want to save the model, How about you do comment out the error row?
Or how about saving the code to other text file.
Hello.
I'm in following trouble.
Right click on the icon which is Diagram view, another icon is selected.
In OM 1.12, double-clicking on the icon opens a different icon parameter window
When OM 1.11 is set, the above problem disappears but when right clicking on an icon, another icon is selected.
· Even if I click on any icon, the last drag & dropped icon will be selected
· Similar phenomenon does not occur in other personal computers
Could anyone tell me how to solve this problem?
Add,
I read following references, but I couldn't understand...
Modelica Specification 3.4 Chp 12.9
Full Version: External (C-)Function return array
Full Version: External (C-)Function return array
Hello,
I'm tring to use external C function with array.
I'm testing very simple code for passing and returing the array.
but I got a error message when I simulated the .mo file.
Followings are my .mo , .c and .h files.
(attached files)
Code:
.mo file
model External_Array
/*This code is very simple code for testing external c function with array*/
function FuncArray
input Real[:] a;
output Real[2] b;
external b=ExternalC_array(a,2) annotation(Library="functionC.o",Include = "#include \"ExternalC.h\"");
end FuncArray;
Real[2] x={1,2};
Real[2] y;
equation
y = FuncArray(x);
end External_Array;
.c file
/* ExternalC.c */
double ExternalC_array(double *x, int n)
{
int i;
for(i = 0; i < n; i++){
x[i] = x[i] / 2;
}
return x, n;
}
.h file
/* ExternalC.h */
double ExternalC_array(const double*, int);
And following is the error message.
Code:
[D:/.../External_Array.mo:2:3-8:16:writable] Error: The lhs (result) of the external function declaration has array type (Real[2]), but this is not allowed in the specification. You need to pass it as an input to the function (preferably also with a size()-expression to avoid out-of-bounds errors in the external call).
[D:/.../External_Array.mo:17:5-17:21:writable] Error: Class FuncArray not found in scope External_Array (looking for a function or record).
Error: Error occurred while flattening model External_Array
I know that I'm write wrong argument in .c file.
external b=ExternalC_array(a,2) annotation(Library="functionC.o",Include = "#include \"ExternalC.h\"");
but I don't know hot to fix it.
ExternalC-with-Array.zip
Questions
(1) Plase teach me how to fix the avobe code?
(2) Please let me know if you know a good example which contains .mo , .c code.
You are welcome Nasrou.
Maybe for loop can not be used.
Beause there is no loop command in this list
https://build.openmodelica.org/Document … pting.html
If you want to make many similar commands,
you have to make another program by another language.
If you find how to use for loop,
please teach me.
Add to
I will fix the above reply.
I found for loop example from your forum.
https://openmodelica.org/doc/OpenModeli … eter-sweep
Good luck
Ueda
Do you want to create script file that execute a simulation?
If so you can read here
OMShell and OMNotebook introduction and exercises
Page.3
And I write down small overview.
1.
Simulation execution script is written by some text editor and save as .mos file.
Code example is following
Code:
loadModel(Modelica);
cd("directory address);
loadFile("File name");
simulate(model name,startTime=0,stopTime=1 ... );
2.
Go to the directory of .mos file using cd() command in OMSell.
3.
Code:
runScript("mos file")
Then the script start.
If you want to control parameter value according to a result, I don't know how to creat.
Regards,
Hello
I tried to build OMCompiler on Windows7.
I got following error.
*Error message was japanese, so I translated it into English.
I'm sorry If this is not an appropriate translation.
$make -f Makefile.omdev.mingw -j8 2>&1 | tee make.log
...
config.status: executing default commands
make[1]: leaving directory '/c/OpenModelica/OpenModelica/OMCompiler'
Makefile.omdev.mingw:37: recipe for target `omc' failed
make: *** [omc] error 2
Plase advice me how to fix the error.
Hello
Maybe I think you need another command.
I am sorry if I made a mistake, please try the following command in MSYS for proxy setting.
Code:
git config --global http.proxy proxy.server.address:8080
git config --global https.proxy proxy.server.address:8080
Regards
Hello
I tried to compile OMC on Windows7 with reference to the following URL.
Compiling OMC using OMDev package
When I tried to do "•Editing the OMDev-MINGW-OpenModelicaBuilder " that is in "Compiling OMC using Eclipse", I haven't found "OMDev-MINGW-OpenModelicaBuilder" in Builders of "Properties for OpenModelica".
Attached picture is my "Properties for OpenModelica" window.
I think It may cause by path of "OMDev-MINGW-OpenModelicaBuilder32bit.launch" or "OMDev-MINGW-OpenModelicaBuilder64bit.launch" files.
But I don't know how to set the proper path.
Please tell me how to fix this problem?
OMDev path of my PC is C:\OMDev.
OpenModelica path of my PC is C:\OMDev\OpenModelica.
Thanks sjoelund.se
I tried options for the model in OMShell.
Code:
setCommandLineOptions("--preOptModules+=introduceDerAlias")
setCommandLineOptions("--postOptModules+=wrapFunctionCalls")
And following is Result.
Command | time[sec] | percentage[%] |
matching and sorting (n=18156) | 270.3 | 13.7 |
analyzeInitialSystem (initialization) | 164.1 | 8.3 |
prepare postOptimizeDAE: | 271.4 | 13.8 |
postOpt tearingSystem (initialization) | 317.7 | 16.1 |
postOpt removeSimpleEquations (simulation) | 270.5 | 13.7 |
postOpt tearingSystem (simulation) | 315.1 | 16.0 |
ostOpt detectJacobianSparsePattern (simulation) | 268.8 | 13.6 |
total | 1877.9 | 95.2 |
I got about 100sec reduction about analyzeInitialSystem, but it's not enough.
I would like to send a mail for openmodelica@ida.liu.se.
Also, if you know how to try Simplify2 could you tell me it please.
Thanks for your help.
Thanks you
I tried to -d=execstat for the model.
And then following is result of high percentage commands.
Command | time[sec] | percentage[%] |
matching and sorting (n=18156) | 271.4 | 13.1 |
analyzeInitialSystem (initialization) | 252.9 | 12.2 |
prepare postOptimizeDAE: | 271.4 | 13.1 |
postOpt tearingSystem (initialization) | 318.7 | 15.4 |
postOpt removeSimpleEquations (simulation) | 271.0 | 13.1 |
postOpt tearingSystem (simulation) | 317.1 | 15.3 |
ostOpt detectJacobianSparsePattern (simulation) | 269.0 | 13.0 |
total | 1971.5 | 95.3 |
*The model doesn't have pre() and is nonliear equation.
I want to study to reduce these time.
But, If someone know how to speedup these performance
could you tell me it, please?
Hello.
I made a model to solve the stress distribution that represented by a two dimensional array.
timeBackend of the model that has 40*70 array took about 20-30 minutes.
It'a too late for me...
I found following some tickets.
https://trac.openmodelica.org/OpenModelica/ticket/3695
https://trac.openmodelica.org/OpenModelica/ticket/2647
I applied --removeSimpleEquations=new which is writen in the #3695 but it was same timeBackend.
And I would to try to compile simplify2 but I didn't know how to compile it.
Do someone know how to speedup the timeBackend?
Version : OM 1.11.0(OM 1.12Dev is same timeBackend)
OS : Windows7
CPU : Core i7-4810MQ 2.8GHz
memory : 32Gbyte
Following are mistake.
Version : OM 1.9.6(OM 1.12Dev is same timeBackend)
OS : Windows7
CPU : Core i5-6300U 2.4GHz
memory : 12Gbyte
- Index
- » Users
- » Ueda
- » Profile