- Posts: 1
SamUL Error Catching
- bengtURS
- Topic Author
Less
More
24 Feb 2013 14: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
Thanks,
Ben
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5423
25 Feb 2013 11:30 #1363
by pgilman
Replied by pgilman 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.
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: pgilman