====Calculation Example: Area, Volume & Weight==== In this example, we will take the details of the product we're producing and calculate the area, volume and weight of the product. ===Available Information=== ^Asset^Property^Desc^ |Paint Line|Thickness|The thickness of the product we're making (m)| |Paint Line|Width|The width of the product we're making (m)| ^Known Values^Amount^Desc^ |Density|300|The weight of 1 cubic meter of product (kg)| ===Initial Layout=== {{calc_start.png}} To begin with, we have one [[calc_output|Calculation Output]] node, and one [[ardi_point|ARDI Point]] node. ===Step 1: Calculate Area=== Before we can calculate the **weight** of our product, we need to know the **area** of our product. Luckily, we're producing a rectangular slab, so it's as simple as //width// times //height//. ==Get the Width== * Click on the existing **Input** node, where it says //none//. \\ * From the pop-up list, choose the //width// of your product. {{calc_example_width.png}} ==Get the Thickness== * Copy your **Input** node by right-clicking it and choosing //Clone// from the menu. * Click on the new node and choose the //thickness// of the product from the list. {{calc_example_thick.png}} ==Multiply the Numbers== * Right-click an empty area and choose **Add Node**, **Math** and **Mult** to add a new [[math_mult|Multiplication]] node. * Drag the output of your //width// and drag it to the first input of your new Multiplication node. * Drag the output of your //thickness// and drag it to the second input of your new Multiplication node. * Drag the output of your //multiplication// node and drag it to the input of your //value// node. {{calc_example_area.png}} ===Step 2: Calculate Weight=== To convert from a cross-sectional area to a weight, we need to know the //density// of the product - which in this case is 300kg for every 1 cubic metre. The [[module_calculation|calculation module]] can have multiple outputs, so we can easily clone our existing output so that our calculation delivers both the area and the weight. ==Create a Second Output== * Right-click on the //value// node, choose **Title** and change its name to **Area**. * Right-click on the same node again, and choose //Clone//. * Right-click on the new node, choose **Title** and change its name to **Weight**. {{calc_example_double.png}} ==Multiply the Area by the Density== * Right-click empty space, choose **Add Node**, **Basic** and **[[basic_const|Number Const]]**. * Click the value on the new node and type '300'. * Right-click on the //Mult// node and choose //Clone//. * Drag the output of the //Number Const// into the new Mult node. * Drag the output of the **original** mult node into the **new** mult node. * Drag the output of the new Mult node into the input of the Weight node. {{calc_example_finished.png}} ===Step 3: Weight Rate=== If needed, we could take this even further - multiplying the //production speed// by the new //weight per meter// would let us show how many tonnes per hour we're producing. {{calc_example_more.png}} ===The Results=== In the end, we have a chart and an API function that gives us quick access to the calculated values. {{calc_example_display.png}}