Docsity

Minor project report, Thesis of Computer Applications

Toggle sidebar
bg1
BLOCKCHAIN BASED
POST-DISASTER RESOURCE MANAGEMENT
SYSTEM-A JAVA APPLICATION
PROJECT REPORT
Submitted by
AALEYA BHATTACHARYA (30317010001)
SAYAKI NAG (30317010044)
SUSMITA SAHA (30317010050)
in partial fulfillment for 3rd Semester Minor Project
of
MASTER OF COMPUTER APPLICATION
DEPARTMENT OF COMPUTER APPLICATIONS
HERITAGE INSTITUTE OF TECHNOLOGY, KOLKATA
MAULANA ABUL KALAM AZAD UNIVERSITY OF TECHNOLOGY,
WEST BENGAL
DECEMBER, 2022
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e

Partial preview of the text

Download Minor project report and more Thesis Computer Applications in PDF only on Docsity!

BLOCKCHAIN BASED

POST-DISASTER RESOURCE MANAGEMENT

SYSTEM-A JAVA APPLICATION

PROJECT REPORT

Submitted by

AALEYA BHATTACHARYA (30317010001)

SAYAKI NAG (30317010044)

SUSMITA SAHA (30317010050)

in partial fulfillment for 3rd^ Semester Minor Project of

MASTER OF COMPUTER APPLICATION

DEPARTMENT OF COMPUTER APPLICATIONS

HERITAGE INSTITUTE OF TECHNOLOGY, KOLKATA

MAULANA ABUL KALAM AZAD UNIVERSITY OF TECHNOLOGY,

WEST BENGAL

DECEMBER, 2022

DEPARTMENT OF COMPUTER APPLICATIONS

HERITAGE INSTITUTE OF TECHNOLOGY, KOLKATA

BONAFIDE CERTIFICATE

Certified that this project report โ€œBlockchain Based Post-Disaster Resource

Management System-A Java Applicationโ€ is the bonafide work of Aaleya

Bhattacharya, Sayaki Nag, Susmita Saha, students of MCA 3rd^ Semester of

Heritage Institute of Technology, Kolkata, who carried out the project work

under the supervision of Prof. (Dr.) Souvik Basu.

Prof. (Dr.) Souvik Basu Prof. (Dr.) Souvik Basu Head, Mentor Department of Computer Applications Department of Computer Applications Heritage Institute of Technology, Kolkata Heritage Institute of Technology, Kolkata

EXAMINER

Aaleya Bhattacharya

Sayaki Nag

ACKNOWLEDGEMENT

We are highly indebted to our project guide Prof. ( Dr.) Souvik Basu for guiding

us and providing constant supervision and necessary information regarding the

project & also for support in completing the project. We are also thankful to the

Department of Computer Applications for providing us easy access to the

project laboratory and other facilities.

Susmita Saha

Abstract

A disaster is an event of nature or man-made that leads to sudden disruption of normal life of a society, causing damage to life and property to such an extent that normal social and economic values available are inadequate to restore normalcy after a disaster. The very first step to restore normalcy after a disaster is to provide the very basic amenities needed for survival. The recovery process is multifaceted and complex. A systematic approach would reduce human hardship; and pave way for a faster recovery.. The recovery phase is an opportune time to analyze the needs, select recovery strategies that are compatible with revised needs, and incorporate mitigation measures into both long-range planning and immediate decision-making. But most of the time this recovery process is witness to corruption and illegal uncalled for transactions that go unnoticed thereby making the recovery process a slow and tedious one. Given such a scenario, it is imperative that proper post disaster resource allocations are put in place. Now what is blockchain? A blockchain is a distributed, digital ledger. The ledger records transactions in a series of blocks. It exists in multiple copies spread over multiple computers, typically known as nodes. Because it is decentralized, the blockchain ledger does not depend on any single entity (like a bank) for safekeeping. So what exactly has blockchain got to do with post disaster resource management? Blockchain can be applied to many challenges of the supply chain cycle such as complicated record keeping and tracking of products as a less corruptible and better-automated alternative to centralized databases. The aim of this project is to build a more conscious and transparent approach to ensure that the people in greatest need are placed first in line for assistance. The primary objectives of the system are:

๏‚ท Determining the exact demand for different emergency resources at every shelter. ๏‚ท Enumerate the exact utility of different emergency resources at every shelter. ๏‚ท Prevent improper resources allocation and black marketing.

1

Introduction

Post disaster need assessment deals with the accurate assessment of the need (i.e., demand and utility) for emergency resource at the shelters. While demand represents the quantity of the resource required, utility depicts the urgency of that requirement. Due to lack ofor inaccurate need assessments immediately after a disaster, relief chains are generally set up based on rough estimates by logisticians regarding what people would normally need. The effectiveness of this relief chain depends on the competencies and experience of the logistician in charge, often leading to ad-hoc allocation of typically scarce emergency resources. Thus, forecasting the exact demand and enumerating the correct utility of emergency resources is inevitable. But here a problem is generated for resource allocation.

Overview of the problem

Resource Allocation problem involves the distribution of resources among all shelters after a disaster. In real life scenario we see that immediately after a disaster many resources are sent from various relief agencies. These resources are shared by suppliers in easily accessible areas. But sometimes, the following scenario might happen:

โฎš Supplierssent resources to relief camps where they are not required (resource wastage). โฎš Miscommunication leads to unfulfilled demands ( For example, suppose one day milk is a highly demanded resource for a particular shelter, but thesuppliers do not have any information regarding this). โฎš Dishonest volunteers (personnel in charge of a particular shelter) may sell these resources for personal profit (Black-marketing).

The above situations occur because suppliers do not have any information about the actual need of the resources as well as the availability of the resources of a particular shelter. As a result, mismatched resource allocation will take place.

2

Objectives of the System

The purpose of the system is to develop a transparent, globally accessible and immutablerecords of resource availability and need. The primary objective of the proposed system is to provide decision support to suppliers for resource allocation in a proper way. The main objectives may be summed up as follows:

๏‚ท Determining the exact demand for different emergency resources at every shelter. ๏‚ท Enumerate the exact utility of different emergency resources at every shelter. ๏‚ท Prevent improper resources allocation and black marketing.

Design Goals of the System

๏‚ท Demand Forecasting with Principal Component Regression Model ๏‚ท Utility Enumeration through Utility Function ๏‚ท Optimal Resource Allocation by Utility Based Integer Programming Model ๏‚ท Blockchain based immutable and globally accessible record generation for resource requirement vis-ร -vis availability

Users of the System

  • Volunteers - Personnel in charge of a particular shelter and are affiliated to a particular control station.
  • Command and control station โ€“ It centralizes the monitoring, control , and command of the system's overall operations..
  • Miners โ€“ The people who verify and store the record of resource availability and need.

Software requirement Specification

A Software Requirements Specification (SRS) is a comprehensive description of the environment for a system under development. The SRS fully describes what the system will do and how it is expected to perform.

4

  • Back-end: MySQL
  • Documentation: Microsoft office Word.

Demand Forecast Using Principal Component Regression Model

Forecasting the exact demand for emergency resources in a relief shelter becomes tricky because situational parameters influencing these demands keep on changing with the changing dynamics of the disaster. This calls for deriving a mathematical relationship between the demand for emergency resources and these influencing situational parameters that would forecast the changing demand with the changing nature of the parameters. Here, a PCR model is formulated for forecasting post disaster emergency resource demands in a shelter, based on influencing situational parameters, which are often inter- correlated. The process of deriving the model comprises three distinct steps โ€“ (i) identification of influencing parameters through literature survey, (ii) selection of uncorrelated influencing parameters by means of principal component analysis, and (iii) formulation of the forecasting model using MLR on principal components. The derived model can be used to periodically forecast the changing demand for different emergency resources at different shelters reflecting the changes in the influencing parameters therein.

Identification of Influencing Parameters

Identification of influencing situational parameters is explained through an example of food resource requirement. We conduct extensive literature survey to prepare an accurate and comprehensive list of parameters that influence the demand for food resource in a shelter. Knowledge gained from the literature survey is ratified with the responses from the field experts to extract the best out of theory and practice. Based on literature survey and inputs from field experts, the 10 most important parameters (Table 3.2) that influence the demand for emergency food resource in a shelter are indentified. Similar literature survey on other types of emergency resources leads to the identification of influencing parameters for the demand of such resources.

5

Parameter Id Description ๐‘ฐ๐‘บ๐‘ท๐Ÿ Average number of households residing in the shelter ๐‘ฐ๐‘บ๐‘ท๐Ÿ Average household size ๐‘ฐ๐‘บ๐‘ท๐Ÿ‘ Percentage of adult males ๐‘ฐ๐‘บ๐‘ท๐Ÿ’ Percentage of^ adult females ๐‘ฐ๐‘บ๐‘ท๐Ÿ“ Percentage of infants ๐‘ฐ๐‘บ๐‘ท๐Ÿ” Percentage of households below national poverty line ๐‘ฐ๐‘บ๐‘ท๐Ÿ• Percentage of families who can buy food ๐‘ฐ๐‘บ๐‘ท๐Ÿ– Average no. of local shops functioning ๐‘ฐ๐‘บ๐‘ท๐Ÿ— Percentage increase in food price ๐‘ฐ๐‘บ๐‘ท๐Ÿ๐ŸŽ Percentage of total demand that can be met from local shops

Situational parameters influencing demand for food resources

Selection of Uncorrelated Influencing Parameters

Since many of these 10 influencing parameters, shown in Table 3.2, may exhibit multicollinearity a thorough Principal Component Analysis (PCA) is required for finding the uncorrelated parameters which account for the maximum variance in the demand data. The objectives of PCA are โ€“ (i) removing correlation among the independent variables and (ii) reducing the number of parameters to as minimum as possible. The set of influencing situational parameters that control the demand (independent variables) for an emergency resource in a shelter, few of which may be

correlated, is represented as ๐ผ๐‘†๐‘ƒ = (๐ผ๐‘†๐‘ƒ 1 , ๐ผ๐‘†๐‘ƒ 2 , โ€ฆ , ๐ผ๐‘†๐‘ƒ๐‘ ) .PCA helps in removing multicollinearity and reducing the dimensionality of the available data set. Through appropriate selection of the uncorrelated influencing parameters to be used for regression, the subsequent PCR technique leads to the efficient prediction of emergency resource demands.

PC 1 and PC (^2) account for maximum variance

PC 1 = e 11 * ISP 1 + e 14 * ISP 4 + e 17 * ISP 7 PC 2 = e 22 * ISP 2 + e 25 * ISP 5 All other eijโ€™s ~ 0

Original Influencing Parameters

Uncorrelated Influencing Parameters

PC 1 PC (^2) PC 3 โ€ฆ PCp

ISP 1 ISP 2 ISP 4 ISP 5 ISP 7

ISP 1 ISP 2 ISP 3 โ€ฆ ISPp

7

Utility Enumeration through Utility Function

Enumerating the correct utility of such emergency resources is challenging in a dynamic post disaster scenario, where demands are constantly evolving and supplies trickle in at an uncertain rate. Therefore, a utility function that dynamically and quantitatively enumerates the utility of each emergency resource needs to be derived and used to measure the benefit of usage of such resources. This section derives a utility function that dynamically and quantitatively enumerates the correct utility of each emergency resource at different shelters. In line with the notion of utility, defined in classical Economics, we identify utility of an emergency resource as its importance to meet requirements in a shelter at a point of time. Utility is different from demand in the sense that, demand for a resource is the quantity needed whereas utility of the resource is the exigency with which it is needed. For example, a shelter having demand for tents, that has not been catered at all for the past 36 hours has definitely higher utility of tents than a shelter whose demand for the same resource has been periodically met. Hence, continuous and chronological enumeration of utilities of different resources is crucial to portray the changing needs in a shelter.

Deriving the Utility Function Utility of a commodity is expressed as a function of the number of units of that commodity being consumed. It is represented as a mathematical expression that enumerates the utility gained by consuming different units of the commodity. Therefore, we can define utility ๐‘ข as a function of consumption ๐‘ฅ and represent the utility function as ๐‘ข = ๐‘“(๐‘ฅ)

The table underneath lists the cumulative amount of utility generated from consuming clams over a given time period [116]. We observe from the table that utility increases till the 6th^ unit of consumption and decreases beyond this point. The corresponding utility curve, shown in Figure 3.8, is thus concave in nature. To derive a general mathematical expression for utility functions, usual curve fitting technique is employed on sample conventional utility data sets derived

8

from [116 โ€“ 123] (e.g. no. of movies/ week, no. of roller coaster rides/ day, transmission rate / hour, no. of chocolate bars eaten/ hour, etc.). Curve fitting reaches the conjecture that the following model fits best as a utility function

๐‘ข = ๐‘Ž๐‘ฅ^3 + ๐‘๐‘ฅ^2 + ๐‘๐‘ฅ + ๐‘‘(3) The fitted model gives predicted utility values sufficiently close to the actual values. Three goodness of fit statistics, namely, R-square, Adjusted R-square and RMSE are used to evaluate the fitness of the model. Significance of the above mentioned statistics are stated below: R-Square : It is the square of the correlation between actual values and predicted values. A value closer to1indicates a better fit. Adjusted R-Square : It is the R-square statistic adjusted on the basis of residual degrees of freedom. This is the best indicator of the fit. A value closer to 1 indicates a better fit. RMSE (Root Mean Squared Error) : It is the estimate of the standard deviation of the random component in the data. A value closer to 0 indicates a better fit.

The above utility function (3) is applied on several standard utility data sets. This is quite obvious owing to the similar nature of all utility data sets. Plotting the utility values available from other utility data sets against the corresponding utility curves drawn on these data sets using (3) shows sufficiently small deviations. Thus, equation (3) can be considered as a general utility function expressing utility as a function of consumption. In the above discussion, we have considered utility of an emergency resource in a shelter as a function of total consumption (or, allocation) of that resource in the shelter, i.e., ๐‘ข๐‘Ÿ๐‘  (utility of the rth^ resource at sth^ shelter) is a function of ๐‘ฅ๐‘Ÿ๐‘  (total allocated quantity of the rth^ resource at sth^ shelter). However, in post disaster relief operations, resources are allocated to shelters at periodic intervals (may be non-uniform). This implies that allocation of a resource in a shelter varies with time, i.e., ๐‘ฅ๐‘Ÿ๐‘  is a function of time ๐‘ก. Therefore, it is evident that ๐‘ข๐‘Ÿ๐‘  depends on ๐‘ฅ๐‘Ÿ๐‘  which in turn depends on allocation time t , because ๐‘ฅ๐‘Ÿ๐‘  can vary only if ๐‘ก varies. Hence

๐‘ข = ๐‘“ ๐‘ฅ = ๐‘“(๐‘” ๐‘ก )

10

to serve the purpose. Here deployment time refers to the shipping time of resources from warehouses to shelters. In order to serve the above purposes, an optimal resource allocation is formulated using the demands and utilities. The formulated model has two goals โ€“ (a) minimizing overall emergency resource deficit and (b) minimizing total resource deployment time to achieve fast and effective disaster relief.

Parameters and Variables The parameters and variables used in the proposed model are listed below.

- Parameters

๐‘† :^ number of shelters (shelters are considered as sinks)

๐‘… :^ number of resource types

๐‘† :^ number of resource warehouses (warehouses are considered as sources) ๐‘Ž๐‘Ÿ๐‘ค : available number of units of resource r at warehouse w ; represents an element of the Availability Matrix ๐‘Ž๐‘Ÿ : total available number of units of resource type ๐‘Ÿ(๐‘Ž๐‘Ÿ = ๐‘Š ๐‘ค = 1 ๐‘Ž๐‘Ÿ๐‘ค )

๐‘‘๐‘Ÿ๐‘  : demand for resource ๐‘Ÿat shelter s ; represents an element of the Global Demand Matrix ๐‘ข๐‘Ÿ๐‘  :^ utility of resource^ ๐‘Ÿat shelter^ s ; represents an element of the Global Utility Matrix ๐‘ก๐‘Ÿ๐‘ ๐‘ค :^ time required to deploy each unit of resource ๐‘Ÿto shelter ๐‘  fromwarehouse w ; represents an element of the Deployment Time Matrix

11

๐‘๐‘Ÿ : capacity of each consignment of resource ๐‘Ÿ, i.e., the maximum number of units of ๐‘Ÿ that can be shipped in a consignment

- Variables

๐‘ฅ๐‘Ÿ๐‘  :^ number of units of resource ๐‘Ÿ allocated to shelter ๐‘ ; represents an element of the Resource Allocation Matrix ๐‘ฆ๐‘Ÿ๐‘ ๐‘ค : number of units of resource ๐‘Ÿ allocated to shelter ๐‘  from warehous

๐‘ค : represents an element of the Resource Deployment Matrix

5.1.1 Minimizing Overall Resource Deficit

Deficit of the ๐‘Ÿ๐‘ก๐‘•^ resource at the ๐‘ ๐‘ก๐‘•^ shelter can be defined as the ratio of unfulfilled demand and actual demand, i.e., ๐‘‘๐‘Ÿ๐‘  โˆ’ ๐‘ฅ๐‘Ÿ๐‘  ๐‘‘๐‘Ÿ๐‘ 

To make the resource allocation strategy utility aware, resource deficit is redefined as a weighted ratio of unfulfilled demand and the actual demand, with utility as the weight, i.e.,

where a higher value of ๐‘ข๐‘Ÿ๐‘ magnifies the deficit and vice versa. The overall resource deficit is defined as below:

13

INTRODUCTION TO BLOCKCHAIN TECHNOLOGY

What is a blockchain?

A blockchain is defined as a peer to peer distributed ledger forged by consensus, combined with a system for smart contracts.

- Hyperledger, Linux Foundation

Now, that definition might contain a lot of uncommon terms so let us start by breaking it into parts and understanding each term.

Peer to Peer Network โ€“

You must be aware of BitTorrent and Tor. Both of these are built on peer to peer network design. A peer to peer network is a distributed application architecture that consists of computing devices connected to each other, without a central server. In centralised networks, the security is dependent on a single entity. If that central server is attacked, the security of the overall network is compromised. But a peer to peer network is more secure as there is no single point of failure.

Distributed Ledger โ€“

A ledger is a system containing all the records of a input and output of a process. A distributed ledger is a data structure which is spread across different computing devices. DLT (Distributed Ledger Technology) is the technology that distribute records across all the users. DLT consists of 3 components โ€“ Data Model (current state of ledger), Language of transactions (which changes ledger state) and Protocol (used to build consensus). Blockchain is a type of DLT. This way the data is shared among all its users increasing transparency and avoiding corruption.

14

Consensus โ€“

Consensus is a process of ensuring that all the different users in a blockchain come to an agreement regarding the current state of blockchain. There are several consensus mechanisms that are used by different blockchains to achieve consensus. For example, Bitcoin uses Proof-of-Work while Ethereum is moving from Proof-of-Work to Proof-of-Stake algorithm.

Smart Contracts โ€“ Forget smart contract and blockchain for a moment. Think about contracts in general. These contain some conditions which need to be fulfilled in order for some transaction (eg; money exchange) to occur. For example, if you are selling me a laptop, a contract will contain that I will be responsible to pay you only if the laptop works properly. Similarly, smart contracts are pre-requisite conditions which need to be fulfilled for transactions to happen in a blockchain.

Disadvantages of current transaction system:

The main disadvantage is the Double-Spending Problem. The way the Internet is designed today, one can spend the same value โ€“ issued as a digital asset โ€“ multiple times, because digital information can be copied, and copies of that same can be sent from one computer to multiple other computers at the same time. Physical values, on the other hand, donโ€™t have that problem. They cannot be easily replicated, as the parties involved in a transaction can immediately verify the physical token โ€“ a bill, a coin, or another object of value, like a commodity or a collectable.

Other disadvantages include :

๏‚ท Cash can only be used in low amount transaction locally. ๏‚ท Huge waiting time in the processing of transactions.