Edit DetectorTemplatingWhileDrilling

This commit is contained in:
ngfrolov 2022-08-11 14:30:20 +05:00
parent 95d5e75571
commit 6d63f8d02e
3 changed files with 19 additions and 8 deletions

View File

@ -37,11 +37,11 @@ namespace AsbCloudInfrastructure.Services.DetectOperations
private readonly IAsbCloudDbContext db; private readonly IAsbCloudDbContext db;
private readonly IWellService wellService; private readonly IWellService wellService;
private readonly IOperationValueService operationValueService; private readonly IRepositoryWellRelated<OperationValueDto> operationValueService;
private readonly IScheduleRepository scheduleService; private readonly IScheduleRepository scheduleService;
public DetectedOperationService(IAsbCloudDbContext db, IWellService wellService, public DetectedOperationService(IAsbCloudDbContext db, IWellService wellService,
IOperationValueService operationValueService, IScheduleRepository scheduleService) IRepositoryWellRelated<OperationValueDto> operationValueService, IScheduleRepository scheduleService)
{ {
this.db = db; this.db = db;
this.wellService = wellService; this.wellService = wellService;

View File

@ -36,8 +36,15 @@ namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
protected override int DetectEnd(DetectableTelemetry[] telemetry, int position, DetectedOperation? previousOperation) protected override int DetectEnd(DetectableTelemetry[] telemetry, int position, DetectedOperation? previousOperation)
{ {
var point0 = telemetry[position]; var point0 = telemetry[position];
if (point0.Pressure < 15)
return IdReasonOfEnd_PressureIsLo;
if (RisesFromBegin(telemetry, t=>t.WellDepth, position, 10, 0.01))
return IdReasonOfEnd_WellDepthDeviates;
var delta = point0.WellDepth - point0.BitDepth; var delta = point0.WellDepth - point0.BitDepth;
if ((delta > 0.03d ) if ( (delta > 0.03d )
&& (point0.Pressure > 15) && (point0.Pressure > 15)
&& (!ContainsDeviationApprox(telemetry, t=>t.BlockPosition, position, 60, 0.03))) && (!ContainsDeviationApprox(telemetry, t=>t.BlockPosition, position, 60, 0.03)))
return IdReasonOfEnd_Custom1; return IdReasonOfEnd_Custom1;

View File

@ -6,15 +6,19 @@
## Метод определения ## Метод определения
Признак начала операции = Признак начала операции =
( предыдущая операция == промывка) ( предыдущая операция == промывка )
( давление > 15 атм ) И ( давление > 15 атм ) И
( положение блока увеличится на 0,5м за следующие 30сек ) И ( положение блока увеличится на 0,5м за следующие 30сек ) И
( Обороты ротора меньше 1) ( Обороты ротора меньше 1 )
Признак окончания операции = Признак окончания операции =
( высота блока не изменяется больше чем на 0.03м в течении 60 сек после окончания операции) И (
( расстояние от долота до забоя > 0.03м ) И ( высота блока не изменяется больше чем на 0.03м в течении 60 сек после окончания операции ) И
( давление > 15 атм ) ( расстояние от долота до забоя > 0.03м ) И
( давление > 15 атм )
) ИЛИ
( давление < 15 атм ) ИЛИ
( Увеличение глубины забоя > 0,01м за 10 секунд)
## Ключевой параметр ## Ключевой параметр
Продолжительность операции. Продолжительность операции.