Download LINGO - TStat
Transcript
COMMAND-LINE COMMANDS 305 In this example, we read in a copy of the small transportation model supplied with LINGO and use the PICTURE command to view the logical structure of the model: : take \lingo\samples\tran.lng : pic V O L U M E ( W H 1 , C 1 ) OBJ: DEM(C1): DEM(C2): DEM(C3): DEM(C4): SUP(WH1): SUP(WH2): SUP(WH3): V O L U M E ( W H 1 , C 2 ) V O L U M E ( W H 1 , C 3 ) V O L U M E ( W H 1 , C 4 ) V O L U M E ( W H 2 , C 1 ) V O L U M E ( W H 2 , C 2 ) 6 2 6 7 4 9 1 ' 1 ' 1' ' '1 ' 1 ' ' 1 1 1'1 1 ' ' ' 1 1 ' ' V O L U M E ( W H 2 , C 3 ) V O L U M E ( W H 2 , C 4 ) V O L U M E ( W H 3 , C 1 ) V O L U M E ( W H 3 , C 2 ) V O L U M E ( W H 3 , C 3 ) V O L U M E ( W H 3 , C 4 ) 5 3 8 8 1 5 ' 1 ' ' ' 1 ' 1 ' 1 ' 1 ' 1 ' ' ' ' 1 1 ' ' 1 1 1 1 MIN > B > B > B > B < B < B < B In this model, all the right-hand side values are in the range [12, 30]. Thus, they are all represented using the letter B. Row names are displayed running down the left-hand side of the matrix, while variable names are displayed along the top. The sense of the objective row and each of the constraints are shown. Spaces stand in for zero coefficients, and single quote marks are inserted to give a grid-like background. Note: The PICTURE command is best used on small models. The amount of output generated for large models can be cumbersome. For larger models, the LINGO|Picture command in Windows versions of LINGO can compress the matrix picture of large models into a single screen for easier viewing. SCENE The ability to generate the deterministic equivalent (DE) of a stochastic programming (SP) model via the XDETEQ command can be very useful when initially formulating and debugging an SP model. The only problem is that the DE can become quite unwieldy for all but the simplest SPs. For example, if the core model has 500 variables and there are 1,000 scenarios, then the DE will have 500,000 variables. Tracking down problems in such a large model can be difficult. Fortunately, in most cases when an SP is either infeasible or unbounded, LINGO will report the index of the first scenario that is causing the problem. With such information, we can focus our attention on the model for the isolated