NetLogo User Community Models
## WHAT IS IT?
A special algorithm for the assignment problem. (Hungarian method)
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
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)