You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/digital-twins/how-to-manage-model.md
+17-5Lines changed: 17 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ titleSuffix: Azure Digital Twins
5
5
description: Learn how to manage DTDL models within Azure Digital Twins, including how to create, edit, and delete them.
6
6
author: baanders
7
7
ms.author: baanders # Microsoft employees only
8
-
ms.date: 02/06/2023
8
+
ms.date: 04/05/2023
9
9
ms.topic: how-to
10
10
ms.service: digital-twins
11
11
@@ -31,7 +31,11 @@ This article describes how to manage the [models](concepts-models.md) in your Az
31
31
32
32
## Create models
33
33
34
-
Models for Azure Digital Twins are written in DTDL, and saved as .json files. There's also a [DTDL extension](https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.vscode-dtdl) available for [Visual Studio Code](https://code.visualstudio.com/), which provides syntax validation and other features to make it easier to write DTDL documents.
34
+
You can create your own models from scratch, or use existing ontologies that are available for your industry.
35
+
36
+
### Author models
37
+
38
+
Models for Azure Digital Twins are written in DTDL, and saved as JSON files. There's also a [DTDL extension](https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.vscode-dtdl) available for [Visual Studio Code](https://code.visualstudio.com/), which provides syntax validation and other features to make it easier to write DTDL documents.
35
39
36
40
Consider an example in which a hospital wants to digitally represent their rooms. Each room contains a smart soap dispenser for monitoring hand-washing, and sensors to monitor traffic through the room.
37
41
@@ -40,15 +44,23 @@ The first step towards the solution is to create models to represent aspects of
> This is a sample body for a .json file in which a model is defined and saved, to be uploaded as part of a client project. The REST API call, on the other hand, takes an array of model definitions like the one above (which is mapped to a `IEnumerable<string>` in the .NET SDK). So to use this model in the REST API directly, surround it with brackets.
47
+
> This is a sample body for a JSON file in which a model is defined and saved, to be uploaded as part of a client project. The REST API call, on the other hand, takes an array of model definitions like the one above (which is mapped to a `IEnumerable<string>` in the .NET SDK). So to use this model in the REST API directly, surround it with brackets.
44
48
45
49
This model defines a name and a unique ID for the patient room, and properties to represent visitor count and hand-wash status. These counters will be updated from motion sensors and smart soap dispensers, and will be used together to calculate a `handwash percentage` property. The model also defines a relationship `hasDevices`, which will be used to connect any [digital twins](concepts-twins-graph.md) based on this Room model to the actual devices.
46
50
47
-
Following this method, you can go on to define models for the hospital's wards, zones, or the hospital itself.
48
-
49
51
> [!NOTE]
50
52
> There are some DTDL features that Azure Digital Twins doesn't currently support, including the `writable` attribute on properties and relationships, and `minMultiplicity` and `maxMultiplicity` for relationships. For more information, see [Service-specific DTDL notes](concepts-models.md#service-specific-dtdl-notes).
51
53
54
+
Following this method, you can define models for the hospital's wards, zones, or the hospital itself.
55
+
56
+
If your goal is to build a comprehensive model set that describes your industry domain, consider whether there's an existing industry ontology that you can use to make model authoring easier. The next section describes industry ontologies in more detail.
57
+
58
+
### Use existing industry-standard ontologies
59
+
60
+
An *ontology* is a set of models that comprehensively describe a given domain, like manufacturing, building structures, IoT systems, smart cities, energy grids, web content, and more.
61
+
62
+
If your solution is for a certain industry that uses any sort of modeling standard, consider starting with a pre-existing set of models designed for your industry instead of designing your models from scratch. Microsoft has partnered with domain experts to create DTDL model ontologies based on industry standards, to help minimize reinvention and encourage consistency and simplicity across industry solutions. You can read more about these ontologies, including how to use them and what ontologies are available now, in [What is an ontology?](concepts-ontologies.md).
63
+
52
64
### Validate syntax
53
65
54
66
[!INCLUDE [Azure Digital Twins: validate models info](../../includes/digital-twins-validate.md)]
0 commit comments