<< Click to Display Table of Contents >> Square Root |
Overview
This function obtains the square root of a number
The parameter of this function can be defined as an XPath, variable or number.
Considerations
•Input parameters must be double.
•The supported attribute types to use as input XPath parameter (or Xpaths stored in variables) are: integer, currency, float, real.
•The function returns an error if the input parameter is either too long or undefined.
•The function returns an error if the input parameter is negative.
•Use the IsNaN function to validate the parameter is a number.
Example
A company uses Bizagi to manage their logistics processes. One of these is Inventory management. In one of the activities of this process it is necessary to calculate the economic quantity order of a product. This quantity can be obtained by using following formula:
Where Q* is the optimal quantity to order, D is the annual demand of the product, K is fixed cost per order and h is the annual holding cost per unit.
This quantity can be calculated in Bizagi by using the Sqrt function:
//Obtain the parameters of the formula in variables
D = <InventoryManagement.Demand>;
K = <InventoryManagement.OrderCost>;
h = <InventoryManagement.HoldingCost>;
//Calculate the economic quantity order
<InventoryManagement.EconomicQuantityOrder> = CHelper.Math.Sqrt(2*D*K / h);
Last Updated 1/6/2022 4:20:11 PM