Machine Selection

A machine selection module helps aPriori choose a machine that is feasible and desirable for a given process. A plastic molding machine selection module might, for example, find the machine with lowest overhead rate that is large enough to accommodate the current part and has sufficient clamp force and shot size to make the part (see the example below).

The job of the module is to select a machine and assign it to the CSL output machine.

The list of available machines for a given process is presented in aPriori ’s Edit Machine Selection dialog (right click on a process in the manufacturing process pane). When the cost engine evaluates a machine selection module, it puts into scope the CSL standard input machines, and establishes as its value either a collection that contains each of these available machines or a collection that contains just the user-selected machine, depending on the machine selection mode.

aPriori has four machine selection modes (see the Edit Machine Selection dialog in aPriori ):

  • aP Select

  • User Select/ if not feasible, fail to cost

  • User Select/ if not feasible, auto-select

  • User Select/do not check feasibility

In aP Select mode, the cost engine establishes the value of machines as a collection all available machines. If the module fails to establish a non-null value for the CSL output machine, the current process routing is deemed infeasible.

In User Select/ if not feasible, fail to cost mode, the machine selection module essentially serves to evaluate the feasibility of the user-selected machine. In this mode, the cost engine establishes the value of machines as a collection containing just the user-selected machine. If the user-selected machine is feasible, the module assigns it the CSL output machine. If the user-selected machine is not feasible, the module leaves the value of machine null. In this case, the current process routing is deemed infeasible.

In User Select/ if not feasible, auto-select mode, the machine selection module potentially serves two purposes: to evaluate the feasibility of the user-selected machine, and (if the module determines that the user-selected machine is infeasible), to select a machine from the list of all available machine. In this mode, the cost engine might evaluate the module twice. The cost engine first assigns to machines a collection containing only the user-selected machine. If the module fails to establish a non-null value for the CSL output machine, the cost engine evaluates the module again, this time assigning to machines a collection containing the full list of available machines. If the module still fails to establish a non-null value for machine, the current process routing is deemed infeasible.

In User Select/do not check feasibility mode, the cost engine does not evaluate the machine selection module.

When you navigate to the CSL modules for a node (see Navigating to the Data for a Given Node), if the node has a machine selection module, the module’s Type Name field is set to machineSelectionRule and the label machineSelectionRule appears next to the folder icon.

Machine selection module names should start with msel and end with .csl.

Context of Evaluation

These types of modules are normally evaluated in the context of a process routing (and possibly a material stock) and a particular routing node, but operation sequences have not yet been chosen, and no process has yet been costed.

For node’s that have a selectMachineAfterOpAssignment node attribute set to a non-null value, machine selection is delayed, and performed just before evaluation of the node’s taxonomy module.

Before performing machine selection for a node, the cost engine checks the node’s ancestors in the current routing to see if any has a machine selection module of its own. If one does, the ancestor machine applies to the current node, and the cost engine does not evaluate the current node’s machine selection module (if it has one).

Example

Below is a portion of the injection molding machine selection module for aPriori ’s plastic molding starting point cost model. The module finds the machine with the lowest overhead rate that satisfies these criteria:

  • Large enough for the part’s required mold.

  • Provides sufficient clamp force for the part and the number of mold cavities.

  • Can provide the required shot size.

The module assigns to the CSL output machine the result of applying the function selectMachine to the mold base dimensions.

Copy
machine = selectMachine(moldBaseXmm,moldBaseYmm)
 
selectMachine(moldBaseXmm,moldBaseYmm) = _
    select first(m) from machines m _
            where _
                ClampForceCheck and _
                tieBarHCheck and _
                tieBarVCheck and _
                moldHeightCheck and _
                shotSizeCheck _
            order by m.workCenterOverheadRate

 

The function selectMachine performs a query that does the following:

  • Selects the machines that satisfy the various checks (mold size, clamp force, and shot size), and

  • Orders the machines by overhead rate (as specified by order by m.workCenterOverheadRate in the order by clause), from lowest to highest.

The final query result is the first of the selected machines in the specified order (as specified by the first(m) in the select specification), since it is the least expensive one.

The query contains the following simple identifiers:

  • machines: CSL standard input

  • m: in effect, bound to each element of machines in turn. This variable remains in scope in the rules referred to by the query. The module uses the following fields of m, which are all machine attributes (found in aPriori ’s Edit Machine Selection dialog):

    • workCenterOverheadRate

    • tieBarDistanceH

    • name

    • tieBarDistanceV

    • maxMoldHeight

    • shotSize

    • clampForce

  • ClampForceCheck: rule (shown below) in the same module that compares the machine clamp force with the required clamp force. Required clamp force is calculated by a formula in the same module, shown below.

  • tieBarHCheck: rule (shown below) in the same module that compares the machine and mold dimensions, shown below.

  • tieBarVCheck: rule (shown below) in the same module that compares the machine and mold dimensions, shown below.

  • moldHeightCheck: rule (shown below) in the same module that compares the machine and mold dimensions, shown below.

  • shotSizeCheck: rule (shown below) in the same module that compares the maximum machine shot size with required shot size. Required shot size is calculated by a formula in the same module, shown below.

Some values are rounded off to less precise values for use in messages.

Copy
Rule tieBarHCheck: m.tieBarDistanceH >= moldBaseXmm
 
Message tieBarHCheck: m.name + _
    ' is not feasible. The mold base horizontal dimension ' + '(' + _
    roundMoldBaseX + _
    'mm ) is greater than the horizontal distance between the tie bars (' + _
    maxTieBarDistanceH + 'mm)'
 
roundMoldBaseX = roundEps(moldBaseXmm, 1)
maxTieBarDistanceH = m.tieBarDistanceH 
 
Rule tieBarVCheck: m.tieBarDistanceV >= moldBaseYmm 
 
Message tieBarVCheck: m.name + _
    ' is not feasible. The mold base vertical dimension ' + '(' + _
    roundMoldBaseY + _
    'mm ) is greater than the vertical distance between the tie bars (' + _
    maxTieBarDistanceV + 'mm)'
 
roundMoldBaseY = roundEps(moldBaseYmm, 1)
maxTieBarDistanceV = m.tieBarDistanceV
 
Rule moldHeightCheck: m.maxMoldHeight >= moldBaseHeight 
 
Message moldHeightCheck: m.name + _
    ' is not feasible. The required mold base height ' + '(' + _
    roundMoldBaseHeight + _
    'mm ) is greater than the maximum mold height for this machine (' + _
    maxMoldHeight + 'mm)'
 
roundMoldBaseHeight = roundEps(moldBaseHeight, 1)
maxMoldHeight = m.maxMoldHeight
moldBaseHeight = 2 * part.boxHeight
 
Rule shotSizeCheck: m.shotSize >= requiredShotSize 
 
Message shotSizeCheck: m.name + _
    ' is not feasible. The required shot size ' +    '(' + _
    roundrequiredShotSize + _
    'g ) is greater than the maximum shot size for this machine (' + _
    maxShotSize + 'g of polystyrene)'
 
roundrequiredShotSize = roundEps(requiredShotSize , 1) 
maxShotSize = m.shotSize  //units are in grams of polystyrene
requiredShotSize = plant.shotSizeSafetyFactor * _
            (part.volume * numCavities * plant.densityPolystyreneForShotSize)/1000000 
 
Rule ClampForceCheck: m.clampForce >= requiredForce
 
Message ClampForceCheck: m.name + _
    ' is not feasible. The required clamp force ' + _
    '(' + roundRequiredForce + _
    'kN ) is greater than the max clamp force of this machine (' + _
    maxClampForce + 'kN)'
 
roundRequiredForce = roundEps(requiredForce, 1)
maxClampForce = m.clampForce
 
requiredForce = _
    ((part.projectedArea * numCavities) + runnerArea) * _
            material.clampingMNPerSqM * plant.clampForceSafetyFactor / 1000
 
runnerArea = numCavities * (partLength + partWidth) * nominalWallThickness

 

Portions of the module not shown above retrieve or calculate the following:

  • moldBaseXmm, moldBaseYmm: horizontal and vertical mold base dimensions.

  • numCavities: number of mold cavities (user-specified or based on required number to satisfy production requirements)

  • nominalWallThickness: Number to summarize part wall thicknesses for cool time and clamp force calculations.