We consider a production/clearing process in a random environment where a single machine produces a certain product into a buffer continuously. The demands arrive according to a Markov Additive Process (MAP) governed by a continuous-time Markov chain, and their sizes are independent and have phase-type distributions depending on the type of arrival. Since negative inventory is not allowed, the demand may be partially satisfied. The production process switches between predetermined rates that depend on the state of the environment. In addition, the system is totally cleared at stationary renewal times and starts anew at level zero immediately. Several clearing policies are considered: clearing at random times, clearing at crossings of a specified level, and a combination of the above policies. We assume the total cost includes a fixed clearing cost, a variable cost for the cleared amount, a holding cost, and a lost demand cost. By applying regenerative theory, we use tools from the exit-time theorem for fluid processes and martingales to obtain cost functionals under both the discounted and average criteria. Finally, illustrative examples and a comparative study are provided. 
Clearing control policies for MAP inventory process with lost sales