-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
28 lines (22 loc) · 845 Bytes
/
main.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
import numpy as np
from getFuzzyInput_frk import getFuzzyInput_frk
from getFuzzyInput_anc import getFuzzyInput_anc
from inference import inference
def doFuzzy(x_frk,x_anc):
# satuan dalam detik
x_frk = int(x_frk)
# array_fuzzyInput = matriks 2x4
array_fuzzyInput = np.zeros(shape=(2,4))
array_frk = np.array([getFuzzyInput_frk(x_frk)])
array_anc = np.array([getFuzzyInput_anc(x_anc)])
array_fuzzyInput[0,0] = array_frk[0][0][0]
array_fuzzyInput[0,1] = array_frk[0][0][1]
array_fuzzyInput[0,2] = array_anc[0][0][0]
array_fuzzyInput[0,3] = array_anc[0][0][1]
array_fuzzyInput[1,0] = array_frk[0][1][0]
array_fuzzyInput[1,1] = array_frk[0][1][1]
array_fuzzyInput[1,2] = array_anc[0][1][0]
array_fuzzyInput[1,3] = array_anc[0][1][1]
crispValue = inference(array_fuzzyInput)
# satuan dalam detik
print int(round(crispValue))