forked from ddrilling/AsbCloudServer
Изменение условия в алгоритме
This commit is contained in:
parent
4af7868430
commit
93f22c5b5b
@ -78,12 +78,6 @@ public class DetectedOperationDto: IId
|
|||||||
[Required]
|
[Required]
|
||||||
public WellOperationCategoryDto OperationCategory { get; set; } = null!;
|
public WellOperationCategoryDto OperationCategory { get; set; } = null!;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Положение долота на момент окончания операции
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
|
||||||
public float BitDepth { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Ключевой параметр операции
|
/// Ключевой параметр операции
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -114,7 +114,6 @@ namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
|
|||||||
DepthStart = (double)pBegin.WellDepth,
|
DepthStart = (double)pBegin.WellDepth,
|
||||||
DepthEnd = (double)pEnd.WellDepth,
|
DepthEnd = (double)pEnd.WellDepth,
|
||||||
ExtraData = ExtraData,
|
ExtraData = ExtraData,
|
||||||
BitDepth = pEnd.BitDepth,
|
|
||||||
Value = CalcValue(telemetry, begin, end),
|
Value = CalcValue(telemetry, begin, end),
|
||||||
EnabledSubsystems = DetectEnabledSubsystems(telemetry, begin, end, ExtraData)
|
EnabledSubsystems = DetectEnabledSubsystems(telemetry, begin, end, ExtraData)
|
||||||
};
|
};
|
||||||
|
@ -15,6 +15,9 @@ public class DetectorSlipsTime : DetectorAbstract
|
|||||||
var currentPoint = telemetry[position];
|
var currentPoint = telemetry[position];
|
||||||
var delta = Math.Abs(currentPoint.WellDepth - currentPoint.BitDepth);
|
var delta = Math.Abs(currentPoint.WellDepth - currentPoint.BitDepth);
|
||||||
|
|
||||||
|
if (currentPoint.BitDepth < 150)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (delta < 0.1d)
|
if (delta < 0.1d)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -62,14 +65,6 @@ public class DetectorSlipsTime : DetectorAbstract
|
|||||||
return (WellOperationCategory.IdSlipsTime, new Dictionary<string, object>());
|
return (WellOperationCategory.IdSlipsTime, new Dictionary<string, object>());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool IsValidOperationDetectorResult(OperationDetectorResult operationDetectorResult)
|
protected override bool IsValidOperationDetectorResult(OperationDetectorResult operationDetectorResult) =>
|
||||||
{
|
Math.Abs((operationDetectorResult.Operation.DateStart - operationDetectorResult.Operation.DateEnd).TotalMinutes) < 30;
|
||||||
if (Math.Abs((operationDetectorResult.Operation.DateStart - operationDetectorResult.Operation.DateEnd).TotalMinutes) > 30)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (operationDetectorResult.Operation.BitDepth <= 150d)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -19,11 +19,9 @@
|
|||||||
Признак окончания операции =
|
Признак окончания операции =
|
||||||
( давление > 20атм) ИЛИ
|
( давление > 20атм) ИЛИ
|
||||||
( время продолжительности > 30 мин) ИЛИ
|
( время продолжительности > 30 мин) ИЛИ
|
||||||
( глубина долота < 150 м) ИЛИ
|
|
||||||
( изменение глубины долота) И
|
( изменение глубины долота) И
|
||||||
( осевая нагрузка < веса на крюке);
|
( осевая нагрузка < веса на крюке);
|
||||||
|
|
||||||
|
|
||||||
## Ключевой параметр
|
## Ключевой параметр
|
||||||
Продолжительность операции.
|
Продолжительность операции.
|
||||||
|
|
||||||
|
@ -60,30 +60,6 @@ public class DetectorSlipsTimeTests
|
|||||||
Assert.Equal(IdSlipsTime, result.Operation.IdCategory);
|
Assert.Equal(IdSlipsTime, result.Operation.IdCategory);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public void ValidateOperation_with_bit_depth_before_150_meters_is_invalid()
|
|
||||||
{
|
|
||||||
//arrange
|
|
||||||
var point0 = telemetryBuilder
|
|
||||||
.WithBitDepth(149)
|
|
||||||
.Build();
|
|
||||||
|
|
||||||
var point1 = telemetryBuilder
|
|
||||||
.WithBitDepth(149)
|
|
||||||
.WithBlockPosition(21)
|
|
||||||
.Build();
|
|
||||||
|
|
||||||
var telemetries = new[] { point0, point1 };
|
|
||||||
|
|
||||||
//act
|
|
||||||
var isDetectOperation = sut.TryDetect(0, telemetries, 0, telemetries.Length - 1, null, out var result);
|
|
||||||
|
|
||||||
//assert
|
|
||||||
Assert.False(isDetectOperation);
|
|
||||||
Assert.NotNull(result);
|
|
||||||
Assert.Equal(IdSlipsTime, result.Operation.IdCategory);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void ValidateOperation_with_duration_more_30_minutes_is_invalid()
|
public void ValidateOperation_with_duration_more_30_minutes_is_invalid()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user