Skip to content

Commit

Permalink
Merge pull request #11 from LennartJKlein/development
Browse files Browse the repository at this point in the history
Iteration for different heuristics & netlist generations
  • Loading branch information
LennartJKlein authored Dec 6, 2017
2 parents ce5688e + 4ffea83 commit d63950c
Show file tree
Hide file tree
Showing 10 changed files with 919 additions and 203 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.pyc
netlist.pyc
settings.py
49 changes: 49 additions & 0 deletions sample/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
"""
core.py
Authors: - Jurre Brandsen
- Lennart Klein
- Thomas de Lange
Pathfinder will find the most efficient path between two gates on a board.
"""

import settings
import colors as CLR

from classes import Solution
from classes import Gates
from classes import Netlist

# Print program settings
print("")
print("Using netlist: " + CLR.GREEN + str(settings.FILE_NETLIST) + CLR.DEFAULT)
print("Using gates file: " + CLR.GREEN + str(settings.FILE_GATES) + CLR.DEFAULT)
print("Using pathfinding algorithm: " + CLR.GREEN + str(settings.PATH_ALGORITHM) + CLR.DEFAULT)
print("")

# Initiate a new netlist
netlist = Netlist(settings.FILE_NETLIST)
netlist.sort_by_connection()

# Initiate the gates
gates = Gates(settings.FILE_GATES, settings.SIGN_GATE, netlist)

#
# COMMANDS TO OPTIMIZE NETLIST HERE
#

# Initiate a new solution
solution = Solution()
solution.run(gates, netlist)

# Plot solution information
if settings.PLOT_SCORES:
solution.plot_scores()

# Plot solution information
if settings.PLOT_RESULTS:
solution.plot_results()

# Plot solution board
if settings.PLOT_BEST:
solution.plot_best()
Loading

0 comments on commit d63950c

Please sign in to comment.