SamUL Error Catching

  • bengtURS
  • Topic Author
More
24 Feb 2013 21:48 #1362 by bengtURS
SamUL Error Catching was created by bengtURS
I have an script to batch model simulations for a group of weather files. Some of the weather files do not have sufficient data to run the model and SAM produces a pop-up error. Is there a way to catch this error and allow the script to continue without needing to click the close button?

Thanks,
Ben

Please Log in or Create an account to join the conversation.

  • Paul Gilman
More
25 Feb 2013 18:30 #1363 by Paul Gilman
Replied by Paul Gilman on topic SamUL Error Catching
Hi Ben,

For now (as of SAM 2013.1.15) the Simulate() function does not return a value, so you cannot use it to catch simulation errors.

The MPSimulate() function returns false when a simulation fails. It is intended for multi-processor simulations, but in its current form can run more slowly than Simulate().

See the Multiprocessing script in the sample file SamUL Samples.zsam for an example of how to use MPSimulate().

Best regards,
Paul.

Please Log in or Create an account to join the conversation.

Moderators: Paul Gilman
Powered by Kunena Forum