-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from LennartJKlein/development
Iteration for different heuristics & netlist generations
- Loading branch information
Showing
10 changed files
with
919 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
*.pyc | ||
netlist.pyc | ||
settings.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
Oops, something went wrong.