File: t_Study_refCount.py

package info (click to toggle)
persalys 19.1%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 46,900 kB
  • sloc: xml: 97,263; cpp: 61,701; python: 4,109; sh: 397; makefile: 84
file content (27 lines) | stat: -rw-r--r-- 632 bytes parent folder | download | duplicates (2)
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
27
#!/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
    )
    PhysicalModel_0.setProcessNumber(1)
    Study_0.add(PhysicalModel_0)
    print(Study_0.getPythonScript())


test()