Select to view content in your preferred language

How should I improve my ModelBuilder to get more precise and accurate output?

4202
9
04-09-2016 10:07 AM
FereshtehAghyan
Deactivated User

How I can improve my ModelBuilder to get more precise and accurate output? I have a main model which contains about 20 sub-models, and when I run it, it doesn't give me output of some sub-models.

individual sub-models run perfectly, the issue occurs when I run a batch of them in the main model.

0 Kudos
9 Replies
DanPatterson_Retired
MVP Emeritus

impossible to say without seeing the model or its purpose.  Also, what is the advantage of running it all at once versus running it in subcomponents, where you could examine intermediate outputs before continuing on to the next step.  I am not clears on how the subcomponents could be more accurate than the whole unless the environment settings differ between the two.  Do you explicitly set the environments in your model or do you rely on global/unknown settings?

Lots of questions.

FereshtehAghyan
Deactivated User

Hi Dan,

Thanks for your response. This model has 7 Parameters, these sub-models do different queries(spatial join, select by locations and select by attributes), and selected features are supposed to be joined in a single output. I am running this at once to save a time. I have set the environment to "in-memory" to avoid breaking path when I send it out to other people.

0 Kudos
DanPatterson_Retired
MVP Emeritus

Still don't see the model... summary so far...

  • the accuracy thing is a non-issue but you want to save time.... this point needs to be clarified since that may be the root of the next issue
  • you have differences/errors(?) in the submodels or differences when the full model is run, so there is a descrepancy then...which is right
  • what are those differences?
0 Kudos
FereshtehAghyan
Deactivated User

The accuracy is important, however it is really helpful  if I will be able to run a batch of models inside a full model.

I don't have access to the model now, so I cannot share it here, but I can give examples of the issues. I have a sub-model which selects all lines(lets say streams) inside a polygon(a county). My task is to select all streams outside the county.

in the first step, the sub-model selects all the streams(by using select by attribute) then in next step, it removes streams within a county from selection (by using select by location).  The sub-model  selects (15 out of 70 streams), but by running that in the full model, all 70 streams appears in my output, or sometimes a sub-model selects some features, but when the full model is run, non of those features appears in my output. I don't get any error while the full model is running.

Thanks for your help.

0 Kudos
DanPatterson_Retired
MVP Emeritus

either the selections aren't being honored between submodels or the wrong connections have been made between them

curtvprice
MVP Esteemed Contributor

It's really hard to say anything with out some test examples that demonstrate the issue. But you aren't the first to have some frustration with Model Builder.

On soapbox...

My opinion is that Model Builder is very useful for doing fairly straightforward tasks, but for more complex tool development you need to go to Python. As you learn more about ArcGIS geoprocessing and tool validation, and know enough Python to work around MB's shortcomings with the Calculate Value tool, you can get even more done with it... Model Builder is also a great protyping tool--you can use it to figure out a workflow, and then implement it in Python. I'm not trashing Model Builder, it just has limitations that should be kept in mind.

Just waiting for a big complex model to validate with every little change is enough to make you crazy. And if you have to do much parameter validation for your tool (which is pretty critical for usability when writing a tool for sharing with others) Python development is the way to go. 

NeilAyres
MVP Alum

Curtis has hit it right on the head..

Once a model gets too big to see without panning back and forth, export it to python and roll your own.

FereshtehAghyan
Deactivated User

Thank you all, I have broken  the model down to the small pieces and have gotten the better result. I am also trying to transform the model to python now, "cross your fingers for me"!

0 Kudos
DanPatterson_Retired
MVP Emeritus

to assist ... "You are not allowed to use Geoprocessing Results... ": The Students get smarter

and there is another one on my blog about using the Results window.

0 Kudos