






































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







































in partial fulfillment for 3rd^ Semester Minor Project of
MASTER OF COMPUTER APPLICATION
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
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
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
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.