I am building a dynamic optimization model (for academic research purposes) in GoldSim where I am calculating the optimal number of new wells that can be drilled at each timestep (monthly) for natural gas production, given a set of constraints. I am using the 'Previous Value' element to use the dynamically calculated number of new wells to find out the production of gas from these wells, and the net revenue from their production at each timestep to prevent a recursive loop. The 'Previous Value' element was working fine until now. Now, I noticed that the exact number of new wells does not get carried over to the next time period. I am confused as to why this is happening. I have provided a screenshot to show what I mean. new_wells is the element that has the calculated number of new wells straight from the dynamic optimization sub-model. new_wells2 is the first 'Previous Value' element: the number of new wells should be carried over to the next period. 'new_wells_again' is the second 'Previous Value' element that carries over the no. of wells from the new_wells2 element. I am using two 'Previous Value' elements.
Does anybody have any idea about why this is happening? I would really appreciate any help I get. Thank you!