The following algorithm was commissioned by Electric Vine Industries, an innovative solar mini grid company.

All implementations of the tool that we create will be publicly runnable.

**Only the first implementation of the tool will be available as an open source notebook.**

Here are the input arguments to the algorithm:

- Table of customer locations
- Customer ID
- Demand in kWh/day
- Location as a point or polygon

- Table of obstacles
- Obstacle ID
- Is passable
- Location as a polygon

- Table of roads
- Road ID
- Location as a line

- Table of battery types
- Battery ID
- Range of kWh/day
- Cost

- Minimum solar panel pole count per kWh
- Maximum service drop line length
- Maximum service drop line count per pole
- Maximum distance between service distribution poles
- Maximum distance between wireless internet source and wireless internet pole
- Maximum distance between wireless internet poles
- Maximum distance between wireless internet node and solar panel pole
- Maximum customer count per street lamp
- Cost of pole A
- Cost of pole B
- Cost per meter of service distribution line

Here are the output properties of the algorithm:

- Table of poles
- Pole ID
- Pole type
- Customer count
- Has solar panel
- Has street lamp
- Has wireless internet
- Has corner angle
- Longitude
- Latitude

- Table of batteries
- Battery type
- Longitude
- Latitude

- Table of customers
- Customer ID
- Demand in kWh/day
- Pole ID
- Service drop line length
- Longitude
- Latitude

- Table of service distribution lines
- Pole ID 1
- Pole ID 2
- Service distribution line length

- Maximize the percentage of customers who are within a maximum distance to a service drop pole.
- Minimize the number of service drop poles.
- Minimize the distance from a customer to the nearest service drop pole.
- Limit the maximum distance from a customer to the nearest service drop pole.
- Limit the maximum number of customers per service drop pole.

- Maximize the percentage of service drop poles connected by distribution cable.
- Minimize the distribution cable length.
- Limit the maximum distance between poles.

- Maximize the percentage of distribution cable that follows a road

- Do not put the distribution cable across unpassable obstacles

- Minimize the number of batteries.
- Minimize the distance of a battery to each service drop pole.
- Limit the maximum distance of a battery to a service drop pole.

- Minimize the distance of a battery to each service drop pole as measured along a distribution line.
- Limit the maximum distance of a battery to a service drop pole as measured along a distribution line.
- Place each battery on a distribution line.

- Do not put a battery inside a passable obstacle or unpassable obstacle.

- Minimize the summed distance of a customer to a street lamp over all customers.
- Place a street lamp on selected poles to satisfy the above constraint.
- Limit the maximum distance of a street lamp to a customer.

- Estimate the demand in kWh/day for each battery.
- Estimate the number of solar panels needed to satisfy the daily demand for each battery.
- Place a solar panel on poles closest to a battery.

- Add a power meter to a pole for each service drop.
- Add a power meter to a pole for each street lamp pole.
- Place a wireless internet source at each battery.
- Minimize the number of wireless internet poles.
- Minimize the distance from a solar panel to a wireless internet source or wireless internet pole.

- Use pole type A when the angle of the incoming and outgoing distribution line is smaller than X degrees.
- Use pole type A for solar panel poles.
- Use pole type B otherwise.