Adding Feasibility Rules
This section provides an example of adding feasibility rules to a process. The example uses the custom process, AbrasiveJet Cut (see Adding a New Process to a Process Group). Following Waterjet Cut, this new process will include a feasibility module that performs the follow checks:
Maximum material thickness check: blank thickness is less than or equal to the maximum blank thickness (as specified by a plant varaible).
Minimum material thickness check: blank thickness is greater than or equal to the minimum blank thickness (as specified by a plant varaible).
Maximum bundle thickness check: thickness of the stack of blanks to be processed is less than or equal to the maximum bundle thickness (as specified by a plant varaible).
Note that a complete implementation of the AbrasiveJet Cut process must include operation-level feasibility rules as well as the process-level feasibility rules described here (see the operation-level feasibility modules for Waterjet Cut).
For more information on feasibility rules, see Process and Operation Feasibility in the chapter Working with Cost Model Logic.
Follow these steps to define the process-level feasibility rules for AbrasiveJet Cut:
1 In the navigation pane, expand Processes, GCDs & Operations and double-click the AbrasiveJet Cut process.
2 In the editing pane, select the CSL tab.
3 Click on the folder icon, folder_icon.png, next to routingRule.
modify_routing_rule.png
An empty feasibility module appears in the editing pane. This is a copy of Laser Cut’s empty feasibility module.
In this example, the module is new, and so is editable without an explicit override. For inherited modules, you must select Override Object from the Edit menu, or click the override icon, green_dude.png, in the toolbar.
4 Enter the following code into the editing pane:
 
import libAbrasiveJetUtilities.csl
 
Rule MaxThicknessCheck: blank.thickness <= plant.waterjetMaxPartThickness
Message MaxThicknessCheck: _
'Material thickness is too thick for Waterjet Cutting.'
 
Rule MinThicknessCheck: blank.thickness >= plant.waterjetMinPartThickness
Message MinThicknessCheck: _
'Material thickness is too thin for Waterjet Cutting.'
 
Rule MaxBundleThicknessCheck: _
GetBundleThickness <= plant.waterjetMaxPartThickness
Message MaxBundleThicknessCheck: _
'Part stack thickness is too thick for Waterjet Cutting.'
 
In the code above, blank is a CSL standard input that represents the blank from which the current part is created. The expression blank.thickness designates the thickness of a single blank. The expressions plant.waterjetMaxPartThickness and plant.waterjetMinPartThickness designate the values of the plant variables waterjetMinPartThickness and waterjetMinPartThickness.
The formula GetBundleThickness must be defined in the library libAbrasiveJetUtilities.csl—see Creating a New Library.
For more information on CSL, see CSL Language Overview in the chapter Working with Cost Model Logic.