Let's say that you have a good which price can change quite often because of its demand. Let's assume that you developed an algorithm that changes continuously the supply of the good to make its value as constant as possible and equal to $1. How would you simulate this system?
What I cannot figure out is how to simulate the changes in price of the good based on the demand. For example, let's take these as the initial conditions of the system:
$$initial-supply = 1000 goods$$ $$initial-value = $1/good $$ $$ production-rate-of-the-good=500 goods/second$$
Now let's assume that the demand is 500 goods/second. Does this imply that the price of the good will stay constant?
If the demand becomes 2000 goods/second for some interval, how will the price of the good change if the production rate remains the same?
I am a beginner in these concepts and I hope that this question makes sense