Compute Filling Ratio (Sys3D_ComputeFillingRatio)

An opening ID is an entry point used to customize business logic. The Sys3D_ComputeFillingRatio computes the filling ratios for the list of pathway segment arcs.

Note: For more information about customization by business rules, see Customization by Business Rules.

This page discusses:

General Information

This opening ID is invoked when the filling ratio for a network object is calculated.

Definition Description
PLM Opening ID Sys3D_ComputeFillingRatio
Customization intent Computation
Execution context Client

Input Objects

Input objects must be of the following types:

  • ThisObject: 3D mockup root occurrence
  • Parameters: corresponds to the context object.

Context Object Parameters

Parameter Name Type Read or Write Comments
ListNetworkArcs List of features Read Contains the pathway segment arc object for which the filling ratio is to be computed.
ListFillingRatios List of real Read Contains the filling ratio computed for pathway segment arc objects.

Sample

let ListOfElem(LIST)
let NbElem(INTEGER)
let idx(INTEGER)
let idx2(INTEGER)
let PathwaySegSectionArea(Area)
let NetworkArc(Sys3DNetworkArc)
Let PathwaySegmentArc (Sys3DPathwaySegmentArc)
let RoutedSignals(List)
let signalFeat (Feature)
let signalOcc (LogicalOccurrence)
let signalRef (RFLVPMLogicalReference)
let signalTypeRef (RFLVPMSystemTypeReference)
let sDesc (STRING)
let SignalSectionArea (AREA)
let TotalArea(AREA)
let listFillingRatio(LIST)
let listValues (LIST)
let sValue (STRING)

set ListOfElem = Parameters->GetAttributeObject("ListPathwaySegmentArcs")
set NbElem = ListOfElem->Size()

idx = 1
for idx while idx <= NbElem
{
	listFillingRatio.Append(0)
	set PathwaySegmentArc = ListOfElem->GetItem(idx)
	if(NULL <> NetworkArc)
	{
		PathwaySegSectionArea = PathwaySegmentArc.Sys3D_SectionArea
		
		PathwaySegmentArc.GetRoutedSignals(RoutedSignals)
		idx2 = 1
		for idx2 while idx2 <= RoutedSignals.Size()
		{
			if(NULL <> signalOcc)
			{
				set signalRef = signalOcc.Reference
				if(NULL <> signalRef)
				{
					set sDesc = signalRef.V_description
				}
			}
			else if (NULL <> signalTypeRef)
			{

				set sDesc = signalTypeRef.V_description
			}	
			if(sDesc <> "")
			{
				let index2 (INTEGER)
				set index2 = 1
				for index2 while index2 <= 8
				{
					let pos (INTEGER)
					set pos = sDesc.Search("#")
					if(0 <= pos)
					{
						set sValue = sDesc.Extract(0, pos)
						let sTemp (STRING)
						set sTemp = sDesc.Extract(pos, sDesc.Length() - pos)
						set sDesc = sTemp.Extract(1, sTemp.Length()-1)
					}
					else
					{
						set sValue = sDesc
						set index2 = 10
					}
					listValues.Append(sValue)
				}
				if(4 <= listValues.Size())
				{
					set sValue = listValues.GetItem(4)
					set SignalSectionArea = sValue.ToDimension("Area")
					set TotalArea = TotalArea + SignalSectionArea
	
				}
				
			}
			set TotalArea = 1.4 * TotalArea
			let FllingRatioValue(REAL)
			set FllingRatioValue = (TotalArea/PathwaySegSectionArea) * 100
			listFillingRatio.SetItem(FllingRatioValue, idx)
		}		
	}
}

Parameters.SetAttributeObject("ListFillingRatios", listFillingRatio)

Parameters.Severity 	= 0
Parameters.Message 	= "Business Rule computed filling ratio"