Skip to content

Commit

Permalink
Merge prepared
Browse files Browse the repository at this point in the history
  • Loading branch information
LennartJKlein committed Dec 15, 2017
1 parent bed9a7a commit 989cea5
Show file tree
Hide file tree
Showing 51 changed files with 69 additions and 58 deletions.
43 changes: 27 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,38 @@
# Pathfinder

A program that uses wires to connect gates on a chip three-dimensionally and efficiently. Based on the case of [Chips & Circuits](http://heuristieken.nl/wiki/index.php?title=Chips_%26_Circuits)
A program that uses wires to connect gates on a chip three-dimensionally and efficiently. Based on the case of [Chips & Circuits](http://heuristieken.nl/wiki/index.php?title=Chips_%26_Circuits).

## Requirements
Chips (or more precisely: integrated circuits) are found in your PC, MacBook, Android Phone and microwave oven where they perform a diversity of functions, ranging from timekeeping and motor control to arithmetic and logic. Basically a small plate of silicon, chips are usually designed logically and subsequentially transformed to a list of connectable gates. This list, commonly known as a net list is finally transformed into a 2-dimensional design on a silicon base.

To run this program, you need the following:
This last step however, the physical real-world process of connecting the gates, is highly volatile. Good arrangements on the base lead to short connections, leading to faster circuits, whereas poor arrangements lead to slower circuits. It leads to no doubt that a good arrangement of logical gates and good wiring between them is of vital essence to the performance of the IC as a whole (source: http://heuristieken.nl/wiki/index.php?title=Chips_%26_Circuits).

The algorithms and content of the sample is ben setup to create paths from predefined net lists and two boards that can be found in sample/data. So in short, the aim is to connect the dots (gates) in a efficient manner.

### Notable content:

### Docs/html
The [documentations](https://lennartjklein.github.io/pathfinder/) of the classes and helper functions used in sample. The documentations are made by Sphinx, a docstring converter.

* Python 3.6
### Experimtents
One experiment is documented at the moment. We used a random netlist creator and random board creator to see how the used algorithms preformed.

## Installation
### Sample
Sample is the core of our repository! \__main.\__.py is the core of the core. It makes use of classes.py and helpers.py to drive the algorithems to solve the case.
Aditions are colors.py for adding terminal colors and settings.py. settings.py can be used to modify the program but more on that in de README.md in the sample directory.

Clone this repository (containing the pathfinder module) to a folder of your preference. And run the setup:

```
python setup.py install
```
## Requirements
To run this program, you need the following:

* Python 3.6.3
* [numpy](http://www.numpy.org/) 1.13.3
* [matplotlib](https://matplotlib.org/index.html) 2.1.0

## Documentation
Learn how to install, test, use and integrate this program that finds efficient paths in the [documentation](docs/index.md).
### Installation

## Definitions:
Clone or download this repository (containing the pathfinder module) to a folder of your preference. Make sure the requirements above are installed to be able to run the program.

### Definitions:
*Board*: The board a three dimensional grid with a presetted height, weight and depth.

*Gate*: A gate is placed on the surface of the board and can be connected to another gate.
Expand All @@ -36,10 +49,9 @@ Learn how to install, test, use and integrate this program that finds efficient

*Solvability of a board*: The average calculated percentage of a board with randomly placed gates and random netlists.


## Contributing

This project is not open for contributing, for it being a school assignment.
This project is not open for contributing at the moment, for it being a school assignment.

## Versioning

Expand All @@ -49,7 +61,7 @@ We use [SemVer](http://semver.org/) for semantic versioning. For the versions av

* **Jurre Brandsen** - *Developer* - [www.jurrebrandsen.nl](http://www.jurrebrandsen.nl/)
* **Lennart Klein** - *Webdeveloper and webdesigner* - [www.lennartklein.nl](http://www.lennartklein.nl/)
* **Thomas de Lange** - *Initial work* - [www.long-coding.nl](http://www.long-coding.nl/)
* **Thomas de Lange** - *Developer* - [www.long-coding.nl](http://www.long-coding.nl/)

## License

Expand All @@ -58,4 +70,3 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
## Acknowledgments

* Thanks to Daan van den Berg for creating the "Chips and circuits" case (as specified on [this Wiki](http://heuristieken.nl/wiki/index.php?title=Chips_%26_Circuits)).
* Thanks to Westly White for his [initial grid design](https://stackoverflow.com/questions/41619600/numbering-rows-and-columns-in-a-grid-board) in board.py.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Docs/html

The [documentations](https://lennartjklein.github.io/pathfinder/) of the classes and helper functions used in sample. The documentations are made by [Sphinx](http://sphinx-doc.org) version 1.6.6. Sphinx world famous for making a white sheet documentation.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 0 additions & 16 deletions docs/html/_sources/index.rst.txt → docs/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,6 @@ Indices and tables
* :ref:`modindex`
* :ref:`search`


Requirements
------------
To run this program, you need the following:

* Python 3.6

Installation
------------

Clone this repository (containing the pathfinder module) to a folder of your preference. And run the setup:

```
python setup.py install
```

Authors
-------
- `Jurre Brandsen <http://www.jurrebrandsen.nl/>`_.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion docs/html/searchindex.js

This file was deleted.

14 changes: 0 additions & 14 deletions docs/html/index.html → docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,6 @@ <h2>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Pe
<li><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></li>
</ul>
</div>
<div class="section" id="requirements">
<h2>Requirements<a class="headerlink" href="#requirements" title="Permalink to this headline"></a></h2>
<p>To run this program, you need the following:</p>
<ul class="simple">
<li>Python 3.6</li>
</ul>
</div>
<div class="section" id="installation">
<h2>Installation<a class="headerlink" href="#installation" title="Permalink to this headline"></a></h2>
<p>Clone this repository (containing the pathfinder module) to a folder of your preference. And run the setup:</p>
<p><code class="docutils literal"><span class="pre">`</span>
<span class="pre">python</span> <span class="pre">setup.py</span> <span class="pre">install</span>
<span class="pre">`</span></code></p>
</div>
<div class="section" id="authors">
<h2>Authors<a class="headerlink" href="#authors" title="Permalink to this headline"></a></h2>
<blockquote>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions docs/searchindex.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 0 additions & 11 deletions requirements.txt

This file was deleted.

38 changes: 38 additions & 0 deletions sample/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Sample

This is where the magic happens.

# Notable content:

## data

The assignment contains 6 net lists and two gate files. Netlist 1-3 are used on gatees1, 4-6 for gates2. The gates are loaded into a Numby board.
The netlist files are .txt and numbered from 1 to 6. 0 is a dummy list for debugging.
Gates are numbered from 1 to 2. Also, the gates files have a dummy named gates0. The gates are comma separated files.

## settings.py

Before running the program, it is good to take a look at the settings. We wil explain the basics.
PLOT_BEST, PLOT_SCORES and PLOT_RESULTS all take a Boolean value are quite self-explanatory, they will activate a plot of the result in a separate window.

SHOW_NETLIST and SHOW_EACH_RESULT also takes a Bool and will show in the terminal window. SHOW_EACH_PLOTSHOW_PROGRESS also a Bool and shows in a separate window.

PATH_ALGORITHM gives the user the choice to use DIJSKTRA’s algorithm. Although we will use DIJKSTRA while looping for a bather result. To make sure to find the best solutions start off with the A* algorithm. The setting takes a string.

MAX_NO_IMPROVE will kick in the moment a better solution must be found. We will loop and try to find an improvement. Only finding one is not a given thing, and to be sure to not run forever, giving a bound in with a integer is mandatory.

Heuristics for A* are ways to tweak the A*. COST_PASSING_GATE and STEP_COST_PASSING_GATE both take a integer.

To give the numpy board a 3d size use BOARD_WIDTH, BOARD_HEIGHT and BOARD_DEPTH with integer values.

The netlist and gate files are read from the data directory, in the current setup they start with “netlist” and then a number. To use your one net list make sure to do the same. To change any of the predefined files use a integer, for the net lists in range 1-6 and for the gate files in rage 1-2. Mind using the correct netlist with the correct gates file.

Finally SIGN_PATH_START and is a way of numbering the path in a Numpy board. It starts with 2 because gates are all numbered 1 (SIGN_GATE) and empty space has a 0. Changing this will probably break the program. But you can, by changing it into another integer.

## colors.py

Feel free to change it.

## helpers.py and classes.py

This files are documented [here](https://lennartjklein.github.io/pathfinder/).

0 comments on commit 989cea5

Please sign in to comment.