turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Navigation
- Tecnomatix
- Forums
- Blogs
- Knowledge Bases
- Groups

- Siemens PLM Community
- Tecnomatix
- Plant Simulation
- Lognormal distribution gives error in SimTalk

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-18-2017 09:41 AM

Good day

I am trying to execute this code in SimTalk:

is

s : real;

do

s := z_lognorm(1, 9.1453, 1.7264);

end;

It works as I presented it here, but when I change the expression to include boundaries, e.g.

s:= z_lognorm(1, 9.1453, 1.7264, 78, 448000);

The error message is "The maximum number of consecutive trials for sampling a random value has been exceeded..."

Can anyone please help me to understand this error?

Solved! Go to Solution.

3 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-18-2017 09:54 AM - edited 09-18-2017 10:07 AM

You want to generate outcomes in the range 78 to 448000, whereas the mean of your distribution is 9.14.... It means that nearly all the sampled values will be thrown away. You can check it by recording the samples from the unbounded distribution and check how many are at or above 78.

I am not sure why you chose this distribution with these settings, but either one seems not correct.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-18-2017 10:07 AM

Thank you Gert. It makes sense.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-18-2017 01:39 PM

The best thing is to reread the documentation. The parameters can be a bit confusing, though they make sense on the Plant Simulation side.

The problem is most likely the parameter mu. In the software it denotes the expected value. However, in the texts about this distribution, there is often also mention of a parameter mu, which is used in combination with sigma to calculate the expected value. Hence, two times mu, yet each with a different meaning.

I hope this helps you to arrive at the correct settings...

Follow Siemens PLM Software

© 2018 Siemens Product Lifecycle Management Software Inc