The results obtained from `.get_results`

The VE Python API allows users create simple programs using the Python Programming Language, to interact with a VE Model and/or Vista Results File
Post Reply
uniShen
VE Newbie
VE Newbie
Posts: 4
Joined: Thu Jul 20, 2023 3:55 pm

The results obtained from `.get_results`

Post by uniShen »

Hello,
I would like to get the total number of people and total infiltration rate of all modelled rooms for each time step. However, the function `.get_results` does not work as expected. With the code below, I get the max of NoP as 0.4 while maxNoP_oneroom as 13.7. It seems that this function doesn't sum the NoP of all rooms for each time step. Instead of using `.get_results`, I sum the results of all rooms by myself (it is okay for me to do it from my side).

From the documentation, this function should return the model-level results. I just wonder if it is a bug. If not, how I can get the total number of people/total infiltration rate from this function?

Thanks!!! :)

Code: Select all

NoP = results_reader.get_results('Number of people','Number of people','z')
print(max(NoP))

NoP_oneroom = results_reader.get_room_results(room_id,'Number of people','Number of people','z')
print(max(NoP_oneroom))
bbrannon4
VE Professor
VE Professor
Posts: 111
Joined: Wed Feb 12, 2014 6:56 pm

Re: The results obtained from `.get_results`

Post by bbrannon4 »

Are you looking for the peak input total number of people? What you are pulling right now are effectly outputs (the documentation, which I agree isn't clear, says it will return a numpy array of floats, which is a pretty good indicator that you are getting timestamp level outputs).

If I understand you correctly, try using get, as defined here: https://help.iesve.com/ve2023/6_1_16_ro ... 3D&mw=MjQw
uniShen
VE Newbie
VE Newbie
Posts: 4
Joined: Thu Jul 20, 2023 3:55 pm

Re: The results obtained from `.get_results`

Post by uniShen »

Hi, thank you for your update. I'm seeking the total number of people in all modelled rooms for each time step. I understand how to obtain the desired results, but I'm not sure why the `.get_results` function isn't functioning as expected :? . Could you clarify what you mean by 'effectly outputs'? Thanks!
uniShen
VE Newbie
VE Newbie
Posts: 4
Joined: Thu Jul 20, 2023 3:55 pm

Re: The results obtained from `.get_results`

Post by uniShen »

Forget to mention, I use the max() function to validate whether NoP represents the summation of 'Number of People' across all rooms at every time step.

In the example above, I tried to use .get_results() function to obtain the total 'Number of People' across all modelled rooms at each time step. In theory, max(NoP) should be greater than max(NoP_oneroom). However, the max(NoP) value I got is much smaller than max(NoP_oneroom).

Then, I am curious about why .get_results() function didn't return the result as expected.
Post Reply