Closest Facility Analysis Error when Executed in ModelBuilder

882
3
03-01-2019 04:55 AM
ZeldaEls
New Contributor II

Hi Everyone

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.

Kind regards

Zelda

   

0 Kudos
3 Replies
JaySandhu
Esri Regular Contributor

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.

Jay Sandhu

0 Kudos
ZeldaEls
New Contributor II

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'.

0 Kudos
JaySandhu
Esri Regular Contributor

I can't say why the sub layer drop down list would be empty. I would suggest trying to recreate another model and seeing if the problem goes away.

Jay Sandhu

0 Kudos