You are on page 1of 1

Visual Paradigm Standard(Diogo(Insituto Superior Tecnico))

ant

Ant
-currentCycle : Cycle
-nonVisitedNodes : BitSet
-meanEdgeTime : double
+Ant()
+getCurrentCycle() : Cycle
+setCurrentCycle(c : Cycle) : void
+layPheromones(PEC : EventManager) : void
+resetNonVisitedNodes() : void
+getMeanEdgeTime() : double
+setMeanEdgeTime(weight : int) : void
+AreThereUnvisitedNodes() : boolean
+handleVisitedNodes(visitedN : ArrayList) : boolean
+getNodes(g : GraphFacade, currentNode : int, visitedN : ArrayList, probabilityList : Map) : double
+calculateProbabilities(g : GraphFacade, currentN : int, i : int, probabilityList : Map, sumProbabilities : double) : double
+InverseTranformSampling(g : GraphFacade, currentN : int, probabilityList : Map, sumProbabilities : double) : void
+chooseNextNode() : boolean

-ants *

AntColony
-instance : AntColony
-ants : Ant[]
-hamiltonianCycleQueue : TreeSet
main
-best : Cycle
-AntColony()
+getInstance() : AntColony Main
+printBestHamiltonianCycle() : void +Main()
+printTopCycles() : void +main(args : String[]) : void
+addCycleToPQ(c : Cycle) : void +main(args : String[]) : void
+moveAnt(i : int) : boolean
+restartPath(i : int) : void 1
+antLaysPheromones(i : int, PEC : EventManager) : void -instance
+meanTraverseTime(i : int) : double utils
ParameterReader
~readingMode : int
~n : int
~a : int
~n1 : int
~alpha : float
~beta : float
~delta : float <<enumeration>>
ConsoleFilePrinters
~eta : float PrinterType
~rho : float <<Property>> -instance : ConsoleFilePrinters
CONSOLE
~gamma : float -consolePrinter : Printer -instance FilePrinter
FILE -printerType <<Interface>>
~nu : int -filePrinter : Printer -printStream : PrintStream
BOTH Printer
~tau : float -printerType : PrinterType -filePrinter +FilePrinter(fileName : String)
-consolePrinter +println(text : String) : void
+ParameterReader() -ConsoleFilePrinters(fileName : String, type : PrinterType) +println(text : String) : void
+printf(format : String, args : Object...) : void
+readingMode(mode : String) : void +initialize(fileName : String, type : PrinterType) : void +printf(format : String, args : Object...) : void
+getReadingMode() : int CmdTextFormatter +println(text : String) : void
+getN() : int +printf(format : String, args : Object...) : void
+BOLD : String = "\033[1m"
+getNest() : int +UNDERLINE : String = "\033[4m"
+getAlpha() : float +RED : String = "\033[31m" ConsolePrinter
+getBeta() : float +GREEN : String = "\033[32m" +ConsolePrinter()
+getDelta() : float +CYAN : String = "\033[36m" +println(text : String) : void
+getRho() : float +WHITE : String = "\033[37m" +printf(format : String, args : Object...) : void
+getEta() : float +RESET : String = "\033[0m"
+getGamma() : float
MessageError
+getNu() : int
+CommandNotFound(message : String, command : String) : void
+getTau() : float
+WrongNumberOfArguments(message : String) : void
+readParameters(args : String[]) : void
OutputFile +FileNotFoundWithInput(filePath : String) : void
+readInputFile(inputFile : String) : void
-printStream : PrintStream +FileExtensionNotSupported(message : String, filePath : String) : void
+printParameters() : void
+FileFormatNotSupported(message : String, inputFile : String) : void
+readingMode(mode : String) : void +initialize(inputFile : String) : void
+CorrectUsage() : String
+readParameters(args : String[]) : void +close() : void
+readInputFile(inputFile : String) : void

cycle graph
Cycle
-cycle : LinkedList
~currentCycleWeight : int
+Cycle()
GraphFacade
+getCycleList() : LinkedList
-currentCycle -pheromoneMap : PheromoneMap
+addNode(nod : int) : void GraphGenerator
1 1 -antGraph : GraphGenerator -facadeInstance
1
+getLastNode() : int
#graph : int[][] -facadeInstance : GraphFacade
+isLastNode(element : Integer) : boolean -best
+getCurrentCycleWeight() : int +GraphGenerator(numVertices : int) -GraphFacade()
+incrementCurrentCycleWeight(increment : int) : void -setWeight(i : int, j : int, w : int) : void +getInstance() : GraphFacade
1
+removeCycle(stopNod : int, nVNodes : BitSet) : void +getWeight(i : int, j : int) : int +getWeight(node1 : int, node2 : int) : int
-shufflePerm(perm : int[]) : void -antGraph
+layP(PEC : EventManager) : void +getPheromones(node1 : int, node2 : int) : double
+printElements() : void -getRandomWeight(min : int, max : int) : int +printAntGraph() : void
+fillGraphNoFile(n : int, maxW : int) : void +fillGraphFileMode(weights : String[], file : int) : void
+fillGraphFile(w : String[], linecnt : int) : void +fillGraphReadMode(n : int, maxW : int) : void
+printGraph() : void +increaseEdgePheromones(node1 : int, node2 : int, increment : double) : void
+reducePheromones(startNode : int, endNode : int) : boolean
+getTotalWeight() : int

event
AntMoveEvent
PrintEvent
-antID : int
+PrintEvent(time : double)
+AntMoveEvent(time : double, antID : int)
+executeEvent() : void
+executeEvent() : void
+setNextEventTime() : double
+setNextEventTime() : double
+getPec() : EventManager
+getPec() : EventManager
+getPECTime() : double
+getPECTime() : double
+getEventTime() : double
+getEventTime() : double pheromone

1 -pheromoneMap
EventManager
PheromoneMap
-managerInstance : EventManager
-pheromoneMap : Map
-pec : PriorityQueue
-currentTime : double +PheromoneMap()
-moveEventCounter : int 1 +organizeNodes(startNode : int, endNode : int) : int[]
-pheromoneEventCounter : int -managerInstance +addPheromone(startNode : int, endNode : int, pheromoneLevel : double) : void
-printEventCounter : int +removePheromone(startNode : int, endNode : int) : void
Event +getPheromoneLevel(startNode : int, endNode : int) : double
+getInstance() : EventManager
-time : double +getPheromone(key : int[]) : double
+EventManager()
-pec : EventManager +increasePheromoneLevel(startNode : int, endNode : int, increasePheromones : double) : void
<<Interface>> -pec +getMoveEventCounter() : int
+reducePheromoneLevel(decrement : double, startNode : int, endNode : int) : boolean
EventInterface +Event(time : double) +getPheromoneEventCounter() : int
1 +printEdges() : void
+getEventTime() : double +getPrintEventCounter() : int
+executeEvent() : void
+getPECTime() : double +setTime(time : double) : void
+getEventTime() : double
+getPec() : EventManager +getTime() : double
+setNextEventTime() : double
+addEvent(event : Event) : void
+compareTo(otherEvent : EventInterface) : int
+getEvent() : Event
+compareTo(this : Object) : int
+initializePEC() : void
+incrementMoveEvent() : void
PheromoneEvaporationEvent
+incrementPheromoneEvent() : void
-startNode : int +incrementPrintEvent() : void
-endNode : int
+PheromoneEvaporationEvent(time : double, startNode : int, endNode : int)
+executeEvent() : void
+setNextEventTime() : double
+getPec() : EventManager
+getPECTime() : double
+getEventTime() : double

You might also like