# Enhanced Simulated Ant Colony Optimization Computer Science Essay

**Published:** **Last Edited:**

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

## Abstract

In common practice, several estimation methods for software reliability models often depend on assumptions such as statistical distributions which are often unreliable in most of the cases. In this Paper we proposed a simple framework for Software Reliability Models in which we indicated a Parameter Estimation Method by using conventional Ant Colony Optimization and the Enhanced Simulated Ant Colony Optimization with real failure data and shown numerically with proposed parameter estimation method to find the Estimation Accuracy for the Software Reliability Models.

## Key Words

Software Reliability, SRM, SRGM, Parameter Estimation Methods, ACO, Enhanced Simulated ACO

## Introduction

In olden days, efforts of scientists and engineers were directed to hardware reliability for mechanical and electronic systems. Subsequently, it has escalated to software applications growth. There is a wide scope for creating solution for the complex mechanisms at a reasonable cost. Nowadays, software systems are used in day to day life, in industry, banks, large systems like power distribution, traffic, water supply, etc. Further more, Computers are used in critical applications such as in hospitals, air traffic, flight simulation and chemical reactors. Failures lead to destruction and loss of life. There is a necessity of reliable software system. But development and maintenance the systems with reliability is not an easy task. Functioning of the software is very critical from the aspect of reliability safety of human lives and security issues. Hence, Identification of specifications, Designing, verification and testing of the software are the most important issues for the developer as well as end users.

This paper comprises of Section I which enumerates the Software Reliability Models. Section II, elaborates the traditional Parameter Estimation Methods and Section III, discusses new ionic method of Ant Colony Optimization and Enhanced Simulated Ant Colony Optimization Method.

## Software Reliability

Software Reliability is the probability of failure-free operation for a given period of time in a specified condition.

In other words, optimize the performance of software system as specified by the user according to their requirements. Reliability is a measure of how the system will cooperate with the user without interrupting system services for a longer time. It requires operational profile for the expected pattern of software usage. It must work for the functional requirements at any moment of time, however, non functional aspects may be considered as waved off.

http://www.ece.cmu.edu/%7Ekoopman/des_s99/sw_reliability/Image2.gif

## 1.1 Software Reliability Models

Software reliability models are statistical models which can be used to make predictions about a software system's failure rate, given the failure history of the system. The models make assumptions about the fault discovery and removal process. These assumptions determine the form of the model and the meaning of the model's parameters.

Software reliability models are an important tool in quality management and release planning. There is a large number of different models that often exhibit strengths in different areas. For all the Models there are some assumptions we can state based on the software failure process. Before applying a model, we should take care in determining whether the model, including its underlying assumptions, is appropriate for the situation. Listed below are some of the assumptions for software reliability models [2].

1. Program failures occur independently

2. During test, the software is operated in a similar manner as the anticipated operational usage.

3. The set of inputs per test run is randomly selected

4. All failures are observed

5. A Detected Fault is Immediately Corrected.

6. The Total Number of Faults in the Program is Finite

7. No Fault Occurs at the start of the test

8. No New Faults are Introduced during the fault removal Process

9. Failure Rate Decreased with test time

10. Failure Rate is Proportional to the Number of Remaining Faults

11. Reliability is a Function of the number of remaining faults.

12. Test Effort is used as a basis for failure rate

13. Testing is Representative of the Operational Usage.

## 1.2 Basic Reliability Models

The basic and logarithmic models are two fundamental reliability models widely used. In these models, failure intensity Î» as a measure of reliability is expressed as a function of execution time Ï„, i.e., Î»(Ï„). Intuition behind the model: As the cumulative failure count increases, the failure intensity decreases. In a Basic Model, there is a decrease in failure intensity after a failure has occurred and fixing the corresponding failure becomes constant. In Logarithmic model, the decrease in failure intensity after a failure and fixing the corresponding failure is smaller than the previous decrease.

## Modeling Parameters

Î¼ is the mean number of failures observed

Î» is the mean failure intensity

Î»0 is the initial failure intensity observed at the beginning of system-level testing (ST)

Î½0 is the total number of system failures expected to be observed over infinite time

Ï´: decrease in failure intensity in the logarithmic model

Figure 1 Two Basic Software Reliability Models

## 1.3 Software Reliability Model Framework

Software Reliability Models can be classified in two ways, one is based on Failure History and the other one is Data Requirements. Based on Failure History, we have TBF, FC, FS and IDB Models. Based on Data Requirements we have Empirical and Analytical Models [3].

## LEVEL 0

## SOFTWARE RELIABILITY MODELS

## LEVEL 1

## BASED ON FAILURE HISTORY

## BASED ON DATA REQUIREMENTS

## LEVEL 2

## TBF

## FC

## FS

## IDB

## EMPIRICAL MODELS

## ANALYTICAL MODELS

## ANALYTICAL MODELS

## LEVEL 3

## STATIC MODELS

## DYNAMIC MODELS

## LEVEL 4

## ERROR DOMAIN

## MODELS

## DATA DOMAIN MODELS

## DATA DOMAIN MODELS

## LEVEL 5

## DISCRETE TIME MODELS

## CONTINUOUS TIME MODELS

## LEVEL 6

## RANDOM TIME MODELS

## FIXED TIME MODELS

## IDT MODELS

## IIE MODELS

Figure 2 : Framework of Software Reliability Models

TBF â†’ Time Between Failure Model, In this model, the assumption is that the time between (i-1)th and ith failures is a random variable. FCâ†’ Fault Count Model, here, the random variable of interest is the number of faults occurring during specified time intervals. FS â†’Fault Seeding Model, In this model, known number of faults are seeded then the program is tested and observed number of seeded and indigenous faults are counted. IDB â†’ Input Domain Based Model, To cover the operational profile of the input, a set of test cases is generated from the input. IDT â†’ Independently Distributed inter-failure model, the inter failure times are assumed to have identical and independent probabilistic behavior for each model. IIE â†’Identical Error Behavior Model

## Parameter Estimation Methods

The most generic methods of Parameter Estimation is Maximum Likelihood and Least Squares Methods. Similarly many other methods are also available to resolve the problem for better estimation accuracy.

## 2.1 Maximum Likelihood Method

This is one of the most commonly used method to estimate the parameters. In this method, parameters can be estimated by solving the Maximum Likelihood equations. Unfortunately,these equations do not give a solution always. We should derive the conditions for each model which if satisfied, assure a unique solution of the Maximum Likelihood equations. When the conditions for the software failure data are not satisfied, or when the Maximum Likelihood Method seems unstable, we would be able to estimate the known model parameters. Recursive Estimation Algorithm can be used for unknown model parameters, we can have a recursive application of the Maximum Likelihood Method [4].

2.2 Least Square Method: Least Square Estimation methods are available to evaluate the set of parameters with the highest probability of being correct for a given set of experimental data. In this method, least squares are taken to estimate parameters by minimizing the squared discrepancies between observed data and their expected values. Compared to ordinary sampling method, the first failure-censored sampling plan has an advantage of saving both test-time and resources [5].

## Ant Colony Optimization

Ant Colony Optimization is a probabilistic technique for solving computational problems which can be reduced for finding good paths through graphs. This method will work under the principle of Least Squares. It is a member of ant colony algorithms family, in swam intelligence methods. It has some meta heuristic optimizations. First, the algorithm was used to search for an optimal path in a graph. Depending on the behavior of ants seeking a path between their colony and a source of food. The original idea has been diversified to solve a wider class of numerical problems, more number of problems have been emerged based on various aspects of the behavior of ants [6].

## 3.1 Origin of ACO

Initially, ants wander randomly, and upon finding food return to their colony while laying down pheromone trails. If other ants find the same path, they are likely not to keep travelling at random, but to instead follow the trails, returning to it, if they eventually find food. Over time, however, the pheromone trail starts to evaporate, thus reducing its attractive strength. The more time it takes for an ant to travel down the path and back again, the more time the pheromones have to evaporate. For a short path, ants get marched over more frequently, since the pheromone density becomes higher on shorter paths than longer ones. Pheromone evaporation also has the advantage of avoiding the convergence to a locally optimal solution. If there were no evaporation at all, the paths chosen by the first ants would tend to be excessively attractive to the following ones. In that case, the exploration of the solution space would be constrained. So, when the ants finds a good (food) path from the colony to a food source, other ants are more likely to follow a single path. The idea of the ACO algorithm is to mimic this behavior with simulated ants walking around the graph by representing the problem to solve [10].

http://upload.wikimedia.org/wikipedia/commons/thumb/a/af/Aco_branches.svg/400px-Aco_branches.svg.png

Figure 3 Ant Colony

## 3.2 Parameter Estimation method based on Simulated Ant Colony Optimization

Changes should be made to the ant colony algorithm which has been used originally in search of

discrete best networks, to suit to the parameter estimation problem. We have taken a Solution Space from the failure data which is given in the Musa data Set from the DACS Web Site. In this section, we enhanced the existing Ant Colony Optimization algorithm based on the characteristics of SRGMs [7]. The algorithm is explained as follows [8]:

Step -1 : For solving the Parameter Estimation issues, it is converted into Optimization Problem with the help of Least Square's Principal. The resulting function is as mentioned below.

Min J = âˆš 2

m(t) = actual number of failure

=Predicted number of failure by the Software Reliability Model

The Euclidean distance between the actual failure number and the predicted failure number is represented as J in the Function. J (Fitness)

The Time t gives the failure occurrences; the total time, the software runs is represented by T. The total discovered failure number in time t, is m(t), the predicted failure number by SRGM are expected failure number by time is Âµ(t).

Step 2: The initial position of each ant is set and solution space has been divided and the other parameters a and b have values ranging from 0<a<a max, 0<b<b max respectively. This value domain is divided into two n1& n2. Let the number of ants living in these areas is taken as m randomly.

Step 3: As long as searched time is less than N max each ant automatically can search for best path.

The probability of choosing local searching or global searching by the ant k is Pk

Pk = r k / Î¹ k

Where r k = Î¹ k - Î¹ best

Î¹ k current path of ant k

If Pk < P0 the an chooses local search. Else global search is chosen. New fitness K is calculated and compared with current fitness J, if it is better then the ant's position is updated else not. To update Î¹ k = (1 - Ï ) Î¹ k + J k

Ï - rate of volatilization rate of pheromone. The following algorithm gives the pseudo code of the algorithm.

## Enhanced Simulated Ant Colony Optimization pseudo code is given below:

Begin

Set the Initial Value of Î± - the number of equal interval space to split

Set the initial value of Î² - the number of solution space to discard at each stage

Divide the solution space into Î± equal interval. [ Nsum = Solution Space / Î± ]

Set count = 1

While Nsum > 1

## {

If Nsum = 1

## {

Nsum = (count / 2) + 1

Count = 0

## }

Endif

Choose Ant search in each equal interval space

Calculate fitness Jk as (1);

Sort the solution space based on Jk

Discard the the Î² higher solution space interval

Nsum = Nsum - 1;

Count = Count + 1;

## }

End While

Output the position of the Ant in the final solution space which has the best fit result.

End

## 3.3 Comparative Performance of ACO and Enhanced Simulated ACO

To compare the Estimation Accuracy of Enhanced simulated ACO Parameter Estimation Method, we have taken six classic Software Reliability Models. G-O Model, Delay S-Shaped Model, Weibull Model, M-O Model, Jelinski-Moranda Model and Dunane Models are used for experimental evaluation [2].

## Type

## SRM

## Âµ(t)

Finite Failure Poisson

G-O Model

a(1-e-bt)

Finite Failure Poisson

Delay S Shaped Model

a(1-(1+bt)e-bt

Finite Failure Binomial

Weibull Model

a(1-(e-Î²t) Î±)

Infinite Failure Poisson

M-O Model

a ln (l+bt)

Binomial

JM Model

N(1-exp(-Ï†t)

Infinite Failure

Dunane Model

Î±tÎ²

Table 1. Model Form of Software Reliability Growth Models

Failure data is taken from the DACS Website to estimate the accuracy of Software Reliability Models. Compared to existing Ant Colony Optimization, the Enhanced Simulated ACO has improved the estimation accuracy by more than 10%. According to earlier studies, estimation accuracy should be a lower value which is given by enhanced simulated ACO method[8].

Figure 4 Estimation Accuracy by ACO and Modified ACO for Project 1

Figure 5 Estimation Accuracy by ACO and Modified ACO for Project 2

Figure 6 Estimation Accuracy by ACO and Modified ACO for Project 40

Figure 7 Estimation Accuracy by ACO and Modified ACO for Project 27

Figure 8 Estimation Accuracy by ACO and Modified ACO for Project 14C

Figure 9 Estimation Accuracy by ACO and Modified ACO for Project SS1

## 3.5 Observations

The Performance of the algorithm is dependent on the size of the solution space and the parameter Î±. If the solution space involves into two variables whose values 0 < a < Na, 0 < b < Nb,

The solution space can be written as N = Na * Nb.

Time Complexity can be written as follows:

## T = N / Î± + N / Î± + N / Î± + â€¦â€¦..

## T = N ( 1/ Î± ) = T = N / Î±

Space Complexity can be written as follows:

## O (m + (m - Î± ) )

## m = number of ants

## Î± = number of intervals

## Advantageous of Proposed Method

The procedure can be used for any kind of growth model. The proposed method is comparatively giving better Estimation Accuracy than the existing Ant Colony Optimization.

## Conclusion

An important aspect in reliability engineering is estimating parameters of Software Reliability Growth Model. Many of these parameters are difficult to estimate because of their nonlinear nature. In this paper we have proposed a Framework for Software Reliability Models and overviewed some of the traditional Parameter Estimation Methods especially Ant Colony Optimization and the Enhanced Simulated Ant Colony Optimization Methods. Based on the results, we found that the proposed Simulated Ant Colony Optimization Method is giving 15% better estimation accuracy.