data costpw; input plant warehouse cost; datalines; 1 1 4 1 2 3 1 3 2 1 4 2.5 2 1 3 2 2 3.5 2 3 4 2 4 2.1 ; data costwc; input warehouse customer cost; datalines; 1 1 2.1 1 2 2.3 1 3 3 1 4 3.4 1 5 3.1 2 1 4.2 2 2 3.15 2 3 2.7 2 4 2.9 2 5 3.41 3 1 2.17 3 2 3.15 3 3 2.3 3 4 3 3 5 3.4 4 1 3.1 4 2 4.2 4 3 3.15 4 4 2.91 4 5 3.3 ; data demand; input customer demand; datalines; 1 100 2 120 3 140 4 112 5 87 ; data wcapacity; input warehouse capacity; datalines; 1 230 2 110 3 300 4 150 ; data pcapacity; input warehouse capacity; datalines; 1 380 2 420 ; data costpc; input plant customer cost; datalines; 1 1 400 1 2 300 1 3 200 1 4 250 1 5 100 2 1 300 2 2 350 2 3 400 2 4 210 2 5 150 3 1 220 3 2 140 3 3 230 3 4 180 3 5 320 4 1 220 4 2 190 4 3 250 4 4 100 4 5 230 5 1 160 5 2 150 5 3 230 5 4 310 5 5 250 ; data modified; length _type_ $ 8 _row_ $ 8 _col_ $ 8; keep _type_ _row_ _col_ _coef_; ncust=5; nplant=2; nwarehouse=4; do i=1 to nplant; _type_='GE'; _row_='Res_P'||put(i,1.); _col_='_RHS_'; _coef_=0; output; _type_=' '; do k=1 to nwarehouse; _col_='Y'||put(i,1.)||put(k,1.); _coef_=1.0; output; end; do h=1 to ncust; set demand; _col_='Z'||put(i,1.)||put(h,1.); _coef_=1.0; output; _col_='S'||put(i,1.)||put(h,1.); _coef_=-demand; output; end; end;