|
CompleteExample
A simple example on the usage of the GNU Oflox package
A simple exampleIn the following example we solve the same problem used in the introduction page, described by the file ~/octave/gnuoctave-1.0.2/doc/nets/pfmc300.min but using FASE I/II and setting the output to a PDF file showing the initial problem, the steps involved and the optimum solution. DetailsI strongly sugest to open a new folder for each problem to solve, so let's start off by opening the console, creating a new folder named fmc3 and moving in to it cd ~ mkdir fmc3 && cd fmc3 Start up octave and load the package, octave:1> pkg load gnuoflox then type config = ofloxconfig; in order to customize the diverse settings. Let's enable FASE I/II and disable Big-M methods
and finally, set a name for the problem to solve Note: don't use special \LaTeX characters in the name! as underscores, &, or ^
Now we are ready to solve the problem! octave:1> [Z X it, it0] = oflox('~/octave/gnuoflox-1.0.1/doc/nets/pfmc300.min', config)
file is DIMACS MIN FORMAT
file is DIMACS MIN FORMAT read OK.
warning: Degenerated iteration detected. The flows don't change.
warning: Degenerated iteration detected. The flows don't change.
warning: Using the SYSTEM call.
`/home/andres/octave/gnuoflox-1.0.1/oflox_mo.tex' -> `master_fmc3.tex'
This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
...
Output written on master_fmc3.dvi (11 pages, 41464 bytes).
Transcript written on master_fmc3.log.
MO: Master output document master_fmc3.tex compiled to master_fmc3.dvi and master_fmc3.pdf
Z = 4
X =
0
3
1
1
4
3
4
3
it = 1
it0 = 5indicating that the problem's objective optimum value is 4 units as expected (see the Introductory page) and can be achieved by setting each arc's flow as indicated by the vector X, it required only 1 Simplex FMC iterations but 6 FASE I iterations. Besides this information we note the output states MO: Master output document master_fmc3.tex compiled to master_fmc3.dvi and master_fmc3.pdf indicating the output was written to master_fmc3.pdf and master_fmc3.dvi. if we look at the contents of the current working directory we note there are some 41 new files, namely
but for now the only file we are interested is master_fmc3.pdf, go ahead and open it in your favourite PDF viewer and look at it's contents. Most of the files listed in the above table are the LaTeX source files to generate master_fmc3.pdf, they can be viewed and edited. The most important file is master_fmc3.tex that is the one that includes all the other TeX source and PS graphic files, you are encouraged to view, edit and explore all the source files! The folloing images show some pages of the PDF output (Click on them to enlarge)
| |||||||||||||||||||||||||||||||||||||||||||||||||||



