Download as pdf
Download as pdf
You are on page 1of 13
REPRINTED FROM: EUROPEAN JOURNAL OF OPERATIONAL RESEARCH European Journal of Operational Research 72 (1984) 300-311 North-Holland Syntax-directed report writing in linear programming using ANALYZE * Harvey J. Greenberg Mathematics Department, University of Colorado at Denver, PO Box 173364, Denver, CO 80217-3364, USA Reosived January 1992; revised November 1992 NORTH-HOLLAND: AMSTERDAM-LONDON-NEW YORK-TOKYO x00 European Journal of Operational Research 72 (1984) 300-311 ‘North-Holland Syntax-directed report writing in linear programming using ANALYZE * Harvey J. Greenberg ‘Mathematics Department, University of Colorado at Denver, PO Box 173364, Denver, CO 80217-3364, USA Received January 1992; revised November 1992 Abstract: The syntax of a linear program is its rules for composing activities and equations. Since the arly years, syntax has been key to generating instances of linear programming models and reporting results. There are times, however, when we want to see information interactively, other than a prepared set of table shells. The syntax can be used to do this with ANALYZE, a computer-assisted analysis system for linear programming. The multi-view architecture has been extended to use syntax-directed | rules for creating tables interactively and for some graphics not found in standard languages for reporting results of (general) linear programs, Keywords: Linear programming; Report writing; Large-scale systems; Modeling; Computer-assisted analysis 1, Introduction ‘After solving an instance of a linear program- ming model, the results are organized by a report writer that presents information in tables (some systems are beginning to provide graphics). There are also times when it is desirable to analyze the results interactively, The ANALYZE system [6,7,10] enables easy navigation through the linear program, retrieving information by explicit query or by executing procedures that obtain a portion of the linear program that is relevant to a particu- lar analysis question. Once the information is obtained, it can be viewed in a variety of ways, giving cognitive flexibility for insights into the Comespondence to: Prof. HA. Greenberg, Mathematics De partment, University of Colorado at Denver, PO Box 173364, Denver, CO 80217-3364, USA. © This research was supported bya consortium of industries: ‘Amoco Oil Company, Shell Development Company, IBM, ‘Chesapeake Decision Sciences, GAMS Development Corp. Ketron Management Science, MathPro, In, and Maximal Software (0377.2217/94/S07.00 © 1994 SSDI 0377-2211(93)E0117-G meaning of the results (see [15] for a detailed discussion of the multi-view architecture) ‘Some historical perspective is helpful to un- derstand the significance of a syntax-drive report writer, which can be used interactively. First, special languages for modeling linear programs began in the late 1950's with special matrix gener- ators, Report writing became integrated with the first full system, MAGEN, in 1963. Shortly there~ after GAMMA (1966) and then DATAFORM (1970) entered the scene, so by the early 1970's there were three primary systems (plus some oth- ‘ers that appeared and disappeared). Although these systems have undergone internal improve ments (MAGEN evolved into OMNI and GAMMA into GAMMA/2000), the languages look about the same to the modeler. In this period of infancy, the most important advance was the integration of report writing with matrix generation. Throughout most of the 1970's the environ: ‘ment was to write matrix generator and report writer programs, generally requiring the skill of a [Ekever Science BLV. All rights reserved HA, Greenberg / Syntax-direted report writing in linear programming using onayze om programmer, and batch process them. At best, patches were put on the old designs to take some advantage of interactive processing. Very few analysis aids were provided, but experts were able to make innovative use of what was available and develop their own, tailored aids. The first inte~ grated analysis aid was PERUSE (1977), which evolved into ANALYZE (1978). Many of the ANALYZE capabilities have been reported elsewhere. Here some new capabilities are described, notably the formation of tables from the syntax of the linear program. The con- text in which we present these new features is in report writing. One can prepare commands in a rule file to serve as a report writer, and this can include elements of reasoning with the ANA. LYZE rulebase module, The same commands can be used interactively to replace or extend the information viewed by the prepared report writer. The purpose of this paper is to describe some of the report writing capabilities in ANALYZE, especially views that can be created from the syntax, which is formally defined in the next sec- tion. In subsequent sections examples are pre- sented with ANALYZE screen displays to show what the analyst sees in cach case. Tn Section 2, we show how a generic report writer can begin with a syntactic overview of the linear program. In Section 3, we describe and illustrate table formation, which depends upon the syntax. In Section 4, we discuss how an ANA LYZE rulebase can be developed to incorporate reasoning into report writing, In doing so, we also illustrate some graphic views. Finally, we present a summary and some conclusions. 2, Syntax of linear programming models In this section we define the syntax of a linear programming model ~ that is, its rules of compo- sition, One way to express an LP model, which is the way of most textbooks, is first to define sets, domains, data tables and variables, and second to define the constraints. To illustrate, consider the following production-distribution model. Giver: 1. A collection of plants distinguished by their location and processes of operation. Each process requires raw material input and produces fin- ished products. 2, Markets, distinguished by location and prod- uct 3, Transportation links from plants to markets Data: Ripy = Unit amount of raw material 7 used by process p at plant vas = Unit yield or product k from process p at plant j 5, total supply of raw material 1 COST_OP,, = Unit operation cost of process p at plant j K = Capacity limit of plant j, mea- sured in terms of its total output. COST , SH,,4 = Unit shipping cost of product k from plant j to market m, where if there is no link from plant j to market m for product k, the value of COST _SH pi = &. Dmx = Demand for product k required to be satisfied in market m. Model: Let Py = Level of production using pro- cess p at plant j, ify = Amount of product k sent from plant j to market m. cosT =Total cost of production and transportation Minimize COST subject to Pyj.Tinn > 9 sty, cost _oP,,P, +E jg COST, SH jut hn ADE Ri Py < Se eas material avait abilities) CU) =E,Py d, DCHT = TSCHT > d, DDEC = TNDEC > d, DDET = TNDET >, All activity levels > 0. ‘The algebraic description is only one view of this instance. Another is to see the sign pattern of the matrix, as pictured in Figure 3. Note that the columns are printed vertically, which is how AN- ALYZE pictures matrices. Only the signs of the nonzero coefficients and right-hand sides are shown, For example, consider the first column, PIN. ‘This is the name of activity P(p, j) for p = 1 and BNT BST peppretrry P1223 3 HNN nswsuscooc WEEN cert me ta ant 4 rs) ts we ° ove . me cat soot aoe coe et some Figure 3. A qualitative view of the LP matrix for an instance ofthe production-

You might also like