Home Download Help Forum Resources Extensions FAQ NetLogo Publications Contact Us Donate Models: Library Community Modeling Commons Beginners Interactive NetLogo Dictionary (BIND) NetLogo Dictionary User Manuals: Web Printable Chinese Czech Farsi / Persian Japanese Spanish
|
NetLogo User Community Models(back to the NetLogo User Community Models)
## WHAT IS IT?
A special algorithm for the assignment problem. (Hungarian method)
Theorem:
The Hungarian Method:
EXAMPLE: A construction company has four large
How should the bulldozers be moved to the construction sites
NB: The system provides a general model for the Hungarian method.
## HOW IT WORKS
The cost matrix is made visible in the habitat.
Records are used to store the cost matrix and to perform the calculations.
Handlers are used either to manage exceptions, and also to drive the evolution of the system state over time by emulating the typical artifact of a Future Event List.
## HOW TO USE IT
Before pressing the setup button you decide if you want to run a FAT test (predefined tests used to verify the system behavior because we know the result the system must discover). You can also decide the dimension of the cost matrix, and choose to enter data manually or ask it to be created randomly.
You can also decide with a switch is you want to track in the command center (log) all the details of what the system is doing. This is specially useful to debug the code.
You the press setup followed by the go button.
The system will evolve by showing the calculation matrix, and finally will halt by showing back the original cost matrix with the selected cells in green color for the optimal solution achieved.
## THINGS TO NOTICE
Look at the code so to see the orientation to preventive quality in software developing.
You will see the managing exceptions applied policy.
You can also get interested in the way of emulating a future event list with a breed of turtles.
You can also get interested in the way of using sort of lambdas (command tasks and reporter tasks) so to emulate to some extent the polimorphism that we have in OOP languages.
## THINGS TO TRY
Use data that can provoke malconditioned matrix or non feasible solutions.
Use examples with known solution for additional SAT testing.
Use the SOLVER of a spreadsheet to cross check results.
## EXTENDING THE MODEL
You can readjust the placement of the matrix so to be able to manage larger cost matrices. Dimension could be arbitrary, but is here limited by the presentation layer, so that the observer can see the overall matrix with a glance.
## NETLOGO FEATURES
Managing exceptions, lambdas, future event list, cohorts of breeds to discriminate among subsets of breed populations.
## RELATED MODELS
NetLogo Models Library is a powerful source for learning many of the features used here in this work.
## CREDITS AND REFERENCES
http://www.cs.berkeley.edu/~vazirani/algorithms/chap8.pdf
http://ia700502.us.archive.org/15/items/algorithmfortrav00litt/algorithmfortrav00litt_bw.pdf
http://www.youtube.com/watch?v=LjvdXKsvUpU
http://www.math.harvard.edu/archive/20_spring_05/handouts/assignment_overheads.pdf
http://www.universalteacherpublications.com/univ/ebooks/or/Ch6/hungar.htm
Hillier, F. S. and Lieberman, G. J. Introduction to Operations Research, 8th ed. New York: McGraw-Hill, 1990.
Author: Jose Costas. September, 2013. |
(back to the NetLogo User Community Models)