# How does opening inventory affect the measurement of GDP?

So I understand that opening inventory is the unsold goods from last period which were treated as investment expenditure in that period. But what happens to GDP in this next period when these goods are sold?

For example, If we consider a 2 sector circular flow model with only 2 firms, where last period, firm 1 sold all its goods, so its opening inventory is 0 dollars. Firm 2 had 500 dollars worth of unsold goods, thus opening inventory is 500 dollars. I think this means that household savings in the last period were 500 dollars. In this period, firm 1 produces goods worth $1000, while firm 2 tries to just sell its opening inventory and so produces nothing. 1.) What is the GDP in this period? 2.)If this period, firm 1 sells nothing, but firm 2 sells all its inventory (i.e. 500 dollars). How could the 3 methods for measuring GDP still give the same value? 3.)if firm 1 sold$900 of its goods, but firm 2 sold 300 worth, then how could the 3 methods still give the same value for GDP?

Note: the 3 methods are expenditure (Y=C+I), income (Y=w+R+r+P) and output method (or value added method).