Home

FortMP Manual - OptiRisk Systems

image

Contents

1. DUAL PIVOT ADMIT THRESHOLD v Default v 1 0d 8 NVERT PIVOT ADMIT THRESHOLD v Fixed v 0 PRIMAL PIVOT ADMIT RELATIVE v Fixed v 0 DUAL PIVOT ADMIT RELATIVE v Default v 0 0 NVERT PIVOT ADMIT RELATIVE v Default v 1 0d 2 Keyword THRESHOLD may be added after RELATIVE Pivots falling between the ADMIT level and the ZERO level are postponed hopefully so as to avoid their use completely In the case of INVERT these pivots cannot be selected until no other alternative remains the ZERO level then defines the criterion for singularity In the case of PRIMAL and DUAL postponed pivots are flagged that is the corresponding row or column selection is temporarily ruled out until a fresh re invert occurs When all possible selections are flagged out in this way an early re inversion can be invoked so as to correct the numerical error as far as possible before trying again However if all selections become flagged immediately after re invert then the algorithm is blocked and is halted DUAL then reverts to PRIMAL but such an error in PRIMAL is not resolvable The following tolerance applies to the forward backward pivot comparisons made as a check on numerical accuracy PIVOT DIFFERENCE EPSILON v Default v 1 0d 2 The tolerance is relative that is to say the difference
2. PRIMAL RELATIVE EPSILON v Default DUAL RELATIVE EPSILON v The above commands specify relative zero levels in subtractions performed during update or calculation of vectors SIMPLEX LOG FREQUENCY n This command assigns a frequency for printing the iteration log during SIMPLEX algorithms The default for m is 1 Back to Chapter contents WT AA Contents 5 The Interior Point Method 5 THE INTERIOR POINT METHOD 5 1 Introduction to the IPM Algorithm 5 1 1 5 1 2 5 1 3 5 1 4 5 1 5 IPM Problem Statement Introduction to the Solution Procedures Affine Barrier and Predictor Corrector Algorithms Solving the System of Equations Determining the Starting Point 5 2 Controls on the IPM Algorithms 5 2 1 5 2 2 5 2 3 5 2 4 5 2 5 5 2 6 5 2 7 Using the Algorithms Control and Choice of the Starting Point Methods Choice of Solution Algorithm for the Equations Refinement by Conjugate Gradient iterations IPM Save and Restart Iteration Limit IPM SSX Crossover Option BASREC Miscellaneous IPM and BASREC Commands 5 3 Summary of SPECS Commands NYA RWNN 5 1 Introduction to the IPM Algorithm 5 1 1 IPM Problem Statement FortMP IPM is a primal dual approach to the solution of an LP problem that is to say i
3. Listing 4 Log output for Q form in file TESTQP QLC Back to Chapter contents rwr aa 9 4 2 Worked example using FF form The quadratic terms in the objective take the form 1 2 p p p3 Where the variables p p 2 and p are defined by equations pi x1 p2 x1 x2 p3 x3 x4 The expressions x X X 2 and x x are thus to be entered as F type rows in the data DT is shown below in listing 5 Listing 6 shows the Input data presented in a file TESTOP F associated SPECS commands in file FORTMP SPC lS IONE 1a Zz OROROORO H y G G G a j l H H 4 Fa at e Crore eS GS oS Sera Sa Sra S Listing 5 Input data using FF form in file TESTQP FDT tqp FILE testqp fdt UTPUT FILE E testgqp frs OG FILE NAME testaqp flg Listing 6 Specs commands for FF form in file FORTMP SPC rer a Outputs comprising the solution in file TESTQP FRS and the log in file TESTQP FLG are shown below in listings 7 and 8 FORTMP SOLUTION REPORT PROBLEM NAME TESTOPEE R OBUEC ly ES NAMEN Se OsSa RHS NAME HS G BOUNDS NAMI BND MROW NCOL ORGME WIV WANE 0 468204D 02 LOB FIX OFFS 0 220000D 02
4. A description of the INPUT BASIS mechanism is given in Section 3 5 3 on BASIS input and output Details of the MPS format layout of an external basis are given in Appendix A section A1 3 The SAVE RESTART mechanism is described in Section 3 5 1 When the starting basis has been installed the FortMP system calls INVERT and calculates the basic solution so that PRIMAL or DUAL can then execute directly TT 1A Back to Chapter contents 3 3 3 Using IPM The IPM algorithms are invoked with the command ALGORITHM IPM A variety of controls direct which specific IPM algorithms are to be used and supply parameters To use these controls the user should read the descriptions given in Chapter 5 of this manual The following SPECS commands determine the log level of IPM and the execution limit in the same manner as for PRIMAL and DUAL IPM LOG LEVEL n x n 1 4 default 1 MAXIMUM IPM ITERATIONS n default n 80 After this number of iterations the IPM algorithm saves the current solution for restart and terminates see Section 3 5 1 on saving and restarting The following SPECS command is only available in certain versions of FortMP It invokes a graphical display which shows the density pattern of the matrices and the progress of the iterations Copies of the display will be left in files model a model b model c and model d if this command is succe
5. TO ETENDE 2950 50 0 100 0 100 0 20 0 LO 0 LO N N kal feal za kal W w CON1 CON2 CON3 zal erer m E o 4S Chapter 6 Mixed Integer Programming MIP 6 4 Branch and Bound algorithm 6 4 1 Branch and Bound the Background Branch and Bound B amp B is a technique for solving certain constrained optimisation problems It is particularly important for solving those problems whose solution by complete enumeration would be prohibitively expensive A wide variety of problems of this kind arise in Operational Research Combinatorial Optimisation and Artificial Intelligence Taking into account practical computational experiences B amp B is considered to be the most robust and widely used technique for solving MIP IP problems The B amp B algorithm carries out a progressive partitioned search of the solution space of a given problem This is done by exploring a search tree and usually only a small proportion of the solution space is searched The remainder of the search tree can be partly eliminated using the bound derived from a good discrete integer feasible solution Such a solution is proven to be optimal when the rest of the tree is fully eliminated Back to Chapter contents 6 4 2 Branch and Bound the Algorithm In order to describe the B amp B algorithm we first introduce a few definitions We consider an MIP problem defined by relations 16 17 and 18 in section 6
6. All other controls are set to default values and the input and output files are named as BININT MPS The input data file in MPS format BININT RES The solution output file With these files in place it is only necessary to call execution of the stand alone FortMP program in order to solve the problem and obtain the outputs The input the SPECS controls and the solution output for this example are given in Table 15 Table 16 and Table 17 below NAME BININT ROWS NER COSIN EQ R1 EQ R2 GE R3 EQ R4 IO 15 COLUMNS zol COST 4 0 R1 10 K R2 IO R4 LO xol R5 Lo X2 COST 6 0 R2 350 X2 R4 WO R5 Zan X3 COSt 5 0 R3 20 X3 R4 LO R5 2 510 X4 COST 16 0 R3 SmO X4 R4 AO R5 35 0 XS COSM Zr R4 LO X5 R5 Lo X6 COST 5 0 R1 LO X6 R5 2 510 X7 COST LO R5 LO RHS RHS R1 Zea R2 5 0 RHS R3 AV 10 R4 ii RHS R5 14 0 BOUNDS LO BND X1 0 5 LO BND X2 ORES BV BND X3 allen FX BND X4 1710 UI BND XO 6 0 LI BND X7 1O ENDATA Table 15 Problem Data File BEGIN MODEL NAME BININT END Table 16 Problem SPECS File FORTMP SOLUTION REPORT TOTAL ITERATIONS 3 LP OPTIMAL IP OPTIMAL PROBLEM NAME BININT OBJECTIVE NAME COST RHS NAME RHS BOUNDS NAME BND MROW 6 NCOL 7 LP OPTIMUM VALUE 0 420000D 02 IP OPTIMUM VALUE 0 430000D 02
7. i The following is an example of coding the call to SUBMP1 int MR NC NAIJ NSET STSL double AIJ UPB LOB RHS LHS double COST VCSOL RSCOS int ROWIN COLIN BSTAT int SREF SFUN SBEG SEND char PNAME SPID Fill values of MR NC NAI MALLOC AIJ NAIJ SUBMP1 amp MR amp NC amp NATI 17 nt S BSTAT Allocate all the arrays and strings Fill conten D N uble RHS do B do EG int SEN uble RSCOS TCTN ef ts of input arrays here Fill the strings PNAME PNAME J int 8 AIJ ROWI N amp NSET SPI D SPI strlen SPI D here D COLIN UP B COST VCSOL M TYPE BSTAT SREF RSCOS SFUN amp STSL LOB RHS SBEG amp TCTN NSET pd uble Dy J NSET here LHS SEND B 3 FortMP Appendices The full set of C prototypes for library entries is supplied in the file L I Back to Chapter contents E1 3 Function Calls BH DR H So far the library entries considered have been subroutines equivalent type void in C but there are also a few function type entries Complications are avoided by limiting these to functions with a numeric scalar result Such a function is simply declared in the C prototype with
8. STRUCTURAL VARIABL VALUE X1 1 62399 X2 112367 X3 a X4 1 X5 X6 X7 100001 Q 100002 100003 HH H amp B lea ra eal LOGICAL VARIABLE VALUE RHS SHADOW PRICI 42 74201 2 Oe 4 TEAS RO OR OYT E I EA N a Listing 7 Solution output for FF form in file TESTQP FRS rer ar FORTMP release version 2 03a Mar 1997 begin model name testqp input file name testqp fdt output file name testgqp frs og file name testqp flg PS INVER UIE IPAS IS IP ILIN ILS SUID NPUT DATA STATISTICS ROBLEM NAME IS TESTQPFE R OF ROWS INCLUDING OBJ R OF COLUMNS R OF BOUNDED VA R OF NONZEROS GE NUMBER OF NONZ ER COLUMN MIB OUR IPE IOUS N IME OW ILOIW S 8 NIMIZE KEN FOR INPUT SI TOTAL IN PROGRESS COMPLETE les eal ea E B B B B R gt ry non zeros reduced to 28 KEN FOR SCALE PRSLVE ORO KEN FOR QPM PREPROC O0 ymmetric Matrix U Non Zeros holesky Factor U Non Zeros HASE RSNA IDR HASE DEEN E P OBJVAL 57416 i s LZOGL 35 6770 pSoOLAE OS 2101059 DAR IBS 17924E 06 14675 24 837 88048E 10 26460 24 825 37038E 13 al 3203 24 821 15094E 15 66014E 10 24 820 7 80189
9. INTEGER SOLUTION 0 108000E 03 FOUND AT NODE 7 Time since B amp B start 0 05 secs Iter 22 Node Parnt Obj ve Fractn Bvar Typ Dir NNI NCH Dpth Ipbest 8 A 95 1667 0 5070E 01 16 S2 DWN il il 3 108 0 SET 3 FROM TO 16 Lhe Iesiano 23 Prty 0 INTEGER SOLUTION 0 951667E 02 FOUND AT NODE 8 Time since B amp B start 0 05 secs Iter 29 Node Parnt Obj ve Fractn Bvar Typ Dir NNI NCH Dpth Ipbest 9 3 O94 5185 O 1775 ZU wie il 0 2 95 17 10 9 SELGET Dual cutoff TARS 2 UP 1 iL 3 95 17 SET 2 FROM TO 14 15 Iterno 24 Prty 0 ital S SS VOS Dual cutoff 14 S2 DWN 1 0 3 95 17 SET 2 FROM TO 13 14 Iterno 24 Prty 0 KKK KKK KK KK Search completed KKKKKKKKKKKKKK The IP optimum is 95 166667 Total nodes opened 11 processed 10 Final iteration count 24 SSSESSSSS Savine ths trees SSSSssossas No of nodes TE Joma ike 10 processed Storage used Nodes 8 Bases Sp ETXES 0 VI 40 Chapter 6 Mixed Integer Programming MIP Integer solutions 2 best IOR 1667 TIME TAKEN FOR INTEGER 0 16 SECS TOTAL SO FAR SECS Back to Chapter contents VI 41 FortMP Part 2 6 10 MIP Constraint Classification 6 10 1 Introduction and SPECS command A useful feature of FortMP leading to better understanding of model types and more effective decisions on how best to tackle them is constraint classification Classification is used in the pre processing and cut generation procedures of the system The us
10. MODEL NAME modname This command supplies a default for the names of input files and output files in the run which are built by adding an extension as follows modname mps MPS format input data file modname bas MPS format basis data file modname res Standard output file modname log Standard log file modname mat Internal matrix file modname nam Internal names file modname sav Internal save file modname bbf Simplex save file modname isv IPM solution save file modname msv MIP Branch and Bound tree save file The default model name is MODEL INPUT FILE NAME filename OUTPUT FILE NAME filename LOG FILE NAME filename BASIS FILE NAME filename These commands assign a special name to the various input and output files DIRECTORY NAME dirname These two alternative commands prefix all filenames other than those introduced with an explicit FILE NAME command These commands select the type of input data RHS NAME rhsname These commands select appropriate items in the MPS format input data TIF NA MINIMIZE MAXIMIZE These two commands specify the direction of optimisation MINIMIZE is the default so this command is not actually needed SCALE ON SCALE OFF These two commands set the SCALE switch The default is ON SCALE PASSES n These commands set parameters for scal
11. B BB II anv The user is referred to references 5 15 16 22 23 and 24 given in Chapter 1 section 1 8 for definitions and theoretical discussion of choice strategies Back to Chapter contents 6 5 3 UP direction priority option In a large number of problems there is an advantage to selecting the UP direction branch for sub problem solution in preference to the opposite DOWN branch This may have the effect of forcing other variables to zero and thus reaching an integer solution quicker than if the choice is open Problems that benefit in this way arise in allocation and scheduling models and elsewhere They may for example have a large number of constraints similar to the convexity row of an SOS that is yas jeB where B is a subset of the binary variables appearing in row i To enforce this priority the following SPECS command is used MIP PRIORITY UP ON default OFF OFF may also be given With PRIORITY UP activated ON the variable choice options become modified so as to consider fractional values only in the UP sense This prevents selection of a binary close to zero in preference to one that is close to one which would have a damaging effect UP priority is mainly intended for use with binary variables and has little relevance to general integer variables or special ordered sets Back to Chapter contents VI 24 Chapter 6 Mixed Integer Programming MIP 6 6 Detailed User control of the Tree Sea
12. COEUMN S SE S STRUCTURAL VARIABLES NO STATE NAME VALUE LOWER BND UPPER BND REDUCED COST il B X1 Des 0 5 NONE QO 2 B X2 ils 0 5 NONE OR 3 Ej X3 1 il sl Ties 4 E X4 alts 1 lS Oe 5 B XI Ss 0 Ge O 6 L X6 QO 0 NONE Dee 7 B X7 25 il NONE OF INOW Sc o 6 6 G8 6 oS LOGICAL VARIABLES NO STATE NAME ROW VALUE LOWER RHS UPPER RHS SHADOW PRICE al B COST 43 NONE NONE w 2 E R1 2 Dis 2i a 3 Ej R2 5 BA ay ais 4 B R3 5 4 NONE OR 5 E R4 ieis E RE ale 6 E RS 14 Al Tas SUA Table 17 Problem Output Back to Chapter contents 2 5 Summary of SPECS File Controls The following SPECS commands have been introduced so far in this manual Those introduced in this chapter are underlined thus w an This must be the first command line MODEL NAME modname This command supplies a default for the names of input files and output files in the run which are built by adding an extension as follows MODNAME MPS Input data MODNAME RES Output results MODNAME LOG Log file and messages The default model name is MODEL This command assigns a special name for the output file LOG FILE NAME filename This command specifies that the objective is to be minimised NB MINIMIZE is the default so this command is not actually needed This command specifies that the objective is to be maximised PRESOLVE ON This command activates a PRESOLVE operation p
13. SOR OBJECTIVE ON SOR OBJECTIVE OFF Default n 10 Default OFF These commands control whether SOR considers both objective and feasibility criteria SOR OBJECTIVE PARAMETER vV Default v Teck Controls the reduction parameter B when objective criterion is considered SOR RELAX PARAMETER Controls the relaxation parameter SOR MAX MUM TERAT ONS vV n Default v ime Default n 2 Controls the number of complete cycles through all the constraints SOR VIOLAT ON TOLERANCE SOR FEASIBIL SOR CONVERGE TY TOLERANCE TOLERANCE vV vV vV Default 1 0d 7 Default 1 0d 3 Default 1 0d 2 These commands control tolerances and limit the algorithm Back to Chapter contents Appendix A Input Output Data Layouts APPENDIX A Input Output Data Layouts Contents A1 MPS FORM DATA LAYOUTS A1 1 MPS Layout for LP and MIP problem data A1 2 Marker data for Binary Integer and SOS specification A13 MPS format of external BASIS data input or output A2 FREE FORM LAYOUT AND LONG NAMES A2 1 Free form input layout A2 2 Name length A3 TABULAR LAYOUTS MG RW INTERFACE A3 1 Tabular input layout A3 2 Tabular output layouts A4 MIP AGENDA LAYOUTS A4 1 Standard named agenda layout A4 2 Listed un named agenda layout 19 21 22 22 25 26
14. gy BV X 8 Hy oe OVE XK 1 where JX TVX H pX Y O y20 2 x tx e tay Sh x 20 k 1 2 K 3 The discrete function can take only one of the K possible values weighted by the variables x of which only one can be non zero and that must have the value one This requirement could be expressed by restricting each x to be a binary variable but the alternative of defining them collectively as a special ordered set of type one which is a direct statement of their nature leads to a more efficient solution process The weighting variables x are called special ordered set type one variables and the rows 1 2 and 3 are called function rows reference rows and convexity rows respectively Should the SOSI s not represent a modelling of discrete separable variables then none of these rows need actually exist but there is an advantage to the system if it is aware of the reference rows at least Back to Chapter contents 6 2 4 Special Ordered Sets of Type Two A Special Ordered Set of type Two SOS2 is a set of consecutive variables in which not more than two adjacent members may be non zero in a feasible solution All such sets are mutually exclusive of each other the members are not subject to any other discrete conditions and each set is grouped together consecutively in the data SOS2s were introduced to make it easier to find global optimum solutions to problems containing piecewise linear approximations to a no
15. 6 8 2 Bound Cutoff and Tolerance control The following SPECS commands are useful to avoid searching unwanted parts of the tree or searching in unnecessary detail INTEGER TOLERANCE v default v 0 001 This tolerance supplies the largest deviation from an integer value for which a discrete entity is deemed to be integer feasible It should represent the maximum fraction considered by the user to VI 34 Chapter 6 Mixed Integer Programming MIP be tolerable in a solution Very often it is found that most or all fractions drop to zero anyway below the default level Two concepts the BOUND and the CUTOFF TOLERANCE permit user to reduce unnecessary searching of branches during MIP They operate by controlling the TREE CUTOFF or maximum GAP beyond the RLP optimum that is the region where solutions to MIP sub problems may be found Once the solution value of a branch deteriorates beyond the limit set by this gap then that branch is discontinued Initially the gap is set by the starting BOUND This may be controlled by the user with the following SPECS commands MIP BOUND v x default MIP BOUND RELATIVE v default High value High value MIP BOUND v may also be written as MIP BOUND ABSOLUTE v and it specifies an actual initial gap MIP BOUND RELATIVE v specifies gap size relative to the RLP optimum that is the gap size is the RLP optimum value multiplied by the factor supplied If the user supplies both
16. 61 Field 1 Bound type code LO Lower bound UP Upper bound FX Fixed value FR Free variable MI Minus type PL Plus type default LI Integer variable lower bound UI Integer variable upper bound BV Binary variable SC Semi continuous upper bound Field 2 Bound set name Field 3 Column name Field 4 Value Table 12 Example of BOUNDS Section Back to Chapter contents 2 4 An Example Binary and Integer Variables For this example we shall largely repeat the example of Section 2 1 1 but with additional binary and integer constraints also considered The problem statement becomes the following Minimize the cost function AX 6x ONS 16x 2x Fee x subject to the following constraints xX x 2 X 3x 5 2x 3x 2 4 x x x 4x x 11 xi 2x 2x 3x x 2x x 14 and to the following bounds and discrete value constraints 05 lt x 0 5 lt x x is a binary variable zero or one x 10 x is an integer variable in the range 0 0 lt x lt 6 0 x is an integer variable with lower bound 1 0 Readers will note that row R3 has become an inequality it is relaxed because otherwise the problem does not have any solution that satisfies the binary and integer constraints The ROWS section of the example may be encoded as in Table 13 below ae 1 Field 2 Field 3 Field 4 Field 5 Field 6 5 12 15 22 25 36 40 47 50 61 Field 1 Row type LE Less than or Equal GE
17. Amn 1S an m xn matrix of constant constraint coefficients and L Lm and Uj U are constant lower and upper bounds respectively for each constraint row Also subject to the following bounds lj lt Xj lt uj for j 1 2 n where J and u u are constant lower and upper bounds respectively for each variable vil 8 Chapter 7 FortMP Subroutine Library and External Data Interface This is illustrated in diagram 6 1 below EAE n Uj Uz U lA IA Q IA Diagram 6 1 General LP problem with Simple Upper Bounds and RHS ranges Each of the bound values J u L and U in the above formulation may take an infinite value to indicate that that bound does not exist negative infinite for a lower bound or lower RHS Unlike the original MPS form input where such cases are indicated by type codes row types or bound types for columns a standard big value is defined and any value having this magnitude or larger is treated as infinite that is the corresponding bound does not exist For Mixed Integer data additional tables are provided in the interface which detail the specific mixed integer types of each variable and provide the structure of any special ordered sets that may be present A description of these tables is given in 7 2 3 below Back to Chapter contents 7 2 3 Argument specifications In this section certain arguments have their type specified as DOUBLE PRECISION REAL VI 9 FortM
18. BEGIN END which delimit the active part of the file Back to Chapter contents 2 2 2 Controlling the Input and the Output The input and output file names can be changed by the following commands INPUT FILE NAME filename OUTPUT FILE NAME filename LOG FILE NAME filename with the desired name for each file placed between the parentheses However it is not usually necessary to use these commands because it is easier to use default names By default these filenames are model mps model res model log where model is a name of up to 8 characters which can itself be changed by the following command MODEL NAME modname With this one command default names are assigned to all input and output files by adding the appropriate extension after modname Specific names for individual files need to be changed only when necessary Back to Chapter contents 2 2 3 Additional Useful Controls The following commands set the direction of optimisation for the objective function MAXIMIZE MINIMIZE The default is MINIMIZE The commands given below alter the default algorithms applied in the solution PRESOLVE ON The PRESOLVE algorithm examines for any possible reductions and simplifications that may be applied directly to the problem It should be fairly easy for the user to experiment with its use in order to decide whether solution times can
19. Back to Chapter contents 3 7 3 Numerical Difficulties and Instability With the advantage of coefficient scaling provided by the SCALE algorithm see Section 3 3 6 numerical difficulties and instability should arise only rarely in FortMP and then they are usually overcome without troubling the user Some intractable cases of numerical difficulty are detectable and cause premature termination of the solvers An explanatory message is written to the log and to the standard output e g displayed on the screen In the case of the Dual algorithm unrecoverable errors are overcome by reverting to Primal in order to continue the optimisation process Certain cases may in very rare situations cause the system to cycle without any progress in the iterations or with only very slow progress towards the optimum When the system is halted the user s main technique for overcoming these problems is to change the controls in some way and restart the run A control is available to allow user to watch the iteration log online so that the run can be halted before excessive time is wasted In any case there is a maximum iteration limit for both SSX and IPM solvers When the maximum iteration limit is reached the system always saves a restart point before exit and the user can also set controls to save restart points periodically to guard against a crash or to allow a run to be halted without wasting the time used so far Back to Chapter contents 3 7 4
20. IN lag bol i g n ll STRUCTURAL VARIABL VALU les IS Sy GI Fe ey TS I eal n ROW VALUI Aes Zee 0 420000D 02 lea IE ERATIONS LOW LOW NONI eo Qe oa oa E ve BND RHS GI UPPER BND NONI NONI les e NONI NONI ee ga UPPER RHS NONE REDUCE YARNS AD OY LSI KO LS SHADOW ies FLN BEREGI izal 5 E R2 To SE So is 4 E RS 4 4 4 le 5 E R4 PE TEs Li ile 6 E RS TaY 14 14 els Table 7 Simple example Solution output Back to Chapter contents 2 2 Simple Controls 2 2 1 The SPECS Controls The file named FORTMP SPC provides the FortMP system with the controls that it needs to execute a run In principle no controls are strictly necessary provided that the input data is in MPS format and resides in the file MODEL MPS However the user will most probably wish to change the filenames for a run and may need to change other defaults as well Controls which change the default settings are referred to as SPECS commands or as SPECS controls Each command is presented on one line comprising one or more keywords followed where needed by the appropriate data Examples are MODEL NAME testin MAXIMIZE PRESOLVE ON FEASIBILITY TOLERANCE 1 0d 6 INVERT FREQUENCY 75 The SPECS commands are listed on the FORTMP SPC file between the indicator lines
21. SIMPLEX LOG LEVEL n INVERT LOG LEVEL n These commands specify the level of the output to be sent to the log file in each major algorithm The range is 1 4 with default value 1 in each case SIMPLEX SAVE FREQUENCY n default n 10 each 10th reinvert This command specifies the frequency for making a SAVE in SSX algorithms SIMPLEX START RESTART This command specifies RESTART for the SIMPLEX algorithms RESTART is an alternative to other starting basis options IMPLEX START CRASH IMPLEX START INPUT BASIS IMPLEX START RESTART IMPLEX START UNIT BASIS Nn nN N T7 10 These commands select the mechanism for setting up the starting basis when the main algorithm is PRIMAL or DUAL CRASH is the default PRIMAL MSUB n This command sets the number of priced candidates in PRIMAL sub optimisation The range for n is 1 10 with default value 4 The above commands control use of DEVEX algorithm the default being OFF for both PRIMAL and DUAL DOUBLE causes DEVEX to be active in both phases of the PRIMAL algorithm ON and SINGLE are equivalent DEVEX RATIO value Default 0 4 This command sets the ratio criterion for recalculating column norms or row norms in DEVEX INVERT FREQUENCY n This command assigns a frequency in terms of the iteration count for reinversion dur
22. 1 MR NC Basis status indicators INTEGER 0 Basic 1 Non basic at lower bound 1 Non basic at upper bound RSCOS 1 MR NC Dual solution values DOUBLE PRECISION The following arguments and function outputs refer to the access features for model names See sections 7 3 3 7 3 5 IROW RNAME LRNAME RPTTRN Vil 32 Row index INTEGER Row name CHARACTER 8 Row name CHARACTER 16 Row name pattern CHARACTER 8 Chapter 7 FortMP Subroutine Library and External Data Interface LRPTRN Row name pattern CHARACTER 16 JCOL Column index INTEGER CNAME Column name CHARACTER 8 LCNAME Column name CHARACTER 16 CPTTRN Column name pattern CHARACTER 8 LCPTRN Column name pattern CHARACTER 16 In a pattern the following characters are wild see 7 3 4 pa matches any character amp matches any alphabetic character matches any digit The following are miscellaneous arguments KOBJ Constant term in the objective DOUBLE PRECISION see 7 3 6 SPCFIL SPECS file name CHARACTER n where n is any length up to maximum 70 see 7 4 2 COMMND Command line to set up a default value with subroutine SPCDFT see 7 4 3 EXTEN File extension used by MPSOUT CHARACTER 3 see 7 6 Back to Chapter contents 7 7 3 Summary of relevant SPECS commands The following SPECS commands have been introduced in this chapter To enable access to names see section 7 3 2 INPUT SAVE NAMES ON default OFF INPUT
23. 8 3 Specifications In order to avoid repeated specifications of the same item in this section we will give argument specifications separately in Section 8 3 1 In the subsequent utility subroutine specifications arguments will be listed with identical argument names 8 3 1 Arguments In this section certain arguments have their type specified as DOUBLE PRECISION REAL These arguments are DOUBLE PRECISION in a standard double precision version of FortMP and REAL in a single precision version of FortMP The scalar arguments used are as follows AVAL CTP IOBJ IROW JCOL JVAR LOV LRHS MAIJ MIT MRACT MROW DOUBLE PRECISION REAL Matrix element value INTEGER Column type code 1 Plus 2 Bounded 3 Fixed 4 Free INTEGER Row number of the objective function INTEGER Matrix row number INTEGER Matrix column number INTEGER Problem variable number Variables comprise Logicals one per row followed by Structurals one per column For a logical JVAR equals the row number and for a structural JVAR equals MROW plus the column number DOUBLE PRECISION REAL Lower bound value of a column DOUBLE PRECISION REAL Lower RHS value of a row INTEGER Maximum available AIJ matrix element space INTEGER Mixed integer type code of a structural variable Coded as follows 0 Continuous variable 1 Binary variable 2 Integer variable 3 Semi continuous variable 4 Member of SOS type 1 no
24. Az Aw are then computed as Ax Ax As As Ay Ay Az Az Aw Aw Back to Chapter contents 9 2 2 Solving the System of Equations The set of equations defining the predictor and corrector search directions respectively differs from each other only in their right hand side Hence only a single factorization is required for solving both systems If we let R R R R and R define constant right hand side vectors of size n except for R which is of size m then both of the above sets of equations are of the form AAx R 1 Ax As R 2 A Ay Az Aw QAx R 3 ZAx XAz R 4 WAs SAw R 5 To solve these equations we may begin by eliminating all the variables As Az and Aw from equations 2 3 4 and 5 When this is done the system is reduced to two equations as follows X7Z SW Q Ax A Ay R new RHS for 3rd equation AAx R This system could now be solved by finding the inverse of the matrix D Q A A 0 Where D is the diagonal matrix X Z SW However the number of equations can be reduced still further by eliminating the variables Ax across these two equations This will result in the following A D Q A Dy R_ new RHS The matrix is a symmetric positive definite matrix and so may be inverted by the Cholesky procedure Back to Chapter contents 9 2 3 Determining the Starting Point It is vital in the IPM algorithm to have a good starting inter
25. COST Field 1 Row type LE Less than or Equal GE Greater than or Equal EQ Equal N Non binding objective Field 2 Row name Table 8 Example of ROWS Section The COLUMNS section of the example may be encoded as in Table 9 below pas 1 Field 2 Field 3 Field 4 Field 5 Field 6 5 12 15 22 25 36 40 47 50 61 Field 2 Column name Field 3 Row name Field 4 Value Field 5 Row name Field 6 Value Table 9 Example of COLUMNS Section The RHS section of the example may be encoded as in Table 10 below Field 1 Field 2 Field 3 Field 4 Field 5 Field 6 2 3 5 12 15 22 25 36 40 47 50 61 C E a es E ae ee a ee ar ae a a Field 2 RHS set name Field 3 Row name Field 4 Value Field 5 Row name Field 6 Value Table 10 Example of RHS Section The RANGES section that follows is similar in form to the nght hand side section The value entered is the difference between the upper and lower values for each constraint that has a range In the example it would be encoded as in Table 11 below Field 1 Field 2 Field 3 Field 4 Field 5 Field 6 2 3 5 12 15 22 25 36 40 47 50 61 a ee a a ee a E E a Field 2 Range set name Field 3 Row name Field 4 Value Field 5 Row name Field 6 Value Table 11 Example of Ranges Section The BOUNDS section of the example may be encoded as in Table 12 below Field 1 Field 2 Field 3 Field 4 Field 5 Field 6 2 3 5 12 15 22 25 36 40 47 50
26. In both cases the general form of problem statement is two sided linear as stated in the previous chapter Section 7 2 2 Some differences to be noted are as follows The objective row is presented as a separate vector in the internal data interface but is an integral part of the A matrix in DISERV utilities DISERV users do not need to account for the extra row in their indexing In DISERV utilities the corresponding row wise and column wise elements are combined in a single vector Row positions are given first followed by column positions In DISERV utilities the absence of any bound is not necessarily to be shown by an infinite magnitude in the corresponding bound vector It is indicated by a type code in a separate vector of variable type codes Only the following four variable types are recognised by data interfacing service routines Plus type variable Bounded variable Ne I 3 4 Fixed variable Free variable This coding applies equally to structural and to logical variables and may be interpreted for logicals as follows 1 LE type row 2 Row with RHS range 3 EQ type row 4 Free row There is no internal recognition of a minus type structural or GE type row The following diagrams illustrate the data that can be accessed and modified with data interfacing service routines 1 Matrix data Aij Objective row 2 RIM vectors Upper RHS Upper bounds Lower bounds Lower RHS Variable type
27. ORG type marker followed by its corresponding END type marker before any other marker can appear Fields 4 and 5 are interchangeable the marker type keyword may be placed in field 5 and when SOSORG is placed in field 5 the REF row data is placed in field 4 Blank fields should be left blank but may contain unused material A 19 FortMP Appendices The Label field is intended for the user to attach a name or label to a set For this purpose the END marker should have the same label as its corresponding ORG marker However this is quite optional SOS type in Field 1 is either S1 or S2 meaning type SOS1 or type SOS2 respectively REF row in field 5 or field 4 of a SOSORG type marker line is optional If left blank then a default row with coefficients 1 2 3 is assumed Further information on defining binary or integer variables with markers is given in chapter 6 section 6 3 3 Back to Chapter contents A 20 Appendix A Input Output Data Layouts A1 3 MPS format of external BASIS data input or output In this format the input basis data comprises NAME record BASIS header record optional BASIS data section ENDATA record In the BASIS data section the layout employs fields as before described as follows Field 1 Code for the type of record as follows XL XU introducing a basic variable UL LL introducing a non basic variable Field 2 Name of a structural variable which become
28. This command is an ON OFF switch as follows OUTPUT BASIS ON OUTPUT BASIS OFF This is the default The switch ON creates output to a file with extension BAS model bas and this file can subsequently be used for the SIMPLEX START BASIS INPUT command Note however that both BASIS INPUT and OUTPUT BASIS can co exist is the same run and that OUTPUT BASIS may overwrite the previous input file To overcome this problem the user should copy the file between runs or rename the file and use a BASIS FILE NAME command as described in Section 3 6 Back to Chapter contents 3 6 Input and Output Files in FortMP For the convenience of UNIX and other operating systems which distinguish lowercase letters from uppercase FortMP uses lowercase lettering for all default filenames and extensions in the system We will follow this convention in this section As already explained the MPS format data is presented to the program on a file named model mps where model is the name of the data model You can specify the name of the model with the following SPECS command MODEL NAME mdilname where mdlIname is a name of 8 characters or less that must be acceptable as a file name to the operating system after the addition of an extension The default for mdlname is model This convention is followed for all other inputs and outputs including the internal files with the exception of the SPECS file which is named simp
29. difficult problems They should not be employed by the end user without expert advice PUSH CALSOL FREQUENCY n Default 10 PUSH IGNORE THRESHOLD n Default 1 0e 4 DUAL CRASH PUSH lt ON OFF gt Default OFF These commands refer to experimental BASREC procedures which are present in the code for tuning difficult problems They should not be employed by the end user without expert advice Back to Chapter contents B 19 FortMP Appendices B2 13 Log level and frequency Command Manual ref PRIMAL LOG FREQUENCY simplex log frequency SIMPLEX LOG LEVEL primal log level INVERT LOG LEVEL IPM LOG LEVEL MIP LOG LEVEL NODE LOG FREQUENCY MIP SIMPLEX LOG LEVEL mip ssx log level n PRESOLVE LOG LEVEL Default value Lowest value Highest value aa aa PUSH LOG LEVEL LOG DISPLAY LEVEL LOG DISPLAY ONLY The following commands are also available B 20 Se Appendix B SPECS Commands MIP SIMPLEX LOG LEVEL n Default 0 mip ssx log level n Default 0 During MIP the standard logs of PRIMAL DUAL and INVERT are switched off by resetting the level to zero However this can be countermanded with MIP lt SIMPLEX SSX gt LOG LEVEL n giving a level which then applies to all three algorithms LOG DISPLAY LEVEL n Default 1 This command is used to restrict or expand the display of logged messages to any level The command does not change the level of messages that are issued
30. number of the sets is an INTEGER type array of size NSET This array holds the first column number in the set is an INTEGER type array of size NSET This array holds the last column number of the set In the tables which transfer output values back to the user both logical and structural variables are represented in this order plus in addition one extra position for the objective function at the beginning Table size is therefore 1 MR NC where Vil 11 FortMP Part 3 Position 1 refers to the objective Positions 2 to 1 MR refer to logicals Positions 2 MR to 1 MR NC refer to structurals The tables are VCSOL is a DOUBLE PRECISION type array of size 1 MR NC This array holds the primal solution values BSTAT is an INTEGER array of size I MR NC This array holds a code value for the basis status of each variable in the final solution Codes are CODE MEANING 0 basic variable 1 Variable is at its lower bound 1 Variable is at its upper bound BSTAT may also be an INPUT argument see note 5 of 7 2 4 below RSCOS is a DOUBLE PRECISION type array of size 1 MR NC This array holds the dual solution values that is shadow prices and reduced costs In addition the following scalars are output STSL is an INTEGER type variable holding solution status as already specified above in 7 1 2 TCTN is an INTEGER type variable also an INPUT argument holding the terminate criterion A value zero indica
31. 0 4 default is 1 This section is reduced to summarise only the commands described in chapter 4 Reference is made to 3 8 for the previous summary and to appendix B for the complete list Chapter 5 The Interior Point Method The existing section 5 2 4 is deleted and replaced by the new section 5 2 4 described below 5 2 1 Using the Algorithms The default for IPM RELATIVE EPSILON is changed to 1 0e 9 5 2 3 Choice of Solution Algorithm for the Equations The default for TPM SOLVER is changed to XSUPERNODE Also the following new command is described IPM TOFIX v 5 2 4 Refinement by Conjugate Gradient Iterations Describes how CG iterations are used to improve the accuracy of each iteration The following controls are specified CHOLESKY CG TOLERANCE v CHOLESKY ERROR TOLERANCE v MAXIMUM CG ITERATIONS n 5 2 5 IPM Save and Restart Iteration Limit Default SAVE frequency is increased 5 2 6 IPM SSX Crossover Options BASREC The following new command is described DUAL PUSH lt ON OFF gt 5 2 7 Miscellaneous IPM Commands The following new commands are described PUSH LOG FREQUENCY n PUSH LOG LEVEL n Save files model a b c d are described for graphical output display This section is reduced to summarise only the commands described in chapter 5 Reference is made to 3 8 for the previous summary and to appendix B for the complete list Chapter 6 Mixed Integer Programming MIP This chapter has been extens
32. 1 where RGAP is the relative duality gap DGAP is the actual duality gap difference between primal and dual objective values DOBJ is the dual objective value The value of feasibility epsilon specifies the feasibility tolerance used in testing the equations The coarser the values specified the earlier the termination However the solution may become rather inaccurate The defaults given have been found achievable without special difficulties in most cases Back to Chapter contents 5 2 2 Control and Choice of the Starting Point Methods In the barrier algorithm a single standard starting point method is always used This is the so called Big M procedure for choosing a starting point described in Section 5 1 5 to satisfy the primal equations The Big M value to be used is controlled by the user with the parameter WEIGHT which is a simple multiplier in the formula WEIGHT can be set by the user with the SPECS command PM BIGM WEIGHT value where value is the value to be used The default value is 0 1 and recommended values are from 0 1 to 10 0 Larger values result in greater numerical stability but also lead to increased number of iterations In the affine and predictor corrector algorithms one of three starting point methods can be used as follows 1 A standard procedure seeks to minimize the infeasibility in the primal equations 2 A simplified procedure has a separate treatment for upper bou
33. 1 2 Parameter specifications The following three parameters appear as arguments in the library subroutine calls SPID SPECS identity This is a CHARACTER 8 variable or constant which selects a part of the SPECS file so that different SPECS commands may be provided for different calls to the FortMP sub system Sections of the SPECS file are delimited with BEGIN END commands and the identity of a section is named on the BEGIN line as follows BEGIN identity where the default identity is blank if omitted The following special values for SPID should be noted NOSPECS Defaults all commands without any reference to the SPECS file Blank Always selects the first section on the SPECS file even if the BEGIN identity is non blank SPID is an argument to the INITAL subroutine STSL Status of the solution This is an INTEGER variable output from the solver routines DUAL PRIMAL IPMCTL and MIPCTL which give the status of the solution obtained Standard values are STSL 0 No solution has been obtained STSL 1 The problem is infeasible STSL 2 The problem is unbounded STSL 3 The optimum solution has been obtained STSL 4 An integer solution has been obtained STSL 5 The optimum integer solution has been obtained TCTN Terminate criterion This is an INTEGER variable output from all subroutines with the exception of FINIAL It states whether the calculation can continue or whether a fatal error took place and the run is aborte
34. 10 11 20 21 30 Column Column Integer index index Value where fields 1 and 2 specify start and end column and field 3 specifies the priority class or FIX value as before The numerical data must be entered with right justification this is because any trailing blanks in a field are treated as zeros The associated SPECS commands are MIP LIST INPUT ON default MIP LIST OUTPUT ON default MIP LIST OUTPUT ALL OFF OFF cr Tt OFF may also be used These commands have the same meaning as the corresponding AGENDA commands A LIST agenda file must have the following name modname agl where modname is the model name in use for the run VI 29 FortMP Part 2 6 7 Advanced Algorithms for MIP 6 7 1 Recent advances Recently there have been considerable improvements to MIP solution procedures through the use of features such as Pre processing and Cut generation The aim of these techniques is to determine additional constraints that must be satisfied by any integer solution but are not satisfied by the optimum solution to the relaxed LP or by the optimum solution to an intermediate sub problem of the Branch and Bound tree having partial LP relaxation If such a constraint is added to the relaxed LP at the root node the effect may well be to degrade its optimum objective value and thus reduce the gap between that and the integer optimum with evident beneficial effect on the search procedure The
35. 26 29 32 32 33 FortMP Appendices A1 MPS form data layouts A1 1 MPS Layout for LP and MIP problem data In MPS format the data is divided into five sections as follows ROWS To specify the name and type of each constraint row in the problem This includes the objective row to be minimised or maximised COLUMNS To specify the name of each variable and give the associated constraint and objective coefficients only non zeros need be entered To specify a name for the right hand side and give the RHS values RANGES To specify a name for any range set and give RHS range values If there are no RHS ranges in the data then this section is omitted BOUNDS To specify a name for any bound set and give the lower and upper bounds of the variables The BOUNDS section is also used to specify binary and integer variables for MIP If there are no bounds in the data then this section is omitted These five sections appear in this order in the input data each section headed by an indicator record which consists of section name beginning in position 1 The data file begins with a NAME record and ends with an ENDATA record so that the complete layout is as follows NAME record ROWS header record ROWS data section COLUMNS header record COLUMNS data section RHS header record RHS data section RANGES header record RANGES data section BOUNDS header record BOUNDS data section ENDATA record
36. Back to Chapter contents 3 5 3 BASIS Input and Output There is a mechanism whereby the user can supply an initial basis in MPS format using the external names for the variables In this format the input basis data comprises NAME record BASIS header record optional BASIS data section ENDATA record The BASIS data section has records of type XL XU LL and UL The rationale behind this is that each record of type XL or XU gives an exchange between a column variable structural which becomes basic and a row variable logical which becomes non basic Initially all row variables are basic and all column variables are non basic at lower bound The UL and LL records simply name non basic columns and only UL records actually need to be entered An external basis is intended for use even when the input problem has been revised so that a variety of inconsistencies in MPS format basis data are allowed For example if a name is not recognised then a warning message is given on the log but the system carries on by simply ignoring that record Precise details of the layout are given in Appendix A section A1 3 mT 1A The following SPECS command already introduced in Section 3 3 2 is used to input the external basis and set it up as the starting basis for PRIMAL or DUAL SIMPLEX START INPUT BASIS There is a SPECS command to create an output MPS format basis when the LP optimum is reached after completing the SSX algorithm
37. For type Plus code 1 the upper bound is ignored whatever its value A system constant with the value 10 is used to check for finite bound values 10 for the single precision version Type coding and bounds supplied must also be consistent with the MIP data types if non zero 5 Whenever the user supplies new row bounds to the system the associated row type coding must be consistent A finite upper RHS must be present for all type codes other than Free code 4 Lower and upper RHS must be equal for type Equal code 3 Finite lower and upper RHS must be present for type Ranged code 2 with upper RHS value greater than lower RHS value For type LE code 1 the lower RHS is ignored whatever its value A system constant with the value 10 is used to check for finite RHS values 10 for the single precision version 6 The deletion of a row or column can be accomplished in effect by using CHGRTP or CHGCTP To delete a row give type Free code 4 To delete a column give type Fixed code 3 with associated lower and upper bound values both equal It is not possible to delete any row or column physically from the data 7 The solution access utilities GETSOL and GETDSL and the updated tableau utilities GTABLC and GTABLR must execute in ALGORITHM mode and not in PROBLEM CHANGE mode This is because they require use of the ETA file which in general is not valid during problem cha
38. INPMP1 and IBSMP1 become output type arguments of MPIINP In addition the following argument SPID SPECS identity up to 8 characters enables the user to select a specific section of the SPECS file to control the input process The actions of MPIINP are as follows Call INITAL to initialise and read the SPECS commands Call INPUT to read the problem data and store it internally Call one of the basis start up routines INPBAS BBASIN CRASH or UNIBAS as indicated by the SPECS The default is UNIBAS unit all logical basis Transfer the data now stored internally to the layout of the external interface and return it via the arguments to the user Subroutine MPIINP is coded in the same module as SUBMPI and the user is provided with documented source code Back to Chapter contents 7 3 2 Access to row names and column names The INPUT subroutine of FortMP is the means whereby row and column names are entered and become known to the system Since the external interface itself does not provide any communication of names the user access to names is based on the use of INPUT or rather on the use of MP1INP which calls INPUT VI 18 Chapter 7 FortMP Subroutine Library and External Data Interface The following SPECS command is to be used INPUT SAVE NAMES ON default OFF OFF may also be given When this feature is ON the system takes steps to ensure that not only the names themselves but also the associated look up tables
39. Input arguments are MROW NCOL IROW TCTN Output arguments are TROW MROW NCOL TCTN Back to Chapter contents 8 3 7 Some Notes on the Specifications 1 In several of the utilities the user must supply MROW or NCOL as an input argument in order to give the dimension size of certain argument tables Actually the system already knows the values of MROW and NCOL and this is required only because of restrictions in FORTRAN 77 The system checks to see that user has provided correct values and will return an error TCTN gt 0 if not 2 For variables given as MINUS type in external data for example by code MI in the MPS form bounds section the quoted upper bound is negated together with the matrix column and presented as lower bound in the DISERV utilities Type code is 1 3 The one sided RHS value supplied externally for example in the RHS section of MPS form data is communicated in the upper RHS value after negating together with the matrix row if the original row type was GE Both GE type and LE type rows become type coded as 1 4 Whenever the user supplies new variable bounds to the system the associated type coding must be consistent A finite lower bound must be present for all type codes other than Free code 4 Lower and upper bounds must be equal for type Fixed code 3 Finite lower and upper bounds must be present for type Bounded code 2 with upper bound value greater than lower bound value
40. LISF ENDED VARIABLE TYPES PLUS BNDD IF IDK FREE LOGICALS REMOVED FROM BASIS il 2 i 0 STRUCTURALS ENTERED IN BASIS 3 al 0 0 CRASH ART ENDED TP ASS ES 0 ARTIFICIALS ORE VOTED SOU TIME TAKEN FOR CRASHING O07 SHS TOTAL 50 FAR 0 85 SHCS Advanced Starting Bases Listing 1 Logged output from the CRASH This shows that the LTSF stage exchanged four logical variables in the initial UNIT basis for four structurals and in the ART stage no further exchanges were made A higher log level can be set with command SIMPLEX LOG LEVEL 3 and this will cause every individual exchange to be listed Back to Chapter contents FortMP Manual CRASH supplement 10 3 Crossover Algorithms Purify and Basis Recovery 10 3 1 Introduction to Crossover Both CRASH procedures and CROSSOVER procedures aim to produce an advanced starting basis so as to shorten the work needed by an SSX solver algorithm Primal or Dual In the case of CROSSOVER as opposed to CRASH there exists an initial solution either provided by the user or obtained by other means and this solution is employed in a way to ensure that none of the work done in pre solving is lost For example consider the case of IPM This algorithm provides a solution that is both feasible and optimal to a certain degree of tolerance but is not basic which means that it cannot be used for further analysis or for integer programming In the Crossover w
41. MAXIMUM errors have occurred Back to Chapter contents B2 3 Choice of main algorithm Command Manual Lowest Highest Default ref value value value einai eter ALGORITHM DUAL O OFF 1 1 DUAL dual lt on off gt d f1t OFF ALGORITHM IPM O OFF L IPM ipm lt on off gt daflt OFF IPM SCALE lt ON OFF gt Below O OFF 1 ON ON B 7 FortMP Appendices The following command IPM SCALE lt ON OFF gt Default ON controls scaling when the IPM algorithm is selected Back to Chapter contents B2 4 Maximum limits Command Manual Lowest Highest Default ref value value value MAXIMUM SIMPLEX ITERATIONS n maximum primal iterations n ITERATIONS INTEGER SOLUTIONS INTSOL n 50000 0 RE 5000 5000 0 10000 6 8 3 AROUND INTEGER SOLUTIONS AROUND INTSOL k MAXIMUM AROUND NODES n PRE maximum AROUND subproblems MAXIMUM AROUND TIME v MAXIMUM MIP SPACE n Back to Chapter contents a i Bes dL Pee MAXIMUM NODES n 134 1 50000 maximum mip subproblems ola i i a Ea ee B 8 Appendix B SPECS Commands B 9 FortMP Appendices B2 5 Save and restart commands Command Manual Lowest Highest Default ref value value value SIMPLEX SAVE FREQUENCY IPM SAVE FREQUENCY MIP SAVE FREQUENCY INPUT RESTART lt ON OFF gt input mps skip SIMPLEX START RESTART bbasis input lt on off gt bbasis lt on off gt IPM RESTART lt ON OFF gt BASREC RESTART lt ON OF
42. Mixed Integer Programming MIP 6 11 Summary of MIP SPECS Commands The following SPECS commands have been introduced in this chapter INPUT INTORG UPPER BOUND n default n is infinite INPUT INTORG BOUND n default n is infinite Assigns a default upper bound to integer variables outlined by INTORG INTEND markers If n 1 the variables are binary See section 6 3 3 MIP VARCHOICE n Default n 1 Controls the choice of branching variable or SOS at each node Values are Select closest to integer value Select farthest from integer value Not in use invalid Select variable with highest cost Select on basis of absolute cost PPPPSB 5 Il NB WN See section 6 5 2 MIP FNODECHOICE n Default MIP SNODECHOICE n Default cr CT Controls choice of node to be developed during the each phase of MIP F choice is used prior to the first integer solution S choice thereafter Possible choices are Last in first out First in first out Choose minimum deterioration in the objective Choose minimum percentage error Choose node with fewest non discrete values Choose node with minimum sum of fractions Choose according to best projection criterion PPrPpB SPP SB Wow ow ou ue ul ANDO FBWN KR See section 6 5 2 MIP PRIORITY UP ON default OFF MIP PRIORITY UP OFF ON invokes UP priority node selection See section 6 5 3
43. PL meaning a continuous variable with upper bound plus infinity and lower bound zero This is modified by bounds data as follows Type code Bound description ee Upper bound value is given in field 4 i Lower bound value is given in field 4 Fixed value upper and lower bound both equal and given in field 4 A 6 Appendix A Input Output Data Layouts Free variable upper bound plus infinity and lower bound minus infinity Plus type this is allowed but redundant Minus type lower bound minus infinity Binary variable Only legal values are zero and one Integer variable with upper bound given by the value in field 4 Integer variable with lower bound given by the value in field 4 SC Semi continuous variable Either zero or lies in the range from 1 0 to the value given in field 4 A variable may require two records to specify it in full and the possible combinations allowed for the same variable are Lan Ul The user may provide for alternative problems in one data file by including multiple BOUND sets By default the system selects only the first BOUND set and ignores the remainder BOUND set names have the same description and values are entered in the same way as given above All the data for any one BOUND set must be collected together and appear on consecutive records The order of columns within a BOUND set is insignificant however the same column should not appear more than once except in one of the legal
44. RHS set RANGE set Bound set and Problem names which remain of maximum length 8 characters If long names apply then the form of input layout used is free format there is no fixed layout for long name input Therefore the rules given above in section A2 1 for free format input necessarily apply Back to Chapter contents A 25 FortMP Appendices A3 Tabular Layouts MG RW interface A3 1 Tabular input layout Tabular input is an alternative to the normal MPS form of input layout in which the rows and columns are not identified by name but rather by index This layout is invoked with the SPECS command INPUT TYPE MG Problem data is presented on the standard input channel file name model mps in a FORTRAN formatted file which is described below The data is essentially the same as for the internally callable interface see chapter 6 section 6 2 In this description the names used are those of section 6 2 3 which gives a more detailed description Data is organised in sections as follows Header section Coefficient section Columns section Rows section Special ordered set section Each section is described below Input Header Section The header section comprises two records as follows Record 1 holds the problem name PNAME in positions 1 to 8 Record 2 holds the following Number of columns structural variables Number of rows logical variables NAIJ Number of non zero coefficients in t
45. Running Out of Memory There are few computer installations where users can completely disregard the amount of memory they use even with virtual memory available Many users will attempt the largest possible problems with the memory available whilst others will wish to limit their memory usage for operational reasons In order to supprt these requirements FortMP is loaded for execution in a minimum size memory region and will use the system to allocate additional memory according to the problem size However in some rare cases the required memory is impossible to predict while in other cases too little memory can cause serious congestion and inefficiency because of frequent data compression Hence Tr n the system is provided with several emergency controls to assist with memory management These are described in Appendix G Back to Chapter contents 3 7 5 Software Errors The user is protected by a great deal of defensive programming so as to detect internal inconsistencies and halt as soon as they occur In such a case there is an explanatory diagnostic and a FATAL ERROR message written to the log and to the standard output display In this unlikely event you should contact your supplier and provide details so that the fault can be corrected Back to Chapter contents mT AY 3 8 Summary of SPECS Commands The following SPECS commands have been introduced to date in this manual BEGIN This must be the first command line
46. SAVE NAMES OFF ON specifies that names and name look up tables are to be saved and re loaded as the final operation of MP1INP SUBMP1 or FORTMP To manage the objective constant term see section 7 3 6 OBJECTIVE OFFSET ON default OFF OBJECTIVE OFFSET OFF ON indicates that the objective constant term is not zeroed by the input of the external interface subroutines SUBMP1 or INPMP1 To manage the log see section 7 5 1 LOG CHANNEL n x default internal This command assigns a channel number to the log file and indicates that it is already opened by the user and is not to be closed VI 33 Contents 8 Internal Data Interfacing Service Utilities 8 INTERNAL DATA INTERFACING SERVICE UTILITIES 8 1 Introduction to the Internal Data Interfacing Service Utilities 8 1 1 8 1 2 8 1 3 8 1 4 8 1 5 8 1 6 Objectives Data Description Description of the Utilities How to Use the Utilities Operating Modes Necessary Preparation and Provision for Matrix Expansion Single and Double precision versions of FortMP 8 2 The Facilities Available 8 2 1 8 2 2 8 2 3 8 2 4 8 2 5 General Facilities Matrix Facilities RIM Facilities Solution Facilities Tableau Facilities 8 3 Specifications 8 3 1 8 3 2 8 3 3 8 3 4 8 3 5 8 3 6 8 3 7 Arguments General Utility Specifications Matrix Utility Specifications RIM Utility Specifications Solution Utility Specifications Tableau Utility Speci
47. SCALE and or PRESOLVE if these were used and must repeat the setting of the IPM PREFIX switch A normal rule to follow would be to repeat all the previous controls exactly and simply add the necessary RESTART commands Back to Chapter contents 5 2 6 IPM SSX Crossover Option BASREC The user has the option either to terminate immediately after IPM or to develop the IPM solution into a basic solution with the BASREC procedure This recovered basis then forms an advanced starting basis for the SSX procedure it is usually near optimal anyway The option is exercised via the IPM BASREC switch as follows IPM BASREC ON IPM BASREC OFF The default is ON When the switch is set OFF the system writes the IPM solution to the output unless OUTPUT is cancelled with the OUTPUT OFF switch The BASREC algorithm itself comprises primal and dual PUSH iterations preceded by a CRASH to set up a starting basis Normal CRASH controls apply here and in addition the user can avoid use of dual PUSH with the following command DUAL PUSH OFF Default is ON ON may also be specified It is not recommended to use OFF here because the final basis must be corrected with the PRIMAL algorithm which can take many more iterations Dual PUSH iterations are slower but limited in number The following command may be used to restart BASREC from the IPM solution of a previous run BASREC RESTART ON BASREC RESTART OFF the switch bein
48. algorithms INPUT SCALE CRASH etc the system is in algorithm mode To change from there the user executes a utility BEGCHG begin change to switch into problem change mode and enable all the access and changing utilities Once these are completed the user executes a utility ENDCHG end change to perform necessary housekeeping and enable all the algorithms to execute Back to Chapter contents 8 1 5 Necessary Preparation and Provision for Matrix Expansion New rows and columns cannot physically be added to the data structure Instead the system provides a feature to make advance provision in the form of inactive dormant rows and columns The following SPECS commands are used MAXIMUM EXTRA ROWS nnn MAXIMUM SPARE ROWSPACE nnn MAXIMUM EXTRA COLUMNS nnn MAXIMUM SPARE COLSPACE nnn Spare ROWSPACE and COLSPACE is provided when the matrix is initially built by leaving the former number of positions unused at the end of each column spare rowspace and leaving the latter number of positions unused at the end of the whole matrix spare colspace Any update which causes the spare capacity to overflow will be rejected by the system and will cause a fatal error Back to Chapter contents 8 1 6 Single and Double precision versions of FortMP With release 2 of FortMP there is a change from single precision to double precision for storing all problem data internally in order to give mo
49. are all zero This is guaranteed by a suitable choice of starting point so that the barrier algorithm has a starting point method of its own different from the affine and predictor corrector algorithms As before the quadratic terms have been dropped in the 4th and 5th equations Predictor Corrector Algorithm The predictor corrector algorithm computes the direction of change the A twice For the first computation the same equations are used as for the Affine algorithm This gives the predictor direction which may be denoted Ax 7 A87 Ay Az Aw When this is substituted in the original and subtracted from the equations above we get the following equations for the corrector direction Yia Ax 0 fori 1 2 m Ax As 0 forj 1 2 n a Ay 4z Aw 0 forj 1 2 n z Ax x Az p Ax Az forj 1 2 n wjAs s Aw p As Aw for j 1 2 n u is calculated after taking the full affine step on an experimental basis Then when the corrector direction has been calculated the predictor and corrector directions are added and a fresh departure is made from the original point using the composite direction Fortunately these new equations do not require a new factorisation so that the extra time involved is relatively modest and the improvement in number of iterations will usually compensate for the extra calculations The user is recommended for the most part to employ the predictor corrector algor
50. basis quickly may improve the overall solution time Such a procedure may be termed CRASH There are two kinds of CRASH first the direct kind that starts from the unit basis and performs rapid basis exchanges without the usual Simplex paraphernalia These methods are described below in section 10 2 Then there is the indirect kind which requires that an initial set of solution values be obtained With this solution to start from an iterative procedure is used to generate a basic solution without either increasing the infeasibility or degrading the objective value The better the initial solution the better is the overall effect in crashing Iterating to obtain a basic solution is referred to variously as CROSSOVER BASREC or sometimes PUSH The method is described in section 10 3 below In a sense we may consider IPM followed by BASREC to be a highly advanced form of CRASH particularly as the final solving with Simplex is usually completed without further iterations Most of the time is spent in the IPM algorithm FortMP also includes a supplemental version that applies SUCCESSIVE OVER RELAXATION SOR to develop a set of solution values and then by using the CROSSOVER technique creates a starting basis This is termed CRASH SOR and is described below in section 10 4 SOR is not so effective as IPM for large problems but nevertheless can produce an improvement over other methods in certain cases Back to Chapter contents FortMP Ma
51. basrec crash ORO FORREST TOMLIN ACTIVATED PRIMAL PUSH ENDED AT ITER WIZ PUsisl COUNT 10 xx Elapsed time in primal push 01O DUAL C PUSH ENDED 56 Exchanges 3 Push steps nies Tike serel ialuiS aliol Cer anism CORO DUAL PUSH ENDED AT ITER ils PUSH COUNT 0 xxx Hilapsed time in dual push 0 01 FEASIBLE BASIS REACHED AFTER ITERATION MES Hinweime ichemeincls IROLI SSO kis Suminf 0 00000 ITER 120 STATUS 3 OPTIMUM SOLUTION FOUND 5501185 ITER ILZO TIME TAKEN FOR BASREC O27 SECS TOTAL SO FAR 3 79 STOS Listing 2 Logged output from the CROSSOVER It comprises Two lines relating to direct push steps that can be made immediately without any change of basis using the UNIT basis to start off CRASH log a normal CRASH LTSF log followed by CRASH ART details the CRASH ART summary and total CRASH time X 9 Advanced Starting Bases Primal Push log in this case 122 steps of which 112 involved basis exchange and 10 were simple solution updates Dual Crash Push log 59 steps of which 56 involved basis exchange implied only there is no Eta file update Dual Push log After re invert a further 6 steps all requiring basis exchange Primal log Final optimisation and completion of the basis recovery Back to Chapter contents 10 4 Iterative Crash Algorithm 10 4 1 Introduction to CRASH SOR SOR is an iterative procedure designed to produce a good starting primal solution Its paramet
52. be improved in this way SCALE OFF SCALE is an algorithm that applies factors to the rows and columns of the constraint matrix in order to reduce the extremes of variation in the values of coefficients which may cause numerical difficulties in solution algorithms ALGORITHM IPM The IPM algorithm will almost always be found useful for the larger problems 1000 rows or more However it may still require a good understanding for setting the controls in the most efficient way depending on the problem structure and the user is referred to Chapter 5 of this manual IPM BASREC OFF If IPM is used and is successful then the solution obtained is employed in a crossover procedure termed BASREC basis recovery for the final optimisation since IPM itself does not provide a basic solution to the original problem This can be stopped and the IPM solution printed as the final solution with the command IPM BASREC OFF ALGORITHM PRIMAL ALGORITHM DUAL If IPM is not used then PRIMAL is the normal solution algorithm The DUAL algorithm is employed normally to solve the subproblems created in the Branch and Bound algorithm for MIP in an MIP problem the LP solution is obtained as a first step before Branch and Bound is called DUAL can also be used as an alternative to PRIMAL for the LP solution Problems that are DUAL feasible or that have a large number of rows in proportion to the number of columns benefit fr
53. be non zero Special Ordered Sets type 2 SOS2 An SOS2 is a consecutive subset of variables in the problem of which at most two can be non zero and when non zero these two variables must be adjacent Semi continuous variables A semi continuous variable may take the value zero or lie in the range lt x lt u where l and u are both positive The general statement of the Convex QP problem is similar to that of the general LP problem with the following change permitting the objective to be a quadratic function Minimize DC Xj F KELQjk Xj Xk Maximize EC yn Ry BLE ips Xj Xk Summed for j and k over the range 1 to n where the q are elements of a symmetric matrix Q having n rows and columns that is either positive definite or positive semi definite The QP solver is also capable of solving problems having binary variables by applying a simplified form of Branch and Bound Back to Chapter contents 1 8 References 1 MITRA G Theory and Application of Mathematical Programming Academic Press 1976 2 ORCHARD HAYES W Advanced Linear Programming Computing Techniques McGraw Hill 1968 3 BEALE EML Mathematical Programming in Practice Pitman 1968 4 MPSX Mathematical Programming System Extended MPSX program number 5734 XM4 IBM Trade Corporation New York 1971 5 MITRA G Investigation of some Branch and Bound Strategies for the Solution of Mixed Integer Linear Programs Mathematic
54. be possible FortMP requires that either 1 Q is positive definite and so can be Cholesky factored or 2 The matrix F is supplied instead of Q Back to Chapter contents 9 1 3 Mixed Integer QP with Binary Variables By using Branch and Bound we may extend the QP problem statement to include models where some elements of vector x are constrained to be binary variables 0 or x 1 At present the only discrete constraints handled by FortMP QP are binary variables Other discrete constraint types may be added in a future release and in any case it is usually possible to model such constraints entirely with binary variables suitably chosen The general Branch and Bound mechanism has been described in chapter 6 A simplified version is used for Mixed Integer QP MIQP which is described below in section 9 5 Back to Chapter contents 9 2 IPM Solution Procedure 9 2 1 Formulation The IPM solution procedure is a modification of the predictor corrector IPM solution for LP see Chapter 5 Each IPM iteration considers an interior point to be a set of fixed values and looks for a set of changes or search directions Ax changes to the x for j 1 2 n As changes to the s forj 1 2 n Ay changes to the y for j 1 2 m Az changes to the z for j 1 2 n Aw changes to the w for j 1 2 n These search directions define a new interior point x QAx s 0As y O0Ay z 0Az w 0Aw
55. coefficients in matrix row IROW and replaces them by an alternative set supplied in the areas RVTAB and JCTAB Input arguments are NRNZ IROW RVTAB NRNZ JCTAB NRNZ TCTN Output arguments are TCTN CALL CHGAIJ This changes the A matrix element on row IROW column JCOL to the value AVAL This may add change or by setting AVAL 0 0 delete the element Input arguments are IROW JCOL AVAL TCTN Output arguments are TCTN ROW JCOL AVAL TCTN CALL CHGOBJ NCOL OBJTAB TCTN This deletes the existing cost coefficients on the objective row and replaces them by an alternative set supplied by the user in table OBJTAB only non zero elements are used Input arguments are NCOL OBJTAB NCOL TCTN Output arguments are TCTN Back to Chapter contents 8 3 4 RIM Utility Specifications RIM utility subroutine specifications are as follows CALL GETRIM MROW NCOL LOTAB UPTAB TPTAB MITTAB TCTN Retrieves all the three RIM vectors Lower bounds upper bounds and variable types and places them in user supplied areas LOTAB UPTAB and TPTAB See notes 2 and 3 in Section 8 3 7 below Input arguments are MROW NCOL TCTN Output arguments are LOTAB MROW NCOL UPTAB MROW NCOL TPTAB MROW NCOL MITTAB NCOL TCTN CALL GETCTP JCOL LOV UPV CTP MIT TCTN This retrieves the lower bound upper bound and variable type of a single column and places them in cells LOV UPV and C
56. combinations given above A 7 FortMP Appendices NAME record The NAME record at the beginning of the data file has the following layout 15 22 field 3 Problem name which may comprise any characters ENDATA record The ENDATA record at the end of the data file has the following layout The proformas given on the following pages are intended as a convenience for the user to copy and use as data entry forms A 8 Appendix A Input Output Data Layouts ROWS proforma A 9 FortMP Appendices Field 1 Row type LE Less than or Equal GE Greater than or Equal EQ Equal N Non binding objective Field 2 Row name Appendix A Input Output Data Layouts COLUMNS proforma A 11 FortMP Appendices Field 2 Column name Field 3 Row name Field 4 Value Field 5 Row name Field 6 Value Appendix A Input Output Data Layouts RHS proforma A 13 FortMP Appendices Field 2 RHS set name Field 3 Row name Field 4 Value Field 5 Row name Field 6 Value Appendix A Input Output Data Layouts RANGES proforma A 15 FortMP Appendices Field 2 RANGE set name Field 3 Row name Field 4 Value Field 5 Row name Field 6 Value Appendix A Input Output Data Layouts BOUNDS proforma Field 1 Field 2 Field 3 Field 4 Field 5 Field 6 2 3 5 12 15 22 26 36 40 47 50 61 Field 1 Bound type code LO Lower bound UP Upper bound FX Fixed value FR Free variable MI Minus
57. commands then the gap size used will be the smaller of the two CUTOFF TOLERANCE becomes relevant once an integer solution has been found From there on a maximum gap is determined by the Best Integer Solution found so far the BIS and this gap is simply the difference between the BIS and the RLP optimum User can modify the gap by applying a tolerance which reduces the gap thereby reducing search time This may prevent the genuine Optimum Integer Solution from being found but ensures that the eventual BIS differs from the optimum by no more than the tolerance Cutoff Tolerance can be controlled with the following SPECS commands MIP CUTOFF TOLERANCE v default v 1 0e 12 MIP CUTOFF RELATIVE v default v 0 0 MIP CUTOFF RELISOL v default v 0 0 Here CUTOFF TOLERANCE specifies the actual amount of gap reduction CUTOFF RELATIVE specifies the reduction as a fraction of the gap itself so that a large reduction will be applied for poor solutions and the reduction will get less progressively as the BIS improves CUTOFF RELISOL specifies the reduction as a fraction of the BIS value Note that when the reduced gap becomes zero or negative the tree search is immediately concluded Back to Chapter contents 6 8 3 Placing Limits on the Tree Search The SPECS commands given below limit the total extent of the tree search When the limit is exceeded there is a SAVE made of the tree unless SAVEs are cancelled an
58. field 5 and when SOSORG is placed in field 5 the REF row data is placed in field 4 Blank fields should be left blank but may contain unused material The Label field is intended for the user to attach a name or label to a set For this purpose the END marker should have the same label as its corresponding ORG marker However this is quite optional SOS type in Field 1 is described below Back to Chapter contents VI 13 FortMP Part 2 6 3 3 Defining Integer and Binary Variables with Markers INTORG and INTEND markers define a list of consecutively sequenced binary or integer variables The integer bounds may be defined with LO and UP records in the BOUNDS section of the data and the system distinguishes binary variables as those with a bound range zero to one If no records in the BOUNDS section are provided for one or more of the variables outlined by INTORG and INTEND then these variables receive a default bound specification LO value zero UP value infinite Thus they become simple non negative variables restricted to integer values in any feasible solution The default bound can be changed with the following alternative SPECS commands INPUT INTORG UPPER BOUND n default infinity INPUT INTORG BOUND n default infinity which in effect supplies an implicit UP record in the BOUNDS section By setting n 1 with the command INPUT INTORG BOUND 1 the default specification becomes binary BV r
59. for each iteration This growth of the ETAs requires that INVERT be repeated periodically to reduce the storage used INVERT also reduces the volume of calculation and improves accuracy Back to Chapter contents 3 1 3 Interior Point Method IPM When and When Not to Use IPM is an entirely different approach from SSX which does not proceed via a progression of basic solutions Instead it proceeds via a progression of interior points an interior point being a set of values that satisfy the bounds and ranges but are not necessarily feasible in the sense of satisfying the equations One iterative step proceeds by choosing a direction a set of changes to apply to the variable values and going a certain distance in that direction without causing any bound or range to be violated so that the point remains interior The direction is chosen in such a way as to ensure that the total infeasibility is reduced and that there is progress towards an optimal objective value In most industrial optimisation problems the optimum solution is by no means unique The optimum solution obtained by IPM usually differs from one obtained by SSX in not being a basic solution Only in rare text book examples does the IPM optimum have exactly M variables with intermediate values between lower and upper bound This is a disadvantage to many users because a non basic solution cannot be used for analysis nor can it provide an advanced basis f
60. for faster command entry 23 7 4 2 Once off entry of SPECS commands 23 7 4 3 Default initialisation 23 7 4 4 Common Sections in the SPECS file 24 7 5 How to Avoid Miscellaneous I O 25 7 5 1 Log channel 25 7 5 2 Controlling the log 25 133 Avoiding the use of SAVE files 26 7 6 MPS form Output 27 7 7 Summary of callable library external data interface and associated commands 28 7 7 1 Summary of the callable library 28 7 1 2 Summary of arguments and parameters 31 71 1 3 Summary of relevant SPECS commands 33 Vil 1 FortMP Part 3 7 1 Using FortMP as a sub system to solve linear problems 7 1 1 Incorporating FortMP as a sub system The main program of the FortMP system is a module named FORTMP and has been included for the users in source form so that they can adapt it to their own ends One simple idea is to make it into a subroutine without arguments so that it can be called with the following program statement CALL FORTMP This will now carry out exactly the function of the stand alone FortMP system each time that the CALL is executed The users build a complete program for execution by combining their own programming together with the modified FORTMP module and the rest of the FortMP callable library This simple procedure will not however suit many users A more powerful use can be made of subroutine FORTMP if its composition is studied It can then be re organised with other user procedures interpolated The study will b
61. form Free form 2 5 12 Name of Ist column to be assigned 3 15 22 Name of last column to be assigned A 32 Appendix A Input Output Data Layouts The default value zero is assigned to every discrete variable before assignment begins It is permitted to overwrite one assignment with a later one in the same data section Standard agenda data is input output via disk file named modname agn where modname is the model nmae Back to Chapter contents A4 2 Listed un named agenda layout Listed agenda data employs the same overall structure as standard agenda data with the same keywords as before AGENDA FIXMIX FIXTRY PRIORITY ENDATA In addition the same default value zero is used for every assignment and assignments can be overwritten as before The data layout is fixed as follows 1 10 Index of 1st column to be assigned 11 20 Index of last column to be assigned 21 30 Integer value to assign with data right justified in each field The input output file name is as follows modname agl where modname is the model name as before Note that the use of standard agenda data causes equivalent listed form agenda to be created internally as scratch files Back to Chapter contents A 33 APPENDIX B SPECS Commands Appendix B SPECS Commands This appendix lists all the SPECS commands available in the current version V2 3 of FORTMP Those commands which have already been specified in this manual a
62. have a version specially tailored Two versions now cover the needs of virtually all users DS Double precision Short Indexing for problems with no more than 32k constraints DL Double precision Long Indexing for larger constraint size virtually unlimited Single precision versions are also available but their use is not recommended in view of the loss of accuracy Memory adaptation is now available also for parallel versions and for calling as a DLL from other systems such as MPL Standard subroutine libraries are delivered replacing separate modules Input Data Modelling A better integration with the MPL modelling system has been developed permitting direct internal communication of files and with a dialogue developed for the entry of SPECS commands Appendix D Primal Algorithm New procedures are added to facilitate research particularly in connection with parallel execution Appendices F H Dual Algorithm Dual Phase I has been added together with better control of numerical accuracy and additional SPECS controls Sections 4 4 4 6 7 Mixed Integer Programming An auto rounding heuristic feature has been developed with consequent changes to its previous description in Release 2 Section 6 8 1 Extensions have been added to the cutoff controls Section 6 8 3 Internal Specs Communication New features are now available for the subroutine library user to simplify the preparation of SPECS commands by including com
63. more details MIP PRIORITY UP ON Default OFF MIP PRIORITY UP OFF When ON is specified the first sub branch developed takes the UP direction see chapter 6 section 6 5 3 MIP BOUND v Defaul MIP CUTOFF TOLERANCE v Default high value 1 0e 12 These commands control Bound and Cutoff as described in Chapter 6 section 6 8 2 The criterion for fractional part considered as zero in a binary variable is set with the following command NTEGER TOLERANCE v Default 0 001 Sets the criterion for fractional part considered as zero in a binary variable MIP LOG LEVEL n 0 4 default 1 Sets the level for messages to the log file MIP AGENDA OUTPUT ON Default OFF MIP AGENDA OUTPUT ALL MIP INTSOL OUTPUT ON These commands control out of integer solutions Agenda output is described in Chapter 6 sections 6 6 3 and 6 6 5 Integer Solution output causes the complete set of primal solution values to be listed in the log Back to Chapter contents Contents 10 1 10 2 10 2 1 10 2 2 10 2 3 10 2 4 10 2 5 10 2 6 10 3 10 3 1 10 3 2 10 3 3 10 3 4 10 3 5 FortMP Manual CRASH supplement Chapter 10 Advanced Starting Bases Introduction Primary CRASH Algorithms Basic CRASH Procedure CRASH LTSF CRASH ART CRASH ADG User Controls Logged Output from CRASH Crossover Algorithms Purify and Basis Recovery Introdu
64. must converge to zero in the final solution Users can control this procedure by weighting the Big M value as described in Section 5 2 2 Affine and predictor corrector algorithms can employ one of three starting point methods based on a quadratic formula to maximise the distance from boundaries in the initial interior point The choice of method is described in Section 5 2 2 Back to Chapter contents 5 2 Controls on the IPM Algorithms 5 2 1 Using the Algorithms IPM is invoked in the first place with the SPECS command ALGORITHM IPM which has already been described in previous chapters The primary control for selecting an algorithm within IPM is by one of the following SPECS commands IPM ALGORITHM AFFINE IPM ALGORITHM BARRIER IPM ALGORITHM PDC where PDC is for Predictor Corrector Three general features of the algorithms are controllable The calculation of barrier parameter u The approach to a boundary when a step is made after calculating the change directions The feasibility and termination criteria The Barrier Parameter u u is determined by one of two alternative formulae at each iteration step The first is a simple formula u DGAP N where DGAP is the current duality gap and N is a value dependent on a user controllable parameter PHI and the column size N of the problem For large N greater than 5000 columns we use N PH
65. n 1 Level of output written to the log Levels O to 4 available Level 2 activates the node output log also to the screen See section 6 9 1 NODE LOG FREQUENCY 1 default n 1 Frequency of node output written to the log and displayed on screen with log level 2 or higher See section 6 9 1 MIP CLASSIFY ROWS ON default OFF MIP CLASSIFY ROWS OFF ON causes the MIP constraint classification to be carried out in full and written to the log See section 6 10 1 Back to Chapter contents VI 52 Chapter 7 FortMP Subroutine Library and External Data Interface Chapter 7 FortMP Subroutine Library and External Data Interface Contents 7 1 Using FortMP as a sub system to solve linear problems 2 7 1 1 Incorporating FortMP as a sub system 2 7 1 2 Parameter specifications 3 7 1 3 Simple FORTMP subroutine with parameters 4 7 1 4 Subroutine call library specifications 5 7 2 External Data Interface 7 7 2 1 Introduction 7 7 2 2 General description of the data interface 8 7 2 3 Argument specifications 9 7 2 4 Call specifications 12 T25 An example 14 7 3 Standard Data Input to the Interface 18 7 3 1 Calling the standard data input 18 7 3 2 Access to row names and column names 18 7 3 3 Looking up the index of a named variable 19 7 3 4 Name pattern matching 20 7 3 5 Looking up the name of an indexed variable 21 7 3 6 Managing the constant term in the objective 21 7 4 Internal SPECS Commands 23 7 4 1 The need
66. new command is described LOG DISPLAY LEVEL n and the description of LOG DISPLAY commands is clarified 3 4 4 Suppressing Output This is a new section describing how to avoid unnecessary output The following new commands are described OUTPUT lt ON OFF gt OUTPUT SUPPRESS ZERO 3 5 1 Saving and Restarting Default frequencies are changed Frequency 0 zero has the effect of cancelling SAVE s 3 7 1 Data Errors Up to 50 data errors before halting 3 7 3 Numerical Difficulties and Instability Dual infeasibility or unrecoverable numerical error in the DUAL algorithm result in a revert to the primal algorithm The new commands mentioned above are added to this section Chapter 4 Sparse Simplex SSX Solver 4 6 1 The Principal controls The following enhancements are described DEVEX algorithm description in 4 3 2 Automatic Forrest Tomlin activation Dual anti degeneracy procedures description in 4 4 The following commands are added PRIMAL DEVEX lt ON OFF SINGLE DOUBLE gt FORTOM AUTO DUAL ADEGEN n together with descriptions 4 6 3 Tolerances and other parameters The title of this section is extended to include parameters The following commands to change tolerances and parameters are specified PRIMAL DEVEX RATIO v FORTOM ACTIVATE PERCENT n FORTOM ACTIVATE GROWTH n DPROGRESS CRITERION v DPROGRESS FREQUENCY n DUAL PIVOT THRESHOLD v 4 6 6 Miscellaneous Controls Log levels are now
67. note below ae Bad S MAXIMUM EXTRA ROWS n MAXIMUM EXTRA COLUMNS n Bolo maximum extra cols n MAXIMUM SPARE ROWSPACE n The following commands are also available MAXIMUM CUT NONZEROS n Default 0 MAXIMUM CUTS n Default 0 These commands specify user given limits on the cut pool space To determine the maximum limits for cut generation and matrix extension the system takes the maximum of the user given value and a quota based calculation Quotas are forced to zero when GENERATE CUTS is OFF Back to Chapter contents B 22 Appendix B SPECS Commands B3 Alphabetical list of commands FortMP Appendices B3 Alphabetical list of commands cont Appendix B SPECS Commands B3 Alphabetical list of commands cont FortMP Appendices B3 Alphabetical list of commands cont Appendix B SPECS Commands B3 Alphabetical list of commands cont The following commands have not been described They are provided for research and testing purposes only B 27 FortMP Appendices Back to Chapter contents B 28 Appendix B SPECS Commands APPENDIX E C Language Usage This appendix is intended to provide users of C language with the means to interpret and make calls to the subroutine library described in chapters 7 and 8 Contents E1 MIXED C FORTRAN USAGE ON PC WIN32 PLATFORMS 2 E1 1 _ Entry point Names 2 E1 2 Argument lists 2 E13 Function Calls 4 B 1 FortMP
68. numbered set members are fixed to zero and on the DOWN branch higher numbered set members are fixed to zero For SOS2 the member nearest to the evaluation is allowed to be non zero on both branches If no reference row is given in the data then a series 1 2 k is assumed for the reference row coefficients Back to Chapter contents VI 21 FortMP Part 2 6 5 Controlling the Tree Development 6 5 1 Definition of Tree Search Heuristics In the Branch and Bound algorithm described above there are two major steps where a choice has to be made Step 1 in which a global entity is selected for partitioning the solution space this is termed variable choice Step 2 in which an unsolved node is selected for solution this is termed node choice We may consider a solution strategy to be the combination of criteria whereby these two choices are made Experiments on real life problems using different strategies show that each individual strategy behaves differently on different problems FortMP MIP therefore provides a number of alternative criteria for variable and node choice Moreover the node choice criterion can change after the first integer solution has been found In principle the node choice may be considered separately from the variable choice criterion But not all such choices can be carried out independently of the information provided by the variable choice procedure However the node choice criterion is usually changed after
69. or just its CRASH preliminary with the following commands DUAL PUSH OFF Default DUAL CRASH PUSH OFF Default ON ON ON may also be given The reliability and efficiency of Dual Push has now greatly improved so that these commands should not be necessary Output of messages to the log during the Push algorithms is controlled with the following SPECS commands PUSH LOG LEVEL n Default PUSH LOG FREQUENCY n Default n 0 n 10 FEYS Where level 1 produces log messages only at each re invert level 2 at each 10th iteration or as specified by PUSH LOG FREQUENCY Back to Chapter contents 10 3 5 Logged Output from Crossover Algorithms The following is a normal log from the crossover stage ws NO OIE Clulmect P ptbh Steps 0 Tet INO Toe clieecie D jeitlsila Sic 3 CRASH LTSF ENDED WAIRIUNBIIN IYI S a IP US BNDD FIX FREE LOGICALS REMOVED FROM BASIS 0 0 478 0 STRUCTURALS ENTERED IN BASIS 478 0 0 0 xxx Time triangular 0 020 xxx There are 478 initial selections 478 triangular x x Time TRpivots 0 000 650 M targets U2 RP targets 0 C tried 0 C selected xxx Time symbolic 0 000 CRASH ART ENDED BEANS SBOE WZ ANI T IC IANS p OQ PInWwOIED OWT xxx Bilapsed time in
70. output file With the two input files in place it is only necessary to execute the stand alone FortMP program in order to solve the problem and obtain the outputs Back to Chapter contents 2 1 4 The Complete Example The input the SPECS controls and the solution output for the complete example set out in Section 2 1 1 are given in Table 5 Table 6 and Table 7 below NAME TESTIN ROWS N COST EORR EQ R2 EQ R3 EQ R4 iO IRS COLUMNS X1 COST 4 0 R1 20 X1 R2 Le R4 10 X1 RS LO X2 COST GoW R2 360 X2 R4 LU R5 250 XO COST 5 oO R3 Zan XO R4 LO R5 250 X4 X4 X5 X5 X6 X6 X7 RHS EGIN A w CO R4 CO R5 CO RS CO R1 R3 R5 X1 X2 X3 X4 X5 X7 ST ST ST ST Ish Gal FS Iss SS cep iH oi oa BE ADHD OS SY ISD ar Ny LD ay GS Oy Gaal R3 R5 R4 R1 R5 R2 R4 Table 5 Simple example Problem data in file MODEL MPS Table 6 Simple example SPECS controls in file FORTMP SPC FORTMP SOLUTION IPS OVP IE IU P NONE Bi RE BORTE TOW Ii ROBLEM NAME F BJECTIVE NAME HS NAME OUNDS NAM ROW NCOL los be trol Sh el iP OPTIMUM VALUE DI 6 7 SOPFUMNS AEE NO STATE NAME COST i B X1 2 B X2 3 B X3 4 ie X4 5 B X5 6 L X6 7 B X7 LOGICAL VARIABL INOS 5 5 G0 e280 0 5 5 NO STATE NAME al B COST 2 1B Ri
71. production systems Back to Chapter contents FortMP Part 2 6 2 MIP Problem data types and problem definition An MIP is a mathematical program which in addition to its usual linear restrictions includes some discrete integer restrictions on some or all the variables of the model These restrictions can be categorised as one of the following i Zero One or Binary variables x 0 1 ii General Integer variables xj Z iii Semi Continuous variables x Oor 0 lt I lt x lt u iv Special Ordered Sets of type One See 6 2 3 v Special Ordered Sets of type Two See 6 2 4 The definition and the modelling applications of each group of variables and sets are given separately in the following sections Back to Chapter contents 6 2 1 Binary and Integer Variables A zero one or binary variable BV is a variable which can take either the value zero or one in a given model An important and common use of zero one variables is to represent binary yes or no choices Consider a situation where one has to make a decision whether or no to perform a number of activities and suppose that the problem or at least part of the problem is to decide which activities to select To represent such a condition in a model we use a binary variable x for each activity and let xj 1 if activity j is performed x 0 if activity j is not performed Knapsack Facility location Network flow Set covering Set packing Set partitioning Tr
72. rr IPM GRAPHICAL DISPLAY os O OFF 1 ON OFF lt ON OFF gt os ipm display n Back to Chapter contents B 15 FortMP Appendices B2 10 MIP controls algorithmic Command Manual Lowest Highest Default ref value value value MIP PREPROCESS lt ON OFF 2 Code 0 OFF ROOT ONLY gt 7 1 0N 2 ROOT ONLY GENERATE CUTS lt ON OFF gt MIP ANALYSE DUAL lt ON OFF gt MIP DUAL lt ON OFF gt MIP AGENDA INPUT lt ON OFF gt MIP LIST INPUT lt ON OFF gt mip priority list lt on off gt MIP AUTO ROUNDING lt ON OFF gt a MIP AROUND SOLVER lt SSX IPM gt Code O0 SSX 1 IPM Back to Chapter contents B 16 Appendix B SPECS Commands B2 11 MIP controls parameters Command Manual Lowest gt Default ref value value MIP FNODECHOICE Ee Code See bel MIP VARCHOICE Ea Code See MIP PRIORITY UP lt ON OFF gt 0 0FF iad a MIP BOUND v High value mip cutoff bound v emcees tte ta tae fae covers mame vee oo ae far ewrore serso ee oo 2 aer woma oe a o er omnea e Pd z raaa era a fae somone rmeron v ve oo os vo Codes for MIP FNODCH SNODCH are 1 LIFO 2 FIFO 3 Best objective value 4 Worst objective value 5 Minimum number non integer 6 Minimum sum of fractions 7 Best projection heuristic Codes for MIP VARCH are B 17 FortMP Appendices Minimum fraction Maximum fraction Invalid Maximum cost Min
73. set to be empty i e to have no data records at all with that set name mT A Objective Row Selection The following SPECS command names the row to be used as objective row in the problem data OBJECTIVE NAME objname where objname represents the name of a free row in the model By default the system selects as objective row the first row to be defined with type FREE code N in the ROWS section Back to Chapter contents 3 2 2 Matrix Generator Format Problem data prepared for input to FortMP by a matrix generator MG such as MPL is quite different from MPS format data The objective of such data is to achieve a more efficient interfacing between FortMP and the MG in which external matters such as names are handled by the MG and not by FortMP The MG is expected to act in conjunction with a Report Writer RW which reads a specially formatted solution output from FortMP and identifies the rows and columns on the basis of index number Detailed layouts for MG input and RW output are given in Appendix A section A3 1 To invoke this form of data input the following SPECS command is used INPUT TYPE MG Back to Chapter contents 3 2 3 Free Format MPS and Long Data Names The standard MPS format of data is based upon Fixed form data entry under which every field is positioned at a given place in the input data line Ultimately this derives from data entry on punched cards where the fixed form is n
74. should not be greater in magnitude than this multiple of the original calculations using forward transform or backward transform In case of violation the system may re invert directly or flag the selection as with pivots below the admit level T7 17 The following zero tolerances apply to update calculations PRIMAL RELATIVE EPSILON v x Fixed v 0 0 DUAL RELATIVE EPSILON v Default v 0 0 NVERT RELATIVE EPSILON v x Fixed v 0 0 Which specify that the result of a subtraction equates to zero if its magnitude is less than a certain fraction of the original magnitudes subtracted Back to Chapter contents 4 7 Summary of SPECS Commands The following SPECS commands relate to the SSX algorithm Those introduced in this chapter are highlighted thus e g FORTOM ON Some commands which are not actually available yet are written in parentheses and have Fixed values MINIMIZE MAXIMIZE These two commands specify the direction of optimisation MINIMIZE is the default so this command is not actually needed ALGORITHM PRIMAL ALGORITHM DUAL One of these commands is used to specify which SSX algorithm is to be used PRIMAL is the default and need not be specified MAXIMUM SIMPLEX ITERATIONS nnn x default 10000 This command sets the termination limit for SSX algorithms A SAVE is made before exit at termination
75. that it does not contain any of the structural variables that must be introduced into the basis one by one during the simplex iterations Another disadvantage is that the starting solution may be infeasible requiring many iterations to find a feasible solution Gf one exists The crash basis is created with some work but this is carried out relatively very quickly since the major part of it is done symbolically This crash procedure attempts to replace as many logical vectors as possible by structural ones The vectors are selected so that they can symbolically be rearranged to form a triangular basis i e they can enter the basis without transforming them Additionally if there is a tie in the selection of the incoming structural variables column tie variables vectors with larger feasibility range are given priority In the case of row tie logical variables with smaller feasibility range are selected to be replaced The resulting triangular basis is easy and efficient to handle and has a greater chance to being feasible or near feasible Experience shows that using this basis requires fewer simplex iterations to solve a wide range of problems Consequently it has been chosen as a default By supplied basis we mean one of two possibilities One is the case when the basis is given in MPS format as a text ASCII file prepared by the user or by an earlier run of FortMP The basis is interpreted and amended by logical variables as necessary The oth
76. the first integer feasible solution is achieved in order to provide a more flexible tree search In FortMP MIP the following parameters are used to set the variable and node choice criteria These parameters are as follows MIP VARCHOICE n MIP FNODCHOICE n MIP SNODCHOICE n where n is an integer specifying alternative choices Back to Chapter contents 6 5 2 Provision of choice criteria by the user A complete tree search strategy is defined by a unique combination of variable and node choice criteria Variable choice criterion is selected by the following SPECS command MIP VARCHOICE n 1 5 default n 1 In order to specify the options available we define the following terms VI 22 Chapter 6 Mixed Integer Programming MIP Fractionality Measure of non discreteness associated with an entity Cost Evaluation Absolute value of variable cost multiplied by fractionality where the measure of non discreteness is a formula for each type of global entity which is zero when the entity is integer feasible and increases with the degree of violation Now the VARCHOICE command has the following options Select the entity with minimum fractionality This is the default Select the entity with maximum fractionality Not currently available reserved for future enhancement Select the entity with maximum cost evaluation Select the entity with minimum cost evaluation PPPS SB Il NAUN Re Node choice criterion is sele
77. to the log in the first place Back to Chapter contents B2 14 Output controls Command Manual Lowest Highest Default ref value value value OUTPUT TYPE o e r Code 1 STD ESES OUTPUT SUPPRESS ZERO SUPPRESS ZERO o 0PF OFF OUTPUT CHANNEL OUTPUT DISPLAY ONLY OUTPUT BASIS lt ON OFF gt O OFF basis ao lt on off gt MIP AGENDA OUTPUT Code O OFF lt ON OFF ALL gt 1 ON 2 ALL MIP LIST OUTPUT Code O OFF lt ON OFF ALL gt 1 ON 2 ALL The following commands are also available OUTPUT DISPLAY ONLY Default No display OUTPUT DISPLAY with or without ONLY causes the normal output file to be suppressed and solution output to be displayed or written to the standard output B 21 FortMP Appendices OUTPUT CHANNEL n Default 18 As with the log channel a negative number indicates that the system must open the channel internally A positive number indicates that the channel is opened externally Using n 6 standard output unit the solutions are written out online to the screen OUTPUT TYPE MPL Default STD This is an alternative for output type RW DISPLAY MEMORY Default None This command causes a record of memory assignments to be issued to the log and displayed if display level is 2 or more Back to Chapter contents B2 15 Limits for cut generation and matrix extension Command Manual Lowest Highest Default ref value value value MAXIMUM CUT NONZEROS n Appendix 0 See
78. type PL Plus type default LI Integer variable lower bound UI Integer variable upper bound A 17 FortMP Appendices BV Binary variable SC Semi continuous upper bound Field 2 Bound set name Field 3 Column name Field 4 Value Back to Chapter contents Appendix A Input Output Data Layouts A1 2 Marker data for Binary Integer and SOS specification Marker lines are used in the COLUMNS section of the MPS form input data to define a list of consecutively sequenced variables Four types of marker line can be used as follows INTORG _ Beginning of a consecutive sequence of Integer or Binary variables INTEND End of a consecutive sequence of Integer or Binary variables SOSORG _ Beginning of a special ordered set type SOS1 or SOS2 SOSEND _ End of a special ordered set type SOS1 or SOS2 A marker line has the keyword MARKER quotes included in Field 3 of the standard MPS form layout and the type keyword xxxORG or xxxEND either in Field 4 or in Field 5 quotes included The full layout is as follows Field 1 Field 2 Field 3 Field 4 Field 5 Field 6 e 3 EE 12 EEN 22 EZ 32 EE 47 50 61 Label MARKER INTORG C blank blank Each marker line must appear between one column and another a column may not be split by a marker It is not allowed to overlap sections of the data with marker lines since all sets must be mutually exclusive Thus markers are always to be in pairs with the
79. 1 2 Elementary Data Preparation Data such as the above is entered by using a standardised layout widely accepted as the norm for LP systems which is referred to as MPS format In Appendix A1 1 there is given a proforma layout for MPS data entry forms and these forms provide the simplest way to code problem data such as the above Data is in five sections ROWS section COLUMNS section RHS section RANGES section optional not used in the example and BOUNDS section optional In the ROWS section each constraint row including the objective row is named and its type is specified The ROWS section of the example may be encoded as in Table 1 below ar 1 Field 2 Field 3 Field 4 Field 5 Field 6 2 3 5 12 15 22 25 36 40 47 50 61 Field 1 Row type LE Less than or Equal GE Greater than or Equal EQ Equal N Non binding objective Field 2 Row name Table 1 The ROWS Section In the COLUMNS section the coefficient values on the left hand side of the constraints is given plus the objective row coefficients Only non zero values need to be entered The sequence of entry is column wise that is all the values for one column or variable must be kept together The COLUMNS section of the example may be encoded as in Table 2 below Field 1 Field 2 Field 3 Field 4 Field 5 Field 6 2 3 5 12 15 22 25 36 40 47 50 61 N Go S ee a N ololo ran so Field 2 Column na
80. 2 5 and note that it is a minimisation problem The objective function is always specified as minimisation for the purpose of these discussions A solution is said to be LP feasible if it satisfies all the linear constraints 16 and 17 of section 6 2 5 The problem with only these constraints and all discrete restrictions ignored is referred to as the Relaxed LP or LPR The objective value of the LPR is denoted Zak A solution is said to be integer feasible if it satisfies all the discrete restrictions 18 of section 6 2 5 as well as all the linear constraints 16 17 of section 6 2 5 An IP optimum solution is an integer feasible solution of the problem if one exists which in respect of the objective function value is either better or at least as good as all other integer feasible solutions of that problem The term discrete entity is used to represent any binary general integer or semi continuous variable and any set of type SOS1 and SOS2 not an individual set member If the solution does not satisfy the discrete restrictions of an entity then that entity is considered violated in the solution Zp is called the cut off value It is initially fixed to a large positive number and during the tree search it is updated by the objective function value of the best integer feasible solution found so far VI 19 FortMP Part 2 The steps of the B amp B algorithm can be stated as follows Step 0 Initial Step If an optimum solution to t
81. 3 CUT QUOTA n default ACT QUOTA n default n 10 n 5 ct ct These commands assign quotas for cut storage and applied cuts in relation to the model size See section 6 7 3 MIP ANALYSE DUAL ON default OFF MIP ANALYSE DUAL OFF ON activates the Dual Solution analysis and resultant fixing of non basic discrete variables See section 6 7 4 VI 50 Chapter 6 Mixed Integer Programming MIP MIP ROUNDING FRACTION v default v 0 0 Criterion for a discrete variable to be rounded in the AUTO ROUND option See section 6 8 1 MIP AUTO ROUNDING ON default OFF MIP AUTO ROUNDING OFF ON activates the AUTO ROUNDING option See section 6 8 1 MIP AROUND SOLVER IPM default SSX MIP AROUND SOLVER SSX These commands select which solver to use for the root node of the auto rounded tree See section 6 8 1 NTEGER TOLERANCE v default v 0 001 Criterion for approximation to an integer value See section 6 8 2 MIP BOUND v default infinite MIP BOUND RELATIVE v default infinite Assigns the starting gap beyond the RLP optimum to the initial tree cutoff bound RELATIVE implies relative to the RLP optimum value See section 6 8 2 MIP CUTOFF TOLERANCE v default v 1 0e 12 MIP CUTOFF RELATIVE v default v 0 0 MIP CUTOFF RELISOL v default v 0 0 Measure by which the gap from RLP
82. 4 6 1 The Principal Controls A description of the syntax of SPECS commands which control the run has been given in Chapter 3 Section 3 1 6 The following commands state the direction of optimisation i e how the objective row is to be treated MINIMIZE MAXIMIZE The default is MINIMIZE The following commands invoke either PRIMAL or DUAL as the initial solver for LP problems ALGORITHM PRIMAL N77 11 ALGORITHM DUAL The default is PRIMAL The following command specifies the maximum number of candidate columns used by PRIMAL in sub optimisation and extracted by multiple pricing PRIMAL MSUB n The default is MSUB 4 with possible values 1 to 10 Single pricing MSUB 1 will lengthen the overall solution time because only one minor iteration takes place to every major iteration If we go to the other extreme namely increase MSUB beyond 6 the memory requirement goes up considerably with FORTOM ON each selected column is stored twice in double precision and later minor iterations in the sub optimization tend to have very little value The total number of iterations increases but without any corresponding increase in iteration speed At the same time it also may happen that only a smaller part of the selected and updated vectors can finally enter the basis rendering a large part of the computational work useless MSUB 4 seems to be a good compromise The following commands contro
83. A 2 Appendix A Input Output Data Layouts In the optional RANGES and BOUNDS sections the header may be omitted if there is no data to follow Note however that the RHS header record must appear even if there is no RHS data Comment lines bearing an asterisk in position 1 may appear anywhere and will be ignored Data records in all five sections have a common fixed layout of six fields as follows A type code depending on the section 25 36 Value corresponding to the name in field 3 40 47 A name of the same type as field 3 50 61 Value corresponding to the name in field 5 BEF The contents of each field in each section is described below ROWS section Greater than or equal to No constraint i e free row or objective 2 Row name The name of the row Fields 3 4 and 5 are not used A row name may contain any characters including blanks after the leading character Leading blanks are ignored however the user is always advised to enter names left justified to avoid confusion Note that the name R1 11 is different from the name R 111 for example A 3 FortMP Appendices COLUMNS section Blank La Value on the column row given on fields 2 and 3 Row name optional Value on the column row given in fields 2 and 5 blank if field 5 is not used Fields 5 and 6 may be omitted Column names have the same description as row names given above Values must be entered at the nght in fields 4 and 6 un
84. ADDCOL NCNZ JCOL CVTAB IRTAB OBJ TCTN This adds a column by activating the next dormant column provided by the users MAXIMUM EXTRA COLUMNS command It inserts into the matrix a set of coefficients supplied for that column by the user in areas CVTAB and IRTAB and also inserts the objective value supplied in cell OBJ The column number activated is returned in cell JCOL which is obtained by adding one to the number of columns NCOL Input arguments are NCNZ CVTAB NCNZ IRTAB NCNZ OBJ TCTN Output arguments are JCOL TCTN CALL ADDROW NRNZ IROW RVTAB JCTAB TCTN This adds a row by activating the next dormant row provided by the user s MAXIMUM EXTRA ROWS command It inserts into the matrix a set of coefficients supplied for that row in areas RVTAB and JCTAB The row number activated is returned in cell IROW which is obtained by adding one to the number of active rows MRACT Input arguments are NRNZ RVTAB NRNZ JCTAB NRNZ TCTN Output arguments are TIROW TCTN CALL CHGCOL NCNZ JCOL CVTAB RTAB OBJ TCTN This deletes the existing coefficients on matrix column JCOL and replaces them by an alternative set supplied by the user in areas CVTAB and IRTAB with the objective coefficient in cell OBJ Input arguments are NCNZ JCOL CVTAB NCNZ IRTAB NCNZ OBJ TCTN Output arguments are TCTN CALL CHGROW NRNZ IROW RVTAB JUCTAB TCTN This deletes the existing
85. Appendices E1 Mixed C Fortran Usage on PC WIN32 Platforms E1 1 Entry point Names Fortran subroutines of the FortMP system are compiled using default standards C language subroutines that interface with Fortran subroutines are adapted to match Fortran defaults never the other way around This means that any Fortran subroutine name or function name is represented at the LINK stage by an entry name as follows lt NAME gt lt n gt Where lt NAME gt is the source name in uppercase and lt n gt is the number of bytes in the argument list In C language the equivalent is to name the entry in uppercase and to apply the stdcall attribute Given as example the FortMP entry Call Primal stsl tctn This would be represented by the following prototype in say a C header file extern void __stdcall PRIMAL int stsl int tctn and the call statement in the executable code would be int stsl teti PRIMAL amp stsl amp tctn The linked entry name for this is _PRIMAL 8 Back to Chapter contents E1 2 Argument lists As exemplified above arguments in Fortran are generally pointer references to the data that is being passed This holds for all numerical data both scalars and arrays the exception being only character data and strings Characters or strings in Fortran always occupy a fixed number of bytes and there is no concept of the null terminator to allow variable length strings In orde
86. Default is 3 This command selects one of three starting point methods for the predictor corrector algorithm See 5 2 2 IPM SOLVER CHOLESKY These commands select the solution mechanism to be used The default is XSUPERNODE See 5 2 3 These commands set lower and upper levels to the solution error between which CG iterations are used to refine the major IPM iterations See 5 2 4 This command limits the number of CG steps taken at each major IPM iteration See 5 2 4 IPM RESTART ON IPM RESTART OFF This command specifies whether to RESTART the IPM algorithm Default is OFF See 5 2 5 IPM SAVE FREQUENCY n default n 10 This command specifies the frequency for making a SAVE in IPM See 5 2 5 MAXIMUM IPM ITERATIONS nnn x default 80 This command sets the termination limit for IPM A SAVE is made before exit at termination See 5 2 5 IPM BASREC ON IPM BASREC OFF When ALGORITHM IPM has been selected the user can set this switch OFF in order to halt execution and print the output immediately on reaching the IPM solution The default is ON See 5 2 6 DUAL PUSH OFF default ON The OFF option cancels execution of DUAL PUSH not recommended See 5 2 6 BASREC RESTART ON default OFF Provided that the IPM algorithm has completed with an optimum solution then BASREC can be restarted in a subsequent
87. E 16 33094E 13 24 820 nese PMNS erenulincicScl Small Duelilty Cao ee ipa Optimum solution obtained SF TRS e axe TPM StartimG pott Sawecl was Objective Function 0 4682038E4 offset 0 2200000E4 apsed structuring time apsed solution time IPM iteration count AKEN FOR QPM PDSUBS 238 SI AKEN FOR IPM SOLUTION 50S SHC AKEN FOR OUTPUT 00 SI ea eal eal a e3 ee we el oe oe 2S ony eo INQ lea ea eal teal eal Ve coke ee Sila eo oe oa amp a Oy oS sy TS 0 0 0 0 0 0 0 02 EOZ 329670 054945 QO OR Listing 8 Log output for FF form in file TESTQP FLQ Back to Chapter contents wer am 9 5 Branch and Bound Algorithm for MIQP 9 5 1 Sub problem Solution The Branch and Bound technique is no different in principle when a quadratic objective is added from the normal LP case see chapter 6 section 6 4 Each sub problem arising from the tree development is solved by using IPM QP as described above rather than by using sparse simplex Dual or Primal Since the addition of a fresh constraint at each branch must lead to a sub node solution no better than its parent the same bounding techniques apply to limit the tree development Back to Chapter contents 9 5 2 Simplified Tree IPM solution requires considerably more memory than sparse simplex and this considerat
88. ETSOL MROW NCOL SLST SOLVEC SLSTAB TCTN This retrieves the primal solution vector together with associated status codes and places them in user supplied areas SOLVEC and SLSTAB This utility cannot execute in problem change mode see note 7 in Section 8 3 7 below Input arguments are MROW NCOL TCTN Output arguments are SLST SOLVEC MROW NCOL SLSTAB MROW NCOL TCTN CALL GETDSL MROW NCOL DSLVEC DSSTAB TCTN This retrieves the dual solution vector together with associated status codes and places them in user supplied areas DSLVEC and DSSTAB This utility cannot execute in problem change mode see note 7 in Section 8 3 7 below Input arguments are MROW NCOL TCTN Output arguments are DS_LVEC MROW NCOL DSSTAB MROW NCOL TCTN Back to Chapter contents 8 3 6 Tableau Utility Specifications Solution utulities are specified as follows CALL GTABLC MROW JVAR TCOL TCTN This subroutine calculates and retrieves one column vector from the updated tableau in the user supplied area TCOL It cannot be executed in problem change mode see note 7 is Section 8 3 7 below Input arguments are MROW JVAR TCTN Output arguments are TCOL MROW TCTN CALL GTABLR MROW NCOL IROW TROW TCTN This subroutine calculates and retrieves one column vector from the updated tableau in the user supplied area TCOL It cannot be executed in problem change mode see note 7 is Section 8 3 7 below
89. F gt restart basrec ipm skip lt on off gt MIP RESTART lt ON OFF gt Back to Chapter contents B 10 Appendix B SPECS Commands B2 6 SSX controls algorithmic Command Manual Lowest Highest Default ref value value value SIMPLEX START INPUT BASIS SIMPLEX START CRASH crash lt on off gt SIMPLEX START UNIT BASIS PRIMAL DEVEX lt ON OFF O g SINGLE DOUBLE gt 1 ON SINGL 2 DOUBL DUAL DEVEX lt ON OFF gt DUAL ADEGEN oO Code 1 ON simple 2 ON advanced FORTOM lt ON OFF AUTO gt 6 Code OQ OFF 1 ON 2 AUTO Back to Chapter contents B 11 FortMP Appendices B2 7 SSX controls parameters Command Manual Lowest Highest Default ref value value value Controls for all SSX algorithms RHS TOLERANCE v 4 6 3 Le 0id 2 5 1 0e 5 FEASIBILITY TOLERANCE ZERO TOLERANCE v P0 0 25 i tee il 1 0e 15 PIVOT DIFFERENCE EPSILON V 1 0d 25 i a 1 0d 2 PRIMAL controls ee PRIMAL PIVOT ADMIT THRESHOLD 30 Pivot tolerance v Ty Praman pavor nomar amare ver nee e prm nesarive evorion est fen Lee eee Ooo DUAL PIVOT ZERO TOLERANCE v INVERT controls B 12 Appendix B SPECS Commands INVERT PIVOT ZERO TOLERANCE 1 0d 25 LQ 1 0D 7 invert tolerance 1 0da 2 INVERT PIVOT ADMIT RELATIVE 1 0d 25 LQ eee threshold INVERT RELATIVE INVERT RELATIVE EPSILON v a a a The following additional commands are available DFTRAN RO
90. FREQUENCY n default n l These commands determine the nature and frequency of outputs to the log file frequency refers to the iteration log Log level zero is limited to error messages only INVERT FREQUENCY n default n 50 This sets a maximum to the number of iterations allowed before an automatic reinvert is invoked However this applies at the start only as the system increases the number when Forrest Tomlin update begins see Chapter 4 section 4 6 1 MAXIMUM SIMPLEX ITERATIONS n default n 50000 After this number of iterations the SSX algorithms save a basis for restart and then terminate see Sections 3 5 1 and 4 6 4 on saving and restarting Back to Chapter contents 3 3 2 Setting up a Starting Basis for SSX As already stated a starting basis must exist before either PRIMAL or DUAL can execute The following alternative mechanisms are available for this The starting basis can be built by the CRASH algorithm The starting basis can be read from an external file The user can use RESTART which employs SAVE information from a previous run A basis is included as part of the saved data The user can start from the all logical basis also known as the UNIT basis The method chosen is according to a SIMPLEX START command which may be one of the following SIMPLEX START CRASH This is the default SIMPLEX START INPUT BASIS SIMPLEX START RESTART SIMPLEX START UNIT BASIS
91. FortMP Manual Last Update 23 April 2008 UpriRisSK SYSTEMS Q DAE INVESTOR IN PEOPLE BS EN ISO 9000 2000 Manual Prepared by E F D Ellison M Hajian H Jones R Levkovitz Maros G Mitra D Sayers NAG Ltd Preface to Release 2 A Changes Made Since Release 1 Many improvements have been made throughout the system and new features have been introduced The major new features introduced are in the input in Mixed Integer Programming and in the Callable Library external data interface as follows Input Data Standard data input is extended by new features permitting free form layout and long data names enlarged from 8 to 16 characters Mixed Integer Programming MIP has been substantially revised in order to permit addition of advanced new methods and to solve models irrespective of the limitations imposed by maximum storage constraints A system for recovery of dead space enables large search trees to be developed with comparatively little memory A powerful algorithm for MIP pre processing has been added with substantial time improvement in the solution of many MIP problems A feature has been added for the users to classify the MIP constraint types in their models Callable Library and External Data Interface Many users of External Data Interface module SUBMP1 have been obliged to write their own data input procedures based on MPS form data layout The detailed checking and more complex f
92. Greater than or Equal EQ Equal N Non binding objective Field 2 Row name Table 13 Example of ROWS Section The COLUMNS and RHS sections have not been changed in any way and remain exactly as shown in Table 9 and Table 10 There is no RANGES section The new BOUNDS section of the example may be encoded as in Table 14 below ae 1 Field 2 Field 3 Field 4 Field 5 Field 6 5 12 15 22 25 36 40 47 50 61 Field 1 Bound type code LO Lower bound UP Upper bound FX Fixed value FR Free variable MI Minus type PL Plus type default LI Integer variable lower bound UI Integer variable upper bound BV Binary variable SC Semi continuous upper bound Field 2 Bound set name Field 3 Column name Field 4 Value Table 14 Example of BOUNDS Section Having prepared the data there are no SPECS controls to consider other than giving a name to the model with the MODEL NAME command We shall use the name BININT for this example To execute the stand alone FortMP system and solve this example the following preparations are made The input data is placed in a file named BININT MPS SPECS controls are placed in the file named FORTMP SPC as before No special controls are necessary because the Mixed Integer algorithm is invoked automatically by the presence of discrete value constraints in the problem The file FORTMP SPC contains the three commands BEGIN MODEL NAME BININT END
93. I 46 Chapter 6 Mixed Integer Programming MIP 6 10 5 Full Classification Hierarchy Certain general classes not yet mentioned may be named here LE EQ RNG OBJ MLE OLE BDPQ IDPQ MDPQ NDPQ The class of all LE type constraints including GE type which are converted on input to LE type The class of all EQ type constraints All constraints with RHS range Objectives and free rows Mixed LE constraints part binary and part non binary Other LE constraints having no binary component Diophantine equations involving only binary variables Diophantine equations involving only Integer variables Mixed Diophantine equations part binary and part integer Non diophantine equations i e incorporating one or more continuous variables We include also the following Other types SUB SLB Simple Upper Bound where there is only one non zero term giving a fixed upper bound to that variable Simple Lower Bound where there is only one non zero term giving a fixed lower bound to that variable The following diagram illustrates the hierarchical relationship of all these classes and on the right lists the total sub classification derived by the system Note that the BGOQ class appears as a sub set of both NDPQ and MDPQ classes This is the only exception to the ordinary hierarchical structuring VI 47 FortMP Part 2 Diagram 1 Row Classification Hierarchy Back to Chapter contents VL 48 Chapter 6
94. I x N and for smaller N we use N PHI x Nx VN This simple formula is always used by the barrier algorithm Users can give the value of PHI with the following SPECS command IPM PHI v default v 10 0 In the affine algorithm u is taken to be zero and its implicit value is never used In the predictor corrector algorithm the user can enforce the use of the simple formula above controllable as before or can specify a more complicated adjustable formula as follows PGAP M x IGAP where IGAP represents the duality gap at the start of the iteration that is bere sw PGAP represents the predicted gap after the first step has been taken with the variables incremented as they would be in a completed affine iteration step M is the row size of the problem P is a power that can be supplied by the user The user can specify the power P with the following SPECS command IPM POWER n n 0 4 default is 4 If the power is specified as zero then the simple formula is always used in any case The more complicated formula will also be replaced by the simpler formula when the duality gap reaches a low value With the value 3 for the power the system is in effect placing relatively less importance on reducing infeasibility and this value has been found generally suitable However it may be necessary to use 2 or 1 for a problem if infeasibility takes a large number of iterations to be eliminated or indeed is ne
95. IX OF NON ZEROS IN Q MATRIX OPTIONS td d tid E ZE KEN FOR INPUT S TOTAL IN PROGRESS COMPLETE ry non zeros reduced to 25 KEN FOR SCALE PRSLVE TOTAL TORIZING Q 0 164835 DRIDS IPOS IIIS IDEN WIN IL Ls lesky factor nonzeros 4 SEPARABLE FORM NORMAL SYSTEM EN FOR QPM PREPROC ORS Sits TOTAL ymmetric Matrix U Non Zeros holesky Factor U Non Zeros HASE IPS IEINIE I ID IP a VAS IB D INF P OBJVAL 68801 1 10588 S56 4OS 43483E 03 2696121 24 605 21806E 06 152241 24 548 sLOVDilB O9 229641 2A S39 63483E 13 11492 24 536 56905 15 57466E 11 24 535 7 44371E 15 29388E 14 DAN BSS wets TPIMVNRCS erenlinehe cl Small Duality Gajy eae EEK Optimum solution obtained ARA wets IPM starting point SawSscl CojeCctiySe PuMmcction OW AsSs2534a7rO2 offset 0 2400000E 02 apsed structuring time 164835 apsed solution time 384615 IPM iteration count AKEN FOR QPM PDSUBS 0 55 SECS AKEN FOR IPM SOLUTION elo SECS AKEN FOR OUTPUTL oil SMCS Gl Gl ey 4a ey XS sa gBS Ny INS PERE EEI es e eal Orn Sy Sy k i Dr AEE IN f les ea eal RO KS ey XS O SE 8 OR OF
96. Integer variable upper bound SC Semi continuous upper bound Table 4 The BOUNDS Section Note that in all the above tables names are entered at the left of their fields while values are entered at the right In fact values need not be coded to the right so long as the decimal point appears but it is better to stick to this convention anyway At the beginning of the data there is a NAME record which has the keyword NAME in positions 1 4 and a model name of up to 8 characters in field 3 Each section is headed by an indicator record comprising the section name beginning at position 1 After the last data record in the last section there is an indicator record having ENDATA in positions 1 6 The complete file of input data in MPS format is illustrated in Table 5 Back to Chapter contents 2 1 3 Simple Use of FortMP To execute the stand alone FortMP system and solve this example the following preparations are made The input data is placed in a file named MODEL MPS A set of control commands known as SPECS controls or as SPECS commands is placed in a file named FORTMP SPC No special controls are needed to solve the simple example but the file FORTMP SPC should contain the following two commands as a minimum BEGIN END With this all controls are set to default values and the input and output files are named by default to be MODEL MPS The input data file in MPS format MODEL RES The solution
97. J3 x7 is a piecewise linear form connecting the following set of co ordinates undefined for x7 lt and for x7 gt 15 Using SOS type variables f7 x5 f2 x6 and f3 x7 are individually modelled as follows VI 15 FortMP Part 2 Let x7 X72 X13 X14 and x 5 be a special ordered set of type SOS1 where 1 NXy Xp t X13 t Xi4t X15 X5 X2 2x13 3X14 4X15 fi xs 2x11 3X2 4x13 3X14 2X15 Let x2 X22 and x23 be a special ordered set of type SOS2 where 1 X27 X2 X23 X6 2X9 3X93 SAx6 2X22 X23 Let x3 X32 X33 and x34 be a special ordered set of type SOS2 where 1 X31 X32 X33 X34 X7 X3 5X32 10x33 15X34 S3 x7 X37 10x 32 25 33 7 5X34 By appending the above SOS formulation to M i the DPP model can be stated as M ii Minimise 3x 4x2 5x3 X4 2x 3x12 4x13 3X14 2X15 function row 2x22 X23 function row x31 10x32 25x33 7 5X34 function row subject to 2x1 3x2 4x3 X4 x5 2x6 3x7 lt 25 5x2 3X3 X4 3X6 gt 50 OX 3x2 2x5 x7 100 x 100x lt 0 X11 X12 X13 X4 X5 1 convexity row X12 2x13 3x14 4xis X5 0 reference row X21 X2 X23 l convexity row 2X22 3X23 X5 0 reference row X31 X32 X33 X34 1 convexity row X31 5x32 10x33 15x34 XxX7 0 reference row where VI 16 Chapter 6 Mixed Integer Programming MIP 0 lt x lt 100 x2
98. L MPSOUT EXTEN See section 7 6 Back to Chapter contents 7 7 2 Summary of arguments and parameters The following are arguments to main FortMP library calls See section 7 1 2 SPID SPECS identity CHARACTER 8 Special values are Blank for the first section on the SPECS file NOSPECS _ to cancel all input of SPECS commands and use defaults STSL Solution status INTEGER Values are STSL 0 No solution has been obtained STSL 1 The problem is infeasible STSL 2 The problem is unbounded STSL 3 The optimum solution has been obtained STSL 4 An integer solution has been obtained STSL 5 The optimum integer solution has been obtained TCTN Terminate criterion INTEGER The following are parameters controlling the operations in FORTMP and SUBMPI1 All are INTEGER 1 YES O NO See section 7 1 2 ISCL Whether to scale the data IPRE Whether to PRESOLVE IIPM Whether to use IPM as the principal solver IBIN Whether to use an MPS input basis IBBN Whether to use a saved binary basis ICRS Whether to crash to a starting basis IDUL Whether to use DUAL as the principal solver IPST Whether to POSTSOLVE IBOT Whether to output an MPS form basis of the LP optimal solution IMIP Whether Branch and Bound is to be applied IOUT Whether to output the final solution The following two parameters are associated with the timing routine See section 7 1 2 TTYP Zero to start timer One otherwise INTEGER TTEXT Identification text CHA
99. L represents the value of the row itself 2a jx whereas the code in BSTAT represents the attached logical variable When the row equals its lower RHS value the slack is at upper bound and vice versa The exception to this is a GE type row with no upper RHS value which the system negates internally in order to avoid minus type logicals For both GE type rows and LE type rows the only non basic status code is 1 The associated file of SPECS commands to be provided in file fortmp spc is as follows BEGIN MODEL NAME sample MAXIMIZE END Back to Chapter contents Vil 17 FortMP Part 3 7 3 Standard Data Input to the Interface 7 3 1 Calling the standard data input In using the external data interface the user is obliged to build the problem data in his own data space with his own coding Frequently it happens that the original data for this is provided in MPS form anyway so that the user would be obliged to write an input routine which exactly parallels the input routine of FortMP itself Naturally it is desirable to avoid this duplication of effort and FortMP provides a sub routine MPIINP in the library to do this The specification is as follows CALL MP1INP MR NC NAIJ NSET PNAME SPID AIJ ROWIN COLIN UPB LOB RHS LHS COST MITYPE SREF SFUN SBEG SEND BSTAT TCTN The arguments here include all the arguments of INPMP1 and of IBSMP1 with a reversal of roll Input type arguments of
100. MIP AGENDA INPUT ON default OFF MIP AGENDA NPUT OFF ON invokes input of MIP AGENDA data See section 6 6 4 VI 49 FortMP Part 2 MIP AGENDA OUTPUT ON default OFF MIP AGENDA OUTPUT OFF MIP AGENDA OUTPUT ALL ON and ALL activate output of FIX data representing integer solutions See section 6 6 5 MIP LIST NPUT ON default OFF MIP LIST NPUT OFF ON invokes input of unnamed MIP AGENDA data See section 6 6 6 MIP LIST OUTPUT ON default OFF MIP LIST OUTPUT OFF MIP LIST OUTPUT ALL ON and ALL activate output of un named FIX data representing integer solutions See section 6 6 6 MIP PREPROCESS ON default OFF MIP PREPROCESS OFF MIP PREPROCESS ROOT ONLY ON activates the MIP preprocessor throughout ROOT ONLY for the relaxed LP and not for sub problems during branch and bound See section 6 7 2 MIP PREPROCESS LEVEL n 1 3 default n 3 MIP PREPROCESS LOG LEVEL n x 0 4 default n 1 These commands are similar to corresponding PRESOLVE commands See section 6 7 2 MIP FIX QUOTA n default n 10 Assigns quota for number of stored fixes in relation to the nodes See section 6 7 2 GENERATE CUTS ON default OFF GENERATE CUTS OFF ON activates the cut generation procedures and the application of strong cuts before and during Branch and Bound See section 6 7
101. MODEL NAME command to SUBMP1 In the case of long names 16 characters the following two functions are to be used in the place of FINDIR and FINDJC IROW FNDLIR LRNAME JCOL FNDLJC LCNAME where LRNAME is a row name 16 characters LCNAME is a column name 16 characters Back to Chapter contents Vil 19 FortMP Part 3 7 3 4 Name pattern matching In cases where the users do not know the exact name to be looked up they may nevertheless wish to know the index range corresponding to some pattern in order to program action for a particular type of variable or constraint A pattern is a text of the same length as a name containing the characters amp or in positions that do not need to be matched exactly The significance of these special characters is as follows oe matches any character amp matches any alphabetic character matches any digit Pattern matching is invoked by one of the following subroutine calls CALL MTCHIR RPTTRN IROW CALL MTCHJC CPTTRN JCOL where RPTTRN is a row name pattern 8 characters IROW indicates the start point for the search and returns the next following row index of a matched position zero if not matched CPTTRN is a column name pattern 8 characters JCOL indicates the start point for the search and returns the next following column index of a matched position zero if not matched Search begins at the next index position after the start index and continues f
102. N This retrieves one column of the matrix and places the coefficients in the user supplied areas CVTAB and IRTAB GETCOL also extracts the column count NCNZ and objective value OBJ Note that OBJ will not be among the coefficients placed in the areas CVTAB and IRTAB Input arguments are MROW JCOL TCTN Output arguments are CVTAB MROW IRTAB MROW NCNZ OBJ TCTN Only the first NCNZ positions in CVTAB and IRTAB are filled The remainder will not be used CALL GETROW NCOL IROW RVTAB JCTAB NRNZ TCTN This retrieves one row of the matrix and places the coefficients in the user supplied areas RVTAB and JCTAB GETROW also retrieves the row count into the argument NRNZ Input arguments are NCOL IROW TCTN Output arguments are RVTAB NCOL JCTAB NCOL NCNZ OBJ TCTN Only the first NRNZ positions in RVTAB and JCTAB are filled The remainder will not be used CALL GETAIJ ROW JCOL AVAL TCTN This retrieves the matrix element on row IROW column JCOL into the variable AVAL Input arguments are IROW JCOL TCTN Output arguments are AVAL TCTN CALL GETOBJ NCOL OBJTAB TCTN This retrieves the objective row of the matrix and places the cost coefficients in the user supplied area OBJTAB The table is zeroed first and then the non zero entries are copied in from the matrix at their correct index position Input arguments are NCOL TCTN Output arguments are OBJTAB NCOL TCTN CALL
103. P Part 3 These arguments are DOUBLE PRECISION in a standard double precision version of FortMP However some users with a need to conserve memory may be provided with a single precision version and for these users the type is REAL Arrays specified simply as DOUBLE PRECISION are always of type double precision The following are INPUT arguments and will not be changed by a subroutine call SCALARS MR NC NAIJ NSET PNAME SPID TCTN ARRAYS AIJ ROWIN COLIN is the INTEGER number of rows is the INTEGER number of columns is the INTEGER number of non zero entries in the A matrix is the INTEGER number of special ordered sets is the CHARACTER 8 model name is the CHARACTER identity of the BEGIN line in the SPECS file If blank then the first BEGIN command is chosen whatever its identity is an INTEGER type variable also an OUTPUT argument holding the terminate criterion A value zero indicates the execution can continue otherwise no execution takes place is a DOUBLE PRECISION REAL type array of size NAIJ which holds the non zero elements of the A matrix is an INTEGER type array of size NAIJ This holds the row indices of the A_matrix belonging to the corresponding entries in AIJ is an INTEGER type array of size NAIJ This holds the column indices of the A_matrix belonging to the corresponding entries in AIJ The arrays AIJ ROWIN and COLIN do not need to be organised in any particular seq
104. P1 MPIINP or INITAL One warning however If different controls are used for different entries then do not forget to reset the standard defaults for unused controls as well as setting fresh defaults for each new entry to the FortMP sub system Back to Chapter contents 7 4 4 Common Sections in the SPECS file When the SPECS file fortmp spc is read in by the subroutine SPCINT there is a reserved section heading for setting default values to the commands as follows BEGIN DEFAULT This section is not stored for later interpretation but is acted on at once by invoking CALL SPCDFT for each command in the section see section 7 4 3 of the manual It is therefore useful for reducing the number of repetitions of the same command in situations where the SPECS file must have several sections The DEFAULT section is useful only when SPCINT is used to load the specs commands internally There is also the possibility of having one section used in all entries to the solver submp1 in addition to the section designated by SPID for each entry The reserved heading for this section is as follows BEGIN ALL The ALL section must appear first or preceded only by the DEFAULT section if that appears ALL section commands are listed on the log at the beginning followed by the commands of the section selected by parameter SPID DEFAULT section commands are not listed Back to Chapter contents Vil 24 Chapter 7 F
105. PC Win32 using the MS Development Studio with C compiler and Digital Fortran Miscellaneous UNIX based operating systems DEC VAX systems using VMS and the VAX FORTRAN compiler Intel 1860 hardware using Microway 1860 FORTRAN with automatically vectorised subroutines CONVEX hardware using special optimising FORTRAN compiler with vectorised subroutines CRAY hardware using the CRAY FORTRAN compiler The distributed material may be an executable program for the stand alone system or a mixture of compiled and source text material subroutine library With the latter the user has the option of adapting the memory size available to FortMP See the Installation Guide for further details Back to Chapter contents 1 7 Statement of the Definitive Problem The general linear programming problem with simple upper bounds may be stated as follows Given a set of n variables x x x and a set of ncorresponding constants c c minimise or maximise the linear function CX Cox TO x subject to the following m linear constraints aX GjX gt ap X b for i 1 2 m where ap anis an mxn matrix of constant constraint coefficients and b b b are constant right hand sides and where the symbol in the above represents any of the relations less than or equal to greater than or equal to equal to a non binding constraint IV IA and also subject to the following bounds L lt xX lt u forj 1 2 n T
106. PECS command invokes primal as an alternative MIP DUAL OFF default ON MIP DUAL ON can also be given DUAL is numerically less reliable than PRIMAL in certain cases which may make this option desirable However failure of DUAL due to numerical difficulty causes the system to revert to PRIMAL in any case Back to Chapter contents VI 38 Chapter 6 Mixed Integer Programming MIP 6 9 Logged Output and Screen Display As in other FortMP procedures the output written to the log and the screen display can be varied to suit the degree of detail required The log output is controlled with the following SPECS command MIP LOG LEVEL n n 0 4 default 1 In default log level 1 the screen display and log file record outstanding items including the occurrence of each integer solution With level 2 or higher a log is shown of every node Nodes are numbered following selection for sub problem solution and so will appear in the log numbered in order 1 2 3 Users may find this log much too long and it can be reduced to appear at node intervals given by the following SPECS command NODE LOG FREQUENCY n default n 1 The various headings of the level 2 log are shown in the following table Screen Description o Text Node N Node number for identification Node number for identification EFEN EAE E Objective value of sub problem solution Fractn Fractionality or measure of non discreteness Here is also given a text i
107. PRESOLVE ON INVERT FREQUENCY 75 END A comment is added to show the range of allowable values if needed and the default where it applies In Section 3 8 there is a summary of all the commands introduced so far Back to Chapter contents 3 2 Data Preparation 3 2 1 MPS Format The standard means for encoding external problem data is MPS format which has already been described in Chapter 2 Section 2 1 2 with further examples in Sections 2 3 and 2 4 Here we give some further rules and examples A fully detailed specification is given in Appendix A MPS format data is invoked by the SPECS command INPUT TYPE MPS However this is the standard default and need not be given Comment Lines Any line beginning with an asterisk in column 1 is ignored by the input The Format of a Name A name is 8 characters long and may contain any letter digit or special character upper and lower case being considered different Leading blanks are ignored but internal blanks are counted for example the following names are all different ROW ROW111 rowl 1 Alternative Row Type Codes Alternative codes such as G or gt in the place of GE may be used for row types in the ROWS section See Appendix A section Al 1 for details Rhs Range Coding TmT O In the RANGES section all GE type and LE type rows have only positive or zero range values A zero range value on these row
108. PUORPAFRE amp SGo aS aG aa eases Listing 1 Input data using Q form in file TESTQP QDT tqp testqp qdt U O i Cesto CrS jal E O amp te a testqp qlg Listing 2 Specs commands for Q form in file FORTMP SPC rer aa Outputs comprising the solution in file TESTQP RES and the log in file TESTQP LOG are shown below in listings 3 and 4 FORTMP SOLUTION REPORT PROBLEM NAME TESTOPOD R OBJECTIVE NAME COSI G RHS NAME INalS BOUNDS NAMI BND MROW 6 NCOL 7 ORG WIN WAIL 0 479124D 02 LOB FIX OFFS O 62397 LID OZ STRUCTURAL VARIABL VALUE 1 56267 TASO s5 5 FILS sAST33 1 47956 LOGICAL VARIABLES VALUE ER RHS SHADOW PRICI 42 87467 1 Or 2E 3 3 Sh Be 9 3 NODS 4 4 5 2 SO il iby 4 ails 14 mia Listing 3 Solution output for Q form in file TESTQP QRS rar aa FORTMP release version 2 03a Mar 1997 begin model name testqp input file name testqp qdt output file name testgqp qrs og file name testqp qlg 1S ILINVE UIE IPAS IS I ILIN ILS SU ID NPUT DATA STATISTICS iM NAME IS TESTQPQD R OF ROWS INCLUDING OBJ R OF COLUMNS R OF BOUNDED VA R OF NONZEROS E NUMBER OF NONZEROS PER COLUMN OF ROWS IN Q MATR
109. RACTER 12 Vil 31 FortMP Part 3 The following arguments constitute the external data interface Those labelled as DOUBLE PRECISION REAL must be DOUBLE PRECISION or REAL according to version of FortMP provided standard delivery is DOUBLE PRECISION See section 7 2 3 MR Number of rows INTEGER NC Number of columns INTEGER NAIJ Number of A matrix non zeros INTEGER NSET Number of special ordered sets INTEGER PNAME Model name CHARACTER 8 SPID SPECS identity CHARACTER TCTN Terminate control number INTEGER STSL Solution status see above INTEGER AIJ NAIJ A matrix non zeros DOUBLE PRECISION REAL ROWIN NAIJ A matrix row indices INTEGER COLIN NAIJ A matrix column indices INTEGER UPB NC Variable upper bounds DOUBLE PRECISION REAL LOB NC Variable lower bounds DOUBLE PRECISION REAL RHS MR Upper right hand sides DOUBLE PRECISION REAL LHS MR Lower right hand sides DOUBLE PRECISION REAL COST NC Objective coefficients DOUBLE PRECISION REAL MITYP NC MIP type code as follows INTEGER SREF NSET SFUN NSET SBEG NSET SEND NSET 0 Continuous 1 Binary 2 General integer 3 Semi continuous 4 SOS1 member 5 SOS2 member Reference row indices of S O sets INTEGER Function row indices of S O sets INTEGER Columns indices beginning each S O set INTEGER Columns indices ending each S O set INTEGER VCSOL 1 MR NC Primal solution values DOUBLE PRECISION BSTAT
110. S n 0 3 default is 3 which limits how many CG steps can be used for each major IPM iteration Zero necessarily implies OFF Back to Chapter contents 5 2 5 IPM Save and Restart Iteration Limit IPM restart is similar to binary basis restart in the SSX algorithm In other words the IPM algorithm periodically saves its current solution to an output file that can then be used in a subsequent run to restart the process at an advanced starting point With the IPM RESTART switch set ON the procedure bypasses calculation of the starting point and uses instead the solution supplied from a previous run The following SPECS commands control this switch IPM RESTART ON IPM RESTART OFF The default is OFF The normal frequency for making SAVEs of the solution is at every 10 iterations This may be modified with the command IPM SAVE FREQUENCY n where n is a positive integer default 10 The system also performs a SAVE when the IPM iteration limit is reached The iteration limit may be changed with the command MAXIMUM IPM ITERATIONS n where n is a positive integer the default being 80 In a restart the previous iteration count is added to the limit of the new run so that there is no need to increase it when a restart is made When a previous solution is to be used in a restart you must remember to duplicate exactly the data preparation from the previous run The user must repeat
111. S command OBJECTIVE OFFSET ON which remains OFF If omitted the value of K is set to zero Back to Chapter contents Vil 22 Chapter 7 FortMP Subroutine Library and External Data Interface 7 4 Internal SPECS Commands 7 4 1 The need for faster command entry During a single run that employs SUBMP1 to solve sub problems or uses some combination of FortMP library calls including a solver a very large number of sub problems may be solved in a very short space of time In one stochastic programming example with sub problems averaging 100 rows 500 columns and 5000 non zeros the solution rate achieved was approximately 100 sub problems per second Such rates are impossible without eliminating all the repeated opening and closing of files that could take place on every sub problem and in particular the I O required for SPECS commands Ways to achieve this are described below techniques to avoid the use of miscellaneous internal files are given later in section 7 5 Back to Chapter contents 7 4 2 Once off entry of SPECS commands In order to avoid repeated I O from the SPECS file fortmp spc it is necessary to read the file and store it internally This read in is executed in the user s main system as part of the overall initialization before any other FortMP library call is made Internal SPECS command entry is invoked with the following subroutine call CALL SPCINT TCTN Non zero is returned by TCTN if there is any error Onc
112. SCALE TCTN scales the model CALL PREMIP TCTN applies MIP pre processor to the model CALL PRSLVE TCTN applies PRESOLVE to the model and stores the operation sequence for a subsequent POSTSOLVE CALL IPMCTL STSL TCTN applies the IPM solver and basis recovery crossover CALL INPBAS TCTN sets up starting basis for PRIMAL or DUAL from the input basis MPS form CALL BBASIN TCTN sets up starting basis from one saved in binary form by a previous run CALL CRASH TCTN applies the CRASH algorithm to create a starting basis CALL UNIBAS TCTN creates the all logical starting basis CALL DUAL STSL TCTN VI 28 Chapter 7 FortMP Subroutine Library and External Data Interface applies the DUAL solver algorithm valid only of the basis is dual feasible CALL PRIMAL STSL TCTN applies the PRIMAL solver algorithm CALL PSTSLV TCTN applies POSTSOLVE to reverse the effect of PRESOLVE operations while maintaining an optimal basis CALL OUTBAS TCTN outputs the current basis in MPS proforma CALL BBASOT TCTN outputs the current basis in binary form for subsequent restart CALL MIPCTL STSL TCTN applies the Branch and Bound algorithm to solve a model with discrete variables CALL OUTPUT TCTN outputs the final solution CALL FINIAL Finishes execution and closes all files before final exit The following subrou
113. Symbolic designed for Feasibility These attributes may be described as follows Lower Triangular As described above in 10 2 1 Symbolic Actual coefficient values are not relevant and Eta creation is unnecessary thanks to the triangularity Feasibility design Selection priorities are used to promote feasibility in the eventual basic solution In order to achieve a maximum of lower triangular selection an over riding priority for row selection is given to sparsity the row should be selected that has the fewest elements on those columns which are candidates for selection Then a pivot column is selected and every other candidate column intersecting the selected row is ruled out as a pivot for later selection It is also important to keep the basis as sparse as possible and therefore the column selection itself is similarly governed by sparsity In practice there are many ties for selection based solely on sparsity both the row selection and the column selection The way in which ties are broken has a major influence on the eventual feasibility For row selection secondary priority is given to EQ type rows in order to remove artificials from the basis and thereafter to other row types according to the degree of restriction Free rows of course are never selected Ties in the column selection are X 3 Advanced Starting Bases broken by a similar consideration of the feasibility range secondary priority being given to free columns an
114. TP See note 2 in Section 8 3 7 below Input arguments are JCOL TCTN Output arguments are LOV UPV CTP MIT TCTN CALL GETRTP IROW LRHS URHS RTP TCTN This retrieves the lower RHS upper RHS and row type of a single row and places them in cells LRHS URHS and RTP See note 3 in Section 8 3 7 below Input arguments are IROW TCTN Output arguments are LRHS URHS RTP CALL CHGRIM MROW NCOL LOTAB UPTAB TPTAB TCTN This replaces all three RIM vectors Lower bounds upper bounds and variable types with the user supplied areas LOTAB UPTAB and TPTAB See notes 4 5 and 6 in Section 8 3 7 below Input arguments are MROW NCOL LOTAB MROW NCOL UPTAB MROW NCOL TPTAB MROW NCOL TCTN Output arguments are TCTN CALL CHGCTP JCOL LOV UPV CTP TCTN This changes the lower bound upper bound and variable type of a single column replacing them by cells LOV UPV and CTP See notes 4 and 6 in Section 8 3 7 below Input arguments are JCOL LOV UPV CTP TCTN Output arguments are TCTN CALL CHGRTP IROW LRHS URHS RTP TCTN This changes the lower RHS upper RHS and row type of a single row replacing them by cells LRHS URHS and RTP See notes 5 and 6 in Section 8 3 7 below Input arguments are IROW LRHS URHS RTP TCTN Output arguments are TCTN Back to Chapter contents 8 3 5 Solution Utility Specifications Solution utulities are specified as follows CALL G
115. Tableau Dimension size is MROW TPTAB INTEGER Table of variable type codes as follows 1 Plus or less than 2 Bounded 3 Fixed or equals 4 Free Row entries come first followed at position MROW 1 by column entries Dimension size is MROW NCOL TROW DOUBLE PRECISION Row vector of the updated Tableau Dimension size is MROW NCOL with rows followed by columns UPTAB DOUBLE PRECISION REAL Table of upper bound and upper RHS values Row entries come first followed at position MROW 1 by column entries Dimension size is MROW NCOL Back to Chapter contents 8 3 2 General Utility Specifications General utility subroutines are specified as follows CALL GETSIZ MROW MRACT NCOL NCMAX MAIJ NAIJ NANZ x IOBJ TCTN This retrieves problem statistics for the user It is an initial utility which the user must execute in order to be able to create arrays of the required size Input arguments are TCTN Output arguments are MROW MRACT NCOL NCMAX MAIJ NAIJ NANZ IOBJ TCTN CALL BEGCHG TCTN Begins problem change mode execution TCTN is an input output argument CALL ENDCHG TCTN Ends problem change mode execution and carries out necessary housekeeping for re entry into algorithm mode TCTN is an input output argument Back to Chapter contents 8 3 3 Matrix Utility Specifications Matrix utility subroutines are specified as follows CALL GETCOL MROW JCOL CVTAB IRTAB NCNZ OBJ TCT
116. UT TCTN CALL FINIAL RETURN END Back to Chapter contents 7 1 4 Subroutine call library specifications The full list of call library specifications for those subroutines that are called from main FORTMP is as follows CALL CALL CALL CALL CALL CALL CALL CALL CALL CALL CALL CALL CALL CALL CALL CALL CALL CALL CALL CALL MPTIME TTYP INITAL SPID INPUT TCTN GETCTL ISCL IPST SCALE TCTN PREMIP TCTN PRSLVE TCTN IPMCTL STSL INPBAS TCTN BBASIN TCTN CRASH TCTN UNIBAS TCTN TTEXT TCTN IPRE IIPM IOUT IBOT TCTN DUAL STSL TCTN PRIMAL STSL PSTSLV TCTN OUTBAS TCTN BBASOT TCTN MIPCTL STSL OUTPUT TCTN FINIAL TCTN TCTN where the arguments are as described above in 7 1 2 IBIN IMIP IBBN ICRS IDUL VI 5 FortMP Part 3 Certain rules must be followed by the users in building their own LP control subroutine 1 The general sequence of CALLs as given above must be respected 2 Just one of the five routines IPMCTL INPBAS BBASIN CRASH and UNIBAS which create a starting basis must be called prior to executing DUAL or PRIMAL 3 PRIMAL must be executed before MIPCTL as implied by rule 1 Back to Chapter contents VIl 6 Chapter 7 FortMP Subroutine Library and External Data Interface 7 2 External Data Interface 7 2 1 Introduction The external data interface is a supplement to the data input and soluti
117. WWISE lt ON OFF gt Default ON This controls the sequence of dot product calculations in DUAL normally faster row wise than column wise because the sparsity permits more skipping Some cases may arise where this is not true particularly if there is a large proportion of rows to columns INVERT MEDIUM DENSITY v INVERT RELEPS lt ON OFF gt INVERT THRESHOLD COLWISE PIVOT RATIO LIMIT V These commands control specialised tuning of the INVERT algorithm Back to Chapter contents B 13 FortMP Appendices B2 8 IPM controls algorithmic Command Manual Lowest Highest Default ref value value value IPM ALGORITHM lt AFFINE an Code 1 AFFINI PDC BARRIER PDC gt 2 BARRIER ipm algorithm n 3 PDC IPM SOLVER lt CHOLESKY SUPERNODE XSUPERNODE AUGMENTED gt ipm version n IPM STARTING POINT METHOD ipm method n The following commands are reserved for future use IPM SOLVER AUGMENTED ipm version 4 The augmented solver is currently available in a specially licensed release Back to Chapter contents Appendix B SPECS Commands B2 9 IPM controls parameters Command Manual Lowest Highest Default rer value value value IPM RELATIVE EPSILON Dt Dred 1 0d 25 TQ ipm releps v IPM FEASIBILITY EPSILON 5 2 1 1 0d 25 1 0 ipm feaseps v CHOLESKY ERROR TOLERANCE e ee 1 0d 10 MAXIMUM CG ITERATIONS 5 2 4 0 lt orF OFF T a ec a ipm weight v
118. Where a is made as large as possible without taking any variable outside its bound range so that the new point remains an interior point The predictor corrector method first predicts the directions and then corrector directions are computed The actual directions are a combination of both the predicted and corrector directions If in addition to the matrices and vectors previously defined we define X The nxn diagonal matrix comprising solution point values X X xX on the diagonal and zeros elsewhere Z S and W Diagonal nxn matrices comprising dual solution point values from the z the s and the w on the diagonal and zeros elsewhere Ax n vector of variables Ax Ax Ax Ay m vector of variables Ay Ay Ay Az As and Aw n vectors of variables constructed from the Az i the As F and the Aw j in the same way And let the predicted directions be Ax As Ay Az Aw then solving the following system of equations gives the predicted search directions AAx b Ax Ax As u x s A Ay Az Aw QAx c A y z w Ox ZAx XAz XZe WAs SAw SWe The corrector search directions Ax As Ay Az Aw are found by solving AAx b Ax Ax As u x s A Ay Az Aw OAx c A y z w Qx ZAx XAz ue XZe AX AZ WAS SAWS ue SWe AS AW The search directions Ax As Ay
119. XIMIZE is added to the sample SPECS commands This was an error in the previous version 7 4 Internal SPECS Commands 7 4 2 Once off Entry of SPECS Commands The specification of CALL SPCINT is corrected 7 4 3 Default Initialization The wording of this section is clarified 7 4 4 Common Sections in the SPECS file This is a newly added section describing the use of ALL and DEFAULT sections Chapter 8 Data Interfacing Service Utilities This chapter is not changed Chapter 9 The Interior Point Method for Quadratic Programming Newly added chapter Chapter 10 Advanced Starting Bases Newly added chapter Appendix A Input Output Data Layouts This appendix is not changed Appendix B SPECS Commands B1 3 BEGIN and END Commands Revised to include description of ALL and DEFAULT sections B2 4 Maximum Limits Control DUAL DEVEX lt ON OFF gt added B2 7 SSX Controls Parameters Pivot tolerance controls changed separate versions introduced for Primal Dual and Invert New controls added for numerical accuracy and checking New control MIP AROUND SOLVER lt SSX IPM gt added MIP PROBE ROUNDING is deleted B2 11 MIP Controls Parameters Bound and Cutoff controls extended New Appendices Added Appendix C on installation procedures Appendix D on modelling systems Appendix E on C language usage Appendix F on parallel execution Appendix G on memo
120. Y ERROR TOLERANCE v default 10 0 These commands set lower and upper levels to the solution error between which CG iterations are used to refine the major IPM iterations See 5 2 4 MAXIMUM CG ITERATIONS n 0 3 default is 3 This command limits the number of CG steps taken at each major IPM iteration See 5 2 4 IPM RESTART ON IPM RESTART OFF This command specifies whether to RESTART the IPM algorithm Default is OFF See 5 2 5 wer An IPM SAVE FREQUENCY n default n 10 This command specifies the frequency for making a SAVE in IPM See 5 2 5 MAXIMUM IPM ITERATIONS n default 80 This command sets the termination limit for IPM A SAVE is made before exit at termination See 9253 IPM LOG LEVEL n 1 4 default is 1 This command specifies the level of the output to be sent to the log file See 5 2 7 IPM GRAPHICAL DISPLAY ON IPM GRAPHICAL DISPLAY OFF Certain implementations of FortMP have the graphical feature which displays the pattern of non zeros in the matrices followed by a progress display of the iterations The default is OFF See 5 2 7 Back to Chapter contents 9 6 2 Controls for Branch and Bound Only certain of the MIP controls described in Chapter 6 are available in the simplified Branch and Bound others may be added in a future release The commands available are summarised below see section 9 5 3 above for
121. above PRIMAL regularly checks accuracy at some well defined points and takes appropriate actions usually carries out a reinversion to restore accuracy to avoid serious consequences The algorithm works with the assumption that the INVERT procedure of PRIMAL produces the most accurate numerical values Back to Chapter contents 4 3 6 Issues of Efficiency The total computational effort needed to solve an LP problem defines the efficiency Since computational effort cannot easily be measured the CPU time can be used as a measure of efficiency Since PRIMAL works entirely in the CPU it does not use disk communication during optimization its performance can be traced There are several factors that affect performance The number of candidates in sub optimization MSUB is one of them If MSUB is 1 then only one vector is selected at each pricing operation single pricing Since pricing is expensive using single pricing will lengthen the overall solution time If we go to the other extreme namely increase MSUB beyond 6 the memory requirement goes up considerably each selected column must be stored explicitly in double precision and later minor iterations in the sub optimization tend to be locally good and globally less valuable This usually results in an increase of the total number of iterations that may not be offset by the increased iteration speed At the same time it also may happen that only a smaller part of the selected and updated v
122. ack to Chapter contents 6 2 5 MIP model definition The classes of discrete variables are described in the previous sections as Binary General integer Semi Continuous variables and Special Ordered Set variables of type One and type Two A statement of the general discrete programming problem DPP which contains the above types of variables and sets as well as continuous variables is set out below Consider the index sets N1 N7 which are used to specify the different variable types N set of indices of bounded variables 1 5x Su JEN 7 where either l or u may be infinite but not both set of indices of free variables I 00 lt x lt JEN 8 N Set of indices of binary variables x Oorl jeEN 9 N set of indices of general integer variables l lt x lt u and x integer j N 10 N setof indices of semi continuous variables either 0 lt 1 lt x Su JEN 11 or x 0 N U N where N is the set of indices of the SOS 1 type variable set these sets l being mutually exclusive of each other x 20 FEN Gs 1a lal 12 FortMP Part 2 L Number of SOS1s and only one x can be non zero in each set N Ln where WN is the set of indices of the ln SOS2 type variable set these sets being als exclusive of each other Ke Oe re Ney el Vath 13 L Number of SOS2s and at most two adjacent x s can be non zero in each set These index sets
123. al Programming 4 155 710 1973 6 7 8 9 10 11 12 13 14 15 BENICHOU B M etal Experiments in Mixed Integer Linear Programming Mathematical Programming 1 76 94 1971 FORREST J J H and TOMLIN J A Updated Triangular Factors of the Basis to Maintain Sparsity in the Product Form Simplex Method Mathematical Programming 3 263 278 1972 MITRA G and TAMIZ M Alternative Methods for Representing the Inverse of Linear Programming Basis Matrices Recent Developments in Mathematical Programming 273 302 Edited by Santosh Kumar Gordon amp Breach 1989 MURTAGH B A and SAUNDERS M A MINOS 5 1 User s Guide Technical Report SOL 83 20R Department of Operational Research Stanford University 1983 DARBY DOWMAN K An Investigation of Algorithms used in the Restructuring of Linear Programming Basis Matrices Prior to Inversion PhD Thesis Brunel University 1979 TAMIZ M Design Implementation and Testing of a General Linear Programming System Exploiting Sparsity PhD Thesis Brunel University December 1986 TAMIZ M and MITRA G FortLP A Linear and Integer Programming System NAG Newsletter October 1989 LEVKOVITZ R An Investigation of Interior Point Methods for Large Scale Linear Programs Theory and Computational Algorithms PhD Thesis Brunel University 1992 LEVKOVITZ R Solving Large Scale Linear Programming Problems using an Interior Point Method on Ve
124. all three RIM vectors Lower bounds upper bounds and variable types CHGRTP change row type Changes the lower RHS upper RHS and row type of a single row GETCTP get column type Retrieves the lower bound upper bound variable type and MIP variable type of a single column GETRIM Retrieves all three RIM vectors Lower bounds upper bounds and variable types together with the vector of MIP variable types and places them in user supplied areas GETRTP get row type Retrieves the lower RHS upper RHS and row type of a single row Note that the deletion of a row or column can be accomplished in effect by using CHGRTP or CHGCTP To delete a row give type Free code 4 To delete a column give type Fixed code 3 together with the associated fixed value stated both in lower bound and in upper bound Back to Chapter contents 8 2 4 Solution Facilities GETDSL Retrieves the dual solution vector together with associated status codes and places them in user supplied areas GETSOL Retrieves the primal solution vector together with associated status codes and places them in user supplied areas Back to Chapter contents 8 2 5 Tableau Facilities Tableau facities enable user to obtain acces to the updated Tableau or matrix after pre multiplication by the inverse basis matrix GTABLC Calculates one column of the updated tableau GTABLR Calculates one row of the updated tableau Back to Chapter contents
125. apter by chapter Chapter 1 Introduction and background This chapter is not changed Chapter 2 Elementary use of FortMP This chapter is not changed Chapter 3 Overview of the Stand Alone FortMP System 3 1 Introduction and overview 3 1 1 The algorithms employed Mention is added of supporting algorithms BASREC IPM SSX crossover MIP Pre processor 3 1 5 Overall structure of the system The diagram Figure 3 is amended to include Postsolve following Primal The existing section 3 2 3 is renumbered as 3 2 4 and a new section 3 2 3 is added 3 2 3 Free Format MPS and Long Data Names This newly added section introduces commands INPUT TYPE FREE INPUT LONG NAMES and describes the corresponding changes in MPS form input 3 2 4 Other types of input data Previously this was section 3 2 3 3 3 4 Running Mixed Integer The following new commands are described here MIP PREPROCESS lt ON OFF gt MIP PRIORITY UP lt ON OFF gt introducing new features together with MAXIMUM MIP NODES n MAXIMUM MIP TIME v introducing new limits and NODE LOG FREQUENCY n to provide for reduced volume of node logging 3 3 5 Using the PRESOLVE algorithm Presolve level maximum is changed to 5 new default and the following command is added PRESOLVE LOG LEVEL n 3 4 3 Log File Output Minimum log level is now zero instead of one Level zero suppresses all logs except for error messages The following
126. are ignored Back to Chapter contents B2 Command descriptions In the tables that follow the range of possible values is given for each command together with the coding and default value This is intended as a reference for the user to find the syntax of any command quickly The tables also give the reference in this manual to the chapter and section where each command is specified and references to other relevant sections In addition to commands already described in the manual there are additional commands for specialised purposes The description of these commands is given with manual reference to Appendix Also included in the tables are several commands shown in lower case lettering These are alternative forms for other commands mentioned in upper case above the lower case command which have been retained for compatibility with earlier versions of FortMP Back to Chapter contents B2 1 Model name and data file names Command Manual Lowest Highest Default ref value Value value ooer aa wman o na mron rue va nem oe a ooror rrue woe enem e OOO Ge e Below BBASIS FILE NAME fnam AGENDA FILE NAME fnam B 5 FortMP Appendices DIRECTORY NAME pthnam PATH NAME pthnam Default for all file names is initially blank and unless entered by command is then set to modname xtn where modname is the model name xtn is a 3 character extension The following additional commands are
127. are mutually exclusive that is N NAN 17 forp q p 7 1 and thus the total numbet of variables defined is n where n Y iN I 14 where IN l is the cardinality of the set N Using these set definitions a general discrete programming model may be presented as Minimise Tek 15 j 1 subject to constraints lt Y azs beP 16 j l where l lt x Ka JENN co lt lu lt i 0 lt x lt 00 JEN 17 0 lt x lt 1 JEN Osx Su je N x 20 je NUN with further discrete restrictions VI 10 Chapter 6 Mixed Integer Programming MIP x Oorl ifje N x integer ifjeN either O lt lt x lt u EN i or x 0 JE 5 7 Only one x can be non zero if je Na and at most two adjacent x can be non zero if je Na The model therefore has m rows given by 16 and n columns given by 14 In the normal usage of special ordered sets to represent separable variables discrete or piecewise linear the constraints 16 include function rows reference rows and convexity rows as defined in 6 2 3 and 6 2 4 Back to Chapter contents VI 11 FortMP Part 2 6 3 MIP Data Preparation Marker lines Integer binary and semi continuous variables may be specified in the MPS form input data by using codes in the BOUNDS section as illustrated in table 14 of Chapter 2 As an alternative the user may employ MARKER lines in the COLUMNS section to specify a list of consecutively sequence
128. ary parentheses are a part of the syntax and may not be omitted Angle brackets are used for alternatives separated by a slash for example INPUT TYPE lt MPS FREE MG MPL gt implies four possible alternative commands INPUT TYPE MPS INPUT TYPE FREE INPUT TYPE MG and INPUT TYPE MPL Extra blank spacing may be added before or between syntactic components Blank spacing must not be embedded within a component Back to Chapter contents B1 2 Simplification and abbreviation It is possible to omit the SPECS file altogether when all commands are to be assigned to their defaults Input problem data is in MPS format on the file named model mps Any command may be omitted and in such a case the system assumes a default setting All keywords may be abbreviated to the first 4 or more letters The first keyword only may be abbreviated to the first 3 letters so long as no ambiguity arises For example MAXIMIZE could be written as MAXIM MAXI or as MAX No confusion arises because MAXIMUM is always followed by a further keyword The syntax lt ON OFF gt may be omitted in all cases signifying ON In principal it should be given as lt ON OFF gt but for simplicity this has not been done For example the command SCALE is the same as SCALE ON and CRASH is the same as CRASH ON although these two commands have opposite defaults Back to Chapter contents B 3 FortMP Appendices B1 3 BEGIN and END comma
129. ather than integer UI Back to Chapter contents 6 3 4 Defining a Special Ordered Set SOSORG and SOSEND markers are used to outline each Special Ordered Set in the model In Field 1 of the SOSORG marker there is a 2 character code which specifies the SOS type as follows S1 indicates type 1 S2 indicates type 2 In Field 5 or in Field 4 if Field 5 contains SOSORG the user can enter the name of the reference row of the SOS If it is left blank the system assumes an implicit reference row having whole number coefficients 1 2 3 for the set members in their order Back to Chapter contents VI 14 Chapter 6 Mixed Integer Programming MIP 6 3 5 An Example A small Discrete Programming model is set out here to show how binary integer semi continuous and SOS type variables are presented in MPSX format Consider the following model M i Minimise 3x1 4x2 5X3 x4 filxs fo x6 f3 x7 subject to 2x1 3x2 4x3 X4 x5 2x6 3x7 lt 25 5x2 3X3 X4 3x6 50 6X 3x2 2x5 x7 100 x 100x4 lt 0 where 0 lt x lt 100 x2 is integer and 0 lt x2 lt 20 x3 is semi continuous x O or 1 lt x3 lt 10 x4 is binary xz O or 1 fi xs is a discrete separable function comprising the following co ordinates undefined otherwise fa x6 is a piecewise linear form connecting the following set of co ordinates undefined for xs lt 0 and for x5 gt 3
130. atural In modern data entry it is not natural for an operator to use the keyboard in this way Rather the data is seen as a Series of items or tokens to be entered in a particular order where the tokens correspond to the fields of fixed form data entry Data lines replace cards these being separated by new line entries on the keyboard and the tokens are separated from each other by using certain special characters that cannot be used in a token In Free Format MPS data input for FortMP the first field positions 2 3 remains in fixed form completely unchanged Fields 2 to 6 from position 5 to the end of a line are replaced by tokens with blank spaces acting as separator Any number of spaces are equivalent to a single space so that the data may be padded out with blanks to arrange in columns for better viewing In fact most ordinary fixed form MPS data files are also quite valid as free format data files provided the unused gaps between fields are blank and provided there are no blank names or names with interior blank spaces Free format data is invoked with the SPECS command INPUT TYPE FREE TT 1A which must be given as the default type is MPS Some additional points are to be noted Comment Lines Any line beginning with asterisk in position 1 is ignored by the input Row and Column Names Row and column names are normally restricted to 8 characters This can be enlarged to 16 characters with t
131. available AGENDA FILE NAME fnam BBASIS FILE NAME fnam These commands assign names to the corresponding input files the output files always receive the default file name Back to Chapter contents B2 2 Input type and problem selection Command Manual Lowest Highest Default ref value value value MAXIMIZE O MIN 1 MAX MIN INPUT TYPE lt MPS FREE MG MPL gt a Code 1 MPS input type inf ae 2 FREE 3 MG MPL inf INPUT INTORG UPPER BOUND See ee OBJECTIVE NAME OBJECTIVE NAME objname INPUT SAVE NAMES lt ON OFF gt O OFF OFF B 6 Appendix B SPECS Commands INPUT PERTURBATION Code O OFF 1 Fixed 2 Variable INPUT ERRORS ACCEPTED Below O Not 1 Not acc ptd acc ptd acc ptd The default INPUT INTORG BOUND 0 is translated to a high value i e variables specified as integer by INTORG markers have no upper bound The following additional commands are available INPUT PERTURBATION n Default 0 The above command may invoke perturbations applied to the RHS immediately after INPUT occasionally useful to resolve problems MAXIMUM INPUT ERRORS n Default 50 INPUT ERRORS ACCEPTED Default Not accepted These commands control the handling of non trivial errors in the data input MAXIMUM INPUT ERRORS controls how many can be accepted after which an abort will occur whether ACCEPTED or not INPUT ERRORS ACCEPTED allows the calculations to proceed provided that less than
132. avelling salesman Scheduling and Logic programming provide instances of models which include binary variables General Integer variables are used to model entities where non integer values are not meaningful For example the production of items in batches of a fixed size can only be realistically modelled if the model excludes the possibility of non integer numbers of batches being produced Back to Chapter contents VI 4 Chapter 6 Mixed Integer Programming MIP 6 2 2 Semi Continuous Variables A Semi Continuous variable SC is a variable which may take the value zero or any value within a certain range bounded by positive finite lower and upper bounds figure 1 Thus these variables are used to represent activities which if used at all must have a usage above a specified minimum level Figure 1 The situation arises for example in certain blending problems where materials must be excluded from the blend if they cannot be used in significant quantities It has been modelled by the introduction of a decision variables to represent whether or not a material is to be included Consider a blending problem which has the requirement that if the j material is used at all then it must be used at a level between J and u Define a zero one variable 5 in connection with each material amount x The semi continuous requirement is established by the two constraints l S x xj Sus of a type known respectively as variable lower b
133. blem 9 1 1 The QP Problem Symmetric Q form FortMP IPM for QP is a primal dual approach to the solution of the separable convex QP problem The primal QP problem may be stated as follows poa eee Oe Minimise c x z Qx subject to the conditions Ax b x s u x s20 Where A isan m Xn matrix of coefficients ajj c isan n vector of the cost coefficients c C C X isan n vector of the structural variables x X X u isan N vector of upper bounds w u U S isan n vector of variables s s s compliment to x with respect to the upper bounds u Q isan n X n symmetric positive semi definite matrix The dual problem may be stated as follows Maximise b y TsO u w subject to the conditions A y z Ox w c Zw20 wer a Where the variables y i 1 m are dual variables complementary to the original rows of the primal statement above z j 1 2 are dual variables complementary to the x andw j 1 are dual variables complementary to the s Back to Chapter contents 9 1 2 The QP problem Separable FF Form FortMP currently only handles the case in which it is possible to reformulate Q as Q FF This leads to a separable formulation of the QP problem which in the case of the primal problem may be stated as Shes 1 Minimise c x p p 2 Subject to the conditions Ax b F x p 0 x s u x s20 co lt p lt In order that the separable formulation
134. can be known in various ways for instance from a previous execution of FortMP with the same or very similar problem data from a known situation in the real world from executing an independent heuristic program that does not necessarily determine the integer optimum If the solution is good that is close to the integer optimum it is desirable for the system to establish it as quickly as possible so as to provide a cutoff point which limits the tree search There are two ways to do this FIXTRY VI 25 FortMP Part 2 Under the FIXTRY option the system sets up the given integer solution immediately after entry as a special sub problem entirely separate from the tree The sub problem is solved and if it does indeed prove to be feasible and satisfy all the discrete restrictions then its solution value provides the initial cutoff FIXMIX Under the FIXMIX option the system gives absolute priority at step 3 node selection to any node in the tree for which the established constraints at that stage of the branching do not conflict with the given integer solution When every discrete entity is given a value set of values for an SOS there can be only one such node unsolved in the tree and the tree development must therefore follow a direct path to the solution if it is in fact feasible Once the FIXMIX solution has been established or proved infeasible then this priority ceases to have effect and the normal criteria
135. codes 1 2 3 4 MIP type codes cannot be modified 3 Solution vectors cannot be modified Row values Structural values Primal solution status codes Reduced costs Shadow prices Dual solution status codes 4 Updated Tableau cannot be modified B LAij Back to Chapter contents 8 1 3 Description of the Utilities Each of the access utilities provided falls into one of four categories General utilities provide necessary housekeeping GET utilities retrieve data and present it to the user without making any change CHG utilities change certain specific items in the data ADD utilities for matrix rows and columns do not actually add new rows or columns to the matrix but rather activate an existing spare row or column which has been provided in advance See Section 8 1 5 below Utilities are provided in connection with the following data categories 1 Matrix data Utilities are provided to GET or CHG by row or by column and individually for single elements ADD utilities are provided for a row or for a column 2 RIM data Utilities are provided to GET or CHG all the RIM vectors or simply to GET or CHG a single position within the RIM vectors Exceptionally the MIP type code vector may be accessed with GET but cannot be changed with CHG 3 PRIMAL and DUAL solutions GET utilities are provided for both primal and dual solu
136. column in the data The value in Field 4 is assigned to every variable in this range inclusive of the start and end column All values are initially assigned to be zero and these defaults are over written when a record provides data The data of one record may also be over written by a later record These arrangements permit the modeller to specify a default or use default zero for a wide range and simply enter exceptions For convenience the column range may include ordinary continuous variables which are just ignored The following is an example of agenda data for the model example of section 6 3 AGENDA FIXMIX X2 X3 5 40 X4 X4 L0 X15 XS O X22 X23 ORS X33 X34 ORFS BROR TER X4 X4 3 X2 X2 2 X3 X3 1 ENDATA In this example the binary variable has first priority the integer variable has second and the semi continuous variable has third The special ordered sets have zero priority and will not be branched if VI 27 FortMP Part 2 a choice of another kind is available Also in this solution the FIX solution corresponds to the integer optimum Precise values for the adjacent pair to be non zero in each SOS2 is not significant and need not be given Back to Chapter contents 6 6 4 SPECS commands for AGENDA input The agenda file will be input when the following SPECS command is given MIP AGENDA INPUT ON default OFF OFF may also be used Back to Chapter contents 6 6 5 SPECS commands for AGENDA output An agenda
137. contents w aa 3 Overview of the Stand alone FortMP System Contents 3 OVERVIEW OF THE STAND ALONE FORTMP SYSTEM 3 1 Introduction and Overview 3 1 1 The Algorithms Employed by FortMP 3 1 2 Sparse Simplex SSX PRIMAL DUAL and INVERT 3 1 3 Interior Point Method IPM When and When Not to Use 3 1 4 Mixed Integer MIP with the Branch and Bound Method 3 1 5 Overall Structure of the System 3 1 6 Providing Controls on the SPECS File 3 2 Data Preparation 3 2 1 MPS Format 3 2 2 Matrix Generator Format 3 2 3 Free Format MPS and Long Data Names 3 2 4 Other Types of Input Data 3 3 Running the System 3 3 1 Using SSX 3 3 2 Setting up a Starting Basis for SSX 3 3 3 Using IPM 3 3 4 Running Mixed Integer 3 35 Using the PRESOLVE Algorithm 3 3 6 Using the SCALE Algorithm 3 4 Output Descriptions 3 4 1 Standard Output Description 3 4 2 Report Writer Output 3 4 3 Log File Output 3 4 4 Suppressing Output 3 5 Further Topics 3 5 1 Saving and Restarting 3 5 2 Bypassing the Initial MPS Input 3 5 3 BASIS Input and Output 3 6 Input and Output Files in FortMP 3 7 Errors and Recovery 3 7 1 Data Errors 3 7 2 Maximum Iterations Reached or Other Limit Exceeded 3 7 3 Numerical Difficulties and Instability 3 7 4 Running Out of Memory 3 7 5 Software Errors 3 8 Summary of SPECS Commands 20 21 21 21 22 22 23 24 TIT 1 3 1 Introduction and Overview 3 1 1 The Algorithms Employed by FortMP FortMP is a highly advanced syst
138. cted by the following two commands MIP FNODCHOICE n n 1 7 default MIP SNODCHOICE n n 1 7 default n 1 n 7 g C where FNODCHOICE governs the initial search up to the first integer solution and SNODCHOICE governs the search thereafter Both commands have the same options and in order to specify them we define the following terms relating to each node Number Non integer Number of violated global entities in the solution Fractional Sum Sum of fractionalities associated with all the violated entities in the solution Deterioration Difference between the objective values of the node solution and the solution at the root node z pr z p Projection The predicted integer solution based on a heuristic when the current branch is pursued to its end The projection heuristic assumes that fractional sum will decrease uniformly with further deterioration in the objective as the branching proceeds Now the options for FNODCHOICE and SNODCHOICE are n 1 Lastin first out This is the default for FNODCHOICE n 2_ First in first out n 3 Choose a node with minimum deterioration n 4 Choose a node with maximum deterioration VI 23 FortMP Part 2 Choose a node with minimum number non integer Choose a node with minimum fractionality Best projection criterion that is choose node on a branch predicted to reach the best integer solution This is the default for SNODCHOICE
139. ction to Crossover The Push Algorithms The starting CRASH User Controls Logged Output from Crossover Algorithms 10 4 Iterative Crash Algorithm 10 4 1 10 4 2 10 4 3 10 4 4 10 4 5 Introduction to CRASH SOR The iterative SOR procedure Crossover User Controls Logged Output from the SOR algorithm 10 5 Summary of SPECS Commands 10 5 1 10 5 2 10 5 3 Primary Crash Commands Crossover Commands SOR Commands aA R RWW Ww Comoaonnrnn 13 13 13 14 Advanced Starting Bases 10 1 Introduction Two main kinds of solver for LP problems have been described and are available in the FortMP system Simplex algorithms Primal and Dual Interior Point Method IPM Both can obtain optimal solutions but only Simplex can obtain a basic optimal solution that is one with exactly m basic and n non basic variables see chapter 4 section 4 1 Because post optimal work including MIP always requires the solver to find a basic solution Simplex is the preferred solver and occasions where the end user can be satisfied with an IPM solution are exceptional However Simplex requires a basic solution before it even starts of course not necessarily optimal or even feasible One such is the UNIT basis obtained by fixing all structural variables to be non basic at lower bound and the logical variables are basic The unit basis leaves Simplex with all the work still to do and a procedure that creates a more advanced starting
140. ctor Processors Departmental Report Brunel University 1993 HAJIAN M Computational Methods for Discrete Programming Problems PhD Thesis Brunel University 1992 16 17 18 19 20 21 22 23 24 25 HAI I HAJIAN M and MITRA G A Distributed Processing Algorithm for Solving Integer Programs using a Cluster of Workstations To appear in Parallel Computing Elsevier Press 1997 MAROS I A General Phase I Method in Linear Programming European Journal of Operational Research 23 64 77 1986 MAROS I Adaptivity in Linear Programming IT in Hungarian Alkalmazott Matematikai Lapok Journal of Applied Mathematics Budapest 7 1 71 1981 LEVKOVITZ R and MITRA G Solution of Large scale Linear Programs A Review of Hardware Software and Algorithmic Issues Optimisation in Industry 1993 MAROS I and MITRA G Recent advances in Linear and Integer Programming From Simplex Algorithms Chapter 1 Oxford University Press editor J BEASLEY MAROS I and MITRA G Strategies for Creating Advanced Bases for Large Scale Linear Programming Problems INFORMS Journal on Computing USA submitted now under revision FORREST J J H HIRST J P H and TOMLIN J A Practical Solutions of Large Mixed Integer Programming Problems with UPMPIRE Management Science 20 5 1974 pp736 773 GAUTHIER J M and RIBIERE G Experiments in Mixed Integer Programming using Pseudo Costs Mathema
141. d VI 3 FortMP Part 3 TCTN is set to zero by subroutine INITAL which should never give a fatal error Thereafter it is used as an input by the remaining subroutines which will halt immediately without executing anything further if they find that TCTN has a non zero value Thus it acts as a bypass to the final exit if a fatal error occurs at any point during the execution The following is a list of the switches controlling the FORTMP main routine in each case 1 YES 0 NO ISCL Whether to scale the data IPRE Whether to PRESOLVE IIPM Whether to use IPM as the principal solver IBIN Whether to start SSX solvers from an MPS input basis IBBN Whether to re start SSX solvers from a saved binary basis ICRS Whether to crash to a starting basis for SSX solvers IDUL Whether to use DUAL as the principal solver IPST Whether to POSTSOLVE IBOT Whether to output an MPS form basis of the LP optimal solution IMIP Whether Branch and Bound is to be applied after solving the relaxed LP for a problem having discrete variable types IOUT Whether to output the final solution There are also two parameters associated with the timing routine as follows TTYP Type Zero to start the timer at the outset and One otherwise TTEXT 12 character text to identify the execution that is timed Each call with TTYP 1 records the time taken since the previous call of the timer In practice both ttyp and ttext are passed to the timer routine MPTIME as co
142. d IPM algorithms Barrier Affine and Predictor Corrector based on the Primal Dual Logarithmic Barrier Method Mixed Integer Programming MIP problems including SOS1 and SOS2 are solved using a Branch and Bound tree search algorithm Back to Chapter contents 1 2 Background FortMP is an update of the FortLP system and has been developed through continuing research at the Department of Mathematics and Statistics Brunel University under the leadership of Professor Gautam Mitra A number of funding bodies and industrial partners have supported this research The Science and Engineering Research Council of the UK and the Department of Trade and Industry UK have funded some of the research and development work NAG Ltd has been an active collaborator on this project since 1985 Other industrial organisations whose funding and contributions have helped this development include Digital Equipment Corporation s European research initiative British Gas plc Parsytec Ltd and the US Army s European Research Office A number of people have worked at various stages of this project Some of the work on inversion was started by Dr K Darby Dowman 10 and was extended by Dr M Tamiz in his PhD as well as his postdoctoral work 11 12 The Interior Point Method was developed by Dr R Levkovitz 13 during and after his PhD work Dr R Levkovitz has also helped in various vectorisation and parallelisation studies 14 19 Most of the integer progra
143. d a continued search can be restarted in the following run VI 35 FortMP Part 2 MAXIMUM MIP NODES n default 50 000 Specifies the maximum number of nodes i e sub problem solutions that can be attempted MAXIMUM MIP TIME v default 50000 0 Gives the maximum number of seconds for which the MIP algorithm may run MAXIMUM MIP INTEGER SOLUTIONS n MAXIMUM MIP INTSOL n default 300 Either of the above commands sets a limit to the number of integer feasible solutions and the run halts when this number is reached There may be separate limits given for the restricted AUTO ROUND tree developed first in the event that user specifies auto rounding During auto rounding no tree saves are made The commands are MAXIMUM AROUND NODES n default 5000 Specifies the maximum number of nodes i e sub problem solutions that can be attempted Auto round nodes do not count towards the MIP limit MAXIMUM AROUND TIME v default 5000 0 Gives the maximum number of seconds for which the auto round tree search may run Auto round search time does not count towards the MIP limit MAXIMUM AROUND INTEGER SOLUTIONS n MAXIMUM AROUND INTSOL n default 1 Either of the above commands sets a limit to the number of integer feasible solutions and the auto rounded tree search halts when this number is reached The integer solutions found by auto rounding do count towards the maximum for MIP as a whole unlike the oth
144. d binary or integer variables MARKER lines in the COLUMNS section are also the means whereby special ordered sets of type SOS1 and SOS2 are defined Their usage in FortMP corresponds to IBM s extension to MPS format in their MPSX system Certain variations are also available to conform with usage by other systems Back to Chapter contents 6 3 1 Defining Binary Integer and Semi continuous variables in the BOUNDS section Binary Integer and Semi continuous variables can be defined in the BOUNDS section of the MPS file using the following type codes in field 1 BV indicates that the variable in Field 3 is a binary variable restricted to discrete values zero and one UI indicates that the variable defined in Field 3 is an integer variable with upper bound given by the value in field 4 rounded down to the nearest integer The lower bound is 0 unless explicitly defined with a record that has LO or LI as the type code in field one LI indicates that the variable defined in Field 3 is an integer variable with lower bound given by the value in field 4 rounded up to the nearest integer The upper bound is infinite unless explicitly defined with a record that has UP or UI as the type code in field one SC Indicates that the variable named in Field 3 is semi continuous with upper bound of the continuous range given by the value in Field 4 An SC specification cannot be combined with any other BOUNDS specification for that variable Lower bound of
145. d so on with fixed columns never selected in any case Studies have shown that a good measure of feasibility is achieved in most cases with fewer iterations needed in phase 1 of a following Primal solve algorithm Back to Chapter contents 10 2 3 CRASH ART This CRASH procedure is a follow up to CRASH LTSF designed specifically to exclude artificials that is logicals on EQ type rows from the basis in so far as this is possible Here of course the selection is no longer triangular or purely symbolic Each column must be tried out before selection and updated by the previous pivot steps in order to ensure that the selected basis will be non singular Priority for row selection is absolute only artificials can be selected Column selection is based on a heuristic designed to eliminate any obviously singular choices and secure the stability of the eventual inverse by choosing pivots of a reasonable size Back to Chapter contents 10 2 4 CRASH ADG This CRASH procedure is designed to counter degeneracy in the eventual basis Anti degeneracy It is a modification of CRASH LTSF in which the secondary criterion for row selection is modified so as to promote a reduction in the degeneracy that often appears at the outset of the Primal algorithm Such degeneracy is simply the result of the initial basic solution having a large proportion of zero values In order to overcome it priority must be given to selection of pivot rows where th
146. ds described below Back to Chapter contents 4 4 5 Numerical Features Several SPECS commands are available to adjust the controls on pivot tolerance updating accuracy and accuracy check by comparing results evaluated separately by the forward and backward tansformations The standard default setting for these controls have been chosen to balance the demands of efficiency and reliablilityfor the great majority of problems In cases of special difficulty it may be possible to obtain better performance by changing them Back to Chapter contents NT 1A 4 5 INVERT At each basis change the representation of the inverse of the basis ETA file which is not really a file but a set of arrays in the main memory gets appended by some newly created vector s After several iterations this representation can grow quite large which may become a problem in itself because of the limited memory available However there are two other problems arising here The operations with the inverse become more and more time consuming because of the growing number of non zero elements in the inverse Furthermore the newly created components are computed from earlier ones and therefore inherit their inaccuracies in addition to their own As a result as we make more iterations after a reinversion operations become slower and less accurate When this reaches a critical level a reinversion must be carried out The main purpose of INVERT is to refresh the
147. e ENDATA line The header keyword for this section is QDATA and the layout is similar to that of the normal COLUMNS data lines but with column names in the place of row names as follows Field 1 cols 2 3 Blank Field 2 cols 5 12 Column name Field 3 cols 15 22 Column name Field 4 cols 25 36 Value Field 5 cols 15 22 Column name optional Field 6 cols 25 36 Value if field 5 is entered The user enters only the diagonal and upper triangular coefficients of the Q matrix with the name that corresponds to the row in field 2 and names corresponding to columns in fields 3 and 5 It follows that no coupling of columns in fields 2 and 4 or in fields 2 and 5 can be repeated in the opposite order The normal rule of continuity also applies that is Rows of the Q matrix defined by field 2 may not be split The following restriction also applies Q matrix rows that is the columns named in field 2 must appear in the same order as in the COLUMNS section even though this may differ from the natural triangular ordering of the Q matrix field 3 and field 5 columns may be named in any order This restriction is only necessary to support the present release of FortMP and may be removed in the future Example m Ly 5 OS ay dts ye hee INIMUSE X x 2 x x 5 10 x Subject to x x gt 10 Xp X Z0 The input data for the above problem is Back to Chapter contents 9 3 2 Matrix I
148. e SPCINT has been called the internal procedure INITAL automatically avoids file input for the SPECS commands and uses the internal store with no other change on the user s part Back to Chapter contents 7 4 3 Default initialisation Defaults for all SPECS commands are stored in a memory region that is initialized when the system is loaded A library routine is available for the user to change these defaults and by this means the necessity for a SPECS file may be entirely avoided in many cases The library routine can only change defaults and not to actual parameters Interference with the actual control parameters would be dangerous because there are several inter dependencies checked at the time of SPECS command entry However changes to the defaults cannot cause any harm provided that in every case the user respects the maximum and minimum limits given for each separate control In order to do this the following call is made CALL SPCDFT COMMND TCTN VI 23 FortMP Part 3 where COMMND is a text of up to 50 characters holding the actual SPECS command If the command cannot be recognized then TCTN is returned with a non zero value indicating the error as follows 1 4 Corresponding keyword not recognized gt Value out of range If this system is employed as a way to avoid use of a SPECS file then the parameter SPID 8 characters must be assigned as follows SPID NOSPECS before each call to library routines SUBM
149. e develop a basis without either creating infeasibility or degrading the objective value An initial starting basis can be created by using the CRASH tools described above in 10 2 This basis now leaves the solution in an anomalous situation because a certain number of the non basic variables are neither equal to lower bound nor equal to upper bound They are called Super basic In the case of IPM which provides solutions to both the primal and the dual problems there exist both primal super basic variables and dual super basic variables We now modify the basis with iterative Purify algorithms which eliminate the super basic variables one by one There are two Purify algorithms also known as PUSH algorithms as follows Primal Push which eliminates primal super basics Dual Push which eliminates dual super basics The Dual Push algorithm itself can start with a fast crashing stage that makes exchanges without updating the Eta file This is referred to as Dual Crash Push If there is only a primal solution known at the outset then only the primal push can be employed In the case of IPM both primal and dual solutions are known and are additionally both feasible and optimal As shown by Megiddo who described the push algorithms in such a case primal push followed by dual push should yield a basic solution that is immediately an optimal solution not requiring any further iterations in the primal algorithm The number
150. e found quite simple because FORTMP is simply a driving routine that calls a sequence of library subroutines in order to carry out the work Subroutines that can be called by FORTMP are MPTIME Routine to create time reports INITAL Initialises and reads the SPECS control file INPUT Reads the input data including input basis if any GETCTL Obtains the control switches SCALE Performs scaling PREMIP MIP pre processor PRSLVE Carries out PRESOLVE IPMCTL Controls execution of IPM and basis recovery INPBAS Sets up the input MPS format basis BBASIN Reads and sets up the saved binary basis CRASH Carries out CRASH starting basis procedure UNIBAS Sets up the UNIT starting basis DUAL Executes the DUAL algorithm PRIMAL Executes the PRIMAL algorithm PSTSLV Carries out POSTSOLVE BASOUT Writes the output MPS format basis BBASOT Writes the output binary save basis Vil 2 Chapter 7 FortMP Subroutine Library and External Data Interface MIPCTL Controls execution of MIP OUTPUT Writes the solution output FINIAL Finishes execution and closes any open files Almost all the execution is conditional controlled by the switches which the user can set to ON or OFF in the SPECS commands Those switches that control the main FORTMP operation are recovered by subroutine GETCTL and their details may be clearly understood by reference to the source code of the main control routine of which a documented copy is provided Back to Chapter contents 7
151. e so that in the simplest case the user need not provide SPECS commands Each SPECS command is presented on one line and consists of one or more keywords followed by a value which depending on the command may be either a name or text string enclosed in parentheses a numerical value optionally after an sign or a switch ON or OFF if omitted then ON is assumed Examples are MODEL NAME testin MAXIMIZE PRESOLVE ON INVERT FREQUENCY 75 Additional examples have been given in Chapter 2 Section 2 2 Details of the syntax of every SPECS command are given in the Appendix B All keywords may be abbreviated to the first four or more letters and the first keyword only may be abbreviated to the first three letters The asterisk character acts as a line terminator so that the user may include comments to the right Users may also include whole comment lines by putting an asterisk in column 1 The above commands could be written as MOD NAME testin Filenames are testin mps testin res testin log MAX PRE INV FREQ 75 NB default is 50 However for the sake of clarity it is better not to abbreviate too much WT 7 The system does not use every line in the SPECS file regardless but only that part of the file which is delimited between the two indicator commands BEGIN and END The complete example without abbreviation would be BEGIN MODEL NAME testin MAXIMIZE
152. e solution value is non zero As a result the non zeros are propagated elsewhere when the basis exchange is applied In order to apply this priority the RHS must be updated at each basis exchange However the procedure remains Symbolic because actual values are not needed only a set of markers to show where the non zeros were originally and where fill in took place CRASH ADG is controlled by the ADG Factor which is a code expressing at what level the ADG criterion is to take priority over the Feasibility criterion in the row selection By default EQ type rows take priority then come the selected rows of the ADG criterion and then come the other row types However this can be changed by means of a SPECS command or the ADG criterion can be ignored altogether Back to Chapter contents 10 2 5 User Controls Although CRASH LTSF has been described as purely symbolic in practice this is not so because values can sometimes be important In certain cases a basis can be chosen which although triangular and hence strictly non singular nevertheless results in numerical X 4 FortMP Manual CRASH supplement difficulty If a large number of the selected pivots have small values then the application of the inverse can lead to a progressively expanding numerical error in the calculation For this reason a control is applied to prevent selection of any pivot whose size is less than a certain fraction of the maximum element size in tha
153. eatures are usually omitted as a consequence Now there is a new input feature available which reads from MPS form or from any other FortMP data form and makes the data available to a user via the external data interface in the same layout as that used for passing data to SUBMP1 Features are added to enable users to look up names or classes of name so that they can program according to the data structure Miscellaneous additions In the PRIMAL algorithm a weighted column selection procedure DEVEX has been added as an option good for some models In the DUAL algorithm a pivot choice to counter degeneracy has been added as an option In the IPM algorithm the chances of instability occurring are greatly reduced by Conjugate Gradient iterations added as a refinement to the main iterative process The crossover from IPM to SSX basis recovery or BASREC has been substantially improved and no longer extends solution time by a large amount Internal data interfacing routines are augmented by facilities to access the updated tableau Research programs Newly developed algorithms include Quadratic Programming Stochastic Programming and a suite of CUT generating procedures for MIP These are not yet a part of the standard FortMP release but may be made available on application to the developers B Changes Made In This Manual A variety of minor corrections have been put in which are not described here Significant changes are described ch
154. ecome aA b Yax for i 1 2 m Ax As u X S forj 1 2 n Ya Ay Az Aw ay z w forj 1 2 n Ax Az z Ax x Az W x z forj 1 2 n As Aw w As s Aw U s w for j 1 2 n The constant u barrier parameter is estimated by taking a certain proportion of the duality gap The precise formula for this proportion can be controlled by the user There are various means for approximating these equations so as to obtain a viable iterative procedure Three alternatives are available in FortMP IPM as follows Affine algorithm Barrier algorithm Predictor corrector algorithm Each is described below Once the delta terms have been determined then the new interior point for the next iteration is obtained as follows New point Previous point Delta Factor where the Factor is made as large as possible without taking any variable outside its bound range so that the new point remains an interior point Actually the new point is only allowed to approach the boundary and never quite to reach it since to be on a boundary could make the whole process fail As will be seen the essential step in the solution process involves finding the inverse of a large symmetric matrix and this in fact is much the most time consuming part of the whole IPM procedure Remembering that at each iteration the current values of the x pS po pt and w must be interior an obvious requirement is to find a good interi
155. ectors can finally enter the basis rendering a large part of the computational work useless MSUB 4 seems to be a good compromise Back to Chapter contents 4 4 DUAL Algorithm The DUAL algorithm aims to solve the DUAL problem that is associated with the primal problem to be solved However it does not simply construct this DUAL problem and use the primal algorithm to solve it instead it retains the primal data structure internally and adopts the DUAL argument for every step of its procedure DUAL lacks any equivalent of the major minor iteration structure and sub optimization in PRIMAL but is otherwise entirely equivalent and is almost equally capable as a solver for LP problems DUAL is of particular use for solving MIP sub problems since each sub problem has an initial basic solution that is DUAL feasible but PRIMAL infeasible Hence DUAL can begin immediately in Phase 2 and often requires only a few iterations to reach the optimum As a further advantage the objective value progresses monotonically from a better to a worse value so that MIP cutoff considerations apply and we may never need to complete the solution process DUAL suffers the disadvantage that its calculations may be less accurate than with PRIMAL and it may abort through stalling or through unrecoverable numerical error In this case the FortMP system always reverts to PRIMAL to overcome the difficulty and solve the problem with its greater reliablility Back to Chapte
156. em for the solution of Linear Programming LP and related problems It can solve problems of all sizes and has special features which enable it to find a solution even in the case of degeneracy and numerical difficulties There are three main classes of algorithm employed by FortMP The Sparse Simplex SSX algorithms comprises PRIMAL and DUAL Both of these algorithms employ INVERT The Interior Point Method IPM algorithms are based on the Primal Dual logarithmic barrier method A Branch and Bound technique for the solution of Mixed Integer MIP problems allows Binary Integer SOS1 SOS2 and Semi continuous variable types and a variety of choice strategies In addition there is a full supporting set of minor algorithms and procedures enabling user to achieve the most efficient solution possible Examples are SCALE PRESOLVE CRASH BASREC IPM SSX crossover MIP pre processor SAVE and RESTART features BASIS input and output Input data is normally presented in the standardised MPS format with extensions for MIP variable types Other formats are also available The stand alone version of FortMP begins by reading a set of control commands SPECS supplied by the user to define which algorithms are to be used and to supply any special tolerances weights or other necessary parameters needed to control the run However the user does not need to supply all such controls as the system will use defaults that have been judged as best f
157. enefit if growth figures of 200 or more show up on the INVERT log with the standard INVERT frequency increased to 76 iterations The following command sets a maximum to the number of SSX iterations between re INVERTs INVERT FREQUENCY n The default is 50 which will increase to 76 at Forrest Tomlin auto activation Reinversion will take place at earlier intervals if a demand arises for some other reason e g lack of memory or signs that the inaccuracy is growing too large The user should use a lower value if the switch FORTOM is set OFF For the DUAL algorithm the anti degeneracy procedure can be employed with the following SPECS command DUAL ADEGEN n Default is n 0 implying OFF Values 1 and 2 can be given both specifying ON Option 2 is faster When this option is OFF there is a progress check applied during DUAL iterations which stops DUAL if it becomes very slow The system reverts to PRIMAL in this case Back to Chapter contents 4 6 2 Starting Basis Controls The control switches for the starting basis are set by the following commands SIMPLEX START CRASH SIMPLEX START INPUT BASIS SIMPLEX START RESTART SIMPLEX START UNIT BASIS CRASH is the default if no command is given RESTART is described in Section 4 6 4 and INPUT BASIS is described in Section 4 6 5 UNIT BASIS may be used to set up an all logical starting basis rather than CRASH Whe
158. er a feasible solution has been found it makes further iterations that maintain feasibility and result in a better or in case of degeneracy not worse objective value Phase II until an optimal solution is encountered or the problem is found unbounded Optimality is declared if the solution is feasible and no further improving variable can be found Similarly infeasibility of the problem is declared if no improving variable can be found while the solution is in Phase I INT A The primal algorithm of FortMP is a version of the revised simplex method The inverse of the basis matrix is kept as a product of a lower and an upper triangular matrix elimination form of the inverse This form is generated by a re factorization reinversion step and can optionally be maintained during the simplex iterations Back to Chapter contents 4 3 1 Starting Procedures A solution procedure can start from the all logical UNIT basis crash basis or supplied basis The UNIT basis is created in such a way that a logical variable and a corresponding unit vector are added to every constraint in the LP problem They together form a unit matrix which is chosen as a first basis with all the structural variables set to zero The basic solution for this basis is equal to the right hand side vector This is the simplest starting basis and the fastest to obtain Another advantage is that the subsequent first simplex iterations are very fast The disadvantage is
159. er auto round limits It is also possible to place a limit on the total storage used with the following command MAXIMUM MIP SPACE n default 10 000 nodes but this does not necessarily limit the search because the space for deleted nodes is recovered and used over again any number of times However the system may even so run out of node space The system in any case reduces this maximum if there is not enough room by calculating how many nodes the store can hold There must be room enough for at least one tenth the specified maximum and otherwise MIP halts at the outset Default minimum storage is therefore 1000 nodes when the command is not given Back to Chapter contents VI 36 Chapter 6 Mixed Integer Programming MIP 6 8 4 Saving the tree and restarting MIP FortMP MIP carries out an automatic save of the search tree at a frequency given in terms of the number of nodes built The SPECS command is MIP SAVE FREQUENCY n Default 500 By setting n to zero the facility is switched off If for any reason MIP fails to complete the search in one run then it is possible to restart the search at or very close to the stopping point To restart the search the following SPECS command is used MIP RESTART ON OFF may also be given For a successful restart the files built in the previous run must be present on the working directory in particular the following file modname msv where modname is the model name It is
160. er case is a binary basis created by FortMP earlier The quality of such starting bases is completely dependent on factors known by the user Algorithmically they can be extremely good e g to re optimize a slightly modified problem starting from the previous optimum or just poor In any case when users are prepared to supply a basis they may have some knowledge about the problem and the basis and therefore can judge the usefulness of this starting procedure Back to Chapter contents 4 3 2 Column Selection Column selection refers to the choice of an improving variable to bring into the basis or to change its bound setting The selection is made from among non basic vectors that show a rate of improvement candidate vectors The rate of improvement is reflected by the sign and magnitude of the reduced cost d of the variable corresponding to a vector The positivity or in some cases the negativity of the reduced cost is interpreted with a tolerance DJ TOLERANCE default value is 1 0d 5 It means that a INT Z computed d value is considered negative if it is less than DJ TOLERANCE i e the negative of the tolerance The ultimate goal would be to select the best candidate By best we mean the one by which optimality can be achieved in the least number of iterations Unfortunately it is theoretically impossible to identify such a candidate At column selection only the rate of improvement can be determined but not the amount of imp
161. er may ask to have this classification recorded in the output log with the following SPECS command MIP CLASSIFY ROWS ON default OFF OFF can also be given A description follows of all the various constraint classes distinguished by this command In the definitions given the notation N is used to represent a sub set of the binary indices rather than the full set defined by N3 in section 6 2 5 Similarly for other index sets Back to Chapter contents 6 10 2 Knapsack Constraint Classification Classification literature refers to a Knapsack constraint as an inequality X a x lt b JEN where all the relevant variables x are binary and where the RHS b and all the coefficients a are positive and integer In fact we can consider any inequality constraint that involves only binary variables to be a knapsack constraint by a combination of scaling and complementing those variables that have negative coefficients Let the constraint be a x a x lt b Lan EA am jeN JENS wnere N and N are the sets for which a is positive and negative respectively The complement variables also binary are defined by Xe 1 Xk VI 42 Chapter 6 Mixed Integer Programming MIP and when we substitute for terms with negative coefficients the constraint becomes L a x Xa A lt b Xa jeN keN keN with all the coefficients on the left hand side positive Since all coefficients are rational this may now be scaled
162. ers can be set to concentrate on reducing infeasibility only or reducing infeasibility while improving the objective function value Options exist for the user to limit the process and prevent it from consuming an excessive amount of time For certain classes of problems such as set covering set packing and set partitioning problems the SOR procedure can be very effective The iterative crash algorithm has three stages Stage I an initial solution is calculated using CRASH LTSF Stage II a feasible non basic solution is sought using an adapted Successive Over Relaxation method SOR Stage III a basic solution is retrieved by applying the crossover procedure Back to Chapter contents 10 4 2 The iterative SOR procedure The basic iterative procedure is to cycle through the constraints and if a constraint is violated then the current solution vector x is modified as follows k l k b ajx x x 4 ee o a a a Where is a relaxation parameter and a a d This is an orthogonal projection of x onto the constraint a x b If 1 then a7x b If lt I then a x gt b and the step is said to be under relaxed If gt then a x lt b and the step is said to be over relaxed Typically 1 lt a lt 2 hence the term Successive Over Relaxation The objective function may be included as an additional constraint of the form o 27 i X 10 FortMP Manual CRASH supplement Where z
163. ersion and the FREQUENCY refers to the number of inversions made between checks If the progress made in the dual objective does not exceed the criterion given in this time then DUAL is considered as stalled and the system reverts to PRIMAL The check is necessarily slow to operate even with comparisons at every re invert Hence if dual degeneracy occurs frequently it is better to invoke the anti degeneracy procedure DUAL ADEGEN 1 or 2 which should improve progress anyway However anti degeneracy is itself rather slower than normal iterating Back to Chapter contents 4 6 4 Save and Restart The following command provides necessary SAVEs for re starting a subsequent run SIMPLEX SAVE FREQUENCY n Default is 10 SAVEs take place during reinversion The given frequency defines how many reinversions take place between successive SAVEs The restart procedure using such a save operates by providing the saved basis as a starting basis for the next run The necessary command is SIMPLEX START RESTART which has already been described in Section 4 6 2 The following command specifies the limiting number of SSX iterations MAXIMUM SIMPLEX ITERATIONS n Default is 10000 INT 12 When this limit is reached both PRIMAL and DUAL will terminate after doing a SAVE operation to provide for a restart The given limit is added to any previous iterations in a restart so that you do not need to change the limi
164. es a limit to admissible pivots in the LTSF stage relative to row wise maxima In order to control the use of CRASH ART after CRASH LTSF the following command may be used CRASH ART n Default n 1 Where n is 0 1 or 2 The significance of n is 0 CRASH ART is not used 1 Normal heuristic 2 Extended heuristic CRASH ADG FACTOR n Where n is 0 1 2 or 3 giving the priority to assign the ADG criterion Back to Chapter contents 10 5 2 Crossover Commands The following commands relate to a primary CROSSOVER CRASH ADMIT THRESHOLD v Default v 0 001 This command limits the admissible pivots in the CRASH LTSF stage as in a primary CRASH PUSH ADMIT THRESHOLD v Default v 1 0e 4 This controls the minimum super basic value considered for applying a PUSH step PUSH CALSOL FREQUENCY n Default n 10 This control specifies the frequency of re calculating super basic solutions in number of re inversions DUAL PUSH OFF Default ON DUAL PUSH ON DUAL CRASH PUSH OFF Default ON DUAL CRASH PUSH ON OFF instructions cancel the Dual Push stages However these commands should not be necessary PUSH LOG LEVEL n Default n 0 X 13 Advanced Starting Bases PUSH LOG FREQUENCY These commands control logged output during PUSH Back to Chapter contents 10 5 3 SOR Commands n The following commands relate to SOR
165. es uniquely determines the values of the basic variables in such a way that they together form a solution This set of values is called a basic solution A basic solution can be computed by the inverse of the matrix formed from the columns corresponding to the basic variables Sometimes this matrix is referred to as a basis matrix or as simply a basis An iteration of the simplex method makes either a basis change or a bound change In the first case one basic variable is replaced by one non basic variable while in the second case the basis remains unchanged but a non basic variable moves from its lower bound to the upper bound or the other way m7 5 around If there is a basis change then the value of the objective function will improve or remain the same while a bound change always results in an improvement of the objective value Back to Chapter contents 4 2 Introduction to the Algorithms Large scale LP problems tend to have relatively very few non zero coefficients in the matrix of constraints There is an observation that the average number of non zeros per column is between 5 and 10 independent of the size of the problem This means that as problem sizes increase the density the ratio of non zeros to the total number of possible entries decreases For problems with around 1000 constraints the density is typically less than 1 The low density is often referred to as sparsity Sparsity is the main feature that enables the so
166. f the constraint left hand side i e the value of y A X LOWER RHS Lower bound of y A X UPPER RHS Upper bound of S A X SHADOW PRICE Shadow price of the row equal to the reduced cost of the logical Standard output is invoked by the following SPECS command OUTPUT TYPE STD However this command is the default and need not be given Back to Chapter contents 3 4 2 Report Writer Output Output for a Report Writer such as MPL is a simplified form of standard output Headings are not printed and the initial heading material is compressed to a single record WT 17 Names are not printed only the index number of each column and row The layout comprises FORTRAN formatted records but is designed for easy input when using C For details see Appendix A section A3 2 The RW format of output is invoked with the following SPECS command OUTPUT TYPE RW Back to Chapter contents 3 4 3 Log File Output Each major algorithm of FortMP is associated with a log level which controls the information written to the log file There are five levels which can be applied in each case Level 0 Error messages only Level 1 Errors and important messages only Level 2 Important messages and a primary log e g iteration log Level 3 A more detailed log if relevant and useful general statistics Level 4 Level 3 plus more detailed statistics Variations on this general scheme and other special features are described in the
167. far in this manual Those introduced in this chapter are highlighted thus IPM ALGORITHM AFFINE ALGORITHM IPM Thise command is used to specify IPM as the primary solution algorithm for the continuous LP problem IPM ALGORITHM AFFINE These commands invoke the algorithm to be used within IPM The default is PDC Predictor Corrector See 5 2 1 IPM PHI v Default is 10 0 This parameter sets the POWER applied to the numerator in the more advanced formula for u which is used in the earlier phase of the predictor corrector algorithm See 5 2 1 IPM DARE v Default is 0 9995 DARE is a fraction between 0 and 1 controlling how closely to approach the nearest boundary when moving from one interior point to the next See 5 2 1 PM RELATIVE EPSILON v Default is 1 0e 7 The relative epsilon is the tolerance within which the duality gap can be considered to be zero Thus the optimum solution is reached provided the point is feasible See 5 2 1 PM FEASIBILITY EPSILON v Default is 1 0e 4 The feasibility epsilon is the tolerance governing feasibility of the current primal and dual solutions See 5 2 1 PM BIGM WEIGHT v Default is 0 1 This value is the BIGM weight used in the starting point method for the barrier algorithm See 5 2 2 IPM STARTING POINT METHOD n
168. fications Some Notes on the Specifications AUAA NNDN oroo o S R o 8 1 Introduction to the Internal Data Interfacing Service Utilities 8 1 1 Objectives The objective of the data interfacing service utilities DISERV utilities in brief is to provide those who employ FortMP as a subsystem with a means to access directly and modify the LP problem data as seen by the algorithms of the system Thus for example the writer of some cutting plane algorithm could use INPUT to read in a problem from an MPS format file then solve that problem and then perhaps in an overall iterative procedure modify the constraints or add new ones and re solve the problem several times As another example researchers into PRESOLVE procedures can gain access to the problem constraints objective and bounds in order to execute their algorithms and can then apply any changes to variable type or bounds before using FortMP solution algorithms to test the efficiency of their procedures Back to Chapter contents 8 1 2 Data Description It is important to note at the outset the distinction to be made between DISERV utilities described here and the external data interface described in the previous chapter Whereas the external data interface relates to data which is external to FortMP passed for example via arguments to subroutine SUBMP1 DISERV utilities relate to data which is internal to FortMP after processing by procedures such as INPUT SCALE and PRESOLVE
169. file for the best integer solution found during a run may be created with the SPECS command MIP AGENDA OUTPUT ON default OFF OFF may also be used Each time an integer solution is found the system creates an AGENDA file with no PRIORITY section and with a FIXMIX section containing the solution The previous AGENDA file if any is over written Another option is provided by the following command MIP AGENDA OUTPUT ALL With this option multiple integer solutions are all recorded in the output AGENDA file later solutions in successive sections separated by FIXMIX header lines This is not a valid file for input in a later run using MIP AGENDA ON In order to use it for this purpose the modeller needs to select the section of interest usually the last one which is the best and delete the remaining sections AGENDA OUTPUT commands provide a convenient way to record integer solutions when the more detailed information of the standard output is not needed Back to Chapter contents VI 28 Chapter 6 Mixed Integer Programming MIP 6 6 6 Un named Agenda Files Agenda files can be used with the variables identified by index rather than by name This can be necessary for example when tabular form data is supplied or when using the external data interface The data layout is very similar to named agenda files it has the same header lines and a difference only in the layout of data lines which is as follows Field 1 Field 2 Field 3 1
170. following chapters devoted to the individual algorithms Log file examples are given with explanations if needed The following SPECS commands specify the log levels for each algorithm SIMPLEX LOG LEVEL n x n 0 4 default is INVERT LOG LEVEL n x n 0 4 default is IPM LOG LEVEL n x n 0 4 default is MIP LOG LEVEL n x n 0 4 default is A duplicate log can also be displayed when running on line in interactive mode This is invoked with the following commands LOG DISPLAY LOG DISPLAY LEVEL n n 0 4 default is 1 LOG DISPLAY ONLY The system copies some of the logged messages onto the standard output or the display screen when running on line In default the levels copied are O and 1 errors and main events With the LOG DISPLAY command the maximum level copied in this way can be changed to a specific level so as either to display more or to reduce the display errors cannot be suppressed If LEVEL p is omitted then all messages are copied this is equivalent to LEVEL 4 If ONLY is specified then the log file itself is suppressed and all logs are written solely to the standard output These commands do not change the level of messages actually issued in the first place Back to Chapter contents nmr 17 3 4 4 Suppressing Output It frequently happens that the entire output is not needed by the user and for large problems in particular it can be usef
171. for node choice are followed with priority UP if specified FIXMIX is preferable to FIXTRY if the given integer solution is known to be a good one that is both feasible and either optimal or close to optimal In this case it creates an advanced tree leading to reduced search time Data for FIXTRY and FIXMIX is provided in a MIP AGENDA file described below Back to Chapter contents 6 6 3 AGENDA data for variable priorities or FIX solutions A MIP AGENDA file provides the data for variable priorities or a FIX solution The outline of this file is as follows AGENDA PRIORITY A variable priorities FIXMIX or FIXTRY w FIX solution ENDATA where the header records begin in position 1 as with other headers The file must have the following name modname agn where modname is the model name in use for the run VI 26 Chapter 6 Mixed Integer Programming MIP The two data sections are each optional and may appear in either order Once the MIP AGENDA ON command has activated the input of the file it is the header record that activates the corresponding procedure or priority select criterion as described in the two previous sections The data layout in either section is the same namely Field 1 Field 2 Field 4 Field 5 2 3 5 12 15 22 25 36 Column Column Value name name with similar fields to MPS data input Fields 2 and 3 specify a start column and an end
172. g OFF by default If set to ON the whole IPM procedure is skipped including the rather lengthy initialisations FortMP IPM carries out an automatic IPM SAVE when it terminates so that the BASREC RESTART feature can be used in a later run This will be found very useful if the user wishes to stop after IPM and then do the BASREC and optimisation with SSX in a subsequent run Back to Chapter contents 5 2 7 Miscellaneous IPM and BASREC Commands The following SPECS command determines the log level of IPM in the same manner as for PRIMAL and DUAL IPM LOG LEVEL n n 0 4 default 1 For the BASREC crossover to SSX stage the following commands are used PUSH LOG LEVEL n n 0 4 default 1 PUSH LOG FREQUENCY n default n 10 these commands being similar to PRIMAL LOG LEVEL and PRIMAL LOG FREQUENCY The following SPECS commands are only available in certain versions of FortMP Please see the Implementation Guide for details A switch is set to invoke a graphical display which shows the density pattern of the matrices and the progress of the iterations Copies of the display will be left in files model a model b model c and model d if this command is successfully activated IPM GRAPHICAL DISPLAY ON IPM GRAPHICAL DISPLAY OFF The default is OFF Back to Chapter contents 5 3 Summary of SPECS Commands The following SPECS commands have been introduced so
173. haracter status code for the column Values are 2X Al given below Reduced cost dual solution value E14 6 EA Upper bound E14 6 MARK A l character marker for infeasibility 2X Al The column number JCOL is written with full leading zeros after the X Example column 1 is written X0000001 Possible values for the status code STAT are B Indicates a basic variable L Variable is at lower bound U Variable is at upper bound F The variable has a fixed value this code overrides any possible alternatives Possible values for the feasibility marker MARK are F Feasible in both the primal and the dual P Primal infeasible D Dual infeasible B Infeasible in both the primal and the dual Output Rows section One record for each logical variable i 1 2 MROW as follows ICOL R followed by the row number A8 A 30 Appendix A Input Output Data Layouts STAT A 1 character status code for the row See description 2X Al below Value of the row expression XAijXj E14 6 Shadow price dual solution value E14 6 URHS Upper bound to the RHS E14 6 MARK A l character marker for infeasibility 2X Al LRHS Lower bound to the RHS E14 6 The row number JCOL is written with full leading zeros after the R Example column 1 is written R0000001 The solution value RVAL represents the value of the row expression AijXj and not the value of the logical variable This is according to the usage of
174. he LPR does not exist then go to Exit else if the solution is integer feasible go to Exit Otherwise set the cutoff value zp to a large positive value prepare a space for the list of sub problems nodes of the search tree and continue Step 1 Variable selection Select a discrete entity that is violated in the solution of the current node P Step 2 Branching Partition the continuous range of this entity and create two new sub problems nodes Py and P2 of the tree linked to the parent P Store the current basis as starting point for the solution of Py and Px2 Step 3 Node Selection If the list of unsolved sub problems is empty then go to Exit else select an unsolved sub problem P from the list of nodes Step 4 Solving Recover the starting basis for the selected node and solve the selected sub problem with the Primal or the Dual algorithm If Dual is used the sub problem may be discontinued should its objective function value become greater than or equal to z p in this case repeat from step 3 Denote the eventual optimum solution z p Step 5 Bounding If the sub problem has no feasible solution or if z p is greater than or equal to zp then delete the node and repeat from step 3 If the solution is not integer feasible then repeat from step 1 Step 6 Integer Solution Set integer solution marker If z p is less than z p then update z p and save the current problem bounds and basis for the final solution If z p is equa
175. he following SPECS command INPUT LONG NAMES ON where OFF is the default Other types of name such as problem name RHS Range Bound set names etc remain limited to 8 characters Heading Keywords The following are special heading keywords as in Fixed form MPS NAME RHS ENDATA ROWS RANGES COLUMNS BOUNDS and these must always be entered starting at position 1 of a line with no preceding blanks Input type with Long Names When INPUT LONG NAMES ON is specified the type of input data is necessarily free format MPS Long names must therefore conform to the rules for tokens i e no interior blank spaces Back to Chapter contents 3 2 4 Other Types of Input Data Various alternative input features have been provided in the FortMP system Details of these mechanisms are given in Appendix A or for special reasons may be supplied in separate documents Back to Chapter contents 3 3 Running the System 3 3 1 Using SSX The SSX algorithms are invoked for LP with the SPECS commands ALGORITHM PRIMAL ALGORITHM DUAL TIT 11 PRIMAL is the default so ALGORITHM PRIMAL need not be specified In fact DUAL is followed anyway by PRIMAL to verify the optimal solution A full description of SSX is given in Chapter 4 but the user may find the following commands useful without reading further SIMPLEX LOG LEVEL n x n 0 4 default INVERT LOG LEVEL n x n 0 4 default SIMPLEX LOG
176. he matrix NSET Number of special ordered sets If there are no special ordered sets then NSET must be zero A 26 Appendix A Input Output Data Layouts Input Coefficient Section The coefficient section contains NAJJ records i 1 2 NAD as follows The sequence of data presentation is not material Although normally to be presented either column wise as in MPS format or row wise the system accepts any sequence and re orders the data internally The data is subject to consistency conditions as in MPS format Every column must contain at least one entry There may not be any duplicate entries Input Columns section One record for each structural variable j 1 2 NC as follows COSTQ Cost objective value 3X D20 13 MITYPG Mixed Integer type code as follows 110 0 Continuous variable 1 Binary variable 2 Integer variable A 27 FortMP Appendices Semi continuous Member of SOS1 Member of SOS2 Input Rows section One record for each logical variables i 1 2 MR as follows LHS Left hand side or lower bound of the 3X D20 13 expression RHS Right hand side or upper bound of the 3X D20 13 expression Input Special Ordered Set section If the model has special ordered sets then a further section is added with one record for each set i 1 2 NSET as follows sera SBEG Column number of 1st member The type of each SOS is indicated by the c
177. his form of problem statement is illustrated in Figure 1 below Cp Cza C Uj Uz Up lt gt lt ij Figure 1 General LP problem with simple upper bounds In a problem with two sided linear constraints the problem statement is slightly different as follows Given variables x jand constants c a l and was before minimise or maximise the same ij objective as before subject to the following constraints L lt a X 4 X a x SU for i 1 2 m where L L and U U are constant lower and upper bounds respectively for each constraint row The bounds on variables x remain as before This is illustrated in Figure 2 below Cy C5 sei8 n Uj Mose U IA IA Q lA lt ARN Figure 2 General LP problem with Simple Upper Bounds and RHS ranges It is implicit in both the above statements that wherever a bound does not exist the corresponding bound values u U l or L is as appropriate The user signifies each case by the use of type codes in the input data In a Mixed Integer problem the following classes of nonlinear variables are allowed Binary variables A binary variable has only two legal values zero and one Integer variables An integer variable may take only integer values within its given bound range l lt x lt u Special Ordered Sets type 1 SOS1 An SOS1 is a consecutive subset of variables in the problem of which only one can
178. hm used To solve these equations we may begin by eliminating all the variables As Az and Aw from equations 2 3 4 and 5 When this is done the system is reduced to two equations as follows X Z S W Ax A Ay R new RHS for 3rd equation AAx R This system could now be solved by finding the inverse of the matrix D A A 0 where D is the diagonal matrix XZ SW However the number of equations can be reduced still further by eliminating the variables Ax across these two equations This will result in the following AD A Dy R new RHS Here we have to invert the matrix AD7 A where A denotes A transpose The matrix is symmetric positive definite matrix and so is inverted by the Cholesky procedure Back to Chapter contents 5 1 5 Determining the Starting Point It is vital in the IPM algorithm to have a good starting interior point from which to begin iterations Failure in this will increase the number of iterations necessary and may indeed lead to divergence or cycling so that a solution can never be found In the barrier algorithm a special procedure is used since the starting point in addition to being interior must also satisfy feasibility in the primal equations To ensure this a centralised starting point is chosen and one extra row and column are added to the model with large coefficients based on a Big M value designed to make the extended starting point feasible The extra variable
179. imal is at upper bound The following controls affect pivot selection which is vital in maintaining stability and restraining the growth of non zeros on the ETA file PRIMAL PIVOT ADMIT THRESHOLD v Default v 1 0d 8 DUAL PIVOT ADMIT THRESHOLD v Default v 1 0d 8 NVERT PIVOT ZERO TOLERANCE v Default v 1 0d 7 NVERT PIVOT ADMIT RELATIVE v Default v 1 0d 2 The default values are as given above Pivot control always avoids selecting any pivot less than the ADMIT threshold and ZERO tolerance refers to the level considered indistinguishable from zero INVERT pivoting is protected both by a large zero tolerance the criterion for singularity and also by the ADMIT threshold given as RELATIVE which in fact is more important This is a factor that when multiplied into the largest absolute value on the current row or column being considered for pivoting defines the minimum admissible pivot size Relative thresholds between 0 001 and 0 1 may be suitable Larger values lead to a higher growth of non zeros on the ETA file but lower values may lead to instability or inaccuracy A wider choice of pivoting controls is described below in section 4 6 7 The following tolerance is used generally to test for zero or to test whether two values are equal ZERO TOLERANCE value Default is 1 0d 15 The follow
180. imum cost times fraction NAB WN Back to Chapter contents B2 12 Minor algorithm controls ref value value value CC a SCALE USING OBJECTIVE Appendix O OFF lt ON OFF gt RESOLVE controls CRASH controls CT SS esser swore vse 9 i ef o CRASH TOLERANCE FACTOR v 10000 0 BASREC push controls secur reer apes eae oe ee The following commands are also available Appendix B SPECS Commands SCALE OBJECTIVE lt ON OFF gt Default OFF SCALE USING OBJECTIVE lt ON OFF gt Default OFF By default the SCALE algorithm does not scale the objective row and does not include objective values in the calculations that derive column scales Either or both features can be set ON to handle special cases with a very wide range of objective values in the model PRESOLVE PASSES n Default 4 PRESOLVE SAFE LEVEL n Default 5 The limit to PRESOLVE passes prevents over running which is generally not profitable after 4 repeats SAFE LEVEL can be used to define a lower than maximum level at which to re try if PRESOLVE finds infeasibility PRESOLVE may find spurious infeasibility particularly at higher levels if the model has poor scaling CRASH ADMIT THRESHOLD v Default 0 001 CRASHY PIVOTS n Default 1 CRASH SELECTION LIMIT n Default 2 CRASH TOLERANCE FACTOR v Default 10000 0 These commands refer to experimental CRASH procedures which are present in the code for tuning
181. ing to apply when the SCALE switch is ON The range for Passes is 1 4 and the default value is 4 The default target variance is 10 0 PRESOLVE ON PRESOLVE OFF These two commands set the PRESOLVE switch The default is OFF PRESOLVE LEVEL n This command specifies the PRESOLVE level when the PRESOLVE switch has been set ON The range is 1 5 with default value 5 POSTSOLVE ON POSTSOLVE OFF These two commands set the POSTSOLVE switch active when PRESOLVE is ON The default is ON PRESOLVE LOG LEVEL n This command specifies the log level for PRESOLVE and POSTSOLVE The range is 0 4 with default value 1 ALGORITHM PRIMAL ALGORITHM DUAL ALGORITHM IPM One of these commands is used to specify the primary solution algorithm for the continuous LP problem PRIMAL is the default and need not be specified MAXIMUM SIMPLEX ITERATIONS nnn default 50000 MAXIMUM IPM ITERATIONS Z DND ane _gefault 80 MAXIMUM MIP lt INTEGER INTSOL gt nnn default 300 MAXTMUM MTE NODES ANI race sce tare sone ee __gefault 20000 MAXIMUM MIP TIME vvv default 50000 0 These commands set the termination limits for each major algorithm A SAVE is made before exit at termination SIMPLEX LOG LEVEL n HT Z IPM LOG LEVEL n These commands specify the level of the output to be sent t
182. ing SIMPLEX algorithms The default for n is 50 FORTOM ON The above commands set or cancel Forrest Tomlin update of the ETA file Default is AUTO implying initially OFF and subsequently becomes ON when the auto activate creteria are satisfied FORTOM ACTIVATE PERCENT n Default 40 These commands control the auto activation of Forrest Tomlin update PERCENT is the required percentage of structurals in the basis and GROWTH is the percent increase to ETAs during SSX iterations between inverts Both criteria must be satisfied before auto activation can occur DPROGRESS CRITERION value Default 1 0d 25 These commands control the progress check made in the DUAL algorithm when there is no anti degeneracy procedure specified default DUAL ADEGEN 0 FREQUENCY refers to the separation betweencomparisons counted in number of re inverts and CRITERION is the minimum progress to be made otherwise DUAL is stopped and the system reverts to PRIMAL DUAL ADEGEN n Default is 0 T7 1A Controls use of anti degeneracy in the DUAL algorithm Zero specifies progress checking the default Values 1 and 2 specify anti degenerate pivoting FEASIBILITY TOLERANCE value RHS TOLERANCE value DJ TOLERANCE value ZERO TOLERANCE value
183. ing command sets the parameter used by the DEVEX algorithm both in PRIMAL and in DUAL DEVEX RATIO value Default is 0 4 The four commands given here have been changed from their forms in previous versions of FortMP This is to clarify their meaning and name the algorithm to which each applies Old forms are included in Appendix B as alternates and remain usable however users should revise them if possible INT 1A which determines when to trigger re calculation of column norms see 4 3 2 above for PRIMAL or row norms for DUAL Values outside the range 0 2 0 6 are not recommended Forrest Tomlin auto activation is controlled by the following SPECS commands FORTOM ACTIVATE PERCENT n Default is 40 FORTOM ACTIVATE GROWTH n Default is 100 The PERCENT in the first of these commands refers to percentage of structural variables in the basis which must reach this level for activation In addition GROWTH the amount of increase during SSX iterations after an INVERT must be this percentage of the ETA size immediately after the invert The default value 100 implies that ETA size must double before auto activation can take place The DUAL algorithm is subject to a progress check for which controls may be entered with the following SPECS commands DPROGRESS FREQUENCY n Default is 1 DPROGRESS CRITERION value Default 1 0d 25 Checks are made after re inv
184. ion leads us to consider a simplified Branch and Bound that itself uses less memory and can accommodate IPM for the sub problems The two most important simplifications are Discrete constraint types limited to binary variables which can be used for other constraint types by special modelling Tree development strategy limited to LIFO Last In First Out The latter simplification means that node storage never exceeds the maximum tree depth which is usually much less than the number of binary variables because integer solutions or infeasible nodes appear well before all the binary variables have been fixed Back to Chapter contents 9 5 3 User Controls The main user control available for tree development is the following MIP PRIORITY UP ON Default OFF OFF may also be used When ON is specified the first sub branch of each node to be developed is always the UP branch and variable selection considers the UP fraction of the candidate binary variables see chapter 6 section 6 5 3 If the model contains many CLQ type x lt 1 or XOR type Xx 1 constraints the x in each case being binary then this option will have an important effect Other elements of the tree development strategy are fixed as follows Variable choice 1 minimum fraction First node choice 1 LIFO Second node choice 1 LIFO User control for these elements may be added in a future release Control of the Bo
185. ion of the printable output files solution output and log This introduction is expanded in Chapters 4 5 and 6 into a fuller description of how to use the three main algorithm groups which are Sparse Simplex SSX Interior Point Method IPM and Mixed Integer Programming MIP Chapter 7 and Chapter 8 as well as the material in the Appendix make up Part 3 of the manual This part is designed for experienced users such as an application developer or a research investigator who wishes to use FortMP as a development or a research tool Although the definitive model is introduced in Section 1 7 it is also revisited in Part 2 of the manual FortMP employs an extended MPS data format this is introduced by example in both Part 1 and Part 2 of the manual A complete specification of the industry standard MPS data formats and also extensions to cover SOS1 SOS2 and integer programming is supplied in the Appendix The emerging sparse matrix data structure standard is also set out in this Appendix Back to Chapter contents 1 6 Platforms The FortMP system is developed in a way such that it is readily adaptable to a wide range of hardware and software environments both serial and parallel ANSI FORTRAN 77 is used for the widest possible portability between systems The following are environments for which a particular version has been developed PC386 486 586 using the Salford FTIN77 FORTRAN system PC386 486 585 using the Watcom FORTRAN compiler
186. ior point from which to begin iterations Failure in this will increase the number of iterations necessary and may indeed lead to divergence or cycling so that a solution can never be found The predictor corrector algorithm for QP computes a starting point in exactly the same way as for LP As with LP the predictor corrector algorithm can employ one of three starting point methods based on a quadratic formula to maximise the distance from boundaries in the initial interior point The choice of method is described in Section 5 2 2 Back to Chapter contents 9 2 4 Controls on the Predictor Corrector Algorithm for QP The controls for the predictor corrector algorithm for QP are exactly the same as those for the LP case except that there is no procedure to develop the IPM solution into a basic solution On reaching the IPM solution the output is written and execution halts The reader is referred to Sections 5 2 1 5 2 5 Back to Chapter contents r r r 9 3 Input Data Layout The data for the QP problem is entered by using an extension of the MPS format for LP as described in detail in Appendix A The MPS layout is extended to include the data definition of the Q or F matrix see Section 9 1 Back to Chapter contents 9 3 1 Matrix Input for the symmetric Q form When the Q matrix is to be entered a separate QDATA section is prepared by the user and presented in the MPS data file after the COLUMNS section and before th
187. is integer and 0 lt x2 lt 20 X3 is semi continuous x Oor l lt x3 lt 10 x4 is binary xz O or 1 X11 X12 X13 X14 and x 5 are a set of type SOS1 X21 X22 and x2 are a set of type SOS2 X31 X32 X33 and x34 are a set of type SOS2 The input data for the above model MGi is shown below NAME MGINT ROWS N OBJ N MARKER i COSI Cosz Hie Ose EROSA E CON1 E CON2 E CON3 Ho INGE E REF2 i RERS COLUMNS X1 OBJ 360 COST 20 X1 COSS 6 0 COs4 iL O X2 OBJ A 0 COSI 340 X2 COsZ 510 COSS 360 X3 OBJ 5 0 COS2 3 0 X3 COSI A X4 OBJ i 0 COS1 O X4 Ose i 0 COSs4 1 100 10 X5 COS IO COSS BQ X5 REF 1 o X6 COs il 20 COS2 340 X6 REF 2 i 0 X7 COS Smo COSS TO X7 REF3 I 50 Si SiS wil MARKER SETORG REF 1 i dale OBJ 2 50 X11 CON1 O X12 OBJ 350 REF 1 IERO X12 CON1 IO XAS OBJ 4 0 REF 1 2 0 X13 CON1 i x14 OBJ 350 REF 1 360 x14 CON1 iO X15 OBJ 210 REF 1 4 0 X15 CON1 be VI 17 FortMP Part 2 SISETIE SZ SLIKTA X21 X22 X22 X23 X23 SISET2E S2 SLS X31 X31 X32 X32 X33 X33 X34 X34 SISET3E RHS ral H Ww MOZ1 MOZ1 MOZ1 BOUNDS UP MOZ2 UI MOZ2 SC MOZ2 BV MOZ2 ENDATA VI 18 MARKER MARKE CON2 OBJ CON2 OBJ CON2 MARKE MARKE OBJ CON3 OBJ CON3 OBJ CON3 OBJ CON3 MARKI E COST COSs2 COSS X1 X2 X3 X4
188. is needed by the user of the external interface particularly when a large number of calls are made to solve sub problems In order to reduce it the levels can be set to zero which eliminates all output except for error reports Thus the user should employ the following SPECS commands SIMPLEX LOG LEVEL 0 INVERT LOG LEVEL 0 IPM LOG LEVEL 0 MIP LOG LEVEL 0 MIP PREPROCESS LOG LEVEL 0 VI 25 FortMP Part 3 PRESOLVE LOG LEVEL 0 PUSH LOG LEVEL 0 Not all of these commands will be needed only those for the FortMP algorithms actually employed As before it is possible to use default settings rather than SPECS commands see section 7 4 3 above Back to Chapter contents 7 5 3 Avoiding the use of SAVE files It is most unlikely that the user of the external interface will require any SAVE files In the SUBMP1 environment there are initial default settings different from those of stand alone FortMP which cancel all SAVEs and avoid any opening closing of SAVE files These settings are SIMPLEX SAVE FREQUENCY 0 IPM SAVE FREQUENCY 0 MIP SAVE FREQUENCY 0 It is perfectly possible for the user to re activate any SAVEs that he may need either by command or by assigning the default settings as stated in 7 4 3 If the user simply wishes for a final save at termination then a high value should be given for the frequency Back to Chapter contents VI 26 Chapter 7 FortMP S
189. is the objective function value and B is a reduction parameter This constraint is included if the option to improve the objective function value is chosen The starting point solution x is calculated in the simplest way possible by using CRASH LTSF which provides a basis for Invert and then a starting solution is calculated in the usual way Back to Chapter contents 10 4 3 Crossover Since there cannot be any dual push it will be most unlikely that the crossover can produce an immediate optimal basis as should be the case with a primal dual optimum after IPM However certain claims can be made In the first place if the SOR solution is entirely feasible the primal push algorithm will not generate any infeasibility Infeasibilities in the basis may indeed grow but equally they may disappear and once removed cannot become infeasible again If the non basic infeasibilities are quite small there is a good chance they will disappear once the solution is reset at the end of the primal push In the second place the change directions for the push steps are taken so as never to degrade the objective value Hence the objective will remain as good or better than the objective value for the SOR solution Back to Chapter contents 10 4 4 User Controls The type of SOR algorithm to be used is controlled with the following commands SOR OBJECTIVE ON Default OFF SOR OBJECTIVE OFF Where OFF means reduce infeasibilty o
190. is transparent to the user Back to Chapter contents 4 3 5 Numerical Features The revised simplex method works with real floating point numbers During operations with such numbers different types of numerical errors may occur The two main types are cancellation error in subtraction or addition and rounding error losing least significant digits in any of the operations At one extreme these errors may remain unnoticed but on the other they may cause serious troubles Good numerical procedures try to minimize the occurrence of numerical errors and if they still occur can efficiently cope with the situation In the case of the simplex method numerical problems can have quite serious effects on the solution They can slow down progress towards feasibility optimality or in the worst case can prevent convergence FortMP and within it PRIMAL is equipped with a wide range of techniques aiming at guaranteeing smooth progress without numerical problems The first is scaling The adaptive scaling algorithm of FortMP reduces the range of magnitude of the coefficients The second is the careful use of tolerances This means that whenever a numerical value is to be tested against 0 zero a small tolerance is used instead of 0 The appropriate value of a tolerance is situation dependent This is the reason PRIMAL uses several different tolerances Note that some tolerances may have identical default values T7 O In addition to the
191. iterion defines an interior point for the system According to LP theory any feasible solution to the above equations will also be optimal if the duality gap i e the difference between primal and dual objective functions is zero This duality gap is given by the sum n n pees Bare jal jal in which every term must be separately zero because all the variables are positive or zero In the logarithmic barrier method these conditions are restated as Xz for j 1 2 n sw U for j 1 2 n where u is a positive constant that must reduce to zero at the final stage of the iterative solution process u is referred to as the Barrier parameter Back to Chapter contents 5 1 2 Introduction to the Solution Procedures In each of the solution algorithms one iteration considers an interior point to be a set of fixed values and looks for a set of changes or directions as follows Ax changes to the x for j 1 2 As Ay changes to the y for j 1 2 changes to the s for j 1 2 J 3 3 3 x Az changes to the z for j 1 2 Aw changes to the w for j 1 2 n If we now substitute x Ax for x in the equations above and similarly substitute s As for Sj O Ay for Yj z Az for a and w Aw for w then new equations are derived These equations are now rearranged with the delta terms on the left and everything else constant terms on the right The equations then b
192. ithm as it will generally solve in fewer iterations than either the affine or barrier method However certain problems particularly those that are unusually sparse may be speeded up by the affine algorithm sufficiently for the user to consider this a better alternative Barrier should not be used except as a back up in case the other algorithms fail for one reason or another Back to Chapter contents 5 1 4 Solving the System of Equations To show how the equations are solved we first restate them using matrices The following vectors and matrices are defined A The mx n matrix of coefficients aj A The nxm matrix of transposed coefficients a a rows become columns and columns become rows X The nxn diagonal matrix comprising solution point values x x x on the n diagonal and zeros elsewhere Z S and W Diagonal nxn matrices comprising dual solution point values from the z the s and the w on the diagonal and zeros elsewhere Ax n vector of variables Ax Ax Ax n Ay m vector of variables Ay Ay Ay m Az As and Aw n vectors of variables constructed from the Az n the As j and the Aw j in the same way R R R R and R Constant right hand side vectors of size n except for R which is of size m Then the equations become AAx R 1 Ax As R 2 A Ay Az Aw R 3 ZAx XAz R 4 WAs SAw R 5 where R R R R and R vary according to the algorit
193. ively re written and the text cannot realistically be correlated with chapter 6 of release 1 The general description of MIP remains with certain corrections to clarify the meaning and the data input is unchanged in outline but with the example presented differently Section 6 6 described the new version of FIXMIX and PRIORITY features now changed and made more flexible The AUTO ROUND feature is also changed see 6 8 1 Elsewhere the reader will find additions as follows UP node choice priority feature 6 5 3 AGENDA data given by name 6 6 3 FIXMIX output feature 6 6 4 Advanced algorithms 6 7 Cutoff controls 6 8 2 New search limits 6 8 3 Because of memory savings made the MIP DISK feature is no longer used Chapter 7 FortMP Subroutine Library and External Data Interface The existing release 1 features described in Chapter 7 are retained as before 7 1 and 7 2 with certain improvements to the text Readers should note the change in specification for REAL type arguments which become DOUBLE PRECISION in the new release standard version see 7 2 3 Special versions using single precision REAL arguments can be delivered to customers who need compatibility with their existing programs The new interface features are described in sections 7 3 to 7 6 and a summary is given in 7 7 Chapter 8 Data Interfacing Service Utilities Most of the material in this chapter is unchanged from release 1 Readers should n
194. l the use of DEVEX column selection procedure in the PRIMAL algorithm PRIMAL DEVEX OFF PRIMAL DEVEX ON PRIMAL DEVEX SINGLE PRIMAL DEVEX DOUBLE the default being OFF ON and SINGLE are the same and indicate that DEVEX should apply only in Phase 2 i e when feasible DOUBLE indicates that DEVEX should apply in both Phase 1 and Phase 2 The corresponding commands for DUAL are DUAL DEVEX OFF DUAL DEVEX ON the default being OFF ON indicates that DEVEX should apply only in Phase 2 i e when DUAL feasible The following commands set or cancel Forrest Tomlin update of the ETA file FORTOM OFF FORTOM ON FORTOM AUTO When Forrest Tomlin is cancelled with OFF the simple product form update is used in its place The default is FORTOM AUTO under which Forrest Tomlin is initially OFF but will be set to ON ie become active when certain criteria are satisfied concerning the proportion of structurals in the basis and growth of the ETA file during SSX iterations At the same time when Forrest Tomlin is AUTO activated the invert frequency is increased by one half actually from 50 to 75 in default Thus ON is really unnecessary except for experimental reasons It should not be necessary to use OFF except for very dense problems in which the extra calculations outweigh the savings Users may suspect the T7 1A Forrest Tomlin update as being of no real b
195. l to z pp then go to Exit Otherwise the node is deleted and we repeat from step 3 VI 20 Chapter 6 Mixed Integer Programming MIP Exit If the integer solution marker is not set to any integer feasible solution and the list is empty then no feasible integer solution exists to the problem Otherwise output the best integer solution Back to Chapter contents 6 4 3 The Branching Mechanism UP and DOWN branching Branching Step 2 above partitions the data space by adding a constraint or constraints in such a way that the selected discrete entity is forced to a feasible state In some cases two or more branches may be needed for the same discrete entity When branching is performed the two sub nodes correspond to an UP branch and a DOWN branch For the different types of discrete entity these branches are formed as follows Binary variable branching A binary variable is fixed to one on the UP branch to zero on the DOWN branch Integer variable branching The fractional solution value to an integer variable forms a division point On the UP branch the lower bound is increased to the next integer above on the DOWN branch the upper bound is decreased to the next integer below Semi continuous branching On the UP branch the lower bound is set to 1 0 On the DOWN branch the variable is fixed to Zero SOS branching The reference row function is evaluated which determines a point between two set members On the UP branch lower
196. less the decimal point is coded any trailing blanks are treated as zeros All the data for any one column must be collected together including the objective row and appear on consecutive records The order of rows within a column is insignificant however the same row should not appear more than once RHS section Blank Value on the RHS row given on fields 2 and 3 5 Row name optional ma A 4 Appendix A Input Output Data Layouts Value on the RHS row given in fields 2 and 5 blank if field 5 is not used Fields 5 and 6 may be omitted The user may provide for alternative problems in one data file by including multiple RHS sets By default the system selects only the first RHS set and ignores the remainder RHS set names have the same description and values are entered in the same way as given above All the data for any one RHS set must be collected together and appear on consecutive records The order of rows within an RHS set is insignificant however the same row should not appear more than once An empty RHS set values all zero can be built with one record assigning the RHS set name and specifying zero on some row This is not necessary if the RHS set is to be the only RHS set provided RANGES section Value on the RANGE row given on fields 2 and 3 Row name optional Value on the RANGE row given in fields 2 and 5 blank if field 5 is not used Fields 5 and 6 may be omitted Range values app
197. lowing SPECS command MIP PREPROCESS ON default OFF MIP PREPROCESS OFF may also be used This causes MIP pre processing to be carried out at the outset before the relaxed LP is solved and again before solving each sub problem in Branch and Bound Additional memory areas are required for this algorithm so that the fixing of variables and relaxing of constraints can be replicated at every point on the tree allowing full freedom to branch in any direction without requiring the MIP pre processor execution to be repeated un necessarily These areas are called FIX tables and are assigned together with the node tables in the ratio 10 to 1 10 fixes to every node as an average For some models this ratio is not enough and it can be altered with the SPECS command MIP FIX QUOTA n default 10 While 10 is usually suficient a ratio of 20 to 1 has been found necessary for some problems Extremely high values should be avoided so as to allow space for a maximum of nodes The following commands correspond to the same features in the Presolve algorithm MIP PREPROCESS LEVEL n 1 3 default 3 MIP PREPROCESS LOG LEVEL n 0 4 default 1 Three levels are available in the pre processor and the level of information logged can be controlled as before Note that log level refers to the root node only the level for logging during branch and bound is reduced by one In addition the MIP pre processor can be used at the root node and then be
198. lue Automatic Rounding allows user to fix these variables immediately at the nearest discrete value and consider the restricted branch and bound tree that results Given the likelihood of finding an integer solution in this restricted sub tree the time required to find a suitable solution to the problem may be very greatly reduced MIP can operate in two phases a search of the restricted tree auto rounded followed by a search of the full tree and each tree may be controlled by its own independent limits In order to activate auto rounding the following command is given MIP AUTO ROUNDING ON Default OFF Control over what variables will be rounded is provided by the following command MIP ROUNDING FRACTION v Default v 0 001 where the default is in fact set from the integer tolerance Any value up to 0 5 can be specified the auto round procedure will fix any binary or integer variable that is closer than this amount to the nearest integer value Fixing covers both basic and non basic variables so implicitly all binary and integer variables that are non basic in the relaxed LP optimum will be fixed Finally the algorithm used to solve the auto rounded sub problem which is used as the root node for the restricted tree may be governed with the following commands MIP AROUND SOLVER SSX MIP AROUND SOLVER IPM Default SSX where SSX specifies the Dual algorithm reverting to Primal if it fails Back to Chapter contents
199. lution of very large LP problems The solution algorithms take full advantage of sparsity of the original problem and also keep the creation of new non zeros during the solution under control The Sparse Simplex algorithm of FortMP is a state of the art implementation of the most advanced sparse LP techniques This makes FortMP capable of solving large scale LP problems efficiently reliably and accurately Sparsity is exploited throughout all the algorithms of SSX This requires the application of sophisticated data structures and manipulations which are transparent to the user of the stand alone version of FortMP The main algorithm in SSX of FortMP is PRIMAL This addresses any LP problem There is a dual algorithm also available called DUAL It requires the presence of a dual feasible solution This is always available at the nodes of the MIP algorithm and the main intended usage of DUAL is to assist the efficient solution of the subproblems arising in MIP The proper operation of both of these algorithms is supported by some additional procedures such as SCALE CRASH and INVERT and these will also be discussed briefly Back to Chapter contents 4 3 PRIMAL Algorithm The simplex method is an iterative procedure making basis bound changes at each step The primal simplex first attempts to find a feasible solution Phase I i e one that satisfies all constraints and bounds This is achieved by simplex iterations basis bound changes Aft
200. ly FORTMP SPC The following is a list of these files model mps MPS format input data file model bas MPS format basis data file model res Standard output file model log Standard log file model mat Internal matrix file model nam Internal names file model sav Internal save file model bbf SIMPLEX save binary basis file model isv IPM solution save file model msv MIP Branch and Bound tree save file TTI AA In addition to providing the model name you can change the file naming structure by using a directory name and by setting individual file names The DIRECTORY or equivalent PATH command is as follows DIRECTORY NAME dirname PATH NAME dirname where dirname is a text string of maximum length 50 characters which is used as a prefix to every filename with the exception of specs The SPECS file cannot of course define its own prefix Any special separator such as or to appear between dirname and the model name must be included by the user in the dirname argument Finally some of the input and output files can be given individual names with one of the following SPECS commands INPUT FILE NAME filename OUTPUT FILE NAME filename LOG FILE NAME filename BASIS FILE NAME filename The filename supplied in this case may be up to 70 characters long and will not be prefixed by the directory name if any Back to Chapter contents 3 7 Err
201. ly in a manner dependant on the row type to form lower and upper bounds on the LHS expression Xa x as follows For an LE type constraint RHS RANGE lt Xa x lt RHS For a GE type constraint RHS RANGE gt Lajjx gt RHS For an EQ type constraint with positive range value A 5 FortMP Appendices For an EQ type constraint with negative range value No other possibilities exist The range value for a GE type or LE type constraint must be positive or zero if range value is zero then the constraint becomes an equality The user may provide for alternative problems in one data file by including multiple RANGE sets By default the system selects only the first RANGE set and ignores the remainder RANGE set names have the same description and values are entered in the same way as given above All the data for any one RANGE set must be collected together and appear on consecutive records The order of rows within a RANGE set is insignificant however the same row should not appear more than once There is no such thing as an empty RANGE set Zero values indicating an equality constraint must be explicitly entered BOUNDS section Bound type code as specified below Value of the bound whenever relevant Fields 5 and 6 are not used The bounds section is used not only to specify bounds on continuous variables but also to specify binary and integer variable types in MIP Each variable is given a default type of
202. me Field 3 Row name Field 4 Value Field 5 Row name Field 6 Value Table 2 The COLUMNS Section Note that a column is never split up with data from another column in between Records may hold one or two entries at will if there is only one entry then fields 5 and 6 are left blank The order of rows within a column is immaterial In the RHS section right hand side values are entered in the same way as the values of the COLUMNS section The column name in field 2 is replaced by a name for the RHS itself The RHS section of the example may be encoded as in Table 3 below Field 1 Field 2 Field 3 Field 4 Field 5 Field 6 2 3 5 12 15 22 25 36 40 47 50 61 monje epee e Field 2 RHS set name Field 3 Row name Field 4 Value Field 5 Row name Field 6 Value Table 3 The RHS Section In the BOUNDS section each non zero bound value must be given singly Field 3 here names the column variable to which the bound applies and field 2 names the bound set In field 1 a code is entered to specify the bound type The BOUNDS section of the example may be encoded as in Table 4 ae 1 Field 2 Field 3 Field 4 Field 5 Field 6 5 12 15 22 25 36 40 47 50 61 Field 1 Bound type code LO Lower bound FX Fixed value MI Minus type LI Integer variable lower bound BV Binary variable Field 2 Bound set name Field 3 Column name Field 4 Value UP Upper bound FR Free variable PL Plus type default UI
203. mming development is due to Dr M Hajian 15 and the work on parallel Branch and Bound has been undertaken by M Hajian and I Hai 16 on a cluster of workstations using PVM Parallel Virtual Machine Many recent algorithmic extensions to SSX are due to Professor I Maros 17 18 who has worked closely with the development team Dr H Jones has been responsible for extending the IPM algorithm to QP 25 In integrating the interior point method IPM and Sparse Simplex SSX and MIP E F D Ellison has put in considerable effort The substantial system development effort put in by him with the able support of all the developers has turned the research codes into an integrated system covering SSX IPM and MIP running on many platforms Dr D Sayers of NAG has worked on many areas of the system and provided enormous support in all aspects of system production and testing D Winstanley at University of London Computer Centre has implemented and tuned many versions of the system Back to Chapter contents 1 3 Scope and Purpose FortMP is designed to fulfill the needs of users at different levels of sophistication beginner intermediate and advanced This manual is therefore subdivided into three parts Part 1 Introductory and simple use of FortMP This part provides a simple introductory tutorial on the use of FortMP It is intended for users who are not interested in the mechanics of the solution and who simply require a black box to solve thei
204. mon sections that are read by all calls to the solver Section 7 4 4 Quadratic Programming The chapter on QP is added to this manual Chapter 9 FortMP QP is an IPM based solver for convex quadratic objectives Q matrix positive semi definite It has been extended to solve integer QP using a branch and bound algorithm CRASH Features The special CRASH SOR feature is added in this manual together with other CRASH extensions Chapter 10 New Appendices New appendices are added as follows Appendix C on installation procedures Appendix D on modelling systems Appendix E on C language usage Appendix F on parallel execution Appendix G on memory management Appendix H on special testing and other miscellaneous extras B Changes Made In This Manual A variety of minor corrections have been put in which are not described here Significant changes are described chapter by chapter Chapter 1 Introduction and background A statement of the QP problem is added Section 1 7 with introduction Section 1 1 and reference to the author Section 1 2 New platforms are mentioned Section 1 6 Chapter 2 Elementary use of FortMP This chapter is not changed Chapter 3 Overview of the Stand Alone FortMP System 3 7 4 Running Out of Memory This section is re written Chapter 4 Sparse Simplex SSX Solver 4 3 2 Column Selection Additional column selection procedures are mentioned This section has been re wri
205. more blanks A 22 Appendix A Input Output Data Layouts Since a token must inherently obey the following First character is non blank There are no embedded blanks these are rules that must apply to all names that is to Row names Column names RHS set names RANGE set names BOUND set names Problem name Label in a marker line Free form layouts are summarised in the following tables no section Bowe osme O evem MARKER 3 Value 1 Marker type in quotes xxxORG xxxEND 2 3 ee jee h Oo po o RHS section RANGES section BOUNDS section no RANGE set name BOUND set name A 23 FortMP Appendices 4 Rowname2 Rowname Ds vas vanes where the details of type codes and other meanings options etc are exactly as described for corresponding fields in MPS form data see Appendix A1 above In a MARKER line the SOS type in positions 2 3 and the reference row in token 4 apply only to marker type SOSORG and are omitted for other marker types Token 4 may also be omitted for the default reference row It is also permitted to switch the order of tokens 3 and 4 putting a dummy as token 3 if the REF row name is not given Back to Chapter contents A 24 Appendix A Input Output Data Layouts A2 2 Name length Long names up to 16 characters can be employed with the SPECS command INPUT LONG NAMES ON This applies to Row names and Column names only not to
206. n and so the initial policy is to continue down one branch to the first integer solution in order to find a bound quickly Each subproblem is solved by using the SSX solver The bounding process works because no subproblem can have a better solution value than its parent node since an extra restriction has been added Back to Chapter contents TIT A 3 1 5 Overall Structure of the System Figure 1 below illustrates in simplified form the block structure of the system WT Read Specs Preparation Presolve Scale Algorithm Starting Basis IPM Output Discrete Variable Yes Figure 1 Block structure of the system WT fF As can be seen the execution path through the system is controlled by three main switches The ALGORITHM switch selects one of the three main procedures PRIMAL DUAL or IPM to employ for the LP solution The BASREC switch is only active after IPM and causes BASREC to be executed followed by PRIMAL If it is BASREC is OFF then IPM is followed immediately by IPM OUTPUT and the run terminates The Discrete Variables or MIP switch causes the MIP algorithm Branch and Bound to be executed The MIP switch is always set OFF if the problem has no MIP variables Back to Chapter contents 3 1 6 Providing Controls on the SPECS File At the outset FortMP reads all of the control commands that it needs for the run from the file named FORTMP SPC Every control has a default valu
207. n IPM is used the starting basis for the final check by PRIMAL is provided by BASREC as will be described in the next chapter Back to Chapter contents 4 6 3 Tolerances and parameters A tolerance is a small numerical range Two numbers whose difference lies within this range are considered to be equal Tolerances are used throughout FortMP to overcome the effects of computer arithmetic which for calculations involving real and double precision quantities is imprecise Various tolerances can be set by SPECS commands however the user should be aware that the default values have been the subject of careful research and should not be lightly changed The defaults are expected to be effective provided that the problem coefficients have been normalised with the SCALE procedure T7 12 The following tolerances affect feasibility control FEASIBILITY TOLERANCE value Default is 1 0d 5 RHS TOLERANCE value Default is 1 0d 5 DJ TOLERANCE value Default is 1 0d 5 where the default value is given in each case FEASIBILITY and RHS tolerances are in fact synonyms for the same tolerance value which defines how far any primal variable solution value may go outside its range without being deemed infeasible DJ tolerance is the equivalent for any dual solution value This means in effect how far a d may become negative if the primal variable is at lower bound or how far positive if the pr
208. n named ALL is to be used it should come first on the SPECS file After reading and interpreting this section the system continues to search for another section corresponding to the SPID parameter Note also that in a stand alone FortMP execution the parameter SPID is blank If the command CALL SPCINT TCTN see section 7 4 2 is used so as to load the SPECS file for internal communication each time the callable sub system is invoked then a section with the name DEFAULT is interpreted specially It is not stored as a section to be communicated but rather it modifies the actual control defaults on the spot The effect is the same as for an ALL section but DEFAULT commands are applied even when the string NOSPECS is used for SPID DEFAULT commands are not listed in the log DEFAULT as a section name has no special meaning for a stand alone execution nor if CALL SPCINT TCTN is not used to load the SPECS file B 4 Appendix B SPECS Commands Back to Chapter contents B1 4 Commentary The character asterisk may be used to terminate the command on any line Material that follows is ignored and can be used as commentary for that command Any line with asterisk as the first non blank character is ignored This provides a means to cancel a command without removing it from the SPECS file Another way to introduce commentary is to place the END command after the last active command and all lines following END
209. nd sets the PHI control in the elementary formula for calculating u See 5 2 1 IPM POWER n n 0 3 Default is 4 This parameter sets the POWER applied to the numerator in the more advanced formula for u which is used in the earlier phase of the predictor corrector algorithm See 5 2 1 IPM DARE v Default is 0 9995 DARE is a fraction between 0 and 1 controlling how closely to approach the nearest boundary when moving from one interior point to the next See 5 2 1 PM RELATIVE EPSILON v Default is 1 0e 7 The relative epsilon is the tolerance within which the duality gap can be considered to be zero Thus the optimum solution is reached provided the point is feasible See 5 2 1 PM FEASIBILITY EPSILON v Default is 1 0e 4 The feasibility epsilon is the tolerance governing feasibility of the current primal and dual IPM STARTING POINT METHOD n Default is 3 This command selects one of three starting point methods for the predictor corrector algorithm IPM SOLVER CHOLESKY IPM SOLVER SUPERNODE IPM SOLVER XSUPERNODE These commands select the solution mechanism to be used The default is XSUPERNODE See 5 2 3 IPM TOFIX n default 1 0e 12 This command sets the criterion for minimum pivot size in the Cholesky factorisation See 5 2 3 CHOLESKY CG TOLERANCE v default 1 0e 4 CHOLESK
210. nd the problem is then re solved The following SPECS command must be given in order to make cut pool space available and activate the FortMP cut generator procedures GENERATE CUTS ON default OFF GENERATE CUTS OFF may also be specified The following SPECS commands are similar to the MIP FIX QUOTA command in that they govern the amount of space that the system reserves for the cut pool and for applying cuts to the problem CUT QUOTA n default 10 This governs the amount of cut pool space provided in relation to the model size By default the system assigns space for 10 cut constraints per constraint row in the original model and for 10 cut non zero coefficients per non zero coefficient in the original matrix ACT QUOTA n default 5 This governs the extra space allowed in the problem storage for applying cuts It applies in the same way as before The system by default assigns 5 extra constraint rows per original constraint row 5 extra spare locations per original non zero for expanding the matrix and also the same amount spread over all columns as extra row space in each column so that rows can be added with a VI 32 Chapter 6 Mixed Integer Programming MIP minimum of delay This extra spare space in the matrix is essential to ensure that the process is efficient ACT quota also governs the amount of space needed per node to record applied cuts enabling them to be replicated and not require re calculati
211. ndicating whether node is infeasible or cutoff Bvar Branch Variable index of the selected discrete entity or set member O ee Co O inanon eaw OO Pee Dare VI 39 FortMP Part 2 Best integer solution the current cutoff high value if no integer IPbest BI solution found so far SET SET Index of selected SOS when Typ is S1 or S2 Index range of selected SOS members allowed to be non zero all other members of the set fixed to zero at this node FROM FROM TO TO Other information is given with self explanatory text The following is the output to log file at level 2 for the example problem given earlier IN THIS SEARCH FIRST NODE CHOICE STRATEGY 1 SECOND NODE CHOICE STRATEGY 7 VARIABLE CHOICE STRATEGY 1 optimum lp solution is 0 9344E 02 Dual infeasibility 3 shi 109671 Iter lke Node Parnt Obj ve Fractn Bvar Typ Dir NNI NCH Dpth Ipbest 2 ZA SecA Iki No feas sol 4 BV DWN 2 il t 01000m 3 Lo 93 8205 Ona AO 4 BV UP 2 0 i 0 10005 4 3 Sl S68 OILS 2 UI DWN 1 al Z O LOO m 5 A AOT EA 0 5070E 01 tg 2 wie il 2 3 010005 SE 3 FROM TO a 19 Iterno 21 Prty 0 6 5 138369 No feas sol Ly SZ we 2 3 OPO OOH SE 3 FROM TO 1g 19 Iterno 21 Prty 0 7 5 i108 000 ORS 0 17 S2 DWN 2 2 0 1000E 11 SE 3 FROM TO LY 18 Iterno 22 Prty 0
212. nds 3 A similar to method 2 has scaling applied to balance the primal and dual values The method can be specified with the SPECS command IPM STARTING POINT METHOD n where n is 1 2 or 3 The default is method 1 and this should be retained unless you find the result unsatisfactory or you wish to experiment Back to Chapter contents 5 2 3 Choice of Solution Algorithm for the Equations Since the matrix inversion procedure that is used to solve the equations occupies much the largest part of the execution time more than 90 in many cases you should consider carefully which version to use There are 3 versions available Standard Cholesky procedure Cholesky with supernodes Cholesky with extended supernodes Supernodes is a procedure whereby dense patterns in the matrix ADA see Section 5 1 4 can be exploited so as to take advantage of special hardware for example vector registers The extended supernodes version carries these ideas further and can run significantly faster by making better use of vector registers in the hardware Speed gains up to five times faster have been observed However it has the disadvantage of needing significantly more memory in order to run The version to use is specified with the following SPECS commands IPM SOLVER CHOLESKY IPM SOLVER SUPERNODE IPM SOLVER XSUPERNODE The default is XSUPERNODE Although the matrix to be inverted is positive defi
213. nds The SPECS command file fortmp spc is split into sections permitting different commands to apply in multiple calls to the solver e g via SUBMP1 A section is delimited by the following two lines BEGIN sectid END where sectid is a string of up to 8 characters blank if omitted that gives an identifier to each section END is not necessarily the end of the file but merely terminates the section and any lines between END and the next BEGIN or end of file are ignored In a stand alone FortMP execution there is usually only one relevant section and this starts at the first BEGIN line on the file whatever section id if any is given for it However the special name ALL command BEGIN ALL can change this as explained below In a run where FortMP is used as a callable sub system e g with SUBMP1 the several invocations may well require different SPECS so that two or more lists may be needed The list to be used for one call is selected by the SPID parameter see chapter 7 section 7 1 2 The following special values for SPID should be noted Blank Select the first section If the first section is ALL then select the first and second sections NOSPECS Bypass SPECS command input altogether All i controls remain at default settings DEFAULT Has a special meaning and should never be l used for SPID ALEJ Has a special meaning and should never be used for SPID Note that if a sectio
214. ng steps are made for a large number of iterations In the worst case stalling can become cycling if the procedure returns to an earlier basis and this sequence of iterations is repeated an infinite number of times Since large scale real life problems even after PRESOLVE tend to be rather degenerate proper handling of degeneracy is an important issue PRIMAL is well prepared to solve degenerate LP problems efficiently Its Phase I procedure provides some automatism to reduce the chance of degenerate steps by maximizing the progress towards feasibility In the case of MSUB gt 1 when the principle of greatest change is applied this chance is further increased This latter remark is valid for Phase II as well i e whenever a non degenerate step is possible with the candidate vectors PRIMAL will find it In Phase II PRIMAL applies a special technique to avoid the repetition of a previous basis It makes arrangements to improve the objective at each iteration at least by a very small amount even if it may result in the slight violation of feasibility Such small violations if they arise are kept under control and are completely eliminated before termination This anti degeneracy technique is very cheap hardly requires any additional operations per iteration contributes to an increased numerical stability of the solution and does not require the identification of the presence of degeneracy The anti degeneracy strategy is automatic and
215. ng Degeneracy Numerical Features Issues of Efficiency 4 4 DUAL Algorithm 44 1 Starting Procedures 4 4 2 Row Selection 4 4 3 DUAL Phase 1 4 4 4 Handling Degeneracy 4 4 5 Numerical Features 4 5 INVERT 4 6 SSX Algorithm Controls 4 6 1 4 6 2 4 6 3 4 6 4 4 6 5 4 6 6 4 6 7 The Principal Controls Starting Basis Controls Tolerances and parameters Save and Restart Processing an External Basis Log Lising Controls Special Pivoting and Update Controls 4 7 Summary of SPECS Commands 11 11 11 13 13 15 16 16 18 TAX7 1 4 1 Internal Problem Statement We begin this chapter by studying the FortMP SSX internal representation of LP problems Let m denote the number of constraints and n the number of original variables All the constraints are converted into equality form by adding appropriate variables to each constraint This will result in the following LP problem Minimise or Maximise the objective function 2 CK subject to the constraints y X a x b fori 1 m and bound constraints if any on y and x The x variables that were obtained from the original problem by linear transformations are referred to as structural variables while the y variables added to the rows are called logical variables Thus the total number of variables the algorithm works with is m n As a result of the linear transformations done during input all finite lower bounds of variables will be zero In the abo
216. nge mode The user who needs solution values or updated tableau as part of a series of GETs and CHGs etc should execute GETSOL and GETDSL before making the call to BEGCHG 8 The solution vector SOLVEC obtained by CALL GETSOL supplies the values of logical variables in positions 1 to MROW Position IOBJ obtained by using GETSIZ is therefore the logical value on the objective row which is equal to the objective value reversed in sign No separate argument is needed to get the objective value Back to Chapter contents Chapter 9 The Interior Point Method for Quadratic Programming Contents 9 1 Statement of the QP Problem 9 1 1 The QP Problem Symmetric Q form 9 1 2 The QP problem Separable FF Form 9 1 3 Mixed Integer QP with Binary Variables 9 2 IPM Solution Procedure 9 2 1 Formulation 9 2 2 Solving the System of Equations 9 2 3 Determining the Starting Point 9 2 4 Controls on the Predictor Corrector Algorithm for QP 9 3 Input Data Layout 9 3 1 Matrix Input for the symmetric Q form 9 3 2 Matrix Input for the separable FF form 9 4 Worked Example 94 1 Worked example using the Q form 9 4 2 Worked example using FF form 9 5 Branch and Bound Algorithm for MIQP 9 5 1 Sub problem Solution 9 5 2 Simplified Tree 9 5 3 User Controls 9 6 Summary of SPECS Commands 9 6 1 Controls for IPM 9 6 2 Controls for Branch and Bound Dank RAR WwWn Nd nn 10 10 18 18 18 18 20 20 21 9 1 Statement of the QP Pro
217. nite numerical stability can be a problem It is controlled by checking the pivot size at each step with a criterion that is set by the following SPECS command IPM TOFIX n Default 1 0e 12 This is similar to the pivot tolerances used in SSX algorithms but is not quite the same because here there is no other choice available if the pivot is too small Instead the pivot is simply changed to 1 0 This of course results in a somewhat inaccurate solution and at a later stage the solution is refined with Conjugate Gradient iterations see the next section below Back to Chapter contents 5 2 4 Refinement by Conjugate Gradient iterations The solution to the equations at each iteration once found is subject to a degree of error that may be calculated by substitution and comparing with the RHS If the error is not too large it can usually be reduced by Conjugate Gradient CG iterations and two levels are defined CG tolerance level Error tolerance level The lower tolerance level is the criterion for sufficient accuracy while the upper error level is the highest level at which CG iterations may be tried Between these levels CG iterations are performed up to a certain maximum The system is controlled by the following SPECS commands CHOLESKY CG TOLERANCE v default 1 0e 4 which sets the lower level CHOLESKY ERROR TOLERANCE v default 10 0 which sets the upper level and MAXIMUM CG ITERATION
218. nlinear function of a single argument as in classical Separable Programming The overall problem has an otherwise LP or an IP structure except for such nonlinear functions Consider the function f y illustrated in Figure 3 as a piecewise linear function in one variable defined over the closed intervals k 1 K 1 where the coordinates S fO k 1 K represent points P Px FortMP Part 2 f y fO fO Figure 3 Any point y in the closed interval may be written as Y5 XkYk TX Yr where xX X landx x 20 Similarly as f y is linear in the interval it can be written as FOVI FOI oa tI S cat Xr This leads to the representation of f y using a set of weighting variables x k 1 K by the equality FY FO I Fo I x 4 where fx tx Poe kXg y 0 y 20 5 ei te ey Sl x20 k 1 2 K 6 VI 8 Chapter 6 Mixed Integer Programming MIP Plus the added condition that not more than two adjacent variables can be non zero at any one time The weighting variables x are called the special ordered set type two variables and the rows 4 5 and 6 are called function rows reference rows and the convexity rows respectively as in equations 1 2 and 3 of section 6 2 3 Should the SOS2 s not represent separable functions then none of these rows need actually exist but there is an advantage to the system if it is aware of the reference rows at least B
219. nly This is the default ON means reduce infeasibility while improving the objective function value If the option to improve the objective function value is chosen then the reduction parameter B is controlled with the following command SOR OBJECTIVE PARAMETER v Where the default value for v is 1 1 The SOR relaxation parameter amp is controlled with the command SOR RELAX PARAMETER v Where the default value for v is 1 5 An SOR iteration is a complete cycle through all the constraints The maximum number of iterations is controlled with the command X 11 Advanced Starting Bases SOR MAXIMUM ITERATIONS n Where the default value for n is 2 Feasibility of a constraint is governed by the violation tolerance A constraint is considered violated if Ib a7 x gt violation tolerance The violation tolerance parameter is controlled with the command SOR VIOLATION TOLERANCE v Where the default value for v is 1x107 An SOR solution is considered feasible if IAx bll lt feasibility tolerance The feasibility tolerance parameter is controlled with the command SOR FEASIBII TY TOLERANCE v Where the default value for v is 1x10 Convergence of SOR is considered to have occurred when the infeasibilty of the current solution is not reduced significantly in the next iteration i e convergence is considered to have occu
220. nored The continuous optimum forms the root node of a branching tree which is then developed by the MIP algorithm At each node starting with the root node some MIP variable is chosen which as yet does not have a legal discrete value Two branches are formed with the variable restricted one way on the first branch and the opposite way on the second branch This restriction works differently for different MIP variable types A binary variable is restricted to zero on one branch and to one on the other branch An integer variable having a value between two integers K and K is restricted to an upper bound of K on one branch and a lower bound of K on the other branch An SOS is divided in two contiguous subsets On one branch the lower set is restricted all to zero and on the other branch the upper set is restricted all to zero A semi continuous variable is restricted to zero on one branch and to its continuous range on the other branch It is clear that by progressively branching in this manner and solving the subproblems so obtained to derive new nodes on which to branch again the algorithm can eventually reach all possible integer solutions and select the best However this would be impossibly long The algorithm succeeds in a reasonable length of time by bounding that is by cutting off any branch with a solution value worse than the current best available integer solution No bounding is possible until an integer solution is know
221. nput for the separable FF form Given that Q FF the user enters the coefficients of the F matrix in the ROWS section of the MPS form input data The rows are designated as type F or F Example P i 21 3 lt x ee a INIMISE x x 2 x x 3 2 1 xX Subject to rr a Ape 10 Xp X Z0 The input data for the above problem is Back to Chapter contents 9 4 Worked Example The example presented here is that of chapter 2 section 2 1 1 with the addition of quadratic terms in the objective function The problem is stated as Minimize Asta 6x2 5X3 16x 2x See x7 1 2 X QX Subject to X Xp 2 Xr 3X2 5 2x 3X 4 X X2 X3 4Xq X5 11 X 2x2 2X3 3x4 t X5 2X5 x 14 0 5 lt x 0 5 lt X gt s gS 2 330 x4 1 0 0 0 lt x5 6 0 1 0 x7 Where Q is a symmetric matrix comprising the quadratic cost factors possibly expressible as FF Back to Chapter contents 9 4 1 Worked example using the Q form In this example the quadratic terms of the objective are as follows 2 2 2 2 2X1 X1 X2 t X2 X3 X3 X4 t X3 The Q matrix is as follows With the remaining positions all zero Input data presented in a file TESTQP QDT is shown below in listing 1 Listing 2 shows the associated SPECS commands in file FORTMP SPC Zz C000 He ee St ESTOPOD PNORPNBAF
222. nstants Back to Chapter contents 7 1 3 Simple FORTMP subroutine with parameters In the main program FORTMP the variables SPID STSL and TCTN described in the previous section are declared as local variables An effective way to use FortMP as a sub system is to use these three variables as arguments in the main subroutine call The user could write SUBROUTINE MYLP SPID STSL TCTN and follow this by copying all the declarations without change The initialisation statement SPID i is omitted so that the external system can supply it for each CALL The the rest of the FORTMP main program is then copied exactly as is The user may also simplify the FORTMP main program by omitting calls to procedures that are not needed and omitting unused switches This will have the benefit of reducing the number of FortMP callable library routines that need to be linked for the user s final executable system vil 4 Chapter 7 FortMP Subroutine Library and External Data Interface The following is an example of a simple subroutine to solve using the SSX primal algorithm SUBIROUT TINE MAGLI SPLD SUS TOWN CHARACTER 8 SPID INTEGER STSL TETN EXTERNAL NITA INPUT SCALB CRASE EXTERNAL PRIMAL OUTPUT FINIAL STSL 0 CALL INTTAL SEID TETIN CALL TNPUT TETN CALL SCALE TETN CAL CRASH TORN CALU PRIMAL STSL TETN CALU OUTP
223. nual CRASH supplement 10 2 Primary CRASH Algorithms 10 2 1 Basic CRASH Procedure Before starting any CRASH procedure an initial basis is always set up that comprises all the logicals with the structural variables set to zero i e set to lower bound or to zero in the case of a free variable This is termed the Unit basis Then the CRASH procedure performs a succession of exchanges each of which replaces a basic logical with a non basic structural In any such exchange the pivot element that is the intersection of row logical with column structural in the updated matrix must be non zero Updating the matrix in order to verify this requirement is time consuming and therefore the large majority of pivots are chosen in a way that avoids any need for updating This can be done if the column selected at every step has nothing but zeros on the pivotal rows of previous steps The process is called triangular selection because it leads to a basis matrix that has a lower triangular form when the rows and columns are re ordered in the sequence of their selection Further steps that require updates before a pivot can be chosen take place if at all after a maximum number of triangular pivots have been chosen In any case a final INVERT is performed as the quickest way to generate an Eta file so that other SSX algorithms can follow Back to Chapter contents 10 2 2 CRASH LTSF The LTSF designation symbolizes Lower Triangular
224. o 1 0 a X y ax 0 k N a gt 0 jeN3 Back to Chapter contents 6 10 3 Mixed Less or Equals Constraint Classification Variable Upper Bound VUB and Variable Lower Bound VLB Weak knapsack constraint with one binary term one non binary term and zero RHS A X A X lt b JENz KEN3 If a gt O then we have VLB else if a lt 0 then we have VUB A combination of VUB and VLB for the same pairing of a decision variable with a continuous bounded variable is modelled in a simpler way by one semi continuous variable Weak Knapsack WKN If we have a mixed constraint VI 44 Chapter 6 Mixed Integer Programming MIP Yiajx Ya x lt b JEN 3 ke N3 Then appropriate bounds on the non binary variables may lead to a knapsack If u is the bound range of x and if l 1s finite for each a gt 0 ux is finite for each a lt O Now let the finite bound so indicated be lu We can derive the following constraint Lax lt b ya ilu jeN keN which is a meaningful knapsack constraint provided that the RHS is not too large Weak knapsack constraints are further sub classified into the following constraint types Weak Invariant Knapsack WIK Weak Knapsack constraint with all binary terms having coefficient 1 0 Ir Yax lt b jeN3 kN with the same bound conditions as before and assuming that the derived knapsack is meaningful Back to Chapter contents 6 10 4 Equality constraints Although an eq
225. o the log file in each major algorithm The range is 0 4 with default value 1 in each case SIMPLEX _ SAVE FREQUENCY D uc _ gefault 10 each _ 10th reinvert TEM SAVE PREQUENCY 2 oe ve ale aes _Gdefault 10 each 10th iteration MIP SAVE FREQUENCY n default 10 each 500th node These commands specify RESTART in each major algorithm For the SIMPLEX algorithms RESTART is an alternative to other starting basis options Otherwise there is an ON OFF switch default OFF IMPLEX START CRASH These commands select the mechanism for setting up the starting basis when the main algorithm is PRIMAL or DUAL CRASH is the default FEASIBILITY TOLERANCE value This command assigns a tolerance used in the algorithms The default for value is 1 0d 5 Other tolerances are introduced later in this manual INVERT FREQUENCY n This command assigns a frequency in terms of the iteration count for reinversion during SIMPLEX algorithms The default for n is 50 SIMPLEX LOG FREQUENCY n NODE LOG FREQUENCY n These commands assign a frequency for printing the iteration log during SIMPLEX algorithms or the node log during MIP Default for m is 1 IPM BASREC ON IPM BASREC OFF When ALGORITHM IPM has been selected the user can set this switch OFF in order to halt execution and print the out
226. of Push steps needed is no more than the number of super basic values in each solution Back to Chapter contents 10 3 2 The Push Algorithms In a Push iteration we evaluate the changes to solution values of basic variables resulting from a change to one of the super basic variables As the size of the change is allowed to grow one of two things may happen either X 7 Advanced Starting Bases A basic variable may reach a bound or The super basic variable may reach its bound in the sense of its change If the latter event occurs first then it is only necessary to record all the changes and one super basic variable has been rendered non basic If the former event occurs first then we make a change to the basis replacing the basic with the super basic and once again the number of super basic variables is reduced by one The overall procedure is the same for both primal and dual push with re inversions occurring at the usual intervals Back to Chapter contents 10 3 3 The starting CRASH The starting CRASH is modified for use before doing Purify The changes are designed to meet the needs of the primal push algorithm that follows All those variables with a primal solution value equal to lower or upper bound are temporarily considered as fixed Logical slacks at zero or at range are now considered as artificials with high priority for removal from the basis in the CRASH Structurals at lower or at upper bound are fixed so as never
227. of course obvious that in order to continue running in a restart by this means the original limit that halted the previous run must be relaxed A new time limit is set up anyway but the Maximum NODES INTEGER SOLUTIONS or SPACE may need to be increased see the previous section In the case of node storage limit exceeded the user may be able to increase the maximum but this will not help if the maximum is already restricted by the store size The user can attempt to run with reduced quotas FIX CUT and ACT but if this also fails then a larger memory is needed Back to Chapter contents 6 8 5 Bypassing Mixed Integer In many cases users prefer to see the solution to the linear programming relaxation of a MIP model before the beginning of the branch and bound process In this case the user can bypass the call to MIP module with the following SPECS command MIP OFF Default ON ON can also be specified Alternatively the user may limit the MIP run for example with the command MAXIMUM MIP NODES 0 Note that it is possible to restart MIP after restarting the LPR stage with the saved optimal basis Commands to use are INPUT RESTART SIMPLEX START RESTART VI 37 FortMP Part 2 with the same SCALE and MIP PREPROCESS option as before but without using PRESOLVE or IPM Back to Chapter contents 6 8 6 Making use of the PRIMAL algorithm DUAL is employed by default for solving sub problems The following S
228. om the use of DUAL After DUAL the system always reverts to PRIMAL for a final check on optimality The following SPECS commands are useful in modifying the output written to the logfile LOG DISPLAY This command causes the log which includes progress information and statistics to be duplicated on the standard display SIMPLEX LOG LEVEL n Where n is a number 0 1 2 3 or 4 The SIMPLEX iteration log is normally produced at level 1 only listing the important events such as re inversions At higher levels an iteration log is listed in progressively more and more detail SIMPLEX LOG FREQUENCY n The SIMPLEX iteration log is normally produced at every iteration levels 2 or above This would produce far too much for a large problem and so the user may reduce the frequency of output with this instruction Back to Chapter contents 2 3 Additional Data Preparation Features An example Bounded variables and RHS ranges The following is a simple example of a problem having both bounds on the variables and ranges on the RHS Minimize the cost function 4x 3x 2x subject to the following constraints 2 lt x 2x x S6 82x 3x 24 3x x 4 and to the following bounds 05 lt x lt 50 x 2 0 x is unbounded free lt 0 0 ie is negative The ROWS section of the example may be encoded as in Table 8 below pe 1 Field 2 Field 3 Field 4 Field 5 Field 6 5 12 15 22 25 36 40 47 50 61
229. on Clearly the user may need to raise the quotas for his problem but should avoid raising them too high in order to leave enough room for Branch and Bound itself and for the other algorithms Back to Chapter contents 6 7 4 Fixing Variables by Dual Solution Analysis When selecting a discrete entity for branching only basic variables are considered SOSs apart Non basic variables valued at zero or at bound should not be selected because they may never need it In general only a small proportion of the discrete entities need to be branched on in order to reach an integer solution However the dual value associated with a non basic discrete variable binary integer or semi continuous at zero can be used to find a minimum change that would apply to the objective if the variable shifted to another discrete value If this minimum change increases the current optimum above the cutoff level then clearly it will be unnecessary The variable may be fixed at its current value To invoke the procedure the following SPECS command is used MIP ANALYSE DUAL ON default OFF OFF may also be given The user should employ this option with caution as not all problems benefit and the calculations require extra time VI 33 FortMP Part 2 6 8 Miscellaneous MIP controls 6 8 1 Automatic rounding heuristics At the relaxed LP optimum solution it may be expected that some of the discrete variables are already feasible or very near feasible in va
230. on output features of FortMP Instead of using disk files for these items the data is entirely passed via the argument lists of CALL statements which is both faster and in many cases much easier for the user since MPS form data does not have to be built The term external is used here to contrast with internal for the data interface and not to indicate use of a disk file which could also be construed as an external form of interface The external data interface described in this chapter is the user s means to convey externally built problem data to and from the FortMP sub system via arguments In the next chapter library routines are introduced that directly access the internal stored form of the data which has been subject to various changes sign change scaling pre processing etc It is tempting to use internal access for modifications e g to supply changes to the RHS or bound set before re solving a problem However if this method is employed the user must be responsible for converting the modifications from the external form to the internal equivalent and this may not be easy Facilities to do this may be provided in a future release of FortMP Arguments comprise input tables and output tables The input tables are prepared in advance by the user s program and a simple protocol is used for the presentation of sparse matrix data Once the system is informed that external data interface is being used the OUTPUT module sup
231. or a variety of problem types Back to Chapter contents 3 1 2 Sparse Simplex SSX PRIMAL DUAL and INVERT The revised SSX algorithms comprising PRIMAL and DUAL together with the INVERT procedure which is used in both algorithms form the central core of the system By default PRIMAL is used for the solution and PRIMAL is always used to complete the solution process and verify that any other solution e g that supplied by DUAL is indeed a valid solution before terminating mr A rather simplified view of the SSX algorithms is given here the reader will find a fuller discussion in Chapter 4 SSX proceeds via a progression of basic solutions In a basic solution there is a set of M basic variables where M is the row size of the problem including the objective row and all other variables are fixed either to the lower bound or to the upper bound One step in the progression or one iteration exchanges one basic for one non basic variable and this proceeds until one of the following three outcomes takes place The problem is shown to have no feasible solution infeasible It is shown that the objective can be improved without limit unbounded An optimum solution is found Knowledge of the basis enables procedure INVERT to provide a set of factors termed ETA vectors with which the current solution is calculated During PRIMAL or DUAL iterations the list of ETA vectors is extended zero one or two being added
232. or starting point for the first iteration Different methods are available for this and the user can specify which method should be used Back to Chapter contents 5 1 3 Affine Barrier and Predictor Corrector Algorithms Affine Algorithm In the affine algorithm we approximate by setting u to zero in the equations so as to get the following yi a Ax b Yax for i 1 2 m Ax As u x s forj 1 2 n a Ay Az Aw c yay z w forj 1 2 n Ax Az Z Ax x Az SSH Zy forj 1 2 n As Aw w As 5 Aw 5 W for j 1 2 n In the 4th and 5th equations the 2nd order quadratic terms have been dropped this is a common approximation used in all the algorithms This may be thought of as attempting to go all the way force u to zero in one step although afterwards of course the related duality gap is recalculated on the next iteration to evaluate actual progress made A starting point is derived by one of the three standard methods which can be selected by the user Barrier Algorithm In the barrier algorithm the equations for Ax As Ay Az and Aw are approximated as follows ya Ax 0 fori 1 2 m Ax As 0 forj 1 2 n a Ay Az Aw 0 forj 12 n z Ax x Az W x Z forj 1 2 n w As s Aw W s w for j 12 n Here the point x Sj Yj ZjW j is assumed to be so far feasible as to satisfy the original equations so that the first three right hand sides above
233. or the solution of another problem Hence in FortMP there is an algorithm called BASREC which does the job of recovering a basic optimum solution from the non basic IPM solution As with the DUAL algorithm PRIMAL is called to apply the final verification before the solution is accepted The other main difference between SSX and IPM is that with IPM the number of iterations required is a function of the problem s complexity rather than its size Experience shows that for similar problems IPM solution times grow in a nearly linear fashion with problem size while SSX solution times grow quadratically because both the number of iterations and the time per iteration increase linearly with mT problem size Thus there is a certain size beyond which it usually pays the user to employ IPM Problems with 1000 or more constraint rows can probably be solved more quickly with IPM although users may need to experiment in order to find the best set of control parameters to suit their model structures If you do not need a basic solution and can be satisfied with the IPM solution then the system can be halted at that point reducing the solution time even further Back to Chapter contents 3 1 4 Mixed Integer MIP with the Branch and Bound Method Before entering the MIP solver Branch and Bound the system must obtain the basic optimum solution to the continuous problem that is the original problem with all integer and other discrete constraints ig
234. orresponding entries in array MITYP A reference row and a function row must exist for each set and sets may not overlap each other Back to Chapter contents A 28 Appendix A Input Output Data Layouts A3 2 Tabular output layouts Tabular output is an alternative to the standard form of output layout in which the rows and columns are not identified by name but rather by index This layout is invoked with the SPECS command OUTPUT TYPE RW Problem data is written to the standard output channel file name model res in a FORTRAN formatted file which is described below The data written is essentially unchanged Data is organised in sections as follows Header section Columns section Rows section Each section is described below Output Header Section The header section comprises one record as follows NCOL Number of columns OBJVAL Objective value E14 6 STCODE A 3 character code for the solution status Values are 2X A3 given below Possible values for the code STCODE are as follows OPT indicates the LP optimum solution INF indicates there is no feasible solution the output solution is infeasible UNB indicates that solutions exist with unbounded objective value ks This code is given for any other case Output Columns section A 29 FortMP Appendices One record for each structural variable j 1 2 NCOL as follows JCOL X followed by the column number as STAT A 1 c
235. ors and Recovery 3 7 1 Data Errors During the data input stage the system checks for errors in the data and will provide you with diagnostic messages including the input line number text or other available information to assist in locating an error When one has been found the system may continue checking to find more errors up to 50 but unless the errors found have an obvious remedy the system then halts without attempting a solution Back to Chapter contents 3 7 2 Maximum Iterations Reached or Other Limit Exceeded The following SPECS commands have already been introduced see Section 3 3 and control the bounds upon the algorithm s execution MAXIMUM SIMPLEX ITERATIONS n default 50000 MAXIMUM IPM ITERATIONS n default 80 MAXIMUM MIP lt INTEGER INTSOL gt n default 300 MAXIMUM MIP NODES n default 50000 MAXIMUM MIP TIME v default 50000 0 On reaching such a limit the FortMP system makes a SAVE using the type of SAVE relevant to the current algorithm and terminates with an error message TmT A1 The user will need to check whether an adjustment to parameters is necessary to avoid looping or stalling before rerunning the problem This is done by using the appropriate RESTART command one of the following SIMPLEX START RESTART IPM RESTART ON MIP RESTART ON Input time can also be saved with the command INPUT RESTART ON
236. ortMP Subroutine Library and External Data Interface 7 5 Howto Avoid Miscellaneous I O 7 5 1 Log channel In FortMP all I O channels are initialised to negative numbers indicating that there is no corresponding open file on that channel To open a file FortMP must first negate the channel making it positive and it will be negated again after closing With the following SPECS command LOG CHANNEL n where n is a positive valid I O unit number FortMP is forced to consider the file already open and it will not be closed upon exit by FINIAL routine Users must make sure that the file is opened before making the first call to a FortMP sub system and should keep it open throughout the run As a result of this the logged output for one sub problem is never over written by that of a later sub problem and the log can usefully be studied after the run The users can also present the log of their own operations on the same file It can be useful to set the log channel by default as described in 7 4 3 above This avoids the need to set the log channel in every section of the SPECS file Back to Chapter contents 7 5 2 Controlling the log In FortMP the default levels of logging are as follows SIMPLEX LOG LEVEL INVERT LOG LEVEL 1 IPM LOG LEVEL J MIP LOG LEVEL MIP PREPROCESS LOG LEVEL 1 PRESOLVE LOG LEVEL 1 PUSH LOG LEVEL 1 The output produced is generally much more than
237. orward until a match is reached To start at position 1 initialise the index to zero Note that pattern matching is likely to be slow compared to exact name look up The same conditions apply namely that MPIINP must have been executed and the SPECS command INPUT SAVE NAMES ON must have been given In the case of long 16 character names the following subroutine calls are to be used in the place of MTCHIR MTCHIJC CALL MTCLIR LRPTRN IROW CALL MTCLJC LCPTRN JCOL where RPTTRN is arow name pattern 8 characters CPTTRN is a column name pattern 8 characters Back to Chapter contents Vil 20 Chapter 7 FortMP Subroutine Library and External Data Interface 7 3 5 Looking up the name of an indexed variable In order to look up the name corresponding to a row index or column index one of the following functions is employed RNAME GIRNAM IROW CNAME GJICNAM JCOL for ordinary 8 character names or LRNAME GIRLNM IROW LCNAME GJICLNM JCOL for long 16 character names These routines are simply the reverse of the name look up functions specified in 7 3 3 above The same conditions apply namely that MPIINP must have been executed and the SPECS command INPUT SAVE NAMES ON must have been given Back to Chapter contents 7 3 6 Managing the constant term in the objective Following the use of the input subroutines MPIINP it is expected that the user will employ SUBMPI to solve the model The entire model is then pa
238. ory path if used It is expected that the user will incorporate the call to MPSOUT within the coding of FORTMP main program or within SUBMP1 sub system control routine An internal model must exist created either by INPUT or by INPMP1 If INPUT was used and names have been stored then MPSOUT must occur before the final call to FINIAL which closes the names file The model written to the output incorporates all variable fixes or constraint relaxations current at the time MPS output is called The effect of scaling is removed however and the original sign for data elements on MI type rows and GE type columns is restored these are negated internally by applying a scale factor 1 0 Back to Chapter contents VI 27 FortMP Part 3 7 7 Summary of callable library external data interface and associated commands 7 7 1 Summary of the callable library The following subroutines are called from the main program of the stand alone FortMP system See section 7 1 for details CALL MPTIME TTYP TTEXT reports processing time TTY P 0 initialises the timer CALL INITAL SPID TCTN initialises and reads the SPECS commands CALL INPUT TCTIN inputs model data from disk files and store it internally together with basis input data if any CALL GETCTL ISCL IPRE PM IBIN IBBN ICRS IDUL IPST IOUT IBOT IMIP gets the principal algorithm controls CALL
239. ote the change in specification for REAL type arguments which become DOUBLE PRECISION in the new release standard version see 8 1 6 With double precision the criterion for infinite bounds is increased see 8 3 7 notes 4 and 5 Subroutines GTABLR and GTABLC are added to enable user to obtain vectors from the updated tableau after execution of PRIMAL or DUAL algorithm see 8 1 2 8 1 3 8 1 4 8 2 4 and 8 3 5 with arguments added to 8 3 1 A change is added to mixed integer type codes to enable users to recognise the beginning of each SOS see description of MIT in 8 3 1 Appendices Chapter 9 of release 1 has been re cast as appendices to allow addition of new chapters in the future Included in Appendix A Input Output Data Layouts is the detailed specification of newly added free format input and long data names together with the layout of MIP Agenda files Appendix B SPECS Commands formerly section 9 3 is thoroughly revised and brought up to date with all commands including minor commands not described before in the manual This appendix acts as an index giving references to those sections of the manual where a command is described Preface to Release 3 A Changes Made Since Release 2 General Improvements Release 3 of FortmP March 1999 is provided with means to adapt its memory usage dynamically to the size of the problem being solved It will no longer require user to specify machine size or problem size in order to
240. ould be zero in this case However many FORTRAN compilers do not allow zero dimension sizes and so the user needs a compromise He should supply dimension size NSET 1 together with dummy arrays SREF SFUN SBEG and SEND which will not be overwritten The system computes the correct value for NSET in any case from the input data The table MITYPE must be supplied whether or not the data has any MIP type variables If it has none then MITYPE must be filled with zeros It is not necessary to specify input type and or output type in the SPECS file The system will enforce correct settings for the combination of interface input and or interface output after the SPECS commands have been read in For the IBSMP1 subroutine BSTAT is an input argument Its execution is invoked within SUBMP1 by the SPECS command VI 13 FortMP Part 3 SIMPLEX START INPUT BASIS and in this case BSTAT is also an input argument for SUBMP1 Back to Chapter contents 7 2 5 An example The following simple example is provided as part of the delivered software Model Sample Maximize x 2x5 Xs Subject to row bounds DNS 3x X2 2x4 X5 Xg 2x 1 1x3 lt 2 1 X3 X6 4 0 1 8 lt 2 8x4 1 2x7 lt 5 0 3 0 lt 5 6x xs 1 9xs lt 15 0 and column bounds ye 0 lt x lt 4 1 0 lt X3 0 lt X4 0 5 lt x lt 4 0 0 lt X6 0 lt X7 O lt x lt 43 The input scalar arguments to be supplied are as follows MR 5 number of
241. ound and variable upper bound However by defining x as a semi continuous variable this complexity can be avoided and the solution process is more efficient In the present version of FortMP the continuous range lower bound must be 1 0 This is not a real restriction however as the modeller may easily scale x by the lower bound reciprocal 1 0 40 so that this is achieved VI 5 FortMP Part 2 Back to Chapter contents 6 2 3 Special Ordered Sets of Type One A Special Ordered Set of type One SOS1 is defined to be a set of variables for which not more than one member from the set may be non zero in a feasible solution All such sets are mutually exclusive of each other the members are not subject to any other discrete conditions and are grouped together consecutively in the data The normal use of an SOS1 is to represent a set of mutually exclusive alternatives ordered in increasing values of size cost or some other suitable units appropriate to the context of the model This representation is a discrete programming extension of the separable programming model There is a strong implied assumption that a nonlinear function represented in this way is single valued over the range of its argument Consider a function g y represented by the points P P as shown in figure 2 g y VI 6 Chapter 6 Mixed Integer Programming MIP Given the tabulated coordinates g k 1 K the function 9 y may be represented as
242. presses its disk file output in favour of tables containing solution values etc There are two ways to employ the external data interface by a single call or by separate input and output calls In the single call method the user does not prepare any MYLP subroutine as above He makes a call to subroutine called SUBMPI with an argument list that includes both input tables and output tables In the separate input and output call method the user prepares a MYLP subroutine or simply interpolates calls to the FortMP subroutine library within his own main program respecting the rules given in 7 1 4 above The calls to INPUT and OUTPUT are replaced by calls to the following subroutines INPMP1 OUTMPI1 In addition when the user supplies a starting basis via the external data interface the following subroutine is used IBSMP1 VIU 7 FortMP Part 3 with appropriate argument lists in each case Back to Chapter contents 7 2 2 General description of the data interface The general form of problem statement to be used is that of two sided linear constraints given in Part I Chapter 1 Section 1 7 For clarity this is restated here as follows Given a set of n variables x x x and a set of n corresponding constants C C2 Cn Minimize or maximize the following linear function CIX C2X2 CpXn subject to the following m linear constraints Li S GjjX1 GAjoX2 AinXn SU fori 1 2 m where a
243. pter 6 Mixed Integer Programming MIP 6 1 Introduction to MIP In many real world problems it is often impossible to represent certain features of a problem using only linear constraints and continuous variables In modelling a real world problem it is often necessary to represent discrete activities by variables which are restricted to take only integer values Moreover there are non linear variable separable functions of one variable which can be approximated by a piecewise linear function Within Mathematical Programming these models are often given the generic name of Mixed Integer Programming MIP IP The diversity of applicable MIP IP models stems from the fact that in many practical problems activities and resources like machines and operators are indivisible Many problems require the determination of yes no decisions which can modelled by introducing binary variables which are integer variables restricted to the values zero and one representing no and yes respectively Also many optimisation problems of a combinatorial nature can be formulated as IPs The range of applications includes problems such as the distribution of goods production scheduling and machine sequencing They also include planning problems such as capital budgeting facility location crew and aircraft scheduling design problems such as communications and transportation network design very large scale integrated circuit VLSI design and the design of automated
244. put immediately on reaching the IPM solution The default is ON HT 7 If there are no discrete variables this switch is always OFF When there are discrete variables the default is ON and setting to OFF cancels execution of MIP so that user can examine the continuous LP solution P PREPROCESS ON These commands control important algorithmic features of MIP Both switches are OFF by default OUTPUT TYPE STD These commands specify the type of solution written to the output file The default is STD OUTPUT ON These commands control the amount written to the output file Default is ON with zeros not suppressed LOG DISPLAY LOG DISPLAY ONLY This command causes all logged output not just important diagnostic messages of level 1 to be displayed online or written to the standard output stream With the keyword ONLY the normal log file is suppressed LOG DISPLAY LEVEL n This command causes logged output up to level n to be displayed online Default for n is 1 END This command terminates the SPECS commands Anything beyond it is ignored Back to Chapter contents nmr m Contents 4 Sparse Simplex SSX Solver 4 SPARSE SIMPLEX SSX SOLVER 4 1 Internal Problem Statement 4 2 Introduction to the Algorithms 4 3 PRIMAL Algorithm 4 3 1 4 3 2 43 3 4 3 4 43 5 4 3 6 Starting Procedures Column Selection Phase I Handli
245. quality of the approximation is checked and when it becomes too inaccurate column norms are reinstated Such an event is triggered when the ratio of the accurately computed to the estimated column norm of the entering column falls below a tolerance DEVEX INT Z RATIO which has a default value is 0 4 This value can be anything between O and 1 but values outside the range 0 2 0 6 are not recommended Higher value will result in a more frequent recalculation of the norms which is costly Certain additional column selection procedures are provided for use in parallel processing and in research studies Sectionalised partial pricing Dynamic scaling Adaptive composite phase 1 weighting Anti degenerate wighting These are described in Appendices F and G Back to Chapter contents 4 3 3 Phase I PRIMAL is equipped with a particularly efficient algorithm to find a first feasible solution or to detect that one does not exist problem infeasible This algorithm takes full advantage of the features of the basis created by the crash procedure outlined above Namely it can take more efficient steps if the basis contains variables with relatively large feasibility ranges The important characteristic feature of this procedure is that it allows feasible basic variables to become infeasible but the sum of infeasibilities is kept monotonic decreasing in modulus This increased freedom of the basic variables usually results in much more efficien
246. r 16 character See section 7 3 3 CALL MTCHIR CALL MTCHJC CALL MTCLIR CALL MTCLJC RPTTRN IROW CPTTRN JCOL LRPTRN IROW LCPTIRN JCOL ee a en The above subroutines find the next row index or column index corresponding to a pattern see section 7 3 4 RNAME GIRNAM IROW CNAME GJCNAM JCOL LRNAME GIRLNM IROW LCNAME GJCLNM JCOL These functions look up the name 8 character or 16 character that corresponds to a row index or column index See section 7 3 5 The following two functions enable read or write access to the objective constant term SPECS command OBJECTIVE OFFSET ON must be used CALL GTKOBJ KOBJ CALL PTKOBJ KOBJ GTKOBJ gets and PTKOBJ puts the objective constant term See section 7 3 6 The following subroutine is for once off input of SPECS commands Module SPCINT is to be loaded in the place of SPECFY CALL SPCINT TCTN This subroutine reads the SPECS file and stores all the commands internally Command sections are identified exactly as usual with the SPID parameter See section 7 4 2 The following subroutine sets up the default for a single SPECS command CALL SPCDFT COMMND TCTN See section 7 4 3 VI 30 Chapter 7 FortMP Subroutine Library and External Data Interface The following subroutine generates an output MPS form disk file from the internally stored problem data with modifications CAL
247. r contents T7 A 4 4 1 Starting Procedures For solving an original LP problem from scratch DUAL has the same starting procedures as those of PRIMAL see section 4 3 1 Back to Chapter contents 4 4 2 Row Selection This is analogous to Column Selection in the primal algorithm The selection is based on primal infeasibility and can be modified by applying DUAL DEVEX which is entirely analogous to DEVEX in the primal algorithm see 4 3 2 DUAL DEVEX is a much better choice for DUAL than PRIMAL DEVEX is for PRIMAL This is because the calculation overhead is much less and so the option is recommended for all larger or more difficult MIP problems DUAL DEVEX employs the same DEVEX RATIO as for the primal case see 4 3 2 Back to Chapter contents 4 4 3 DUAL Phase 1 Since DUAL is usually employed when the starting basic solution is dual feasible any DUAL phase 1 may not be necessary However as with PRIMAL the phase sometimes switches back after a re invert particularly in harder problems The ability to recover with phase 1 is therefore an important feature and much time may be saved especially in MIP problems Back to Chapter contents 4 4 4 Handling Degeneracy FortMP DUAL is provided with an anti degenracy option based on nested reduction of the degenerate positions so as to make a unique pivot choice There is also a progress check on the objective to counter persistant stalling These techniques are controlled by SPECS comman
248. r problems Part 2 Intermediate level use of FortMP In this part the major algorithmic capabilities of FortMP are explained The material in this section addresses the requirements of users with very large or very difficult problems who need the stand alone system and in addition the power to use controls that overcome the difficulties Knowledge of LP and IP techniques would be useful to readers in understanding this manual and in using the stand alone system but is not a prerequisite Part 3 Advanced use of FortMP This part describes the advanced use of the system by analysts who wish to 1 either construct a specialist optimisation application or il use the system as a research tool A typical user may have multiple problems and may wish to integrate the solver within a system of its own in order to improve processing efficiency For example a series of problems can be handled making use of the solution to one problem as the starting point for the next In such an integration provision is made to communicate the problem data and solution by an internal interface rather than by external files although external files can be used Controls can also be supplied internally externally or be defaulted Research workers interested in developing algorithms for themselves who need to make use of the internal subroutines of the FortMP system will find this part valuable Back to Chapter contents 1 4 Related Documents Users of the For
249. r to pass such an argument the length of the string is placed in the argument list immediately after the pointer to the Ist character An example of a FortMP library entry with a character type argument is call Spcdft COMMND TCTN Here COMMND is a variable length string of up to 50 characters The corresponding prototype in C language would be B 2 extern void __stdcall SPCl int Appendix B SPECS Commands DFT char commnd ECCERI int lng Where 1ng is the actual length of the command string In the code this routine could be called with the following statements char commnd int tctn SPC DFT commnd strlen commnd amp tctn The FortMP subroutine library does not have any numerical arguments that are multi dimensioned arrays two or more subscripts or character arguments that are not scalars Hence these possibilities are not considered here For the sake of a user who only needs the one entry SUBMP1 in the FortMP library we give here the prototype and an example of the calling statement void _ stdcall LHS SUBMP 1 i nt char PNAME e AI doub int MR int NC J int double UPB double COST SREF double VCSOL int STSL int doub int M int SFUN int int TCTN lpnm ROWI N e LOB char SPI int NAI int ls LI int int COLI do TYP r
250. ranching 6 5 Controlling the Tree Development 6 5 1 Definition of Tree Search Heuristics 6 5 2 Provision of choice criteria by the user 6 5 3 UP direction priority option 6 6 Detailed User control of the Tree Search 6 6 1 User control of variable choice 6 6 2 Control of node choice Fixing an Integer Solution 6 6 3 AGENDA data for variable priorities or FIX solutions 6 6 4 SPECS commands for AGENDA input 6 6 5 SPECS commands for AGENDA output 6 6 6 Un named Agenda Files 6 7 Advanced Algorithms for MIP 6 7 1 Recent advances 6 7 2 Pre processing Variable Fixing and Constraint Relaxing 6 7 3 Cut Generation 6 7 4 Fixing Variables by Dual Solution Analysis 6 8 Miscellaneous MIP controls 6 8 1 Automatic rounding heuristics w ONAN ES 12 12 12 14 14 15 19 19 19 21 22 22 22 24 RRR 28 28 29 30 30 30 31 33 FortMP Part 2 6 8 2 6 8 3 6 8 4 6 8 5 6 8 6 Bound Cutoff and Tolerance control Placing Limits on the Tree Search Saving the tree and restarting MIP Bypassing Mixed Integer Making use of the PRIMAL algorithm 6 9 Logged Output and Screen Display 6 10 6 10 1 6 10 2 6 10 3 6 10 4 6 10 5 6 11 MIP Constraint Classification Introduction and SPECS command Knapsack Constraint Classification Mixed Less or Equals Constraint Classification Equality constraints Full Classification Hierarchy Summary of MIP SPECS Commands 35 37 37 38 39 42 42 42 45 47 49 Cha
251. rch 6 6 1 User control of variable choice Very often a modeller will have information about the variables that can be used in variable selection step 1 of the algorithm described above in 6 4 2 For example some binary variables may represent strategic decisions and others represent minor decisions meaningful only when the strategic decisions have been made Although the algorithm is probably unable to distinguish the two if it can be made to branch on strategic decisions first the search time can be greatly reduced In general the modeller is not expected to specify a total ordering of the variables and so to force a specific choice at every node All the same the modeller may be able to classify variables according to their importance and give every class of variable a corresponding priority These user priorities are used in step 1 as the primary choice criterion If multiple choices are available at the highest priority then the standard choice criterion as set up by MIP VARCHOICE specs command is used to discriminate between them User priorities are input via a MIP AGENDA file for which the layout is given below in section 6 6 3 Back to Chapter contents 6 6 2 Control of node choice Fixing an Integer Solution The choice of next node sub problem for solution is step 3 of the branch and bound algorithm The user can direct this choice towards an integer solution which is provided in the data An advance integer solution
252. re listed with reference to the chapter section concerned Other commands are described and the general syntax is given in full Contents B1 SYNTAX B1 1 Meta syntax B1 2 Simplification and abbreviation B1 3 BEGIN and END commands B1 4 Commentary B2 COMMAND DESCRIPTIONS B2 1 Model name and data file names B2 2 Input type and problem selection B2 3 Choice of main algorithm B2 4 Maximum limits B2 5 Save and restart commands B2 6 SSX controls algorithmic B2 7 SSX controls parameters B2 8 IPM controls algorithmic B2 9 IPM controls parameters B2 10 MIP controls algorithmic B2 11 MIP controls parameters B2 12 Minor algorithm controls B2 13 Log level and frequency 10 11 12 14 15 16 17 18 20 B 1 FortMP Appendices B2 14 Output controls B2 15 Limits for cut generation and matrix extension B3 ALPHABETICAL LIST OF COMMANDS B 2 21 22 23 Appendix B SPECS Commands B1 Syntax B1 1 Meta syntax In what follows the syntax of a command is indicated in bold lettering Keywords are given in capitals exceptionally in lower case with duplicate commands user provided information is given in lower case An integer value is indicated by the conventions n nn nnn Real values are indicated by the convention vvv Square brackets are used for an optional part of the syntax for example MODEL NAME name indicates a command that may be written MODEL name Note that ordin
253. re reliability especially for difficult problems The user s interface with the internal data is accordingly also changed and REAL variables now become double precision in the standard version Some users may wish to retain compatibility with their existing programs or may prefer the older system because it is more economical in storage For these users a special version can be delivered having single precision for internal problem data storage and having corresponding arguments of type REAL rather than DOUBLE PRECISION These arguments have their type specified as DOUBLE PRECISION REAL in section 8 3 1 below Back to Chapter contents 8 2 The Facilities Available 8 2 1 General Facilities BEGCHG Begins problem change mode execution ENDCHG Ends problem change mode execution and carries out necessary housekeeping for re entry into algorithm mode GETSIZ Retrieves problem statistics for the user This is an initial utility which the user must execute in order to be able to create arrays of the required size Back to Chapter contents 8 2 2 Matrix Facilities ADDCOL Adds a column by activating the next dormant column provided by the user s MAXIMUM EXTRA COLUMNS command Inserts into the matrix a set of coefficients supplied for that column by the user ADDROW Adds a row by activating the next dormant row provided by the user s MAXIMUM EXTRA ROWS command Inserts into the matrix a set of coefficients supplied for that ro
254. remain available In subroutine MPIINP there is an additional step executed after creating the interface which re loads the names and look up tables over writing the internal stored form of the model so that the user can employ name look up utilities provided in the subroutine library This is conditional on the use of the above SPECS command Back to Chapter contents 7 3 3 Looking up the index of a named variable Given that the user knows the exact name of some variable the corresponding row or column index in the interface can be established with one of the following two functions IROW FINDIR RNAME JCOL FINDJC CNAME where RNAME is a row name 8 characters IROW is the corresponding row index zero if not found CNAME is a column name 8 characters JCOL is the corresponding column index zero if not found Note that these operations can only take place after execution of MPIINP the indices refer to the row and column indices of the interface data in the arguments and the command INPUT SAVE NAMES ON must have been given It is also possible to execute SUBMP1 with the same SPECS command given and this will retrieve the same names and look up tables as before but will not be able to recognize any change to the indexing that the user may have programmed between the calls to MPIINP and SUBMPI1 If two or more models have been entered with MPIINP the different models must be distinguished by providing the model name in a SPECS
255. representation of the inverse of the basis This results in a shorter and more accurate ETA file Thus right after a reinversion iterations are faster and more accurate However reinversion itself is just a reproduction step and is not for free Its time complexity is problem dependent but never negligible It means that reinversion should not be performed too frequently In PRIMAL the need for reinversion depends also on the way the new vector s of a basis change are created There are two possibilities The first is the Product Form PF update This usually generates a relatively large number of new non zero elements in the ETA file but the computations themselves do not require additional memory If PF update is used then a good value for reinversion frequency is 50 i e make a reinversion after every 50 basis changes The other possibility is to use the Forrest Tomlin FORTOM update scheme which usually results in a very modest growth of non zeros in the ETA file However it requires the explicit storage of MSUB vectors increased memory requirement and involves some additional computation Usually the system begins with FP update and switches at some stage to FORTOM when ETA growth becomes large At the same time the re inversion frequency is increased by half from 50 to 75 so as to take advantage of the reduced growth This can be controlled with SPECS commands as described below Back to Chapter contents 4 6 SSX Algorithm Controls
256. rge number of cases this command can simply be omitted from the SPECS file The selected candidate columns are updated expressed in terms of the current basis and are stored in explicit dense form This operation is called FTRAN PRIMAL temporarily considers a smaller LP problem consisting of the selected variables and the current basic variables and finds the optimal solution of it sub optimization The variable to enter the basis is selected by the criterion of greatest improvement This is expensive for the whole problem but moderate for the sub optimization At the same time it results in a very good iteration from amongst the selected variables Selection of candidates for sub optimization is called major iteration while iterations in the sub optimization are called minor iterations Minor iterations are the actual simplex iterations The user may want to experiment with the value of MSUB He should be warned that increasing its value results in increased memory requirement and steps in sub optimization tend to slow down PRIMAL is also equipped with a more sophisticated column selection strategy which is widely known as DEVEX This technique attempts to estimate the progress that can be achieved by a potential candidate variable It is based on an approximation of the column norms which requires considerable extra computations that has to be traded off against the possible reduction in number of iterations needed At every iteration the
257. riodically during IPM iterations the solution is saved and this solution can form an advanced initial solution point in a restart MIP save Periodically durmg Branch and Bound the tree is saved and can then be used to bypass previous node development in a restart The associated SPECS commands comprise controls to specify the frequency of saving and restart switches to specify where any restart is to apply These commands are SIMPLEX SAVE FREQUENCY n default 10 each 10th reinvert SIMPLEX START RESTART TT 10 IPM SAVE FREQUENCY n default 10 each 10th iteration IPM RESTART ON MIP SAVE FREQUENCY node MIP RESTART ON default n 500 each 500th ll D By setting the frequency n to zero in one of the above SAVE commands the corresponding SAVE feature is switched off entirely Users must be aware that certain internal files from the previous run are needed in a restart not just the file created by the particular kind of restarts invoked The original controls from the previous run are always reread and apply as defaults in the restart run Back to Chapter contents 3 5 2 Bypassing the Initial MPS Input It is not necessary to specify any SAVE for the original MPS data Input data is saved in an internal form during an initial pass when reading MPS format data With the command INPUT RESTART ON the initial input pass which looks up all names and creates the data indexing is bypassed
258. rior to optimisation SCALE OFF One of these commands is used to specify the primary solution algorithm for the continuous LP problem PRIMAL is the default and need not be specified FEASIBILITY TOLERANCE value This command assigns a tolerance used in the algorithms The default for value is 1 0d 5 Other tolerances are introduced in Chapter Error Reference source not found of this manual INVERT FREQUENCY n This command assigns a frequency in terms of the iteration count for reinversion during SIMPLEX algorithms The default for n is 50 SIMPLEX LOG LEVEL n This command determines in what level of detail to print the iteration log during SIMPLEX algorithms The default for n is 1 giving only outstanding events but higher levels also give details of each iteration SIMPLEX LOG FREQUENCY n This command assigns a frequency for printing the iteration log during SIMPLEX algorithms The default for n is 1 IPM BASREC OFF When ALGORITHM IPM has been selected the user can use this command to halt execution and print the output immediately on reaching the IPM solution This command causes all logged output not just important diagnostic messages to be duplicated on the online display or written to the standard output stream This command terminates the SPECS commands Anything beyond it is ignored Back to Chapter
259. rm Data Layouts A 2 A2 Free Form Layout and Long Names A 17 A3 Tabular Layouts MG RW Interface A 21 A4 MIP Agenda Layouts A 27 Appendix B SPECS Commands B 1 B1 Syntax B 3 B2 Command Descriptions B 5 B3 Alphabetic List of Commands B 22 This page intentionally left blank 1 Introduction and Background Contents 1 INTRODUCTION AND BACKGROUND 1 1 Introduction 1 2 Background 1 3 Scope and Purpose 1 4 Related Documents 1 5 Outline 1 6 Platforms 1 7 Statement of the Definitive Problem 1 8 References 1 1 Introduction FortMP is a Mathematical Programming system designed to solve large scale Linear Programming LP Quadratic Programming QP Integer Programming IP and variable separable programming including special ordered sets of Type 1 and Type 2 SOS1 and SOS2 problems It has been developed at Brunel University by the Mathematical Programming Research Group headed by Professor G Mitra and is marketed by NAG Ltd FortMP is used in Management Science or Operations Research and covers applications such as transportation chemical engineering product blending economic modelling energy systems and networks In short most industrial applications or research problems involving linear or discrete optimisation are handled by this system The main algorithms used by FortMP are the Sparse Simplex SSX PRIMAL and DUAL algorithms These are supplemented for large problems or QP problems by alternative Interior Point Metho
260. rovement in the objective function A good rate does not necessarily give large improvement The only thing that can be done is to increase the probability of selecting good candidates However even this modified goal is hard to achieve Column selection is based on a step called pricing the non basic variables It involves a computation of a dot product of each non basic column and a pricing vector simplex multiplier If the size of the problem is large there can be many non basic columns having many non zero elements and the pricing operation can be very expensive in terms of computation and time Thus economizing column selection is not an easy exercise PRIMAL applies a sophisticated column selection procedure that attempts to compromise in finding good candidates and reduce the work per selection The procedure can be characterized by the following Usually only a part of the non basic variables is scanned partial pricing In a pricing step scanning starts from where it was previously terminated Having reached the end of the matrix pricing continues at the beginning cyclic pricing The number of variables to be scanned is determined after each reinversion dynamic partial pricing During one scanning pass several candidates are selected multiple pricing The number of them is controlled by the SPECS command PRIMAL MSUB n where n is given by the user if needed The default value for MSUB is 4 Since 4 is satisfactory for a la
261. rows NC 8 number of columns NAIJ 14 number of non zeros NSET 1 dummy in the absence of any special ordered sets PNAME SAMPLE problem name SPID f Ist BEGIN line in the SPECS command file TCTN 0 terminate criterion also an output The input array arguments to be supplied are as follows Matrix non zeros ROWIN COLIN Row indices Column indices T Zeros vil 14 Chapter 7 FortMP Subroutine Library and External Data Interface gt 4 Nn ON hed ee ee ee a ee a ee i Column vectors COST MITYPE aR ane tet pe ae MIP a 1 oes 3 Row vectors LHS RHS Row lower bounds Row upper bounds Vil 15 FortMP Part 3 The remaining inputs are dummy SOS tables that may be single cell integer arrays or integer scalars whose contents are not material The above inputs can be presented either via calling SUBMPI or via calling INPMP1 When this is done the outputs returned via SUBMP1 or via OUTMP will be as follows a ee Primal solution Basis status Dual solution Oo l a e f iyo a o o o o C w o o o o w a o o o a o o Cw o o o wwo o w o w o w o w o ow o ow The following scalar values are also returned es STSL Solution status code Optimum TCTN E 0 Termination OK VIl 16 Chapter 7 FortMP Subroutine Library and External Data Interface Note that for the row positions 1 to 6 including objective in position 1 VCSO
262. rred if IlAx bll IIAx bIl_ lt converge tolerance The converge tolerance parameter is controlled with the command SOR CONVERGE TOLERANCE v Where the default value for v is 1x10 Back to Chapter contents 10 4 5 Logged Output from the SOR algorithm An example of the log messages listed by SOR is as follows TIME TAKEN FOR SCALE PRSLVE ORZAARSHCor TOTAL SO FAR S61 SHCs CRASH LISE ENDED VARIABLE TYPEHS PLUS BNDD IP IDK FREE LOGICALS REMOVED FROM BASIS il 0 L25 0 STRUCTURALS ENTERED IN BASIS LAS 1 0 0 TIME TAKEN FOR CRASHT SOLN Oli SEGS TOTAL SO FAR amp 30 SECS TIME TAKEN FOR KCR PREPROC 0 05 SECS TOTAL SOQ FAR 5 35 SECS CRASH SOR CONVTOL 10000D 01 TERMTOL 10000D 02 FREQ 10 PUSH FOR FEASIBILITY ONLY CRASH SOR ITERATIONS 3 Ax b 0 6 4G 1 S 2 SADON OBI ORMSEG a eS 10 gt TIME TAKEN FOR K CRASH ALG ORO SRSEG Sr TOTAL 50 FAR 5 38 SECS TIME TAKEN FOR KCR SOLUTION 0 07 SHCS TOTAL SO FAR 3 40 SOS Listing 3 Logged output from SOR Back to Chapter contents X 12 FortMP Manual CRASH supplement 10 5 Summary of SPECS Commands 10 5 1 Primary Crash Commands The following commands relate to a primary CRASH CRASH ADMIT THRESHOLD v Default v 0 001 This command appli
263. rs it will be given a non zero value in order to force a bypass through all subsequent stages straight to the final exit of the program Users should respect this convention and test TCTN themselves before executing any algorithmic work of their own DOUBLE PRECISION REAL Upper bound value of a column DOUBLE PRECISION REAL Upper RHS value of a row The array arguments used are as follows BASTAB INTEGER Table of non basic variable assignment codes as follows 0 Basic 1 Non basic at lower bound row is at upper RHS value 1 Non basic at upper bound row is at lower RHS value CVTAB DSLVEC DSSTAB IRTAB JCTAB LOTAB MITTAB OBJTAB RVTAB SLSTAB Row entries come first followed at position MROW 1 by column entries Dimension size is IMROW NCOL DOUBLE PRECISION REAL Table of non zero element values in one matrix column When supplied for an ADDCOL or CHGCOL operation this table has the dimension size NCNZ When supplied as an empty area to receive a column in GETCOL it has dimension size NCOL DOUBLE PRECISION Dual solution vector Rows followed by columns as before with dimension size MROW NCOL INTEGER Table of dual solution status codes to correspond with DSLVEC Code values are as follows 1 Zero The primal variable is basic 3 Basic feasible 4 Basic infeasible negative The primal variable is at its lower bound 5 Basic infeasible positive The primal
264. run without repeating the IPM calculations again See 5 2 6 IPM LOG LEVEL n These commands specify the level of the output to be sent to the log file in each major algorithm Range is 1 4 default is 1 in each case See 5 2 7 PUSH LOG LEVEL n 0 4 default is 1 These commands control the log level and frequency of PUSH iterations during the BASREC crossover to SSX algorithm See 5 2 7 IPM GRAPHICAL DISPLAY ON Certain implementations of FortMP have the graphical feature which displays the pattern of non zeros in the matrices followed by a progress display of the iterations The default is OFF See 5 2 7 Back to Chapter contents Chapter 6 Mixed Integer Programming MIP Chapter 6 Mixed Integer Programming MIP Contents 6 1 Introduction to MIP 6 2 MIP Problem data types and problem definition 6 2 1 Binary and Integer Variables 6 2 2 Semi Continuous Variables 6 2 3 Special Ordered Sets of Type One 6 2 4 Special Ordered Sets of Type Two 6 2 5 MIP model definition 6 3 MIP Data Preparation Marker lines 6 3 1 Defining Binary Integer and Semi continuous variables in the BOUNDS section 6 3 2 Marker lines 6 3 3 Defining Integer and Binary Variables with Markers 6 3 4 Defining a Special Ordered Set 6 3 5 An Example 6 4 Branch and Bound algorithm 6 4 1 Branch and Bound the Background 6 4 2 Branch and Bound the Algorithm 6 4 3 The Branching Mechanism UP and DOWN b
265. ry increase again Results are given on the log file and the user may use these to determine the best values for the commands Back to Chapter contents HT 12 3 4 Output Descriptions 3 4 1 Standard Output Description Table 17 on page II 19 shows the standard output from the simple example of Chapter 2 There the heading gives details of the model and of the solution that follows This is followed by a table of column values showing each structural variable in the problem Outputs under each heading are NO Index number of the variable STATE Codes for the primal and dual status B means BASIC F means FIXED L means at Lower bound U means at Upper bound NAME Name of variable as given in the input VALUE Solution value LOWER BOUND Lower bound as given in the data UPPER BOUND Upper bound as given in the data REDUCED COST Reduced cost or DJ of the variable When an integer IP solution is printed the lower and upper bound values that are printed reflect the branching applied to each variable and not necessarily the original bounds The next section is a table of row values showing each constraint or logical variable in the problem Outputs under each heading are NO Index number of the row STATE Codes for the status of the slack variables B means BASIC F means FIXED L means at Lower bound U means at Upper bound NAME Name of the row as given in the input ROW VALUE Value o
266. ry management Appendix H on special testing and other miscellaneous extras Contents 1 Introduction and Background l 1 1 1 Introduction l 2 1 2 Background l 2 1 3 Scope and Purpose l 3 1 4 Related Documents l 4 1 5 Outline l 4 1 6 Platforms l 4 1 7 Statement of the Definitive Problem l 5 1 8 References l 8 PART1 2 Elementary Use of FortMP Il 1 2 1 Initial Tutorial Il 2 2 2 Simple Controls Il 9 2 3 Additional Data Preparation Features I 11 2 4 An Example Binary and Integer Variables il 15 2 5 Summary of SPECS File Controls Il 19 PART 2 3 Overview of the Stand alone FortMP System Ill 1 3 1 Introduction and Overview Ill 2 3 2 Data Preparation Ill 7 3 3 Running the System Il 10 3 4 Output Descriptions lll 14 3 5 Further Topics lll 16 3 6 Input and Output Files in FortMP Il 18 3 7 Errors and Recovery Il 19 3 8 Summary of SPECS Commands Ml 22 4 Sparse Simplex SSX Solver IV 1 4 1 Internal Problem Statement IV 2 4 2 Introduction to the Algorithms IV 4 4 3 PRIMAL Algorithm IV 4 4 4 DUAL Algorithm IV 9 4 5 INVERT IV 10 4 6 SSX Algorithm Controls IV 11 4 7 Summary of SPECS Commands IV 17 5 The Interior Point Method V 1 5 1 Introduction to the IPM Algorithm V 2 5 2 Controls on the IPM Algorithms V 7 5 3 Summary of SPECS Commands V 13 6 Mixed Integer Programming MIP VI 1 6 1 Introduction to MIP VI 3 6 2 MIP Problem Data Types and problem definition VI 4 6 3 MIP Data Preparation Marker Lines VI 12 6 4 Branch and Bo
267. s OFF Not every problem is improved with the pre processor however and it is most effective when the problem has binary or integer variables It is worthwhile for the user to experiment in order to determine whether to use it as a normal method for all his problems Another useful command important for many MIP problems is the following MIP PRIORITY UP ON default is OFF This is very useful for problems related to scheduling and resource allocation for reasons explained later in chapter 6 of this manual A variety of other controls direct the branching choices in MIP and supply parameters To find out about these controls the user should read the descriptions given in Chapter 6 of this manual The following SPECS commands determine the log level of MIP and the execution limit in the same manner as for PRIMAL and DUAL MIP LOG LEVEL n x n 0 4 default 1 NODE LOG FREQUENCY n K default 1 MAXIMUM MIP INTEGER nnn default 300 MAXIMUM MIP NTSOL nnn 7 default 300 MAXIMUM MIP NODES nnn r default 50000 MAXIMUM MIP TIME vvv r default 50000 0 Limits are applied to the number of integer solutions reached INTEGER and INTSOL are the same to the number of nodes i e sub problems to be solved and to the total time given in seconds that may be spent executing the MIP algorithm At each limit the MIP algorithm saves the current tree for restar
268. s basic for codes XL XU or remains non basic for codes UL LL Field 3 Name of a logical variable which becomes non basic for codes XL XU Not used for codes UL LL The letter U or L in the code indicates whether the non basic variable is to receive upper bound or lower bound status The rationale behind this layout is that an initial starting basis is defined and each record defines an exchange to this basis Initially all row variables are basic and all column variables are non basic at lower bound Each record of type XL or XU defines an exchange between a column variable structural which becomes basic and a row variable logical which becomes non basic The UL records simply name non basic columns which are to receive at bound status and LL records are actually redundant An external basis is intended for use even when the input problem has been revised so that a variety of inconsistencies in MPS format basis data are allowed For example if a name is not recognised then a warning message is given on the log but the system carries on by simply ignoring that record Back to Chapter contents A 21 FortMP Appendices A2 Free form Layout and Long Names A2 1 Free form input layout The following SPECS commands INPUT FREE FORMAT ON INPUT LONG NAMES ON are both associated with Free format input Free format input is based upon and is very similar to MPS form input with just one difference that there is no fixed field la
269. same is true for any intermediate node in the tree where the optimum solution is LP feasible but not fully integer feasible The pre processing procedures have another aim namely to release constraints whenever they are found to be redundant As a simple example consider the common Clique type constraint which takes the form yas JEB where B is a subset of the binary variables applying in the i th row If we discover one of its members to have a lower bound greater than zero then that member must be one and the remaining members must be zero Once these fixes have been applied the constraint itself is redundant and may be released which improves solution time by reducing both the time and the number of Sparse Simplex steps needed to solve sub problems Back to Chapter contents 6 7 2 Pre processing Variable Fixing and Constraint Relaxing The most direct technique to apply is that of PRESOLVE where the implications of primal constraints e aD are studied whatever the variable types involved This is a general and comprehensive technique for fixing variables and relaxing constraints VI 30 Chapter 6 Mixed Integer Programming MIP In addition if a tightened bound can be discovered for an integer or binary variable giving it a fractional bound in one sense or the other then the fraction can be truncated which further tightens the bound and gives an improved effect In FortMP this technique is activated with the fol
270. ssed to the solver with the single exception of the constant term in the objective The reason for this is that MPS form data by using an ordinary matrix row for the objective actually allows a more general linear form N Xow K jel to be minimised or maximised where K is a constant K is given as the right hand side value for the objective row On the other hand the arguments for SUBMP1 have no such provision since the objective is given in a separate array from the matrix One way to overcome this problem is to use the following SPECS command in the call to SUBMPI OBJECTIVE OFFSET ON default OFF OFF may also be given When ON is specified the offset K that was stored by MPIINP is used as it stands instead of being zeroed as will happen in the default OFF situation The above will be satisfactory whenever the call to SUBMP1 has been preceded by a corresponding call to MPIINP which provides K However if the user is alternately solving two or Vil 21 FortMP Part 3 more different models then K must be provided explicitly for each call to SUBMP1 The user will also need to retrieve the different values of K after each call to MPIINP Access to read or write K is provided by the following subroutine calls CALL GTKOBJ KOBJ CALL PTKOBJ KOBJ where KOBJ is the objective offset value RHS constant term K Subroutine GTKOBJ gets K and PIKOBJ puts K The use of PTKOBJ does not change the default for SPEC
271. ssfully activated IPM GRAPHICAL DISPLAY ON IPM GRAPHICAL DISPLAY OFF This is the default After execution of IPM the system has a choice to stop there and print the solution or to recover a basis from the IPM solution and use it as an advanced starting basis to the SSX solver If the basis recovery option is taken then the printed solution will be a basic optimum if that is possible whereas the IPM solution is only rarely basic Basis recovery is the default option of the system to stop with the IPM solution the following command is used IPM BASREC OFF Back to Chapter contents 3 3 4 Running Mixed Integer Before starting the Branch and Bound algorithm for MIP problems the system must obtain a basic optimum solution to the LP problem that is the problem with all MIP variables allowed their continuous range Either SSX or IPM can be used for this purpose if IPM is used the BASREC switch must be ON which is the default Entry to Branch and Bound is normally automatic dependent only on whether the problem contains any MIP variable types However the user can prevent the system from entering Branch and Bound for example to give time for examining the LP optimum by setting the MIP switch to OFF as follows MIP OFF TmT 12 An important aid to finding the solution for MIP problems is the pre processor which is invoked with the following SPECS command MIP PREPROCESS ON default i
272. switched off during branch and bound The command for this is MIP PREPROCESS ROOT ONLY With this command there is no need for any FIX quota Back to Chapter contents 6 7 3 Cut Generation Cuts like fixes are additional constraints that may be applied to the problem Unlike fixes however they cannot be applied to the problem by a simple change to variable types and the VI 31 FortMP Part 2 bound set A cut is a constraint an inequality or an equality just like any other constraint in the problem It can arise in many different ways as Maximal Clique or Minimal Cover obtained by processing knapsack constraints in the model constraints that have non zero coefficients only on binary variables Gomory cuts Optimality cuts and Infeasibility cuts and many others Cuts are never added directly to the problem rather they are stored separately in an area called the Cut Pool which holds cut coefficients and cut right hand sides From the cut pool a cut may be applied to the matrix whenever it is advantageous to do so It is not advantageous to apply a cut when the optimal solution to the current sub problem including the relaxed LP as a sub problem in this context actually satisfies that cut constraint anyway Consequently after every optimal solution has been found a search is made for Strong cuts that is cuts which are violated by the current solution These cuts are added to the main problem constraint set a
273. t Iteration numbering continues from the previous run Back to Chapter contents 4 6 5 Processing an External Basis An external basis in MPS form can be used to provide the starting basis The command is SIMPLEX START INPUT BASIS which has already been described in Section 4 6 2 The following commands set or clear a switch to provide an output basis for starting a subsequent run OUTPUT BASIS ON OUTPUT BASIS OFF The OUTPUT BASIS ON command invokes output of an MPS format basis when the SSX solver whether PRIMAL or DUAL has completed normally This basis can be used as a starting basis for similar problems with the same names for rows and columns the identity being on the basis of names rather than indices For the layout of MPS format basis records see Section 3 5 1 and Appendix A1 3 The corresponding BASIS INPUT procedure does not require every name to be matched but it ignores any record which cannot be matched and in the case of upper bound status it ignores any record where the new variable no longer has an upper bound Back to Chapter contents 4 6 6 Log Lising Controls Logged output from SSX algorithms is controlled with the following commands SIMPLEX LOG LEVEL n n 0 4 Default is INVERT LOG LEVEL n n 0 4 Default is SIMPLEX LOG FREQUENCY n Default is 1 where the defaults are as shown The LOG FREQUENCY defines at what iteration freq
274. t and terminates see Section 3 5 1 on saving and restarting Back to Chapter contents 3 3 5 Using the PRESOLVE Algorithm PRESOLVE is an algorithm which can often simplify the problem internally and reduce the time needed to reach the solution If employed it takes place after input and before execution of any other algorithm The following SPECS commands invoke or cancel execution of PRESOLVE PRESOLVE ON PRESOLVE OFF This is the default PRESOLVE seeks any simplifications that can be made to the problem by looking for the obvious solutions implicit in the constraints as they stand Elimination of redundant rows and fixed variables reduces the size of the problem to be solved and thereby improves efficiency TIT 141 For example if all fixed variable values are substituted in the constraints one or more equations may be left with only one variable These variables are then fixed the equations become redundant and their row types are made free The substitution of the newly fixed variables may then lead to more simplifications of the same kind This is a simple Level 1 technique other more complex techniques designated as Level 2 Level 3 and so on are available The user can select a maximum level to use once the PRESOLVE switch has been set ON by the following command PRESOLVE LEVEL n n 1 5 default is 5 At solution time there is an option to print the presolved solution as it stands or to appl
275. t basis changes reducing the sum of infeasibilities to a maximum possible extent per iteration Feasibility is interpreted with a tolerance It means that if a variable violates one of its bounds by more than FEASIBILITY TOLERANCE user accessible parameter with default value of 1 0d 5 then it is treated as infeasible Before each iteration in Phase I before each major iteration in Phase II and after each reinversion the feasibility of the actual solution is checked If it is found infeasible the Phase I procedure is activated otherwise a Phase II iteration is executed The main difference between these two types of steps lies in setting up the simplex multiplier and determining the variable to leave the basis outgoing variable With numerically difficult problems it may happen occasionally that after a Phase II reinversion the newly computed solution becomes infeasible Checking feasibility detects such a case and handles it automatically Back to Chapter contents 4 3 4 Handling Degeneracy Degeneracy in linear programming has long been known as a phenomenon that can cause troubles for the simplex algorithm A solution is degenerate if at least one basic variable is at its lower or upper 17 7 bound An iteration is degenerate if the value of the objective function does not change Degeneracy of an intermediate solution may but does not necessarily result in a degenerate iteration We talk about stalling if degenerate non improvi
276. t column The user may set this fraction with the following SPECS command CRASH ADMIT THRESHOLD v Where the default value for v is 0 001 In order to control the use of CRASH ART after CRASH LTSF the following command may be used CRASH ART n Where n is 0 1 or 2 The significance of n is 0 OFF CRASH ART is not used 1 ON using the normal heuristic for the selection of trial columns This is the default 2 ON using an extended heuristic for the selection of trial columns Finally the use of CRASH ADG is controlled with the command CRASH ADG FACTOR n Where n is 0 1 2 or 3 The significance of n is 0 Lowest priority The ADG criterion is considered only as the final tie breaker behind any feasibility criterion This is the default 1 ADG criterion takes priority over selection of inequality constraints LE and GE 2 ADG criterion takes priority over selection of inequality and range constraints 3 ADG criterion takes priority over selection of any constraint type In this case the ADG criterion entirely supersedes the feasibility criterion taking second priority after sparsity Back to Chapter contents 10 2 6 Logged Output from CRASH The normal logged output from CRASH IPM algorithm not used based on the simple example of chapter 7 section 7 2 5 is shown below CRASH
277. t takes note of the original problem primal and of the corresponding dual problem in which the coefficient matrix is transposed rows become columns and columns rows the right hand sides become objective coefficients and the objective coefficients become right hand sides The primal problem may be stated at follows Minimise the expression L cx subject to the conditions ya SAO 2ng x s u forj 12 n where the x j are the structural variable and the variables s j j 1 2 n are complements of the x j with respect to the upper bounds u We state the equations this way although naturally variables s only exist for those x which are bounded in both senses For the sake of simplicity this complication is ignored in all the equations that follow These equations are derived from the original problem statement see Chapter 1 Section 1 7 by dropping all fixed variables and free rows and by adding slack variables to convert inequalities into equalities The dual problem may be stated as follows Maximise the expression b y u w subject to the conditions p WG J J J Yay z 7w C forj 1 2 n where the variables y i 1 m are dual variables complementary to the original rows of the primal statement above z j 1 n are dual variables complementary to the x and w j 1 n are dual variables complementary to the s All of the variables x p52 and w j 1 2 n must be non negative this cr
278. t the Ist 5 Member of SOS type 2 not the Ist 12 Ist member of an SOS type 1 13 1st member of an SOS type 2 INTEGER Number of active rows This value increases by one each time a new row is added INTEGER Total number of rows including inactive rows and the objective row NAIJ NANZ NCMAX NCNZ NCOL NRNZ OBJ RTP SLST TCIN UPV URHS INTEGER Total used AIJ space including the spare unused space in each column The difference MAIJ NAJJ is the space available for new columns INTEGER Number of AIJ non zero elements INTEGER Maximum number of columns INTEGER Number of non zeros in one column INTEGER Number of active columns This value increases by one each time a new column is added INTEGER Number of non zeros in one row DOUBLE PRECISION REAL Cost coefficient value on the objective row INTEGER Row type code 1 Less than 2 Bounded 3 Equals 4 Free INTEGER Solution status code coded as 0 Solver did not terminate 1 No feasible solution 2 Unbounded 3 Optimal solution found 4 Integer solution found 5 Optimum integer solution found INTEGER This is an important argument used by ALL of the utility subroutines It gives the Terminate Criterion and so long as it is zero the execution continues normally On entry to any utility if its value is non zero then an immediate exit occurs without doing anything Otherwise if a fatal error occu
279. tMP system are assumed to possess a basic knowledge of linear programming In order to access all the relevant information covering the capability performance installation and usage of FortMP system the following supporting documents should be consulted as appropriate 1 FortMP brochure 2 This User Manual 3 Installation Guide 4 Technical Reports and Research Papers The FortMP brochure defines the functionality and scope of use in summary form whilst the manual is intended to serve both as a User Guide and as a Reference Manual The Installation Guide is intended to help installers to implement and test the FortMP system A number of Technical Reports and Research Papers are listed in the reference section These may be valuable for investigators who wish to use FortMP as a development and research tool Back to Chapter contents 1 5 Outline Part 1 of this manual comprises only Chapter 2 and explains the elementary use of FortMP In this part most of the concepts and controls are introduced through examples Examples are given for solving bounded Linear Programming LP and Integer Programming IP problems where the integer variables have binary values or have general integer values This is all that is needed for most users at the elementary level Chapter 3 through to Chapter 6 make up Part 2 the intermediate level Chapter 3 of this manual introduces the solution algorithms and the advanced use of controls and also gives a descript
280. tes that the execution was successful subject to the value of STSL Back to Chapter contents 7 2 4 Call specifications Full call specifications for the data interfacing subroutines are CALL SUBMP1 MR NC NAIJ NSET PNAME SPID AIJ ROWIN COLIN UPB LOB RHS LHS COST MITYPE SREF SFUN SBEG SEND VCSOL BSTAT RSCOS STSL TCTN This call is for the complete solution process with both problem data inputs and solution outputs passed via the arguments external interface Vil 12 Chapter 7 FortMP Subroutine Library and External Data Interface CALL INPMP1 MR NC NAIJ NSET PNAME AIJ ROWIN COLIN UPB LOB RHS LHS COST MITYPE SREF SFUN SBEG SEND TCTN This call converts users problem data to internal form CALL IBSMP1 MR NC BSTAT TCTN This call sets up a starting basis for SSX solvers PRIMAL and DUAL CALL OUTMP1 MR NC VCSOL BSTAT RSCOS TCTN This call converts the solution back to external form Within a users MYLP routine not SUBMP1 it is legal to employ INPMP1 in combination with the standard OUTPUT or to employ standard INPUT in combination with OUTMP1 However in the latter case the user must have precise knowledge of the row size MR and column size NC in order to supply correct array sizes in the argument list a requirement of FORTRAN This is checked by the system A minor problem arises when the input data has no special ordered sets of either type NSET w
281. the continuous range is implicitly set to 1 0 see section 6 2 2 Back to Chapter contents 6 3 2 Marker lines Marker lines are used in the COLUMNS section of the input data to define a list of consecutively sequenced variables Four types of marker line can be used as follows VI 12 Chapter 6 Mixed Integer Programming MIP INTORG Indicates the beginning of a consecutive sequence of Integer or Binary variables INTEND Indicates the end of a consecutive sequence of Integer or Binary variables SOSORG Indicates the beginning of a special ordered set type SOS1 or SOS2 SOSEND Indicates the end of a special ordered set type SOS1 or SOS2 A marker line has the keyword MARKER quotes included in Field 3 of the standard MPS form layout and the type keyword xxxORG or kxxEND either in Field 4 or in Field 5 with quotes included The full layout is as follows Field 1 Field 2 Field 3 Field 4 Field 5 Field 6 2 3 5 12 15 22 25 32 40 47 50 61 Blank MARKER SOSEND blank Each marker line must appear between one column and another a column may not be split by a marker It is not allowed to overlap sections of the data with marker lines since all sets must be mutually exclusive Thus markers are always to be in pairs with the ORG type marker followed by its corresponding END type marker before any other marker can appear Fields 4 and 5 are interchangeable the marker type keyword may be placed in
282. the corresponding C language type replacing void The functions GIRNAM GJCNAM GIRLNM and GJCLNM see chapter 7 section 7 3 5 are of character type and as such are not easily referenced in C language Because of this the following subroutine calls have been added to the Fortran library CALL AIRNAM CALL AJCNAM CALL AIRLNM CALL AJCLNM irow rname jcol cname irow lrname jcol lcname ep po Where the original function result is now the second argument Equivalent C prototypes are to be found in the file LIBHDR H Back to Chapter contents B 4
283. the standard output layout and the values LRHS and URHS give the lower and upper bounds of this expression Possible values for the status code STAT are the same as for columns given above Note that the status refers to the logical variable or slack and in non basic situations is opposite to the status of the row expression Possible values for the feasibility marker MARK are the same as for columns Back to Chapter contents A 31 FortMP Appendices A4 MIP AGENDA Layouts A4 1 Standard named agenda layout MIP agenda is divided in two sections as follows FIX FIXMIX or To specify integer feasible values in order to obtain an initial integer FIXTRY solution rapidly PRIORITY To specify priority classes for selection of branch entity Either or both sections may appear in either order once only The FIX section follows a header FIXMIX or FIXTRY according to whether to create tree nodes normally during FIX processing or simply to probe for the indicated solution The PRIORITY section follows a header PRIORITY The following keywords are used to begin and end the file AGENDA ENDATA Comment lines beginning with asterisk in position 1 may appear anywhere and will be ignored The fields used are the same as those of MPS format or free format with either of the SPECS commands INPUT FREE FORMAT ON INPUT LONG NAMES ON The layout of both sections is the same as follows Field no Token no Contents MPS
284. tical Programming 12 1977 pp26 47 HAJIAN M T and MITRA G Design Implementation and Testing of an Integrated Branch and Bound Algorithm for Piece wise Linear and Discrete Programming Problems within an LP Framework Departmental Report Brunel University 1991 Jones H IPM Solution of the Convex QP Problem Chapter 8 of A computational Investigation of the Solution of Large Scale Optimization Problems PhD Thesis Brunel University 1997 Back to Chapter contents 2 Elementary Use of FortMP Contents 2 ELEMENTARY USE OF FORTMP 2 1 Initial Tutorial 2 1 1 LP Modelling 2 1 2 Elementary Data Preparation 2 1 3 Simple Use of FortMP 2 1 4 The Complete Example 2 2 Simple Controls 2 2 1 The SPECS Controls 2 2 2 Controlling the Input and the Output 2 2 3 Additional Useful Controls 2 3 Additional Data Preparation Features 2 4 An Example Binary and Integer Variables 2 5 Summary of SPECS File Controls NIYNNWN WN o 0 11 15 20 2 1 Initial Tutorial 2 1 1 LP Modelling The following is a simple example of a problem that has been modelled for solution by an LP system Minimize the cost function Ax Ox 50 10x 2x 5x x subject to the following constraints x x 2 x 3x 5 2x 3x 4 X x 4x x 11 xi 2x 2x 3x x AIA Xe 14 and to the following bounds 05 lt x 05 lt x 0 0 lt x lt 1 0 x 10 0 0 lt x lt 6 0 10 lt x Back to Chapter contents 2
285. tine calls relate to use of the external interface See section 7 2 for details CALL SUBMP1 MR NC NAIJ NSET PNAME SPID AIJ ROWIN COLIN UPB LOB RHS LHS COST MITYPE SREF SFUN SBEG SEND VCSOL BSTAT RSCOS STSL TCTN Principal sub system to solve a problem passed via the external argument interface CALL INPMP1 MR NC NAIJ NSET PNAME AIJ ROWIN COLIN UPB LOB RHS LHS COST MITYPE SREF SFUN SBEG SEND TCTN Sub routine to input the external data interface and store the problem internally CALL IBSMP1 MR NC BSTAT TCTN Set up starting basis for PRIMAL or DUAL CALL OUTMP1 MR NC VCSOL BSTAT RSCOS TCTN Output the solution and basis CALL MP1INP MR NC NAIJ NSET PNAME SPID AIJ ROWIN COLIN UPB LOB RHS LHS VI 29 FortMP Part 3 COST MITYPE SREF SFUN SBEG SEND BSTAT TCTN Input a problem and convert it to the form of the external argument interface returned to the calling routine The following functions and subroutines enable access to names after calling MPIINT SPECS command INPUT SAVE NAMES ON must be given TROW FINDIR RNAME JCOL FINDJC CNAME TROW FNDLIR LRNAME JCOL FNDLJC LCNAME These functions look up the index corresponding to a row or column name 8 character o
286. tions together with associated status vectors 4 Updated Tableau GET type utilities are provided which calculate either a row vector or a column vector in the updated tableau Back to Chapter contents 8 1 4 How to Use the Utilities Operating Modes In any interface where the user has the ability to change aspects of the internal data there must be some necessary housekeeping to ensure that all of the data is mutually consistent For example some changes will render the ETA file invalid and therefore require that INVERT is executed before any algorithms can be called However it would be grossly inefficient for such housekeeping to be performed after every call in order to make some minor change For this reason FortMP has two separate operating modes which are as follows PROBLEM CHANGE mode During this mode the user may apply changes to the problem and may add new rows and columns Algorithms may not be executed ALGORITHM mode During this mode algorithms may be executed but the user may not apply changes Retrieval access to the primal or dual solution and to the updated tableau is available in this mode Retrieval access to GET an aspect of the problem data might conceptually be carried out in either mode For definiteness however there is a restriction to execute these GET s only in the problem change mode this is because the coding would be different in the two modes Following execution of the
287. to enter the basis In fact the row selection priorities of the CRASH are altered so as to concentrate entirely on removal of artificials since otherwise much extra work will be needed by the dual push Default selection heuristic for CRASH ART is the advanced version since this improves the chances of removing artificials Variables fixed must of course be released once again when the primal push has terminated Back to Chapter contents 10 3 4 User Controls The initial starting basis may be controlled with the following SPECS command CRASH ADMIT THRESHOLD v Default v 0 001 as before with the primary CRASH algorithm CRASH LTSF is followed by an enlarged CRASH ART subject to pivoting controls as in the INVERT algorithm The Primal and Dual PUSH algorithms are subject to an ADMIT threshold which is the minimum super basic value considered for applying a PUSH step The following SPECS command may be used PUSH ADMIT THRESHOLD v Default v 1 0e 4 Another control command available is PUSH CALSOL FREQUENCY n Default n 10 Which specifies that a new solution must be calculated after n re inversions Note that in default n is 10 although in standard Primal and Dual re calculating always takes place after every re invert However frequent re calculation loses time and is very rarely needed FortMP Manual CRASH supplement It is also possible to skip over using the Dual push stage
288. to make them all integers and the RHS value truncated if necessary is integer also Hence we have a knapsack constraint Bearing this in mind we give a classification for constraint types on the basis that any such necessary transformations are assumed to have been carried out and the resulting positive negative sub division of the coefficients into N and N refers to their values after complements have been substituted in a way to obtain the prescribed form Knapsack constraints are classified into the following Knapsack KNA This is the generic type defined above Invariant Knapsack INK Knapsack constraint with all coefficients 1 0 yix lt b JEN This constraint type is also known as a cover Clique CLQ Invariant knapsack with RHS equal to one y xsl JEN Set Covering SCV Invariant Knapsack with RHS equal to one less than the number of LHS terms x SIN3HI JEN When each x is complemented this becomes similar to the clique but with opposite sense to the inequality VI 43 FortMP Part 2 Lr JEN Bin Packing BPK Knapsack constraint with RHS zero and exactly one negative coefficient Sa Oy lt 0 kKEN3 a gt 0 jeN3 Plant Location PLK Bin Packing constraint with all the positive coefficients equal to 1 0 ea lt 0 kKEN3 a gt 0 jen Reverse Plant Location RPL Knapsack constraint with RHS zero exactly one positive coefficient and all negative coefficients equal t
289. to tree cutoff is reduced once an integer solution has been found RELATIVE implies relative to the gap and RELISOL implies relative to the integer solution See section 6 8 2 MAXIMUM MIP NODES n default n 50 000 MAXIMUM MIP TIME v default v 50 000 0 MAXIMUM MIP INTEGER SOLUTIONS n MAXIMUM MIP INTSOL n default n 300 Limits placed on the tree search See section 6 8 3 MAXIMUM AROUND NODES n default n 5000 MAXIMUM AROUND TIME v default v 5000 0 MAXIMUM AROUND INTEGER SOLUTIONS n MAXIMUM AROUND INTSOL n default n 1 Limits placed on the auto rounded tree search See section 6 8 3 MAXIMUM MIP SPACE n default n 10 000 Limit on node storage does not limit the execution See section 6 8 3 VI 51 FortMP Part 2 MIP SAVE FREQUENCY n default n 500 Save interval given in terms of the number of nodes built All saving is cancelled if n is zero See section 6 8 4 MIP RESTART ON default OFF MIP RESTART OFF ON activates a restart using save files from a previous run See section 6 8 4 MIP ON MIP OFF default ON OFF causes Branch and Bound execution to be skipped See section 6 8 5 MIP DUAL ON MIP DUAL OFF default ON ON causes Primal algorithm to be used in the place of Dual as solver for sub problems See section 6 8 6 MIP LOG LEVEL n 0 4 default
290. tten and considerabley enlarged with sub sections corresponding to those of the PRIMAL algorithm section 4 3 4 6 1 The Principal controls DUAL DEVEX controls are added and the DOUBLE option for primal devex now has a new meaning apply DEVEX in phase 1 4 6 3 Tolerances and Parameters The pivot control commands are changed so as to be less confusing and to provide separate PRIMAL DUAL and INVERT application New commands specified in section 4 6 7 complete the picture 4 6 7 Special Pivoting and Update Commands This section is added so as to describe additional new commands Revised to incorporate the earlier corrections and additions Chapter 5 The Interior Point Method This chapter is not changed Chapter 6 Mixed Integer Programming MIP 6 8 Miscellaneous MIP Controls 6 8 1 Automatic Rounding Heuristics This section is re written Auto rounding is now re designed as a heuristic for finding integer solutions quickly before the main tree is developed PROBE rounding is discontinued 6 8 2 Cutoff and Tolerance Control New controls on the bound and the cutoff tolerance are added and a more complete description is given 6 8 3 Placing Limits on the Tree Search MAXIMUM controls are added for the auto rounding heuristic Revised to incorporate the earlier corrections and additions Chapter 7 FortMP Subroutine Library and External Data Interface 7 2 External Data Interface 7 2 5 An Example MA
291. types implies that the row is changed in type to become an EQ type row Rows defined as EQ type may have positive or negative range values which effectively change the row type as follows A positive range implies row type GE A negative range implies row type LE Consider the following example row with an RHS range 100 lt a x lt 200 This can be coded in four alternative ways 1 ROWS Use type LE RHS value 20 0 RANGES value 10 0 2 ROWS Use type GE RHS value 10 0 RANGES value 10 0 3 ROWS Use type EQ RHS value 10 0 RANGES value 10 0 4 ROWS Use type EQ RHS value 20 0 RANGES value 10 0 Multiple Rhs Sets Range Sets and Bound Sets An important option for the user is to provide several alternative models in the same data file This is done by making use of multiple sets in the RHS RANGES and BOUNDS sections of the data with distinct names in field 2 of the input records The following SPECS commands specify the selection of particular sets RHS NAME rhsname RANGES NAME rngname BOUNDS NAME bndname By default the first set to appear will be selected for any section where the command is not given These sets follow the same rule as for columns in the COLUMNS section a set may not be split All the data for any one set must be presented consecutively In addition no set name should be entirely blank because blank is used internally to select the default It is possible for a
292. uation might be considered as two inequalities to be separately classified as in 6 10 2 or 6 10 3 this is not generally useful and equations are considered separately Various types of equation are highlighted as follows Diophantine Equations DPQ An equation involving only binary and integer variables Zax aay b JEN3 keNy DPQ as originally defined should have all a a and the RHS b integer valued This requirement is omitted on the same argument as for knapsack constraints the constraint can be scaled up to VI 45 FortMP Part 2 achieve this condition P fold Alternative PFLD Sum of binary variables equal to a constant p Lasp jen Exclusive OR XOR P fold alternative with p 1 ere jen Note here that the convexity row of an SOS1 if it exists is an XOR constraint Discrete Goal Oriented Equations DGOQ Jax x x b jen Where x and x are singleton columns not of binary type and not appearing in any other constraint This consists of an equation involving binary variables augmented by logical additions that can specify a penalty cost attached to any failure to achieve a solution such that 2 aiye JEN It is not necessary to have both the positive and the negative additional terms The following types of constraint are also classified as DGOQ a3 x b JEN Jaz x b JEN where x and x are singleton columns as before Back to Chapter contents V
293. ubroutine Library and External Data Interface 7 6 MPS form Output When a tabular form has been used for the input or when input data is passed via the external interface it may be desirable for the user to create an MPS form equivalent on a disk file An option to do this immediately after the input can be invoked by means of the following SPECS command OUTPUT MPS ON Default OFF OFF can also be specified If the model has no names MPSOUT creates row and column names based on the indices with prefix R or C The standard file name given to this output is lt probname gt mpo where probname refers to the problem name However the user may wish to distinguish outputs from different calls to SUBMP1 without using a different problem name This can be achieved by encoding a subroutine library call within a revised SUBMPI routine or within a revised FORTMP main program Another reason for doing this is that the model is subject to changes as a result of PRESOLVE or if it has discrete variables as a result of MIP pre processing and the Branch and Bound algorithm As before the user may wish to preserve these changes in a form suitable for later re entry and which can be compared with the original The library subroutine which does this task is as follows CALL MPSOUT EXTEN where EXTEN CHARACTER 3 is the output file extension The file name for output is formed by appending exten to the model name and direct
294. uence so long as the entries correspond to each other UPB Vil 10 is a DOUBLE PRECISION REAL type array of size NC This holds the upper bound values on columns Any value greater than or equal to 10 indicates that no upper bound exists LOB RHS LHS COST MITYP SREF SFUN SBEG SEND Chapter 7 FortMP Subroutine Library and External Data Interface is a DOUBLE PRECISION REAL type array of size NC This holds the lower bound values on columns Any value less than or equal to 10 indicates that no lower bound exists is a DOUBLE PRECISION REAL type array of size MR This holds the upper bound values on rows RHS Any value greater than or equal to 10 indicates that no upper bound exists is a DOUBLE PRECISION REAL type array of size MR This holds the lower bound values on rows LHS Any value less than or equal to 10 indicates that no lower bound exists is a DOUBLE PRECISION REAL type array of size NC This holds the cost coefficient values in the objective function is an INTEGER type array of size nc This holds a variable type code for MIP as follows CODE MEANING 0 Continuous variable 1 Binary Variable 2 General Integer variable 3 Semi Continuous variable 4 Member of an SOS type one 5 Member of an SOS type two is an INTEGER type array of size NSET This array holds the reference row numbers of each set is an INTEGER type array of size NSET This array holds the function row
295. uency the primal log is issued levels 2 and above This log is also issued by DUAL and shows the Phase I and Phase II objective values plus other items of interest The INVERT log gives details of the ETA counts and non zero counts both before and after each reinversion Back to Chapter contents INT 17 4 6 7 Special Pivoting and Update Controls Some of the controls on pivoting have already been described in section 4 6 3 above It has been found convenient to extend these controls to cover all three SSX algorithms and to make additional controls available for research testing and for tuning the most difficult problems In what follows a SPECS command is prescribed for each operation however not all of these are in fact available for use Those not available are fixed at a default level which is applied as a constant or if zero is not applied at all in the current release They are indicated by the annotation Fixed for the value in the command The following tolerances relate to pivoting PRIMAL PIVOT ZERO TOLERANCE v Fixed v 1 0d 35 DUAL PIVOT ZERO TOLERANCE v Default v 1 0d 14 NVERT PIVOT ZERO TOLERANCE v Default v 1 0d 7 These commands all refer to the level considered as zero by the corresponding algorithm The following commands specify an acceptance level for pivoting PRIMAL PIVOT ADMIT THRESHOLD v Default v 1 0d 8
296. ul to reduce it by eliminating all variables with solution value zero If the user does not need to know the dual solution values this means that output is reduced simply to those variables with a non zero primal solution value This is achieved with the following SPECS command OUTPUT SUPPRESS ZERO default not suppressed In addition it is possible to suppress the output altogether for example to restart and print in a later run with the following command OUTPUT OFF default ON ON may also be given Back to Chapter contents 3 5 Further Topics 3 5 1 Saving and Restarting It is inevitable that some users will need to experiment or will have some difficulties in determining how best to apply the system to their problems In some cases a run may exceed its time or memory allocation so the user has to make adjustments and rerun the problem FortMP is provided with several save and restart features which enable a rerun to begin from a point close to the termination of the previous run thus avoiding a waste of computer time The save features are as follows INPUT save The input data is saved after an initial pass in which all names are identified and indexed The internal data file has all names replaced by indices so that a much faster INPUT can be used in a restart SIMPLEX save A periodic save of the basis takes place during the SSX algorithms The saved basis can form an advanced starting basis in a restart IPM save Pe
297. und Algorithm VI 19 6 5 Controlling the Tree Development VI 22 6 6 Detailed User control of the Tree Search VI 25 6 7 Advanced Algorithms for MIP VI 30 6 8 Miscellaneous MIP Controls VI 34 6 9 Logged Output and Screen Dispolay VI 39 6 10 MIP Constraint Classification VI 41 6 11 Summary of MIP SPECS Commands VI 48 PART 3 7 FortMP Subroutine Library and External Data Interface Vil 1 7 1 Using FortMP as a Subsystem to Solve Linear Problems VII 2 7 2 External Data Interface VII 7 7 3 Standard Data Input to the Interface VII 18 7 4 Internal SPECS Commands VII 23 7 5 How to Avoid Miscellaneous I O VII 25 7 6 MPS form Output VII 27 7 7 Summary of Callable Library External Data Interface and associated commands VII 28 8 Internal Data Interfacing Service Utilities VIII 1 8 1 Introduction to the Data Interfacing Service Utilities VIII 2 8 2 The Facilities Available VIII 6 8 3 Specifications VIII 8 PART 4 9 The Interior Point Method for Quadratic Programming IX 1 9 1 Statement of the QP Problem IX 2 9 2 IPM Solution Procedure IX 4 9 3 Input Data Layout IX 7 9 4 Worked Examples IX 10 9 5 Branch and Bound Algoritghm for MIQP IX 18 9 6 Summary of SPECS Commands IX 20 10 Advanced Starting Bases X 1 10 1 Introduction X 2 10 2 Primary Crash Algorithm X 3 10 3 Crossover Algorithms Purify and Basis Recovery X 6 10 4 Iterative Crash Algorithm X 9 10 5 Summary of SPECS Commands X 12 APPENDICES Appendix A Input Output Data Layouts A 1 A1 Mps Fo
298. und and Cutoff can be obtained with the following commands MIP BOUND v Defaul MIP CUTOFF TOLERANCE v Default high value 1 0e 12 Which are described in Chapter 6 section 6 8 2 The criterion for fractional part considered as zero in a binary variable is set with the following command NTEGER TOLERANCE v x Default 0 001 The level of log messages issued may be controlled with MIP LOG LEVEL n x 0 4 default 1 It may also be convenient to set the log level for IPM to zero in order to prevent excessive output on the log Other outputs can also be obtained with the following commands MIP AGENDA OUTPUT ON Default OFF MIP AGENDA OUTPUT ALL MIP INTSOL OUTPUT ON Agenda outputs have already been described see Chapter 6 sections 6 6 3 and 6 6 5 However the corresponding input features are not available as yet Integer Solution output causes the complete set of primal solution values to be listed in the log whenever an integer solution is found Back to Chapter contents 9 6 Summary of SPECS Commands 9 6 1 Controls for IPM There are no SPECS commands specific to IPM for QP On reading in the data FortMP automatically detects the problem is QP and solves using predictor corrector IPM The following are all the IPM specific commands that are also applicable to QP They have already been described in Chapter 5 IPM PHI v Default is 10 0 This comma
299. variable is at its upper bound Row entries come first followed at position MROW 1 by column entries Dimension size is IMROW NCOL INTEGER Table of row index numbers corresponding to entries in CVTAB described above Dimension size is the same as CVTAB INTEGER Table of column index numbers corresponding to entries in RVTAB Dimension size is the same as RVTAB DOUBLE PRECISION REAL Table of lower bound and lower RHS values Row entries come first followed at position MROW 1 by column entries Dimension size is MROW NCOL INTEGER Table of mixed integer type code values coded as for scalar MIT see above Dimension size NCOL DOUBLE PRECISION REAL Table of objective values with one position for each column Dimension size is NCOL DOUBLE PRECISION REAL Table of non zero element values in one matrix row When supplied for an ADDROW or CHGROW operation this table has the dimension size NRNZ When supplied as an empty area to receive a column in GETCOL it has dimension size MROW INTEGER Table of solution status codes to correspond with SOLVEC Code values are as follows 1 Non basic at lower bound 2 Non basic at upper bound 3 Basic feasible 4 Basic infeasible less than lower bound 5 Basic infeasible greater than upper bound SOLVEC DOUBLE PRECISION Solution vector Rows followed by columns with dimension size MROW NCOL TCOL DOUBLE PRECISION Column vector of the updated
300. ve formulation all the variables x j and y alike can be handled in a uniform way Both the x and the y conform to one of the following types Fixed variable 0 0 Bounded 0 0 lt variable lt upper bound Plus 0 lt variable Free variable can take any value The simplified structure of the problem is illustrated in Figure 5 below where the upper bounds U and u exist only for bounded variables T7 A lt Variables m sicals Unit matrix Coefficient Matrix I Aij Type codes Type codes Figure 5 Internal SSX problem structure In practice the c of the objective row appear as coefficients of a row namely the objective row in the MPS form of the input data and this idea is retained internally so that no separate c vector is actually needed A set of values of the variables is called a solution if it satisfies the constraints A solution is called a feasible solution if additionally it satisfies the bound constraints too Using this terminology the purpose of the simplex method is to find a the best feasible solution if such exists In the simplex method the variables are divided into two separate categories there are m basic and n non basic variables The main distinction is that the value of a non basic variable may be temporarily fixed usually at zero or upper bound while the value of a basic variable may change at each iteration The set of values of the actual non basic variabl
301. ver eliminated within the maximum number of iterations allowed Option 4 is a modified formula similar to option 3 but found usually to perform the best Power 1 should be used only if the model is numerically stable Approach to the Boundary After calculating the direction of change the system calculates how much change can be applied without having any individual variable go outside the interior point region One change factor applies to all primal variables and another change factor to all dual variables The factor in each case is derived from the variable which first reaches the boundary However the system never goes all the way using these factors but only a fixed proportion of the distance which is given by the DARE parameter Users can specify DARE with the following SPECS command IPM DARE v 0 lt v lt 1 0 Default is 0 9995 Lower values of DARE will result in more iterations but a value that is too high results in instability The process no longer converges normally and may diverge instead Feasibility and Termination Criteria There are two tolerances EPSILON values which the user can set to control termination PM RELATIVE EPSILON v Default is 1 0e 9 PM FEASIBILITY EPSILON v Default is 1 0e 4 The relative epsilon value applies to the relative duality gap that is to say actual duality gap normalised by the following formula RGAP DGAP IDOBJI
302. w by the user CHGAIJ This may add or change one element of the A matrix and by setting AVAL 0 0 may delete the element CHGCOL Deletes the existing coefficients on one matrix column and replaces them by an alternative set supplied by the user CHGOBJ Deletes the existing cost coefficients on the objective row and replaces them by an alternative set supplied by the user CHGROW Deletes the existing coefficients on one matrix row and replaces them by an alternative set supplied by the user GETAIJ Retrieves a single matrix element for the user GETCOL Retrieves one column of the matrix and places the coefficients in a user supplied area GETOBJ Retrieves the objective row of the matrix and places the cost coefficients in a user supplied area GETROW Retrieves one row of the matrix and places the coefficients in a user supplied area There are no DELETE facilities corresponding to the ADD facilities for matrix rows and columns It is not possible to delete any row or column physically from the data because the user would lose the relationship between row and column numbers and the external naming given for constraints and variables However the user can achieve the same result by changing row and column type codes See note at the end of Section 8 2 3 Back to Chapter contents 8 2 3 RIM Facilities CHGCTP change column type Changes the lower bound upper bound and variable type of a single column CHGRIM Replaces
303. y POSTSOLVE which expands back to the original problem in order to obtain a basic solution similar to using BASREC after IPM This expansion is invoked or cancelled with the following SPECS commands POSTSOLVE ON This is the default POSTSOLVE OFF The amount of information sent to the log during execution of PRESOLVE and POSTSOLVE can be controlled with the following command PRESOLVE LOG LEVEL n se n 0 4 default is 1 Back to Chapter contents 3 3 6 Using the SCALE Algorithm The SCALE algorithm finds a set of factors one per row and one per column which reduce the variation in data values so that the solution process is numerically more stable The resulting scaled solution values are unscaled before the final output SCALE normally takes place after INPUT or after PRESOLVE and before execution of any algorithm It is invoked or cancelled with the following SPECS commands SCALE ON This is the default SCALE OFF Two further SPECS commands control the operation of SCALE when it is switched ON SCALE PASSES n n 1 4 Default is 4 SCALE VARIANCE v Default v 10 0 Each pass of SCALE is an attempt to reduce the variation of the matrix coefficients starting from the previous results If the given target variance is reached SCALE ends immediately otherwise it continues for the given maximum number of passes Quite often the variance does not reduce after the first pass and may on the contra
304. yout beyond position 5 in free form data lines A Free form data line consists of the fixed form MPS field 1 in positions 2 3 and from positions 5 onwards a number of tokens separated by one or more blank spaces where a token is a string of 1 to 16 characters that are not blank For each type of MPS form data line there is a precise free form equivalent with blank separated tokens replacing the fixed fields from positions 5 62 in the same order from left to right Indeed an MPS form data file can perfectly well be read in as free form data provided that no names are blank or have interior embedded blanks and provided that no material exists in the unused part of the fixed layout For MARKER lines the label is treated as a name and must be non blank Free form data is sectioned by header lines ROWS COLUMNS RHS RANGES BOUNDS with the keyword beginning in position 1 and the last section is terminated by ENDATA again beginning in position 1 Any line beginning with in position 1 is treated as commentary and ignored Apart from comment lines the first line in the free form input data must have 2 tokens NAME beginning in position PROBLEM Problem name located freely The remaining data lines within each section have positions 1 4 fixed exactly as in MPS form that is to say with a type code if any in positions 2 3 and blank otherwise The first name in the line begins at or after position 5 optionally preceded by one or

Download Pdf Manuals

image

Related Search

Related Contents

HP Pavilion dv3-4305se  USER MANUAL  Manual de usuario  FLO-C1 取扱説明書 - オメガウェーブ株式会社  

Copyright © All rights reserved.
Failed to retrieve file