Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

How to: Create a Goal

Solver Foundation 3.0

You can add a goal to a model to configure how it should be optimized. For example, you can add a goal to minimize cost or maximize profit.

To add a goal

  1. In the Modeling Pane, click the Goals tab.

  2. Click New.

  3. In the Name field, type a unique name.

  4. In the Kind field, choose Minimize or Maximize.

  5. In the Expression field, type the OML code to express the goal. The following code example demonstrates a goal. This goal minimizes the cost of the aircraft routes by using the Sum and ForEach expressions to calculate the possible routes with different types of aircraft.

    Sum[
            {iter5, Aircraft},
            Plus[Foreach[
              {iter6, Routes},
              Cost[iter5, iter6] * Allocation[iter5, iter6]
            ], Foreach[
              {iter7, Routes},
              Bumped[iter7] * RefundAmount[iter7]
            ]]
          ]
    
  6. (Optional) In the Description field, type a comment that describes the goal.

Note Note

This example is based on the stochastic model in the Excel Samples for Solver Foundation that demonstrates how to allocate aircraft to different routes.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.