Hacker News new | comments | show | ask | jobs | submit login
Announcing Wolfram SystemModeler (wolfram.com)
167 points by mazsa 1700 days ago | hide | past | web | 33 comments | favorite



Oh, wow this is really awesome. Shame I could never use it, since it's out of my price range as a hobbyist. Seems insane they don't offer pricing that covers my use case, especially with stuff like home robotics being such a big thing these days. There's no way I could afford even 1/10th of the $3.5k they want for the full version, and I'm not a student so I couldn't buy the $75 student version. I'd have no problem paying $150-200, just to play around with this.


You can get OpenModelica, an open-source implementation of the same underlying modeling language (Modelica). http://www.openmodelica.org/

The language is quite complicated, though, and not all programs can run all well-formed simulation problems.


You could always register for a class at your local community college to get the necessary student ID. But I agree, a 'home user/general nerd' version would be great, possibly with limitations on export or suchlike.

I'm interested in playing with it too, although strangely there doesn't seem to be any way to get audio or MIDI into or out of it, which is a pity. I'm sure it wouldn't be too difficult to add on, since Mathematica has that sort of thing built in.


In WSM it's possible to create models that call external function in DLLs. I've been using a modelica wrapper to the oscpack library (http://www.rossbencina.com/code/oscpack) that allows sending and receiving simple OSC messages. This makes it possible to communicate with music applications that implement OSC. I've been using it to send input signals from an iPhone using TouchOsc.


Most interesting - thanks for the tip.


Hm, it's not a new problem to them... Mathematica has a hobbyist license called "Home Edition" at u$d 295. Maybe if many people show interest in the same kind of licensing for this new product they'll think about it.


"Seems insane they don't offer pricing that covers my use case..... I'm not a student so I couldn't buy the $75 student version."

They do offer pricing for your use case. You simply locate a student and have them buy it for you.

They understand people are going to do this. They just don't want Boeing to get that pricing they really don't care if you do. But they aren't going to say that.


At that point is there any difference from just pirating it? You're going to be in violation of the license anyway - I'm just they have a no-transfer clause.


I think what people fail to realize (when they downvoted my comment) is that it is common for companies (based on my 30 years in business) to offer special pricing to groups but not enforce that in any way. This is much different from pirating. This is "look the other way". An example of this is Apple's educational pricing. You can get this by presenting a student id of anyone in the Apple store and you get the ed discount. You can also buy from the Apple website and simply choose a school and get the education discount on applicable products. So ask yourself why they don't police this better? Because they don't have a problem with anyone doing it otherwise they would. But they aren't going to advertise it and I'm sure an Apple salesman won't tell you about buying this way.

Why? Well another reason is it's lets them get more money out of companies. So in other words they are allowed by law to charge different prices to different groups of users (by the way why is this fair?) So they set it up as a discount to some users rather than saying "we are going to get Boeing for more because we know they can pay more".


Seems neat. It's really hard to know whether Wolfram is a visionary or a lunatic (and by extension, whether the suite of Wolfram products are ahead of their time or just shiny recapitulations of existing tech).

For example, in his "A New Kind of Science", he basically takes credit for the entire field of complex systems theory and presents lots of previously known information (very verbosely) as though it were original research.


While mostly agree with your criticism of NKS, in Wolfram's defense, I have personally found Mathematica to be a joy to use. Under its unfortunate syntax, there's a great functional programming language there. While you can do many of the same things in Matlab or Octave, I always prefer to use Mathematica.


There are many respects in which Mathematica is an exceedingly well designed language. It falls down in some areas. Perhaps the Part syntax [[..]] is a bit clunky, but I think for the most part the syntax is actually pretty great.

Here's a rough list of things that I think make it stand out, written for someone who might not be familiar at all with it.

0) Functional style

A common style of functional programming involves building up quite complex data structures in an add hoc way using lists, symbols, rules, and so on, and then successively transforming these structures. Mathematica excels at this, having more 'neat' high-level functions to work with such ad hoc data structures than I've seen in any other language.

Of course you've got the usual Map and Fold and Nest, but then you've get FoldList, NestList, MapThread, MapIndexed, Scan, Cases, DeleteCases, Count, Select, Position, Replace, ReplacePart, ReplaceAll, SortBy, and on it goes (see http://reference.wolfram.com/mathematica/guide/FunctionalPro...). Many X also have a ParellelX that takes advantage of multiple cores.

Also, many of them use the expressive pattern matching 'sub-language' that Mathematica has. The pattern language was originally designed for writing rules that perform symbolic integration and differentiation, it turns out that the kind of flexibility you need for that is great for general purpose use. You use them all the time to get at parts of your complex expression to process them, count them, remove them, etc.

Lastly, almost all these functions have support for a 'depth spec' that enables you to say at what level or levels inside your expression you want to operate. Also useful for operating on rich data structures.

1) Uniform syntax

Like other LISPS, there is a nice and uniform s-expression syntax 'underneath' the more elaborate syntax. For example, to check the length of a list and conditionally append something, we have, If[Length[x] > 3, t++]], whose FullForm is actually If[Greater[Length[x], 3], Increment[t]].

Of course, you can use more familiar syntax, but sometimes when you're not sure of the precedence of something it can help to drop down to the explicit form.

Another nice thing about the syntax is that it makes everything serializable. Trivially. ToString[..., InputForm] produces a string version of anything, a function, a graph, a distribution, whatever. ToExpression gets it back. And you can define your own forms too, to join the other built-ins, of which there are many useful ones, like AccountingForm, ScientificForm, TeXForm, TableForm, etc..

2) Symbolic expressions

At a basic level everything is built out of lists, just like LISPs do. Well, lists with an interesting twist: the lists are 'colored', so to speak -- every list has a head, a symbol hiding behind the list, even if it is empty. So Foo[] is the empty list with the symbolic head Foo. A list like {1,2,3,4} is just a list with the symbolic head List.

All symbols (heads) are inert, and are defined just by mentioning them. But you can attach rules to the symbols that say how they should evaluate -- that is in fact how one defines functions.

In fact, the ordinary control flow constructs are exactly this: special heads that evaluate their arguments in certain unusual ways. So If will prevent its other arguments from evaluating until it knows whether its first argument evaluates to True (another symbol).

Now, this can be somewhat inefficient for tight loops, but luckily you can compile such things down (although you loose some of the fancier features, like pattern matching). Also, there is a lot of hidden optimization -- large lists of integers are transparently packed into arrays, as are matrices, and use special libraries for multiplication etc, even though you're using the same Times symbol at the top level.

Anyway, it's a very unique model.

2) Homoiconicity

Code is just data that hasn't evaluated yet. For example, I could count all the global variables mentioned by the definition of a given function:

Count[DownValues[func], s_Symbol /; StringMatchQ[Context[s], "Global`* "], Infinity]

I regularly use Mathematica in this sort of way to analyze the code I'm writing find bugs and understand how something executes. It's quite neat.

You can also use the basic symbolic pattern matching ingredients to do quite weird and interesting things, like defining your own language constructs if you needs something extra -- think LISP macros on steroids.

In fact, it is quite possible to define object orientation by using the symbolic pattern matching functionality such that it looks and feels like it was built into the language. Typically, though, you end up thinking in a very different way and only occasionally find yourself needing OO-like code.

3) Batteries included

Mathematica has got a ton of stuff built-in.

* It has a really quite killer image-processing library, for example (it bundles OpenCV to handle a lot of the more sophisticated stuff).

* It has great support for graphs -- which are first-class objects, not matrices that are to be interpreted as graphs. By support I mean almost all of the textbook graph algorithms, for example.

* It's got hierarchical clustering, common statistical tests, linear and logistic regression, etc

* It's got almost all of the commonly used statistics distributions, a lot of computation, and a limited degree of inference on them.

* It's got all the pure math you can eat, and plenty of numeric math.

* It's got more visualization and plotting than you'll know what to do with.

* It's got nonlinear optimizers and constraint satisfiers.

* It's got quite an unusual debugging system, that allows you to watch for certain patterns in your code as it executes (although no-one ends up using it because it is a bit alien).

* It's got a pretty robust layout engine (originally for typesetting math).

* It has a more-than-adequate set of graphics primitives built in, both 2D and 3D. Of course you use the same s-expression syntax to build your scene graph (well, tree), which makes it extremely easy to use (Graphics[Circle[]] displays a circle in your notebook, for example). The renderer is of really high quality.

* It's got what amounts to a GUI toolkit, so you can very quickly build an interactive UI with sliders and buttons and interactive graphics, again thanks to the symbolic nature of the language. Anything too ambitious will cause the frontend to unpredictably crash, so don't try to write a word processor.

4) Notebook interface.

You really do not know what you're missing until you've used it. Notebook interfaces are the future. I know iPython has an experimental one that my academic friends love.

Trust me, a REPL is a poor excuse for a notebook interface. The rest of the world will catch up, though, its an idea that is too good to hide.

5) Help system

I suppose it's up there with Visual Studio type of products. But it does have the nice feature that the documentation is actually all executable. It's quite nice to look up some function and then start mucking around with one of the examples live until it does what you want to do, and then you copy paste it into your notebook.

6) Good names

All the functions have rational, good names, with a uniform syntax. You can often predict a function that should exist, type the first few letters, press Cmd-K to autocomplete, and be pleasantly surprised that it does exist.

You won't find 3 different versions of a function, you'll find one version with sane defaults and optional named parameters that can customize that behavior.

--------

The only real downsides I can think of is that it doesn't have a first-class dictionary type, which can be annoying. Part of the reason it doesn't is that it wouldn't be LISPy, and there also weren't performant pure data structures (until Clojure came along). There is a fairly easy way to fake dictionaries using downvalues on anonymous symbols, but it doesn't feel idiomatic. A little bird tells me that proper dicts are coming in version 9 (using Bagwell's tries for performance).

Oh, and that it costs a chunk of change. I forget about that because I get it for free, because I work at Wolfram. Though in the R&D department at Wolfram|Alpha, not in the advertising department at Mathematica :).


NKS is BS, I fully agree. And Mathematica borrowed a lot from Macsyma, to put it mildly.

http://maxima.sourceforge.net/


Why can't he be both? A visionary lunatic.


This looks like a frontal assault on MATLAB Simulink. Knowing Stephen Wolfram's past works, I think this will turn out well.


Simulink was the major reason for choosing Matlab for a current project. Hope this move by Wolfram also results in improves for Simulink or in a lower price. It currently sells for around 6k.

Matlab+Simulink had no competing alternative until this.


This is simply a different view to model systems such as can be done in Simulink. Simulink has a (differential) equation-centric view whereas Modelica (of which SystemModeller is an implementation using the mathematical capabilities of Mathematica) has more an object-oriented view where external interfaces are exposed and connected and the behaviour as expressed by the differential equations is hidden. Modelica is a standardized language, see e.g. http://openmodelica.org for an open source implementation.

It is simply not true that there wasn't a Simulink alternative until now. Modelica exists since 1997 (cf. http://en.wikipedia.org/wiki/Modelica) and there are several commercial implementations of it: Dymola, MapleSim, MathModelica (which now in v3 has been purchased by Wolfram and has been rebranded as SystemModeller), CATIA Sytems and probably some more.

Adaption of Modelica has been slow since engineers are more exposed to Matlab/Simulink during their education and this base is slow to change. Considering license, training and experience costs this is certainly understandable. However, I know that several German car makers are gradually changing over to Modelica since the models are easier to understand for new people joining the projects (and to escape the vendor lock-in of Simulink).



Thanks, but I'm aware of Modelica and Scilab. In fact I have used them even more than Matlab, which I have only been using for about a month.

All the academic, hobbist and professional communities in what I'm doing use Matlab heavily and specifically. Available code/modules/"toolboxes" and support are severely lacking in Scilab and Modelica. I wish I had the time and the knowledge to contribute back but I currently don't.


Paired with the recent free online Model Thinking class, this could help introduce complexity concepts to beginners possibly ... $35 is nice for a semester license. I wonder if you could really expose a "swiss cheese" model of a problem situation? Anyway... complexity is of course complex, but not necessarily insurmountable or unknowable, so it is really wonderful that we're ever pushing the bar higher to educate about normal accidents and such (this has been the bane of my existence in stupid enterprise software sometimes :P)


Can enterprise software can benefit from this type of modeling? One company that uses modeling to make enterprise just had a significant update today: http://www.mendix.com/blog/mendix-spring-2012-release-its-he...

It seems like being able to model enterprise apps could be important for complex legacy systems.


Yes, in fact an up and coming discipline for this is called model based systems engineering - data driven, model based development of systems (including software systems). The main tool in this area is UML/SysML, but it looks like there is a Modelica-SysML transformation out there.

I would have liked to have seen an IT/network/software example on the SystemModeller examples page as this could be an interesting tool in that area.

Edit: just to point out, UML has been around for a while for this purpose, and SysML is an extension for development of systems in general not just software.


http://pathwaysystems.com Blueprints product (disclosure: I work there) is an Enterprise IT modeling system often used to model legacy systems or custom developed solutions. Wolfram's product looks to be designed for a much more technical audience than the typical sysadmin, network admin or developer. We have a simulation component in our product, but it's mainly the document/query/analyze/share/discuss/report use cases that deliver most of the value in the Enterprise IT setting.


Yep, its must be as awesome as Simulink. But in most real world examples you should use more basic programming languages in order to feel all process (handle discretization or numerical integration manually). In Simulink you connect couple block and thats it... everything important are hidden behind the scene.


It looks a good deal like MapleSim (http://www.maplesoft.com/products/maplesim/). Hopefully it's less unpleasant to use.


Well, since both are implementations of the Modelica standard I would guess they are pretty much the same, though I do not know MapleSim or your problems with it.


It was extremely difficult to model two interacting surfaces -- for example, a wheel rolling on a surface with friction.


Well, not my area, but a little googling brought up this: http://www.inf.ethz.ch/personal/cellier/MS/andres_ms.pdf (well, there goes my evening). I don't know, but I find the decomposition quite intuitive.


MapleSim only implements a subset of the Modelica standard.


if it's like Mathematica vs MATLAB, then it will be much less unpleasant to use. one of the reasons i like Mathematica is the consistent respect for UI/UX


Simulation does not comprehension create;

Reason there is modeling an art be.

"new generation of hybrid symbolic-numeric methods,"

a sense of B.S., this does alerts strongly in me.

- yoda


"Symbolic-numeric" could be BS, but I'm pretty sure it's not. What might be triggering your BS alarm is the "symbolic." However this word has a precise meaning, especially in Mathematica et al's case. It basically means "replacement rules on arbitrary expressions." For example, we could define a derivative rule in this kind of way:

  x^n -> n*x^(n-1)
If you have enough of these kinds of rules and a smart infrastructure around them, you can perform sophisticated "symbolic" calculations. The whole setup is similar in essence to a Lisp macro system. As a specific example, type the following into Mathematica (or WolframAlpha):

  E^(I 2 Pi)
The result you get is "1". Not "1.000001", not "1 in floating point", but "1" as an exact symbol. So when they say they are using "symbolic-numeric" methods, what they mean is that they are using a combination of exact mathematical calculations (exact according to pure mathematics - thus invariably symbolic) in combination with numeric approximation/heuristic methods


I use Maxima daily, so I get "symbolic". I called BS because they provide no details, no citations, nothing to make me think they have advanced over Maxima, or even GCC in terms of optimization of arbitrary computations.

Perhaps more importantly, just because one can build a model does not mean one will understand the model or the system be modeled. No software will provide us with good interpretations of our models and their output.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: