Skip to main content
Industrial Automation
AFSDK
PI Asset Framework
AVEVA PI
Data Modeling

Avoiding Cyclic Relationships in AVEVA PI Asset Framework: Best Practices and Insights

Learn how to avoid cyclic relationships in your AVEVA PI Asset Framework (AF) hierarchy. Cyclic relationships can cause issues in data navigation and management. Discover best practices and insights to maintain a clear and logical structure in complex industrial systems.

Roshan Soni

6 min read

When designing a PI Asset Framework (AF) hierarchy, one of the most important aspects to keep in mind is maintaining a clear, logical structure that helps users navigate the data effectively. AVEVA (formerly OSIsoft) provides powerful tools to build flexible hierarchies in PI AF, but with this flexibility comes certain risks—especially when it comes to cyclic relationships.

What Are Cyclic Relationships?

A cyclic relationship occurs when an element in a hierarchy refers back to itself, either directly or indirectly, creating a loop. For example, if Element A references Element B as its parent, but then Element B somehow references Element A again, you have a cycle.

While this might seem like an edge case, it's surprisingly easy to fall into cyclic relationships, especially in complex industrial systems where assets can be interconnected in non-obvious ways. Cyclic relationships can occur not just with elements but also with attributes that reference other elements or attributes.

Why Does AVEVA Discourage Cyclic Relationships?

Although PI AF technically supports cyclic relationships, AVEVA generally discourages their use for several important reasons:

  1. Navigation Complexity
    One of the primary reasons for organizing assets into a hierarchy is to provide users with an intuitive way to browse, analyze, and understand data. Cyclic relationships disrupt this clarity. When a user is navigating through the hierarchy, cycles can lead to confusion as it's not always clear where a relationship begins or ends. This detracts from the intended simplicity and usability of the PI AF hierarchy.

  2. Performance Impact
    Cyclic relationships can introduce performance issues when querying data or traversing the hierarchy. PI AF and related tools like PI Vision or PI DataLink need to resolve relationships to display the correct data. Cycles can cause the system to get stuck in an endless loop of relationship resolution, slowing down performance or causing timeouts. This becomes especially critical in large hierarchies or real-time data applications, where performance is a key concern.

  3. Complications in Analysis
    Many organizations use PI AF for advanced data analysis, such as equipment monitoring, condition-based maintenance, or energy optimization. When running calculations or analyses, cyclic relationships can make it difficult to determine which data should be used and when. It complicates dependencies and can result in incorrect or incomplete analyses if the system can’t properly resolve the cyclic relationships.

Best Practices for Avoiding Cyclic Relationships

  1. Design with Hierarchy in Mind
    When creating the AF hierarchy, it’s essential to have a clear plan about how the assets are structured. Elements should follow a top-down approach, with clear parent-child relationships. Ask yourself whether an element logically belongs under another element, and ensure there are no back-references that could form a loop.

  2. Use Weak References Instead of Hierarchical Links
    In cases where multiple elements share common attributes or dependencies but don’t naturally fit into a parent-child relationship, consider using weak references. A weak reference allows you to link elements without forming a strict parent-child relationship, thereby avoiding potential cyclic relationships.

  3. Limit Multi-Parent Relationships
    While PI AF allows an element to have multiple parents, use this feature sparingly. Multi-parent relationships can often lead to cycles if not carefully managed. If you need to represent shared assets, consider using templates or categories rather than creating multiple parents.

  4. Validate Your Hierarchy
    Regularly validate your hierarchy to check for any unintentional cycles. AVEVA provides validation tools that help you identify potential issues before they become problematic. Doing this proactively ensures that your AF structure remains clean and efficient.

  5. Leverage Templates for Consistency
    Using AF element templates is a great way to enforce consistency and avoid unnecessary complexity. By standardizing the way elements are created, you can reduce the risk of unintentionally creating cyclic relationships.

Real-World Example

Imagine a water treatment plant where you’re monitoring several pumps and tanks. A tank may reference the pump that fills it, and the pump might reference the tank it’s filling. If you set up these references as parent-child relationships, you could easily create a cycle where the tank points back to the pump, and the pump points back to the tank.

Instead, use weak references or separate categories to define these dependencies, ensuring the hierarchy remains strictly hierarchical and easy to navigate. For instance, a pump could be grouped under a "Pumps" category, while tanks are grouped under "Storage," with weak references indicating the relationships between the two.

Conclusion

Cyclic relationships in PI Asset Framework can seem tempting when trying to model complex, interconnected systems. However, AVEVA discourages them because they lead to confusion, performance issues, and complications in analysis. By adhering to best practices like designing a clear hierarchy, using weak references, and validating your structure, you can create a clean, efficient, and intuitive PI AF hierarchy that enhances your organization’s ability to monitor and optimize its operations.

Remember, a well-structured hierarchy is not just a technical achievement—it’s an enabler for better decision-making and operational efficiency.


Are you working on a PI System project?
Feel free to share your experience, and let's discuss how to optimize your hierarchy for maximum performance and usability!

Tags

#Data Management
#PI AF
#Cyclic Relationships
#Data Hierarchy
#Best Practices
#AVEVA
#Industrial Systems

About Roshan Soni

Expert in PI System implementation, industrial automation, and data management. Passionate about helping organizations maximize the value of their process data through innovative solutions and best practices.

Sign in to comment

Join the conversation by signing in to your account.

Comments (0)

No comments yet

Be the first to share your thoughts on this article.

Related Articles

Enhancing PI ProcessBook Trends with Banding and Zones: User Needs, Workarounds, and the Road Ahead

A look at the user demand for trend banding/zoning in OSIsoft PI ProcessBook, current VBA workarounds, UI challenges, and how future PI Vision releases aim to address these visualization needs.

Roshan Soni

Migrating PIAdvCalcFilVal Uptime Calculations from PI DataLink to PI OLEDB

Learn how to translate PI DataLink's PIAdvCalcFilVal advanced calculations—like counting uptime based on conditions—into efficient PI OLEDB SQL queries. Explore three practical approaches using PIAVG, PIINTERP, and PICOunt tables, and get tips for validation and accuracy.

Roshan Soni

Understanding PI Web API WebID Encoding: Can You Generate WebIDs Client-Side?

Curious about how PI Web API generates WebIDs and whether you can encode them client-side using GUIDs or paths? This article explores the encoding mechanisms, current documentation, and best practices for handling WebIDs in your applications.

Roshan Soni