buildingSMART / IFC4.3.x-development

Repository to collect updates to the IFC4.3 Specification
Other
168 stars 86 forks source link

Should we merge IfcTimeMeasure and IfcDuration? #361

Open Moult opened 2 years ago

Moult commented 2 years ago

If you wanted to push this farther one could also fix units for the value "Warranty Duration" to be months as warranties on typical building products range from 12 to 60 months.

In the core spec we don't have nominated units for properties, only measures.

In this case WarrantyPeriod is IfcDuration http://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/lexical/IfcDuration.htm

EXAMPLE: P2Y10M15DT10H30M20S (duration of two years, 10 months, 15 days, 10 hours, 30 minutes and 20 seconds).

It seems much more logical to me to have a IfcConversionBasedUnit for months, the examples there already list days:

'day' Time measure equal to 86400 s

Do we need both IfcTimeMeasure and IfcDuration? Can we have a discussion on the merits of each and which to apply where?

Advantages of the numeric IfcTimeMeasure:

Originally posted by @aothms in https://github.com/buildingSMART/IFC4.3.x-development/issues/54#issuecomment-1046186166

Moult commented 2 years ago

Just 2 cents on this topic:

Currently the usage of durations does all sorts of magic in the construction sequencing domain. For example, if I specify that a task takes P10D, or 10 working days, if I change my calendar working times from a 9 hour day to an 8.5 hour day, do I want my P10D to remain unchanged, or be recalculated? I would assume it should be unchanged. So ... IfcDuration has merits that it isn't an IfcTimeMeasure.

Allocating to sequence guys to get a bit more feedback on this, since I've definitely had to write some ugly code to deal with durations and every sequencing program out there has settings like "hours in a day" or "days in a month" that make me rethink this.

aothms commented 2 years ago

or 10 working days

I didn't see this relation to working days / hours noted in the IfcDuration docs. Is it worth it to add a note for novices in the sequencing domain?

But thanks for the clarification. Then I wouldn't invest time in schema changes in this regard.

Moult commented 2 years ago

Oh 10 working days was arbitrary, it could equally well have been elapsed days.

Hmm, I don't think it's necessary to add a note, it was very clear from when I looked at the sequencing entities.

Moult commented 2 years ago

I'd like to keep this open a while longer to get @JovanMarkovicBexel 's thoughts on this, he's played in this sequencing game far longer than I have, and maybe there is merit to removing all the IfcDuration, making a REAL the root data storage, and then storing parameters for "hours in day" and so on.

TLiebich commented 2 years ago

my vote would be to keep both, IfcDuration - same as IfcDate, IfcTime - rely on ISO 8601 and is related to all type of measures that relate to calender.

On the opposite, IfcTimeMeasure, is based on ISO 1000, and is used in conversion based units as the time component and does not relate to calender.

I see the need for both. There is a third way to measure time, the IfcTimeStamp - this indeed is only used in IfcOwnerHistory and also relate to calendar. This is superflous. Unfortunately we just can't change it due to backward compatibility.