소스 검색

Added explanation about using the modelling language in the Modelverse

Yentl Van Tendeloo 8 년 전
부모
커밋
c8af20e1b5
1개의 변경된 파일16개의 추가작업 그리고 0개의 파일을 삭제
  1. 16 0
      doc/modeller_modellanguage.rst

+ 16 - 0
doc/modeller_modellanguage.rst

@@ -168,3 +168,19 @@ It is possible to define include statements at the top of the model, in which ca
                 return !
             $
     }
+
+Using the Model Representation
+------------------------------
+
+The question remains how to use this model representation with the Modelverse.
+The *model_add* operation can be extended with an additional parameter, specifying a textual model.
+It will then create a new model and initialize it with the model specified textually::
+
+    >>> model_add("my_pn", "PetriNets", open("my_pn.mvc", "r").read())
+
+Another function that can be used, is the *model_overwrite* function, which overwrites an existing model with the content of the provided textual model::
+
+    >>> model_overwrite("my_pn", "PetriNets", open("my_pn.mvc", "r").read())
+
+Note that *model_overwrite* can also be used without the textual model parameter, in which case it will clear the specified model.
+That is, overwrite the model with an empty model.