ajustes + debug
This commit is contained in:
parent
4db7ca0186
commit
f938e18763
14
genCurvas.py
14
genCurvas.py
@ -52,7 +52,7 @@ def logica_offset(offset, error, errorObjetivo):
|
|||||||
limSup = 1 + errorObjetivo
|
limSup = 1 + errorObjetivo
|
||||||
limInf = 1 - errorObjetivo
|
limInf = 1 - errorObjetivo
|
||||||
|
|
||||||
delta = random.random()/10000000
|
delta = random.random() * 1e-6
|
||||||
|
|
||||||
if error <= limSup and error >= limInf: return True, None
|
if error <= limSup and error >= limInf: return True, None
|
||||||
|
|
||||||
@ -82,21 +82,21 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
offset = 0
|
offset = 0
|
||||||
|
|
||||||
E = 1
|
B = 1e-2
|
||||||
EObjetivo = 1.4
|
BObjetivo = 2e-2
|
||||||
|
|
||||||
errorObjetivo = 0.1
|
errorObjetivo = 0.01
|
||||||
|
|
||||||
flag = False
|
flag = False
|
||||||
|
|
||||||
while flag == False:
|
while flag == False:
|
||||||
os.system('cls')
|
os.system('cls')
|
||||||
|
|
||||||
E = E + offset
|
B = B + offset
|
||||||
|
|
||||||
error = E/EObjetivo
|
error = B/BObjetivo
|
||||||
|
|
||||||
print(E)
|
print(B)
|
||||||
print(error)
|
print(error)
|
||||||
|
|
||||||
flag, offset = logica_offset(offset, error, errorObjetivo)
|
flag, offset = logica_offset(offset, error, errorObjetivo)
|
||||||
|
Loading…
Reference in New Issue
Block a user