/Resistor-approximate

Code to chose the least number of electronic components within a tolerance.

Primary LanguagePythonMIT LicenseMIT

This project's goal was to find the smallest list of resistors (capacitors too, the series/parallel is flipped) from a bigger list that add up to a target series/parallel combination within a specified tolerance range. The project was improved by Michael Jurasovic (https://jurasofish.github.io) by making use of an mip model to improve performace (https://jurasofish.github.io/picking-resistors-for-parallel-and-series-equivalence.html). Which will significantly improve the performance when dealing with large sets over my initial brute force approach.

I have permission from him to use his code to turn the project into a website, that might help students in circuit labs, helping them not waste time finding the right combination of resistors/capacitors to match hand calculated values.

Back end of the project is running. Algorithm works, you can run it in an IDE yourself and test. But final task is to turn it into a website, with approximate.py as the backend, writing the algorithm in JS might prove to be kind of annoying.