Exemplo n.º 1
0
# input 2 uncertainty
uxtemperature = [0.05] * 29

# Output data
y = [
    0.9, 0.886, 0.791, 0.787, 0.877, 0.938, 0.827, 0.696, 0.582, 0.795, 0.790,
    0.883, 0.576, 0.715, 0.673, 0.802, 0.804, 0.804, 0.764, 0.688, 0.802,
    0.695, 0.808, 0.309, 0.689, 0.437, 0.425, 0.659, 0.449
]
# output uncertainty
uy1 = [1] * 29

#%% Setting the observed data set

# inputs
Estime.setDados(0, (time, uxtime), (temperature, uxtemperature))
# output
Estime.setDados(1, (y, uy1))

# Defining the previous data set to be used to parameter estimation
# dataType: Defines the purpose of the informed data set: estimacao, predicao.
# glx: Degrees of freedom of quantity x;
# gly: Degrees of freedom of quantity y;
Estime.setConjunto(dataType='estimacao', glx=[], gly=[])

#%% Optimization - estimating the parameters
# initial_estimative: List with the initial estimates for the parameters;
# lower_bound: List with the lower bounds for the parameters;
# upper_bound: List with the upper bounds for the parameters;
# algorithm: Informs the optimization algorithm that will be used. Each algorithm has its own keywords;
# optimizationReport: Informs whether the optimization report should be created (True or False);
Exemplo n.º 2
0
# Output data
P = [
    2.93, 3.21, 3.49, 4.22, 5.60, 7.31, 9.12, 13.07, 14.98, 17.63, 18.02,
    22.08, 26.95, 34.61, 40.93, 50.17, 63.36, 78.93, 93.65, 115.11, 140.27,
    171.89, 208.00
]
# Output data uncertainty
uP = [
    0.08, 0.09, 0.09, 0.11, 0.17, 0.21, 0.25, 0.35, 0.40, 0.47, 0.48, 0.58,
    0.70, 0.89, 1.05, 1.28, 1.61, 2.00, 2.37, 2.90, 3.53, 4.32, 5.23
]

#%% Setting the observed data set
# inputs
Estimation.setDados(0, (T, uxT))
# outputs
Estimation.setDados(1, (P, uP))

# Defining the previous data set to be used to parameter estimation.
# dataType: Defines the purpose of the informed data set: estimacao, predicao.
Estimation.setConjunto(dataType='estimacao')

#%% Optimization - estimating the parameters,
# initial_estimative: List with the initial estimates for the parameters;
# algorithm: Informs the optimization algorithm that will be used. Each algorithm has its own keywords;
# optimizationReport: Informs whether the optimization report should be created (True or False);
# parametersReport: Informs whether the parameters report should be created (True or False).
Estimation.optimize(initial_estimative=[1, 1.5, 0.009],
                    algorithm='bonmin',
                    optimizationReport=True,
Exemplo n.º 3
0
    620.0, 620.0, 620.0, 620.0, 620.0, 620.0, 620.0, 620.0, 620.0, 620.0,
    620.0, 620.0, 620.0, 620.0, 620.0, 620.0, 620.0, 631.0, 631.0, 631.0,
    631.0, 631.0, 639.0, 639.0, 639.0, 639.0, 639.0, 639.0, 639.0, 639.0, 639.0
]

uy = [1] * 41
uxtempo = [1] * 41
uxtemperatura = [1] * 41

#Execução do MT_PEU
Estime = EstimacaoNaoLinear(Modelo,
                            simbolos_x=['t', 'T'],
                            simbolos_y=['y'],
                            simbolos_param=['ko', 'E'],
                            Folder='Exemplo1')
Estime.setDados(0, (tempo, uxtempo), (temperatura, uxtemperatura))
Estime.setDados(1, (y, uy))
Estime.setConjunto(tipo='estimacao')
Estime.optimize(initial_estimative=[0.5, 25000], algoritmo='ipopt')
Estime.incertezaParametros(metodoIncerteza='Geral' '')
Estime.predicao()

# Valores originais
hessian = array([[5.46625676e+00, -7.50116238e-03],
                 [-7.50116238e-03, 1.02960714e-05]])
sensibilidade = array([[-1.06335451e-01, 1.52826132e-04],
                       [-5.59353653e-02, 8.03907392e-05],
                       [-1.28132438e-01, 1.80542088e-04],
                       [-2.26100338e-01, 3.18581523e-04],
                       [-2.26100338e-01, 3.18581523e-04],
                       [-1.28132438e-01, 1.80542088e-04],
Exemplo n.º 4
0
ux2 = [1]*10

# Output data
# output 1
y1 = [1.66,6.07,7.55,9.72,15.24,18.79,19.33,22.38,24.27,25.51]
# output 1 uncertainty
uy1 = [1]*10
# output 2
y2 = [1.66,6.07,7.55,9.72,15.24,18.79,19.33,22.38,24.27,25.51]
# output 2 uncertainty
uy2 = [1]*10

#%% Setting the observed data set

# inputs
Estime.setDados(0, (x1, ux1), (x2, ux2))
# outputs
Estime.setDados(1, (y1, uy1), (y2, uy2))

# Defining the previous data set to be used to parameter estimation
# dataType: Defines the purpose of the informed data set: estimacao, predicao.
# glx: Degrees of freedom of quantity x;
# gly: Degrees of freedom of quantity y;
Estime.setConjunto(dataType='estimacao', glx=[], gly=[])

#%% Optimization - estimating the parameters
# initial_estimative: List with the initial estimates for the parameters;
# lower_bound: List with the lower bounds for the parameters;
# upper_bound: List with the upper bounds for the parameters;
# algorithm: Informs the optimization algorithm that will be used. Each algorithm has its own keywords;
# optimizationReport: Informs whether the optimization report should be created (True or False);
Exemplo n.º 5
0
# Output data
P = [
    2.93, 3.21, 3.49, 4.22, 5.60, 7.31, 9.12, 13.07, 14.98, 17.63, 18.02,
    22.08, 26.95, 34.61, 40.93, 50.17, 63.36, 78.93, 93.65, 115.11, 140.27,
    171.89, 208.00
]
# Output data uncertainty
uP = [
    0.08, 0.09, 0.09, 0.11, 0.17, 0.21, 0.25, 0.35, 0.40, 0.47, 0.48, 0.58,
    0.70, 0.89, 1.05, 1.28, 1.61, 2.00, 2.37, 2.90, 3.53, 4.32, 5.23
]

#%% Setting the observed data set
# inputs
Estimation.setDados(0, (T, uT))
# outputs
Estimation.setDados(1, (P, uP))

# Defining the previous data set to be used to parameter estimation
# dataType: Defines the purpose of the informed data set: estimacao, predicao.
# glx: Degrees of freedom of quantity x;
# gly: Degrees of freedom of quantity y;
Estimation.setConjunto(dataType='estimacao', glx=[], gly=[])

#%% Optimization - estimating the parameters
# initial_estimative: List with the initial estimates for the parameters;
# lower_bound: List with the lower bounds for the parameters;
# algorithm: Informs the optimization algorithm that will be used. Each algorithm has its own keywords;
# optimizationReport: Informs whether the optimization report should be created (True or False);
# parametersReport: Informs whether the parameters report should be created (True or False).