Coder Social home page Coder Social logo

Applicability logic about ids HOT 6 OPEN

jomijomi avatar jomijomi commented on July 4, 2024
Applicability logic

from ids.

Comments (6)

NickNisbet avatar NickNisbet commented on July 4, 2024

from ids.

jomijomi avatar jomijomi commented on July 4, 2024

Thanks for your quick reply Nick! However, I realize I perhaps wasn't clear enough in my explanation. I do have a requirement also that I want to check (if the applicability passes, so to say), but I left that snippet out as my main concern was with the applicability. So, in plain text I want to check a requirement, but I only want to check for that "IF the element is a IfcFurnishingElement AND it has this specific PropSet/Prop/Value".

As such, this example is more like "I want to check for the occurrence of a certain property, but I only want to check for that on load bearing walls", hence in my applicability I would then check both Entity being IfcWall AND the PropSet/Prop/Value being Pset_WallCommon/LoadBearing/True. In fact, some of the IDS templates at the BIMCollab site was my starting point and I found this kind of usage in some of the applicability sections (se below). However, still, my case with IfcFurnishingElement didn't seem to work. At least not in Solibri... So, that is why I wanted to understand if this was the right syntax/structure.

      <applicability>
        <entity>
          <name>
            <simpleValue>IFCWALL</simpleValue>
          </name>
        </entity>
        <property>
          <propertySet>
            <simpleValue>Pset_WallCommon</simpleValue>
          </propertySet>
          <name>
            <simpleValue>LoadBearing</simpleValue>
          </name>
          <value>
            <simpleValue>True</simpleValue>
          </value>
        </property>
      </applicability>

from ids.

andyward avatar andyward commented on July 4, 2024

It's supposed to be an AND (intersect) between the facets. (See #181) But whether the test passes or fails will depend on the "Cardinality" on the specification (note: we're talking about the spec cardinality, not the facet cardinality).

Current understanding (based on #203):

If the spec is required (minOccurs=1) and there are no applicable "IfcFurnishingElements classed as Desks" it should fail (regardless of the requirement) - because there are no applicable items matching.
If it's an optional spec (minOccurs = 0), then it will only fail if the requirements are not satisfied for any of the applicable items (if there are no applicable items it will pass)
If it's prohibited (maxOccurs = 0), then the test fails if there are any matching applicable items - i.e. if there are "IfcFurnishingElements classed as Desks"

So to answer we'd need to see the full spec. In your example it could pass if you only have UglyDesks and the spec is optional.

from ids.

andyward avatar andyward commented on July 4, 2024

In fact, some of the IDS templates at the BIMCollab site was my starting point

Worth noting the IDS at https://download.bimcollab.com/Support/EN_Basic%20IDM%20Check.ids doesn't seem to adhere to the latest IDS 0.96 schema. If you run through a validator (e.g. the ids-tool or https://www.xbim.it/ids) it will flag up a number of issues. In particular that IDS doesn't specify any facet cardinalities, and the Attribute names being in UPPERCSASE may cause issues.

A further edge case is that it seems to expect that IDS simpleValues can contain wildcard patterns, which is not behaviour I've seen documented.

e.g. The use of "Type ??.*" in a simpleValue seems wrong here:

<applicability>
        <entity>
          <name>
            <simpleValue>IFCDOOR</simpleValue>
          </name>
        </entity>
      </applicability>
      <requirements>
        <attribute>
          <name>
            <simpleValue>NAME</simpleValue>
          </name>
          <value>
            <simpleValue>Type ??.*</simpleValue>
          </value>
        </attribute>
      </requirements>

... if the requirement is that Doors be named like this:
image

This would need to be a pattern constraint to work as expected across implementors.

Lastly, the use of this applicability is a bit of a workaround for the fact IDS doesn't yet support entity inheritance.

      <applicability>
        <attribute>
          <name>
            <simpleValue>GLOBALID</simpleValue>
          </name>
        </attribute>
      </applicability>

It's basically saying, this applies to all elements descended from IfcRoot. It's novel, and because of that it may not be supported by all implementors (and kind of makes the case that we need entity inheritance/sub-typing)

Not sure who from Kubus/BIMCollab is on the project but hopefully they can chip in?

from ids.

I-Sokolov avatar I-Sokolov commented on July 4, 2024

It would be good to add such multi-facet conditions to IDS/Documentation/testcases both for applicability and requirements

from ids.

NickNisbet avatar NickNisbet commented on July 4, 2024

from ids.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.