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

do we need to enumerate all applicableUnit? #29

Open
VladimirAlexiev opened this issue Jun 28, 2023 · 9 comments
Open

do we need to enumerate all applicableUnit? #29

VladimirAlexiev opened this issue Jun 28, 2023 · 9 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@VladimirAlexiev
Copy link
Contributor

Do we need to enumerate all applicableUnit, or are they "inherited" from the parent QuantityKind?

qudt:applicableUnit unit:CentiM ;
qudt:applicableUnit unit:IN ;
qudt:applicableUnit unit:M ;
qudt:applicableUnit unit:MilliIN ;
qudt:applicableUnit unit:MilliM ;
qudt:hasDimensionVector qkdv:A0E0L1I0M0H0T0D0 ;

@VladimirAlexiev VladimirAlexiev added the question Further information is requested label Jun 28, 2023
@beachtom
Copy link
Contributor

I know Passi made the point that the ontology should assume SI unit and it is the responsibility of UI to translate to/from that unit.

@VladimirAlexiev
Copy link
Contributor Author

For the Ramp example, I looked up the relevant IFC property:
https://github.com/Accord-Project/bcrl/blob/62a0b32fcc13d3b0839f44f940078aaca9bcc2b9/FI-accessibility.yaml#L279-L284

- $id: quantity/FI/accessibility/ramp/gradient
  ifcProperty: ifc:requiredSlope_IfcRamp # not sure about name
  rdfs:range: ifc:IfcPlaneAngleMeasure

That's measured in radian in IFC, so when comparing we have to use that unit:

            - $id: regulation/FI/accessibility/2.2.3.4.2
              $type: Clause
              clauseType: regulation/clauseType/Phrase
              identifier: 2.2.3.4.2
              text: the ramp may have a gradient of more than five per cent only if 
              quantity: quantity/FI/accessibility/ramp/gradient
              comparison: comparison/GT
              value: 0.049958 # radians = 5% = 2.86 degrees
              unit: radian # needs to be mapped to QUDT

But even if we limit to SI, a property will have a choice of apllicableUnit, eg m, cm, mm.

@beachtom
Copy link
Contributor

Agree we should have choice - but my view is the choice should be based on what the regulation says, and it is a processing engine's job to translate that to what is in the IFC

@VladimirAlexiev
Copy link
Contributor Author

Agreed, we should be true to the regulation text.
Ok, so you mean something like this:

- $id: quantity/FI/accessibility/ramp/gradient
  ifcProperty: ifc:requiredSlope_IfcRamp # not sure about name
  rdfs:range: ifc:IfcPlaneAngleMeasure
  unit: unit:RAD # from QUDT

- $id: regulation/FI/accessibility/2.2.3.4.2
  quantity: quantity/FI/accessibility/ramp/gradient
  comparison: comparison/GT
  value: 5
  unit: unit:GR # from QUDT "Grade: the tangent of an angle of inclination multiplied by 100"

Then the engine needs to:

  • figure out that RAD and GR are compatible (how? they're quantitykind:Angle vs quantitykind:DimensionlessRatio)
  • figure out how to convert (in this case qudt:conversionMultiplier doesn't apply because you need some trigonometry)

@VladimirAlexiev
Copy link
Contributor Author

VladimirAlexiev commented Jun 28, 2023

The original question has been answered: qudt/qudt-public-repo#720 and https://github.com/qudt/qudt-public-repo/wiki/Advanced-User-Guide#4-computing-applicable-units-for-a-quantitykind.
So @maximelefrancois86:

  • we don't need to enumerate all qudt:hasQuantityKind: if a QuantityKind doesn't have such, they are inherited from its parent
  • then qudt:applicableUnit are calculated as inverse of qudt:hasQuantityKind, taking into account the above point

I think we should describe this in prop documentation. I've suggested some edits in qudt/qudt-public-repo#720

@maximelefrancois86
Copy link
Contributor

aec3po:ModularRoomHeight and aec3po:WidthOfAngledCorridor only list a small set of S.I. applicable units. this restricts the set of units from quantitykind:Length.

However currently aec3po:CompressiveForce just defines the same set of applicable units as the broader quantitykind:Force, so it may be omitted.

solved in commit 96d0f6f

Am I right to assume the DimensionVector of a quantity kind should also be computable from the broader quantity kind ?

@VladimirAlexiev
Copy link
Contributor Author

The dimension vector should be the same, yes

@maximelefrancois86
Copy link
Contributor

So can we avoid expliciting this metadata ?

@VladimirAlexiev
Copy link
Contributor Author

We can and we should, otherwise it will be a nightmare to maintain. Changing to "bug"

@VladimirAlexiev VladimirAlexiev added bug Something isn't working and removed quantity labels Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants