Case study

Supply Chain Optimisation

Agriculture, Energy

Forecast developed a mixed integer linear programming model using Python and MIP package for a bioprocessing company's supply chain optimisation to set up a biorefinery in regional Australia.


Our client is a bioprocessing company, specialising in sustainably converting agricultural waste into natural gas and other materials.


The client is planning to set up a biorefinery in regional Australia, taking in the stubble from broadacre crops grown in the surrounding area, and recycling them into useful materials, primarily natural gas. As there is little existing use for the stubble, it is often burned, releasing carbon dioxide into the atmosphere.

Forecast were commissioned to run a supply chain optimisation on the acquisition process. 300,000 tonnes of raw material need to be stored, transported, and pre-processed before use at the biorefinery. The model needed to be reasonably fast, while providing the flexibility to run differing scenarios.


Phase 1 involved scoping the mathematical requirements for any optimisation, and compiling into a report. We developed a mixed integer linear programming model to encapsulate the problem, including a set of equations to be used as the objective function and constraints.

Phase 2 was focussed on converting the mathematical equations into python code. The optimisation was set using the mip package, and the code was structured in a class. The model incorporates approximately 20,000 variables, including a transport schedule, storage locations, and pre-processing machines.

Both the input and output are through Excel workbooks, as this is a familiar format for the client. The input contains sheets for the model parameters, farm location and crop quantities, potential storage locations, and costs per unit, allowing the client to customise the model as required.

After reducing the complexity as far as we could without information loss, the code was still too slow to be useful for the client. We decided to set up an instance of AWS SageMaker to run the code, using JupyterLab as the interface. There is the potential to add a front end in the future.


The optimisation provides the client with a business model for running the crop acquisition, storage, transport, and pre-processing before use at the biorefinery; along with costs associated with each. When supply agreements have been settled, the client can use the transport and storage schedule to guide their operations management; and use the cost estimates to enhance their financial modelling.