QuantityChangeDirectionEnum
Enum CDM 7.2.0Specifies whether a quantity change is an increase, a decrease or a replacement, whereby the quantity is always specified as a positive number.
Values 3
Namespace cdm.base.math
Values
3 permitted values.
| Value | Description |
|---|---|
| Increase | When the quantity should go up by the specified amount. |
| Decrease | When the quantity should go down by the specified amount. |
| Replace | When the quantity should be replaced by the specified amount. |
Referenced by
1 type holds a QuantityChangeDirectionEnum as an attribute.
Functions
Model functions that produce or consume this type. These are the CDM's own behaviour — the logic a correct implementation has to match.
| Function | Role | Description |
|---|---|---|
| UpdateAmount | takes | Updates an amount based on the given QuantityChangeDirectionEnum. If the direction is Increase, the old amount and change amount are summed, if the direction is Decrease, then the change amount is subtracted from the old amount, and if the direction is Replace then the change amount replaces the old amount. |
| InsertDatedValue | takes | Build a list of datedValues with the new entry inserted after the last item whose date is either before or the same as the effective date. The value for the new entry is taken from the previous datedValue item. Note that this will append a new entry if the effective date is greater than all the dates in the datedValue list. |
| UpdateDatedValue | takes | Updates the amount of the dated value that matches the effective date passed in. Only the datedValue item(s) that match the effective date will be updated according to the direction. |
| UpdateNonNegativeDatedValues | takes | Updates the amounts of the dated values based on the given QuantityChangeDirectionEnum. For all periods after the effective date of the change, if the direction is Increase, the old amount and change amount are summed, if the direction is Decrease, then the change amount is subtracted from the old amount, and if the direction is Replace then the change amount replaces the old amount. |
| MapQuantityChangeInstruction | takes | — |
| UpdateAmountForEachMatchingQuantity | takes | Updates any price or quantity from the list of PriceQuantity if the unit of amount matches. |
| UpdatePriceAmountForEachMatchingQuantity | takes | Updates any price from the PriceSchedule list if the unit of amount matches. |
| UpdateQuantityAmountForEachMatchingQuantity | takes | Updates any quantity from the NonNegativeQuantitySchedule list if the unit of amount matches. |
Open QuantityChangeDirectionEnum in the Model Browser
Walk the tree and the reference graph interactively, and switch releases to see how the enumeration has changed. Free, no signup.