Mathematical Problems in Engineering

Volume 2015, Article ID 783149, 21 pages

http://dx.doi.org/10.1155/2015/783149

## Dynamic Pricing of a Web Service in an Advance Selling Environment

^{1}Department of Industrial Engineering, Iran University of Science and Technology, Narmak, Tehran 1684613114, Iran^{2}Karaj Islmic Azad University, Narmak, Tehran 1684613114, Iran

Received 5 April 2014; Revised 8 August 2014; Accepted 18 August 2014

Academic Editor: Pandian Vasant

Copyright © 2015 Ehram Safari et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

Consider a web service with different quality of service levels where users may purchase their required web service through a reservation system. The service provider adjusts prices of web service classes over a prespecified time horizon to manage demand and maximize profit. Users may cancel their services as long as they pay a penalty. One of the important challenges for service providers is capacity limitation of the resources employed in offering the web service. Thus, taking this important proposition into account makes pricing strategies considered by the provider has more credit. Another important factor in determining pricing strategies discussed in the present paper is the market influence which can increase or decrease the price that the provider offers. This paper develops a continuous time optimal control model for identifying pricing strategies for the web service classes. We study the optimality condition of the considered model based on maximum principal and propose an algorithm to obtain the optimal pricing policy. Moreover, we perform numerical analyses to evaluate the effect of some parameters on control and state variables and objective function. In addition, we compare the proposed algorithm with genetic algorithm (GA) and simulated annealing (SA) available in Matlab.

#### 1. Introduction

In recent years, web services have achieved popularity as an effective and efficient technology for developing and incorporating web applications. Web services are loosely coupled and reusable software components that semantically encapsulate discrete functionalities and are distributed and programmatically accessible over the standard Internet protocols [1–6]. Unlike developed or licensed packaged applications, web services include specific business functionalities that can be rented over the network (such as Internet) to users by paying a fee [7]. For example, Google’s AdWords web service helps users to create computer codes to connect directly with its AdWords platform. Using web services for system development has several advantages. In addition to the universal interoperability and availability of web services, users acquire lower costs and more frequent software updates. Furthermore, a provider not only provides the service implementations, but also procures the technical supports [8].

Despite abundant benefits, there are serious concerns about the determining pricing strategies for web services. It is essential for a service provider to deploy an appropriate pricing method. A pricing method is employed as an effective access control tool by offering adequate motivations to consumers so that they select proper service levels. In other words, as users decide to buy a web service, they consider its quality of service (QoS) as well as its price. As a result, the provider usually offers different service classes of the web service to satisfy users with different requirements. Each web service class has particular QoS, which is defined as a group of service measures representing the degree of user agreement of the service [9]. Common measures of QoS are response time, reliability, and availability [10]. Without a suitable pricing strategy for the web service, any QoS based web service class is unusable; if we determine no price for any class, all users will choose some classes with high priority QoS. In other words, identifying an appropriate price for any web service class should give users an encouragement to link the “right” web service class.

Limitation of the resources employed, like storage throughput, network bandwidth, CPU time, is one of the most crucial challenges the service provider encounters in offering the web service to the users. Thus, the provider should manage his/her limited resources in a way to get the most desirability out of his/her accessible resources. The provider may employ technical strategies to manage his/her limited resources. This can lead to some problems like dissatisfaction of the users with different needs, inability of the providers in standing by their commitments due to inability in managing demand, and an accretion of technical complexities in offering the web service. As a result, we can reduce the effects of such problems by categorizing the web service in classes with different QoS for users with different needs and selling it before consumption, and adopting a dynamic pricing mechanism to manage demand for web service classes.

One of the appropriate pricing methods for identifying pricing strategy for the web services is dynamic pricing in which the provider adjusts prices to the consumers based on the value that the customers consider to the service. The dynamic pricing models have been used in many industries, such as retailing, manufacturing, airlines, and e-business where the capacity of the resources is fixed in short-term. Accessibility of the necessary information for demand, ease of changing prices, and availability of required decision tools for evaluating the demand data in e-commerce settings motivate us to employ the dynamic pricing as an efficient method to obtain price of the web service [11–14].

One of the common methods in selling services is advance selling. This mostly happens because in service environments there is the risk that in the moment of offering service some of the service capacity may not be sold. By applying this method, the provider can manage his/her service capacity better. Moreover, having an advance selling, the service provider can increase his/her profit gained from cancellation revenue. Such selling method can also be applied to the web service and significantly help the provider in increasing profit and better managing resource capacity of the web service.

One of the most important factors affecting the online pricing is market influence which is usually determined by using features such as the number of competitors, consumer involvement, and popularity of the product item among consumers. According to the study of the online markets, some researchers have found that the increasing in the number of the competitors reduces the price charged by a provider [15, 16]. In contrast to the suggestion of reduced price differentiation with increased competition, in a segmented market, the prices charged by a retailer can increase with the number of competitors [17]. Furthermore, Venkatesan et al. hypothesized that on average, prices charged by an online service provider would first increase with the number of competitors, and beyond a specific threshold, an increase in the number of competitors would cause to a decrease in the prices charged [18]. Customer search behaviour relates to the consumer involvement. For services with higher average price levels, consumers may carry out increased search efforts because of higher perceived risk levels. Consequently, the providers can set lower prices where the customer search is estimated to be higher. Interestingly, some empirical evidence indicates the opposite to be true [19]. Popular product items are those well accepted and bought by many of the customers. In online markets, the customers commonly have well communication and exchange information quickly via many electronic channels. Therefore, we expect that price for popular products should be lower than that of nonpopular products [19]. Based on what was stated before, considering the market influence on determining pricing strategies is highly important and failing to consider it makes the specified prices uncreditable. In the present paper the market influence is considered as a parameter which affects demand of the web service classes. In other words, the effects of the mentioned features for the market are considered as the market influence parameter in the demand function.

Optimal control theory can be applied as an effective tool for studying the price behaviour of the web service over the time horizon. A continuous time method has the advantage of offering the exact solution for the real-world applications. When a discrete time method is used by someone, it is necessary to select reasonable time steps and specify the prices only at the given times. However, the web service provider may need even more flexibility. To deal with this problem, one can choose small time steps. If the time step is small and the time horizon is relatively large, the problem size in terms of the number of variables and the number of constraints will become extremely large. Thus, a considerable amount of effort is required to find the optimal solution.

In this paper, we develop and study a nonlinear continuous time optimal control model for the web service pricing problem in which users buy their required web service over a reservation system and utilize it in the future. We note that the users who reserve the web service have the right to cancel their orders before receiving them. Since different users usually have various requirements, providers typically offer multiple web service classes with different quality of service (QoS) levels. The main part of the proposed model is that required resources are shared among all web service classes. Another important factor in determining pricing strategies which is discussed in the present paper is the market influence which can increase or decrease the price that the provider offers. Furthermore, we suppose that at each time, the demand rate for a web service class is a general function of its price, market influence, and time. The canceled orders at time uniformly spread across the interval . Cancellation penalty cost for canceled orders depends on time and the provider dynamically alters his/her proposed prices to manage the arriving demand effectively.

Our paper is associated the service with various classes which have particular QoS. Since early 1990, QoS study has started to examine economic-based network resource allocation tools that support usage-based pricing [20–22]. MacKie-Mason and Varian argued that considering pricing approaches to reduce the congestion cost has desirable side effects [23]. Parameswaran et al. concluded that pricing is an essential activity in a fast data communication network and considered that an appropriate pricing pattern would be important to motivate users to select suitable QoS levels [24]. Ibrahim et al. proposed a novel QoS-based charging and resource allocation framework for wireless networks. The framework assigns resources to clients according to their QoS requirements. They also allowed the network operators to follow a wide variety of strategies, including maximizing revenue and using auction or utility-based pricing [25]. Gupta et al. developed a spot pricing model for intradomain expected bandwidth contracts with loss-based QoS guarantees. They created a nonlinear pricing scheme for the cost recovery from earlier work and extended it to price risk. A utility-based option pricing method was developed to deal with the uncertainties in delivering loss guarantees [26]. Zhang et al. presented a complete study for competitive pricing of packet-switching networks with a QoS assurance in terms of an expected per-packet delay. They offered a structure in which service providers presenting multiclass priority-based services compete to maximize their profit while satisfying the expected delay assurance in each class. They first dealt with the price competition with fixed delay assurance and then extended it to the condition where providers compete on price as well as QoS [27].

This paper also considers advance selling in the web service pricing problem. Advance selling take places while the service provider allows users to buy at times prior to the spot period [28]. Nagle and Holden used advance selling for matching demand and supply [29]. Desiraju and Shugan viewed advance selling as a tool for implementing price discrimination. They considered the multiperiod pricing of a service in which the price is a function of forecasted capacity to be used in the future [30]. Shugan and Xie showed that advance selling can be more profitable than spot selling especially in the case where consumers are uncertain about their future consumption states [31]. Mesak et al. employed methods of the optimal control theory and calculus of variations to solve a problem in which a service provider wants to maximize the present value of revenue/profit over a planned horizon in continuous time. They studied the role of the threat of competitive entry and discount rate in describing the optimal allocation strategy of capacity over time. Their paper also demonstrated the supremacy of advance selling in continuous time and studied the effect of changes in model parameters on additional capacity [32]. Jing combined economic aspect of grid computing with resource reservation. He proposed a mathematical model which can identify amount of resource booking. He also considered reputation index of service supplier and economic interest in his model and used numeric analysis to show that there exists an optimal point for the advance booking of resource [33]. Lucas et al. provided a new way of booking resources in which cloud users specify the minimum and maximum number of virtual resources required. They dealt with periods of peak load using a universal framework which contains additions and/or modifications of some components at various levels of the cloud architecture [34].

In order to solve the proposed model, we use ideas from the control theory and nonlinear optimization. Optimal control theory has been developed to find optimal approaches to control dynamic systems [35–37]. Nonlinear optimal control models are mainly helpful for the dynamic pricing and other management science applications. For instance, we can see these models in the literature of production planning [38–40], dynamic pricing [41–44], fluid networks [45], and finance [46].

Esmaeilsabzali and Day considered a web service provider with limited capacity and requested for his/her service. They offered an online algorithm for selecting from arrived requests based on maximum willingness to pay off requesters. They also presented that both online and offline algorithms for the problem are NP-hard [47]. The optimal pricing and location strategy of a web service intermediary (WSI) was studied by Tang and Cheng. They offered the optimal solution in a linear city model and then extended the results to the more general unit circle model. They showed that the optimal strategy can be computed in terms of using delay cost, integration cost, and prices of the constituent web services [48]. An effective method for computing price of web services based on the quality of service (QoS) and user experience was proposed by Wu. The analysis experiment shows that the web service pricing model works very well and makes the service price more realistic and accurate [49]. Pan et al. provided a dynamic pricing strategy for a provider who offers a web service with different QoS levels. They assumed that the provider usually dynamically changes his/her prices and suggests several class services to satisfy needs of different customers. They analytically solved the model and obtained optimal solution for the web service class prices and capacity. Furthermore, their model had no constraint on the web service capacity and thereby obtaining the optimal solution for their model was very straightforward [50]. Zhang et al. addressed competition between two providers who provide similar web service. Each provider should offer a service level (standard or premium) and charge a price for the chosen service level to meet the QoS guarantee. They first studied the case where the providers choose the service level and price simultaneously, and then extended it to a sequential-move situation [51].

In general, surveying the above mentioned research shows that researchers have done no study on the web service pricing problem with considered assumptions. Generally, the contributions of this paper are the following.(i)We first develop a continuous time model for the dynamic pricing of the web service and then the model is discretized.(ii)We need certain resources to offer the web service. In this paper it is hypothesized that for each resource there is a definite capacity which is shared among the web service classes.(iii)We consider market influence as an effective factor in identifying pricing strategies of the web service.(iv)Demand function for each web service class is a general function of time, its price, and market influence. Cancellation rate and ratio of penalty are general functions of time.(v)We investigate the structure of the optimal pricing strategies for the model based on the maximum principal.(vi)We provide a heuristic algorithm to obtain the optimal pricing strategies within the time horizon.(vii)We perform numerical analyses to evaluate the effect of some parameters on the control and state variables and objective function. In addition, we compare the proposed algorithm with GA and SA.

The remainder of this paper is organized as follows. Section 2 defines the assumptions and notations we will use throughout the paper and then we explain the considered model. In Section 3, we provide some results on the structure of the optimal solution. In Section 4, we provide a heuristic algorithm to obtain the optimal control variables (prices). In Section 5, we perform numerical analyses to study the effect of the demand function, shared resource capacity, and cancellation rate on the control and state variables and objective function. Furthermore, the proposed algorithm is compared with GA and SA.

#### 2. Model Formulation

##### 2.1. Model Notations

: Advance selling period. : Number of web service classes. : Number of required resources. : Unit web service cost of th class. : Shared capacity of th resource. : Cancellation rate of th class at time . : Market influence on demand function of th class at time . : Unit web service selling price of th class at time (control variable). : Ratio of penalty to sales price when a user cancels his reservation at time of selling period. : Sale revenue function of th web service class at time (state variable). : Reservation level of th web service class at time (state variable). : Needed capacity of resource for unit web service class . : Demand function for web service class at price and time .(i)We denote by , , , , , , the vectors with respective components , , , , , , , .(ii), , denote the optimal solution.

##### 2.2. Assumptions

This paper considers a finite time horizon model. Although we focus on the web service dynamic pricing, our results can be applied to other service management environments. The developed model includes the subsequent features.(i)The developed model is time-continuous.(ii)Users get their needed web service through the booking system and utilize it in the future.(iii)The provider offers the web service classes with various QoS levels.(iv)For each web service class, the demand function is dependent on the time and its price and the market influence.(v)Because the demand function is usually decreasing proportional to price, the term exists. Moreover, it is hypothesized that as the price increases, variations in the demand decrease which means the term exists. This happens due to the sensitivity of the customers to the variations of the price in the higher prices of offering the web service.(vi)In order to offer the web service, we need resources. The provider shares the capacity of each resource among the web service classes.(vii)Users can cancel their order through the booking period.(viii)The canceled orders at time are spread uniformly in the interval .(ix)Users who cancel their orders are asked to charge penalty.(x)Cancellation rate and ratio of penalty are general functions of time.(xi)The objective is to maximize the profit.

##### 2.3. Model Description

Since users commonly buy the web service before consumption time, this makes the real-world assumption that users may cancel their orders before receiving them. Users who cancel their orders are asked to charge the penalty. For the web service class , cancellation revenue over the time horizon is given by Since we assume the canceled orders for each web service class at time uniformly spread across the interval , we can multiply by to find the penalty of the customers who cancel their reservation for the web service class at time . Integrating over the interval clearly provides cancellation revenue for the web service class .

As the use of the web service becomes general, it can be predicted that the provider will not be able to offer service to all the users. The main cause for this is limitation of resources like network bandwidth and CPU time in offering the web service to the users. So it is hypothesized that there is a need for resources to offer the web service and the employed resources are different in each of the web service classes. Moreover, it is hypothesized that the provider takes into account limited capacity for each of the considered resources which the different classes of the web service use commonly.

The proposed model can be written as follows: In this control model, the objective function (2) is the total revenue (composed of the sales revenue and cancellation revenue of the web service classes at time ) minus the total cost (composed of the cost of the total reserved web service for different classes at time ). The state equations (3) and (4) illustrate the change of the sales revenue and reservation level at time , respectively. Sales revenue level change for the web service class at time is equal to the revenue that is obtained from selling the web service class to users at price minus the revenue that the provider misses due to users’ cancellation. Since it is supposed that the canceled orders at time uniformly spread across the interval , we apply expression to calculate the provider missed revenue. Reservation level change rate for the web service class at time is equal to orders for the web service class at time minus the reserved orders that are canceled by the users at time . Constraint (5) is defined to make sure that the sum of sold resource for all the web service classes is equal to or less than the shared capacity of the resource among all the web service classes. Constraints (6) and (7) are used to confirm that demand functions and prices are nonnegative, respectively. Initial value of the state variables is denoted by (8).

##### 2.4. Discretized Formulation

The model can be rewritten by discretizing the time horizon. We partition the time interval into subintervals with lengths and we need to obtain the decision variables of the model in times such that and for , we have . Replacing , , , and into (2) to (7) provides the discretized formulation of the model as follows: Equation (9) indicates the discretized objective function of the model. The constraints (10), (11), (12), (13), (14), and (15) discretize the constraints (3), (4), (5), (6), (7), and (8), respectively.

#### 3. Solution Approach

##### 3.1. Maximum Principle for Optimal Control Problems with Mixed Inequality Constraints

In this section, the maximum principle for optimal control problems with mixed inequality constraints will be expressed. For further facts see [35, 52]. Let us consider the following optimal control problem with mixed inequality constraints: where is planned time horizon, is the vector of state trajectories at time , is the vector of control trajectories at time , the functions from into , from into , from into , from into , and from into are continuously differentiable with respect to all their argument. It is supposed that each element of the functions depends explicitly on the control and state . More exactly, the subsequent full rank condition must be held: Condition (20) denotes that the gradients with respect to of all the active constraints must be linearly independent.

To express the maximum principle, it is essential to define the Hamiltonian function as follows: where , whose components are termed adjoint variables. We also define the Lagrangian function as where is a row vector, whose components are termed Lagrangian multipliers.

Theorem 1 (necessary condition). *The necessary conditions for with the corresponding state trajectory to be an optimal solution are that there should exist continuous and piecewise continuously differentiable functions , piecewise continuous functions such that the following conditions hold:
**
Satisfying
**
With the transversality conditions
**
where is constant vector.**At each and for all satisfying , the Lagrange multiplier is such that
**
and the complementary slackness conditions are
*

*Theorem 2 (sufficiency). Let satisfy the necessary conditions in Theorem 1. If is concave in at each , in (16) is concave in in (18) is quasi-concave in in (19) is quasi-concave in , then is optimal.*

*3.2. Optimality Condition for the Proposed Model*

*In this section, we first prove that the mixed inequality constraint qualification holds. Then, we create the Hamiltonian and Lagrangian functions and apply the maximum principal to present some important results.*

*Lemma 3. The mixed inequality constraint qualification holds.*

*Proof. *The constraint qualification illustrates that the gradients of the entire active mixed inequality constraints (6) and (7) with respect to must be linearly independent. The mixed inequality constraints for this problem are as follows: . Based on (20), it is needed to show that the rank is . The Matrix can be written as follows:To demonstrate the rank , we can see the follwoing: since there are rows in , the rank is at most . If there is no binding constraint on the constraint sets (6) and (7), the last columns are nonzero and linearly independent; as a result the rank of matrix is . For each such that , column is the zero vector, however, it can be substituted with column to gain a set of linearly independent columns. Similarly, for each such that , since , it can replace column with column . It is necessary to note that the constraint sets (6) and (7) cannot be bound simultaneously.

*The maximum principle defines the necessary conditions for optimum control variables. Using (21), the Hamiltonian function for this problem can be illustrated as follows:
The adjoint variables and dualize, respectively, the state equations (3) and (4) at time .*

*Furthermore, using (22), the Lagrangian function for this problem can be written as follows:
The Lagrange multipliers and relax, respectively, the constraints (6) and (7) at time . However, since left side of constraints (6) and (7) for each web service class is only dependent on its price, market influence and time, we can remove these constraints from Lagrangian function and use them to create feasible solution space. Therefore, Lagrangian function can be rewritten as
According to the maximal principal Theorem 1, at the optimal solution (i)The state trajectories satisfy
(ii) The optimal control on is calculated as follows:
where is the set of admissible controls such that:
(iii)Using (24), for every , the continuous vector of the adjoint variable fulfills the following differential equation:
Furthermore, the following differential equation holds for the adjoint vector :
(iv)Using (25), The transversality conditions can be formed as follows:
*

*Proposition 4. For each web service class at time , the optimal trajectory is given by
where .*

*Proof. *Equation (38) is a linear first-order differential equation. Its standard form is , based on the available standard solution for the first order differential equation in [53], we have
where , recalling (40) gives .

*Proposition 5. For each web service class at time , the adjoint variable is given by
where , , *

*Proof. *From differential equation (39), we have , integrating with respect to gives , recalling (41) gives .

*Proposition 6. At each time , for obtained , and from necessary condition, the unique optimum control solution can be given by
where and can be obtained from the equations + + + and , respectively.*

*Proof. *In order to obtain the optimal control variables as function of , and , the optimization problem (36) is solved. It is also noticed that the Lagrangian function is separable across the web service classes and in . To find optimal solution of problem, the partial derivative of Lagrangian function with respect to control variable can be obtained as
To achieve the optimal solution, these partial derivatives are set to zero as follows:
Furthermore, by substituting (42) and (44) into (47), one can get
To prove uniqueness of satisfying (6), (7), and (48). It is sufficient to show that . In (48), Since and , we can verify that , then,
Let the maximum price be at time , such that . If lies within the interval , then it is the optimal control. Otherwise, locates in the boundary of the set of feasible controls, that is, 0 or , depending on which value corresponds to the higher value of the optimization problem (36).

*Note, that by setting , , , we obtain the optimality condition for the corresponding model which ignores the cancellation assumption:
Referring to the optimal price of the web service class at time , and ignoring resource capacity constraint (5), it can be concluded that ignoring cancellation assumption leads to overpricing.*

*Proposition 7. If the capacity constraint (5) is removed from the model, then one has
*

*Proof. *Removing the resource capacity constraint (5), the value of expression will be zero. Thus, comparing (47) and (50), it can be observed that
while taking into account that ,
Next, by denoting
and recalling (49), we conclude that . Thus, from conditions (52) and (53), we have , which with respect to the last inequality needs that .

*According to Proposition 7, the optimal prices derived from the model ignoring the order cancellation assumption is not optimal and the proposed model is required to account properly for the effects of order cancellation.*

*Proposition 8. For the model without resource capacity constraint (5), when the unit cost of the web service class increases, the optimal price of the web service class increases.*

*Proof. *Suppose that and are two cost values for the unit web service class such that . To prove this proposition, one can show that the corresponding prices and have the following relationship:
Removing the resource capacity constraint (5) and using (48), we have
By assuming that , it can be stated
Next by defining
recalling (49), again, we can derive that . Therefore, from (56), (57), and (60), we have , which with respect to the last inequality needs that .

*Proposition 9. For the model with no resource capacity constraint (5), if and , then the optimal price of the web service class at time increases by increasing the market influence.*

*Proof. *Suppose that and are two market influences for the web service class such that . Now, we must prove the prices and corresponding to and have the following relationship:
Using (48), for the prices and we have
By assuming that , and , substituting with into (61), we have
Therefore,
Next by describing
Similar to (58), again, we conclude that . Using (61) and (63) and (64) we have , which with respect to the last inequality needs that .

*Proposition 10. For the model with no resource capacity constraint (5), if and , then the optimal price of the web service class i decreases by increasing the market influence.*

*Proof. *The proof of this Proposition is similar to Proposition 9.

*Proposition 11. For each web service class at time , the optimal sales revenue is given by
where .*

*Proof. *The state equation (32) is the first-order differential equation and we have , thus,
where , therefore
since , thus

*Proposition 12. For each web service class at time , the optimal reservation level is given by
where .*

*Proof. *The proof of this proposition is similar to Proposition 11.

*4. Heuristic Algorithm*

*In what follows, we describe the heuristic algorithm which is utilized to derive the optimal solution for the problem based on Everett’s approach [54] for identifying the multipliers , . It employs (45) to find the solution for the determined multipliers. For the specified multipliers , , if constraint (5) and condition (41) are satisfied, then the obtained solution is optimal and the algorithm will end. Otherwise, it is necessary to update the value of multipliers , and repeat the algorithm from the beginning.*

*At th iteration of the proposed algorithm, the solution , , , is first calculated by using (45) for given multipliers , . Later on, it follows that , . According to the calculated , the value of the multipliers , may be determined as follows:(i)For all , if then , where has a positive value near zero. It ensures that stays nonnegative.(ii)For all , if then .*

*In this method, if , then constraint (5) is not satisfied, and the value of multipliers must be increased in order to penalize the additional violation. In the same way, if , then constraint (5) is not violated and the value of the multipliers must be decreased.*

*Furthermore, the parameters are updated as follows: if then , if then , if then ,where the parameters and are constant, and also and . If the capacity constraint (5) is violated at the iterations of and , then the value of is gradually enlarged according to the fact that the value of the multiplier may be rather distant from its optimal value. If constraint (5) varies between infeasibility and feasibility, then the value of is decreased to move the multiplier value towards its optimal value.*

*According to Theorem 2, since the Hessian matrix of Hamiltonian function (29) with respect to is a negative definite matrix, we clearly conclude that the Hamiltonian function is concave. Furthermore, It can be evidently stated that the expression in (2) is concave, constraints (6) and (7) are quasi-concave in , constraint (5) is quasi-concave in . Therefore the obtained solution satisfied the conditions of Theorem 1 is optimal. In other words, the optimal solution of the primal and dual problems is equal.*

*The proposed heuristic algorithm has the following steps: Step 1: Set Input parameters; Step 2: Set , and calculate , , using (42) and (44); Step 3: Calculate the price of the web service class , using (45); Step 4: Compute the reservation level of the web service classes using (69); Step 5: If for all , the constraint (5) holds then go to 16; Step 6: For all , Set and ; Step 7: Set ; Step 8: Calculate , using (44); Step 9: Calculate the price of the web service classes using (45); Step 10: Compute the reservation level of the web service classes using (69); Step 11: Set , ; Step 12: For all , if then set ; else set ; Step 13: For all , if then ; else if then ; else ; Step 14: If ; go to 16; else go to 15; Step 15: Set and go to 8; Step 16: End.*

*5. Numerical Result*

*We implement the proposed algorithm for a time horizon . We plan to explore the effect of input parameters, that is, the demand function, shared resource capacity, cancellation rate, and market influence on the price, sales revenue, reservation level, total revenue, total cancellation revenue, and profit. Considered examples include two web service classes and one resource. Furthermore, the parameters of the algorithm are considered as , , , , and . The proposed heuristic has been coded in Maple 15 on a PC with an AMD Dual core (2.31 GHz) CPU and 1 GB of RAM.*

*In order to analyze the effect of various parameters, we firstly create Example 1 and then use it to form other examples. In other words, next examples are distinct from Example 1 in only one parameter which we want to identify its impact. Assume the demand function of the web service class be linear in terms of price with a time-dependent maximal demand and market influence, . The demand requirement and are satisfied. The maximal demand , in a similar manner in the reference [42] is a quadratic function of the time and increasing in the first half of time horizon and decreasing in the second half of time horizon to study the impact of demand peak on the problem. Furthermore, we assume that QoS of the web service class 2 is better than the web service class 1. As a result, the cost and required resource of the unit web service class 2 and the maximal demand of web service class 2 are greater than the web service class 1. Furthermore, we suppose that the cancellation ratios , are constant through interval and variable on interval , which can be given as
Other selected inputs for Example 1 are summarized in Table 1.*