Hello, I have been working on my master thesis topic and have been struggling to find a solution to a particular problem. I was hoping someone here could at least shed some light and point me in the right direction. My thesis topic is simulating natural gas networks and my task is to find an optimal way of operating a gas transmission network. As for the math related part, I'm trying to determine an optimal way of increasing gas volume/pressure steadily while taking into account the minimum and maximum constraints. I'll share a picture of the graph to help get a visual. Basically, I'm trying to find a mathematical relation I can program into a simulation model that satisfies a curve similar to "case 2" in the picture. You can see in the graph that this function/curve must be above the "necesssary" curve's maximum point and below the "maximal" curve's lowest point, or rather the minimum and maximum gas volume constraints. Hopefully this post isn't too long winded. I was first trying to work with a basic quadratic formula, since there is always a known y-intercept or starting point. But I'm not sure how to manipulate this formula so that it takes into account these min/max constraints. Any help would be very much appreciated. If you have any questions or need further explanation just let me know please. I thank anyone who can help in advance.