Opening inventory = actual inventory at the time of planning+expected arrival at the beginning-expected consumption at the beginning. Ending inventory = opening inventory balance+current purchase-current collection.
The relationship between ending inventory and supply and demand: inventory is an important explicit indicator of supply and demand. From the perspective of a country's supply and demand relationship, futures inventory = initial inventory+current output+current import-current export-current consumption; And overall, ending inventory = beginning inventory+current output-current consumption.