-
Notifications
You must be signed in to change notification settings - Fork 0
Object Relationships
The GAM_OBJECTRELATION table is meant to represent the relationship between objects. Here, a relationship between two objects usually refers to objects are connected by the flow of Helium through the system. When Helium moves from one object to another, there is a relationship between the two. The information stored by this table is used for the representation of the system in the web client used at HZB.
Some examples of relationships and the devices connected by them are:
- Vessels are assigned to level meters through relationships
- Level meters are assigned to positions through relationships
- Level meters are assigned to base stations through relationships
- Base stations are assigned to positions through relationships
- Positions are assigned to positions through relationships and thus define the network
- Vessels are assigned to balance devices using relationships
- Positions are assigned to sections through relationships
- Vessels are assigned to sections using relationships
Some objects such as positions or base stations are most of the time static, while others such as level meters and vessels are not. This reflects on the status of relationships, which can be permanent or temporary. When a vessel moves around, a relationship between the level meter and a coordinator is ended and a new relationship is made with the coordinator that is now the closest.
In order for a balance measurement to be made and thus for a vessels to be checked in or out, a relationships needs to be created between the vessel and the balance device. This relationship is only active while the vessel is being weighed, and as a result it ends in only a couple of seconds.
A vessel can be assigned to a section for a certain time where at the begin and at the end of the assignment a balance measurement is performed. So multiple relationships (vessel to section and to balance, and to level meter) can be active at the same time.
The OR_OUTFLOW attribute is used for relationships between a position and any another object except coordinators. It is used to specify if the object feeds into the position (before a gas counter) or drains the position (after the gas counter). This attribute impacts in addition how the object connected to the position is displayed, left or right of the position. The value of it is 0 (or NULL) for feeding the position, and 1 for draining the position. For relationships between coordinators and positions, this attribute will always be NULL.
The OR_SYSTEMFEED attribute is used for relationships between a gas counter module and a position, and for relationships between a position and a section. It is used to specify, if the amount of gas measured by a gas counter at this position drains or feeds the network or the section. The value of it is 0 (or NULL) for no feed or drain (default), 1 for feeding the system, and 2 for draining the system. For other relationships, the attribute will always be NULL. This attribute is important to determine the overall feeds and drains to networks and sections through gas counters. A position can be assigned to different sections with different values for OR_SYSTEMFEED, e.g. on the boundary between two sections.
The booking request attribute is used to coordinate various programs that make up the Helium Management Program.
When you book in a gas bottle, the measurement program needs to tell the bottle program it is booked in. The relationship in this case is between the bottle and the position.
This attribute is usually only used for relationships between bottles and positions, but could be used for relationships between vessels and balance devices.
Primary relationships are relationships between coordinators and positions whose position is the default position of the coordinate to be given to a vessel. There is at most one primary relationship for each coordinator. A relationship is primary if it is specified in the OR_PRIMARY attribute. This attribute is only used for relationships between coordinators and positions.
The order of the assignment is of great importance. The assigned object's ID (object1.OB_ID) has to be entered in the attribute OR_OBJECT_ID_ASSIGNED. The object's ID to which the object 1 is assigned to (object2.OB_ID) hast o be entered in the attribute OR_OBJECT_ID.
An object that has to be measured is always assigned to a module which is perfoming the measurement.
example: vessel (object1) assigned to balance or level meter (object2)
example: gas counter (object1) assigned to gas counter module (object2)
Objects are in general assigned to positions.
example: level meter (object1) to position (object2)
example: gas counter module (object1) to position (object2)
example: bundle (object1) to position (object2)
Reationships between positions indicate physical connections between those (gas lines). The flow direction is defined by the selection of the assigend object. The assigned position (object1) always feeds into the other position (object2).
example: position1 (object1) feeds into position2 (object2)
The only other exception where a position is assigned to another object is the relationship between the position and a section. Here the position is assigned to the section.
example: position1 (object1) is assigned to section1(object2)
There are two many to one relationships between this table and the GAM_OBJECT table, each relationship must be between two object, but objects do not have to participate in a relationship. These two relationships are represented by two foreign keys.
| Attribute name | Attribute meaning | Data type | Mandatory | Notes |
|---|---|---|---|---|
| OR_ID | ID of relationship | 32-bit Integer | Yes | It is the primary key. It is automatically incremented, no need to set it manually. |
| OR_PRIMARY | Whether the relationship is a primary relationship. | Integer from 0 to 9 | No | Only used for relationships between coordinators and positions. It is 1 for a primary relationship, and NULL otherwise. |
| OR_OBJECT_ID | ID of one of the objects in the relationship | 24-bit integer | Yes | e.g. Level Meter, Coordinator It is a foreign key to the primary key of the GAM_OBJECT table. |
| OR_OBJECT_ID_ASSIGNED | ID of the other objects in the relationship | 24-bit integer | Yes | e.g. Vessel, Cryostat It is a foreign key to the primary key of the GAM_OBJECT table. |
| OR_DATE_ASSIGNMENT | Date this relationship was created | date & time | Yes | |
| OR_DATE_REMOVAL | Date this relationship was ended | date & time | No | |
| OR_OUTFLOW | Code that specifies if the object in a relationship with a position feeds or drains the position. Defines how the object is shown in the network flow graph in relation to the position. | Integer 0 or 1 | No | It is 0 or NULL for an object that feeds the position (input, left), 1 for an object that drains the position (outflow, right) |
| OR_SYSTEMFEED | Code that specifies if the object in a relationship with a position feeds or drains the system (network, section) | Integer from 0 to 2 | No | It is 0 or NULL for an object that does not feed nor drain the system, 1 for an object that feeds the system, 2 for an object that drains the system. |
| OR_BOOKINGREQUEST | Code that specifies the status of the booking request | Integer from 0 to 9 | No | It is 0 or NULL for nor request, 1 for asking to be booked in, 2 for booked in, 3 asking to be booked out, 4 for booked out, 5 for external book out, 6 for multiple book in request |
| OR_POSITION_NOT_CONFIRMED | Code that specifies the status of the booking request | Integer 0 or 1 | No | It is 0 or NULL for position confirmed, 1 for position not confirmed |
- Installation
- Update for Adding Version Control
- Update GAM to Version 1.2
- Update GAM to Version 1.3
- Configure (tbc)