1. Creating a Linear Programming Problem from
the start.
The user must create an objective function and some constraints before using any other function in this software. After the user creates this information, they can save the data to a file. This file can be accessed at a later time to keep the user from entering the data over again.
The user can plot the information and have the program solve the equations if there are only 2 variables, X1 and X2. If the user has more than two variables defined, the ‘Options|Solve Primal’ and ‘Options|Solve Dual’ are the only options to solve the problem.
The user must bring up the ‘Edit|Modify Objective Function’ to create an object function from scratch.
The user must enter a coefficient in the edit box after the ‘Z=’. This is the coefficient of X1. To accept this coefficient, depress the ‘Add’ button. The variable will automatically increment to X2 after depressing the ‘Add’ button. The Objective Function will be displayed at the bottom of the Dialog Box as the user keeps adding variables. The user can depress the ‘Clear’ Button if the user decides to erase the entire objective function.
The user can enter units using the ‘Units’ Combo Box. The Units will be used at a later time. There are two enumerations controlling whether the problem is a minimization or maximization problem. These enumerations will be used at a later time.
The slope will be automatically calculated while the user is entering the first two variables. The slope can not be calculated if the user enters more than two variables.
The ‘Modify Constraints Dialog’ is very similar to the ‘Modify Objective Dialog’. Each Constraint can have a ‘Name’ and ‘Units’ attribute associated with it. These attributes will be used at a later time. The user must enter a coefficient for the variables. The equality and RHS must be entered to complete the constraint.
The user must depress the ‘Add Var’ button to place the current Coefficient and Variable into the equation. The ‘Add Con’ button is used to place the entire equation into the list of constraints. The entire list of equations can be viewed in the main dialog.
2. Displaying Objective
Function and Constraints on a 2D Plot
The 2D plot function can only be used for a Linear Program with two variables. To select the plot function the user must open or create an objective function and a set of constraints. Then the user must select ‘View|2D Plot’ and the plot dialog box will come up.
The legend on the right of the screen displays the colors of the lines and their constraint names. The last line in the legend is a dynamic line that moves when the user depresses the ‘Play’ button. Disregard the second a third lines from the bottom. They are used to force the plot to be square. If the problem is a maximization problem, the line will approach the constraints from the top. If the problem is a minimization problem, the line will approach the constraints from the bottom.
The Feasible points on the bottom right of the dialog box displays all points that can possibly be intersected by the objective function. After the user depresses the ‘Play’ button, the intersecting point is highlighted. This point is optimal point. The user can also find this point using the ‘View|Primal Solution’ from the main screen.
The user can control the speed at which the objective line approaches the constraints. This is done using the vertical slider bar labeled ‘Objective Line Speed’. The user will notice the top of the dialog box has the problem name that was defined in the main screen.
3. The Menu Bar
The user will use the menu bar to access much of the functionality of this application. Meta keys can be use for all of these menu bar entries.
The File Menu contains Open, Save Excel, Save Text, Print and Exit. The ‘File|Open’ menu entry allows the user to open an existing problem from a file. The dialog displayed below shows the user interface the user will use to read in a file.
The user must select a filename from the available files in the data folder. The user cannot open an Excel file using this option. The user must use Excel to open an Excel file.
The user can save the solved tableaus in an Excel format using the ‘File|Save Excel’. The save dialog box looks like the open except for the title of the dialog box. The user can save the problem to a text file using the ‘File|Save Text’ menu entry. This option saves the objective function and constraints to a text file so they can be used at a later time.
The last ‘File’ menu entry is the ‘File|Exit’. If the user wants to terminate the program, they must select the ‘File|Exit’. The user must be sure to save any information before exiting the program.
The View menu bar entries consist of 2D Plot, Display Duality and the tableau format. The ‘2D Plot’ menu entry will initialize the 2D Plot dialog. The Display Duality menu entry will toggle the check box that states whether the Duality information is displayed.
The Options menu bar entry allows the user to solve the equations using the primal and dual processes. If the user selects ‘Solve Primal’, a dialog box will come up with the first tableau. See Section 2 for a description on the tableau information. If the user selects ‘Solve Dual’, the same dialog box will appear except the data contained in the dialog box will represent a dual solution.
The Help menu entry contains two menu entries. The first one brings up the ‘About’ dialog box. This dialog box displays the version that the user is executing. The other menu entry is the Rules entry. This entry will bring up this document.
4. Input File Format
The user may either use the editor within the program or use any ASCII text edit to develop the input files. There are very strict rules while editing the input file using an ASCII text editor. The following section was written to help the user create the text file. This method might be faster than using the programs editor for the experienced user. The user will find that new files can be copied and modified much faster than creating one from scratch.
The first line of the input file defines the problem description. This can be any length. Just remember that the description will be used in the tableau and plot. A strength length of no more than 32 characters is suggested. There must be a comment field after the problem description. This comment must start with a ‘#’ character and can be any length.
The second line defines the number of decimal places the program will display when displaying the tableau and plot dialogs. There must be a space after the number and between the ‘#’ character. The comment field can read anything.
The third line states whether the problem is a maximization or a minimization. A ‘1’ in the first column states that the problem is a minimization problem. A ‘0’ in the first column states that the problem is a maximization problem. There must be a space after the 0 or 1 and between the ‘#’ character. The remaining comment can be any length. There must be an empty line after the third line.
The next part of the input file is the objective function information. The first line of the objective function information is the objective function. The user must have coefficients before every variable, even if it is a zero coefficient. The user must enter 0X1 if the variable has a NULL coefficient for X1. The user can enter as many digits as they need. The coefficients, like all other numbers, are double precision. There cannot be any spaces between the coefficient and the variable. The user may also use integer values for the coefficients if they are whole numbers.
The variables must be in order from 1 to N, where N is the total number of variables in all constraints. The user cannot use any other variable except ‘X’. The sign between the variables can only be a ‘+’ or a ‘-‘. In the case of a negative variable the user must place a ‘-‘ between the variables. If the first coefficient is a negative, the user will have to place a ‘-‘ before the coefficient. For example: if the objective function has two negative coefficients, the equation should read “-1X1 – 5X2”. The objective function should have a ‘#’ character directly after the equation that starts the comment field. The comment field can be any length. The next line of the objective function is the units. The units can be any length, but it is recommended that it be less than 32 characters. Directly after the units, there should be a ‘#’ character. The comment can be any length.
The next part of the input file is the constraints group. The constraint groups can continue until all constraints are defined. The first line of the constraint is the constraint name. This name will be display in the tableau and plot. The name must have a ‘#’ character to represent the end of name. The remaining comment string can be any length.
The next line of the constraint is the constraint equation. This equation has the same rules as the objective function except that it has an equality and a right hand constant. The equality can only be a ‘<=’, ‘=’, or a ‘>=’. There must be only one space between the last variable and the equality. The right hand constant can be any real number, but it too must have only one space before it. The last line of the constraint is the Units. The Units must have a ‘#’ character which represents the end of Units string. The remaining line can be any length. The user must separate the constraints by an empty line.
It is very important that the last line in the file contain a blank line. The program will read all the constraints until it reaches a blank line and an end of file marker.
The Linear Program must be thoroughly testing be someone other than the developer. Our Test Department that is headed by Mr. Michael Durham will execute the test procedures. The developer Mr. Tim Curry developed the follow test procedures. The tester must place a checkmark next to the bullets indicating that the test was successfully completed.
Install the software on a platform that does not currently have the software. There are no software installation procedures because the software is distributed using the standard install shield.
· Place the 3.5” floppy into the floppy drive and select ‘a:\Setup.exe’.
Next, the tester must show that the application can read an existing input data file and solve it using the primal and dual. The tester must also prove that the input data file contents can be plotted if it contains only two variables.
· Start the application by double clicking on the LP.exe icon. The LP.exe will be in the folder where the software was loaded.
· Turn on the Duality display by selecting “Options|Duality’ checkbox.
· Select “File|Open…” and read in the file called min_2D_p55.lp. This will cause the primal and duality list boxes to be filled with the relevant information.
· Select ‘Options|Solve Primal’. The tableau dialog should appear. Select the ‘Next’ button three times. Now the tester should see the final tableau. The final table should look like the one on page 55 of the book called An Introduction to management science. See the Bibliography for the book description. Press Next again to get out of the final tableau.
· Select ‘Options|Solve Dual’. The tableau dialog should appear. Select the ‘Next’ button three times. Now the tester should see the final tableau. The final table should look like the one on page 55 of the book called An Introduction to management science. See the Bibliography for the book description. Press Next again to get out of the final tableau.
· The next test is to confirm that the 2D plot can successfully find the optimal solution. The tester must select ‘View|2D Plot’. Then the tester must select play. The tester will see that the objective function intersects and stops at the optimal solution. The list box at the bottom right should display the feasible points and the optimal point will be highlighted. These points on the plot should match the points on Page 56 of the same book.
The last test will confirm that the problem editor works correctly. The tester will create an input file and then compare their file with one that already exists in the data folder. The tester will have to use the User manual to follow the following steps if they are unfamiliar with the procedures.
· The tester must start the application and Select ‘View|Modify’ Objective Function. Then the user must create an objective function exactly like the one one page 55 of the book An Introduction to Management Science. Then the tester must select ‘View|Modify Constraints’ and create the same constraints as the ones on page 55. Then, the tester must select ‘File|Save Text’ and save the problem to a file.
· The tester must then open both files using any text editor and compare the results. The input files should be the same.