Unit testing Modelica component library?

前端 未结 4 457
傲寒
傲寒 2021-02-06 07:27

I\'m creating a library of components in Modelica, and would appreciate some input on techniques for unit testing the package.

So far I have a test package, consisting o

4条回答
  •  生来不讨喜
    2021-02-06 08:03

    If you have Mathematica and SystemModeler you can run the simulation from Mathematica and use the VerificationTest "function" to test: VerificationTest[Abs[WSMSimulate["HelloWorld"]["x", .1] - .90] < .01].

    Multiple tests can then be simulated in a TestReport[].

提交回复
热议问题