Modelica类图 [英] Modelica class diagrams

查看:94
本文介绍了Modelica类图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种可以从Modelica代码中自动创建此类图的工具:
。此外,该函数采用与Graph相同的参数,因此,您可以根据需要获得不同的图形布局。


I am looking for a tool that can (automatically) create class diagrams like this one from Modelica code: https://trac.modelica.org/Modelica/attachment/ticket/85/classDiagramModelicaMedia.png
I need to create a couple of such diagrams and an automated solution would help a lot!
So far, I found this article about Modelica CDV (class diagram viewer):
https://www.modelica.org/events/modelica2006/Proceedings/sessions/Session1c1.pdf
but not a ready to use tool. Any ideas?

解决方案

This can be done with SystemModeler and Mathematica. The relevant function is a little bit hidden, but it's there. Here's an example:

WSMLink`Library`WSMDependencyGraph["Modelica.Mechanics.Rotational.Components.Spring"]

When hovering over the classes, the full name appears:

The object returned from the function includes a Graph, so you can operate on it with all the graph functionality in Mathematica. Also the function takes the same arguments as Graph, so you can get different graph layouts if needed.

这篇关于Modelica类图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆