Browse Source

Add rendering of trace plot

Yentl Van Tendeloo 3 years ago
parent
commit
1e8bf73774
2 changed files with 19 additions and 1 deletions
  1. 18 0
      examples/render_DTCBD_plot.py
  2. 1 1
      wrappers/modelverse_SCCD.py

+ 18 - 0
examples/render_DTCBD_plot.py

@@ -0,0 +1,18 @@
+import sys
+sys.path.append("wrappers")
+from modelverse import *
+
+init()
+login("admin", "admin")
+
+model_add("formalisms/Trace", "formalisms/SimpleClassDiagrams", open("models/Signal/metamodels/trace.mvc", 'r').read())
+model_add("models/trace", "formalisms/Trace", open("models/Signal/models/spring.mvc", 'r').read())
+
+model_add("formalisms/MM_render/plot", "formalisms/SimpleClassDiagrams", open("models/render/metamodels/plot.mvc", 'r').read())
+
+def add_trace_trace(model):
+    instantiate(model, "Association", ("abstract/Signal", "rendered/Dataset"), ID="TracabilityLink")
+
+transformation_add_MT({"abstract": "formalisms/Trace", "rendered": "formalisms/MM_render/plot"}, {"rendered": "formalisms/MM_render/plot"}, "models/trace_mapper", open("models/Signal/transformations/render.mvc", 'r').read(), add_trace_trace)
+
+print(model_render("models/trace", "models/trace_mapper", "perceptualized/Trace_model"))

+ 1 - 1
wrappers/modelverse_SCCD.py

@@ -1,7 +1,7 @@
 """
 Generated by Statechart compiler by Glenn De Jonghe, Joeri Exelmans, Simon Van Mierlo, and Yentl Van Tendeloo (for the inspiration)
 
-Date:   Thu May 17 14:11:26 2018
+Date:   Thu May 17 14:16:41 2018
 
 Model author: Yentl Van Tendeloo
 Model name:   MvK Server