How to assign weights as user-defined variables in model builder for the Weighted Overlay tool

04-06-2021 09:18 AM
New Contributor

I am trying to create a model in ArcMap 10.7.1 that will create a weighted overlay of a population density raster, a land cover raster, and a traffic volume raster. The goal is for the user to choose which weight to give each raster. I have been trying to use the Calculate Value (model builder only) tool to create a weighted overlay table that will allow the user to enter the weights. The model will be published as a geoprocessing service and used within a web mapping application.

This is my model, followed by a screenshot of the code used in the calculate value tool:



I created a variable for the expression for the calculate value tool, which uses inline variable substitution to allow the user to enter the weights as model parameters. Here is the expression: 


This calculate value tool works for me, and if I run it, and then add the weighted overlay tool to the model, I can run the weighted overlay. However, when I try to run the model as whole, the weighted overlay tool becomes white, meaning that it is not ready to  be run. When using the GUI for the model, I receive an error saying that the weighted overlay table does not exist. 

Here is the table that appears to be used by the weighted overlay tool when I run each tool individually in model builder:


The weighted overlay runs successfully doing each tool individually, as shown in the screenshot below, but when run as a whole, the weighted overlay tool becomes white, like in my first image. 



Finally, here is the GUI along with the error message that I receive: 



If anyone has any ideas on why my weighted overlay table is not being read as the correct type, or notices any other issue that may be causing this result, I would greatly appreciate it!

0 Kudos
0 Replies