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

Posts

Posts

Here is a far better one :

Code:


sudo apt install -y aptitude
sudo apt install -y $(aptitude -F %p search '^omlib-* !aixlib !arduino !buildingcontrollib !emoth !modelica-linearsystems2 !planarmechanics !planarmechanicstest !realtimecoordinationlibrary' | tr '\n' ' ')

Hey, I want to connect each cell[i] to each cell[j] but I don't want to connect a cell to itself :

Code:


for i in 1:n loop
  for j in 1:n loop
    if not(i==j) then
      connect(cell[i].port, cell[j].port);
    end if;
  end for;
end for;

That's a minimal code, you see the idea. When I check, I get the following error :

Code:



[1] 17:39:21 Translation Error
[/var/lib/jenkins3/ws/LINUX_BUILDS/tmp.build/openmodelica-1.15.0~dev-46-g9d99fda/OMCompiler/Compiler/NFFrontEnd/NFCeval.mo: 1702:9-1703:93]: Internal error NFCeval.evalRelationEqual failed to evaluate ‘i == j‘

I guess this is because for statement is evaluated during instanciation of the model whereas if statement is evaluated during simulation. Is it right ? Is it only possible to do such a thing with OpenModelica presently ?

Thanks,

Here is a workaround :

Code:

sudo apt install -y '^(omlib-)(([^a])|a([^ir])|ai([^x])|aix([^l])|aixl([^i])|aixli([^b])|ar([^d])|ard([^u])|ardu([^i])|ardui([^n])|arduin([^o])).*$'

Hello,

I'm trying to do something really simple, but far more delicate than expected.

Physically, it's a travelator/moving belt (don't know which is the best term in english) on where is spread a layer of textile, which is described by his density.

So, a certain physical quantity (the density) varies with the space and with the time. With the space because the layer is not uniform, and with the time because the travelator is moving.

Moreover, the speed of the travelator can vary.

In openmodelica, if I want to modelize this system in one block, i've got the access to local variables at the input and I must determinate a mean to calculate the density at the output.

On sheets of paper, I tried several things ; including variable delay and seeking differential equation, but I must conceed I'm back to square one.

Would someone have an idea ?

Thank you by advance,

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