return new_wires_list, gate_conn if __name__ == '__main__': net_option, number_of_solutions, hill_climb_bool = main() start_time = time.time() if int(net_option) <= 3: netliststring = "data/" + "netlist_" + net_option + ".csv" printstring = "data/" + "print_1" + ".csv" elif int(net_option) <= 6: netliststring = "data/" + "netlist_" + net_option + ".csv" printstring = "data/" + "print_2" + ".csv" # Create netlist by loading file in class netlist = classs.Netlist(netliststring).netlist # Create list for gate coordinates gate_coordinates = classs.Gate_coordinate(printstring).gate_coordinates distances = {} for item in netlist: gate_start = int(item.gate_1) gate_end = int(item.gate_2) # Create tuple for gates that have to be connected connected_gate = (gate_start, gate_end) coordinate_start = gate_coordinates[gate_start - 1] coordinate_end = gate_coordinates[gate_end - 1]
Finds the optimal paths between the chips NOT WORKING, but with <7 layers constraint """ from mpl_toolkits import mplot3d import numpy as np import matplotlib.pyplot as plt from code.classes import classes as classs from code.functions import delete as delete from code.functions import change_coordinates as change import copy import csv # Create netlist by loading file in class netlist = classs.Netlist("data/netlist_1.csv").netlist # Create list for gate coordinates gate_coordinates = classs.Gate_coordinate("data/pritn_1.csv").gate_coordinates # Create dictionary for gate connections with corresponding shortest distance distances = {} for item in netlist: gate_start = int(item.gate_1) gate_end = int(item.gate_2) # Create tuple for gates that have to be connected connected_gate = (gate_start, gate_end) # Define coordinates of start and end gate
from code.visualisation import plot as plot from code.classes import classes as classs from code.functions import astardelete as astardelete from code.algorithms import Astar as Astar import copy import matplotlib.pyplot as plt import time import csv if __name__ == '__main__': start_time = time.time() # Create netlist by loading file in class netlist = classs.Netlist("data/example_net3.csv").netlist # Create list for gate coordinates gate_coordinates = classs.Gate_coordinate("data/example_prit3.csv").gate_coordinates gate_connections = {} """ # TODO geef de begin en eindgate mee alle gate_coordinaten geef een lijst mee met coordinaten waar al draad ligt """