I am trying to do complete a closest facility analysis for publishing as a web tool once successful. I have completed the individual steps and get it solved. However, when I build these steps into ModelBuilder and try to solve it – I get the following error:
0 location(s) in "Incidents" are valid. Need at least 1 valid location(s).
ERROR 030024: Solve returned a failure.
Insufficient number of valid locations in "Facilities" or "Incidents".
Failed to execute (Solve).
I have also used a Python script to run the analysis and though it executed successfully, I have issues getting it published as a web tool.
Can you please advice? I have a suspicion it might be the sub layers as it does not show in the "Add Location"-tool.
In your model you have the Add Locations tool two times. I am hoping that once it is to load Facilities and the second to load Incidents. Make sure that when you are loading the incidents, the sub-layer in the Add Locations tool is actually set to Incidents. By default it is set to facilities. So you may be loading both sets of locations as facilities and no incidents are loaded.
You can double-click on the add locations box and then check the sub layer parameter and set to Incidents where needed.
Yes, that is the way I have set it up - one for facilities and the other for incidents. However, in the two "Add Locations" tools the drop-down list is empty for "Sub Layer" - I cannot select "Incidents" or "Facilities'.