ࡱ> = 35, 35, 35; ! Hours per 1000 feet for each machine; TIME = .11111 .16667 .22222; ! Amount needed of each product; NEED = 218 114 111; ! Profit by product and machine; PROFIT = 15.89, 17.89, 0, 0, 16.5, 17.5, 0, 15.22, 16.22; ! Which products can be made on which machine; POSSIBLE = 1, 1, 0, 0, 1, 1, 0, 1, 1; ! Shipping capacity per day; SHPERDAY = 600; ENDDATA !--------------------------------------------------; !Objective function; MAX = @SUM(METHOD(I,J): VOLUME(I,J) * PROFIT(I,J)); @SUM(METHOD( K, L): VOLUME( K, L)) <= SHPERDAY; !This is the max amount that can be made each day; @FOR( MACHINE( N): ! Maximum time each machine can be used/week.; @SUM(THICKNESS( M): POSSIBLE(N,M) * VOLUME(N,M) * TIME(N))<=HPERWK(N);); @FOR(THICKNESS( Q) : !Must meet demand for each thickness; @SUM(MACHINE(P):POSSIBLE(P,Q)*VOLUME(P,Q))>=NEED(Q)); ENDMODEL: SETS: MACHINE / B3, B4, B5 / : HPERWK, TIME; !This is the coefficient for the time per day constraint; THICKNESS / FOURTH, EIGHT, HALF / : NEED; !This is the amount of each thickness needed to be produced; METHOD ( MACHINE, THICKNESS ) : VOLUME, PROFIT, POSSIBLE; !VOLUME is the variable, PROFIT the objective coefficients, and POSSIBLE is a Boolean representing whether it is possible to produce the given thickness; ENDSETS DATA: ! Hours/week available on each machine; HPERWK Root EntryCONTENTS Root Entry*0_^PHyf Contents   !"--;\cf2 \par \cf3 !Objective function;\cf2 \par \cf1 MAX\cf2 = \cf1 @SUM\cf2 (METHOD(I,J): VOLUME(I,J) * PROFIT(I,J)); \par \cf1 @SUM\cf2 (METHOD( K, L): VOLUME( K, L)) <= SHPERDAY; \par \cf3 !This is the max amount that can be made each day;\cf2 \par \cf1 @FOR\cf2 ( MACHINE( N): \par \cf3 ! Maximum time each machine can be used/week.;\cf2 \par \cf1 @SUM\cf2 (THICKNESS( M): \par POSSIBLE(N,M) * VOLUME(N,M) * TIME(N))<=HPERWK(N);); \par \cf1 @FOR\cf2 (THICKNESS( Q) : \par \cf3 !Must meet demand for each thickness;\cf2 \par \cf1 @SUM\cf2 (MACHINE(P):POSSIBLE(P,Q)*VOLUME(P,Q))>=NEED(Q)); \par \cf1 END\cf2 \par } {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Courier New;}} {\colortbl ;\red0\green0\blue255;\red0\green0\blue0;\red0\green175\blue0;} \viewkind4\uc1\pard\cf1\f0\fs20 MODEL\cf2 : \par \cf1 SETS\cf2 : \par MACHINE / B3, B4, B5 / : HPERWK, TIME; \par \cf3 !This is the coefficient for the time per day constraint;\cf2 \par THICKNESS / FOURTH, EIGHT, HALF / : NEED; \par \cf3 !This is the amount of each thickness needed to be produced;\cf2 \par METHOD ( MACHINE, THICKNESS ) : VOLUME, PROFIT, POSSIBLE; \par \cf3 !VOLUME is the variable, PROFIT the objective coefficients, and POSSIBLE is a Boolean representing whether it is possible to produce the given thickness;\cf2 \par \cf1 ENDSETS\cf2 \par \cf1 DATA\cf2 : \par \cf3 ! Hours/week available on each machine;\cf2 \par HPERWK = 35, 35, 35; \par \cf3 ! Hours per 1000 feet for each machine;\cf2 \par TIME = .11111 .16667 .22222; \par \cf3 ! Amount needed of each product;\cf2 \par NEED = 218 114 111; \par \cf3 ! Profit by product and machine;\cf2 \par PROFIT = 15.89, 17.89, 0, \par 0, 16.5, 17.5, \par 0, 15.22, 16.22; \par \cf3 ! Which products can be made on which machine;\cf2 \par POSSIBLE = 1, 1, 0, \par 0, 1, 1, \par 0, 1, 1; \par \cf3 ! Shipping capacity per day;\cf2 \par SHPERDAY = 600; \par \cf1 ENDDATA\cf2 \par \cf3 !------------------------------------------------