11 Replies Latest reply on Jan 21, 2015 1:29 PM by Dan Fishman

    Can AF Asset-Based Analytics do recalculation?

    AlistairFrith

      I am pretty sure the answer to this is 'No' but would like to know for sure. I know it can do back-filling but can it be made to recalculate a period if a historical input value is updated? If not, are there plans to enable this?

       

      The only other ways I can think of to do this are:

      • The Performance Equation Recalculator, but performance equations are not maintainable/flexible/extensible/etc. enough
      • PI ACE but most of the calculations we require can probably be done perfectly adequately in AF Analytics and would be far easier and quicker to develop this way. We have also had varying amounts of success with ACE recalculations in the past.

       

      Unfortunately recalculation is, I gather, an essential part of this new project we are about to embark on so any advice here would be greatly appreciated. Does the AF SDK allow any possibilities here?

       

      Regards,

       

      --- Alistair.

        • Re: Can AF Asset-Based Analytics do recalculation?
          dng

          Hi Alistair,

           

          You are correct, recalculation is currently not possible for Asset-Based Analytics. If an Analysis already has data during the time range that needs to be backfilled, the data must first be deleted. You can refer to KB01056 for more information.

          I agree that recalculation is a very useful feature. In fact, there is an existing enhancement request to enable this.

           

          Regarding programmatic ways to achieve what you wanted, let me get back to you. Meanwhile, others might chime in if they have done something similar before

            • Re: Can AF Asset-Based Analytics do recalculation?
              AlistairFrith

              Could it be done then by programmatically deleting the offending results and then invoking the backfill for the period? I believe the input data would be modified by a user through a custom UI and so this could also trigger such a 'delete/backfill' process.

                • Re: Can AF Asset-Based Analytics do recalculation?
                  Dan Fishman

                  We don't have programmatic method that is publicly exposed to send a back-fill request . I can think of a pretty nasty workaround but it isn't using the service to backfill.  I think you could get a preview of the results as Rhys Kirk describe in this post.  I wouldn't recommend this approach but it is out there to consider!

                   

                  Daphne brings up a good point, " If an Analysis already has data during the time range that needs to be backfilled, the data must first be deleted. "  I believe that is not true for PI Anlaysis Service 2014 R2 and is only true for the first release.  I'm pretty sure we can backfill over existing data and we will only add new data if data does not exist at the timestamp.  I can imagine a lot of discussion on the "correct" method to backfill/recalculate.


                  • Re: Can AF Asset-Based Analytics do recalculation?
                    dng

                    Hi Alistair,

                     

                    You can certainly programmatically delete unwanted data. However, as Dan has mentioned, there are currently no easy way to send a backfill request programmatically. I believe this is still under discussion since your previous post, as I do see an enhancement request about this functionality.

                • Re: Can AF Asset-Based Analytics do recalculation?
                  skwan

                  Alistair:

                   

                  Recalculation is high on our future enhancement list but unfortunately in order to do recalculations in a HA environment and to do it in a high performance manner, we first have to tackle a few other issues.  I want you (and other readers) to know that we're not ignoring this very important features.

                  --

                  Steve Kwan

                  AF Product Manager

                    • Re: Can AF Asset-Based Analytics do recalculation?
                      AlistairFrith


                      Thanks, I had not considered HA and this could also be an issue as the customer has HA. If changes are made to historical data, does this need to be explicitly applied to all nodes in the collective? What about AF Backfilling, does that cope with an HA system?

                       

                      I will have a look at Rhys's recalc 'shim' when I have a little moew time.

                       

                      We also need to expose various AF editing features along with some other stuff and would rather not re-invent PSE. Is it possible to either extend PSE or host PSE components in a custom application? Should this be asked as a separate thread?

                       

                      Regards,

                       

                      --- Alistair.

                        • Re: Can AF Asset-Based Analytics do recalculation?
                          Dan Fishman

                          Backfilling AF will only look at one server for the read and you can buffer to both systems when you write. 

                           

                          Many of the AF controls are included in the AFUI.SDK and can be used in custom applications.  I did see this interesting discussion.

                            • Re: Can AF Asset-Based Analytics do recalculation?
                              AlistairFrith

                              That looks extremely interesting. So either mechanism is 'possible' but creating custom PSE plugins is not actually supported. I think importing PSE components in a custom application would be preferable anyway. Many thanks.

                               

                              Recalculation sounds like it is going to be more of an issue though. Shame.

                                • Re: Can AF Asset-Based Analytics do recalculation?
                                  skwan

                                  You are correct that we currently do not officially support custom PSE plugins, although that hasn't stopped others from doing it .

                                   

                                  Just to further clarify what Dan said previously, when using asset analytics, you can basically boil it down to 3 steps - getting the inputs, doing the calculations and writing the outputs.  Everything is done using the AF SDK.  As such, when doing backfill, we would get the inputs from the currently primary PI Data Archive.  If you somehow have different data in the primary vs. the secondary, it is possible that your inputs are not what you intended.  As to writing the outputs, you should have enabled BufSS, in which case BufSS takes care of ensuring outputs are written to all members of the collective.

                                   

                                  --

                                  Steve

                                  AF Product Manager

                          • Re: Can AF Asset-Based Analytics do recalculation?
                            Lonnie Bowling

                            Reckon this recalculation problem is a hard one to figure out. I think there will be a lot of us very happy when it happens, but I'm glad I'm not the one trying solve the problem