Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4b90827c2a | |||
| 61277350d8 | |||
| 7af3fb558b | |||
| a360dc708e | |||
| 3250d5a433 | |||
| 65cb0b52f6 | |||
| 87a8a1bcb6 | |||
| bce15fe90f | |||
| 542ce9c8c0 | |||
| 3a3756f701 | |||
|
|
b624cfe11e | ||
|
|
8fe4e564d3 | ||
|
|
e389c0711e | ||
| 1b6ad03057 | |||
|
|
24fe1c1d67 | ||
|
|
766eabbbe4 | ||
|
|
d7b1de1fe3 | ||
|
|
96b3a66b96 | ||
|
|
29848b04a6 | ||
| 043ba7d185 | |||
| 25f2876c34 | |||
| 7cbecc4fab | |||
| 72db59415f | |||
| 60b4f0c2b6 | |||
| 81f842e2bb | |||
|
|
108d2e544c |
110
.$Diagrama de arquitetura - SD.drawio.bkp
Normal file
@@ -0,0 +1,110 @@
|
||||
<mxfile host="Electron" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/29.0.3 Chrome/140.0.7339.249 Electron/38.7.0 Safari/537.36" version="29.0.3">
|
||||
<diagram name="Arquitetura SD" id="QKeTeUWuUs8JeLsq44d-">
|
||||
<mxGraphModel dx="1426" dy="841" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1654" pageHeight="1169" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0" />
|
||||
<mxCell id="1" parent="0" />
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-1" value="<b>CoordinatorProcess</b><br>(Cliente Socket)<hr>• VehicleGenerator<br>• Modelo Poisson (λ=0.5)<br>• Liga a Cr1-Cr5" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;align=left;verticalAlign=top;spacing=10;fontColor=#000000;" parent="1" vertex="1">
|
||||
<mxGeometry x="560" y="40" width="240" height="100" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-2" value="<b>Cr1</b> (IntersectionProcess)<br>Porta: 8001<br>Servidor + Cliente<hr>• ServerSocket (8001)<br>• Thread Semáforo Sul<br>• Thread Semáforo Este<br>• Thread Semáforo Oeste<br>• Fila Eventos (DES)<br>• ReentrantLock" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;align=left;verticalAlign=top;spacing=10;fontColor=#000000;" parent="1" vertex="1">
|
||||
<mxGeometry x="280" y="200" width="180" height="160" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-3" value="<b>Cr2</b> (IntersectionProcess)<br>Porta: 8002<br>Servidor + Cliente<hr>• ServerSocket (8002)<br>• Thread Semáforo Sul<br>• Thread Semáforo Este<br>• Thread Semáforo Oeste<br>• Fila Eventos (DES)<br>• ReentrantLock" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;align=left;verticalAlign=top;spacing=10;fontColor=#000000;" parent="1" vertex="1">
|
||||
<mxGeometry x="590" y="190" width="180" height="160" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-5" value="<b>Cr4</b> (IntersectionProcess)<br>Porta: 8004<br>Servidor + Cliente<hr>• ServerSocket (8004)<br>• Thread Semáforo Sul<br>• Thread Semáforo Este<br>• Thread Semáforo Oeste<br>• Fila Eventos (DES)<br>• ReentrantLock" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;align=left;verticalAlign=top;spacing=10;fontColor=#000000;" parent="1" vertex="1">
|
||||
<mxGeometry x="440" y="530" width="180" height="160" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-6" value="<b>Cr5</b> (IntersectionProcess)<br>Porta: 8005<br>Servidor + Cliente<hr>• ServerSocket (8005)<br>• Thread Semáforo Sul<br>• Thread Semáforo Este<br>• Thread Semáforo Oeste<br>• Fila Eventos (DES)<br>• ReentrantLock" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;align=left;verticalAlign=top;spacing=10;fontColor=#000000;" parent="1" vertex="1">
|
||||
<mxGeometry x="910" y="430" width="180" height="160" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-7" value="<b>ExitNode (S)</b><br>Porta: 9001<br>Servidor Socket<hr>• Recebe veículos finais<br>• Calcula estatísticas:<br> - Tempo no sistema<br> - Tempo de espera<br> - Métricas por tipo<br>• Envia para Dashboard" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;align=left;verticalAlign=top;spacing=10;fontColor=#000000;" parent="1" vertex="1">
|
||||
<mxGeometry x="727" y="810" width="200" height="170" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-8" value="<b>DashboardServer</b><br>Porta: 9000<br>Servidor Socket<hr>• Thread Pool (10 threads)<br>• ConcurrentHashMap<br>• Agrega estatísticas<br>• Display a cada 5s:<br> - Throughput<br> - Tempos médios<br> - Tamanhos de filas" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;align=left;verticalAlign=top;spacing=10;fontColor=#000000;" parent="1" vertex="1">
|
||||
<mxGeometry x="1210" y="585" width="200" height="160" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-9" value="VEHICLE_SPAWN<br>(Vehicle)" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#0000FF;strokeWidth=2;" parent="1" source="0K4eb2koB2xQ8duQ1-_a-1" target="0K4eb2koB2xQ8duQ1-_a-2" edge="1">
|
||||
<mxGeometry x="-0.2105" relative="1" as="geometry">
|
||||
<mxPoint as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-10" value="VEHICLE_SPAWN<br>(Vehicle)" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#0000FF;strokeWidth=2;" parent="1" source="0K4eb2koB2xQ8duQ1-_a-1" target="0K4eb2koB2xQ8duQ1-_a-3" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-11" value="VEHICLE_SPAWN<br>(Vehicle)" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#0000FF;strokeWidth=2;" parent="1" source="0K4eb2koB2xQ8duQ1-_a-1" target="0K4eb2koB2xQ8duQ1-_a-4" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-12" value="VEHICLE_TRANSFER" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#00AA00;strokeWidth=2;endArrow=classic;startArrow=classic;" parent="1" source="0K4eb2koB2xQ8duQ1-_a-2" target="0K4eb2koB2xQ8duQ1-_a-3" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-13" value="VEHICLE_TRANSFER" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#00AA00;strokeWidth=2;endArrow=classic;startArrow=classic;" parent="1" source="0K4eb2koB2xQ8duQ1-_a-3" target="0K4eb2koB2xQ8duQ1-_a-4" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-14" value="VEHICLE_TRANSFER" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#00AA00;strokeWidth=2;endArrow=classic;startArrow=classic;" parent="1" source="0K4eb2koB2xQ8duQ1-_a-2" target="0K4eb2koB2xQ8duQ1-_a-5" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-15" value="VEHICLE_TRANSFER" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#00AA00;strokeWidth=2;endArrow=classic;startArrow=classic;" parent="1" source="0K4eb2koB2xQ8duQ1-_a-3" target="0K4eb2koB2xQ8duQ1-_a-5" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-16" value="VEHICLE_TRANSFER" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#00AA00;strokeWidth=2;endArrow=classic;startArrow=classic;" parent="1" source="0K4eb2koB2xQ8duQ1-_a-5" target="0K4eb2koB2xQ8duQ1-_a-6" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-17" value="VEHICLE_TRANSFER" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#00AA00;strokeWidth=2;endArrow=classic;startArrow=none;startFill=0;" parent="1" source="0K4eb2koB2xQ8duQ1-_a-4" target="0K4eb2koB2xQ8duQ1-_a-6" edge="1">
|
||||
<mxGeometry x="0.3659" relative="1" as="geometry">
|
||||
<mxPoint as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-18" value="VEHICLE_TRANSFER" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#FF6600;strokeWidth=2;" parent="1" source="0K4eb2koB2xQ8duQ1-_a-5" target="0K4eb2koB2xQ8duQ1-_a-7" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-19" value="VEHICLE_TRANSFER" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#FF6600;strokeWidth=2;" parent="1" source="0K4eb2koB2xQ8duQ1-_a-6" target="0K4eb2koB2xQ8duQ1-_a-7" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-20" value="STATS_UPDATE<br>(periódico 5s)" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9933FF;strokeWidth=2;dashed=1;" parent="1" source="0K4eb2koB2xQ8duQ1-_a-2" target="0K4eb2koB2xQ8duQ1-_a-8" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-21" value="STATS_UPDATE<br>(periódico 5s)" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9933FF;strokeWidth=2;dashed=1;" parent="1" source="0K4eb2koB2xQ8duQ1-_a-4" target="0K4eb2koB2xQ8duQ1-_a-8" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-22" value="STATS_UPDATE<br>(periódico 5s)" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9933FF;strokeWidth=2;dashed=1;" parent="1" source="0K4eb2koB2xQ8duQ1-_a-4" target="0K4eb2koB2xQ8duQ1-_a-8" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-23" value="STATS_UPDATE<br>(periódico 5s)" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9933FF;strokeWidth=2;dashed=1;" parent="1" source="0K4eb2koB2xQ8duQ1-_a-5" target="0K4eb2koB2xQ8duQ1-_a-8" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-24" value="STATS_UPDATE<br>(periódico 5s)" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9933FF;strokeWidth=2;dashed=1;" parent="1" source="0K4eb2koB2xQ8duQ1-_a-6" target="0K4eb2koB2xQ8duQ1-_a-8" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-25" value="STATS_UPDATE<br>(periódico 5s)" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9933FF;strokeWidth=2;dashed=1;" parent="1" source="0K4eb2koB2xQ8duQ1-_a-26" target="0K4eb2koB2xQ8duQ1-_a-8" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-27" value="<b>MessageProtocol</b><hr>interface:<br>• getType()<br>• getPayload()<br>• getSourceNode()<br>• getDestinationNode()" style="rounded=0;whiteSpace=wrap;html=1;align=left;verticalAlign=top;fillColor=#fff2cc;strokeColor=#d6b656;spacing=10;fontColor=#000000;" parent="1" vertex="1">
|
||||
<mxGeometry x="30" y="30" width="180" height="120" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-28" value="<b>Tipos de Mensagens</b><hr>• VEHICLE_TRANSFER<br>• VEHICLE_SPAWN<br>• STATS_UPDATE<br>• TRAFFIC_LIGHT_SYNC<br>• HEARTBEAT" style="rounded=0;whiteSpace=wrap;html=1;align=left;verticalAlign=top;fillColor=#fff2cc;strokeColor=#d6b656;spacing=10;fontColor=#000000;" parent="1" vertex="1">
|
||||
<mxGeometry x="20" y="170" width="200" height="120" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-29" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9933FF;strokeWidth=2;dashed=1;" parent="1" source="0K4eb2koB2xQ8duQ1-_a-3" target="0K4eb2koB2xQ8duQ1-_a-4" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="480" y="280" as="sourcePoint" />
|
||||
<mxPoint x="990" y="440" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-4" value="<b>Cr3</b> (IntersectionProcess)<br>Porta: 8003<br>Servidor + Cliente<hr>• ServerSocket (8003)<br>• Thread Semáforo Sul<br>• Thread Semáforo Este<br>• Thread Semáforo Oeste<br>• Fila Eventos (DES)<br>• ReentrantLock" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;align=left;verticalAlign=top;spacing=10;fontColor=#000000;" parent="1" vertex="1">
|
||||
<mxGeometry x="910" y="200" width="180" height="160" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-30" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9933FF;strokeWidth=2;dashed=1;" parent="1" source="0K4eb2koB2xQ8duQ1-_a-7" target="0K4eb2koB2xQ8duQ1-_a-26" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="500" y="710" as="sourcePoint" />
|
||||
<mxPoint x="1090" y="520" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-26" value="<b>LEGENDA</b><hr>━━━► Comunicação síncrona<br>╌╌╌► Comunicação periódica<br><br><b>Cores:</b><br>🔵 Azul = Geração<br>🟢 Verde = Transferência<br>🟠 Laranja = Finalização<br>🟣 Roxo = Monitorização<br><br><b>Serialização:</b> JSON (Gson)<br><b>Protocolo:</b> TCP/IP" style="rounded=0;whiteSpace=wrap;html=1;align=left;verticalAlign=top;fillColor=#f5f5f5;strokeColor=#666666;fontColor=#333333;spacing=10;" parent="1" vertex="1">
|
||||
<mxGeometry x="1210" y="825" width="200" height="220" as="geometry" />
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
||||
4
.github/workflows/maven.yml
vendored
@@ -3,7 +3,7 @@ name: Java CI with Maven
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [ "dev", "cleanup" ]
|
||||
branches: [ "main", "dev", "cleanup" ]
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
pull_request:
|
||||
@@ -77,7 +77,7 @@ jobs:
|
||||
publish-release:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build, build-windows]
|
||||
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
|
||||
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/main'
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
|
||||
2
.gitignore
vendored
@@ -56,4 +56,4 @@ build/
|
||||
dependency-reduced-pom.xml
|
||||
|
||||
# Python env
|
||||
venv/
|
||||
venv/
|
||||
|
||||
@@ -1,24 +1,168 @@
|
||||
<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" version="28.2.7">
|
||||
<diagram name="Página-1" id="B1_hHcevBzWlEwI7FSV6">
|
||||
<mxGraphModel dx="778" dy="476" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
||||
<mxfile host="Electron" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/29.0.3 Chrome/140.0.7339.249 Electron/38.7.0 Safari/537.36" version="29.0.3">
|
||||
<diagram name="Arquitetura SD" id="QKeTeUWuUs8JeLsq44d-">
|
||||
<mxGraphModel dx="1426" dy="841" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0" />
|
||||
<mxCell id="1" parent="0" />
|
||||
<mxCell id="vcp7vux32DhQR4tKQhnF-8" value="Dashboard" style="sketch=0;pointerEvents=1;shadow=0;dashed=0;html=1;strokeColor=#C73500;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;align=center;fillColor=#fa6800;shape=mxgraph.mscae.oms.dashboard;fontColor=#000000;" vertex="1" parent="1">
|
||||
<mxGeometry x="389" y="230" width="50" height="41" as="geometry" />
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-27" value="<b>MessageProtocol</b><hr>interface:<br>• getType()<br>• getPayload()<br>• getSourceNode()<br>• getDestinationNode()" style="rounded=0;whiteSpace=wrap;html=1;align=left;verticalAlign=top;fillColor=#fff2cc;strokeColor=#d6b656;spacing=10;fontColor=#000000;" parent="1" vertex="1">
|
||||
<mxGeometry x="30" y="30" width="180" height="120" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="vcp7vux32DhQR4tKQhnF-12" value="Semaforo.java" style="shape=image;html=1;verticalAlign=top;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;imageAspect=0;aspect=fixed;image=https://icons.diagrams.net/icon-cache1/Strabo-2829/traffic_light-1068.png" vertex="1" parent="1">
|
||||
<mxGeometry x="230" y="350" width="53" height="53" as="geometry" />
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-28" value="<b>Tipos de Mensagens</b><hr>• VEHICLE_TRANSFER<br>• VEHICLE_SPAWN<br>• STATS_UPDATE<br>• TRAFFIC_LIGHT_SYNC<br>• HEARTBEAT" style="rounded=0;whiteSpace=wrap;html=1;align=left;verticalAlign=top;fillColor=#fff2cc;strokeColor=#d6b656;spacing=10;fontColor=#000000;" parent="1" vertex="1">
|
||||
<mxGeometry x="20" y="170" width="200" height="120" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="vcp7vux32DhQR4tKQhnF-13" value="" style="endArrow=classic;startArrow=classic;html=1;rounded=0;movable=1;resizable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;" edge="1" parent="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="310" y="330" as="sourcePoint" />
|
||||
<mxPoint x="360" y="280" as="targetPoint" />
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-26" value="<b>LEGENDA</b><hr>━━━► Comunicação síncrona<br>╌╌╌► Comunicação periódica<br><br><b>Cores:</b><br>🔵 Azul =&nbsp;<span style="background-color: transparent;">Criação do veículo</span><div>🟢 Verde = Transferência do veículo<br>🟠 Laranja = Chegada ao destino<br>🟣 Roxo =&nbsp;<span style="background-color: transparent;">Envio das estatísticas</span></div><div><br><b>Serialização:</b> JSON (Gson)<br><b>Protocolo:</b> TCP/IP</div>" style="rounded=0;whiteSpace=wrap;html=1;align=left;verticalAlign=top;fillColor=#f5f5f5;strokeColor=#666666;fontColor=#333333;spacing=10;" parent="1" vertex="1">
|
||||
<mxGeometry x="10" y="320" width="220" height="220" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="L62mICw2ZrYi1D68OOFe-13" value="" style="group" parent="1" vertex="1" connectable="0">
|
||||
<mxGeometry x="280" y="40" width="850" height="730" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-20" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9933FF;strokeWidth=2;dashed=1;exitX=0.616;exitY=-0.011;exitDx=0;exitDy=0;entryX=0.661;entryY=-0.002;entryDx=0;entryDy=0;entryPerimeter=0;exitPerimeter=0;" parent="L62mICw2ZrYi1D68OOFe-13" source="0K4eb2koB2xQ8duQ1-_a-2" target="0K4eb2koB2xQ8duQ1-_a-8" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="794" y="530" as="targetPoint" />
|
||||
<Array as="points">
|
||||
<mxPoint x="99" y="122" />
|
||||
<mxPoint x="793" y="122" />
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="vcp7vux32DhQR4tKQhnF-14" value="CruzamentoServer.java" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=1;points=[];movable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;" vertex="1" connectable="0" parent="vcp7vux32DhQR4tKQhnF-13">
|
||||
<mxGeometry x="-0.3933" relative="1" as="geometry">
|
||||
<mxPoint x="25" y="25" as="offset" />
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-1" value="<b>CoordinatorProcess</b><br>(Cliente Socket)<hr>• VehicleGenerator<br>• Modelo Poisson<br>• Liga a Cr1-Cr5" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;align=left;verticalAlign=top;spacing=10;fontColor=#000000;" parent="L62mICw2ZrYi1D68OOFe-13" vertex="1">
|
||||
<mxGeometry x="205.6637168141593" width="176.28318584070794" height="101.38888888888889" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-2" value="<b>Cr1</b> (IntersectionProcess)<br>Porta: 8001<br>Servidor + Cliente<hr>• ServerSocket (8001)<br>• Thread Semáforo - Sul<br>• Thread Semáforo - Este<br>• Fila Eventos (DES)<br>• ReentrantLock" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;align=left;verticalAlign=top;spacing=10;fontColor=#000000;" parent="L62mICw2ZrYi1D68OOFe-13" vertex="1">
|
||||
<mxGeometry y="162.22" width="160" height="162.22" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-3" value="<b>Cr2</b> (IntersectionProcess)<br>Porta: 8002<br>Servidor + Cliente<hr>• ServerSocket (8002)<br>• Thread Semáforo - Sul<br>• Thread Semáforo - Este<br>• Thread Semáforo - Oeste<br>• Fila Eventos (DES)<br>• ReentrantLock" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;align=left;verticalAlign=top;spacing=10;fontColor=#000000;" parent="L62mICw2ZrYi1D68OOFe-13" vertex="1">
|
||||
<mxGeometry x="227.7" y="162.22" width="162.3" height="162.22" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-5" value="<b>Cr4</b> (IntersectionProcess)<br>Porta: 8004<br>Servidor + Cliente<hr>• ServerSocket (8004)<br>• Thread Semáforo - Este<br>• Fila Eventos (DES)<br>• ReentrantLock" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;align=left;verticalAlign=top;spacing=10;fontColor=#000000;" parent="L62mICw2ZrYi1D68OOFe-13" vertex="1">
|
||||
<mxGeometry y="486.67" width="160" height="133.33" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-6" value="<b>Cr5</b> (IntersectionProcess)<br>Porta: 8005<br>Servidor + Cliente<hr>• ServerSocket (8005)<br>• Thread Semáforo - Este<br>• Fila Eventos (DES)<br>• ReentrantLock" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;align=left;verticalAlign=top;spacing=10;fontColor=#000000;" parent="L62mICw2ZrYi1D68OOFe-13" vertex="1">
|
||||
<mxGeometry x="220.35" y="486.67" width="169.65" height="162.22" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-7" value="<b>ExitNode (S)</b><br>Porta: 9001<br>Servidor Socket<hr>• Recebe veículos finais<br>• Calcula estatísticas:<br> - Tempo no sistema<br> - Tempo de espera<br> - Métricas por tipo<br>• Envia para o Dashboard" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;align=left;verticalAlign=top;spacing=10;fontColor=#000000;" parent="L62mICw2ZrYi1D68OOFe-13" vertex="1">
|
||||
<mxGeometry x="464.07" y="476.53" width="154.6" height="172.36" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-8" value="<b>DashboardServer</b><br>Porta: 9000<br>Servidor Socket<hr>• Thread Pool (10 threads)<br>• ConcurrentHashMap<br>• Agrega estatísticas<br>• Display a cada 5s:<br> - Throughput<br> - Tempos médios<br> - Tamanhos de filas" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;align=left;verticalAlign=top;spacing=10;fontColor=#000000;" parent="L62mICw2ZrYi1D68OOFe-13" vertex="1">
|
||||
<mxGeometry x="683.1" y="540" width="166.9" height="180" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-9" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#0000FF;strokeWidth=2;" parent="L62mICw2ZrYi1D68OOFe-13" source="0K4eb2koB2xQ8duQ1-_a-1" target="0K4eb2koB2xQ8duQ1-_a-2" edge="1">
|
||||
<mxGeometry x="-0.2105" relative="1" as="geometry">
|
||||
<mxPoint as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-10" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#0000FF;strokeWidth=2;" parent="L62mICw2ZrYi1D68OOFe-13" source="0K4eb2koB2xQ8duQ1-_a-1" target="0K4eb2koB2xQ8duQ1-_a-3" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="309" y="120" />
|
||||
<mxPoint x="309" y="120" />
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-11" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#0000FF;strokeWidth=2;" parent="L62mICw2ZrYi1D68OOFe-13" source="0K4eb2koB2xQ8duQ1-_a-1" target="0K4eb2koB2xQ8duQ1-_a-4" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-12" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#00AA00;strokeWidth=2;endArrow=classic;startArrow=classic;" parent="L62mICw2ZrYi1D68OOFe-13" source="0K4eb2koB2xQ8duQ1-_a-2" target="0K4eb2koB2xQ8duQ1-_a-3" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-13" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#00AA00;strokeWidth=2;endArrow=classic;startArrow=classic;" parent="L62mICw2ZrYi1D68OOFe-13" source="0K4eb2koB2xQ8duQ1-_a-3" target="0K4eb2koB2xQ8duQ1-_a-4" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-14" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#00AA00;strokeWidth=2;endArrow=classic;startArrow=none;startFill=0;" parent="L62mICw2ZrYi1D68OOFe-13" source="0K4eb2koB2xQ8duQ1-_a-2" target="0K4eb2koB2xQ8duQ1-_a-5" edge="1">
|
||||
<mxGeometry x="0.125" y="100" relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="66.10619469026548" y="446.11111111111114" />
|
||||
<mxPoint x="66.10619469026548" y="446.11111111111114" />
|
||||
</Array>
|
||||
<mxPoint y="-1" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-16" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#00AA00;strokeWidth=2;endArrow=classic;startArrow=none;startFill=0;exitX=1.005;exitY=0.63;exitDx=0;exitDy=0;exitPerimeter=0;align=center;" parent="L62mICw2ZrYi1D68OOFe-13" source="0K4eb2koB2xQ8duQ1-_a-5" edge="1">
|
||||
<mxGeometry x="-0.0178" y="-49" relative="1" as="geometry">
|
||||
<mxPoint x="139.55752212389382" y="588.0555555555555" as="sourcePoint" />
|
||||
<mxPoint x="220" y="571" as="targetPoint" />
|
||||
<Array as="points">
|
||||
<mxPoint x="220" y="571" />
|
||||
</Array>
|
||||
<mxPoint as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-19" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#b46504;strokeWidth=2;fillColor=#fad7ac;" parent="L62mICw2ZrYi1D68OOFe-13" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="390" y="580" as="sourcePoint" />
|
||||
<mxPoint x="462.74" y="580.22" as="targetPoint" />
|
||||
<Array as="points" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-22" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9933FF;strokeWidth=2;dashed=1;exitX=0.981;exitY=0.08;exitDx=0;exitDy=0;exitPerimeter=0;" parent="L62mICw2ZrYi1D68OOFe-13" source="0K4eb2koB2xQ8duQ1-_a-4" target="0K4eb2koB2xQ8duQ1-_a-8" edge="1">
|
||||
<mxGeometry x="0.1427" y="-60" relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="593" y="175" />
|
||||
<mxPoint x="593" y="140" />
|
||||
<mxPoint x="764" y="140" />
|
||||
</Array>
|
||||
<mxPoint as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-4" value="<b>Cr3</b> (IntersectionProcess)<br>Porta: 8003<br>Servidor + Cliente<hr>• ServerSocket (8003)<br>• Thread Semáforo - Sul<br>• Thread Semáforo - Oeste<br>• Fila Eventos (DES)<br>• ReentrantLock" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;align=left;verticalAlign=top;spacing=10;fontColor=#000000;" parent="L62mICw2ZrYi1D68OOFe-13" vertex="1">
|
||||
<mxGeometry x="462.74" y="162.22" width="167.26" height="162.22" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="0K4eb2koB2xQ8duQ1-_a-30" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9933FF;strokeWidth=2;dashed=1;entryX=0.186;entryY=0.998;entryDx=0;entryDy=0;entryPerimeter=0;" parent="L62mICw2ZrYi1D68OOFe-13" target="0K4eb2koB2xQ8duQ1-_a-8" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="103" y="620" as="sourcePoint" />
|
||||
<mxPoint x="710" y="730" as="targetPoint" />
|
||||
<Array as="points">
|
||||
<mxPoint x="103" y="730" />
|
||||
<mxPoint x="714" y="730" />
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="L62mICw2ZrYi1D68OOFe-2" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#00AA00;strokeWidth=2;endArrow=none;startArrow=classic;startFill=1;endFill=0;" parent="L62mICw2ZrYi1D68OOFe-13" edge="1">
|
||||
<mxGeometry x="-0.2214" y="26" relative="1" as="geometry">
|
||||
<mxPoint x="293.8053097345133" y="486.6666666666666" as="sourcePoint" />
|
||||
<mxPoint x="293.8053097345133" y="324.44444444444446" as="targetPoint" />
|
||||
<Array as="points" />
|
||||
<mxPoint x="-17" y="6" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="L62mICw2ZrYi1D68OOFe-3" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#b46504;strokeWidth=2;endArrow=classic;startArrow=none;startFill=0;fillColor=#fad7ac;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="L62mICw2ZrYi1D68OOFe-13" target="0K4eb2koB2xQ8duQ1-_a-7" edge="1">
|
||||
<mxGeometry x="0.3659" relative="1" as="geometry">
|
||||
<mxPoint as="offset" />
|
||||
<mxPoint x="541" y="324" as="sourcePoint" />
|
||||
<mxPoint x="528.8495575221239" y="435.9722222222221" as="targetPoint" />
|
||||
<Array as="points">
|
||||
<mxPoint x="541" y="360" />
|
||||
<mxPoint x="541" y="360" />
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="L62mICw2ZrYi1D68OOFe-10" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9933FF;strokeWidth=2;dashed=1;exitX=0.621;exitY=-0.003;exitDx=0;exitDy=0;exitPerimeter=0;" parent="L62mICw2ZrYi1D68OOFe-13" source="0K4eb2koB2xQ8duQ1-_a-3" edge="1">
|
||||
<mxGeometry x="0.1427" y="-60" relative="1" as="geometry">
|
||||
<mxPoint x="330.53097345132744" y="141.94444444444443" as="sourcePoint" />
|
||||
<mxPoint x="780" y="540" as="targetPoint" />
|
||||
<Array as="points">
|
||||
<mxPoint x="329" y="130" />
|
||||
<mxPoint x="780" y="130" />
|
||||
</Array>
|
||||
<mxPoint as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="L62mICw2ZrYi1D68OOFe-11" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9933FF;strokeWidth=2;dashed=1;" parent="L62mICw2ZrYi1D68OOFe-13" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="326" y="654" as="sourcePoint" />
|
||||
<mxPoint x="683.1" y="700" as="targetPoint" />
|
||||
<Array as="points">
|
||||
<mxPoint x="326.1" y="700" />
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="L62mICw2ZrYi1D68OOFe-12" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9933FF;strokeWidth=2;dashed=1;" parent="L62mICw2ZrYi1D68OOFe-13" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="556" y="650" as="sourcePoint" />
|
||||
<mxPoint x="683.0973451327434" y="663.0833333333331" as="targetPoint" />
|
||||
<Array as="points">
|
||||
<mxPoint x="556" y="663" />
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
</root>
|
||||
|
||||
BIN
Diagrama de arquitetura - SD.jpg
Normal file
|
After Width: | Height: | Size: 161 KiB |
BIN
Enunciado.pdf
Normal file
712
RELATORIO_FINAL.tex
Normal file
@@ -0,0 +1,712 @@
|
||||
\documentclass[12pt,a4paper]{article}
|
||||
|
||||
% Pacotes essenciais
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[portuguese]{babel}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage{graphicx}
|
||||
\usepackage{hyperref}
|
||||
\usepackage{booktabs}
|
||||
\usepackage{longtable}
|
||||
\usepackage{geometry}
|
||||
\usepackage{fancyhdr}
|
||||
\usepackage{amsmath}
|
||||
\usepackage{listings}
|
||||
\usepackage{xcolor}
|
||||
\usepackage{float}
|
||||
\usepackage{caption}
|
||||
\usepackage{subcaption}
|
||||
|
||||
% Configuração da página
|
||||
\geometry{
|
||||
left=2.5cm,
|
||||
right=2.5cm,
|
||||
top=2.5cm,
|
||||
bottom=2.5cm
|
||||
}
|
||||
|
||||
% Configuração de hyperlinks
|
||||
\hypersetup{
|
||||
colorlinks=true,
|
||||
linkcolor=blue,
|
||||
filecolor=magenta,
|
||||
urlcolor=cyan,
|
||||
pdftitle={Trabalho Prático - Sistemas Distribuídos},
|
||||
pdfauthor={David Alves, Leandro Afonso, Gabriel Moreira},
|
||||
}
|
||||
|
||||
% Configuração de código
|
||||
\lstset{
|
||||
basicstyle=\ttfamily\footnotesize,
|
||||
breaklines=true,
|
||||
frame=single,
|
||||
numbers=left,
|
||||
numberstyle=\tiny,
|
||||
keywordstyle=\color{blue},
|
||||
commentstyle=\color{green!60!black},
|
||||
stringstyle=\color{red}
|
||||
}
|
||||
|
||||
% Cabeçalho e rodapé
|
||||
\pagestyle{fancy}
|
||||
\fancyhf{}
|
||||
\rhead{Sistemas Distribuídos}
|
||||
\lhead{Trabalho Prático}
|
||||
\rfoot{Página \thepage}
|
||||
|
||||
\begin{document}
|
||||
|
||||
% ============================================================
|
||||
% PÁGINA DE TÍTULO
|
||||
% ============================================================
|
||||
\begin{titlepage}
|
||||
\centering
|
||||
\vspace*{2cm}
|
||||
|
||||
{\LARGE\bfseries Licenciatura em Segurança Informática\\e Redes de Computadores\par}
|
||||
\vspace{1.5cm}
|
||||
|
||||
{\Large Unidade Curricular ``Sistemas Distribuídos''\par}
|
||||
\vspace{0.5cm}
|
||||
{\large Ano letivo 2024/2025\par}
|
||||
\vspace{2cm}
|
||||
|
||||
{\huge\bfseries Trabalho Prático\par}
|
||||
\vspace{0.5cm}
|
||||
{\Large Simulação de Tráfego Urbano Distribuído\par}
|
||||
\vspace{2cm}
|
||||
|
||||
{\large\bfseries Realizado por:\par}
|
||||
\vspace{0.5cm}
|
||||
{\large
|
||||
David Alves, número de aluno 8240231\\
|
||||
Leandro Afonso, número de aluno [A COMPLETAR]\\
|
||||
Gabriel Moreira, número de aluno [A COMPLETAR]
|
||||
\par}
|
||||
\vspace{1.5cm}
|
||||
|
||||
{\large\bfseries Docente da UC:\par}
|
||||
\vspace{0.3cm}
|
||||
{\large Ronaldo Moreira Salles\par}
|
||||
|
||||
\vfill
|
||||
|
||||
{\large 8 de dezembro de 2024\par}
|
||||
\end{titlepage}
|
||||
|
||||
% ============================================================
|
||||
% ÍNDICE
|
||||
% ============================================================
|
||||
\tableofcontents
|
||||
\newpage
|
||||
|
||||
% ============================================================
|
||||
% INTRODUÇÃO
|
||||
% ============================================================
|
||||
\section{Introdução}
|
||||
|
||||
O presente trabalho tem como objetivo dotar os alunos com a capacidade de desenvolver uma aplicação distribuída em linguagem Java, simulando um sistema de tráfego urbano. O projeto é desenvolvido de modo a permitir avaliar e gerir as regras de controlo dos semáforos, tendo em conta diferentes cargas de tráfego.
|
||||
|
||||
A simulação implementa uma arquitetura de processos distribuídos que comunicam através de sockets TCP/IP, onde cada componente opera de forma autónoma enquanto contribui para o comportamento global do sistema. Este paradigma permite avaliar propriedades como escalabilidade, tolerância a falhas e sincronização distribuída em ambientes concorrentes.
|
||||
|
||||
% ============================================================
|
||||
% O MODELO DE SIMULAÇÃO
|
||||
% ============================================================
|
||||
\section{O Modelo de Simulação}
|
||||
|
||||
O sistema retrata uma malha três por três, tendo três pontos de entrada (E1, E2 e E3), cinco cruzamentos (de Cr1 a Cr5) e um ponto de saída (S). As arestas representam as ruas e podem ser de sentido único ou duplo. Cada cruzamento é um processo separado, responsável pela gestão local do tráfego através de semáforos independentes que controlam três direções (Sul, Este e Oeste). O ponto de saída recolhe as estatísticas finais dos veículos que terminam o seu percurso.
|
||||
|
||||
\subsection{Geração de Veículos}
|
||||
|
||||
O processo coordenador (\texttt{CoordinatorProcess}) atua como o gerador de veículos, colocando-os no percurso através dos pontos de entrada seguindo o modelo de \textbf{Poisson} ($\lambda$ configurável). A simulação modela assim a chegada de veículos de forma realista, semelhante ao tráfego real. Esta abordagem significa que o número total de veículos gerados varia entre execuções. Como alternativa, o sistema permite também configurar um modelo de chegadas fixas, onde os veículos chegam em intervalos constantes e previsíveis.
|
||||
|
||||
\subsection{Características dos Veículos}
|
||||
|
||||
Cada veículo criado tem a probabilidade de ser:
|
||||
\begin{itemize}
|
||||
\item \textbf{Mota} (20\%): Tempo de travessia = $0.5 \times$ tempo base
|
||||
\item \textbf{Carro} (60\%): Tempo de travessia = $1.0 \times$ tempo base
|
||||
\item \textbf{Camião} (20\%): Tempo de travessia = $2.0 \times$ tempo base
|
||||
\end{itemize}
|
||||
|
||||
Cada veículo possui um identificador único e uma rota predefinida que determina o seu percurso completo até ao nó de saída. As rotas são atribuídas segundo a política de encaminhamento configurada:
|
||||
\begin{itemize}
|
||||
\item \textbf{Random}: Escolha aleatória entre todas as rotas possíveis
|
||||
\item \textbf{Shortest Path}: Seleção da rota com menor número de saltos
|
||||
\item \textbf{Least Congested}: Escolha da rota com menor congestionamento atual
|
||||
\end{itemize}
|
||||
|
||||
\subsection{Modelo de Eventos Discretos (DES)}
|
||||
|
||||
A simulação baseia-se num modelo de eventos discretos, onde cada cruzamento mantém uma fila de prioridade de eventos ordenados cronologicamente por timestamp. Os eventos incluem:
|
||||
\begin{itemize}
|
||||
\item Chegadas e partidas de veículos
|
||||
\item Mudanças de estado dos semáforos
|
||||
\item Atualizações de estatísticas
|
||||
\end{itemize}
|
||||
|
||||
Cada semáforo opera como uma thread independente, alternando entre os estados \textbf{GREEN} (verde) e \textbf{RED} (vermelho), gerindo uma fila FIFO de veículos que aguardam passagem. Quando um veículo atravessa um cruzamento, é enviado para o processo do próximo cruzamento indicado na sua rota, onde é adicionado à fila do semáforo correspondente à direção necessária.
|
||||
|
||||
\subsection{Comunicação Distribuída}
|
||||
|
||||
A arquitetura distribuída permite que cada componente seja executado de forma independente. As comunicações são baseadas em sockets TCP/IP, com serialização das mensagens em JSON através da biblioteca \textbf{Gson}. Esta abordagem garante interoperabilidade e facilita a depuração do sistema.
|
||||
|
||||
% ============================================================
|
||||
% ARQUITETURA DO SISTEMA E COMPONENTES
|
||||
% ============================================================
|
||||
\section{Arquitetura do Sistema e Componentes}
|
||||
|
||||
Foi desenvolvido um diagrama que retrata a arquitetura do projeto, ilustrando a topologia da rede viária e as conexões entre os diversos processos.
|
||||
|
||||
\subsection{Componentes Principais}
|
||||
|
||||
\subsubsection{Coordenador (\texttt{CoordinatorProcess})}
|
||||
\begin{itemize}
|
||||
\item \textbf{Porta}: Coordenação central sem socket servidor próprio (atua como cliente)
|
||||
\item \textbf{Função}: Geração de veículos, gestão do relógio global de simulação, injeção de carga nos pontos de entrada
|
||||
\item \textbf{Responsabilidades}:
|
||||
\begin{itemize}
|
||||
\item Implementação do modelo de Poisson para chegadas estocásticas
|
||||
\item Seleção de rotas baseada na política configurada
|
||||
\item Sincronização temporal da simulação
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
|
||||
\subsubsection{Processos de Cruzamento (\texttt{IntersectionProcess})}
|
||||
|
||||
Cada cruzamento mantém um \texttt{ServerSocket} dedicado que aceita ligações de múltiplos clientes simultaneamente, criando uma thread para cada ligação estabelecida:
|
||||
|
||||
\begin{itemize}
|
||||
\item \textbf{Cr1}: Porta 8001
|
||||
\item \textbf{Cr2}: Porta 8002
|
||||
\item \textbf{Cr3}: Porta 8003
|
||||
\item \textbf{Cr4}: Porta 8004
|
||||
\item \textbf{Cr5}: Porta 8005
|
||||
\end{itemize}
|
||||
|
||||
\textbf{Responsabilidades}:
|
||||
\begin{itemize}
|
||||
\item Gestão local de semáforos (3 direções: Sul, Este, Oeste)
|
||||
\item Processamento de eventos DES locais
|
||||
\item Encaminhamento de veículos para o próximo destino
|
||||
\item Reporte periódico de estatísticas ao Dashboard
|
||||
\end{itemize}
|
||||
|
||||
\subsubsection{Nó de Saída (\texttt{ExitNodeProcess})}
|
||||
\begin{itemize}
|
||||
\item \textbf{Porta}: 9001
|
||||
\item \textbf{Função}: Agregação final de métricas
|
||||
\item \textbf{Responsabilidades}:
|
||||
\begin{itemize}
|
||||
\item Cálculo do tempo total de permanência no sistema
|
||||
\item Throughput global
|
||||
\item Estatísticas agregadas por tipo de veículo
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
|
||||
\subsubsection{Servidor de Dashboard (\texttt{DashboardServer})}
|
||||
\begin{itemize}
|
||||
\item \textbf{Porta}: 9000
|
||||
\item \textbf{Função}: Monitorização centralizada e visualização em tempo real
|
||||
\item \textbf{Responsabilidades}:
|
||||
\begin{itemize}
|
||||
\item Agregação de estatísticas de todos os processos
|
||||
\item Deteção de falhas através de heartbeats
|
||||
\item Renderização da interface gráfica (JavaFX) ou CLI
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
|
||||
\subsection{Sincronização e Concorrência}
|
||||
|
||||
O \texttt{DashboardServer} implementa um sistema de agregação com \textbf{10 threads concorrentes} (thread pool) que processam atualizações de estatísticas vindas dos cinco cruzamentos. Utiliza um \texttt{ConcurrentHashMap} para armazenar métricas por cruzamento, permitindo leituras simultâneas enquanto recebe atualizações. O frontend é atualizado a cada \textbf{5 segundos}.
|
||||
|
||||
A sincronização entre os processos ocorre através de \textbf{comunicação assíncrona}, onde cada processo continua a sua execução local enquanto envia e recebe mensagens. Os semáforos dentro de cada cruzamento operam de forma autónoma com ciclos independentes. O dashboard identifica a ausência de heartbeats para detetar falhas de processos.
|
||||
|
||||
% ============================================================
|
||||
% CLASSES E MÉTODOS
|
||||
% ============================================================
|
||||
\section{Classes e Métodos}
|
||||
|
||||
O programa está organizado em diversos packages que contêm classes com responsabilidades distintas. Neste relatório são mencionadas as principais que sustentam o projeto, estando o resto da documentação apoiado em JavaDoc.
|
||||
|
||||
\subsection{Package \texttt{sd.model}}
|
||||
|
||||
\subsubsection{Classe \texttt{Vehicle}}
|
||||
Representa cada veículo na simulação com os seguintes atributos:
|
||||
\begin{itemize}
|
||||
\item \texttt{vehicleId}: Identificador único
|
||||
\item \texttt{vehicleType}: Tipo (MOTORCYCLE, CAR, TRUCK)
|
||||
\item \texttt{entryTime}: Timestamp de entrada no sistema
|
||||
\item \texttt{route}: Lista de nós que compõem o percurso completo
|
||||
\end{itemize}
|
||||
|
||||
\textbf{Métodos principais:}
|
||||
\begin{itemize}
|
||||
\item \texttt{advanceRoute()}: Avança para o próximo nó na rota
|
||||
\item \texttt{getCurrentDestination()}: Obtém o próximo cruzamento
|
||||
\item \texttt{addWaitingTime(double time)}: Acumula tempo de espera em filas
|
||||
\item \texttt{addCrossingTime(double time)}: Acumula tempo de travessia
|
||||
\end{itemize}
|
||||
|
||||
\subsubsection{Classe \texttt{Intersection}}
|
||||
Gere os cruzamentos, mantendo:
|
||||
\begin{itemize}
|
||||
\item Um mapa de semáforos por direção (\texttt{Map<Direction, TrafficLight>})
|
||||
\item Uma tabela de encaminhamento que mapeia destinos para direções específicas
|
||||
\end{itemize}
|
||||
|
||||
\textbf{Métodos principais:}
|
||||
\begin{itemize}
|
||||
\item \texttt{configureRoute(String destination, Direction direction)}: Define a tabela de routing
|
||||
\item \texttt{receiveVehicle(Vehicle vehicle)}: Recebe veículos e coloca-os na fila do semáforo correspondente
|
||||
\item \texttt{getTrafficLight(Direction direction)}: Obtém o semáforo de uma direção específica
|
||||
\end{itemize}
|
||||
|
||||
\subsubsection{Classe \texttt{TrafficLight}}
|
||||
Controla cada semáforo individualmente, utilizando locks (\texttt{ReentrantLock}) para garantir thread-safety.
|
||||
|
||||
\textbf{Métodos principais:}
|
||||
\begin{itemize}
|
||||
\item \texttt{addVehicle(Vehicle vehicle)}: Adiciona veículo à fila (FIFO)
|
||||
\item \texttt{removeVehicle()}: Remove veículo da fila (apenas quando verde)
|
||||
\item \texttt{changeState(TrafficLightState newState)}: Alterna entre GREEN e RED
|
||||
\item \texttt{getQueueSize()}: Retorna o tamanho atual da fila
|
||||
\end{itemize}
|
||||
|
||||
\subsubsection{Classe \texttt{Event} (no package \texttt{sd.des})}
|
||||
Representa eventos discretos na simulação. Implementa \texttt{Comparable<Event>} para ordenação automática cronológica na fila de prioridade.
|
||||
|
||||
\textbf{Atributos:}
|
||||
\begin{itemize}
|
||||
\item \texttt{timestamp}: Momento em que o evento deve ocorrer
|
||||
\item \texttt{eventType}: Tipo do evento (VEHICLE\_ARRIVAL, TRAFFIC\_LIGHT\_CHANGE, etc.)
|
||||
\item \texttt{associatedData}: Payload específico do evento
|
||||
\end{itemize}
|
||||
|
||||
\subsubsection{Classe \texttt{Message}}
|
||||
Define a estrutura das mensagens trocadas entre processos.
|
||||
|
||||
\textbf{Atributos:}
|
||||
\begin{itemize}
|
||||
\item \texttt{messageId}: Identificador único da mensagem
|
||||
\item \texttt{messageType}: Tipo da mensagem (VEHICLE\_TRANSFER, STATS\_UPDATE, etc.)
|
||||
\item \texttt{sourceNode}: Nó de origem
|
||||
\item \texttt{destinationNode}: Nó de destino
|
||||
\item \texttt{payload}: Conteúdo serializado em JSON
|
||||
\end{itemize}
|
||||
|
||||
\subsection{Package \texttt{sd.coordinator}}
|
||||
|
||||
\subsubsection{Classe \texttt{CoordinatorProcess}}
|
||||
Conduz a simulação através do paradigma de eventos discretos distribuído.
|
||||
|
||||
\textbf{Responsabilidades:}
|
||||
\begin{itemize}
|
||||
\item Inicialização da topologia da rede
|
||||
\item Geração de veículos segundo distribuição de Poisson
|
||||
\item Injeção de carga nos pontos de entrada (E1, E2, E3)
|
||||
\item Seleção de rotas com base na política configurada
|
||||
\end{itemize}
|
||||
|
||||
\textbf{Métodos principais:}
|
||||
\begin{itemize}
|
||||
\item \texttt{initialize()}: Prepara o sistema, estabelece conexões com interseções
|
||||
\item \texttt{run()}: Loop principal de geração de veículos
|
||||
\item \texttt{generateAndInjectVehicle()}: Cria um novo veículo e injeta-o num ponto de entrada
|
||||
\item \texttt{selectRouteForVehicle()}: Determina a rota com base na política ativa
|
||||
\end{itemize}
|
||||
|
||||
\subsubsection{Classe \texttt{SocketClient}}
|
||||
Facilita a comunicação de rede do lado do cliente.
|
||||
|
||||
\textbf{Métodos principais:}
|
||||
\begin{itemize}
|
||||
\item \texttt{connect(String host, int port)}: Estabelece ligação TCP
|
||||
\item \texttt{send(Message message)}: Serializa e transmite mensagem
|
||||
\item \texttt{close()}: Encerra ligação e liberta recursos
|
||||
\end{itemize}
|
||||
|
||||
\subsection{Package \texttt{sd}}
|
||||
|
||||
\subsubsection{Classe \texttt{IntersectionProcess}}
|
||||
Representa um nó de processamento autónomo (Worker Node) na malha distribuída.
|
||||
|
||||
\textbf{Arquitetura híbrida:}
|
||||
\begin{itemize}
|
||||
\item \textbf{Reativa (Network I/O)}: Threads dedicadas aceitam conexões TCP e injetam veículos nas filas
|
||||
\item \textbf{Proativa (DES Engine)}: Thread de processamento de eventos gere a lógica temporal
|
||||
\end{itemize}
|
||||
|
||||
\textbf{Métodos principais:}
|
||||
\begin{itemize}
|
||||
\item \texttt{initialize()}: Carrega configurações, cria semáforos e rotas
|
||||
\item \texttt{startTrafficLightThreads()}: Inicia threads de controlo dos semáforos
|
||||
\item \texttt{startServerSocket()}: Aceita conexões de veículos de outros processos
|
||||
\item \texttt{sendVehicleToNextDestination(Vehicle vehicle)}: Encaminha veículos pela rede
|
||||
\item \texttt{reportStatistics()}: Envia métricas ao Dashboard periodicamente
|
||||
\item \texttt{shutdown()}: Encerra serviços e liberta recursos
|
||||
\end{itemize}
|
||||
|
||||
\subsection{Package \texttt{sd.util}}
|
||||
|
||||
\subsubsection{Classe \texttt{VehicleGenerator}}
|
||||
Responsável pela criação de veículos segundo o modelo de Poisson.
|
||||
|
||||
\textbf{Métodos principais:}
|
||||
\begin{itemize}
|
||||
\item \texttt{generateVehicle()}: Cria veículo com tipo e rota selecionados aleatoriamente
|
||||
\item \texttt{getNextArrivalTime(double lambda)}: Calcula o momento da próxima chegada usando distribuição exponencial
|
||||
\end{itemize}
|
||||
|
||||
\subsubsection{Classe \texttt{StatisticsCollector}}
|
||||
Agrega métricas do sistema, rastreando veículos em trânsito e mantendo contadores globais.
|
||||
|
||||
\textbf{Métodos principais:}
|
||||
\begin{itemize}
|
||||
\item \texttt{recordVehicleGeneration(Vehicle vehicle)}: Regista criação de veículo
|
||||
\item \texttt{recordVehicleArrival(Vehicle vehicle, String intersection)}: Regista chegada a cruzamento
|
||||
\item \texttt{recordVehicleDeparture(Vehicle vehicle, String intersection)}: Regista partida de cruzamento
|
||||
\item \texttt{recordVehicleCompletion(Vehicle vehicle)}: Regista conclusão do percurso
|
||||
\item \texttt{getStatistics()}: Retorna snapshot das métricas atuais
|
||||
\item \texttt{printStatistics()}: Gera relatórios com throughput, tempos médios, etc.
|
||||
\end{itemize}
|
||||
|
||||
\subsection{Package \texttt{sd.config}}
|
||||
|
||||
\subsubsection{Classe \texttt{SimulationConfig}}
|
||||
Carrega parâmetros do ficheiro \texttt{simulation.properties} (ou variantes \texttt{simulation-low.properties}, \texttt{simulation-medium.properties}, \texttt{simulation-high.properties}).
|
||||
|
||||
\textbf{Parâmetros configuráveis:}
|
||||
\begin{itemize}
|
||||
\item Duração da simulação
|
||||
\item Taxa de chegada $\lambda$ (lambda)
|
||||
\item Probabilidades de tipos de veículos
|
||||
\item Tempos de travessia base
|
||||
\item Tempos de ciclo dos semáforos
|
||||
\item Política de encaminhamento
|
||||
\end{itemize}
|
||||
|
||||
\subsection{Package \texttt{sd.routing}}
|
||||
|
||||
\subsubsection{Políticas de Encaminhamento}
|
||||
O sistema suporta três estratégias de seleção de rotas:
|
||||
|
||||
\begin{itemize}
|
||||
\item \texttt{RandomRouteSelector}: Escolha equiprovável entre todas as rotas disponíveis.
|
||||
\item \texttt{ShortestPathRouteSelector}: Seleção da rota com menor número de saltos (hops).
|
||||
\item \texttt{LeastCongestedRouteSelector}: Escolha da rota com menor congestionamento atual, baseada em feedback dos cruzamentos sobre tamanhos de filas.
|
||||
\end{itemize}
|
||||
|
||||
% ============================================================
|
||||
% AVALIAÇÃO DO DESEMPENHO DO SISTEMA
|
||||
% ============================================================
|
||||
\section{Avaliação do Desempenho do Sistema}
|
||||
|
||||
A avaliação do sistema baseia-se em métricas recolhidas pela classe \texttt{DashboardStatistics}, que monitoriza:
|
||||
\begin{itemize}
|
||||
\item Número de veículos gerados
|
||||
\item Número de veículos que completaram o percurso
|
||||
\item Taxa de conclusão (\%)
|
||||
\item Tempo médio no sistema (segundos)
|
||||
\item Tempo médio de espera acumulado em filas (segundos)
|
||||
\item Throughput (veículos/segundo)
|
||||
\end{itemize}
|
||||
|
||||
\subsection{Cenários de Carga}
|
||||
|
||||
Foram configurados três cenários de carga de tráfego, cada um executado 5 vezes para obter estatísticas fiáveis.
|
||||
|
||||
\subsubsection{Tráfego Leve (LOW LOAD)}
|
||||
\textbf{Configuração:} \texttt{simulation-low.properties} - $\lambda = 0.2$ veículos/segundo
|
||||
|
||||
\begin{table}[H]
|
||||
\centering
|
||||
\caption{Métricas de Desempenho - Tráfego Leve}
|
||||
\begin{tabular}{lrrrrr}
|
||||
\toprule
|
||||
\textbf{Métrica} & \textbf{Média} & \textbf{Desvio Padrão} & \textbf{IC 95\%} & \textbf{Mín} & \textbf{Máx} \\
|
||||
\midrule
|
||||
Veículos Gerados & 364.60 & 9.34 & [351.30, 377.90] & 350 & 373 \\
|
||||
Veículos Completados & 219.60 & 31.19 & [175.22, 263.98] & 187 & 263 \\
|
||||
Taxa de Conclusão (\%) & \textbf{60.38} & 9.71 & [46.57, 74.20] & 50.40 & 72.85 \\
|
||||
Tempo Médio no Sistema (s) & \textbf{33.04} & 7.41 & [22.50, 43.58] & 23.36 & 42.28 \\
|
||||
Tempo Médio de Espera (s) & 13.78 & 3.43 & [8.82, 18.73] & 9.72 & 17.53 \\
|
||||
\bottomrule
|
||||
\end{tabular}
|
||||
\end{table}
|
||||
|
||||
\textbf{Análise:} Com carga leve, a rede opera abaixo da capacidade sem congestionamento significativo. A taxa de conclusão superior a 60\% e o tempo médio no sistema de apenas 33 segundos demonstram que o sistema consegue processar eficientemente o tráfego quando a chegada de veículos é esparsa.
|
||||
|
||||
\subsubsection{Tráfego Moderado (MEDIUM LOAD)}
|
||||
\textbf{Configuração:} \texttt{simulation-medium.properties} - $\lambda = 0.5$ veículos/segundo
|
||||
|
||||
\begin{table}[H]
|
||||
\centering
|
||||
\caption{Métricas de Desempenho - Tráfego Moderado}
|
||||
\begin{tabular}{lrrrrr}
|
||||
\toprule
|
||||
\textbf{Métrica} & \textbf{Média} & \textbf{Desvio Padrão} & \textbf{IC 95\%} & \textbf{Mín} & \textbf{Máx} \\
|
||||
\midrule
|
||||
Veículos Gerados & 927.20 & 32.48 & [880.97, 973.43] & 886 & 954 \\
|
||||
Veículos Completados & 419.40 & 90.64 & [290.42, 548.38] & 312 & 535 \\
|
||||
Taxa de Conclusão (\%) & \textbf{45.23} & 9.64 & [31.50, 58.95] & 34.74 & 56.08 \\
|
||||
Tempo Médio no Sistema (s) & \textbf{44.48} & 6.81 & [34.79, 54.18] & 35.08 & 52.56 \\
|
||||
Tempo Médio de Espera (s) & 21.05 & 4.73 & [13.55, 28.56] & 14.60 & 25.60 \\
|
||||
\bottomrule
|
||||
\end{tabular}
|
||||
\end{table}
|
||||
|
||||
\textbf{Análise:} Com tráfego moderado, observa-se o início de congestionamento. A taxa de conclusão cai para 45\% e o tempo médio no sistema aumenta 34\% relativamente ao cenário leve. As filas começam a formar-se nos cruzamentos principais (Cr2 e Cr5).
|
||||
|
||||
\subsubsection{Tráfego Intenso (HIGH LOAD)}
|
||||
\textbf{Configuração:} \texttt{simulation-high.properties} - $\lambda = 1.0$ veículos/segundo
|
||||
|
||||
\begin{table}[H]
|
||||
\centering
|
||||
\caption{Métricas de Desempenho - Tráfego Intenso}
|
||||
\begin{tabular}{lrrrrr}
|
||||
\toprule
|
||||
\textbf{Métrica} & \textbf{Média} & \textbf{Desvio Padrão} & \textbf{IC 95\%} & \textbf{Mín} & \textbf{Máx} \\
|
||||
\midrule
|
||||
Veículos Gerados & 1813.80 & 41.93 & [1754.13, 1873.47] & 1782 & 1872 \\
|
||||
Veículos Completados & 651.00 & 354.20 & [146.96, 1155.04] & 179 & 953 \\
|
||||
Taxa de Conclusão (\%) & \textbf{35.92} & 19.44 & [8.25, 63.58] & 9.70 & 50.91 \\
|
||||
Tempo Médio no Sistema (s) & \textbf{60.15} & 6.17 & [51.38, 68.93] & 53.09 & 65.41 \\
|
||||
Tempo Médio de Espera (s) & 37.82 & 5.59 & [29.67, 45.96] & 31.51 & 44.58 \\
|
||||
\bottomrule
|
||||
\end{tabular}
|
||||
\end{table}
|
||||
|
||||
\textbf{Análise:} Com tráfego intenso, a rede aproxima-se da saturação. A taxa de conclusão cai para apenas 36\% com elevada variabilidade ($\sigma = 19.44\%$), indicando comportamento instável. O tempo médio no sistema atinge 60 segundos, mas o aspecto mais crítico é o tempo médio de espera de 37.82 segundos, representando 63\% do tempo total no sistema. A alta variabilidade sugere que o sistema está perto do colapso, com algumas execuções a atingir apenas 9.7\% de taxa de conclusão.
|
||||
|
||||
\subsection{Análise Comparativa}
|
||||
|
||||
\begin{table}[H]
|
||||
\centering
|
||||
\caption{Comparação entre Cenários de Carga}
|
||||
\begin{tabular}{lrrrr}
|
||||
\toprule
|
||||
\textbf{Cenário} & \textbf{$\lambda$ (v/s)} & \textbf{Taxa Conclusão (\%)} & \textbf{Tempo Sistema (s)} & \textbf{Tempo Espera (s)} \\
|
||||
\midrule
|
||||
Leve & 0.2 & 60.38 & 33.04 & 13.78 \\
|
||||
Moderado & 0.5 & 45.23 & 44.48 & 21.05 \\
|
||||
Intenso & 1.0 & 35.92 & 60.15 & 37.82 \\
|
||||
\bottomrule
|
||||
\end{tabular}
|
||||
\end{table}
|
||||
|
||||
\textbf{Observações:}
|
||||
\begin{enumerate}
|
||||
\item \textbf{Relação não-linear}: Dobrar a taxa de chegada ($0.2 \rightarrow 0.5$) reduz a taxa de conclusão em 25\%, mas quadruplicar ($0.2 \rightarrow 1.0$) reduz apenas 40\%, sugerindo efeitos de saturação.
|
||||
\item \textbf{Gargalos identificados}: Os cruzamentos Cr2 e Cr5 funcionam como pontos de convergência, acumulando os maiores tamanhos de fila.
|
||||
\item \textbf{Tempo de espera dominante}: Em carga intensa, 63\% do tempo no sistema é gasto em filas.
|
||||
\end{enumerate}
|
||||
|
||||
\subsection{Otimizações Testadas}
|
||||
|
||||
\subsubsection{Configuração de Ciclos de Semáforos}
|
||||
|
||||
Foram testadas diferentes configurações de temporização:
|
||||
|
||||
\textbf{Ciclos Longos} (verde 60s, vermelho 5s):
|
||||
\begin{itemize}
|
||||
\item Maior vazão (throughput) por ciclo
|
||||
\item Aumento significativo da espera para direções em vermelho
|
||||
\item Adequado para tráfego unidirecional dominante
|
||||
\end{itemize}
|
||||
|
||||
\textbf{Ciclos Curtos} (verde 8-10s, vermelho 5s):
|
||||
\begin{itemize}
|
||||
\item Distribuição mais equitativa da capacidade
|
||||
\item Redução da espera máxima
|
||||
\item Perda de eficiência devido ao overhead de mudanças de estado
|
||||
\end{itemize}
|
||||
|
||||
\textbf{Ciclos Otimizados} (diferenciados por cruzamento):
|
||||
\begin{itemize}
|
||||
\item Cr2 e Cr5: verde 30-40s (pontos de convergência)
|
||||
\item Cr1, Cr3, Cr4: verde 15-20s (tráfego distribuído)
|
||||
\item Melhor compromisso entre throughput e equidade
|
||||
\end{itemize}
|
||||
|
||||
\subsubsection{Políticas de Encaminhamento}
|
||||
|
||||
\textbf{Random}: Baseline - distribuição uniforme da carga mas sem otimização.
|
||||
|
||||
\textbf{Shortest Path}: Minimiza latência individual mas pode criar hotspots nos caminhos mais curtos.
|
||||
|
||||
\textbf{Least Congested}: Balanceamento dinâmico da carga, requer feedback em tempo real dos cruzamentos. Reduz congestionamento mas pode aumentar latência individual ao escolher caminhos mais longos.
|
||||
|
||||
% ============================================================
|
||||
% DASHBOARD
|
||||
% ============================================================
|
||||
\section{Dashboard}
|
||||
|
||||
O sistema de monitorização foi implementado utilizando \textbf{JavaFX} para a interface gráfica, fornecendo visualização em tempo real do estado da simulação.
|
||||
|
||||
\subsection{Características Principais}
|
||||
|
||||
\subsubsection{Interface Gráfica}
|
||||
\textbf{Estatísticas Globais}: Painel superior com métricas agregadas do sistema
|
||||
\begin{itemize}
|
||||
\item Veículos gerados vs. completados
|
||||
\item Taxa de conclusão em tempo real
|
||||
\item Throughput atual
|
||||
\item Tempo médio no sistema
|
||||
\end{itemize}
|
||||
|
||||
\textbf{Tabelas Dinâmicas}:
|
||||
\begin{itemize}
|
||||
\item Estatísticas por tipo de veículo (Mota, Carro, Camião)
|
||||
\item Métricas por interseção (Cr1-Cr5)
|
||||
\item Tamanhos de fila por direção
|
||||
\item Estados dos semáforos (cores indicativas)
|
||||
\end{itemize}
|
||||
|
||||
\textbf{Controlos de Simulação}:
|
||||
\begin{itemize}
|
||||
\item Botão \textbf{Start}: Inicia todos os processos distribuídos
|
||||
\item Botão \textbf{Stop}: Termina a simulação graciosamente
|
||||
\item Indicador de estado do sistema
|
||||
\item Heartbeat visual para cada processo
|
||||
\end{itemize}
|
||||
|
||||
\subsubsection{Arquitetura de Concorrência}
|
||||
|
||||
O \texttt{DashboardServer} utiliza:
|
||||
\begin{itemize}
|
||||
\item \textbf{Thread Pool} com 10 threads concorrentes para processar atualizações
|
||||
\item \texttt{ConcurrentHashMap} para armazenamento thread-safe de métricas
|
||||
\item \texttt{ScheduledExecutorService} para atualizações periódicas da UI (intervalo de 5 segundos)
|
||||
\item \texttt{Platform.runLater()} para marshalling seguro de atualizações para a UI thread do JavaFX
|
||||
\end{itemize}
|
||||
|
||||
\subsubsection{Deteção de Falhas}
|
||||
|
||||
O sistema implementa monitorização de saúde através de:
|
||||
\begin{itemize}
|
||||
\item \textbf{Heartbeats}: Cada processo envia sinais periódicos (intervalo configurável)
|
||||
\item \textbf{Timeout de conexão}: Identifica processos não-responsivos
|
||||
\item \textbf{Indicadores visuais}: Marcação a vermelho de nós com falhas
|
||||
\item \textbf{Logs de eventos}: Registo de todas as anomalias detetadas
|
||||
\end{itemize}
|
||||
|
||||
\subsection{Análise em Batch}
|
||||
|
||||
O sistema inclui uma ferramenta de análise estatística (\texttt{MultiRunAnalyzer}) que:
|
||||
\begin{itemize}
|
||||
\item Executa múltiplas simulações automaticamente
|
||||
\item Calcula médias, medianas, desvios padrão e intervalos de confiança (95\%)
|
||||
\item Gera relatórios em formato texto e CSV
|
||||
\item Permite comparação entre diferentes configurações
|
||||
\end{itemize}
|
||||
|
||||
% ============================================================
|
||||
% CONCLUSÃO
|
||||
% ============================================================
|
||||
\section{Conclusão}
|
||||
|
||||
O trabalho desenvolvido demonstra a implementação bem-sucedida de um sistema distribuído para simulação de tráfego urbano, cumprindo os objetivos pedagógicos da unidade curricular.
|
||||
|
||||
\subsection{Principais Conquistas}
|
||||
|
||||
\begin{enumerate}
|
||||
\item \textbf{Arquitetura Distribuída Robusta}: Implementação de comunicação assíncrona entre processos autónomos através de sockets TCP/IP, com serialização JSON garantindo interoperabilidade.
|
||||
|
||||
\item \textbf{Modelo de Simulação Realista}: Utilização do modelo de eventos discretos (DES) com distribuição de Poisson para chegadas de veículos, aproximando-se de padrões de tráfego reais.
|
||||
|
||||
\item \textbf{Escalabilidade Demonstrada}: O sistema mantém-se funcional desde tráfego leve ($\lambda=0.2$) até tráfego intenso ($\lambda=1.0$), embora com degradação expectável de desempenho em saturação.
|
||||
|
||||
\item \textbf{Monitorização Abrangente}: Dashboard com visualização em tempo real e capacidade de análise estatística multi-execução, permitindo avaliação rigorosa do desempenho.
|
||||
|
||||
\item \textbf{Políticas de Encaminhamento Adaptativas}: Implementação de três estratégias distintas (Random, Shortest Path, Least Congested) demonstrando flexibilidade arquitetural.
|
||||
\end{enumerate}
|
||||
|
||||
\subsection{Aprendizagens}
|
||||
|
||||
\begin{itemize}
|
||||
\item \textbf{Sincronização Distribuída}: Gestão da complexidade inerente à coordenação de múltiplos processos autónomos sem relógio global centralizado.
|
||||
|
||||
\item \textbf{Concorrência e Thread-Safety}: Utilização apropriada de locks, estruturas de dados concorrentes e thread pools para garantir correção em ambiente multi-threaded.
|
||||
|
||||
\item \textbf{Trade-offs de Desempenho}: Compreensão das relações não-lineares entre carga de entrada, throughput e latência, especialmente em aproximação à saturação.
|
||||
|
||||
\item \textbf{Análise Quantitativa}: Aplicação de métodos estatísticos (intervalos de confiança, análise de variância) para avaliação rigorosa de sistemas estocásticos.
|
||||
\end{itemize}
|
||||
|
||||
\subsection{Limitações e Trabalho Futuro}
|
||||
|
||||
\textbf{Limitações identificadas:}
|
||||
\begin{itemize}
|
||||
\item Rotas estáticas: Veículos não podem desviar-se em resposta a congestionamento dinâmico
|
||||
\item Capacidade infinita de filas: Sistema não modela bloqueios físicos por falta de espaço
|
||||
\item Ausência de prioridades: Todos os veículos são tratados igualmente (sem veículos de emergência)
|
||||
\item Modelo de semáforos simplificado: Não considera fases de amarelo ou coordenação entre cruzamentos adjacentes
|
||||
\end{itemize}
|
||||
|
||||
\textbf{Melhorias propostas:}
|
||||
\begin{enumerate}
|
||||
\item Implementação de encaminhamento adaptativo baseado em aprendizagem por reforço
|
||||
\item Modelação de capacidades finitas com backpressure entre cruzamentos
|
||||
\item Coordenação de semáforos através de ``ondas verdes'' para corredores prioritários
|
||||
\item Integração de eventos externos (acidentes, obras, eventos especiais)
|
||||
\item Visualização 3D da malha viária com animação de veículos em movimento
|
||||
\end{enumerate}
|
||||
|
||||
\subsection{Conclusão Final}
|
||||
|
||||
O projeto cumpre integralmente os requisitos da unidade curricular, demonstrando competências na conceção, implementação e avaliação de sistemas distribuídos. Os resultados quantitativos obtidos através das análises multi-execução fornecem insights valiosos sobre o comportamento do sistema sob diferentes condições de carga, validando a abordagem arquitetural adotada.
|
||||
|
||||
A experiência adquirida na resolução de desafios de sincronização, gestão de concorrência e análise de desempenho constitui uma base sólida para o desenvolvimento de sistemas distribuídos de maior complexidade em contextos profissionais futuros.
|
||||
|
||||
% ============================================================
|
||||
% BIBLIOGRAFIA
|
||||
% ============================================================
|
||||
\begin{thebibliography}{9}
|
||||
|
||||
\bibitem{tanenbaum2017}
|
||||
Tanenbaum, A. S., \& Van Steen, M. (2017).
|
||||
\textit{Distributed Systems: Principles and Paradigms} (3rd ed.).
|
||||
Pearson.
|
||||
|
||||
\bibitem{coulouris2011}
|
||||
Coulouris, G., Dollimore, J., Kindberg, T., \& Blair, G. (2011).
|
||||
\textit{Distributed Systems: Concepts and Design} (5th ed.).
|
||||
Addison-Wesley.
|
||||
|
||||
\bibitem{banks2009}
|
||||
Banks, J., Carson, J. S., Nelson, B. L., \& Nicol, D. M. (2009).
|
||||
\textit{Discrete-Event System Simulation} (5th ed.).
|
||||
Pearson.
|
||||
|
||||
\bibitem{oracle2024java}
|
||||
Oracle. (2024).
|
||||
\textit{Java Platform, Standard Edition Documentation} (Version 17).
|
||||
\url{https://docs.oracle.com/en/java/javase/17/}
|
||||
|
||||
\bibitem{goetz2006}
|
||||
Goetz, B., Peierls, T., Bloch, J., Bowbeer, J., Holmes, D., \& Lea, D. (2006).
|
||||
\textit{Java Concurrency in Practice}.
|
||||
Addison-Wesley.
|
||||
|
||||
\bibitem{oracle2024javafx}
|
||||
Oracle. (2024).
|
||||
\textit{JavaFX Documentation} (Version 17).
|
||||
\url{https://openjfx.io/javadoc/17/}
|
||||
|
||||
\bibitem{google2024gson}
|
||||
Google. (2024).
|
||||
\textit{Gson User Guide}.
|
||||
\url{https://github.com/google/gson/blob/master/UserGuide.md}
|
||||
|
||||
\bibitem{law2000}
|
||||
Law, A. M., \& Kelton, W. D. (2000).
|
||||
\textit{Simulation Modeling and Analysis} (3rd ed.).
|
||||
McGraw-Hill.
|
||||
|
||||
\end{thebibliography}
|
||||
|
||||
\vspace{1cm}
|
||||
\noindent\textbf{Nota:} Este relatório foi elaborado com base na análise do código-fonte do projeto e nos resultados experimentais obtidos através de múltiplas execuções da simulação. Todos os valores estatísticos apresentados foram extraídos dos ficheiros de análise gerados pelo sistema (\texttt{analysis/LOW\_LOAD\_*.txt}, \texttt{analysis/MEDIUM\_LOAD\_*.txt}, \texttt{analysis/HIGH\_LOAD\_*.txt}).
|
||||
|
||||
\end{document}
|
||||
@@ -1,6 +0,0 @@
|
||||
Execução,VeículosGerados,VeículosCompletados,TaxaConclusão,TempoMédioSistema,TempoMédioEspera,TempoMínimoSistema,TempoMáximoSistema
|
||||
1,1784,877,49.16,64.58,61.43,32.29,129.16
|
||||
2,1782,363,20.37,53.77,51.01,26.88,107.53
|
||||
3,1786,883,49.44,53.09,50.08,26.54,106.17
|
||||
4,1845,179,9.70,63.92,60.27,31.96,127.84
|
||||
5,1872,953,50.91,65.41,62.16,32.70,130.81
|
||||
|
@@ -1,215 +0,0 @@
|
||||
================================================================================
|
||||
ANÁLISE ESTATÍSTICA MULTI-EXECUÇÃO
|
||||
================================================================================
|
||||
Configuração: simulation-high.properties
|
||||
Número de Execuções: 5
|
||||
Data da Análise: 2025-12-07 00:11:13
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
MÉTRICAS GLOBAIS
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Veículos Gerados:
|
||||
Média: 1813.80 Desvio Padrão: 41.93
|
||||
Mediana: 1786.00 IC 95%: [1754.13, 1873.47]
|
||||
Mín: 1782.00 Máx: 1872.00
|
||||
|
||||
Veículos Completados:
|
||||
Média: 651.00 Desvio Padrão: 354.20
|
||||
Mediana: 877.00 IC 95%: [146.96, 1155.04]
|
||||
Mín: 179.00 Máx: 953.00
|
||||
|
||||
Taxa de Conclusão (%):
|
||||
Média: 35.92 Desvio Padrão: 19.44
|
||||
Mediana: 49.16 IC 95%: [8.25, 63.58]
|
||||
Mín: 9.70 Máx: 50.91
|
||||
|
||||
Tempo Médio no Sistema (segundos):
|
||||
Média: 60.15 Desvio Padrão: 6.17
|
||||
Mediana: 63.92 IC 95%: [51.38, 68.93]
|
||||
Mín: 53.09 Máx: 65.41
|
||||
|
||||
Tempo Médio de Espera (segundos):
|
||||
Média: 56.99 Desvio Padrão: 5.93
|
||||
Mediana: 60.27 IC 95%: [48.55, 65.43]
|
||||
Mín: 50.08 Máx: 62.16
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
ANÁLISE POR TIPO DE VEÍCULO
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
--- BIKE ---
|
||||
Contagem de Veículos:
|
||||
Média: 135.40 Desvio Padrão: 77.66
|
||||
Mediana: 167.00 IC 95%: [24.89, 245.91]
|
||||
Mín: 37.00 Máx: 211.00
|
||||
|
||||
Tempo Médio no Sistema (segundos): Sem dados
|
||||
|
||||
Tempo Médio de Espera (segundos):
|
||||
Média: 55.15 Desvio Padrão: 12.01
|
||||
Mediana: 54.23 IC 95%: [38.07, 72.24]
|
||||
Mín: 43.41 Máx: 74.99
|
||||
|
||||
|
||||
--- LIGHT ---
|
||||
Contagem de Veículos:
|
||||
Média: 395.00 Desvio Padrão: 207.62
|
||||
Mediana: 540.00 IC 95%: [99.55, 690.45]
|
||||
Mín: 107.00 Máx: 548.00
|
||||
|
||||
Tempo Médio no Sistema (segundos): Sem dados
|
||||
|
||||
Tempo Médio de Espera (segundos):
|
||||
Média: 59.79 Desvio Padrão: 7.28
|
||||
Mediana: 61.58 IC 95%: [49.43, 70.15]
|
||||
Mín: 50.81 Máx: 69.26
|
||||
|
||||
|
||||
--- HEAVY ---
|
||||
Contagem de Veículos:
|
||||
Média: 120.60 Desvio Padrão: 72.95
|
||||
Mediana: 142.00 IC 95%: [16.79, 224.41]
|
||||
Mín: 35.00 Máx: 202.00
|
||||
|
||||
Tempo Médio no Sistema (segundos): Sem dados
|
||||
|
||||
Tempo Médio de Espera (segundos):
|
||||
Média: 49.20 Desvio Padrão: 8.62
|
||||
Mediana: 50.31 IC 95%: [36.94, 61.46]
|
||||
Mín: 35.51 Máx: 58.20
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
ANÁLISE POR INTERSEÇÃO
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
--- Cr1 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 3.20 Desvio Padrão: 5.54
|
||||
Mediana: 1.00 IC 95%: [-4.68, 11.08]
|
||||
Mín: 0.00 Máx: 13.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 3.20 Desvio Padrão: 5.54
|
||||
Mediana: 1.00 IC 95%: [-4.68, 11.08]
|
||||
Mín: 0.00 Máx: 13.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 378.40 Desvio Padrão: 252.94
|
||||
Mediana: 512.00 IC 95%: [18.46, 738.34]
|
||||
Mín: 58.00 Máx: 600.00
|
||||
|
||||
|
||||
--- Cr2 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 0.60 Desvio Padrão: 1.34
|
||||
Mediana: 0.00 IC 95%: [-1.31, 2.51]
|
||||
Mín: 0.00 Máx: 3.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 0.60 Desvio Padrão: 1.34
|
||||
Mediana: 0.00 IC 95%: [-1.31, 2.51]
|
||||
Mín: 0.00 Máx: 3.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 390.40 Desvio Padrão: 223.14
|
||||
Mediana: 409.00 IC 95%: [72.87, 707.93]
|
||||
Mín: 59.00 Máx: 599.00
|
||||
|
||||
|
||||
--- Cr3 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 6.20 Desvio Padrão: 8.67
|
||||
Mediana: 0.00 IC 95%: [-6.14, 18.54]
|
||||
Mín: 0.00 Máx: 18.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 6.20 Desvio Padrão: 8.67
|
||||
Mediana: 0.00 IC 95%: [-6.14, 18.54]
|
||||
Mín: 0.00 Máx: 18.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 339.00 Desvio Padrão: 239.34
|
||||
Mediana: 416.00 IC 95%: [-1.59, 679.59]
|
||||
Mín: 57.00 Máx: 622.00
|
||||
|
||||
|
||||
--- Cr4 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 0.60 Desvio Padrão: 0.89
|
||||
Mediana: 0.00 IC 95%: [-0.67, 1.87]
|
||||
Mín: 0.00 Máx: 2.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 0.60 Desvio Padrão: 0.89
|
||||
Mediana: 0.00 IC 95%: [-0.67, 1.87]
|
||||
Mín: 0.00 Máx: 2.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 123.40 Desvio Padrão: 116.13
|
||||
Mediana: 109.00 IC 95%: [-41.85, 288.65]
|
||||
Mín: 21.00 Máx: 316.00
|
||||
|
||||
|
||||
--- Cr5 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 2.40 Desvio Padrão: 1.14
|
||||
Mediana: 2.00 IC 95%: [0.78, 4.02]
|
||||
Mín: 1.00 Máx: 4.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 2.40 Desvio Padrão: 1.14
|
||||
Mediana: 2.00 IC 95%: [0.78, 4.02]
|
||||
Mín: 1.00 Máx: 4.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 200.80 Desvio Padrão: 114.19
|
||||
Mediana: 261.00 IC 95%: [38.31, 363.29]
|
||||
Mín: 70.00 Máx: 305.00
|
||||
|
||||
|
||||
--- ExitNode ---
|
||||
Tamanho Máximo da Fila: Sem dados
|
||||
|
||||
Tamanho Médio da Fila: Sem dados
|
||||
|
||||
Veículos Processados:
|
||||
Média: 651.00 Desvio Padrão: 354.20
|
||||
Mediana: 877.00 IC 95%: [146.96, 1155.04]
|
||||
Mín: 179.00 Máx: 953.00
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
RESUMOS INDIVIDUAIS DAS EXECUÇÕES
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Execução #1 [simulation-high.properties]:
|
||||
Gerados: 1784, Completados: 877 (49.2%)
|
||||
Tempo Médio no Sistema: 64.58s
|
||||
Tempo Médio de Espera: 61.43s
|
||||
|
||||
Execução #2 [simulation-high.properties]:
|
||||
Gerados: 1782, Completados: 363 (20.4%)
|
||||
Tempo Médio no Sistema: 53.77s
|
||||
Tempo Médio de Espera: 51.01s
|
||||
|
||||
Execução #3 [simulation-high.properties]:
|
||||
Gerados: 1786, Completados: 883 (49.4%)
|
||||
Tempo Médio no Sistema: 53.09s
|
||||
Tempo Médio de Espera: 50.08s
|
||||
|
||||
Execução #4 [simulation-high.properties]:
|
||||
Gerados: 1845, Completados: 179 (9.7%)
|
||||
Tempo Médio no Sistema: 63.92s
|
||||
Tempo Médio de Espera: 60.27s
|
||||
|
||||
Execução #5 [simulation-high.properties]:
|
||||
Gerados: 1872, Completados: 953 (50.9%)
|
||||
Tempo Médio no Sistema: 65.41s
|
||||
Tempo Médio de Espera: 62.16s
|
||||
|
||||
================================================================================
|
||||
FIM DO RELATÓRIO
|
||||
================================================================================
|
||||
6
main/analysis/HIGH_LOAD_20251208-082040.csv
Normal file
@@ -0,0 +1,6 @@
|
||||
Execução,VeículosGerados,VeículosCompletados,TaxaConclusão,TempoMédioSistema,TempoMédioEspera,TempoMínimoSistema,TempoMáximoSistema
|
||||
1,1836,348,18.95,75.91,72.28,37.96,151.82
|
||||
2,1728,663,38.37,52.10,49.52,26.05,104.21
|
||||
3,1747,539,30.85,116.39,112.54,58.19,232.78
|
||||
4,1769,149,8.42,89.64,85.89,44.82,179.29
|
||||
5,1827,1097,60.04,90.49,86.93,45.25,180.98
|
||||
|
215
main/analysis/HIGH_LOAD_20251208-082040.txt
Normal file
@@ -0,0 +1,215 @@
|
||||
================================================================================
|
||||
ANÁLISE ESTATÍSTICA MULTI-EXECUÇÃO
|
||||
================================================================================
|
||||
Configuração: simulation-high.properties
|
||||
Número de Execuções: 5
|
||||
Data da Análise: 2025-12-08 08:20:40
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
MÉTRICAS GLOBAIS
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Veículos Gerados:
|
||||
Média: 1781.40 Desvio Padrão: 48.09
|
||||
Mediana: 1769.00 IC 95%: [1712.97, 1849.83]
|
||||
Mín: 1728.00 Máx: 1836.00
|
||||
|
||||
Veículos Completados:
|
||||
Média: 559.20 Desvio Padrão: 358.22
|
||||
Mediana: 539.00 IC 95%: [49.44, 1068.96]
|
||||
Mín: 149.00 Máx: 1097.00
|
||||
|
||||
Taxa de Conclusão (%):
|
||||
Média: 31.33 Desvio Padrão: 19.70
|
||||
Mediana: 30.85 IC 95%: [3.30, 59.36]
|
||||
Mín: 8.42 Máx: 60.04
|
||||
|
||||
Tempo Médio no Sistema (segundos):
|
||||
Média: 84.91 Desvio Padrão: 23.46
|
||||
Mediana: 89.64 IC 95%: [51.52, 118.29]
|
||||
Mín: 52.10 Máx: 116.39
|
||||
|
||||
Tempo Médio de Espera (segundos):
|
||||
Média: 81.43 Desvio Padrão: 23.02
|
||||
Mediana: 85.89 IC 95%: [48.68, 114.19]
|
||||
Mín: 49.52 Máx: 112.54
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
ANÁLISE POR TIPO DE VEÍCULO
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
--- BIKE ---
|
||||
Contagem de Veículos:
|
||||
Média: 111.60 Desvio Padrão: 69.43
|
||||
Mediana: 105.00 IC 95%: [12.80, 210.40]
|
||||
Mín: 29.00 Máx: 215.00
|
||||
|
||||
Tempo Médio no Sistema (segundos): Sem dados
|
||||
|
||||
Tempo Médio de Espera (segundos):
|
||||
Média: 78.89 Desvio Padrão: 20.87
|
||||
Mediana: 89.97 IC 95%: [49.20, 108.59]
|
||||
Mín: 49.27 Máx: 98.23
|
||||
|
||||
|
||||
--- LIGHT ---
|
||||
Contagem de Veículos:
|
||||
Média: 333.80 Desvio Padrão: 221.25
|
||||
Mediana: 332.00 IC 95%: [18.95, 648.65]
|
||||
Mín: 90.00 Máx: 669.00
|
||||
|
||||
Tempo Médio no Sistema (segundos): Sem dados
|
||||
|
||||
Tempo Médio de Espera (segundos):
|
||||
Média: 83.83 Desvio Padrão: 24.74
|
||||
Mediana: 86.14 IC 95%: [48.63, 119.03]
|
||||
Mín: 51.94 Máx: 120.26
|
||||
|
||||
|
||||
--- HEAVY ---
|
||||
Contagem de Veículos:
|
||||
Média: 113.80 Desvio Padrão: 68.36
|
||||
Mediana: 102.00 IC 95%: [16.53, 211.07]
|
||||
Mín: 30.00 Máx: 213.00
|
||||
|
||||
Tempo Médio no Sistema (segundos): Sem dados
|
||||
|
||||
Tempo Médio de Espera (segundos):
|
||||
Média: 76.79 Desvio Padrão: 21.46
|
||||
Mediana: 81.20 IC 95%: [46.26, 107.33]
|
||||
Mín: 43.10 Máx: 102.14
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
ANÁLISE POR INTERSEÇÃO
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
--- Cr1 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 0.20 Desvio Padrão: 0.45
|
||||
Mediana: 0.00 IC 95%: [-0.44, 0.84]
|
||||
Mín: 0.00 Máx: 1.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 0.20 Desvio Padrão: 0.45
|
||||
Mediana: 0.00 IC 95%: [-0.44, 0.84]
|
||||
Mín: 0.00 Máx: 1.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 221.40 Desvio Padrão: 226.21
|
||||
Mediana: 128.00 IC 95%: [-100.50, 543.30]
|
||||
Mín: 61.00 Máx: 616.00
|
||||
|
||||
|
||||
--- Cr2 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 3.60 Desvio Padrão: 5.90
|
||||
Mediana: 2.00 IC 95%: [-4.79, 11.99]
|
||||
Mín: 0.00 Máx: 14.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 3.60 Desvio Padrão: 5.90
|
||||
Mediana: 2.00 IC 95%: [-4.79, 11.99]
|
||||
Mín: 0.00 Máx: 14.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 228.60 Desvio Padrão: 211.41
|
||||
Mediana: 126.00 IC 95%: [-72.24, 529.44]
|
||||
Mín: 93.00 Máx: 593.00
|
||||
|
||||
|
||||
--- Cr3 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 1.20 Desvio Padrão: 2.68
|
||||
Mediana: 0.00 IC 95%: [-2.62, 5.02]
|
||||
Mín: 0.00 Máx: 6.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 1.20 Desvio Padrão: 2.68
|
||||
Mediana: 0.00 IC 95%: [-2.62, 5.02]
|
||||
Mín: 0.00 Máx: 6.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 263.80 Desvio Padrão: 240.18
|
||||
Mediana: 128.00 IC 95%: [-77.98, 605.58]
|
||||
Mín: 57.00 Máx: 604.00
|
||||
|
||||
|
||||
--- Cr4 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 0.60 Desvio Padrão: 0.89
|
||||
Mediana: 0.00 IC 95%: [-0.67, 1.87]
|
||||
Mín: 0.00 Máx: 2.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 0.60 Desvio Padrão: 0.89
|
||||
Mediana: 0.00 IC 95%: [-0.67, 1.87]
|
||||
Mín: 0.00 Máx: 2.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 95.00 Desvio Padrão: 78.43
|
||||
Mediana: 62.00 IC 95%: [-16.60, 206.60]
|
||||
Mín: 43.00 Máx: 231.00
|
||||
|
||||
|
||||
--- Cr5 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 2.80 Desvio Padrão: 3.63
|
||||
Mediana: 1.00 IC 95%: [-2.37, 7.97]
|
||||
Mín: 0.00 Máx: 9.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 2.80 Desvio Padrão: 3.63
|
||||
Mediana: 1.00 IC 95%: [-2.37, 7.97]
|
||||
Mín: 0.00 Máx: 9.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 207.60 Desvio Padrão: 166.31
|
||||
Mediana: 139.00 IC 95%: [-29.06, 444.26]
|
||||
Mín: 76.00 Máx: 493.00
|
||||
|
||||
|
||||
--- ExitNode ---
|
||||
Tamanho Máximo da Fila: Sem dados
|
||||
|
||||
Tamanho Médio da Fila: Sem dados
|
||||
|
||||
Veículos Processados:
|
||||
Média: 559.20 Desvio Padrão: 358.22
|
||||
Mediana: 539.00 IC 95%: [49.44, 1068.96]
|
||||
Mín: 149.00 Máx: 1097.00
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
RESUMOS INDIVIDUAIS DAS EXECUÇÕES
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Execução #1 [simulation-high.properties]:
|
||||
Gerados: 1836, Completados: 348 (19.0%)
|
||||
Tempo Médio no Sistema: 75.91s
|
||||
Tempo Médio de Espera: 72.28s
|
||||
|
||||
Execução #2 [simulation-high.properties]:
|
||||
Gerados: 1728, Completados: 663 (38.4%)
|
||||
Tempo Médio no Sistema: 52.10s
|
||||
Tempo Médio de Espera: 49.52s
|
||||
|
||||
Execução #3 [simulation-high.properties]:
|
||||
Gerados: 1747, Completados: 539 (30.9%)
|
||||
Tempo Médio no Sistema: 116.39s
|
||||
Tempo Médio de Espera: 112.54s
|
||||
|
||||
Execução #4 [simulation-high.properties]:
|
||||
Gerados: 1769, Completados: 149 (8.4%)
|
||||
Tempo Médio no Sistema: 89.64s
|
||||
Tempo Médio de Espera: 85.89s
|
||||
|
||||
Execução #5 [simulation-high.properties]:
|
||||
Gerados: 1827, Completados: 1097 (60.0%)
|
||||
Tempo Médio no Sistema: 90.49s
|
||||
Tempo Médio de Espera: 86.93s
|
||||
|
||||
================================================================================
|
||||
FIM DO RELATÓRIO
|
||||
================================================================================
|
||||
@@ -1,6 +0,0 @@
|
||||
Execução,VeículosGerados,VeículosCompletados,TaxaConclusão,TempoMédioSistema,TempoMédioEspera,TempoMínimoSistema,TempoMáximoSistema
|
||||
1,371,187,50.40,42.28,38.65,21.14,84.57
|
||||
2,361,263,72.85,29.15,25.29,14.57,58.30
|
||||
3,368,197,53.53,38.02,33.95,19.01,76.04
|
||||
4,350,239,68.29,32.38,28.36,16.19,64.75
|
||||
5,373,212,56.84,23.36,19.96,11.68,46.73
|
||||
|
@@ -1,209 +0,0 @@
|
||||
================================================================================
|
||||
ANÁLISE ESTATÍSTICA MULTI-EXECUÇÃO
|
||||
================================================================================
|
||||
Configuração: simulation-low.properties
|
||||
Número de Execuções: 5
|
||||
Data da Análise: 2025-12-07 00:09:57
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
MÉTRICAS GLOBAIS
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Veículos Gerados:
|
||||
Média: 364.60 Desvio Padrão: 9.34
|
||||
Mediana: 368.00 IC 95%: [351.30, 377.90]
|
||||
Mín: 350.00 Máx: 373.00
|
||||
|
||||
Veículos Completados:
|
||||
Média: 219.60 Desvio Padrão: 31.19
|
||||
Mediana: 212.00 IC 95%: [175.22, 263.98]
|
||||
Mín: 187.00 Máx: 263.00
|
||||
|
||||
Taxa de Conclusão (%):
|
||||
Média: 60.38 Desvio Padrão: 9.71
|
||||
Mediana: 56.84 IC 95%: [46.57, 74.20]
|
||||
Mín: 50.40 Máx: 72.85
|
||||
|
||||
Tempo Médio no Sistema (segundos):
|
||||
Média: 33.04 Desvio Padrão: 7.41
|
||||
Mediana: 32.38 IC 95%: [22.50, 43.58]
|
||||
Mín: 23.36 Máx: 42.28
|
||||
|
||||
Tempo Médio de Espera (segundos):
|
||||
Média: 29.24 Desvio Padrão: 7.30
|
||||
Mediana: 28.36 IC 95%: [18.85, 39.63]
|
||||
Mín: 19.96 Máx: 38.65
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
ANÁLISE POR TIPO DE VEÍCULO
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
--- BIKE ---
|
||||
Contagem de Veículos:
|
||||
Média: 41.00 Desvio Padrão: 6.96
|
||||
Mediana: 43.00 IC 95%: [31.09, 50.91]
|
||||
Mín: 33.00 Máx: 50.00
|
||||
|
||||
Tempo Médio no Sistema (segundos): Sem dados
|
||||
|
||||
Tempo Médio de Espera (segundos):
|
||||
Média: 25.91 Desvio Padrão: 3.91
|
||||
Mediana: 26.98 IC 95%: [20.35, 31.47]
|
||||
Mín: 19.60 Máx: 30.06
|
||||
|
||||
|
||||
--- LIGHT ---
|
||||
Contagem de Veículos:
|
||||
Média: 134.00 Desvio Padrão: 24.07
|
||||
Mediana: 130.00 IC 95%: [99.74, 168.26]
|
||||
Mín: 104.00 Máx: 167.00
|
||||
|
||||
Tempo Médio no Sistema (segundos): Sem dados
|
||||
|
||||
Tempo Médio de Espera (segundos):
|
||||
Média: 29.34 Desvio Padrão: 6.83
|
||||
Mediana: 27.89 IC 95%: [19.62, 39.06]
|
||||
Mín: 20.73 Máx: 36.42
|
||||
|
||||
|
||||
--- HEAVY ---
|
||||
Contagem de Veículos:
|
||||
Média: 44.60 Desvio Padrão: 3.44
|
||||
Mediana: 46.00 IC 95%: [39.71, 49.49]
|
||||
Mín: 40.00 Máx: 48.00
|
||||
|
||||
Tempo Médio no Sistema (segundos): Sem dados
|
||||
|
||||
Tempo Médio de Espera (segundos):
|
||||
Média: 32.11 Desvio Padrão: 15.90
|
||||
Mediana: 30.74 IC 95%: [9.48, 54.74]
|
||||
Mín: 18.09 Máx: 58.73
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
ANÁLISE POR INTERSEÇÃO
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
--- Cr1 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 0.60 Desvio Padrão: 1.34
|
||||
Mediana: 0.00 IC 95%: [-1.31, 2.51]
|
||||
Mín: 0.00 Máx: 3.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 0.60 Desvio Padrão: 1.34
|
||||
Mediana: 0.00 IC 95%: [-1.31, 2.51]
|
||||
Mín: 0.00 Máx: 3.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 63.80 Desvio Padrão: 17.25
|
||||
Mediana: 57.00 IC 95%: [39.25, 88.35]
|
||||
Mín: 48.00 Máx: 91.00
|
||||
|
||||
|
||||
--- Cr2 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 0.80 Desvio Padrão: 1.79
|
||||
Mediana: 0.00 IC 95%: [-1.75, 3.35]
|
||||
Mín: 0.00 Máx: 4.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 0.80 Desvio Padrão: 1.79
|
||||
Mediana: 0.00 IC 95%: [-1.75, 3.35]
|
||||
Mín: 0.00 Máx: 4.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 56.20 Desvio Padrão: 18.51
|
||||
Mediana: 50.00 IC 95%: [29.86, 82.54]
|
||||
Mín: 35.00 Máx: 78.00
|
||||
|
||||
|
||||
--- Cr3 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 1.00 Desvio Padrão: 1.41
|
||||
Mediana: 0.00 IC 95%: [-1.01, 3.01]
|
||||
Mín: 0.00 Máx: 3.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 1.00 Desvio Padrão: 1.41
|
||||
Mediana: 0.00 IC 95%: [-1.01, 3.01]
|
||||
Mín: 0.00 Máx: 3.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 63.20 Desvio Padrão: 23.97
|
||||
Mediana: 56.00 IC 95%: [29.09, 97.31]
|
||||
Mín: 41.00 Máx: 104.00
|
||||
|
||||
|
||||
--- Cr4 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 1.80 Desvio Padrão: 2.49
|
||||
Mediana: 0.00 IC 95%: [-1.74, 5.34]
|
||||
Mín: 0.00 Máx: 5.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 1.80 Desvio Padrão: 2.49
|
||||
Mediana: 0.00 IC 95%: [-1.74, 5.34]
|
||||
Mín: 0.00 Máx: 5.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 51.00 Desvio Padrão: 16.05
|
||||
Mediana: 53.00 IC 95%: [28.16, 73.84]
|
||||
Mín: 31.00 Máx: 70.00
|
||||
|
||||
|
||||
--- Cr5 ---
|
||||
Tamanho Máximo da Fila: Sem dados
|
||||
|
||||
Tamanho Médio da Fila: Sem dados
|
||||
|
||||
Veículos Processados:
|
||||
Média: 86.60 Desvio Padrão: 34.20
|
||||
Mediana: 65.00 IC 95%: [37.94, 135.26]
|
||||
Mín: 62.00 Máx: 139.00
|
||||
|
||||
|
||||
--- ExitNode ---
|
||||
Tamanho Máximo da Fila: Sem dados
|
||||
|
||||
Tamanho Médio da Fila: Sem dados
|
||||
|
||||
Veículos Processados:
|
||||
Média: 219.60 Desvio Padrão: 31.19
|
||||
Mediana: 212.00 IC 95%: [175.22, 263.98]
|
||||
Mín: 187.00 Máx: 263.00
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
RESUMOS INDIVIDUAIS DAS EXECUÇÕES
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Execução #1 [simulation-low.properties]:
|
||||
Gerados: 371, Completados: 187 (50.4%)
|
||||
Tempo Médio no Sistema: 42.28s
|
||||
Tempo Médio de Espera: 38.65s
|
||||
|
||||
Execução #2 [simulation-low.properties]:
|
||||
Gerados: 361, Completados: 263 (72.9%)
|
||||
Tempo Médio no Sistema: 29.15s
|
||||
Tempo Médio de Espera: 25.29s
|
||||
|
||||
Execução #3 [simulation-low.properties]:
|
||||
Gerados: 368, Completados: 197 (53.5%)
|
||||
Tempo Médio no Sistema: 38.02s
|
||||
Tempo Médio de Espera: 33.95s
|
||||
|
||||
Execução #4 [simulation-low.properties]:
|
||||
Gerados: 350, Completados: 239 (68.3%)
|
||||
Tempo Médio no Sistema: 32.38s
|
||||
Tempo Médio de Espera: 28.36s
|
||||
|
||||
Execução #5 [simulation-low.properties]:
|
||||
Gerados: 373, Completados: 212 (56.8%)
|
||||
Tempo Médio no Sistema: 23.36s
|
||||
Tempo Médio de Espera: 19.96s
|
||||
|
||||
================================================================================
|
||||
FIM DO RELATÓRIO
|
||||
================================================================================
|
||||
5
main/analysis/LOW_LOAD_20251208-081357.csv
Normal file
@@ -0,0 +1,5 @@
|
||||
Execução,VeículosGerados,VeículosCompletados,TaxaConclusão,TempoMédioSistema,TempoMédioEspera,TempoMínimoSistema,TempoMáximoSistema
|
||||
1,354,228,64.41,40.36,36.75,20.18,80.72
|
||||
2,373,261,69.97,40.61,36.87,20.30,81.21
|
||||
3,353,235,66.57,32.63,29.04,16.32,65.27
|
||||
4,350,269,76.86,37.39,33.42,18.70,74.78
|
||||
|
204
main/analysis/LOW_LOAD_20251208-081357.txt
Normal file
@@ -0,0 +1,204 @@
|
||||
================================================================================
|
||||
ANÁLISE ESTATÍSTICA MULTI-EXECUÇÃO
|
||||
================================================================================
|
||||
Configuração: simulation-low.properties
|
||||
Número de Execuções: 4
|
||||
Data da Análise: 2025-12-08 08:13:57
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
MÉTRICAS GLOBAIS
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Veículos Gerados:
|
||||
Média: 357.50 Desvio Padrão: 10.47
|
||||
Mediana: 353.50 IC 95%: [340.84, 374.16]
|
||||
Mín: 350.00 Máx: 373.00
|
||||
|
||||
Veículos Completados:
|
||||
Média: 248.25 Desvio Padrão: 19.82
|
||||
Mediana: 248.00 IC 95%: [216.71, 279.79]
|
||||
Mín: 228.00 Máx: 269.00
|
||||
|
||||
Taxa de Conclusão (%):
|
||||
Média: 69.45 Desvio Padrão: 5.44
|
||||
Mediana: 68.27 IC 95%: [60.79, 78.11]
|
||||
Mín: 64.41 Máx: 76.86
|
||||
|
||||
Tempo Médio no Sistema (segundos):
|
||||
Média: 37.75 Desvio Padrão: 3.71
|
||||
Mediana: 38.87 IC 95%: [31.85, 43.65]
|
||||
Mín: 32.63 Máx: 40.61
|
||||
|
||||
Tempo Médio de Espera (segundos):
|
||||
Média: 34.02 Desvio Padrão: 3.68
|
||||
Mediana: 35.08 IC 95%: [28.16, 39.88]
|
||||
Mín: 29.04 Máx: 36.87
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
ANÁLISE POR TIPO DE VEÍCULO
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
--- BIKE ---
|
||||
Contagem de Veículos:
|
||||
Média: 52.25 Desvio Padrão: 8.58
|
||||
Mediana: 54.50 IC 95%: [38.60, 65.90]
|
||||
Mín: 40.00 Máx: 60.00
|
||||
|
||||
Tempo Médio no Sistema (segundos): Sem dados
|
||||
|
||||
Tempo Médio de Espera (segundos):
|
||||
Média: 43.39 Desvio Padrão: 19.65
|
||||
Mediana: 39.45 IC 95%: [12.12, 74.65]
|
||||
Mín: 25.04 Máx: 69.63
|
||||
|
||||
|
||||
--- LIGHT ---
|
||||
Contagem de Veículos:
|
||||
Média: 151.25 Desvio Padrão: 8.34
|
||||
Mediana: 152.50 IC 95%: [137.98, 164.52]
|
||||
Mín: 141.00 Máx: 159.00
|
||||
|
||||
Tempo Médio no Sistema (segundos): Sem dados
|
||||
|
||||
Tempo Médio de Espera (segundos):
|
||||
Média: 28.92 Desvio Padrão: 5.34
|
||||
Mediana: 28.76 IC 95%: [20.43, 37.42]
|
||||
Mín: 23.35 Máx: 34.82
|
||||
|
||||
|
||||
--- HEAVY ---
|
||||
Contagem de Veículos:
|
||||
Média: 44.75 Desvio Padrão: 6.29
|
||||
Mediana: 44.00 IC 95%: [34.74, 54.76]
|
||||
Mín: 39.00 Máx: 52.00
|
||||
|
||||
Tempo Médio no Sistema (segundos): Sem dados
|
||||
|
||||
Tempo Médio de Espera (segundos):
|
||||
Média: 43.02 Desvio Padrão: 13.73
|
||||
Mediana: 47.91 IC 95%: [21.18, 64.86]
|
||||
Mín: 22.83 Máx: 53.43
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
ANÁLISE POR INTERSEÇÃO
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
--- Cr1 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 0.25 Desvio Padrão: 0.50
|
||||
Mediana: 0.00 IC 95%: [-0.55, 1.05]
|
||||
Mín: 0.00 Máx: 1.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 0.25 Desvio Padrão: 0.50
|
||||
Mediana: 0.00 IC 95%: [-0.55, 1.05]
|
||||
Mín: 0.00 Máx: 1.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 105.50 Desvio Padrão: 10.66
|
||||
Mediana: 103.50 IC 95%: [88.54, 122.46]
|
||||
Mín: 95.00 Máx: 120.00
|
||||
|
||||
|
||||
--- Cr2 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 1.75 Desvio Padrão: 2.87
|
||||
Mediana: 0.50 IC 95%: [-2.82, 6.32]
|
||||
Mín: 0.00 Máx: 6.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 1.75 Desvio Padrão: 2.87
|
||||
Mediana: 0.50 IC 95%: [-2.82, 6.32]
|
||||
Mín: 0.00 Máx: 6.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 119.00 Desvio Padrão: 11.17
|
||||
Mediana: 122.50 IC 95%: [101.24, 136.76]
|
||||
Mín: 103.00 Máx: 128.00
|
||||
|
||||
|
||||
--- Cr3 ---
|
||||
Tamanho Máximo da Fila: Sem dados
|
||||
|
||||
Tamanho Médio da Fila: Sem dados
|
||||
|
||||
Veículos Processados:
|
||||
Média: 114.75 Desvio Padrão: 15.88
|
||||
Mediana: 119.00 IC 95%: [89.48, 140.02]
|
||||
Mín: 93.00 Máx: 128.00
|
||||
|
||||
|
||||
--- Cr4 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 1.25 Desvio Padrão: 0.50
|
||||
Mediana: 1.00 IC 95%: [0.45, 2.05]
|
||||
Mín: 1.00 Máx: 2.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 1.25 Desvio Padrão: 0.50
|
||||
Mediana: 1.00 IC 95%: [0.45, 2.05]
|
||||
Mín: 1.00 Máx: 2.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 63.00 Desvio Padrão: 11.75
|
||||
Mediana: 62.00 IC 95%: [44.31, 81.69]
|
||||
Mín: 50.00 Máx: 78.00
|
||||
|
||||
|
||||
--- Cr5 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 4.50 Desvio Padrão: 2.89
|
||||
Mediana: 4.50 IC 95%: [-0.09, 9.09]
|
||||
Mín: 1.00 Máx: 8.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 4.50 Desvio Padrão: 2.89
|
||||
Mediana: 4.50 IC 95%: [-0.09, 9.09]
|
||||
Mín: 1.00 Máx: 8.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 123.00 Desvio Padrão: 24.18
|
||||
Mediana: 116.50 IC 95%: [84.53, 161.47]
|
||||
Mín: 103.00 Máx: 156.00
|
||||
|
||||
|
||||
--- ExitNode ---
|
||||
Tamanho Máximo da Fila: Sem dados
|
||||
|
||||
Tamanho Médio da Fila: Sem dados
|
||||
|
||||
Veículos Processados:
|
||||
Média: 248.25 Desvio Padrão: 19.82
|
||||
Mediana: 248.00 IC 95%: [216.71, 279.79]
|
||||
Mín: 228.00 Máx: 269.00
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
RESUMOS INDIVIDUAIS DAS EXECUÇÕES
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Execução #1 [simulation-low.properties]:
|
||||
Gerados: 354, Completados: 228 (64.4%)
|
||||
Tempo Médio no Sistema: 40.36s
|
||||
Tempo Médio de Espera: 36.75s
|
||||
|
||||
Execução #2 [simulation-low.properties]:
|
||||
Gerados: 373, Completados: 261 (70.0%)
|
||||
Tempo Médio no Sistema: 40.61s
|
||||
Tempo Médio de Espera: 36.87s
|
||||
|
||||
Execução #3 [simulation-low.properties]:
|
||||
Gerados: 353, Completados: 235 (66.6%)
|
||||
Tempo Médio no Sistema: 32.63s
|
||||
Tempo Médio de Espera: 29.04s
|
||||
|
||||
Execução #4 [simulation-low.properties]:
|
||||
Gerados: 350, Completados: 269 (76.9%)
|
||||
Tempo Médio no Sistema: 37.39s
|
||||
Tempo Médio de Espera: 33.42s
|
||||
|
||||
================================================================================
|
||||
FIM DO RELATÓRIO
|
||||
================================================================================
|
||||
6
main/analysis/LOW_LOAD_20251208-081933.csv
Normal file
@@ -0,0 +1,6 @@
|
||||
Execução,VeículosGerados,VeículosCompletados,TaxaConclusão,TempoMédioSistema,TempoMédioEspera,TempoMínimoSistema,TempoMáximoSistema
|
||||
1,368,329,89.40,78.34,74.19,39.17,156.67
|
||||
2,368,218,59.24,60.44,56.64,30.22,120.89
|
||||
3,349,235,67.34,53.51,49.44,26.76,107.03
|
||||
4,332,243,73.19,69.63,65.50,34.82,139.27
|
||||
5,322,221,68.63,47.52,43.77,23.76,95.05
|
||||
|
215
main/analysis/LOW_LOAD_20251208-081933.txt
Normal file
@@ -0,0 +1,215 @@
|
||||
================================================================================
|
||||
ANÁLISE ESTATÍSTICA MULTI-EXECUÇÃO
|
||||
================================================================================
|
||||
Configuração: simulation-low.properties
|
||||
Número de Execuções: 5
|
||||
Data da Análise: 2025-12-08 08:19:33
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
MÉTRICAS GLOBAIS
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Veículos Gerados:
|
||||
Média: 347.80 Desvio Padrão: 20.81
|
||||
Mediana: 349.00 IC 95%: [318.18, 377.42]
|
||||
Mín: 322.00 Máx: 368.00
|
||||
|
||||
Veículos Completados:
|
||||
Média: 249.20 Desvio Padrão: 45.76
|
||||
Mediana: 235.00 IC 95%: [184.08, 314.32]
|
||||
Mín: 218.00 Máx: 329.00
|
||||
|
||||
Taxa de Conclusão (%):
|
||||
Média: 71.56 Desvio Padrão: 11.17
|
||||
Mediana: 68.63 IC 95%: [55.66, 87.46]
|
||||
Mín: 59.24 Máx: 89.40
|
||||
|
||||
Tempo Médio no Sistema (segundos):
|
||||
Média: 61.89 Desvio Padrão: 12.34
|
||||
Mediana: 60.44 IC 95%: [44.33, 79.45]
|
||||
Mín: 47.52 Máx: 78.34
|
||||
|
||||
Tempo Médio de Espera (segundos):
|
||||
Média: 57.91 Desvio Padrão: 12.21
|
||||
Mediana: 56.64 IC 95%: [40.54, 75.28]
|
||||
Mín: 43.77 Máx: 74.19
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
ANÁLISE POR TIPO DE VEÍCULO
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
--- BIKE ---
|
||||
Contagem de Veículos:
|
||||
Média: 48.20 Desvio Padrão: 12.38
|
||||
Mediana: 47.00 IC 95%: [30.59, 65.81]
|
||||
Mín: 36.00 Máx: 68.00
|
||||
|
||||
Tempo Médio no Sistema (segundos): Sem dados
|
||||
|
||||
Tempo Médio de Espera (segundos):
|
||||
Média: 51.22 Desvio Padrão: 16.62
|
||||
Mediana: 46.02 IC 95%: [27.56, 74.87]
|
||||
Mín: 40.06 Máx: 80.31
|
||||
|
||||
|
||||
--- LIGHT ---
|
||||
Contagem de Veículos:
|
||||
Média: 151.00 Desvio Padrão: 22.64
|
||||
Mediana: 146.00 IC 95%: [118.78, 183.22]
|
||||
Mín: 133.00 Máx: 189.00
|
||||
|
||||
Tempo Médio no Sistema (segundos): Sem dados
|
||||
|
||||
Tempo Médio de Espera (segundos):
|
||||
Média: 58.33 Desvio Padrão: 11.58
|
||||
Mediana: 53.58 IC 95%: [41.85, 74.80]
|
||||
Mín: 45.31 Máx: 74.17
|
||||
|
||||
|
||||
--- HEAVY ---
|
||||
Contagem de Veículos:
|
||||
Média: 50.00 Desvio Padrão: 13.77
|
||||
Mediana: 47.00 IC 95%: [30.41, 69.59]
|
||||
Mín: 35.00 Máx: 72.00
|
||||
|
||||
Tempo Médio no Sistema (segundos): Sem dados
|
||||
|
||||
Tempo Médio de Espera (segundos):
|
||||
Média: 60.73 Desvio Padrão: 34.92
|
||||
Mediana: 44.79 IC 95%: [11.04, 110.42]
|
||||
Mín: 40.26 Máx: 122.51
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
ANÁLISE POR INTERSEÇÃO
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
--- Cr1 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 5.00 Desvio Padrão: 4.47
|
||||
Mediana: 4.00 IC 95%: [-1.36, 11.36]
|
||||
Mín: 0.00 Máx: 12.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 5.00 Desvio Padrão: 4.47
|
||||
Mediana: 4.00 IC 95%: [-1.36, 11.36]
|
||||
Mín: 0.00 Máx: 12.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 87.00 Desvio Padrão: 29.01
|
||||
Mediana: 93.00 IC 95%: [45.72, 128.28]
|
||||
Mín: 56.00 Máx: 123.00
|
||||
|
||||
|
||||
--- Cr2 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 0.20 Desvio Padrão: 0.45
|
||||
Mediana: 0.00 IC 95%: [-0.44, 0.84]
|
||||
Mín: 0.00 Máx: 1.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 0.20 Desvio Padrão: 0.45
|
||||
Mediana: 0.00 IC 95%: [-0.44, 0.84]
|
||||
Mín: 0.00 Máx: 1.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 95.20 Desvio Padrão: 24.86
|
||||
Mediana: 100.00 IC 95%: [59.82, 130.58]
|
||||
Mín: 61.00 Máx: 125.00
|
||||
|
||||
|
||||
--- Cr3 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 0.20 Desvio Padrão: 0.45
|
||||
Mediana: 0.00 IC 95%: [-0.44, 0.84]
|
||||
Mín: 0.00 Máx: 1.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 0.20 Desvio Padrão: 0.45
|
||||
Mediana: 0.00 IC 95%: [-0.44, 0.84]
|
||||
Mín: 0.00 Máx: 1.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 91.40 Desvio Padrão: 28.68
|
||||
Mediana: 103.00 IC 95%: [50.58, 132.22]
|
||||
Mín: 56.00 Máx: 126.00
|
||||
|
||||
|
||||
--- Cr4 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 0.80 Desvio Padrão: 0.84
|
||||
Mediana: 1.00 IC 95%: [-0.39, 1.99]
|
||||
Mín: 0.00 Máx: 2.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 0.80 Desvio Padrão: 0.84
|
||||
Mediana: 1.00 IC 95%: [-0.39, 1.99]
|
||||
Mín: 0.00 Máx: 2.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 63.00 Desvio Padrão: 21.11
|
||||
Mediana: 62.00 IC 95%: [32.96, 93.04]
|
||||
Mín: 38.00 Máx: 87.00
|
||||
|
||||
|
||||
--- Cr5 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 2.20 Desvio Padrão: 2.59
|
||||
Mediana: 1.00 IC 95%: [-1.48, 5.88]
|
||||
Mín: 0.00 Máx: 5.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 2.20 Desvio Padrão: 2.59
|
||||
Mediana: 1.00 IC 95%: [-1.48, 5.88]
|
||||
Mín: 0.00 Máx: 5.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 126.40 Desvio Padrão: 45.39
|
||||
Mediana: 111.00 IC 95%: [61.81, 190.99]
|
||||
Mín: 86.00 Máx: 203.00
|
||||
|
||||
|
||||
--- ExitNode ---
|
||||
Tamanho Máximo da Fila: Sem dados
|
||||
|
||||
Tamanho Médio da Fila: Sem dados
|
||||
|
||||
Veículos Processados:
|
||||
Média: 249.20 Desvio Padrão: 45.76
|
||||
Mediana: 235.00 IC 95%: [184.08, 314.32]
|
||||
Mín: 218.00 Máx: 329.00
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
RESUMOS INDIVIDUAIS DAS EXECUÇÕES
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Execução #1 [simulation-low.properties]:
|
||||
Gerados: 368, Completados: 329 (89.4%)
|
||||
Tempo Médio no Sistema: 78.34s
|
||||
Tempo Médio de Espera: 74.19s
|
||||
|
||||
Execução #2 [simulation-low.properties]:
|
||||
Gerados: 368, Completados: 218 (59.2%)
|
||||
Tempo Médio no Sistema: 60.44s
|
||||
Tempo Médio de Espera: 56.64s
|
||||
|
||||
Execução #3 [simulation-low.properties]:
|
||||
Gerados: 349, Completados: 235 (67.3%)
|
||||
Tempo Médio no Sistema: 53.51s
|
||||
Tempo Médio de Espera: 49.44s
|
||||
|
||||
Execução #4 [simulation-low.properties]:
|
||||
Gerados: 332, Completados: 243 (73.2%)
|
||||
Tempo Médio no Sistema: 69.63s
|
||||
Tempo Médio de Espera: 65.50s
|
||||
|
||||
Execução #5 [simulation-low.properties]:
|
||||
Gerados: 322, Completados: 221 (68.6%)
|
||||
Tempo Médio no Sistema: 47.52s
|
||||
Tempo Médio de Espera: 43.77s
|
||||
|
||||
================================================================================
|
||||
FIM DO RELATÓRIO
|
||||
================================================================================
|
||||
@@ -1,6 +0,0 @@
|
||||
Execução,VeículosGerados,VeículosCompletados,TaxaConclusão,TempoMédioSistema,TempoMédioEspera,TempoMínimoSistema,TempoMáximoSistema
|
||||
1,950,416,43.79,49.34,45.70,24.67,98.68
|
||||
2,886,480,54.18,35.08,31.69,17.54,70.16
|
||||
3,954,535,56.08,43.76,40.30,21.88,87.51
|
||||
4,948,354,37.34,41.68,37.96,20.84,83.37
|
||||
5,898,312,34.74,52.56,49.26,26.28,105.13
|
||||
|
@@ -1,203 +0,0 @@
|
||||
================================================================================
|
||||
ANÁLISE ESTATÍSTICA MULTI-EXECUÇÃO
|
||||
================================================================================
|
||||
Configuração: simulation-medium.properties
|
||||
Número de Execuções: 5
|
||||
Data da Análise: 2025-12-07 00:10:34
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
MÉTRICAS GLOBAIS
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Veículos Gerados:
|
||||
Média: 927.20 Desvio Padrão: 32.48
|
||||
Mediana: 948.00 IC 95%: [880.97, 973.43]
|
||||
Mín: 886.00 Máx: 954.00
|
||||
|
||||
Veículos Completados:
|
||||
Média: 419.40 Desvio Padrão: 90.64
|
||||
Mediana: 416.00 IC 95%: [290.42, 548.38]
|
||||
Mín: 312.00 Máx: 535.00
|
||||
|
||||
Taxa de Conclusão (%):
|
||||
Média: 45.23 Desvio Padrão: 9.64
|
||||
Mediana: 43.79 IC 95%: [31.50, 58.95]
|
||||
Mín: 34.74 Máx: 56.08
|
||||
|
||||
Tempo Médio no Sistema (segundos):
|
||||
Média: 44.48 Desvio Padrão: 6.81
|
||||
Mediana: 43.76 IC 95%: [34.79, 54.18]
|
||||
Mín: 35.08 Máx: 52.56
|
||||
|
||||
Tempo Médio de Espera (segundos):
|
||||
Média: 40.98 Desvio Padrão: 6.83
|
||||
Mediana: 40.30 IC 95%: [31.26, 50.71]
|
||||
Mín: 31.69 Máx: 49.26
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
ANÁLISE POR TIPO DE VEÍCULO
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
--- BIKE ---
|
||||
Contagem de Veículos:
|
||||
Média: 75.80 Desvio Padrão: 15.96
|
||||
Mediana: 71.00 IC 95%: [53.09, 98.51]
|
||||
Mín: 56.00 Máx: 95.00
|
||||
|
||||
Tempo Médio no Sistema (segundos): Sem dados
|
||||
|
||||
Tempo Médio de Espera (segundos):
|
||||
Média: 42.34 Desvio Padrão: 10.81
|
||||
Mediana: 39.70 IC 95%: [26.96, 57.72]
|
||||
Mín: 31.96 Máx: 55.19
|
||||
|
||||
|
||||
--- LIGHT ---
|
||||
Contagem de Veículos:
|
||||
Média: 263.20 Desvio Padrão: 58.29
|
||||
Mediana: 265.00 IC 95%: [180.25, 346.15]
|
||||
Mín: 204.00 Máx: 344.00
|
||||
|
||||
Tempo Médio no Sistema (segundos): Sem dados
|
||||
|
||||
Tempo Médio de Espera (segundos):
|
||||
Média: 39.13 Desvio Padrão: 6.35
|
||||
Mediana: 38.08 IC 95%: [30.09, 48.17]
|
||||
Mín: 30.47 Máx: 47.99
|
||||
|
||||
|
||||
--- HEAVY ---
|
||||
Contagem de Veículos:
|
||||
Média: 80.40 Desvio Padrão: 19.11
|
||||
Mediana: 80.00 IC 95%: [53.20, 107.60]
|
||||
Mín: 52.00 Máx: 102.00
|
||||
|
||||
Tempo Médio no Sistema (segundos): Sem dados
|
||||
|
||||
Tempo Médio de Espera (segundos):
|
||||
Média: 48.02 Desvio Padrão: 30.99
|
||||
Mediana: 34.44 IC 95%: [3.92, 92.11]
|
||||
Mín: 32.46 Máx: 103.40
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
ANÁLISE POR INTERSEÇÃO
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
--- Cr1 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 5.60 Desvio Padrão: 11.44
|
||||
Mediana: 0.00 IC 95%: [-10.67, 21.87]
|
||||
Mín: 0.00 Máx: 26.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 5.60 Desvio Padrão: 11.44
|
||||
Mediana: 0.00 IC 95%: [-10.67, 21.87]
|
||||
Mín: 0.00 Máx: 26.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 156.00 Desvio Padrão: 122.81
|
||||
Mediana: 98.00 IC 95%: [-18.76, 330.76]
|
||||
Mín: 35.00 Máx: 306.00
|
||||
|
||||
|
||||
--- Cr2 ---
|
||||
Tamanho Máximo da Fila: Sem dados
|
||||
|
||||
Tamanho Médio da Fila: Sem dados
|
||||
|
||||
Veículos Processados:
|
||||
Média: 172.00 Desvio Padrão: 121.88
|
||||
Mediana: 116.00 IC 95%: [-1.44, 345.44]
|
||||
Mín: 66.00 Máx: 322.00
|
||||
|
||||
|
||||
--- Cr3 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 0.60 Desvio Padrão: 1.34
|
||||
Mediana: 0.00 IC 95%: [-1.31, 2.51]
|
||||
Mín: 0.00 Máx: 3.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 0.60 Desvio Padrão: 1.34
|
||||
Mediana: 0.00 IC 95%: [-1.31, 2.51]
|
||||
Mín: 0.00 Máx: 3.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 168.40 Desvio Padrão: 133.38
|
||||
Mediana: 121.00 IC 95%: [-21.40, 358.20]
|
||||
Mín: 48.00 Máx: 326.00
|
||||
|
||||
|
||||
--- Cr4 ---
|
||||
Tamanho Máximo da Fila: Sem dados
|
||||
|
||||
Tamanho Médio da Fila: Sem dados
|
||||
|
||||
Veículos Processados:
|
||||
Média: 71.80 Desvio Padrão: 20.39
|
||||
Mediana: 77.00 IC 95%: [42.79, 100.81]
|
||||
Mín: 38.00 Máx: 92.00
|
||||
|
||||
|
||||
--- Cr5 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 3.60 Desvio Padrão: 3.85
|
||||
Mediana: 2.00 IC 95%: [-1.87, 9.07]
|
||||
Mín: 0.00 Máx: 10.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 3.60 Desvio Padrão: 3.85
|
||||
Mediana: 2.00 IC 95%: [-1.87, 9.07]
|
||||
Mín: 0.00 Máx: 10.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 150.60 Desvio Padrão: 43.37
|
||||
Mediana: 126.00 IC 95%: [88.88, 212.32]
|
||||
Mín: 116.00 Máx: 209.00
|
||||
|
||||
|
||||
--- ExitNode ---
|
||||
Tamanho Máximo da Fila: Sem dados
|
||||
|
||||
Tamanho Médio da Fila: Sem dados
|
||||
|
||||
Veículos Processados:
|
||||
Média: 419.40 Desvio Padrão: 90.64
|
||||
Mediana: 416.00 IC 95%: [290.42, 548.38]
|
||||
Mín: 312.00 Máx: 535.00
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
RESUMOS INDIVIDUAIS DAS EXECUÇÕES
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Execução #1 [simulation-medium.properties]:
|
||||
Gerados: 950, Completados: 416 (43.8%)
|
||||
Tempo Médio no Sistema: 49.34s
|
||||
Tempo Médio de Espera: 45.70s
|
||||
|
||||
Execução #2 [simulation-medium.properties]:
|
||||
Gerados: 886, Completados: 480 (54.2%)
|
||||
Tempo Médio no Sistema: 35.08s
|
||||
Tempo Médio de Espera: 31.69s
|
||||
|
||||
Execução #3 [simulation-medium.properties]:
|
||||
Gerados: 954, Completados: 535 (56.1%)
|
||||
Tempo Médio no Sistema: 43.76s
|
||||
Tempo Médio de Espera: 40.30s
|
||||
|
||||
Execução #4 [simulation-medium.properties]:
|
||||
Gerados: 948, Completados: 354 (37.3%)
|
||||
Tempo Médio no Sistema: 41.68s
|
||||
Tempo Médio de Espera: 37.96s
|
||||
|
||||
Execução #5 [simulation-medium.properties]:
|
||||
Gerados: 898, Completados: 312 (34.7%)
|
||||
Tempo Médio no Sistema: 52.56s
|
||||
Tempo Médio de Espera: 49.26s
|
||||
|
||||
================================================================================
|
||||
FIM DO RELATÓRIO
|
||||
================================================================================
|
||||
6
main/analysis/MEDIUM_LOAD_20251208-082005.csv
Normal file
@@ -0,0 +1,6 @@
|
||||
Execução,VeículosGerados,VeículosCompletados,TaxaConclusão,TempoMédioSistema,TempoMédioEspera,TempoMínimoSistema,TempoMáximoSistema
|
||||
1,891,202,22.67,69.75,66.09,34.87,139.50
|
||||
2,871,340,39.04,68.73,64.73,34.37,137.46
|
||||
3,953,541,56.77,68.64,65.24,34.32,137.28
|
||||
4,888,501,56.42,60.85,57.48,30.42,121.69
|
||||
5,869,387,44.53,58.29,55.37,29.15,116.58
|
||||
|
209
main/analysis/MEDIUM_LOAD_20251208-082005.txt
Normal file
@@ -0,0 +1,209 @@
|
||||
================================================================================
|
||||
ANÁLISE ESTATÍSTICA MULTI-EXECUÇÃO
|
||||
================================================================================
|
||||
Configuração: simulation-medium.properties
|
||||
Número de Execuções: 5
|
||||
Data da Análise: 2025-12-08 08:20:05
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
MÉTRICAS GLOBAIS
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Veículos Gerados:
|
||||
Média: 894.40 Desvio Padrão: 34.20
|
||||
Mediana: 888.00 IC 95%: [845.73, 943.07]
|
||||
Mín: 869.00 Máx: 953.00
|
||||
|
||||
Veículos Completados:
|
||||
Média: 394.20 Desvio Padrão: 134.99
|
||||
Mediana: 387.00 IC 95%: [202.11, 586.29]
|
||||
Mín: 202.00 Máx: 541.00
|
||||
|
||||
Taxa de Conclusão (%):
|
||||
Média: 43.89 Desvio Padrão: 14.12
|
||||
Mediana: 44.53 IC 95%: [23.80, 63.97]
|
||||
Mín: 22.67 Máx: 56.77
|
||||
|
||||
Tempo Médio no Sistema (segundos):
|
||||
Média: 65.25 Desvio Padrão: 5.28
|
||||
Mediana: 68.64 IC 95%: [57.73, 72.77]
|
||||
Mín: 58.29 Máx: 69.75
|
||||
|
||||
Tempo Médio de Espera (segundos):
|
||||
Média: 61.78 Desvio Padrão: 4.97
|
||||
Mediana: 64.73 IC 95%: [54.71, 68.86]
|
||||
Mín: 55.37 Máx: 66.09
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
ANÁLISE POR TIPO DE VEÍCULO
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
--- BIKE ---
|
||||
Contagem de Veículos:
|
||||
Média: 83.60 Desvio Padrão: 28.80
|
||||
Mediana: 88.00 IC 95%: [42.62, 124.58]
|
||||
Mín: 42.00 Máx: 112.00
|
||||
|
||||
Tempo Médio no Sistema (segundos): Sem dados
|
||||
|
||||
Tempo Médio de Espera (segundos):
|
||||
Média: 64.62 Desvio Padrão: 9.80
|
||||
Mediana: 65.07 IC 95%: [50.67, 78.57]
|
||||
Mín: 53.82 Máx: 77.73
|
||||
|
||||
|
||||
--- LIGHT ---
|
||||
Contagem de Veículos:
|
||||
Média: 234.80 Desvio Padrão: 86.82
|
||||
Mediana: 221.00 IC 95%: [111.26, 358.34]
|
||||
Mín: 119.00 Máx: 328.00
|
||||
|
||||
Tempo Médio no Sistema (segundos): Sem dados
|
||||
|
||||
Tempo Médio de Espera (segundos):
|
||||
Média: 60.49 Desvio Padrão: 4.15
|
||||
Mediana: 61.41 IC 95%: [54.58, 66.39]
|
||||
Mín: 53.78 Máx: 65.19
|
||||
|
||||
|
||||
--- HEAVY ---
|
||||
Contagem de Veículos:
|
||||
Média: 75.80 Desvio Padrão: 21.70
|
||||
Mediana: 78.00 IC 95%: [44.93, 106.67]
|
||||
Mín: 41.00 Máx: 101.00
|
||||
|
||||
Tempo Médio no Sistema (segundos): Sem dados
|
||||
|
||||
Tempo Médio de Espera (segundos):
|
||||
Média: 62.90 Desvio Padrão: 13.27
|
||||
Mediana: 63.80 IC 95%: [44.01, 81.79]
|
||||
Mín: 42.19 Máx: 78.56
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
ANÁLISE POR INTERSEÇÃO
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
--- Cr1 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 2.00 Desvio Padrão: 2.55
|
||||
Mediana: 1.00 IC 95%: [-1.63, 5.63]
|
||||
Mín: 0.00 Máx: 6.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 2.00 Desvio Padrão: 2.55
|
||||
Mediana: 1.00 IC 95%: [-1.63, 5.63]
|
||||
Mín: 0.00 Máx: 6.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 106.20 Desvio Padrão: 62.26
|
||||
Mediana: 72.00 IC 95%: [17.60, 194.80]
|
||||
Mín: 56.00 Máx: 208.00
|
||||
|
||||
|
||||
--- Cr2 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 1.40 Desvio Padrão: 3.13
|
||||
Mediana: 0.00 IC 95%: [-3.05, 5.85]
|
||||
Mín: 0.00 Máx: 7.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 1.40 Desvio Padrão: 3.13
|
||||
Mediana: 0.00 IC 95%: [-3.05, 5.85]
|
||||
Mín: 0.00 Máx: 7.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 123.60 Desvio Padrão: 90.00
|
||||
Mediana: 102.00 IC 95%: [-4.47, 251.67]
|
||||
Mín: 49.00 Máx: 275.00
|
||||
|
||||
|
||||
--- Cr3 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 0.20 Desvio Padrão: 0.45
|
||||
Mediana: 0.00 IC 95%: [-0.44, 0.84]
|
||||
Mín: 0.00 Máx: 1.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 0.20 Desvio Padrão: 0.45
|
||||
Mediana: 0.00 IC 95%: [-0.44, 0.84]
|
||||
Mín: 0.00 Máx: 1.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 102.60 Desvio Padrão: 50.09
|
||||
Mediana: 104.00 IC 95%: [31.32, 173.88]
|
||||
Mín: 55.00 Máx: 181.00
|
||||
|
||||
|
||||
--- Cr4 ---
|
||||
Tamanho Máximo da Fila: Sem dados
|
||||
|
||||
Tamanho Médio da Fila: Sem dados
|
||||
|
||||
Veículos Processados:
|
||||
Média: 68.80 Desvio Padrão: 27.10
|
||||
Mediana: 60.00 IC 95%: [30.24, 107.36]
|
||||
Mín: 47.00 Máx: 113.00
|
||||
|
||||
|
||||
--- Cr5 ---
|
||||
Tamanho Máximo da Fila:
|
||||
Média: 1.20 Desvio Padrão: 2.17
|
||||
Mediana: 0.00 IC 95%: [-1.89, 4.29]
|
||||
Mín: 0.00 Máx: 5.00
|
||||
|
||||
Tamanho Médio da Fila:
|
||||
Média: 1.20 Desvio Padrão: 2.17
|
||||
Mediana: 0.00 IC 95%: [-1.89, 4.29]
|
||||
Mín: 0.00 Máx: 5.00
|
||||
|
||||
Veículos Processados:
|
||||
Média: 125.80 Desvio Padrão: 51.69
|
||||
Mediana: 96.00 IC 95%: [52.24, 199.36]
|
||||
Mín: 84.00 Máx: 193.00
|
||||
|
||||
|
||||
--- ExitNode ---
|
||||
Tamanho Máximo da Fila: Sem dados
|
||||
|
||||
Tamanho Médio da Fila: Sem dados
|
||||
|
||||
Veículos Processados:
|
||||
Média: 394.20 Desvio Padrão: 134.99
|
||||
Mediana: 387.00 IC 95%: [202.11, 586.29]
|
||||
Mín: 202.00 Máx: 541.00
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
RESUMOS INDIVIDUAIS DAS EXECUÇÕES
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Execução #1 [simulation-medium.properties]:
|
||||
Gerados: 891, Completados: 202 (22.7%)
|
||||
Tempo Médio no Sistema: 69.75s
|
||||
Tempo Médio de Espera: 66.09s
|
||||
|
||||
Execução #2 [simulation-medium.properties]:
|
||||
Gerados: 871, Completados: 340 (39.0%)
|
||||
Tempo Médio no Sistema: 68.73s
|
||||
Tempo Médio de Espera: 64.73s
|
||||
|
||||
Execução #3 [simulation-medium.properties]:
|
||||
Gerados: 953, Completados: 541 (56.8%)
|
||||
Tempo Médio no Sistema: 68.64s
|
||||
Tempo Médio de Espera: 65.24s
|
||||
|
||||
Execução #4 [simulation-medium.properties]:
|
||||
Gerados: 888, Completados: 501 (56.4%)
|
||||
Tempo Médio no Sistema: 60.85s
|
||||
Tempo Médio de Espera: 57.48s
|
||||
|
||||
Execução #5 [simulation-medium.properties]:
|
||||
Gerados: 869, Completados: 387 (44.5%)
|
||||
Tempo Médio no Sistema: 58.29s
|
||||
Tempo Médio de Espera: 55.37s
|
||||
|
||||
================================================================================
|
||||
FIM DO RELATÓRIO
|
||||
================================================================================
|
||||
@@ -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: 94 KiB |
|
Before Width: | Height: | Size: 198 KiB After Width: | Height: | Size: 218 KiB |
|
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 91 KiB |
@@ -40,6 +40,7 @@ import sd.protocol.SocketConnection;
|
||||
*/
|
||||
public class ExitNodeProcess {
|
||||
|
||||
// --- Configuration and Networking ---
|
||||
private final SimulationConfig config;
|
||||
private ServerSocket serverSocket;
|
||||
|
||||
|
||||
@@ -50,10 +50,11 @@ public class ConfigurationDialog {
|
||||
// Criar painel de configuração
|
||||
VBox content = new VBox(15);
|
||||
content.setPadding(new Insets(20));
|
||||
content.setStyle("-fx-background-color: #2b2b2b;");
|
||||
|
||||
// Seção 1: Parâmetros de Chegada
|
||||
Label arrivalHeader = new Label("Parâmetros de Chegada de Veículos");
|
||||
arrivalHeader.setStyle("-fx-font-weight: bold; -fx-font-size: 14px;");
|
||||
arrivalHeader.setStyle("-fx-font-weight: bold; -fx-font-size: 14px; -fx-text-fill: white;");
|
||||
|
||||
GridPane arrivalGrid = new GridPane();
|
||||
arrivalGrid.setHgap(10);
|
||||
@@ -62,6 +63,7 @@ public class ConfigurationDialog {
|
||||
|
||||
// Modelo de chegada
|
||||
Label modelLabel = new Label("Modelo de chegada:");
|
||||
modelLabel.setStyle("-fx-text-fill: white;");
|
||||
ComboBox<String> modelCombo = new ComboBox<>();
|
||||
modelCombo.getItems().addAll("POISSON", "FIXED");
|
||||
modelCombo.setValue("POISSON");
|
||||
@@ -70,6 +72,7 @@ public class ConfigurationDialog {
|
||||
|
||||
// Taxa de chegada (λ)
|
||||
Label rateLabel = new Label("Taxa de chegada (λ) [veículos/s]:");
|
||||
rateLabel.setStyle("-fx-text-fill: white;");
|
||||
Spinner<Double> rateSpinner = new Spinner<>(0.1, 2.0, 0.5, 0.1);
|
||||
rateSpinner.setEditable(true);
|
||||
rateSpinner.setPrefWidth(100);
|
||||
@@ -78,6 +81,7 @@ public class ConfigurationDialog {
|
||||
|
||||
// Intervalo fixo (se aplicável)
|
||||
Label intervalLabel = new Label("Intervalo fixo [s]:");
|
||||
intervalLabel.setStyle("-fx-text-fill: white;");
|
||||
Spinner<Double> intervalSpinner = new Spinner<>(0.5, 10.0, 2.0, 0.5);
|
||||
intervalSpinner.setEditable(true);
|
||||
intervalSpinner.setPrefWidth(100);
|
||||
@@ -94,7 +98,7 @@ public class ConfigurationDialog {
|
||||
|
||||
// Seção 2: Parâmetros de Tempo
|
||||
Label timeHeader = new Label("Parâmetros de Tempo");
|
||||
timeHeader.setStyle("-fx-font-weight: bold; -fx-font-size: 14px;");
|
||||
timeHeader.setStyle("-fx-font-weight: bold; -fx-font-size: 14px; -fx-text-fill: white;");
|
||||
|
||||
GridPane timeGrid = new GridPane();
|
||||
timeGrid.setHgap(10);
|
||||
@@ -103,6 +107,7 @@ public class ConfigurationDialog {
|
||||
|
||||
// Duração da simulação
|
||||
Label durationLabel = new Label("Duração da simulação [s]:");
|
||||
durationLabel.setStyle("-fx-text-fill: white;");
|
||||
Spinner<Integer> durationSpinner = new Spinner<>(60, 7200, 300, 60);
|
||||
durationSpinner.setEditable(true);
|
||||
durationSpinner.setPrefWidth(100);
|
||||
@@ -111,6 +116,7 @@ public class ConfigurationDialog {
|
||||
|
||||
// Escala temporal (para visualização)
|
||||
Label scaleLabel = new Label("Escala temporal (0=instantâneo, 1=tempo real):");
|
||||
scaleLabel.setStyle("-fx-text-fill: white;");
|
||||
Spinner<Double> scaleSpinner = new Spinner<>(0.0, 1.0, 0.01, 0.01);
|
||||
scaleSpinner.setEditable(true);
|
||||
scaleSpinner.setPrefWidth(100);
|
||||
@@ -119,6 +125,7 @@ public class ConfigurationDialog {
|
||||
|
||||
// Tempo de drenagem
|
||||
Label drainLabel = new Label("Tempo de drenagem [s]:");
|
||||
drainLabel.setStyle("-fx-text-fill: white;");
|
||||
Spinner<Integer> drainSpinner = new Spinner<>(0, 300, 60, 10);
|
||||
drainSpinner.setEditable(true);
|
||||
drainSpinner.setPrefWidth(100);
|
||||
@@ -127,7 +134,7 @@ public class ConfigurationDialog {
|
||||
|
||||
// Seção 3: Distribuição de Tipos de Veículos
|
||||
Label vehicleHeader = new Label("Distribuição de Tipos de Veículos");
|
||||
vehicleHeader.setStyle("-fx-font-weight: bold; -fx-font-size: 14px;");
|
||||
vehicleHeader.setStyle("-fx-font-weight: bold; -fx-font-size: 14px; -fx-text-fill: white;");
|
||||
|
||||
GridPane vehicleGrid = new GridPane();
|
||||
vehicleGrid.setHgap(10);
|
||||
@@ -135,6 +142,7 @@ public class ConfigurationDialog {
|
||||
vehicleGrid.setPadding(new Insets(10));
|
||||
|
||||
Label bikeLabel = new Label("Bicicletas/Motos [%]:");
|
||||
bikeLabel.setStyle("-fx-text-fill: white;");
|
||||
Spinner<Integer> bikeSpinner = new Spinner<>(0, 100, 10, 5);
|
||||
bikeSpinner.setEditable(true);
|
||||
bikeSpinner.setPrefWidth(100);
|
||||
@@ -142,6 +150,7 @@ public class ConfigurationDialog {
|
||||
vehicleGrid.add(bikeSpinner, 1, 0);
|
||||
|
||||
Label lightLabel = new Label("Veículos Ligeiros [%]:");
|
||||
lightLabel.setStyle("-fx-text-fill: white;");
|
||||
Spinner<Integer> lightSpinner = new Spinner<>(0, 100, 70, 5);
|
||||
lightSpinner.setEditable(true);
|
||||
lightSpinner.setPrefWidth(100);
|
||||
@@ -149,6 +158,7 @@ public class ConfigurationDialog {
|
||||
vehicleGrid.add(lightSpinner, 1, 1);
|
||||
|
||||
Label heavyLabel = new Label("Veículos Pesados [%]:");
|
||||
heavyLabel.setStyle("-fx-text-fill: white;");
|
||||
Spinner<Integer> heavySpinner = new Spinner<>(0, 100, 20, 5);
|
||||
heavySpinner.setEditable(true);
|
||||
heavySpinner.setPrefWidth(100);
|
||||
@@ -159,7 +169,7 @@ public class ConfigurationDialog {
|
||||
Label noteLabel = new Label("Nota: Estes parâmetros sobrepõem os valores do ficheiro .properties selecionado.\n" +
|
||||
"Para usar os valores padrão do ficheiro, deixe em branco ou cancele.");
|
||||
noteLabel.setWrapText(true);
|
||||
noteLabel.setStyle("-fx-font-size: 11px; -fx-text-fill: #666666;");
|
||||
noteLabel.setStyle("-fx-font-size: 11px; -fx-text-fill: #aaaaaa;");
|
||||
|
||||
// Adicionar tudo ao conteúdo
|
||||
content.getChildren().addAll(
|
||||
|
||||
@@ -96,6 +96,7 @@ public class DashboardUI extends Application {
|
||||
// Build UI Layout
|
||||
BorderPane root = new BorderPane();
|
||||
root.getStyleClass().add("root");
|
||||
root.setStyle("-fx-background-color: #2b2b2b;");
|
||||
|
||||
// Header (Top)
|
||||
VBox header = createHeader();
|
||||
|
||||
@@ -94,9 +94,6 @@ public class Intersection {
|
||||
*/
|
||||
public void receiveVehicle(Vehicle vehicle, double simulationTime) {
|
||||
totalVehiclesReceived++;
|
||||
|
||||
// Note: Route advancement is handled by SimulationEngine.handleVehicleArrival()
|
||||
// before calling this method, so we don't advance here.
|
||||
|
||||
String nextDestination = vehicle.getCurrentDestination();
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ package sd.protocol;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import sd.model.MessageType; // Assuming MessageType is in sd.model or sd.protocol
|
||||
import sd.model.MessageType;
|
||||
|
||||
/**
|
||||
* Contrato para todas as mensagens trocadas no simulador.
|
||||
|
||||
@@ -30,9 +30,30 @@ import sd.serialization.SerializerFactory;
|
||||
*/
|
||||
public class SocketConnection implements Closeable {
|
||||
|
||||
// --- Network Resources ---
|
||||
|
||||
/**
|
||||
* The underlying TCP socket used for network communication.
|
||||
*/
|
||||
private final Socket socket;
|
||||
|
||||
/**
|
||||
* The raw output stream for writing bytes to the network.
|
||||
* Wrapped by {@link DataOutputStream} during message sending.
|
||||
*/
|
||||
private final OutputStream outputStream;
|
||||
|
||||
/**
|
||||
* The raw input stream for reading bytes from the network.
|
||||
* Wrapped by {@link DataInputStream} during message reception.
|
||||
*/
|
||||
private final InputStream inputStream;
|
||||
|
||||
// --- Serialization ---
|
||||
|
||||
/**
|
||||
* The serializer strategy used to convert objects to/from byte arrays (e.g., JSON).
|
||||
*/
|
||||
private final MessageSerializer serializer;
|
||||
|
||||
/** Número máximo de tentativas de ligação antes de desistir (Fail-fast). */
|
||||
@@ -169,7 +190,7 @@ public class SocketConnection implements Closeable {
|
||||
}
|
||||
|
||||
try {
|
||||
// Lê um prefixo de 4 bytes - indicador de tamanho
|
||||
|
||||
DataInputStream dataIn = new DataInputStream(inputStream);
|
||||
int length = dataIn.readInt();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Global Styles */
|
||||
.root {
|
||||
-fx-background-color: #f4f7f6;
|
||||
-fx-background-color: #2b2b2b;
|
||||
-fx-font-family: 'Segoe UI', sans-serif;
|
||||
}
|
||||
|
||||
@@ -63,24 +63,24 @@
|
||||
|
||||
/* Cards / Panels */
|
||||
.card {
|
||||
-fx-background-color: white;
|
||||
-fx-background-color: #1e1e1e;
|
||||
-fx-background-radius: 8;
|
||||
-fx-effect: dropshadow(three-pass-box, rgba(0,0,0,0.05), 10, 0, 0, 2);
|
||||
-fx-effect: dropshadow(three-pass-box, rgba(0,0,0,0.3), 10, 0, 0, 2);
|
||||
-fx-padding: 0;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
-fx-background-color: #ecf0f1;
|
||||
-fx-background-color: #3a3a3a;
|
||||
-fx-background-radius: 8 8 0 0;
|
||||
-fx-padding: 10 15;
|
||||
-fx-border-color: #bdc3c7;
|
||||
-fx-border-color: #555555;
|
||||
-fx-border-width: 0 0 1 0;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
-fx-font-size: 16px;
|
||||
-fx-font-weight: bold;
|
||||
-fx-text-fill: #2c3e50;
|
||||
-fx-text-fill: white;
|
||||
}
|
||||
|
||||
.card-content {
|
||||
@@ -90,43 +90,48 @@
|
||||
/* Statistics Grid */
|
||||
.stat-label {
|
||||
-fx-font-size: 14px;
|
||||
-fx-text-fill: #7f8c8d;
|
||||
-fx-text-fill: #cccccc;
|
||||
}
|
||||
|
||||
.stat-value {
|
||||
-fx-font-size: 20px;
|
||||
-fx-font-weight: bold;
|
||||
-fx-text-fill: #2980b9;
|
||||
-fx-text-fill: #4ca1af;
|
||||
}
|
||||
|
||||
/* Tables */
|
||||
.table-view {
|
||||
-fx-background-color: transparent;
|
||||
-fx-background-color: #1e1e1e;
|
||||
-fx-border-color: transparent;
|
||||
}
|
||||
|
||||
.table-view .column-header-background {
|
||||
-fx-background-color: #ecf0f1;
|
||||
-fx-border-color: #bdc3c7;
|
||||
-fx-background-color: #3a3a3a;
|
||||
-fx-border-color: #555555;
|
||||
-fx-border-width: 0 0 1 0;
|
||||
}
|
||||
|
||||
.table-view .column-header .label {
|
||||
-fx-text-fill: #2c3e50;
|
||||
-fx-text-fill: white;
|
||||
-fx-font-weight: bold;
|
||||
}
|
||||
|
||||
.table-row-cell {
|
||||
-fx-background-color: white;
|
||||
-fx-background-color: #1e1e1e;
|
||||
-fx-border-color: transparent;
|
||||
-fx-text-fill: white;
|
||||
}
|
||||
|
||||
.table-row-cell:odd {
|
||||
-fx-background-color: #f9f9f9;
|
||||
-fx-background-color: #252525;
|
||||
}
|
||||
|
||||
.table-row-cell:selected {
|
||||
-fx-background-color: #3498db;
|
||||
-fx-background-color: #4ca1af;
|
||||
-fx-text-fill: white;
|
||||
}
|
||||
|
||||
.table-cell {
|
||||
-fx-text-fill: white;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +1,4 @@
|
||||
# =========================================================
|
||||
# Traffic Simulation Configuration - HIGH LOAD SCENARIO
|
||||
# ---------------------------------------------------------
|
||||
# High traffic scenario for testing system under heavy load.
|
||||
# Expected: Significant congestion, large queues, system stress test
|
||||
# =========================================================
|
||||
|
||||
# === NETWORK CONFIGURATION ===
|
||||
|
||||
# Intersections (each with its host and port)
|
||||
# Configuração de rede
|
||||
intersection.Cr1.host=localhost
|
||||
intersection.Cr1.port=8001
|
||||
intersection.Cr2.host=localhost
|
||||
@@ -19,67 +10,48 @@ intersection.Cr4.port=8004
|
||||
intersection.Cr5.host=localhost
|
||||
intersection.Cr5.port=8005
|
||||
|
||||
# Exit node
|
||||
exit.host=localhost
|
||||
exit.port=9001
|
||||
|
||||
# Dashboard server
|
||||
dashboard.host=localhost
|
||||
dashboard.port=9000
|
||||
|
||||
|
||||
# === SIMULATION CONFIGURATION ===
|
||||
|
||||
# Total duration in seconds (1800 = 30 minutes)
|
||||
# Configuração da simulação
|
||||
# Cenário de carga alta - tráfego pesado, teste de stress do sistema
|
||||
simulation.duration=1800
|
||||
|
||||
# Vehicle arrival model: FIXED or POISSON
|
||||
simulation.arrival.model=POISSON
|
||||
|
||||
# λ (lambda): HIGH LOAD = 1.0 vehicle per second (60 vehicles/minute, 3600 vehicles/hour)
|
||||
# This is 2x medium load - tests system capacity limits
|
||||
simulation.arrival.rate=1.0
|
||||
|
||||
# Fixed interval between arrivals (only used if model=FIXED)
|
||||
simulation.arrival.fixed.interval=2.0
|
||||
|
||||
# Routing policy: RANDOM, SHORTEST_PATH, LEAST_CONGESTED
|
||||
simulation.routing.policy=LEAST_CONGESTED
|
||||
|
||||
# Tempos dos semáforos (tempos realistas do mundo real, sem fase amarela)
|
||||
# Cruzamento 1 - ponto de entrada, verde mais longo
|
||||
trafficlight.Cr1.South.green=45.0
|
||||
trafficlight.Cr1.South.red=45.0
|
||||
trafficlight.Cr1.East.green=45.0
|
||||
trafficlight.Cr1.East.red=45.0
|
||||
|
||||
# === TRAFFIC LIGHT TIMINGS ===
|
||||
# Format: trafficlight.<intersection>.<direction>.<state>=<seconds>
|
||||
# Aggressive timings to maximize throughput under high load
|
||||
# Cruzamento 2 - hub principal, gargalo crítico, tempos máximos de verde
|
||||
trafficlight.Cr2.South.green=50.0
|
||||
trafficlight.Cr2.South.red=50.0
|
||||
trafficlight.Cr2.East.green=60.0
|
||||
trafficlight.Cr2.East.red=40.0
|
||||
trafficlight.Cr2.West.green=50.0
|
||||
trafficlight.Cr2.West.red=50.0
|
||||
|
||||
# Intersection 1 (Entry point - longer greens to prevent early backup)
|
||||
trafficlight.Cr1.South.green=60.0
|
||||
trafficlight.Cr1.South.red=3.0
|
||||
trafficlight.Cr1.East.green=60.0
|
||||
trafficlight.Cr1.East.red=3.0
|
||||
# Cruzamento 3 - caminho para a saída
|
||||
trafficlight.Cr3.South.green=40.0
|
||||
trafficlight.Cr3.South.red=45.0
|
||||
trafficlight.Cr3.West.green=45.0
|
||||
trafficlight.Cr3.West.red=40.0
|
||||
|
||||
# Intersection 2 (Main hub - CRITICAL BOTTLENECK, maximum green times)
|
||||
# This is the most critical intersection - all routes converge here
|
||||
trafficlight.Cr2.South.green=70.0
|
||||
trafficlight.Cr2.South.red=3.0
|
||||
trafficlight.Cr2.East.green=80.0
|
||||
trafficlight.Cr2.East.red=3.0
|
||||
trafficlight.Cr2.West.green=70.0
|
||||
trafficlight.Cr2.West.red=3.0
|
||||
# Cruzamento 4
|
||||
trafficlight.Cr4.East.green=45.0
|
||||
trafficlight.Cr4.East.red=45.0
|
||||
trafficlight.Cr4.North.green=45.0
|
||||
trafficlight.Cr4.North.red=45.0
|
||||
|
||||
# Intersection 3 (Path to exit - maximize East throughput to exit)
|
||||
trafficlight.Cr3.South.green=50.0
|
||||
trafficlight.Cr3.South.red=3.0
|
||||
trafficlight.Cr3.West.green=40.0
|
||||
trafficlight.Cr3.West.red=3.0
|
||||
|
||||
# Intersection 4 (High throughput needed toward Cr5)
|
||||
trafficlight.Cr4.East.green=70.0
|
||||
trafficlight.Cr4.East.red=3.0
|
||||
trafficlight.Cr4.North.green=70.0
|
||||
trafficlight.Cr4.North.red=3.0
|
||||
|
||||
# Intersection 5 (Near exit - MAJOR BOTTLENECK, longest green time)
|
||||
# All routes funnel through here before exit
|
||||
# Cruzamento 5 - perto da saída, gargalo principal
|
||||
trafficlight.Cr5.East.green=90.0
|
||||
trafficlight.Cr5.East.red=3.0
|
||||
trafficlight.Cr5.West.green=70.0
|
||||
@@ -87,40 +59,17 @@ trafficlight.Cr5.West.red=3.0
|
||||
trafficlight.Cr5.North.green=70.0
|
||||
trafficlight.Cr5.North.red=3.0
|
||||
|
||||
|
||||
# === VEHICLE CONFIGURATION ===
|
||||
# Probability distribution for vehicle types (must sum to 1.0)
|
||||
# Configuração de veículos
|
||||
vehicle.probability.bike=0.2
|
||||
vehicle.probability.light=0.6
|
||||
vehicle.probability.heavy=0.2
|
||||
|
||||
# Average crossing times (in seconds)
|
||||
vehicle.crossing.time.bike=1.0
|
||||
vehicle.crossing.time.light=2.0
|
||||
vehicle.crossing.time.heavy=4.0
|
||||
|
||||
# Travel times between intersections (in seconds)
|
||||
# Base time for light vehicles (cars)
|
||||
vehicle.travel.time.base=1.0
|
||||
# Bike travel time = 0.5 x car travel time
|
||||
vehicle.travel.time.bike.multiplier=0.5
|
||||
# Heavy vehicle travel time = 4.0 x base travel time
|
||||
vehicle.travel.time.heavy.multiplier=4.0
|
||||
|
||||
# === STATISTICS ===
|
||||
|
||||
# Interval between dashboard updates (seconds)
|
||||
statistics.update.interval=10.0
|
||||
|
||||
# === EXPECTED BEHAVIOR - HIGH LOAD ===
|
||||
# - Average system time: 200-400+ seconds (3-7+ minutes)
|
||||
# - Maximum queue sizes: 15-30+ vehicles at Cr2 and Cr5
|
||||
# - Average queue sizes: 8-15+ vehicles
|
||||
# - Severe congestion at Cr2 (main convergence point)
|
||||
# - Severe congestion at Cr5 (pre-exit bottleneck)
|
||||
# - System utilization: ~80-95%
|
||||
# - Many vehicles will remain in system at simulation end
|
||||
# - Queue growth may be unbounded if arrival rate exceeds service rate
|
||||
# - Primary bottlenecks: Cr2 (3-way convergence) and Cr5 (final funnel)
|
||||
# - This scenario tests maximum system capacity and traffic light optimization
|
||||
# - Expected to demonstrate need for adaptive traffic light policies
|
||||
|
||||
@@ -1,13 +1,4 @@
|
||||
# =========================================================
|
||||
# Traffic Simulation Configuration - LOW LOAD SCENARIO
|
||||
# ---------------------------------------------------------
|
||||
# Low traffic scenario for testing system under light load.
|
||||
# Expected: No congestion, minimal queues, fast vehicle throughput
|
||||
# =========================================================
|
||||
|
||||
# === NETWORK CONFIGURATION ===
|
||||
|
||||
# Intersections (each with its host and port)
|
||||
# Configuração de rede
|
||||
intersection.Cr1.host=localhost
|
||||
intersection.Cr1.port=8001
|
||||
intersection.Cr2.host=localhost
|
||||
@@ -19,65 +10,48 @@ intersection.Cr4.port=8004
|
||||
intersection.Cr5.host=localhost
|
||||
intersection.Cr5.port=8005
|
||||
|
||||
# Exit node
|
||||
exit.host=localhost
|
||||
exit.port=9001
|
||||
|
||||
# Dashboard server
|
||||
dashboard.host=localhost
|
||||
dashboard.port=9000
|
||||
|
||||
|
||||
# === SIMULATION CONFIGURATION ===
|
||||
|
||||
# Total duration in seconds (1800 = 30 minutes)
|
||||
# Configuração da simulação
|
||||
# Cenário de carga baixa - tráfego leve para testar o sistema sem congestionamento
|
||||
simulation.duration=1800
|
||||
|
||||
# Vehicle arrival model: FIXED or POISSON
|
||||
simulation.arrival.model=POISSON
|
||||
|
||||
# λ (lambda): LOW LOAD = 0.2 vehicles per second (12 vehicles/minute, 720 vehicles/hour)
|
||||
# This is approximately 40% of medium load
|
||||
simulation.arrival.rate=0.2
|
||||
|
||||
# Fixed interval between arrivals (only used if model=FIXED)
|
||||
simulation.arrival.fixed.interval=2.0
|
||||
|
||||
# Routing policy: RANDOM, SHORTEST_PATH, LEAST_CONGESTED
|
||||
simulation.routing.policy=LEAST_CONGESTED
|
||||
|
||||
|
||||
# === TRAFFIC LIGHT TIMINGS ===
|
||||
# Format: trafficlight.<intersection>.<direction>.<state>=<seconds>
|
||||
# Standard timings - should be more than adequate for low load
|
||||
|
||||
# Intersection 1 (Entry point - balanced)
|
||||
# Tempos dos semáforos (tempos realistas do mundo real, sem fase amarela)
|
||||
# Cruzamento 1 - ponto de entrada, equilibrado
|
||||
trafficlight.Cr1.South.green=30.0
|
||||
trafficlight.Cr1.South.red=5.0
|
||||
trafficlight.Cr1.South.red=30.0
|
||||
trafficlight.Cr1.East.green=30.0
|
||||
trafficlight.Cr1.East.red=5.0
|
||||
trafficlight.Cr1.East.red=30.0
|
||||
|
||||
# Intersection 2 (Main hub - shorter cycles, favor East-West)
|
||||
# Cruzamento 2 - hub principal
|
||||
trafficlight.Cr2.South.green=30.0
|
||||
trafficlight.Cr2.South.red=5.0
|
||||
trafficlight.Cr2.South.red=30.0
|
||||
trafficlight.Cr2.East.green=30.0
|
||||
trafficlight.Cr2.East.red=5.0
|
||||
trafficlight.Cr2.East.red=30.0
|
||||
trafficlight.Cr2.West.green=30.0
|
||||
trafficlight.Cr2.West.red=5.0
|
||||
trafficlight.Cr2.West.red=30.0
|
||||
|
||||
# Intersection 3 (Path to exit - favor East)
|
||||
# Cruzamento 3 - caminho para a saída
|
||||
trafficlight.Cr3.South.green=30.0
|
||||
trafficlight.Cr3.South.red=5.0
|
||||
trafficlight.Cr3.South.red=30.0
|
||||
trafficlight.Cr3.West.green=30.0
|
||||
trafficlight.Cr3.West.red=5.0
|
||||
trafficlight.Cr3.West.red=30.0
|
||||
|
||||
# Intersection 4 (Favor East toward Cr5)
|
||||
# Cruzamento 4
|
||||
trafficlight.Cr4.East.green=30.0
|
||||
trafficlight.Cr4.East.red=5.0
|
||||
trafficlight.Cr4.East.red=30.0
|
||||
trafficlight.Cr4.North.green=30.0
|
||||
trafficlight.Cr4.North.red=5.0
|
||||
trafficlight.Cr4.North.red=30.0
|
||||
|
||||
# Intersection 5 (Near exit - favor East)
|
||||
# Cruzamento 5 - perto da saída
|
||||
trafficlight.Cr5.East.green=30.0
|
||||
trafficlight.Cr5.East.red=5.0
|
||||
trafficlight.Cr5.West.green=30.0
|
||||
@@ -85,36 +59,17 @@ trafficlight.Cr5.West.red=5.0
|
||||
trafficlight.Cr5.North.green=30.0
|
||||
trafficlight.Cr5.North.red=5.0
|
||||
|
||||
|
||||
# === VEHICLE CONFIGURATION ===
|
||||
# Probability distribution for vehicle types (must sum to 1.0)
|
||||
# Configuração de veículos
|
||||
vehicle.probability.bike=0.2
|
||||
vehicle.probability.light=0.6
|
||||
vehicle.probability.heavy=0.2
|
||||
|
||||
# Average crossing times (in seconds)
|
||||
vehicle.crossing.time.bike=1.0
|
||||
vehicle.crossing.time.light=2.0
|
||||
vehicle.crossing.time.heavy=4.0
|
||||
|
||||
# Travel times between intersections (in seconds)
|
||||
# Base time for light vehicles (cars)
|
||||
vehicle.travel.time.base=1.0
|
||||
# Bike travel time = 0.5 x car travel time
|
||||
vehicle.travel.time.bike.multiplier=0.5
|
||||
# Heavy vehicle travel time = 4.0 x base travel time
|
||||
vehicle.travel.time.heavy.multiplier=4.0
|
||||
|
||||
# === STATISTICS ===
|
||||
|
||||
# Interval between dashboard updates (seconds)
|
||||
statistics.update.interval=10.0
|
||||
|
||||
# === EXPECTED BEHAVIOR - LOW LOAD ===
|
||||
# - Average system time: 40-80 seconds
|
||||
# - Maximum queue sizes: 1-3 vehicles
|
||||
# - Average queue sizes: < 1 vehicle
|
||||
# - Vehicles should flow smoothly through the system
|
||||
# - Minimal waiting at traffic lights (mostly travel time)
|
||||
# - System utilization: ~20-30%
|
||||
# - All vehicles should exit within simulation time
|
||||
|
||||
@@ -1,13 +1,4 @@
|
||||
# =========================================================
|
||||
# Traffic Simulation Configuration - MEDIUM LOAD SCENARIO
|
||||
# ---------------------------------------------------------
|
||||
# Medium traffic scenario for testing system under normal load.
|
||||
# Expected: Moderate queues, some congestion at peak intersections
|
||||
# =========================================================
|
||||
|
||||
# === NETWORK CONFIGURATION ===
|
||||
|
||||
# Intersections (each with its host and port)
|
||||
# Configuração de rede
|
||||
intersection.Cr1.host=localhost
|
||||
intersection.Cr1.port=8001
|
||||
intersection.Cr2.host=localhost
|
||||
@@ -19,65 +10,48 @@ intersection.Cr4.port=8004
|
||||
intersection.Cr5.host=localhost
|
||||
intersection.Cr5.port=8005
|
||||
|
||||
# Exit node
|
||||
exit.host=localhost
|
||||
exit.port=9001
|
||||
|
||||
# Dashboard server
|
||||
dashboard.host=localhost
|
||||
dashboard.port=9000
|
||||
|
||||
|
||||
# === SIMULATION CONFIGURATION ===
|
||||
|
||||
# Total duration in seconds (1800 = 30 minutes)
|
||||
# Configuração da simulação
|
||||
# Cenário de carga média - tráfego normal com algum congestionamento
|
||||
simulation.duration=1800
|
||||
|
||||
# Vehicle arrival model: FIXED or POISSON
|
||||
simulation.arrival.model=POISSON
|
||||
|
||||
# λ (lambda): MEDIUM LOAD = 0.5 vehicles per second (30 vehicles/minute, 1800 vehicles/hour)
|
||||
# This represents normal traffic conditions
|
||||
simulation.arrival.rate=0.5
|
||||
|
||||
# Fixed interval between arrivals (only used if model=FIXED)
|
||||
simulation.arrival.fixed.interval=2.0
|
||||
|
||||
# Routing policy: RANDOM, SHORTEST_PATH, LEAST_CONGESTED
|
||||
simulation.routing.policy=LEAST_CONGESTED
|
||||
|
||||
# Tempos dos semáforos (tempos realistas do mundo real, sem fase amarela)
|
||||
# Cruzamento 1 - ponto de entrada, equilibrado
|
||||
trafficlight.Cr1.South.green=35.0
|
||||
trafficlight.Cr1.South.red=35.0
|
||||
trafficlight.Cr1.East.green=35.0
|
||||
trafficlight.Cr1.East.red=35.0
|
||||
|
||||
# === TRAFFIC LIGHT TIMINGS ===
|
||||
# Format: trafficlight.<intersection>.<direction>.<state>=<seconds>
|
||||
# Optimized timings for medium load
|
||||
# Cruzamento 2 - hub principal, gargalo crítico
|
||||
trafficlight.Cr2.South.green=40.0
|
||||
trafficlight.Cr2.South.red=40.0
|
||||
trafficlight.Cr2.East.green=45.0
|
||||
trafficlight.Cr2.East.red=35.0
|
||||
trafficlight.Cr2.West.green=40.0
|
||||
trafficlight.Cr2.West.red=40.0
|
||||
|
||||
# Intersection 1 (Entry point - balanced)
|
||||
trafficlight.Cr1.South.green=40.0
|
||||
trafficlight.Cr1.South.red=5.0
|
||||
trafficlight.Cr1.East.green=40.0
|
||||
trafficlight.Cr1.East.red=5.0
|
||||
# Cruzamento 3 - caminho para a saída
|
||||
trafficlight.Cr3.South.green=35.0
|
||||
trafficlight.Cr3.South.red=40.0
|
||||
trafficlight.Cr3.West.green=40.0
|
||||
trafficlight.Cr3.West.red=35.0
|
||||
|
||||
# Intersection 2 (Main hub - CRITICAL BOTTLENECK, longer green times)
|
||||
trafficlight.Cr2.South.green=45.0
|
||||
trafficlight.Cr2.South.red=5.0
|
||||
trafficlight.Cr2.East.green=50.0
|
||||
trafficlight.Cr2.East.red=5.0
|
||||
trafficlight.Cr2.West.green=45.0
|
||||
trafficlight.Cr2.West.red=5.0
|
||||
# Cruzamento 4
|
||||
trafficlight.Cr4.East.green=35.0
|
||||
trafficlight.Cr4.East.red=35.0
|
||||
trafficlight.Cr4.North.green=35.0
|
||||
trafficlight.Cr4.North.red=35.0
|
||||
|
||||
# Intersection 3 (Path to exit - favor East toward exit)
|
||||
trafficlight.Cr3.South.green=40.0
|
||||
trafficlight.Cr3.South.red=5.0
|
||||
trafficlight.Cr3.West.green=35.0
|
||||
trafficlight.Cr3.West.red=5.0
|
||||
|
||||
# Intersection 4 (Favor East toward Cr5)
|
||||
trafficlight.Cr4.East.green=40.0
|
||||
trafficlight.Cr4.East.red=5.0
|
||||
trafficlight.Cr4.North.green=40.0
|
||||
trafficlight.Cr4.North.red=5.0
|
||||
|
||||
# Intersection 5 (Near exit - POTENTIAL BOTTLENECK, longer green)
|
||||
# Cruzamento 5 - perto da saída, possível gargalo
|
||||
trafficlight.Cr5.East.green=50.0
|
||||
trafficlight.Cr5.East.red=5.0
|
||||
trafficlight.Cr5.West.green=45.0
|
||||
@@ -85,37 +59,17 @@ trafficlight.Cr5.West.red=5.0
|
||||
trafficlight.Cr5.North.green=45.0
|
||||
trafficlight.Cr5.North.red=5.0
|
||||
|
||||
|
||||
# === VEHICLE CONFIGURATION ===
|
||||
# Probability distribution for vehicle types (must sum to 1.0)
|
||||
# Configuração de veículos
|
||||
vehicle.probability.bike=0.2
|
||||
vehicle.probability.light=0.6
|
||||
vehicle.probability.heavy=0.2
|
||||
|
||||
# Average crossing times (in seconds)
|
||||
vehicle.crossing.time.bike=1.0
|
||||
vehicle.crossing.time.light=2.0
|
||||
vehicle.crossing.time.heavy=4.0
|
||||
|
||||
# Travel times between intersections (in seconds)
|
||||
# Base time for light vehicles (cars)
|
||||
vehicle.travel.time.base=1.0
|
||||
# Bike travel time = 0.5 x car travel time
|
||||
vehicle.travel.time.bike.multiplier=0.5
|
||||
# Heavy vehicle travel time = 4.0 x base travel time
|
||||
vehicle.travel.time.heavy.multiplier=4.0
|
||||
|
||||
# === STATISTICS ===
|
||||
|
||||
# Interval between dashboard updates (seconds)
|
||||
statistics.update.interval=10.0
|
||||
|
||||
# === EXPECTED BEHAVIOR - MEDIUM LOAD ===
|
||||
# - Average system time: 80-150 seconds
|
||||
# - Maximum queue sizes: 5-10 vehicles at Cr2 and Cr5
|
||||
# - Average queue sizes: 2-5 vehicles
|
||||
# - Moderate congestion at Cr2 (main hub) and Cr5 (pre-exit)
|
||||
# - System utilization: ~50-60%
|
||||
# - Most vehicles should exit, some may remain at simulation end
|
||||
# - Cr2 is the primary bottleneck (3 directions converge)
|
||||
# - Cr5 is secondary bottleneck (all routes pass through)
|
||||
|
||||
@@ -1,13 +1,4 @@
|
||||
# =========================================================
|
||||
# Traffic Simulation Configuration
|
||||
# ---------------------------------------------------------
|
||||
# All parameters controlling network layout, timing,
|
||||
# and simulation behavior.
|
||||
# =========================================================
|
||||
|
||||
# === NETWORK CONFIGURATION ===
|
||||
|
||||
# Intersections (each with its host and port)
|
||||
# Configuração de rede
|
||||
intersection.Cr1.host=localhost
|
||||
intersection.Cr1.port=8001
|
||||
intersection.Cr2.host=localhost
|
||||
@@ -19,92 +10,60 @@ intersection.Cr4.port=8004
|
||||
intersection.Cr5.host=localhost
|
||||
intersection.Cr5.port=8005
|
||||
|
||||
# Exit node
|
||||
exit.host=localhost
|
||||
exit.port=9001
|
||||
|
||||
# Dashboard server
|
||||
dashboard.host=localhost
|
||||
dashboard.port=9000
|
||||
|
||||
|
||||
# === SIMULATION CONFIGURATION ===
|
||||
|
||||
# Total duration in seconds (3600 = 1 hour)
|
||||
# Configuração da simulação
|
||||
simulation.duration=300
|
||||
|
||||
# Time scaling factor for visualization (real_seconds = sim_seconds * scale)
|
||||
# 0 = instant (pure DES), 0.01 = 100x speed, 0.1 = 10x speed, 1.0 = real-time
|
||||
simulation.time.scale=0.01
|
||||
|
||||
# Vehicle arrival model: FIXED or POISSON
|
||||
simulation.arrival.model=POISSON
|
||||
|
||||
# λ (lambda): average arrival rate (vehicles per second)
|
||||
simulation.arrival.rate=0.5
|
||||
|
||||
# Fixed interval between arrivals (only used if model=FIXED)
|
||||
simulation.arrival.fixed.interval=2.0
|
||||
|
||||
# Routing policy: RANDOM, SHORTEST_PATH, LEAST_CONGESTED
|
||||
# RANDOM: selects routes with predefined probabilities (baseline)
|
||||
# SHORTEST_PATH: always chooses the route with fewest intersections
|
||||
# LEAST_CONGESTED: dynamically chooses routes to avoid congested areas
|
||||
simulation.routing.policy=RANDOM
|
||||
|
||||
# Tempos dos semáforos (tempos realistas do mundo real, sem fase amarela)
|
||||
# Cruzamento 1 - ponto de entrada, equilibrado
|
||||
trafficlight.Cr1.South.green=35.0
|
||||
trafficlight.Cr1.South.red=35.0
|
||||
trafficlight.Cr1.East.green=35.0
|
||||
trafficlight.Cr1.East.red=35.0
|
||||
|
||||
# === TRAFFIC LIGHT TIMINGS ===
|
||||
# Format: trafficlight.<intersection>.<direction>.<state>=<seconds>
|
||||
# Cruzamento 2 - hub principal
|
||||
trafficlight.Cr2.South.green=40.0
|
||||
trafficlight.Cr2.South.red=40.0
|
||||
trafficlight.Cr2.East.green=40.0
|
||||
trafficlight.Cr2.East.red=40.0
|
||||
trafficlight.Cr2.West.green=40.0
|
||||
trafficlight.Cr2.West.red=40.0
|
||||
|
||||
# Intersection 1 (Entry point - balanced)
|
||||
trafficlight.Cr1.South.green=60.0
|
||||
trafficlight.Cr1.South.red=5.0
|
||||
trafficlight.Cr1.East.green=60.0
|
||||
trafficlight.Cr1.East.red=5.0
|
||||
# Cruzamento 3 - caminho para a saída
|
||||
trafficlight.Cr3.South.green=35.0
|
||||
trafficlight.Cr3.South.red=40.0
|
||||
trafficlight.Cr3.West.green=40.0
|
||||
trafficlight.Cr3.West.red=35.0
|
||||
|
||||
# Intersection 2 (Main hub - shorter cycles, favor East-West)
|
||||
trafficlight.Cr2.South.green=60.0
|
||||
trafficlight.Cr2.South.red=5.0
|
||||
trafficlight.Cr2.East.green=60.0
|
||||
trafficlight.Cr2.East.red=5.0
|
||||
trafficlight.Cr2.West.green=60.0
|
||||
trafficlight.Cr2.West.red=5.0
|
||||
# Cruzamento 4
|
||||
trafficlight.Cr4.East.green=35.0
|
||||
trafficlight.Cr4.East.red=35.0
|
||||
|
||||
# Intersection 3 (Path to exit - favor East)
|
||||
trafficlight.Cr3.South.green=60.0
|
||||
trafficlight.Cr3.South.red=5.0
|
||||
trafficlight.Cr3.West.green=60.0
|
||||
trafficlight.Cr3.West.red=5.0
|
||||
# Cruzamento 5 - perto da saída
|
||||
trafficlight.Cr5.East.green=35.0
|
||||
trafficlight.Cr5.East.red=35.0
|
||||
|
||||
# Intersection 4 (Favor East toward Cr5)
|
||||
trafficlight.Cr4.East.green=60.0
|
||||
trafficlight.Cr4.East.red=5.0
|
||||
|
||||
# Intersection 5 (Near exit - favor East)
|
||||
trafficlight.Cr5.East.green=60.0
|
||||
trafficlight.Cr5.East.red=5.0
|
||||
|
||||
|
||||
# === VEHICLE CONFIGURATION ===
|
||||
# Probability distribution for vehicle types (must sum to 1.0)
|
||||
# Configuração de veículos
|
||||
vehicle.probability.bike=0.2
|
||||
vehicle.probability.light=0.6
|
||||
vehicle.probability.heavy=0.2
|
||||
|
||||
# Average crossing times (in seconds)
|
||||
vehicle.crossing.time.bike=1.0
|
||||
vehicle.crossing.time.light=2.0
|
||||
vehicle.crossing.time.heavy=4.0
|
||||
|
||||
# Travel times between intersections (in seconds)
|
||||
# Base time for light vehicles (cars)
|
||||
vehicle.travel.time.base=1.0
|
||||
# Bike travel time = 0.5 x car travel time
|
||||
vehicle.travel.time.bike.multiplier=0.5
|
||||
# Heavy vehicle travel time = 4.0 x base travel time
|
||||
vehicle.travel.time.heavy.multiplier=4.0
|
||||
|
||||
# === STATISTICS ===
|
||||
|
||||
# Interval between dashboard updates (seconds)
|
||||
statistics.update.interval=0.1
|
||||
|
||||