Module 6: Time as an Intrinsic Index
If there are interactions between decisions in different years, you might want to find the decisions in each year that collectively maximize the Net Present Value (NPV) or another objective that aggregates over time. In this example, the NPV function will reduce the time dimension so that the Objective will be a scalar value again. But there is an array of decisions over time that all contribute to this value. In this case, there is one optimization that yields an collective array of decisions of decisions over time. Time becomes an intrinsic decision index.
Create a new Objective node for NPV of Profit. Assume a discount rate of 5%.
Use the new objective in the optimization (context variables are not necessary because there are no extrinsic indexes here).
Variable Discount_Rate := 5% Objective NPV_Profit := NPV(Discount_Rate, Profit, Time) Variable Opt := DefineOptimization( Decisions: Number_of_Planes, Fare, Maximize: NPV_Profit)
Redefine the Decisions as arrays. We can use the Array function to extend the original initial values over time. To avoid ambiguities about how the Time index should be handled, be sure to list it as an intrinsic index in the Decision node attributes:
Decision Fare := Array(Time, 200) Intrinsic_Indexes of Fare := [Time] Decision Number_of_Planes := Array(Time, 3)) Intrinsic Indexes of Number_of_Planes := [Time]
Now a single optimization yields an array of decisions over time. They collectively maximize a single objective value: the NPV of profit over all years.
The computational time requirements for NLPs typically increase superlinearly with the number of decision variables, so this approach can become time-consuming if you have many decision variables and time periods. In general, it takes longer than Module 5 where we optimized separately for each year. The intrinsic time approach only makes sense if there is interaction between time periods that might favor a less than optimal objective value in a particular period for the benefit of the whole time series. In the absence of this type of interaction, it is better to run discrete optimizations for each period. This principle can be generalized to any decision index.