File: t_Study_refCount.py

package info (click to toggle)
persalys 13.1.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 71,916 kB
  • sloc: xml: 496,859; cpp: 53,848; python: 3,435; sh: 332; makefile: 131; ansic: 14
file content (26 lines) | stat: -rw-r--r-- 592 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env python


import persalys


def test():

    Study_0 = persalys.Study("Study_0")
    persalys.Study.Add(Study_0)
    X0 = persalys.Input("X0", 0, "")
    Y0 = persalys.Output("Y0", "")
    Y0.setValue(0)
    inputCollection = []
    inputCollection.append(X0)
    outputCollection = []
    outputCollection.append(Y0)
    code = "def _exec(X0):\n    Y0 = X0\n    return Y0"
    PhysicalModel_0 = persalys.PythonPhysicalModel(
        "PhysicalModel_0", inputCollection, outputCollection, code
    )
    Study_0.add(PhysicalModel_0)
    print(Study_0.getPythonScript())


test()