Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DEGR-2695] SimInt API: add ValidationEndTime #325

Merged
merged 1 commit into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading