Live data from Hacker News

Modelica

modelica.org

91–100 of 118 posts

Re: Modelica

#91
post #81

I don’t know what this is. There’s not a single example on the landing page. There’s not a single example on any of the main links from the landing page. But the landing page does have a merch store so you can buy mugs and hoodies and look at huge company logos of “organizational members”, whatever that is. You made something. Show me what you made. I’m probably not going to spend more than 30 seconds trying to figur…

[flagged]

Re: Modelica

#92

Earlier quoted context omitted.

Does MATLAB also compete in the same field?

MATLAB/Simulnk is imperative. They have signal flow/causal approach. So you should know ahead of time which variable causes another variable to change i.e. which is defined first. Modelica is acausal. You define the variables and how they are related (equations). The compiler handles variable dependencies and resolution internally. There are pros & cons of each. Both are used for simulating cyber-physical systems.

I seem to have a problem understanding "acausal". Is its meaning "not causal"? To me that wouldn't make much sense and sounds like another buzzword. The software still runs inside a computer. Everything inside of it is causal. And nust because the compiler decides in what order to do what, that also doesn't make it not causal, since surely the compiler follows some well known rules that _cause_ it to decide this way or that way. And surely defining relations _is_ in a way defining the causal ... relations.

So what is really the meaning of "acausal" in this context?

Re: Modelica

#94
post #47
post #41

Earlier quoted context omitted.

Sounds like Simulink to me, which is one of the major MATLAB programming environments. ETA: Apparently MathWorks has Simscape in this category.

And Mathematica has this: https://www.wolfram.com/system-modeler/

Yeah but that's a Modelica compiler and environment too.

Re: Modelica

#95
post #59

Earlier quoted context omitted.

Ah! You're the author of Modelica by example?

Yes. And "Introduction to Physical Modeling with Modelica". I also built the Modelica Playground (which I deliberately didn't link to because a thundering herd of HN readers would have crashed it).

Are you aware of any books like your "Introduction to Physical Modeling with Modelica" but for readers without a background in EE, math, physics? I am looking for something for a mediocre SWE like myself. It doesn't have to be Modelica; I could try learning MatLab or Mathematica, etc.

Re: Modelica

#96

Earlier quoted context omitted.

MATLAB/Simulnk is imperative. They have signal flow/causal approach. So you should know ahead of time which variable causes another variable to change i.e. which is defined first. Modelica is acausal. You define the variables and how they are related (equations). The compiler handles variable dependencies and resolution internally. There are pros & cons of each. Both are used for simulating cyber-physical systems.

I seem to have a problem understanding "acausal". Is its meaning "not causal"? To me that wouldn't make much sense and sounds like another buzzword. The software still runs inside a computer. Everything inside of it is causal. And nust because the compiler decides in what order to do what, that also doesn't make it not causal, since surely the compiler follows some well known rules that _cause_ it to decide this way…

It means data flow is bidirectional.

Re: Modelica

#97
post #83

Earlier quoted context omitted.

"Modelica is an object oriented language to model cyber-physical systems." Literally the first sentence.

There's a big difference between showing and telling. GP wants a demo that makes it clear that something interesting has been produced.

Modelica is is in wide use in many industries, just not yours apparently. This is kinda like linking to Java or C++ and then being surprised it doesn’t have a top level intro explaining how to use it.

Re: Modelica

#98

Earlier quoted context omitted.

MATLAB/Simulnk is imperative. They have signal flow/causal approach. So you should know ahead of time which variable causes another variable to change i.e. which is defined first. Modelica is acausal. You define the variables and how they are related (equations). The compiler handles variable dependencies and resolution internally. There are pros & cons of each. Both are used for simulating cyber-physical systems.

I seem to have a problem understanding "acausal". Is its meaning "not causal"? To me that wouldn't make much sense and sounds like another buzzword. The software still runs inside a computer. Everything inside of it is causal. And nust because the compiler decides in what order to do what, that also doesn't make it not causal, since surely the compiler follows some well known rules that _cause_ it to decide this way…

It's like the difference between an imperative framework and a declarative one. In a causal modeling system you as the user are responsible for writing out the causality of your model. In an acausal system, you write what components you have and how they connect and part of the compilation process is "causalization" i.e. taking the elements and connections and inferring from that the direction of causality.

This makes modeling much easier because causality doesn't compose. Adding a new component to a model can totally change what the optimal causalization is, so using an acausal framework the compiler will figure that out, but in a causal framework the user has to re-derive the causality of their model.

Re: Modelica

#99

This is a pretty niche acausal language, and is used extensively in Motorsports (F1, NASCAR) for real-time simulation on the driver simulator. The language spec is open source but there many commercial compilers, Dymola is the most popular. I code in this language extensively and its acausal nature is extremely powerful. It makes your models highly composable, you can basically assemble a mechanical system like a bun…

This approach seemed super interesting and we attempted to use it for modeling a fairly complicated fluid system (pipes, valves, tanks, etc). However, in the end the equations that fell out made the solver choke. We abandoned the effort since it seemed like an undebuggable black box. It's unclear to me whether we just didn't do it right or if the open source alternatives just aren't capable.

Re: Modelica

#100
People seem to be comparing it to Simulink, but to me the language seems to have more in common with matlab / octave's symbolic package / python's sympy.

Any idea if that's the case?

Post reply on HN