Translate graph labels and titles to PT
@@ -41,10 +41,10 @@ dwelling_times = [
|
||||
medium['TempoMédioSistema'].mean(),
|
||||
high['TempoMédioSistema'].mean()
|
||||
]
|
||||
plt.bar(['Low', 'Medium', 'High'], dwelling_times, color=['green', 'orange', 'red'])
|
||||
plt.ylabel('Average Dwelling Time (s)')
|
||||
plt.title('System Performance vs Load')
|
||||
plt.xlabel('Load Scenario')
|
||||
plt.bar(['Baixa', 'Média', 'Alta'], dwelling_times, color=['green', 'orange', 'red'])
|
||||
plt.ylabel('Tempo Médio no Sistema (s)')
|
||||
plt.title('Desempenho do Sistema vs Carga')
|
||||
plt.xlabel('Cenário de Carga')
|
||||
plt.grid(axis='y', alpha=0.3)
|
||||
for i, v in enumerate(dwelling_times):
|
||||
plt.text(i, v + 1, f'{v:.2f}s', ha='center', va='bottom')
|
||||
@@ -59,10 +59,10 @@ completion_rates = [
|
||||
medium['TaxaConclusão'].mean(),
|
||||
high['TaxaConclusão'].mean()
|
||||
]
|
||||
plt.bar(['Low', 'Medium', 'High'], completion_rates, color=['green', 'orange', 'red'])
|
||||
plt.ylabel('Completion Rate (%)')
|
||||
plt.title('Vehicle Completion Rate vs Load')
|
||||
plt.xlabel('Load Scenario')
|
||||
plt.bar(['Baixa', 'Média', 'Alta'], completion_rates, color=['green', 'orange', 'red'])
|
||||
plt.ylabel('Taxa de Conclusão (%)')
|
||||
plt.title('Taxa de Conclusão de Veículos vs Carga')
|
||||
plt.xlabel('Cenário de Carga')
|
||||
plt.grid(axis='y', alpha=0.3)
|
||||
plt.ylim(0, 100)
|
||||
for i, v in enumerate(completion_rates):
|
||||
@@ -78,10 +78,10 @@ waiting_times = [
|
||||
medium['TempoMédioEspera'].mean(),
|
||||
high['TempoMédioEspera'].mean()
|
||||
]
|
||||
plt.bar(['Low', 'Medium', 'High'], waiting_times, color=['green', 'orange', 'red'])
|
||||
plt.ylabel('Average Waiting Time (s)')
|
||||
plt.title('Average Waiting Time vs Load')
|
||||
plt.xlabel('Load Scenario')
|
||||
plt.bar(['Baixa', 'Média', 'Alta'], waiting_times, color=['green', 'orange', 'red'])
|
||||
plt.ylabel('Tempo Médio de Espera (s)')
|
||||
plt.title('Tempo Médio de Espera vs Carga')
|
||||
plt.xlabel('Cenário de Carga')
|
||||
plt.grid(axis='y', alpha=0.3)
|
||||
for i, v in enumerate(waiting_times):
|
||||
plt.text(i, v + 1, f'{v:.2f}s', ha='center', va='bottom')
|
||||
@@ -91,44 +91,44 @@ plt.close()
|
||||
|
||||
# 4. Gráfico: Summary Statistics
|
||||
fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2, figsize=(14, 10))
|
||||
loads = ['Low', 'Medium', 'High']
|
||||
loads = ['Baixa', 'Média', 'Alta']
|
||||
|
||||
# Vehicles generated
|
||||
ax1.bar(loads, [low['VeículosGerados'].mean(), medium['VeículosGerados'].mean(), high['VeículosGerados'].mean()], color=['green', 'orange', 'red'])
|
||||
ax1.set_title('Vehicles Generated')
|
||||
ax1.set_ylabel('Count')
|
||||
ax1.set_title('Veículos Gerados')
|
||||
ax1.set_ylabel('Quantidade')
|
||||
ax1.grid(axis='y', alpha=0.3)
|
||||
|
||||
# Vehicles completed
|
||||
ax2.bar(loads, [low['VeículosCompletados'].mean(), medium['VeículosCompletados'].mean(), high['VeículosCompletados'].mean()], color=['green', 'orange', 'red'])
|
||||
ax2.set_title('Vehicles Completed')
|
||||
ax2.set_ylabel('Count')
|
||||
ax2.set_title('Veículos Concluídos')
|
||||
ax2.set_ylabel('Quantidade')
|
||||
ax2.grid(axis='y', alpha=0.3)
|
||||
|
||||
# Min/Max dwelling time
|
||||
x = range(3)
|
||||
width = 0.35
|
||||
ax3.bar([i - width/2 for i in x], [low['TempoMínimoSistema'].mean(), medium['TempoMínimoSistema'].mean(), high['TempoMínimoSistema'].mean()], width, label='Min', color='lightblue')
|
||||
ax3.bar([i + width/2 for i in x], [low['TempoMáximoSistema'].mean(), medium['TempoMáximoSistema'].mean(), high['TempoMáximoSistema'].mean()], width, label='Max', color='darkblue')
|
||||
ax3.set_title('Min/Max Dwelling Time')
|
||||
ax3.set_ylabel('Time (s)')
|
||||
ax3.bar([i - width/2 for i in x], [low['TempoMínimoSistema'].mean(), medium['TempoMínimoSistema'].mean(), high['TempoMínimoSistema'].mean()], width, label='Mín', color='lightblue')
|
||||
ax3.bar([i + width/2 for i in x], [low['TempoMáximoSistema'].mean(), medium['TempoMáximoSistema'].mean(), high['TempoMáximoSistema'].mean()], width, label='Máx', color='darkblue')
|
||||
ax3.set_title('Tempo no Sistema Mín/Máx')
|
||||
ax3.set_ylabel('Tempo (s)')
|
||||
ax3.set_xticks(x)
|
||||
ax3.set_xticklabels(loads)
|
||||
ax3.legend()
|
||||
ax3.grid(axis='y', alpha=0.3)
|
||||
|
||||
# Performance summary
|
||||
metrics = ['Dwelling\nTime', 'Waiting\nTime', 'Completion\nRate']
|
||||
metrics = ['Tempo no\nSistema', 'Tempo de\nEspera', 'Taxa de\nConclusão']
|
||||
low_vals = [low['TempoMédioSistema'].mean(), low['TempoMédioEspera'].mean(), low['TaxaConclusão'].mean()]
|
||||
med_vals = [medium['TempoMédioSistema'].mean(), medium['TempoMédioEspera'].mean(), medium['TaxaConclusão'].mean()]
|
||||
high_vals = [high['TempoMédioSistema'].mean(), high['TempoMédioEspera'].mean(), high['TaxaConclusão'].mean()]
|
||||
|
||||
x = range(len(metrics))
|
||||
width = 0.25
|
||||
ax4.bar([i - width for i in x], low_vals, width, label='Low', color='green')
|
||||
ax4.bar(x, med_vals, width, label='Medium', color='orange')
|
||||
ax4.bar([i + width for i in x], high_vals, width, label='High', color='red')
|
||||
ax4.set_title('Performance Summary')
|
||||
ax4.bar([i - width for i in x], low_vals, width, label='Baixa', color='green')
|
||||
ax4.bar(x, med_vals, width, label='Média', color='orange')
|
||||
ax4.bar([i + width for i in x], high_vals, width, label='Alta', color='red')
|
||||
ax4.set_title('Resumo de Desempenho')
|
||||
ax4.set_xticks(x)
|
||||
ax4.set_xticklabels(metrics)
|
||||
ax4.legend()
|
||||
|
||||
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 198 KiB After Width: | Height: | Size: 215 KiB |
|
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 86 KiB |