There is a certain factory and there is time for which it is necessary to consume a certain amount ($ X $) of a resource. At each specific period of this time (and the time is discrete), a factory can consume only exactly $ X_i $ resources.
There may be several resource suppliers. For each supplier, the price of a resource varies (discretely) over time.
In addition, the factory has a warehouse of resources (that is, it can be said that the factory can consume the resource in excess. The "excess" is placed in the warehouse). Then, at some next time interval, instead of taking all the required resources from one of the suppliers, the factory can take resources (at least part) from its warehouse. The capacity of the warehouse is limited. The loading of the warehouse in each period of time is limited (from zero to one certain predetermined number).
The goal is to minimize the purchase price of resources for the specified time with the fact that the factory has fulfilled the resource consumption plan.
As I understand it, the problem is solved by linear programming methods. But I can’t express the connectivity between each subsequent loading / unloading from / to the warehouse.
The storage capacity should be at any time in the range from 0 to a certain $ M $. But each loading / unloading from the warehouse changes the amount. Can such a time dependence be expressed by the simplex method?
First, define your variables. If that is done correctly, the rest is fairly easy.
The factory uses $x_t$ units at each time $t$. The amount in the warehouse at (the beginning of) time t is $W_t$, which must be between 0 and $M$. The factory now buys $B_t$ items. For the next period, it should be clear that $W_{t+1} = B_t - x_t + W_t$. The condition you need is either that $B_t$ is between $x_t-W_t$ and $M-x_t-W_t$ items, so that you don't overfill the warehouse, or more directly, that $0 < W_t < M$.