Talk:OPERAT
raphael 20:33, 27 October 2009 (UTC): Ideas for a better name than OPERAT are welcome. The rationale for this variable and the reasons for not using "function" are at Talk:UKCVAR.
I suggest the following addition to the definition:
Remarks:
OPERAT is intended to be used in conjunction with other sub-attributes of a complex attribute to indicate how their values must be combined in order to describe a condition. Example: The combination
UKCLRN (complex attribute)
UKCFIX=2.5, UKCVAR=10.00, OPERAT=1 (sub-attributes)
indicates that the under-keel clearance required is the greater of 2.5 metres or 10% of the ship's draught.
jens 06:16, 28 October 2009 (UTC) I agree. The remarks are useful.
Draft extension for logical connectives
raphael 00:15, 16 February 2010 (UTC): Here is a draft of the extension discussed on Talk:CHALIM.
Definition: A process or action, such as addition, substitution, transposition, or differentiation, logical conjunction or disjunction, performed in a specified sequence and in accordance with specific rules.
Attribute values: add
3 logical conjunction
4 logical disjunction
logical conjunction
all the conditions described by the other attributes of the object, or sub-attributes of the same complex attribute, are true
logical disjunction
at least one of the conditions described by the other attributes of the object, or sub-attributes of the same complex attributes, is true
Remarks: Add:
When bound to the object CHALIM, OPERAT can take only the values 3 or 4.
CHALIM/MAXLOA = 50.0, CHALIM/MAXDRF=10.0, CHALIM/OPERAT=3
implies the limitation applies only when LOA > 50.0 and draught > 10.0
I have drafted it as an extension to OPERAT so we can discuss it, but am a little reluctant to make the concept of "logical connection" an extension of OPERAT instead of a different attribute. As drafted, the combination looks a little awkward to me, even if it is not mixing apples and oranges, it looks like to different varieties of apples...
jens 11:29, 16 February 2010 (UTC) Thought more on that. Can we say that logical conjunction/disjunction are few of the bitwise logic operations (AND (logical conjunction), NOT (logical negation), OR (logical disjuntion), XOR (exclusive disjunction))? Does S100 support that? I am in doubt; see e.g. 1-4.3 (page 18), 3-5.2.9 (page 73) and 3-6.4.2 (page 79). But further down in the document they talk too much about attributes and operations. Can one give me an advice which assumption is correct now? Does S100 support the operation idea in conjunction with attribute values or not? If yes. than I would propose to move the logic operations to a separate attribute.
raphael 18:13, 16 February 2010 (UTC): The reason I wanted to make a new attribute is to separate logical from non-logical combination. To answer your queations: Yes, logical conjunction/disjunction are two of the logic operations AND, NOT, OR, XOR. ("Bitwise logic" has a slightly different meaning.) S100 does not support operations, but only in the sense that one cannot say CHALIM has operations sizeOfText, logicalAND:
int sizeOfText(): returns the size of the file named by TXTDSC, 0 if the TXTDSC attribute is absent or null, or -1 if the file is not found
boolean logicalAND(): returns TRUE if the OPERAT attribute exists and has value=3, FALSE otherwise
But this is not what we are doing. The attribute OPERAT just says how the values of other attributes are expected to be used. It is for the application to code a function that implements the logical AND/OR operation and produces the result for use by the application.