Skip to content

Commit

Permalink
[DEGR-2695] SimInt API: add ValidationEndTime (#325)
Browse files Browse the repository at this point in the history
  • Loading branch information
polomani authored Aug 4, 2023
1 parent 19e571b commit 0bf2e89
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CogniteSdk.Types/Alpha/Simulators/SimulationRun.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ public class SimulationRun
/// </summary>
public long? EventId { get; set; }

/// <summary>
/// Timestamp that overwrites the validation end
/// </summary>
public long? ValidationEndTime { get; set; }

/// <summary>
/// Time when this simulation run was created.
/// </summary>
Expand Down
10 changes: 10 additions & 0 deletions CogniteSdk.Types/Alpha/Simulators/SimulationRunCreate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ public class SimulationRunCreate
/// </summary>
public string ModelName { get; set; }

/// <summary>
/// Timestamp that overwrites the validation end
/// </summary>
public long? ValidationEndTime { get; set; }

/// <summary>
/// Queue the simulation run when connector is down
/// </summary>
public bool Queue { get; set; }

/// <summary>
/// Run type
/// </summary>
Expand Down
5 changes: 4 additions & 1 deletion CogniteSdk/test/fsharp/Alpha/Simulators.fs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ let ``Create simulation runs is Ok`` () =
SimulatorName = "DWSIM",
ModelName = "ShowerMixerIntegrationTest",
RoutineName = "ShowerMixerCalculation",
RunType = SimulationRunType.external
RunType = SimulationRunType.external,
ValidationEndTime = now,
Queue = true
)

// Act
Expand All @@ -56,6 +58,7 @@ let ``Create simulation runs is Ok`` () =
test <@ itemRes.RoutineName = itemToCreate.RoutineName @>
test <@ itemRes.Status = SimulationRunStatus.ready @>
test <@ itemRes.RunType = SimulationRunType.external @>
test <@ itemRes.ValidationEndTime = Nullable (now) @>
test <@ now - itemRes.CreatedTime < 10000 @>
test <@ now - itemRes.LastUpdatedTime < 10000 @>

Expand Down

0 comments on commit 0bf2e89

Please sign in to comment.