**Modeling a Linear System**

Continuing on from last week’s blog post about linear systems that can be found in stores, the particular one that I will be focusing on this week is the amount of products being restocked and sold.

The conserved quantity would be the amount of products in the store, for example like a bag of chips on a shelf. If we were to model a single day, we would have to determine the rate at which a bag is taken off the shelf, and also the rate at which it is put back on the shelf. In this case, the system would be the total number of chip bags on the shelf at one time and the conservation of mass could apply to this if we consider all of the bags on the shelf to be one single mass. We would have to use the general equation:

The rate at which the bags of chips are placed back onto the shelves would be m_in, and the rate at which the bags were taken off of the shelves would be m_out. For example, our rate in could be 0.5(t) lb/hr and our rate out could be 0.75 lb/hr. Our equation would then look like:

From this equation, we would be able to calculate the time at which there are no bags left on the shelf, or how many bags there would be at a given time. Modeling this as a matrix that would be solved in Matlab would be simply:

This matrix could be expanded to multiple different products, rather than just one particular brand of chips on a shelf or change the system to be the store and calculate the rate of products actually being taken out of the store, as well as the individual products on shelves. (similar to the mass flow network problem on homework #3).