Azure / opendigitaltwins-dtdl

Digital Twins Definition Language
Creative Commons Attribution 4.0 International
473 stars 161 forks source link

Best approach for creating a relationship with linked values #166

Open aditphilip opened 1 year ago

aditphilip commented 1 year ago

Hey,

So I've been doing som research regarding creating a model which has got a relationship with another model and I was trying to find a way in which I could link the values between these models.

For example if I have a model which is called Building and I now create a second model called Floor which has a contains relationship with Building and then create another model called Room which has got sensors like temperature, humidity, etc. and also has a contains relationship with Floor. Is it possible for me to then record these temperature values in room and let's say for example the temeperature in the room is too high so I want to turn on the heating, is there anyway for me to send this data to floor as well and have it reflect the change but not have the change reflected in building. Meaning I want the temperature data for floor and room to be the same so it reflects the same changes but I do not want to see any change in the value of the building.

How would I be able to implement this example?

jrdouceur commented 1 year ago

I don't think this is really a DTDL question. DTDL does not specify any semantics for Relationships; this is entirely up to the system or service that defines, implements, and queries the Relationships. If you are using Azure Digital Twins, you might be able to find an appropriate example or guidance in their documentation: https://learn.microsoft.com/en-us/azure/digital-twins/

aditphilip commented 1 year ago

Thanks @jrdouceur for your help! I am using the Azure Digital Twins service so I was wondering if there was any possibility to do this on this service. I have been through the documentation and have not really found anything regarding this. Do you know if theres a possibility of establishing this?

jrdouceur commented 1 year ago

I'm afraid I know very little about Azure Digital Twins; my expertise is in the DTDL language. I looked around a bit and found this site, which might get you one step closer to an answer: https://azure.microsoft.com/en-us/support/

aditphilip commented 1 year ago

Thanks @jrdouceur for your help, I shall look into it and see what can be done