-
Notifications
You must be signed in to change notification settings - Fork 1
/
unlucky.py
33 lines (24 loc) · 846 Bytes
/
unlucky.py
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
28
29
30
31
32
33
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 3 15:50:49 2019
@author: simsim
"""
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 3 15:25:36 2019
@author: simsim
"""
from system import *
#unlucky from Doron's paper
def create(model):
plant = process("plant",["g1","g2"],[],[],"g1")
environment = process("environment",["e1","e2","e3","e4","e5"],[],[],"e1")
pve = plant_environment("syst",plant,environment,model = model)
pve.add_transition("a",["plant","environment"],[["g1"],["e2","e3"]],[["g2"],["e4","e5"]])
pve.add_transition("b",["plant","environment"],[["g2"],["e1","e4"]],[["g1"],["e2","e2"]])
pve.add_transition("c",["plant","environment"],[["g2"],["e1","e5"]],[["g1"],["e3","e3"]])
pve.create_RNN()
pve.reinitialize()
return pve