CalculationDefinition

CalculationDefinition is defined in SysML specification on page 379. Excerpt from the machine readable specification:

A CalculationDefinition is an ActionDefinition that also defines a Function producing a result.

The following diagram shows the inheritance hierarchy of CalculationDefinition according to the specification:

// Class: CalculationDefinition
 digraph {
     CalculationDefinition [label="CalculationDefinition (SysML)" shape=plaintext]
     ActionDefinition -> CalculationDefinition
     Function -> CalculationDefinition
     ActionDefinition [label="ActionDefinition (SysML)" shape=plaintext]
     OccurrenceDefinition -> ActionDefinition
     Behavior -> ActionDefinition
     Function [label="Function (KerML)" shape=plaintext]
     Behavior -> Function
     OccurrenceDefinition [label="OccurrenceDefinition (SysML)" shape=plaintext]
     Definition -> OccurrenceDefinition
     Class -> OccurrenceDefinition
     Behavior [label="Behavior (KerML)" shape=plaintext]
     Class -> Behavior
     Definition [label="Definition (SysML)" shape=plaintext]
     Classifier -> Definition
     Class [label="Class (KerML)" shape=plaintext]
     Classifier -> Class
     Classifier [label="Classifier (KerML)" shape=plaintext]
     Type -> Classifier
     Type [label="Type (KerML)" shape=plaintext]
     Namespace -> Type
     Namespace [label="Namespace (KerML)" shape=plaintext]
     Element -> Namespace
     Element [label="Element (KerML)" shape=plaintext]
 }

The following table shows all attributes defined for CalculationDefinition according to the specification together with the documentation from the machine readable specification. Note that in SysIDE API, we use snake case for attribute names instead of Pascal case used in the specification.

Attribute

Documentation from machine readable specification

Attributes defined in CalculationDefinition:

calculations

The actions of this CalculationDefinition that are CalculationUsages.

Attributes defined in ActionDefinition:

actions

The ActionUsages that are steps in this ActionDefinition, which define the actions that specify the behavior of the ActionDefinition.

Attributes defined in Function:

expressions

The Expressions that are steps in the calculation of the result of this Function.

The set of expressions that represent computational steps or parts of a system of equations within the Function.

is_model_level_evaluable

Whether this Function can be used as the function of a model-level evaluable InvocationExpression. Certain Functions from the Kernel Functions Library are considered to have isModelLevelEvaluable = true. For all other Functions it is false.

Note: See the specification of the KerML concrete syntax notation for Expressions for an identification of which library Functions are model-level evaluable.

result

The object or value that is the result of evaluating the Function.

The result parameter of the Function, which is owned by the Function via a ReturnParameterMembership.

Attributes defined in OccurrenceDefinition:

is_individual

Whether this OccurrenceDefinition is constrained to represent single individual.

life_class

If isIndividual is true, a LifeClass that specializes this OccurrenceDefinition, restricting it to represent an individual.

Attributes defined in Behavior:

parameters

The parameters of this Behavior, which are defined as its directedFeatures, whose values are passed into and/or out of a performance of the Behavior.

steps

The Steps that make up this Behavior.

Attributes defined in Definition:

directed_usages

The usages of this Definition that are directedFeatures.

is_variation

Whether this Definition is for a variation point or not. If true, then all the memberships of the Definition must be VariantMemberships.

owned_actions

The ActionUsages that are ownedUsages of this Definition.

owned_allocations

The AllocationUsages that are ownedUsages of this Definition.

owned_attributes

The AttributeUsages that are ownedUsages of this Definition.

owned_calculations

The CalculationUsages that are ownedUsages of this Definition.

owned_cases

The code>CaseUsages that are ownedUsages of this Definition.

owned_concerns

The ConcernUsages that are ownedUsages of this Definition.

owned_connections

The ConnectorAsUsages that are ownedUsages of this Definition. Note that this list includes BindingConnectorAsUsages, SuccessionAsUsages, and FlowConnectionUsages because these are ConnectorAsUsages even though they are not ConnectionUsages.

owned_constraints

The ConstraintUsages that are ownedUsages of this Definition.

owned_enumerations

The EnumerationUsages that are ownedUsages of this Definition.

owned_flows

The FlowConnectionUsages that are ownedUsages of this Definition.

owned_interfaces

The InterfaceUsages that are ownedUsages of this Definition.

owned_items

The ItemUsages that are ownedUsages of this Definition.

owned_metadata

The MetadataUsages that are ownedUsages of this Definition.

owned_occurrences

The OccurrenceUsages that are ownedUsages of this Definition.

owned_parts

The PartUsages that are ownedUsages of this Definition.

owned_ports

The PortUsages that are ownedUsages of this Definition.

owned_references

The ReferenceUsages that are ownedUsages of this Definition.

owned_renderings

The RenderingUsages that are ownedUsages of this Definition.

owned_states

The StateUsages that are ownedUsages of this Definition.

owned_transitions

The TransitionUsages that are ownedUsages of this Definition.

owned_usages

The Usages that are ownedFeatures of this Definition.

owned_use_cases

The UseCaseUsages that are ownedUsages of this Definition.

owned_verification_cases

The VerificationCaseUsages that are ownedUsages of this Definition.

owned_views

The ViewUsages that are ownedUsages of this Definition.

owned_viewpoints

The ViewpointUsages that are ownedUsages of this Definition.

usages

The Usages that are features of this Definition (not necessarily owned).

variants

The Usages which represent the variants of this Definition as a variation point Definition, if isVariation = true. If isVariation = false, the there must be no variants.

variant_memberships

The ownedMemberships of this Definition that are VariantMemberships. If isVariation = true, then this must be all ownedMemberships of the Definition. If isVariation = false, then variantMembershipmust be empty.

Attributes defined in Class:

Attributes defined in Classifier:

owned_subclassifications

The ownedSpecializations of this Classifier that are Subclassifications, for which this Classifier is the subclassifier.

Attributes defined in Type:

differencing_types

The interpretations of a Type with differencingTypes are asserted to be those of the first of those Types, but not including those of the remaining Types. For example, a Classifier might be the difference of a Classifier for people and another for people of a particular nationality, leaving people who are not of that nationality. Similarly, a feature of people might be the difference between a feature for their children and a Classifier for people of a particular sex, identifying their children not of that sex (because the interpretations of the children Feature that identify those of that sex are also interpretations of the Classifier for that sex).

directed_features

The features of this Type that have a non-null direction.

end_features

All features of this Type with isEnd = true.

features

The ownedMemberFeatures of the featureMemberships of this Type.

feature_memberships

The FeatureMemberships for features of this Type, which include all ownedFeatureMemberships and those inheritedMemberships that are FeatureMemberships (but does not include any importedMemberships).

inherited_features

All the memberFeatures of the inheritedMemberships of this Type that are FeatureMemberships.

inherited_memberships

All Memberships inherited by this Type via Specialization or Conjugation. These are included in the derived union for the memberships of the Type.

inputs

All features related to this Type by FeatureMemberships that have direction in or inout.

intersecting_types

The interpretations of a Type with intersectingTypes are asserted to be those in common among the intersectingTypes, which are the Types derived from the intersectingType of the ownedIntersectings of this Type. For example, a Classifier might be an intersection of Classifiers for people of a particular sex and of a particular nationality. Similarly, a feature for people’s children of a particular sex might be the intersection of a Feature for their children and a Classifier for people of that sex (because the interpretations of the children Feature that identify those of that sex are also interpretations of the Classifier for that sex).

is_abstract

Indicates whether instances of this Type must also be instances of at least one of its specialized Types.

is_conjugated

Indicates whether this Type has an ownedConjugator.

is_sufficient

Whether all things that meet the classification conditions of this Type must be classified by the Type.

(A Type gives conditions that must be met by whatever it classifies, but when isSufficient is false, things may meet those conditions but still not be classified by the Type. For example, a Type Car that is not sufficient could require everything it classifies to have four wheels, but not all four wheeled things would classify as cars. However, if the Type Car were sufficient, it would classify all four-wheeled things.)

multiplicity

An ownedMember of this Type that is a Multiplicity, which constraints the cardinality of the Type. If there is no such ownedMember, then the cardinality of this Type is constrained by all the Multiplicity constraints applicable to any direct supertypes.

outputs

All features related to this Type by FeatureMemberships that have direction out or inout.

owned_conjugator

A Conjugation owned by this Type for which the Type is the originalType.

owned_differencings

The ownedRelationships of this Type that are Differencings, having this Type as their typeDifferenced.

owned_disjoinings

The ownedRelationships of this Type that are Disjoinings, for which the Type is the typeDisjoined Type.

owned_end_features

All endFeatures of this Type that are ownedFeatures.

owned_features

The ownedMemberFeatures of the ownedFeatureMemberships of this Type.

owned_feature_memberships

The ownedMemberships of this Type that are FeatureMemberships, for which the Type is the owningType. Each such FeatureMembership identifies an ownedFeature of the Type.

owned_intersectings

The ownedRelationships of this Type that are Intersectings, have the Type as their typeIntersected.

owned_specializations

The ownedRelationships of this Type that are Specializations, for which the Type is the specific Type.

owned_unionings

The ownedRelationships of this Type that are Unionings, having the Type as their typeUnioned.

unioning_types

The interpretations of a Type with unioningTypes are asserted to be the same as those of all the unioningTypes together, which are the Types derived from the unioningType of the ownedUnionings of this Type. For example, a Classifier for people might be the union of Classifiers for all the sexes. Similarly, a feature for people’s children might be the union of features dividing them in the same ways as people in general.

Attributes defined in Namespace:

members

The set of all member Elements of this Namespace, which are the memberElements of all memberships of the Namespace.

memberships

All Memberships in this Namespace, including (at least) the union of ownedMemberships and importedMemberships.

owned_imports

The ownedRelationships of this Namespace that are Imports, for which the Namespace is the importOwningNamespace.

owned_members

The owned members of this Namespace, which are the ownedMemberElements of the ownedMemberships of the Namespace.

owned_memberships

The ownedRelationships of this Namespace that are Memberships, for which the Namespace is the membershipOwningNamespace.

Attributes defined in Element:

declared_name

The declared name of this Element.

declared_short_name

An optional alternative name for the Element that is intended to be shorter or in some way more succinct than its primary name. It may act as a modeler-specified identifier for the Element, though it is then the responsibility of the modeler to maintain the uniqueness of this identifier within a model or relative to some other context.

documentation

The Documentation owned by this Element.

element_id

The globally unique identifier for this Element. This is intended to be set by tooling, and it must not change during the lifetime of the Element.

is_implied_included

Whether all necessary implied Relationships have been included in the ownedRelationships of this Element. This property may be true, even if there are not actually any ownedRelationships with isImplied = true, meaning that no such Relationships are actually implied for this Element. However, if it is false, then ownedRelationships may not contain any implied Relationships. That is, either all required implied Relationships must be included, or none of them.

is_library_element

Whether this Element is contained in the ownership tree of a library model.

name

The name to be used for this Element during name resolution within its owningNamespace. This is derived using the effectiveName() operation. By default, it is the same as the declaredName, but this is overridden for certain kinds of Elements to compute a name even when the declaredName is null.

owned_annotations

The ownedRelationships of this Element that are Annotations, for which this Element is the annotatedElement.

owned_elements

The Elements owned by this Element, derived as the ownedRelatedElements of the ownedRelationships of this Element.

owned_relationships

The Relationships for which this Element is the owningRelatedElement.

owner

The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this Element, if any.

owning_membership

The owningRelationship of this Element, if that Relationship is a Membership.

owning_namespace

The Namespace that owns this Element, which is the membershipOwningNamespace of the owningMembership of this Element, if any.

owning_relationship

The Relationship for which this Element is an ownedRelatedElement, if any.

qualified_name

The full ownership-qualified name of this Element, represented in a form that is valid according to the KerML textual concrete syntax for qualified names (including use of unrestricted name notation and escaped characters, as necessary). The qualifiedName is null if this Element has no owningNamespace or if there is not a complete ownership chain of named Namespaces from a root Namespace to this Element.

short_name

The short name to be used for this Element during name resolution within its owningNamespace. This is derived using the effectiveShortName() operation. By default, it is the same as the declaredShortName, but this is overridden for certain kinds of Elements to compute a shortName even when the declaredName is null.

textual_representations

The TextualRepresentations that annotate this Element.

The following table lists SysIDE specific attributes available for class CalculationDefinition:

class CalculationDefinition
__cpp_name__: str = 'syside::sysml::CalculationDefinition'
STD: tuple[type[syside.CalculationDefinition], ...] = ()
property calculations: syside.LazyIterator[syside.CalculationUsage]
property is_model_level_evaluable: bool
property expressions: syside.LazyIterator[syside.Expression | syside.CalculationUsage | syside.ConstraintUsage]
property result: syside.Feature | None
property any_result: syside.Feature | None
property result_expression: syside.Expression | None
property result_expression_member: syside.ResultExpressionAccessor
property steps: syside.LazyIterator[syside.Step | syside.ActionUsage | syside.FlowConnectionUsage]
property parameters: syside.LazyIterator[syside.Feature]
property actions: syside.LazyIterator[syside.ActionUsage | syside.FlowConnectionUsage]