CSL Language Overview
When the cost engine evaluates a CSL module, it either calculates values for the module’s outputs, such as cycleTime and laborCost, or it returns a boolean value, true or false. Output values become available to other CSL modules during the costing process, as well as to the aPriori GUI when costing is complete. Returned boolean values help guide the choice of process routings and operation sequences.
CSL modules can be divided into three categories:
Taxonomy modules calculate those outputs, such as cycleTime and laborCost, that are specified by the module’s associated formula table in the CMWB (see Navigating from the Template Graph to the Data for a Given Node). Taxonomy modules include the following module types:
o Process taxonomy
o Operation taxonomy
Selection modules establish values for special output identifiers associated with their module types, for example, machine for machine selection modules and tool for tool selection modules. Other modules can subsequently use these identifiers to access the established values. Selection modules include the following module types:
o Material stock selection
o Machine selection
o Tool selection
Modules that return a boolean value, such as feasibility modules, consist primarily of rules. They return true if all the rules succeed; they return false if any rule fails. Modules that return a boolean value include, among others, the following module types:
o Process feasibility
o Operation feasibility
o Template pruning
o Process optionality
o Operation optionality
In addition to outputs, CSL modules also have a number of standard inputs, such as part, material, machine, plant, and setup, which allow a module’s code to access VPE and cost model data, such as plant variables, current setup options, and attributes of the current part, machine, and material, among other values. See Inputs in Cost Scripting Language Reference for more information on standard inputs.
This language overview includes the following sections: