Location Optimizer Macro

Version:
2019.3
Last modified: October 09, 2019

The Location Optimizer Macro is a macro that runs in multiple iterations determining the best locations to add or remove from a location network. You can specify how many locations you would like to add to the network, specify the optimization level, and then have it randomly seed or specifically seed the iterations.

Say you have 100 demand locations and would like to isolate the top 4 based on a specific value, the iterative process is such that the entire incoming data stream is processed in groups of 4 to identify the locations with the highest combined score. The user controls how many iterations to run via the Speed/Optimization setting.

Access macro properties

Location Optimizer macro properties only display on the Test tab in the Interface designer. You cannot edit the contents of the Test tab from the Interface Designer.

Design a Location Optimizer macro

Set up your workflow to be a Location Optimizer workflow:

  1. In the Configuration window, select the Workflow tab.
  2. Under Type, select Macro and then from the dropdown Location Optimizer Macro.

After the workflow is saved as a Location Optimizer macro, each tool in the workflow gets a lightning-bolt anchor, which indicates that there are Interface elements and actions updating a workflow tool. Only Interface tools can connect to those kinds of anchors.

Configure the Location Optimizer properties, found in the Interface designer window (ctrl+alt+D) or the View menu. Click the wrench icon to view the properties.

  1. Potential Locations Input: Select the Input tool in the workflow that contains the potential locations for analysis.
  2. Score Output: From the dropdown menu, select the output tool in the workflow that contains the value you are scoring on.
  3. Choose the optimization for either a high score or a low score. If you want a high score, select Optimize for High Score. If you want a low score, select Optimize for Low Score.

Save your workflow.

Configure a Location Optimizer macro

You have two ways to use a Location Optimizer macro in your workflow:

  • Right click on the canvas and choose Insert Macro ... and then browse to the file location of the desired macro.
  • Drag the macro from the Tool Palette to the canvas. Specify macro directories to display in the Tool Palette from Options > User Settings > Edit User Settings. Create macro repositories from the Macro tab. See User settings.

Configure the tool by entering parameters in the tabs.

Location Optimizer tab:

1. Use the up and down arrows to specify the Number of Locations to Add. This is the number of location records returned.

2. Set the Speed/Optimization:

  • Fast: Speed optimization. The workflow runs fastest with this setting, but you may compromise accuracy.
  • Balanced: This setting balances speed and accuracy.  The workflow runs slower than the fast setting, but is more accurate.
  • Accurate: This setting produces the most-accurate results, but may compromise speed.
  • Custom: Set your own speed optimization. Use the up and down arrows to set the percent within generations.

3. Random Seed: There are many random seeds in the back-end processes. By specifying a seed, you can be assured that the same sequences of numbers are run. This guarantees the same data, seed, and results each time you run the workflow.

  • Automatic: A random seed is used. Expect results to vary from one run to the next.
  • Specific: This guarantees the same data, seed, and results each time you run the workflow. To set the seed, specify any random number.
Was This Helpful?

Need something else? Visit the Alteryx Community or contact support.