Les travaux à chaud (soudage, meulage, découpage thermique) représentent un risque majeur d'incendie et d'explosion dans les environnements industriels. La surveillance en temps réel des permis de travail, des combustibles à proximité, de la surveillance incendie (fire watch), des lectures de gaz et des dispositifs pare-étincelles est essentielle pour prévenir les incidents graves.
Hot work operations (welding, grinding, thermal cutting) pose significant fire and explosion risks in industrial environments. Real-time monitoring of work permits, nearby combustibles, fire watch personnel, gas readings, and spark containment devices is critical to prevent serious incidents.
// 🔥 Détection: Hot Work sans permis OU sans fire-watch // Detection: Hot Work without permit OR without fire watch MATCH (t:Task {type: 'HotWork'})-[:LOCATED_IN]->(z)-[:PART_OF]->(p {id: $projectId}) WHERE NOT (:Permit {type: 'HotWork'})-[:COVERS]->(t) OR NOT (:Worker)-[:FIRE_WATCH]->(t) RETURN t.id AS taskId, t.description AS description, t.startDate AS startDate, z.name AS zoneName, CASE WHEN NOT (:Permit)-[:COVERS]->(t) THEN 'MISSING_PERMIT' ELSE 'MISSING_FIRE_WATCH' END AS violation ORDER BY t.startDate DESC
{
"taskId": "HW-2024-1847",
"description": "Soudage réservoir principal / Main tank welding",
"startDate": "2024-11-04T08:30:00Z",
"zoneName": "Zone Production B",
"violation": "MISSING_FIRE_WATCH",
"criticalityLevel": "🔴 CRITIQUE / CRITICAL"
}
// ⏱️ Détection: Surveillance post-travaux (60 min) non confirmée // Detection: Post-work watch (60 min) not confirmed MATCH (t:Task {type: 'HotWork'})-[:PART_OF]->(p {id: $projectId}) WHERE t.endDate >= $since AND NOT (:Event {type: 'PostWatchComplete'})-[:FOR]->(t) WITH t, duration.between(t.endDate, datetime()) AS timeSinceEnd WHERE timeSinceEnd.minutes > 60 RETURN t.id AS taskId, t.description AS description, t.endDate AS endDate, timeSinceEnd.minutes AS minutesSinceEnd, 'POST_WATCH_MISSING' AS violation ORDER BY timeSinceEnd.minutes DESC
{
"taskId": "HW-2024-1823",
"description": "Découpage métal ligne 3 / Metal cutting line 3",
"endDate": "2024-11-04T14:15:00Z",
"minutesSinceEnd": 127, // Plus de 2 heures sans surveillance!
"violation": "POST_WATCH_MISSING",
"criticalityLevel": "🔴 CRITIQUE / CRITICAL"
}
// 📏 Détection: Combustibles trop proches (< zone d'exclusion) // Detection: Combustibles too close (< exclusion zone) MATCH (t:Task {type: 'HotWork'})-[:LOCATED_IN]->(z1)-[:PART_OF]->(p {id: $projectId}) MATCH (c:Asset {class: 'Combustible'})-[:LOCATED_IN]->(z2) WITH t, z1, c, z2, point.distance(point(z1), point(z2)) AS distanceMeters WHERE distanceMeters < $exclusionM // Paramètre: 10.7m (35 pieds NFPA) RETURN t.id AS taskId, t.description AS taskDescription, z1.name AS hotWorkZone, c.id AS combustibleId, c.type AS combustibleType, z2.name AS combustibleZone, round(distanceMeters, 2) AS distanceMeters, ($exclusionM - distanceMeters) AS violationMargin ORDER BY distanceMeters ASC
{
"taskId": "HW-2024-1891",
"taskDescription": "Soudage tuyauterie / Pipeline welding",
"hotWorkZone": "Atelier B-14",
"combustibleId": "COMB-4782",
"combustibleType": "Solvant inflammable / Flammable solvent",
"combustibleZone": "Entrepôt B-15",
"distanceMeters": 6.3, // Seulement 6.3m! Minimum requis: 10.7m (NFPA 51B)
"violationMargin": 4.4,
"criticalityLevel": "🔴 CRITIQUE / CRITICAL"
}
// 🧪 Détection: Absence de pré-lecture gaz atmosphérique // Detection: Missing pre-work atmospheric gas reading MATCH (t:Task {type: 'HotWork'})-[:LOCATED_IN]->(z)-[:PART_OF]->(p {id: $projectId}) WITH t, z, SIZE([ (r:Reading)-[:AT]->(z) WHERE r.timestamp >= t.startDate - duration({minutes: $preMin}) AND r.timestamp <= t.startDate | r ]) AS readingsCount WHERE readingsCount = 0 RETURN t.id AS taskId, t.description AS description, t.startDate AS startDate, z.name AS zoneName, readingsCount, 'MISSING_GAS_READING' AS violation, 'O2, LEL, H2S, CO requis avant travaux / O2, LEL, H2S, CO required before work' AS requiredTests ORDER BY t.startDate DESC
{
"taskId": "HW-2024-1905",
"description": "Meulage structure métallique / Metal structure grinding",
"startDate": "2024-11-04T09:00:00Z",
"zoneName": "Aire de fabrication C",
"readingsCount": 0, // Aucune lecture dans les 30 min précédentes!
"violation": "MISSING_GAS_READING",
"requiredTests": "O2, LEL, H2S, CO requis avant travaux / O2, LEL, H2S, CO required before work",
"criticalityLevel": "🟠 ÉLEVÉ / HIGH"
}
// 🛡️ Détection: Pare-étincelles (spark shield) non prévu // Detection: Spark shield (spark containment) not planned MATCH (t:Task {type: 'HotWork'})-[:PART_OF]->(p {id: $projectId}) WHERE NOT (t)-[:REQUIRES_CONTROL]->(:Control {type: 'SparkContainment'}) RETURN t.id AS taskId, t.description AS description, t.startDate AS startDate, t.location AS location, 'MISSING_SPARK_SHIELD' AS violation, CASE WHEN t.type IN ['Welding', 'Cutting'] THEN 'CRITICAL' WHEN t.type = 'Grinding' THEN 'HIGH' ELSE 'MEDIUM' END AS riskLevel ORDER BY riskLevel, t.startDate DESC
{
"taskId": "HW-2024-1918",
"description": "Découpage thermique poutre / Thermal beam cutting",
"startDate": "2024-11-04T10:30:00Z",
"location": "Atelier principal - Zone haute / Main workshop - High zone",
"violation": "MISSING_SPARK_SHIELD",
"riskLevel": "CRITICAL",
"criticalityLevel": "🔴 CRITIQUE / CRITICAL",
"recommendation": "Toiles ignifuges + barrières pare-étincelles requises / Fire blankets + spark barriers required"
}