actualizacion de codigo
This commit is contained in:
parent
a537276a78
commit
210e9074f0
17
genCurvas.py
17
genCurvas.py
@ -2,8 +2,14 @@ import numpy as np
|
|||||||
import pandas as pd
|
import pandas as pd
|
||||||
import json
|
import json
|
||||||
|
|
||||||
def valores_objetivo():
|
def valores_objetivo(archivo, material):
|
||||||
pass
|
carga = pd.read_excel(archivo, sheet_name='carga', engine='openpyxl').dropna()
|
||||||
|
|
||||||
|
E = np.mean(carga.loc[carga['material'] == material, ['V1', 'V2']].values, axis=1)
|
||||||
|
I = np.mean(carga.loc[carga['material'] == material, ['I1', 'I2']].values, axis=1)
|
||||||
|
f = np.array(carga['f'][carga['material'] == material])
|
||||||
|
|
||||||
|
return E, I, f
|
||||||
|
|
||||||
def generar_curva(offset):
|
def generar_curva(offset):
|
||||||
muVacio = 4 * np.pi * 1e-7
|
muVacio = 4 * np.pi * 1e-7
|
||||||
@ -25,13 +31,8 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
archivo = 'Ensayos.xlsx'
|
archivo = 'Ensayos.xlsx'
|
||||||
material = 'PLACOND'
|
material = 'PLACOND'
|
||||||
masIter = 10000
|
|
||||||
|
|
||||||
carga = pd.read_excel(archivo, sheet_name='carga', engine='openpyxl').dropna()
|
Eobjetivo, Iobjetivo, fObjetivo = valores_objetivo(archivo, material)
|
||||||
|
|
||||||
Eobjetivo = np.mean(carga.loc[carga['material'] == material, ['V1', 'V2']].values, axis=1)
|
|
||||||
Iobjetivo = np.mean(carga.loc[carga['material'] == material, ['I1', 'I2']].values, axis=1)
|
|
||||||
fObjetivo = np.array(carga['f'][carga['material'] == material])
|
|
||||||
|
|
||||||
errorObjetivo = 0.01 # +- cuanto % puede haber de diferencia
|
errorObjetivo = 0.01 # +- cuanto % puede haber de diferencia
|
||||||
errorCVobjetivo = 1
|
errorCVobjetivo = 1
|
||||||
|
Loading…
Reference in New Issue
Block a user