# How to formulate this optimisation problem that has time varying components?

I've been working on a optimisation problem at work regarding blending. Essentially we have different types of grain stock with different properties and we bought them for different amounts. We then have a bunch of customer contracts requesting some amount of grain with certain property constraints (e.g. protein content must be less than this amount). We can blend our stocks to fulfill a contract provided that the property constraints of the contract are not violated. We can formulate this pretty easily as an LP problem where our objective function is to minimise the total price of grain stock we allocated to all of our contracts, and the constraints are given by the contracts property constraints, the grain amount specified by the contract and the amount of grain stock we have on hand.

In reality however we are constantly receiving new stock throughout a given year and shipments for contracts will happen at different times. We will also receive new contracts throughout the year too. So at any point in time we potentially don't know stock and contracts we could have in the future. How would I take into account this time varying aspect to formulate this as an optimisation problem such that we could maximise profit for a given year? We were considering just optimising for each batch of contracts that correspond to the same shipping period individually using stock we would have at that point in time but is there a way to formulate this problem as one single global problem?

• Are the amounts of incoming grain stock given, or does your LP model also decide how much stock to order?
– prubin
Commented Nov 17, 2021 at 15:47
• @prubin At a given point in time you'll know how much grain stock you have. But throughout the year we could be buying more grain stock. So we don't know what stock we will have in the future throughout the year. Commented Nov 17, 2021 at 23:39
• Meaning the acquisition of grain stock is outside the scope of your model (not something your model decides)?
– prubin
Commented Nov 18, 2021 at 0:11
• @prubin That's right. Though if a formulation is possible if the model does decide that then please let me know. Since we can look at integrating other processes that acquire grain. Commented Nov 18, 2021 at 0:22