DWIS.MicroState.Model 2.0.1-alpha.40

This is a prerelease version of DWIS.MicroState.Model.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package DWIS.MicroState.Model --version 2.0.1-alpha.40
                    
NuGet\Install-Package DWIS.MicroState.Model -Version 2.0.1-alpha.40
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DWIS.MicroState.Model" Version="2.0.1-alpha.40" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DWIS.MicroState.Model" Version="2.0.1-alpha.40" />
                    
Directory.Packages.props
<PackageReference Include="DWIS.MicroState.Model" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DWIS.MicroState.Model --version 2.0.1-alpha.40
                    
#r "nuget: DWIS.MicroState.Model, 2.0.1-alpha.40"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=DWIS.MicroState.Model&version=2.0.1-alpha.40&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=DWIS.MicroState.Model&version=2.0.1-alpha.40&prerelease
                    
Install as a Cake Tool

This package is developed as part of the Society of Petroleum (SPE) Drilling and Wells Interoperability Standards (D-WIS), a sub-committee of the Drilling System Automation Technical Section. This package contains the data model used by the D-WIS microstate interpretation engine.

There are 4 classes:

  • MicroStates
  • ProbabilisticMicroStates
  • SignalGroup
  • Thresholds

Microstates

The class MicroStates is used to represent the deterministic version of the interpreted drilling process microstates. It has a TimeStampUTC property and 5 32 bit integers to store the encoded values of the microstates.

Each microstate is encoded on 2 bits, therefore providing 4 combinations with the combination 00 reserved to mean undefined. The index for each microstate is encoded in an enumeration: MicroStateIndex.

The MicroStates class defines two methods to update the value at a given microstate position: UpdateMicroState and to read the value at a given microstate index: GetValue. The value is passed as a byte and only the two least significant bits are used.

The MicroStates has the following default semantic:

DynamicDrillingSignal:DeterministicState
ComputedData:DeterministicState#01
JSonDataType:DeterministicState#01
DeterministicState#01 HasDynamicValue DeterministicState
ProcessState:DeterministicProcessState
DeterministicModel:DeterministicProcessState
DeterministicState#01 IsGeneratedBy DeterministicProcessState
DWISDrillingProcessStateInterpreter:ProcessStateInterpreter#01
DeterministicState#01 IsProvidedBy ProcessStateInterpreter#01

This semantic translates into the following semantic graph:

flowchart TD
	 classDef typeClass fill:#f96;
	 classDef classClass fill:#9dd0ff;
	 classDef opcClass fill:#ff9dd0;
	 classDef quantityClass fill:#d0ff9d;
	DWIS:DeterministicState([DWIS:DeterministicState]) --> opc:string([opc:string]):::opcClass
	DWIS:DeterministicState_01([DWIS:DeterministicState_01]) --> ComputedData([ComputedData]):::typeClass
	DWIS:DeterministicProcessState([DWIS:DeterministicProcessState]) --> ProcessState([ProcessState]):::typeClass
	DWIS:ProcessStateInterpreter_01([DWIS:ProcessStateInterpreter_01]) --> DWISDrillingProcessStateInterpreter([DWISDrillingProcessStateInterpreter]):::typeClass
	DWIS:DeterministicState_01([DWIS:DeterministicState_01]) -- http://ddhub.no/BelongsToClass --> http://ddhub.no/JSonDataType([http://ddhub.no/JSonDataType]):::classClass
	DWIS:DeterministicProcessState([DWIS:DeterministicProcessState]) -- http://ddhub.no/BelongsToClass --> http://ddhub.no/DeterministicModel([http://ddhub.no/DeterministicModel]):::classClass
	DWIS:DeterministicState_01([DWIS:DeterministicState_01]) -- http://ddhub.no/HasDynamicValue --> DWIS:DeterministicState([DWIS:DeterministicState]):::classClass
	DWIS:DeterministicState_01([DWIS:DeterministicState_01]) -- http://ddhub.no/IsGeneratedBy --> DWIS:DeterministicProcessState([DWIS:DeterministicProcessState]):::classClass
	DWIS:DeterministicState_01([DWIS:DeterministicState_01]) -- http://ddhub.no/IsProvidedBy --> DWIS:ProcessStateInterpreter_01([DWIS:ProcessStateInterpreter_01]):::classClass

And to retrieve the deterministic microstate on the Blackboard, one can use the following SparQL query:

PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX ddhub:<http://ddhub.no/>
PREFIX quantity:<http://ddhub.no/UnitAndQuantity>

SELECT ?DeterministicState
WHERE {
	?DeterministicState_01 rdf:type ddhub:ComputedData .
	?DeterministicState_01 rdf:type ddhub:JSonDataType .
	?DeterministicState_01 ddhub:HasDynamicValue ?DeterministicState .
	?DeterministicProcessState rdf:type ddhub:ProcessState .
	?DeterministicProcessState rdf:type ddhub:DeterministicModel .
	?DeterministicState_01 ddhub:IsGeneratedBy ?DeterministicProcessState .
	?ProcessStateInterpreter_01 rdf:type ddhub:DWISDrillingProcessStateInterpreter .
	?DeterministicState_01 ddhub:IsProvidedBy ?ProcessStateInterpreter_01 .
}

The DynamicDrillingSignal, i.e., the live OPC-UA variable has the type string and contains a Json serialization of the class MicroStates. The Json schema for the classes defined in DWIS.MicroState.Model can be found here: https://github.com/D-WIS/MicroStateEngine/blob/main/DWIS.MicroState.JsonSchema/MicroStates.json. The meta data describing the semantic of the class MicroState can be found here: https://github.com/D-WIS/MicroStateEngine/blob/main/DWIS.MicroState.JsonSchema/MetaDataMicroStates.json.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on DWIS.MicroState.Model:

Package Downloads
DWIS.Scheduler.Model

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.1-build.99 120 6/5/2025
2.0.1-build.96 464 3/26/2025
2.0.1-build.92 121 3/14/2025
2.0.1-build.86 92 2/25/2025
2.0.1-build.76 105 12/12/2024
2.0.1-build.60 75 10/21/2024
2.0.1-build.53 69 10/17/2024
2.0.1-build.47 65 10/11/2024
2.0.1-alpha.40 67 10/10/2024
2.0.1-alpha.36 61 10/9/2024
2.0.1-alpha.34 67 10/9/2024
2.0.1-alpha.32 65 10/9/2024
1.0.2 239 9/30/2024
1.0.1 121 9/22/2024
1.0.0 122 9/3/2024