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
  • » Aigor88
  • » Profile

Posts

Posts

Oct-12-15 13:02:04
Unusual Error: Simulation process exited with code -1073741819
Category: Programming

Hi everybody
I have this unusual error:
Process crashed
Simulation process exited with code -1073741819
I have seen that this error is related to this array:
Real Giorni_Mese[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

If I change 29 instead 28 in the second position of the array, this model works!!!!

I have also tried to change the declaration of the array, if I use Integer:
Integer Giorni_Mese[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};+
I have this error:
Process crashed
Simulation process exited with code -1

Someone have an idea? why this error?
thanks

Sep-25-15 11:20:07
Category: Programming

thanks current/wink

Sep-25-15 11:08:35
Category: Programming

Hi everybody,
I am quite new and I would ask a little help.
the code:
a=3
b=1
equation
if a==b then
//show error message
else
//do nothing
end if;
algorithm
b:=b+1;

Someone can helpme, which code can I use for showing the error message?
thanks everybody

Hi everybody I am quiet new from OpenModelica and I have several issue.
I am trying to convert the time for obtaining the corresponding in hour and minutes, but I don't how to write in the code for count until 59 minutes and when reach 60 add an hour and restart minutes from 00. This is the code:

model fromTimetoHour
  Real min;
  Real hour;
equation
  min = div(time, 60);
  hour = div(time, 3600);
end fromTimetoHour

If i set in the simulation the end time at 31536000 (second in one year) and with this code I obtain the total hours and minutes of the whole year.
But my aim is trying to have the classic visualization in  hh:mm

someone can help me?

Sep-02-15 14:27:01
what happens during Parameters Init ? _ Adding a new state variable ?
Category: Developer

so how can i increase the value of "a" by one?

Sep-02-15 14:10:04
what happens during Parameters Init ? _ Adding a new state variable ?
Category: Developer

maybe here someone can help me..
in my model i need to initialize a Real variable with initial value =0
but this value has to change during the equation procedure

model EX
   Real a = 0;
equation
   a = a+1;
end EX

why it doesn't work??

yes exactly! it works!
but how can i add also minutes and the date ?
thanks for the help

i don't understand
what do you mean?

I tried to see in the Forum but I don't find anything.

I would like to use the day hours minutes and second from PC settings. Is it possible? How can I manage this problem?

Thanks to all

Jul-03-15 15:56:44
How to use startTime

thanks
it works!

Jul-03-15 10:04:34
How to use startTime

Hi guys
I need help for manage a problem

the problem is that startTime is in the internal library of OpenModelica: OpenModelica.Scripting.simulate. That is a function.

My aim is to create a Model and inside it, I want to use this operation:  time - startTime

Anyone know how to manage it?

Thanks

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