Resources

All Examples From INPOINT (For Consecutive Runs)

 /***************************************************************/
 /*          S A S   S A M P L E   L I B R A R Y                */
 /*                                                             */
 /*    NAME: INTPOINT                                           */
 /*   TITLE: All Examples From INPOINT (For Consecutive Runs)   */
 /* PRODUCT: OR                                                 */
 /*  SYSTEM: ALL                                                */
 /*    KEYS: OR                                                 */
 /*   PROCS: INTPOINT                                           */
 /*    DATA:                                                    */
 /*                                                             */
 /* SUPPORT:                             UPDATE:                */
 /*     REF:                                                    */
 /*    MISC: Contains the code for all INTPOINT examples using  */
 /*          data sets created consecutively, as opposed to     */
 /*          being defined in each run.  This is how the        */
 /*          examples in the chapter are presented.             */
 /***************************************************************/

 /***************************************************************/
 /*                                                             */
 /*    Test: INT0A --                                           */
 /*          Getting Started: NPSC Problems                     */
 /*    Info: 'Getting Started: NPSC Problems' example from      */
 /*          Introduction to INTPOINT chapter                   */
 /*                                                             */
 /***************************************************************/

title  'Oil Industry Example';

title3 'Setting Up Nodedata = Noded For Proc Intpoint';
data noded;
   input   _node_&$15. _sd_;
   datalines;
middle east       100
u.s.a.             80
servstn1 gas      -95
servstn1 diesel   -30
servstn2 gas      -40
servstn2 diesel   -15
;


title3 'Setting Up Arcdata = Arcd1 For Proc Intpoint';
data arcd1;
   input _from_&$11. _to_&$15. _cost_ _capac_ _lo_ _name_ $;
   datalines;
middle east    refinery 1        63     95   20    m_e_ref1
middle east    refinery 2        81     80   10    m_e_ref2
u.s.a.         refinery 1        55      .    .    .
u.s.a.         refinery 2        49      .    .    .
refinery 1     r1               200    175   50    thruput1
refinery 2     r2               220    100   35    thruput2
r1             ref1 gas           .    140    .    r1_gas
r1             ref1 diesel        .     75    .    .
r2             ref2 gas           .    100    .    r2_gas
r2             ref2 diesel        .     75    .    .
ref1 gas       servstn1 gas      15     70    .    .
ref1 gas       servstn2 gas      22     60    .    .
ref1 diesel    servstn1 diesel   18      .    .    .
ref1 diesel    servstn2 diesel   17      .    .    .
ref2 gas       servstn1 gas      17     35    5    .
ref2 gas       servstn2 gas      31      .    .    .
ref2 diesel    servstn1 diesel   36      .    .    .
ref2 diesel    servstn2 diesel   23      .    .    .
;


title3 'Setting Up Condata = Cond1 For Proc Intpoint';
data cond1;
   input m_e_ref1 m_e_ref2 thruput1 r1_gas thruput2 r2_gas
         _type_ $ _rhs_;
   datalines;
-2  .  1 .  . . >= -15
 . -2  . .  1 . GE -15
 .  . -3 4  . . EQ   0
 .  .  . . -3 4  =   0
;

title3 'Optimization Proc Intpoint';
proc intpoint
   bytes=1000000
   nodedata=noded        /* the supply and demand data */
   arcdata=arcd1         /* the arc descriptions       */
   condata=cond1         /* the side constraints       */
   conout=solution;      /* the solution data set      */
run;

title3 'Optimum';
proc print data=solution;
   var _from_ _to_ _cost_ _capac_ _lo_ _name_
       _supply_ _demand_ _flow_ _fcost_;
   sum _fcost_;
run;


 /***************************************************************/
 /*                                                             */
 /*    Test: INT0B --                                           */
 /*          Getting Started: LP Problems                       */
 /*    Info: 'Getting Started: LP Problems' example from        */
 /*          Introduction to INTPOINT chapter                   */
 /*                                                             */
 /***************************************************************/

title  'Linear Programming Example';

title3 'Setting Up Condata = dcon1 For Proc Intpoint';
data dcon1;
   input _id_ $14.
         a_light a_heavy brega naphthal naphthai
         heatingo jet_1 jet_2
         _type_ $ _rhs_;
   datalines;
profit         -175 -165 -205  0  0  0 300 300 max     .
naphtha_l_conv .035 .030 .045 -1  0  0   0   0  eq     0
naphtha_i_conv .100 .075 .135  0 -1  0   0   0  eq     0
heating_o_conv .390 .300 .430  0  0 -1   0   0  eq     0
recipe_1          0    0    0  0 .3 .7  -1   0  eq     0
recipe_2          0    0    0 .2  0 .8   0  -1  eq     0
available       110  165   80  .  .  .   .   . upperbd .
;

title3 'Optimization Proc Intpoint';
proc intpoint
   bytes=1000000
   condata=dcon1
   conout=solutn1;
run;

title3 'LP Optimum';
proc print data=solutn1;
   var _name_ _objfn_ _upperbd _lowerbd _value_ _fcost_;
   sum _fcost_;
run;

title3 'Setting Up Condata = scon2 For Proc Intpoint';
data scon2;
   input _type_ $ @10 _col_ $13. @24 _row_ $16. _coef_;
   datalines;
max      .             profit                    .
eq       .             napha_l_conv              .
eq       .             napha_i_conv              .
eq       .             heating_oil_conv          .
eq       .             recipe_1                  .
eq       .             recipe_2                  .
upperbd  .             available                 .
.        a_light       profit                 -175
.        a_light       napha_l_conv           .035
.        a_light       napha_i_conv           .100
.        a_light       heating_oil_conv       .390
.        a_light       available               110
.        a_heavy       profit                 -165
.        a_heavy       napha_l_conv           .030
.        a_heavy       napha_i_conv           .075
.        a_heavy       heating_oil_conv       .300
.        a_heavy       available               165
.        brega         profit                 -205
.        brega         napha_l_conv           .045
.        brega         napha_i_conv           .135
.        brega         heating_oil_conv       .430
.        brega         available                80
.        naphthal      napha_l_conv             -1
.        naphthal      recipe_2                 .2
.        naphthai      napha_i_conv             -1
.        naphthai      recipe_1                 .3
.        heatingo      heating_oil_conv         -1
.        heatingo      recipe_1                 .7
.        heatingo      recipe_2                 .8
.        jet_1         profit                  300
.        jet_1         recipe_1                 -1
.        jet_2         profit                  300
.        jet_2         recipe_2                 -1
;

title3 'Optimization Proc Intpoint';
proc intpoint
   bytes=1000000
   sparsecondata
   condata=scon2
   conout=solutn2;
run;

title3 'LP Optimum';
proc print data=solutn2;
   var _name_ _objfn_ _upperbd _lowerbd _value_ _fcost_;
   sum _fcost_;
run;


title3 'Alternate Formulations for the LP Problem';
data vars3;
   input _name_ $ profit available;
   datalines;
a_heavy  -165 165
a_light  -175 110
brega    -205  80
heatingo    0   .
jet_1     300   .
jet_2     300   .
naphthai    0   .
naphthal    0   .
;

data dcon3;
   input _id_ $14.
         a_light a_heavy brega naphthal naphthai
         heatingo jet_1 jet_2
         _type_ $ _rhs_;
   datalines;
naphtha_l_conv .035 .030 .045 -1  0  0   0   0  eq     0
naphtha_i_conv .100 .075 .135  0 -1  0   0   0  eq     0
heating_o_conv .390 .300 .430  0  0 -1   0   0  eq     0
recipe_1          0    0    0  0 .3 .7  -1   0  eq     0
recipe_2          0    0    0 .2  0 .8   0  -1  eq     0
;

proc intpoint
   maximize             /* ***** necessary ***** */
   bytes=1000000
   arcdata=vars3
   condata=dcon3
   conout=solutn3;
objfn profit;
upperbd available;
run;

title3 'LP Optimum';
proc print data=solutn3;
   var _name_ profit available _lowerbd _value_ _fcost_;
   sum _fcost_;
run;


data vars4;
   input _name_ $ profit available;
   datalines;
a_heavy  -165 165
a_light  -175 110
brega    -205  80
jet_1     300   .
jet_2     300   .
;

data dcon4;
   input _id_ $14.
         a_light a_heavy brega naphthal naphthai
         heatingo jet_1 jet_2;
   datalines;
naphtha_l_conv .035 .030 .045 -1  0  0   0   0
naphtha_i_conv .100 .075 .135  0 -1  0   0   0
heating_o_conv .390 .300 .430  0  0 -1   0   0
recipe_1          0    0    0  0 .3 .7  -1   0
recipe_2          0    0    0 .2  0 .8   0  -1
;

proc intpoint
   bytes=100000
   maximize defcontype=eq
   arcdata=vars3
   condata=dcon4
   conout=solutn4;
objfn profit;
upperbd available;
run;

title3 'LP Optimum';
proc print data=solutn4;
   var _name_ profit available _lowerbd _value_ _fcost_;
   sum _fcost_;
run;


data scon5;
   input _type_ $ @10 _col_ $13. @24 _row_ $16. _coef_;
   datalines;
eq       .             napha_l_conv              .
eq       .             napha_i_conv              .
eq       .             heating_oil_conv          .
eq       .             recipe_1                  .
eq       .             recipe_2                  .
.        a_light       napha_l_conv           .035
.        a_light       napha_i_conv           .100
.        a_light       heating_oil_conv       .390
.        a_heavy       napha_l_conv           .030
.        a_heavy       napha_i_conv           .075
.        a_heavy       heating_oil_conv       .300
.        brega         napha_l_conv           .045
.        brega         napha_i_conv           .135
.        brega         heating_oil_conv       .430
.        naphthal      napha_l_conv             -1
.        naphthal      recipe_2                 .2
.        naphthai      napha_i_conv             -1
.        naphthai      recipe_1                 .3
.        heatingo      heating_oil_conv         -1
.        heatingo      recipe_1                 .7
.        heatingo      recipe_2                 .8
.        jet_1         recipe_1                 -1
.        jet_2         recipe_2                 -1
;

proc intpoint
   bytes=1000000
   maximize
   sparsecondata
   arcdata=vars3        /* or arcdata=vars4 */
   condata=scon5
   conout=solutn5;
objfn profit;
upperbd available;
run;

title3 'LP Optimum';
proc print data=solutn5;
   var _name_ profit available _lowerbd _value_ _fcost_;
   sum _fcost_;
run;


data scon6;
   input _col_ $ _row_&$16. _coef_;
   datalines;
a_light  napha_l_conv           .035
a_light  napha_i_conv           .100
a_light  heating_oil_conv       .390
a_heavy  napha_l_conv           .030
a_heavy  napha_i_conv           .075
a_heavy  heating_oil_conv       .300
brega    napha_l_conv           .045
brega    napha_i_conv           .135
brega    heating_oil_conv       .430
naphthal napha_l_conv             -1
naphthal recipe_2                 .2
naphthai napha_i_conv             -1
naphthai recipe_1                 .3
heatingo heating_oil_conv         -1
heatingo recipe_1                 .7
heatingo recipe_2                 .8
jet_1    recipe_1                 -1
jet_2    recipe_2                 -1
;

proc intpoint
   bytes=100000
   maximize
   defcontype=eq
   sparsecondata
   arcdata=vars4        /* or arcdata=vars3 */
   condata=scon6
   conout=solutn6;
objfn profit;
upperbd available;
run;

title3 'LP Optimum';
proc print data=solutn6;
   var _name_ profit available _lowerbd _value_ _fcost_;
   sum _fcost_;
run;


 /****************************************************************/
 /*                                                              */
 /*    Test: INT0C --                                            */
 /*          Missing S Supply and Missing D Demand Values        */
 /*    Info: 'Missing S Supply and Missing D Demand Values'      */
 /*          example from Details section of INTPOINT chapter    */
 /*                                                              */
 /****************************************************************/

title  'Oil Industry Example';
title3 'Crude Oil can come from anywhere';

/*  Uses ARCD1 and COND1 from INT0A. */

data miss_s;
   missing S;
   input   _node_&$15. _sd_;
   datalines;
middle east         S
u.s.a.              S
servstn1 gas      -95
servstn1 diesel   -30
servstn2 gas      -40
servstn2 diesel   -15
;

proc intpoint
   bytes=100000
   nodedata=miss_s       /* the supply (missing S) and */
                         /* demand data                */
   arcdata=arcd1         /* the arc descriptions       */
   condata=cond1         /* the side constraints       */
   conout=solution;      /* the solution data set      */
run;

proc print;
   var _from_ _to_ _cost_ _capac_ _lo_ _flow_ _fcost_;
   sum _fcost_;
run;


data miss_s_x;
   missing S;
   input   _node_&$15. _sd_;
   datalines;
middle east         1
u.s.a.              1
servstn1 gas      -95
servstn1 diesel   -30
servstn2 gas      -40
servstn2 diesel   -15
;

proc intpoint
   bytes=100000
   thrunet
   nodedata=miss_s_x     /* No supply (missing S)      */
   arcdata=arcd1         /* the arc descriptions       */
   condata=cond1         /* the side constraints       */
   conout=solution;      /* the solution data set      */
run;

proc print;
   var _from_ _to_ _cost_ _capac_ _lo_ _flow_ _fcost_;
   sum _fcost_;
run;

 /****************************************************************/
 /*                                                              */
 /*    Test: INT1 --                                             */
 /*          Production, Inventory, Distribution Problem         */
 /*    Info: Example 1 from INTPOINT chapter                     */
 /*                                                              */
 /****************************************************************/

title 'Production Planning/Inventory/Distribution';
title2 'Minimum Cost Flow problem';

data node0;
   input _node_ $ _supdem_ ;
   datalines;
fact1_1   1000
fact2_1    850
fact1_2   1000
fact2_2   1500
shop1_1   -900
shop2_1   -900
shop1_2   -900
shop2_2  -1450
;

data arc0;
   input _tail_ $ _head_ $ _cost_ _capac_ _lo_ diagonal factory
         key_id $10. mth_made $ _name_&$17. ;
   datalines;
fact1_1  f1_mar_1  127.9  500 50 19 1 production March prod f1 19 mar
fact1_1  f1_apr_1   78.6  600 50 19 1 production April prod f1 19 apl
fact1_1  f1_may_1   95.1  400 50 19 1 production May   .
f1_mar_1 f1_apr_1   15     50  . 19 1 storage    March .
f1_apr_1 f1_may_1   12     50  . 19 1 storage    April .
f1_apr_1 f1_mar_1   28     20  . 19 1 backorder  April back f1 19 apl
f1_may_1 f1_apr_1   28     20  . 19 1 backorder  May   back f1 19 may
f1_mar_1 f2_mar_1   11      .  . 19 . f1_to_2    March .
f1_apr_1 f2_apr_1   11      .  . 19 . f1_to_2    April .
f1_may_1 f2_may_1   16      .  . 19 . f1_to_2    May   .
f1_mar_1 shop1_1  -327.65 250  . 19 1 sales      March .
f1_apr_1 shop1_1  -300    250  . 19 1 sales      April .
f1_may_1 shop1_1  -285    250  . 19 1 sales      May   .
f1_mar_1 shop2_1  -362.74 250  . 19 1 sales      March .
f1_apr_1 shop2_1  -300    250  . 19 1 sales      April .
f1_may_1 shop2_1  -245    250  . 19 1 sales      May   .
fact2_1  f2_mar_1   88.0  450 35 19 2 production March prod f2 19 mar
fact2_1  f2_apr_1   62.4  480 35 19 2 production April prod f2 19 apl
fact2_1  f2_may_1  133.8  250 35 19 2 production May   .
f2_mar_1 f2_apr_1   18     30  . 19 2 storage    March .
f2_apr_1 f2_may_1   20     30  . 19 2 storage    April .
f2_apr_1 f2_mar_1   17     15  . 19 2 backorder  April back f2 19 apl
f2_may_1 f2_apr_1   25     15  . 19 2 backorder  May   back f2 19 may
f2_mar_1 f1_mar_1   10     40  . 19 . f2_to_1    March .
f2_apr_1 f1_apr_1   11     40  . 19 . f2_to_1    April .
f2_may_1 f1_may_1   13     40  . 19 . f2_to_1    May   .
f2_mar_1 shop1_1  -297.4  250  . 19 2 sales      March .
f2_apr_1 shop1_1  -290    250  . 19 2 sales      April .
f2_may_1 shop1_1  -292    250  . 19 2 sales      May   .
f2_mar_1 shop2_1  -272.7  250  . 19 2 sales      March .
f2_apr_1 shop2_1  -312    250  . 19 2 sales      April .
f2_may_1 shop2_1  -299    250  . 19 2 sales      May   .
fact1_2  f1_mar_2  217.9  400 40 25 1 production March prod f1 25 mar
fact1_2  f1_apr_2  174.5  550 50 25 1 production April prod f1 25 apl
fact1_2  f1_may_2  133.3  350 40 25 1 production May   .
f1_mar_2 f1_apr_2   20     40  . 25 1 storage    March .
f1_apr_2 f1_may_2   18     40  . 25 1 storage    April .
f1_apr_2 f1_mar_2   32     30  . 25 1 backorder  April back f1 25 apl
f1_may_2 f1_apr_2   41     15  . 25 1 backorder  May   back f1 25 may
f1_mar_2 f2_mar_2   23      .  . 25 . f1_to_2    March .
f1_apr_2 f2_apr_2   23      .  . 25 . f1_to_2    April .
f1_may_2 f2_may_2   26      .  . 25 . f1_to_2    May   .
f1_mar_2 shop1_2  -559.76   .  . 25 1 sales      March .
f1_apr_2 shop1_2  -524.28   .  . 25 1 sales      April .
f1_may_2 shop1_2  -475.02   .  . 25 1 sales      May   .
f1_mar_2 shop2_2  -623.89   .  . 25 1 sales      March .
f1_apr_2 shop2_2  -549.68   .  . 25 1 sales      April .
f1_may_2 shop2_2  -460.00   .  . 25 1 sales      May   .
fact2_2  f2_mar_2  182.0  650 35 25 2 production March prod f2 25 mar
fact2_2  f2_apr_2  196.7  680 35 25 2 production April prod f2 25 apl
fact2_2  f2_may_2  201.4  550 35 25 2 production May   .
f2_mar_2 f2_apr_2   28     50  . 25 2 storage    March .
f2_apr_2 f2_may_2   38     50  . 25 2 storage    April .
f2_apr_2 f2_mar_2   31     15  . 25 2 backorder  April back f2 25 apl
f2_may_2 f2_apr_2   54     15  . 25 2 backorder  May   back f2 25 may
f2_mar_2 f1_mar_2   20     25  . 25 . f2_to_1    March .
f2_apr_2 f1_apr_2   21     25  . 25 . f2_to_1    April .
f2_may_2 f1_may_2   43     25  . 25 . f2_to_1    May   .
f2_mar_2 shop1_2  -567.83 500  . 25 2 sales      March .
f2_apr_2 shop1_2  -542.19 500  . 25 2 sales      April .
f2_may_2 shop1_2  -461.56 500  . 25 2 sales      May   .
f2_mar_2 shop2_2  -542.83 500  . 25 2 sales      March .
f2_apr_2 shop2_2  -559.19 500  . 25 2 sales      April .
f2_may_2 shop2_2  -489.06 500  . 25 2 sales      May   .
;

proc intpoint
   bytes=1000000
   printlevel2=2
   nodedata=node0
   arcdata=arc0
   conout=arc1;
run;

proc print data=arc1;
   var _tail_ _head_ _cost_ _capac_ _lo_ _flow_ _fcost_
       diagonal factory key_id mth_made;
   sum _fcost_;
run;


 /****************************************************************/
 /*                                                              */
 /*    Test: INT2 --                                             */
 /*          Altering Arc Data                                   */
 /*    Info: Example 2 from INTPOINT chapter                     */
 /*                                                              */
 /****************************************************************/

title 'Production Planning/Inventory/Distribution';
title2 'Minimum Cost Flow problem- Altered arc data';

/*  Uses NODE0 (defined in INT1) and ARC1 (created in INT1). */

data arc2;
   set arc1;
      oldcost=_cost_;
      oldfc=_fcost_;
      oldflow=_flow_;
      if key_id='backorder'
         then _cost_=_cost_*1.2;
         else if _tail_='f2_may_2' then _cost_=_cost_-30;
      if key_id='production' & mth_made='May' then
         if diagonal=19 then _cost_=_cost_-5;
                        else _cost_=_cost_-20;

proc intpoint
   bytes=100000
   printlevel2=2
   nodedata=node0
   arcdata=arc2
   conout=arc3;
run;

proc print data=arc3;
   var _tail_ _head_ _capac_ _lo_ _supply_ _demand_ _name_
       _cost_ _flow_ _fcost_ oldcost oldflow oldfc
       diagonal factory key_id mth_made;
       /* to get this variable order */
           sum oldfc _fcost_;
run;


 /****************************************************************/
 /*                                                              */
 /*    Test: INT3 --                                             */
 /*          Adding Side Constraints                             */
 /*    MISC: Example 3 from INTPOINT chapter                     */
 /*                                                              */
 /****************************************************************/

title 'Production Planning/Inventory/Distribution';
title2 'Adding Side Constraints';

/*  Uses NODE0 (defined in INT1) and ARC3 (created in INT2). */

data con3;
   input _column_ &$14. _row_ &$15. _coef_ ;
   datalines;
prod f1 19 mar  FACT1 MAR GIZMO  3
prod f1 25 mar  FACT1 MAR GIZMO  4
CHIP/BO LIMIT   FACT1 MAR GIZMO  2600
prod f2 19 mar  FACT2 MAR GIZMO  3
prod f2 25 mar  FACT2 MAR GIZMO  4
CHIP/BO LIMIT   FACT2 MAR GIZMO  3750
prod f1 19 apl  FACT1 APL GIZMO  3
prod f1 25 apl  FACT1 APL GIZMO  4
CHIP/BO LIMIT   FACT1 APL GIZMO  2600
prod f2 19 apl  FACT2 APL GIZMO  3
prod f2 25 apl  FACT2 APL GIZMO  4
CHIP/BO LIMIT   FACT2 APL GIZMO  3750
back f1 19 apl  TOTAL BACKORDER  1
back f1 25 apl  TOTAL BACKORDER  1
back f2 19 apl  TOTAL BACKORDER  1
back f2 25 apl  TOTAL BACKORDER  1
back f1 19 may  TOTAL BACKORDER  1
back f1 25 may  TOTAL BACKORDER  1
back f2 19 may  TOTAL BACKORDER  1
back f2 25 may  TOTAL BACKORDER  1
CHIP/BO LIMIT   TOTAL BACKORDER  50
;

proc intpoint
   bytes=1000000
   printlevel2=2
   nodedata=node0 arcdata=arc3
   condata=con3 sparsecondata rhsobs='CHIP/BO LIMIT'
   conout=arc4;
   id diagonal factory key_id mth_made;
run;

proc print data=arc4;
   var _tail_ _head_ _cost_ _capac_ _lo_
       _flow_ _fcost_;
       /* to get this variable order */
   sum _fcost_;
run;


 /****************************************************************/
 /*                                                              */
 /*    Test: INT4 --                                             */
 /*          Using Constraints/More Alteration to Arc Data       */
 /*    Info: Example 4 from INTPOINT chapter                     */
 /*                                                              */
 /****************************************************************/

title 'Production Planning/Inventory/Distribution';
title2 'Using Constraints and Altering arc data';

/*  Uses NODE0 (defined in INT1), CON3 (defined in INT3),
    and ARC4 (created in INT3). */

data new_arc4;
   set arc4;
      oldcost=_cost_;
      oldflow=_flow_;
      oldfc=_fcost_;
      if _tail_='f1_may_2'
         & (_head_='shop1_2' | _head_='shop2_2')
         then _cost_=_cost_-40;

proc intpoint
   bytes=1000000
   printlevel2=2
   arcdata=new_arc4 nodedata=node0
   condata=con3 sparsecondata rhsobs='CHIP/BO LIMIT'
   conout=arc5;
run;

proc print data=arc5;
   var _tail_ _head_ _cost_ _capac_ _lo_
       _supply_ _demand_ _name_ _flow_ _fcost_ oldflow oldfc;
          /* to get this variable order */
   sum oldfc _fcost_;
run;


 /****************************************************************/
 /*                                                              */
 /* Example: INT5 --                                             */
 /*          Nonarc Variables in the Side Constraints            */
 /*    Info: Example 5 from INTPOINT chapter                     */
 /*                                                              */
 /****************************************************************/

title 'Production Planning/Inventory/Distribution';
title2 'Nonarc Variables in the Side Constraints';

/*  Uses NODE0 (defined in INT1) and ARC5 (created in INT4). */

data con6;
   input _column_ &$17. _row_ &$15. _coef_ ;
   datalines;
prod f1 19 mar     FACT1 MAR GIZMO  3
prod f1 25 mar     FACT1 MAR GIZMO  4
f1 unused chips    FACT1 MAR GIZMO  1
_RHS_              FACT1 MAR GIZMO  2615
prod f2 19 mar     FACT2 MAR GIZMO  3
prod f2 25 mar     FACT2 MAR GIZMO  4
f2 unused chips    FACT2 MAR GIZMO  1
_RHS_              FACT2 MAR GIZMO  3750
prod f1 19 apl     FACT1 APL GIZMO  3
prod f1 25 apl     FACT1 APL GIZMO  4
f1 chips from mar  FACT1 APL GIZMO  -1
_RHS_              FACT1 APL GIZMO  2600
prod f2 19 apl     FACT2 APL GIZMO  3
prod f2 25 apl     FACT2 APL GIZMO  4
f2 chips from mar  FACT2 APL GIZMO  -1
_RHS_              FACT2 APL GIZMO  3750
f1 unused chips    CHIP LEFTOVER    1
f2 unused chips    CHIP LEFTOVER    1
f1 chips from mar  CHIP LEFTOVER    -1
f2 chips from mar  CHIP LEFTOVER    -1
_TYPE_             CHIP LEFTOVER    1
back f1 19 apl     TOTAL BACKORDER  1
back f1 25 apl     TOTAL BACKORDER  1
back f2 19 apl     TOTAL BACKORDER  1
back f2 25 apl     TOTAL BACKORDER  1
back f1 19 may     TOTAL BACKORDER  1
back f1 25 may     TOTAL BACKORDER  1
back f2 19 may     TOTAL BACKORDER  1
back f2 25 may     TOTAL BACKORDER  1
_TYPE_             TOTAL BACKORDER  -1
_RHS_              TOTAL BACKORDER  50
;

data arc6;
   set arc5;
   drop oldcost oldfc oldflow _flow_ _fcost_;

data arc6_b;
   input _name_ &$17. _cost_ _capac_ factory key_id$10. ;
   datalines;
f1 unused chips    .   . 1 chips
f2 unused chips    .   . 2 chips
f1 chips from mar  1 150 1 chips
f2 chips from mar  1 150 2 chips
;

proc append force base=arc6 data=arc6_b;

proc intpoint
   bytes=1000000
   printlevel2=2
   nodedata=node0 arcdata=arc6
   condata=con6 defcontype=eq sparsecondata
   conout=arc7;
run;

proc print data=arc7;
   var _tail_ _head_ _name_ _cost_ _capac_ _lo_
       _flow_ _fcost_;
   sum _fcost_;
run;