Skip to content

Submission-Neverstopdreaming #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions Neverstopdreaming/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Solar Energy Ecosystem Solutions Application - Krypton Solar

## Team Name

- Team Neverstopdreaming

## Problem Statement

Many individuals and businesses are interested in transitioning to solar energy but face challenges in determining the best solar panel installations, placements, and energy systems for their unique needs. Our application addresses this issue by leveraging data from solar APIs and employing machine learning to recommend optimal solar solutions.

## Team Leader Email

- Contact: [email protected]

## A Brief of the Prototype

### UML Diagrams

![UML Diagram](https://i.ibb.co/jMjdBd2/Untitled-Diagram-drawio.png)

### Prototype Frontend

![image](https://github.com/semi-infiknight/Code-with-Google-Maps/assets/97100765/151c1e4c-e7cc-47a7-aafe-650ff4b52859)

### Prototype Description

Our solar energy ecosystem solutions application offers a comprehensive set of features to assist users in seamlessly integrating solar energy into their homes and businesses. Here's an overview of the key components:

- **Data Collection and Integration:**

- Collects user location data, including latitude and longitude or the user's address.
- Integrates with Solar APIs to obtain real-time solar radiation, weather, and historical solar energy generation data.

- **Machine Learning Model:**

- Utilizes a machine learning model trained on historical solar data, including solar radiation patterns, weather conditions, and energy generation statistics from the user's region.

- **Data Preprocessing:**

- Cleans and formats data for machine learning analysis.
- Performs feature engineering to extract relevant information such as average daily solar radiation and historical energy generation trends.

- **Solar Panel Recommendation:**

- Recommends the type and capacity of solar panels suitable for the user's location.
- Considers factors like panel efficiency, tilt angles, and shading analysis.

- **Placement Recommendations:**

- Suggests the best locations and orientations for solar panel installation based on factors like roof layout, available space, and shading.

- **Budget Considerations:**

- Takes into account the user's budget constraints and recommends a solar energy system configuration that maximizes energy generation within the specified budget.

- **User Benefits:**
- Optimized Solar System: Users receive personalized recommendations for efficient solar energy systems.
- Ease of Decision-Making: Detailed information simplifies the decision-making process.
- Increased Energy Efficiency: Maximum sunlight capture leads to energy efficiency and cost savings.
- Environmental Impact: Minimized carbon footprint contributes to a greener environment.
- Financial Savings: Users can expect reduced electricity bills and a return on investment.

## Tech Stack

- **Frontend:** React
- **Backend:** Node.js
- **Machine Learning:** scikit-learn, TensorFlow
- **Data Integration:** Solar APIs
- **Database:** PostgreSQL
- **Visualization:** d3.js
- **CSS Framework:** Custom CSS

## Step-by-Step Code Execution Instructions

To test the prototype and understand its functionalities, follow these steps:

1. git clone
2. Add your `API Key` to `SolarService.js`(in services) and `index.html` (in public)
3. Navigate to the Neverstopdreaming folder and run `yarn install` and `yarn start` in the terminal
4. Then Run the `app.html` file in the browser to view the webapp.(all other files are interlinked)
5. The Email and Password for both the Ai Optimizer and Open Solar Modeller are `[email protected]` and `Qwerty@123` respectively

## Future Scope

Our application has significant future scalability and potential for expansion. Some potential enhancements include:

- Mobile application development for accessibility on various devices.
- Integration with additional renewable energy sources like wind power.
- Enhanced real-time energy consumption monitoring and forecasting.
- Further optimization for utility companies and solar farm operators with advanced solar asset management features.
- Collaboration with energy providers to facilitate the seamless transition to solar energy for users.

We aim to continually improve and scale our application to meet the evolving needs of users and the renewable energy industry.
122 changes: 122 additions & 0 deletions Neverstopdreaming/Solar_Placement.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "fg-6HTwP-88x"
},
"outputs": [],
"source": [
"pip install tensorflow\n",
"pip install numpy\n",
"pip install matplotlib"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import tensorflow as tf\n",
"from tensorflow.keras.layers import Input, Dense, Flatten, Reshape, Conv2D, Conv2DTranspose\n",
"from tensorflow.keras.models import Model\n",
"from tensorflow.keras.optimizers import Adam\n",
"from tensorflow.keras.losses import MeanSquaredError\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"\n",
"# Define the generator network\n",
"def build_generator(input_shape, output_shape):\n",
" input_layer = Input(shape=input_shape)\n",
" x = Dense(256, activation='relu')(input_layer)\n",
" x = Dense(512, activation='relu')(x)\n",
" x = Dense(1024, activation='relu')(x)\n",
" x = Dense(np.prod(output_shape), activation='sigmoid')(x)\n",
" output_layer = Reshape(output_shape)(x)\n",
" return Model(input_layer, output_layer)\n",
"\n",
"# Define the discriminator network\n",
"def build_discriminator(input_shape):\n",
" input_layer = Input(shape=input_shape)\n",
" x = Conv2D(64, (3, 3), padding='same', activation='relu')(input_layer)\n",
" x = Flatten()(x)\n",
" x = Dense(1, activation='sigmoid')(x)\n",
" return Model(input_layer, x)\n",
"\n",
"# Define the cGAN model\n",
"def build_cgan(generator, discriminator):\n",
" generator_input = Input(shape=(100,))\n",
" generated_image = generator(generator_input)\n",
" discriminator.trainable = False\n",
" validity = discriminator(generated_image)\n",
" return Model(generator_input, validity)\n",
"\n",
"# Load and preprocess your dataset\n",
"# Here, we'll assume you have a dataset of house images with and without solar panels.\n",
"\n",
"# Define image dimensions\n",
"image_shape = (64, 64, 3)\n",
"\n",
"# Build and compile the discriminator\n",
"discriminator = build_discriminator(image_shape)\n",
"discriminator.compile(loss='binary_crossentropy', optimizer=Adam(learning_rate=0.0002, beta_1=0.5), metrics=['accuracy'])\n",
"\n",
"# Build and compile the generator\n",
"generator = build_generator((100,), image_shape)\n",
"generator.compile(loss='binary_crossentropy', optimizer=Adam(learning_rate=0.0002, beta_1=0.5))\n",
"\n",
"# Build and compile the cGAN\n",
"discriminator.trainable = False\n",
"cgan = build_cgan(generator, discriminator)\n",
"cgan.compile(loss='binary_crossentropy', optimizer=Adam(learning_rate=0.0002, beta_1=0.5))\n",
"\n",
"# Training loop\n",
"batch_size = 64\n",
"epochs = 10000\n",
"\n",
"# Load and preprocess your dataset here\n",
"\n",
"for epoch in range(epochs):\n",
" # Train the discriminator\n",
" real_images = # Load a batch of real images without solar panels\n",
" real_labels = np.ones((batch_size, 1))\n",
" fake_images = generator.predict(np.random.normal(0, 1, (batch_size, 100)))\n",
" fake_labels = np.zeros((batch_size, 1))\n",
" \n",
" d_loss_real = discriminator.train_on_batch(real_images, real_labels)\n",
" d_loss_fake = discriminator.train_on_batch(fake_images, fake_labels)\n",
" d_loss = 0.5 * np.add(d_loss_real, d_loss_fake)\n",
" \n",
" # Train the generator\n",
" noise = np.random.normal(0, 1, (batch_size, 100))\n",
" valid_labels = np.ones((batch_size, 1))\n",
" g_loss = cgan.train_on_batch(noise, valid_labels)\n",
" \n",
" if epoch % 100 == 0:\n",
" print(f\"Epoch {epoch}, D Loss: {d_loss[0]}, G Loss: {g_loss}\")\n",
" \n",
" if epoch % 1000 == 0:\n",
" # Generate a sample image with solar panels\n",
" generated_image = generator.predict(np.random.normal(0, 1, (1, 100)))\n",
" plt.imshow(generated_image[0])\n",
" plt.show()\n"
]
}
],
"metadata": {
"colab": {
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
Loading