AIMMS Tutorial for Beginners - Building a Page
12 pages
English

AIMMS Tutorial for Beginners - Building a Page

-

Le téléchargement nécessite un accès à la bibliothèque YouScribe
Tout savoir sur nos offres
12 pages
English
Le téléchargement nécessite un accès à la bibliothèque YouScribe
Tout savoir sur nos offres

Description

AIMMS Tutorial for Beginners - Building a PageThis file contains only one chapter of the book. For a free download of thecomplete book in pdf format, please visit www.aimms.comAimms 3.11cCopyright 1993–2010 by Paragon Decision Technology B.V. All rights reserved.Paragon Decision Technology B.V. Paragon Decision Technology Inc. Paragon Decision Technology Pte.Schipholweg 1 500 108th Avenue NE Ltd.2034 LS Haarlem Ste. # 1085 80 Raffles PlaceThe Netherlands Bellevue, WA 98004 UOB Plaza 1, Level 36-01Tel.: +31 23 5511512 USA Singapore 048624Fax: +31 23 5511517 Tel.: +1 425 458 4024 Tel.: +65 9640 4182Fax: +1 425 458 4025Email: info@aimms.comWWW: www.aimms.comISBN xx–xxxxxx–x–xAimms is a registered trademark of Paragon Decision Technology B.V. IBM ILOG CPLEX and sc CPLEX isa registered trademark of IBM Corporation. GUROBI is a registered trademark of Gurobi Optimization,Inc. KNITRO is a registered trademark of Ziena Optimization, Inc. XPRESS-MP is a registered trademarkof FICO Fair Isaac Corporation. Mosek is a registered trademark of Mosek ApS. Windows and Excel areA Aregistered trademarks of Microsoft Corporation. T X, LT X, andA S-LT X are trademarks of the AmericanE E M EMathematical Society. Lucida is a registered trademark of Bigelow & Holmes Inc. Acrobat is a registeredtrademark of Adobe Systems Inc. Other brands and their products are trademarks of their respectiveholders.Information in this document is subject to change without notice and does ...

Informations

Publié par
Nombre de lectures 57
Langue English

Extrait

AIMMS Tutorial for Beginners - Building a Page
This file contains only one chapter of the book. For a free download of the complete book in pdf format, please visitwww.aimms.com
Aimms3.11
Copyright c1993–2010 by Paragon Decision Technology B.V. All rights reserved.
Paragon Decision Technology B.V. Schipholweg 1 2034 LS Haarlem The Netherlands Tel.: +31 23 5511512 Fax: +31 23 5511517
Email: info@aimms.com WWW:www.aimms.com
ISBN xx–xxxxxx–x–x
Paragon Decision Technology Inc. 500 108th Avenue NE Ste. # 1085 Bellevue, WA 98004 USA Tel.: +1 425 458 4024 Fax: +1 425 458 4025
Paragon Decision Technology Pte. Ltd. 80 Raffles Place UOB Plaza 1, Level 36-01 Singapore 048624 Tel.: +65 9640 4182
Aimmsis a registered trademark of Paragon Decision Technology B.V.IBM ILOG CPLEXand sc CPLEX is a registered trademark of IBM Corporation.GUROBIis a registered trademark of Gurobi Optimization, Inc.KNITROis a registered trademark of Ziena Optimization, Inc.XPRESS-MPis a registered trademark of FICO Fair Isaac Corporation.Mosekis a registered trademark of Mosek ApS.WindowsandExcelare registered trademarks of Microsoft Corporation. T X, LT X, andA S-LT X are trademarks of the American A A E EME Mathematical Society.Lucidais a registered trademark of Bigelow & Holmes Inc.Acrobatis a registered trademark of Adobe Systems Inc. Other brands and their products are trademarks of their respective holders.
Information in this document is subject to change without notice and does not represent a commitment on the part of Paragon Decision Technology B.V. The software described in this document is furnished under a license agreement and may only be used and copied in accordance with the terms of the agreement. The documentation may not, in whole or in part, be copied, photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form without prior consent, in writing, from Paragon Decision Technology B.V.
Paragon Decision Technology B.V. makes no representation or warranty with respect to the adequacy of this documentation or the programs which it describes for any particular purpose or with respect to its adequacy to produce any particular result. In no event shall Paragon Decision Technology B.V., its employees, its contractors or the authors of this documentation be liable for special, direct, indirect or consequential damages, losses, costs, charges, claims, demands, or claims for lost profits, fees or expenses of any nature or kind.
In addition to the foregoing, users should recognize that all complex software systems and their doc-umentation contain errors and omissions. The authors, Paragon Decision Technology B.V. and its em-ployees, and its contractors shall not be responsible under any circumstances for providing information or corrections to errors and omissions discovered at any time in this book or the software it describes, whether or not they are aware of the errors or omissions. The authors, Paragon Decision Technology B.V. and its employees, and its contractors do not recommend the use of the software described in this book for applications in which errors or omissions could threaten life, injury or significant loss.
A This documentation was typeset by Paragon Decision Technology B.V. using LT X and theLucidafont E family.
Chapter
6
Building a Page
Even thoughAimmsprovides standard pages for each identifier, such pages are not set up to look at groups of related identifiers. That is why model builders and end-users of an application usually prefer to interact with an application through one or more custom pages.
6.1
Creating a new page
To create a new empty page you should execute the following steps:
press thePage Managerthe toolbar,button on press the button on the toolbar to create a new page, specify ‘Beer Transport Input and Output Data’ as the name of this new page, and press theEnterkey to register the page.
ThePage Managerwith the new page is shown in Figure6.1.
Figure 6.1: A Page Manager with a single page
Note that changes made in the previous chapter to the lay out of the Transport data table are also saved in the Page Manager.
6.2
Presenting the input data
A page is either inEditmode or inUsermode. TheEditmode is used for creating and modifying the objects on a page. TheUsermode is for viewing and editing the data displayed within objects on a page.
Building custom pages
Using the Page Manager
Be aware of two page modes
To open the new page inEditmode:
Chapter 6.
Building a Page
double click on the page name in thePage Manager, and button on the toolbar to open the selected page inpress the Editmode.
To create a new table, perform the following actions:
on the toolbar,press the new-table button position the mouse cursor at where the upper left corner of the new table should be, depress the left mouse button and drag the mouse cursor to where the lower right corner of the new table should be, and release the mouse button.
You can now complete the identifier selection dialog box as follows:
select the parameter ‘UnitTransportCost(p,c)’ in the identifier selection wizard as illustrated in Figure6.2, press theNextbutton, press theFinishbutton, and if necessary adjust the position and size of the table object such that all information is neatly displayed.
Figure 6.2: Identifier selection wizard
Opening the page
31
Drawing a new table . . .
. . . and selecting an identifier
Chapter 6.
Building a Page
To add another identifier to the ‘UnitTransportCost’ table, execute the follow-ing actions inEditmode:
select the table by clicking on it, press the button on the toolbar (or alternatively, use the right mouse) to access the properties dialog box, select the contents tab (see Figure6.3), press theAddbutton, select the identifier ‘Supply(p)’, press theNextbutton, and then press the Finishbutton, and back on the contents tab, press theOKbutton.
Figure 6.3: Table contents tab
You can add demand data to the table in the same way as you added the supply data. The resulting table is shown in Figure6.4.
Figure 6.4: Table displaying input data
32
Adding supply data to existing table
Adding demand data to the table
Chapter 6. Building a Page
Creating a bar chart is essentially the same process as creating a table. The following steps summarize the process for the parameter ‘Supply’:
on the toolbar,press the new-bar-chart button position the mouse cursor, and drag to form the new bar chart, select the parameter ‘Supply(p)’ in the identifier selection wizard, press theNextbutton, and then theFinishbutton.
You can then create a bar chart for the demand data in the same way as you created the bar chart for the supply data. Your intermediate page should now look like the one in Figure6.5.
6.3
Figure 6.5: Intermediate input-output page
Presenting the output data
A composite table inAimmsis like a relational database table: the first columns contain indices, and the remaining columns contain identifiers defined over these indices. Creating a composite table containing only the optimal solution is similar to creating a standard table or a bar chart, and requires the following actions:
press the button on the toolbar to create a new composite table, draw the table using the mouse, select the variable ‘Transport(p,c)’ in the identifier selection wizard to indicate which index values must be displayed,
Creating two bar charts
33
Creating a composite table
Chapter 6.
press theNextbutton, and then theFinishbutton.
Building a Page
Yet another way to display the solution is by means of a stacked bar chart:
create a standard bar chart displaying the variable ‘Transport(p,c)’. select the ‘bar chart’ tab in the properties dialog box as illustrated in Figure6.6), instead of the default ‘Overlapping’ option, select the ‘Stacked Bar’ op-tion, and press theOKbutton.
Figure 6.6: Bar chart property dialog box
The scalar object is designed to display scalar values. To display the optimal solution value in a scalar object you should do the following:
press the button on the toolbar to create a scalar object, draw the scalar object using the mouse, select the scalar variable ‘TotalTransportCost’ in the identifier selection wizard, and press theFinishbutton.
Creating a stacked bar chart
Creating a scalar object
34
6.4
Finishing the page
Chapter 6. Building a Page
Designing a professional looking graphical end-user interface is not a trivial ac-tivity, and is beyond the scope of this tutorial. Nevertheless, you will be asked to spend a little time building a nice looking page as illustrated in Figure6.11 at the end of this section.
One item on this page is a button designed to trigger the solution of the ‘Least-CostTransportPlan’ mathematical program. To create such a button, you need to execute the following actions:
press the button on the toolbar to create a new button, and draw the button using the mouse, enter the quoted string “Solve Beer Transport” as the title of the button, and select the actions tab.
The action to be specified is thatAimms”runs”) a procedure. Inexecutes (i.e. this example, the procedure is ‘MainExecution’. Continue with the following steps:
select ‘Run’ as the action to add, press theAddbutton, select option ‘Procedure’, press the enabled wizard button , select the procedure ‘MainExecution’, press theFinishbutton, and accept by pressing theOKbutton.
The completedActionstab of theButton Propertiesdialog box is displayed in Figure6.7. Note that the button can only be used to solve the model when the page is put intoUsermode by pressing theUser Modebutton .
The resulting input-output page (see Figure6.11) contains three text objects. The title text ‘Beer Transport’ can be created as follows:
select theTextcommand from theObjectmenu (see Figure6.8), and draw a rectangle using the mouse, specify ‘Beer Transport’ as the static text on thetexttab of theText Propertiesdialog box, select ‘Center’ from the ‘Alignment’ drop-down list (see Figure6.9) , select theFonttab of theText Propertiesdialog box, and press theAddbutton.
35
Building a well-organized overview
Creating a button
Creating a text object
Chapter 6.
Building a Page
Figure 6.7: The action tab of the button properties dialog box
Figure 6.8: TheObjectmenu of a page inEditmode
36
Chapter 6.
Building a Page
Figure 6.9: The text tab of the text properties dialog box
You can now specify and name the appropriate font, and thereby complete the text object.
select ‘Bold’ as theFont Style, and ‘20’ as the ‘Font Size’, press theOKbutton, specify ‘Title’ as the name of the new font, press theOKbutton to return to theText Propertiestab, again, press theOKbutton to leave theText propertiesdialog box,
The other two text objects displaying the text ‘Input Data’ and ‘Output Data’ are created in the same way. Instead of using the newly constructed ‘Title’ font, you should create a second custom font, named ‘Header’ font, of size ‘14’. The font tab of theText Propertiesdialog box is displayed in Figure6.10.
37
Chapter 6.
Building a Page
Figure 6.10: The font tab of the text properties dialog box
The page is completed by adding two rectangles to emphasize that there are two groups of objects representing input data and output data. Assuming that you have rearranged and resized the objects to fit neatly together, you can draw the rectangles as follows:
select theRectanglecommand from theObjectmenu, and draw the rectangle using the mouse.
Your page should now look like the one in Figure6.11.
Creating two rectangles
38
  • Univers Univers
  • Ebooks Ebooks
  • Livres audio Livres audio
  • Presse Presse
  • Podcasts Podcasts
  • BD BD
  • Documents Documents