Code-Samurai-2024-Phase-2-Problem
Code-Samurai-2024-Phase-2-Problem
City Corporation
In the bustling city of Dhaka, the Dhaka North City Corporation (DNCC) has
been grappling with the ever-growing challenges of solid waste
management. The stakes are high in a city that is not just the heart of
Bangladesh's economic activities but also home to millions of dreams.
Amidst this, a visionary team at the DNCC has embarked on a mission to
redefine the city's approach to waste management. From the inefficiencies
in domestic waste collection to the pioneering initiatives with international
partners for waste-to-energy conversions, DNCC has taken multi-pronged
initiatives to improve the situation.
The Challenge:
Key Features:
User Roles: The system will have 4 major user roles as defined below:
Authentication Endpoints
● /auth/login - For user login.
● /auth/logout - For logging out users and terminating sessions.
● /auth/reset-password/initiate - For initiating the password reset
process.
● /auth/reset-password/confirm - For confirming password reset
with a token or code.
● /auth/change-password - For allowing users to change their
password after logging in.
Authentication Views
● Profile View - Any logged in user will be able to view this page.
Users will be able to see various details about the user profile.
Users will be able to update some of the fields that are
permitted to update to the specific user.
● Role View - User will be able to see the roles assigned to
him/her and the permissions that are granted via the assigned
roles. This should be a read-only view.
3. Billing View: Landfill Manager can generate a slip at the end of each
transport from STS to the landfill. The slip will contain the
timestamps, weight of waste, truck details, and a fuel allocation
stamp. The program must calculate the fuel allocation based on
automated handling of weight bill data for accountability. Consider
the following constraints and formulas:
○ A vehicle goes to the landfill from STS at most three times every
day.
○ If the vehicle takes less volume than capacity, he’ll get a lower
fuel bill.
○ We assume the cost scales linearly between the unloaded and
fully loaded states. This is a broad assumption and might not
reflect reality perfectly, but it gives a basis for estimation.
Calculate the cost per kilometer based on load: Interpolate the
fuel cost per kilometer based on the actual load relative to the
truck's capacity.
If C_unloaded is the cost per kilometer unloaded, and C_loaded
is the cost per kilometer fully loaded (at 5 tons), and the truck is
loaded with 3 tons, the cost per kilometer for the journey could
be approximated as:
4. Route Optimization View: The STS manager can view and select
optimized routes from his or her STS to the designated Landfill site.
Following parameters can be taken into consideration:
○ Efficient use of resources, such as trucks, based on fuel
consumption cost.
○ Traffic load and congestion during the transfer. The routes and
times should be selected that leads to a time with less traffic
congestion to ensure quickest waste delivery to landfill.
○ You can use Google Map or any other map API for this section.
5. Fleet Optimization View: The STS manager can generate the fleet of
trucks he or she needs to deploy for the day to ensure fastest waste
transfer from STS to landfill site. A number of trucks with varying load
capacity are attached to each landfill. The system should assist
finding the required number of trucks to transfer maximum possible
waste from the STS to the Landfill. The following parameters can be
taken into consideration:
○ Each truck can have at most 3 trips.
○ Trucks should be chosen to first ensure minimum fuel
consumption cost, second to ensure minimum number of
trucks.
○ The distance from STS to Landfill should be considered
constant as the paths are pre-selected.
In read world, this process can involve automatic input from IOT
sensors, and a wide range of manual input. But for this problem, we
are following a simpler approach. The data can be manually input by
the STS and Landfill managers periodically. Reports are to be
generated based on the available data at any given time.
Deliverable Points
Github Repo:
a. Each team needs to create a private github repo and push all
their changes there. Team leaders will be responsible to assign
the services to team members and he/she will help team
members to do requirements analysis and project planning.
b. The github repo name should be of the format:
cs24-p2-<team_name>
c. There needs to be a docker compose script which will ensure
both backend and frontend servers are accessible. Any
additional instruction should be clearly described step by step
in a README file. Make sure the steps work for a clean
installation.
d. All the changes should be pushed to “main” branch and the
main branch shouldn’t be modified after March 30, 2024
11:59PM.
e. Add a LICENSE file at the root of the repository.
f. Add the following github accounts as collaborators in the
private Github Repo for judgment:
● fahim-csedu
● Zobayer1
● SarwarMiralBJIT
● Habibalsaki
● mhktushar