Difference between revisions of "Module 5: Time as an Extrinsic index"

m
 
Line 2: Line 2:
 
<breadcrumbs> Analytica Optimizer Guide > Optimizer key concepts: Airline Example> {{PAGENAME}}</breadcrumbs><br />  
 
<breadcrumbs> Analytica Optimizer Guide > Optimizer key concepts: Airline Example> {{PAGENAME}}</breadcrumbs><br />  
  
Let’s assume that Base Demand increases by 10% per year. How would that affect our decisions over time. In this example you Analytica will abstract over the system index [[Time]] instead of [[Run]]. The principle is exactly the same as in [[Optimizing_with_Uncertainty#Module_4:_Multiple_Optimizations_of_Separate_Samples_.28MOSS.29|Module 4]].  
+
Let’s assume that Base Demand increases by 10% per year. How would that affect our decisions over time. In this example, Analytica will abstract over the system index [[Time]] instead of [[Run]]. The principle is exactly the same as in [[Optimizing_with_Uncertainty#Module_4:_Multiple_Optimizations_of_Separate_Samples_.28MOSS.29|Module 4]].  
  
First, we define the system [[Time]] index to represent years from 2011 to 2015. To edit this special index, select Edit Time from the [[Definition menu]] and enter the following definition:
+
First, we define the system [[Time]] index to represent years from 2011 to 2015. To edit this special index, select '''Edit Time''' from the [[Definition menu]] and enter this definition:
 
:<code>Index Time := 2011..1015</code>
 
:<code>Index Time := 2011..1015</code>
  
Starting with the Base Case setup, create a new node titled <code>Base Demand Growth Rate</code>. Re-define <code>Base Demand</code> to that is grows by this rate exponentially over time.
+
Starting with the Base Case setup, create a new variable<code>Growth<code>_</code>Rate</code>. Re-define <code>Base_Demand</code> so that it grows exponentially over time using this annual growth rate.
  
 
:<code>Variable Growth_Rate := 10%</code>
 
:<code>Variable Growth_Rate := 10%</code>
Line 14: Line 14:
 
This definition uses a positional reference for the [[Time]] index. The first year corresponds to position 1 (making the exponent zero). Thus, <code>Base Demand</code> for the first year will be 400k, and this value increases 10% every year.  
 
This definition uses a positional reference for the [[Time]] index. The first year corresponds to position 1 (making the exponent zero). Thus, <code>Base Demand</code> for the first year will be 400k, and this value increases 10% every year.  
  
[[Time]] is now an index of <code>Base Demand</code>. The extrinsic index is propagated to the Objective. [[Array Abstraction|Array abstraction]] results in separate optimizations for each year.
+
[[Time]] is now an index of <code>Base Demand</code>. The extrinsic index is propagated to the Objective. [[Array Abstraction|Array abstraction]] results in a separate optimization for each year.
  
 
:[[File:nlp_mod5_1.png|400px]]
 
:[[File:nlp_mod5_1.png|400px]]
  
Profit rises in each year as demand increases. A new plane is added in 2014. Wait! Did you forget something? This in an NLP with an extrinsic index. If you remembered to set a context variable you win a free Grande Analyti-latte! '''Base_Demand''' is the sensible choice.
+
Profit rises in each year as demand increases. A new plane is added in 2014. Wait! Did you forget something? This in an NLP with an extrinsic index. If you remembered to set a [[Using SetContext to efficiently solve NLPs|context variable]] you win a free Grande Analyti-latte! '''Base_Demand''' is the sensible choice.
  
 
<pre style="background:white; border:white; margin-left: 1em;">
 
<pre style="background:white; border:white; margin-left: 1em;">

Latest revision as of 23:05, 4 August 2016


Let’s assume that Base Demand increases by 10% per year. How would that affect our decisions over time. In this example, Analytica will abstract over the system index Time instead of Run. The principle is exactly the same as in Module 4.

First, we define the system Time index to represent years from 2011 to 2015. To edit this special index, select Edit Time from the Definition menu and enter this definition:

Index Time := 2011..1015

Starting with the Base Case setup, create a new variableGrowth_Rate. Re-define Base_Demand so that it grows exponentially over time using this annual growth rate.

Variable Growth_Rate := 10%
Variable Base_Demand := 400k*(1 + Growth_Rate)^(@Time - 1)

This definition uses a positional reference for the Time index. The first year corresponds to position 1 (making the exponent zero). Thus, Base Demand for the first year will be 400k, and this value increases 10% every year.

Time is now an index of Base Demand. The extrinsic index is propagated to the Objective. Array abstraction results in a separate optimization for each year.

Nlp mod5 1.png

Profit rises in each year as demand increases. A new plane is added in 2014. Wait! Did you forget something? This in an NLP with an extrinsic index. If you remembered to set a context variable you win a free Grande Analyti-latte! Base_Demand is the sensible choice.

Variable Opt := DefineOptimization(
     Decisions: Number_of_Planes, Fare,
     Maximize: Profit,
     SetContext: Base_Demand)

See Also


Comments


You are not allowed to post comments.