algorithm - Optimise 3D placement of rooms? -
algorithm - Optimise 3D placement of rooms? -
given graph nodes represent 3x3x1 rooms , vertices represent need closeness. how should placed in 3d space optimise overall closeness?
example (randomish) datastructure:
{ room1: [room2, room3], room2: [room1, room4], room3: [room5], room4: [room2, room5, room1], room5: [] }
(i'm not sure should asking question it's different see on stackoverflow. interested in programming solutions/heuristic algorithms.)
i assume want adjacency.
in backtracking search, maintain queue of rooms ordered how many other rooms connected in graph (the constrained variable heuristic). then, each room in queue:
determine possible grid positions can take , pick 1 of them; in loop, determine whether other rooms exist can in 1 spot, set them there , remove them queue (forward checking); if of previous steps failed, backtrack lastly selection point (undo changes grid). algorithm optimization language-agnostic genetic-algorithm heuristics
Comments
Post a Comment