# Using Parametric Analysis: Airline NLP Module 2

It is often useful to vary the input values of a model to see how the changes affect downstream variables. In optimization problems, we are primarily concerned with the objective value. Analytica’s Structured Optimization also makes it easy for you to see how parametric variations affect objectives and optimization results.

Analytica Optimizer treats parametric variations on Variables and Decisions differently.

## Parametric variations in input Variables

Applying Parametric variations to input Variables causes Analytica to abstract over the parametric index. This allows you to see how parametric variations affect the Objective value as well as the optimization result.

To see this, start with the Module 1 Base Case and apply parametric variations to Base Demand.

Variable Base_Demand := [200k, 400k, 600k, 800k, 1M]

Evaluate Profit to see how this variation affects the pre-optimized objective value. (This value applies the original Decision inputs: Fare = 200, Number of Planes = 3)

We see that profit levels saturate when planes reach full capacity. The transition happens somewhere between 400k and 600k values for Base Capacity, assuming original Decision values.

Now evaluate the solution variables:

Analytica abstracts the parametric index on Base Demand so that we have separate optimization runs for each element. Indexes abstracted over optimizations are called extrinsic. Here we see that the airline can make a profit in all Base Demand scenarios after making the right adjustments to Fare and Number of Planes. Higher demand always leads to higher profit. For the lowest Base Demand scenario, a successful strategy is to raise the fare and save cost by operating only one plane.

## Parametric variations in Decisions

Applying parametric variations to Decisions will NOT cause array abstraction on the optimization. But you can still see how parametric variations on Decisions affect the Objective.

Apply parametric variation to Fare:

Decision Fare := [180, 190, 200, 210, 220]

Evaluate Profit to see how this variation affects the pre-optimized objective value. (This value applies the parametric inputs for Fare, and the original Decision value for Number of Planes: 3).

The new Objective array shows the result of both variations. When Base Demand is low, a lower fare is best. When Base Demand is 600k or above, the higher fares are favored.Because Fare is a Decision, its parametric index is ignored by the optimization. We expect the optimization results to have the same dimensions as before:

Because Fare is a Decision, its parametric index is ignored by the optimization. We expect the optimization results to have the same dimensions as before:

The dimensions are the same. The result is similar but not identical. Notice that the solution for the 800k Base Demand scenario has changed since we applied parametric variation to Fare. Why did this occur?

This demonstrates an unavoidable characteristic of NLPs: Due to the existence of locally optimum solutions, the solution may depend on the initial guess. Analytica uses the first element of a parametric series as the initial guess. By adding a parametric index on Fare, we effectively changed the initial guess from $200 to$180.

If you enter the parametric variation on Fare as an Initial Guess attribute of the Decision node, Analytica will abstract over the index and run separate optimizations for each initial guess value.

If the Initial Guess attribute is not already visible, select Attributes from the Object menu and toggle a check box next to Initial Guess. The attribute will now be visible in the Object window.

Initial Guess of Fare := [180, 190, 200, 210, 220]

There are only slight differences in the optimal Profit achieved. The original of guess of Fare = 200 is never inferior in this case.

The tendency toward locally optimal solutions is a characteristic of the optimization engine alone. Analytica is designed to make all aspects of modeling as transparent as possible. This is especially important for optimization. In a spreadsheet environment using the same engine, the same optimization characteristics would apply but they would be more difficult to explore. Premium NLP engines available on Analytica include sophisticated algorithms to increase the likelihood of finding globally optimum solutions.