5

I have a model that runs a series of reclass calculations on a Feature Layer.

I want to run several "summary statistics" tools in different locations to allow testing/ viewing of the results of the sequential reclass operations.

The "summary statistics" must be run as a precondition to the next reclass operation, because each time a new reclass is conducted, the data changes. So the point in time at which the summary statistics runs is important.

I would ideally like to be able to control these summary statistics tool runs to be optional via a single Boolean tick box. This would allow an option to run the model without all these separate summary statistics in order to reduce model run time.

Is there any way to make all the summary statistics calculations optional (e.g. via a Boolean tick-box) but still when run for the summary statistics to run in the correct locations (e.g. like a precondition).

The main issues are:

  • If the model is set with a precondition, but the Boolean tick-box is turned off then the main model will not run
  • I know I could run a copy feature from each stage of the model and save to disk, or in memory and then have the summary statistics run on those copies, however this would not result in any time saving
  • I can't use a set of make feature layers and use them as the source for the summary statistics because the underlying feature layer data changes during the model run
  • I have looked into if then else commands and branching, but I can't see how to use this, without having to make lots of copies of the data at each split when two branches are created

a section of the model - this is repeated many times

2
  • I would try making the connection from "Output Values" to the copy features a precondition. Then make sure that Output Values is a string rather then a number which will make sure it doesn't act as a boolean precondition for Coppy features but it will happen first. If you need the Value of Output Value as an input to Copy features use the %Value% substitution. I hope that works, I'm not 100% certain that I understood the problem correctly.
    – see24
    Commented Feb 5, 2014 at 22:10
  • thanks, your comment that there is a difference between number and text outputs acting as Boolean preconditions is useful. However the issue I was having was that I wanted to use the first Boolean tick box to control whether this section of the model ran or did not run. If this model section contains a precondition and the initial tick box is turned off then the main model will then not run.
    – user21053
    Commented Feb 18, 2014 at 19:14

1 Answer 1

2

A solution to this issue is as follows, using a sub model.

A sub model is created which includes two branches, using the merge branch tool. One branch is created using a simple calculation such as Calculate Value 1+1. The output of the merge branch is then set as the precondition to the main model. The sub model always produces an output, so the precondition always occurs and the main model always runs.

In the sub model a Boolean tick box, set as a parameter, can then be used to set up a series of calculations that if run would then reach the merge branch tool.

This can be used to run any series of optional calculations or analysis part way through a model progress, e.g. checking Summary Statistics etc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.