I am using a procedure to select the work center in a super routing. However the selection of the work center is not working correctly because the system is selecting always the same machine and the result is an overcapacity.
The procedure that I had implemented is:
Let say we have only two machine and we want two select the first machine that full fit (cover) the requirements.
Machine1: MARTIN 718
Machine2: MARTIN 924
*/ SELECCION DE MAQUINA MARTIN 718
$SELF.WORKCENTER = 'MARTI718' IF ( NUMERO_DE_COLORES > 0 AND NUMERO_DE_COLORES <= 4 ) AND
( WJ2 <= 1800 AND WJ2 >= 360 AND WA <= 635 AND WA >= 190 AND ESTILODECOMPONENTE <> 'T' ) OR ( WJ2 <= 1800 AND ESTILODECOMPONENTE = 'T' )
*/ SELECCION DE MAQUINA MARTIN 924
$SELF.WORKCENTER = 'MARTI924' IF ( NUMERO_DE_COLORES > 0 AND NUMERO_DE_COLORES <= 2 ) AND ( WJ2 <= 2400 AND WJ2 >= 720 AND WA <= 1150 AND WA >= 255 AND ESTILODECOMPONENTE <> 'T' ) OR ( WJ2 <= 2400 AND ESTILODECOMPONENTE = 'T' ).
As you can see there are some limits that are overlapping between the machine. The idea is to stop de procedure when one of the machine full fit one of the requirements.
Does any one knows how to do this.