cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Probability

GP_10383074
7-Bedrock

Probability

Hi Guys,

 

I'm doing assignment related to passenger transit probability which indicates the probability that a passenger chooses to travel from floor ''i'' to the floor ''j''. This is only 4 floor building.

''P_arr'' is an arrival rate on each floor and ''U'' is a dedicated population on each floor.

 

This is a formula which I have to use.

formula.png

 And this is my initial matrix from Word for calculation's

Screenshot 2022-08-24 at 22.39.06.png

 

Does anyone know how to create a matrix 4x4 like below from vector ''U'' and vector ''P_arr"? 

 

Screenshot 2022-08-24 at 22.38.31.png

 

 

  This is actual case study from one of journals and there are results for this if this helps a bit

Screenshot 2022-08-24 at 22.41.08.png

 I would be very grateful for help

Greg

ACCEPTED SOLUTION

Accepted Solutions
LucMeekes
23-Emerald III
(To:GP_10383074)

See attached file.

 

Success!
Luc

View solution in original post

8 REPLIES 8
LucMeekes
23-Emerald III
(To:GP_10383074)

Hi Greg,

 

Please attach your Prime Worksheet. That saves us from retyping.

 

Success!
Luc

Hi Luc,

 

Thanks for your reply. Please see attached file.

 

Greg

LucMeekes
23-Emerald III
(To:GP_10383074)

See attached file.

 

Success!
Luc

Thanks a lot

 

Greg

LucMeekes
23-Emerald III
(To:LucMeekes)

Or, as long as you keep the vectors P.arr and U the same size, you can do without the explicit indexing:

LucMeekes_0-1661432044316.png

and with that  you can:

LucMeekes_1-1661434867319.png

Note that you cannot assemble it into a single expression, due to the vectorization(s) needed.

 

Success!
Luc

Thanks

 

Hi,

 

I have another quick question related to probability.

 

Screenshot 2022-08-26 at 15.25.02.png

 For this calculations I have to use "r" (length of travel in floor length) only from first row (i=0) and vector "U" (population on each floor).

 

Screenshot 2022-08-26 at 15.30.33.png

 For some reason I have an error, any advice??

 

Screenshot 2022-08-26 at 15.39.43.png

Greg

LucMeekes
23-Emerald III
(To:GP_10383074)

For not just some, but an obvious reason.

Your r[0, j vector contains the values 0 through 14, and you let the summation run up to r[0, j -1 .

The first time, for j=0, that results in r[0, j-1 = -1, while your ORIGIN=0.

You're trying to index the array U at -1, while its index starts at 0, hence the index is illegal.

 

Success!
Luc

Announcements

Top Tags