Browse Source

xls:增加测试生成拓扑数据

xls 6 years ago
parent
commit
055f7fcaf3

+ 3 - 40
MBI/SAGA.GplotManage/GplotCommand.cs

@@ -6,6 +6,7 @@ using Autodesk.Revit.DB;
 using Autodesk.Revit.UI;
 using Newtonsoft.Json;
 using SAGA.GplotDrawData.View;
+using SAGA.GplotManage.RelationManager;
 using SAGA.GplotManage.UploadRelated;
 using SAGA.GplotRelationComputerManage;
 using SAGA.Models;
@@ -157,46 +158,8 @@ namespace SAGA.GplotManage
                 graph.Upload();
 
             }
-            //var relationDatas = RelationDataUtil.BuildRelations("ChillWaterLoop");
-            //Criteria Criterias = new Criteria
-            //{
-            //    criterias = relationDatas
-            //};
-            //var relation = ConvertJsonString(Criterias);
-            //MessageShow.Infomation(relation);
-            #region 连接关系测试
-            //var pickElement = ExternalDataWrapper.Current.UiApp.PickElement("选择元素");
-            //if (pickElement != null)
-            //{
-            //    var paths=pickElement.GetRouteElements((e)=>e is Pipe);
-            //    if (paths.Any())
-            //    {
-            //        StringBuilder sb = new StringBuilder();
-            //        paths.ForEach(p => sb.AppendLine("Rount:" + p.ToString()));
-            //        MessageShow.Infomation(sb.ToString());
-            //    }
-            //    else
-            //    {
-            //        MessageShow.Infomation("未检索到相关路径");
-            //    }
-
-            //    var joinItems = pickElement.GetAllJoinElements();
-            //    var ids = string.Join(",", joinItems.Select(c => c.Id.IntegerValue));
-            //    MessageShow.Infomation(ids);
-            // }
-            #endregion
-
-            //var familyInstances = ExternalDataWrapper.Current.Doc.FilterElements<FamilyInstance>().Where(fi => MBIInfoUtil.IsEquipment(fi))
-            //    .ToList();
-            //var useEquipments = new List<FamilyInstance>();
-            //foreach (var familyInstance in familyInstances)
-            //{
-            //    var fi = familyInstance.GetFamily().Name.Contains("SECB");
-            //    if (fi)
-            //    {
-            //        MessageShow.Infomation(familyInstance.Id.ToString());
-            //    }
-            //}
+            WinComputeRelations win = new WinComputeRelations();
+            win.ShowDialog();
             return Result.Succeeded;
         }
         private string ConvertJsonString(object object1)

+ 33 - 16
MBI/SAGA.GplotManage/RelationManager/ElectricalRelationUploader.cs

@@ -15,39 +15,56 @@ namespace SAGA.GplotManage
             CurrentHandler = ElectricalRelationHandlerFactory.Create(relationType);
         }
         public IElectricalRelationHandler CurrentHandler { get; private set; }
-        public override void Upload()
+        protected override object GetDefaultUploadData()
         {
             //计算数据
             if (CurrentHandler == null)
-                return;
-
+                return null;
             //加载数据
-            var data = CurrentHandler.GetComputeData(new PowerComputerContext()); ;
-
-            //使用数据
-            Upload(data);
+            var data = CurrentHandler.GetComputeData(new PowerComputerContext());
+            return data;
         }
-        public override void Upload(object loadData)
+
+        protected override List<GraphRelationItem> CreateGraph(object loadData)
         {
+            List<GraphRelationItem> items = new List<GraphRelationItem>();
             List<DataNode> dataNodes = loadData as List<DataNode>;
             if (dataNodes == null)
             {
-                return;
+                return items;
             }
-            //上传数据处理
+            foreach (DataNode dataNode in dataNodes)
+            {
+                items.AddRange(CreateGraph(dataNode));
+            }
+            return items;
         }
-
         #region 数据上传方法
-        private void CreateGraph(DataNode dn, List<ReleateData> data)
+        protected List<GraphRelationItem> CreateGraph(DataNode dn)
         {
-            if (dn.Childrens.Count > 0)
+            List<GraphRelationItem> items = new List<GraphRelationItem>();
+            if (dn!=null&&dn.Childrens.Count > 0)
             {
-                foreach (var n in dn.Childrens)
+                foreach (var child in dn.Childrens)
                 {
-                   // data.Add(GetReleateData(dn.EId, n.EId));
-                    CreateGraph(n, data);
+                    GraphRelationItem item = new GraphRelationItem();
+                    item.FromId = dn.EId;
+                    item.ToId = child.EId;
+                    item.RelType = "1";
+                    //item.GraphId = string.Empty;
+                    if (!string.IsNullOrWhiteSpace(child.InLineNo1) && child.InLineNo1 == dn.Sno)
+                    {
+                        item.RelType = "1";
+                    }
+                    else
+                    {
+                        item.RelType = "2";
+                    }
+                    items.Add(item);
+                    items.AddRange(CreateGraph(child));
                 }
             }
+            return items;
         }
         #endregion
     }

+ 76 - 6
MBI/SAGA.GplotManage/RelationManager/RelationDataManager.cs

@@ -9,18 +9,41 @@ namespace SAGA.GplotManage
 {
     public class RelationDataManager
     {
-        private void InitRelationData(List<RelationUploader> uploaders)
+        #region 静态方法
+        /// <summary>
+        /// 获取所有使用uploader
+        /// </summary>
+        /// <returns></returns>
+        public static List<RelationUploader> GetAllUploaders()
+        {
+            List<RelationUploader> uploaders = new List<RelationUploader>();
+            uploaders.Add(new ElectricalRelationUploader("EquipPower", "设备电源"));
+            uploaders.Add(new ElectricalRelationUploader("LUDistribution", "低压配电柜关系"));
+            uploaders.Add(new ElectricalRelationUploader("ControlRelation","对象受控关系"));
+
+            uploaders.Add(new SpaceRelationUploader("ElementSpNeighborhood", "空间邻接关系"));
+            uploaders.Add(new SpaceRelationUploader("TrafficNetwork", "建筑交通网络"));
+            uploaders.Add(new SpaceRelationUploader("ConvectionNetwork", "空气流通网络"));
+            uploaders.Add(new SpaceRelationUploader("RadiationNetwork", "光照辐射网络"));
+            var sytemRelationTypes = RelationTypeManager.GetSystemRelationTypes();
+            foreach (RelationItem relation in sytemRelationTypes)
+            {
+                uploaders.Add(new SpaceRelationUploader(relation.Type, relation.Name));
+            }
+            return uploaders;
+        }
+        public static void ComputerRelations(List<RelationUploader> uploaders, bool useCache)
         {
             bool containSpace = false;
             List<string> systems = new List<string>();
             foreach (var uploader in uploaders)
             {
-                if(uploader is SystemRelationUploader)
+                if (uploader is SystemRelationUploader)
                 {
                     systems.Add(uploader.RelationType);
                     continue;
                 }
-                if(!containSpace&&uploader is SpaceRelationUploader)
+                if (!containSpace && uploader is SpaceRelationUploader)
                 {
                     containSpace = true;
                     continue;
@@ -29,13 +52,41 @@ namespace SAGA.GplotManage
             //计算数据,以后可能合并
             #region 计算空间数据
             SpaceComputerHandler spaceHandler = new SpaceComputerHandler();
-            spaceHandler.ComputerWidthCache();
-            SpaceData=SpaceComputerDataUtil.LoadData();
+            if (containSpace)
+            {
+                if (useCache)
+                {
+                    spaceHandler.ComputerWidthCache();
+                }
+                else
+                {
+                    spaceHandler.Computer();
+                }
+            }
+
+
             #endregion
             #region 计算管道数据
             SystemComputerHandler systemHandler = new SystemComputerHandler();
-            systemHandler.ComputerWidthCache(systems);
+            if (useCache)
+            {
+                systemHandler.ComputerWidthCache(systems);
+            }
+            else
+            {
+                systemHandler.Computer(systems);
+            }
             #endregion
+        } 
+        #endregion
+        public void InitRelationData(List<RelationUploader> uploaders)
+        {
+            ComputerRelations(uploaders, false);
+            if (uploaders.Any(s=>s is SpaceRelationUploader))
+            {
+                SpaceData = SpaceComputerDataUtil.LoadData();
+            }
+           
         }
         /// <summary>
         /// 获取空间计算数据
@@ -56,5 +107,24 @@ namespace SAGA.GplotManage
                 }
             }
         }
+        /// <summary>
+        /// 将传入各个关系,重新计算,在生成关系数据
+        /// </summary>
+        /// <param name="uploaders"></param>
+        public void CommitRelationsByReComputer(List<RelationUploader> uploaders)
+        {
+            ComputerRelations(uploaders, true);
+            foreach (RelationUploader uploader in uploaders)
+            {
+                if (uploader is SpaceRelationUploader)
+                {
+                    uploader.Upload(SpaceData);
+                }
+                else
+                {
+                    uploader.Upload();
+                }
+            }
+        }
     }
 }

+ 37 - 3
MBI/SAGA.GplotManage/RelationManager/RelationUploader.cs

@@ -1,4 +1,8 @@
-using System;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using SAGA.GplotRelationComputerManage;
+using SAGA.MBI.RequestData;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
@@ -24,14 +28,44 @@ namespace SAGA.GplotManage
         /// 图关系显示名称
         /// </summary>
         public string RelationDisplay { get; private set; }
-
+        /// <summary>
+        /// 上传图关系
+        /// </summary>
         public virtual void Upload()
         {
-            var data = string.Empty;
+            var data = GetDefaultUploadData();
             Upload(data);
         }
+        protected abstract object GetDefaultUploadData();
+        /// <summary>
+        /// 上传图关系
+        /// </summary>
+        /// <param name="loadData"></param>
         public virtual void Upload(object loadData)
         {
+            var items = CreateGraph(loadData);
+            UploadGraph(items);
+        }
+        /// <summary>
+        /// 创建图关系集合
+        /// </summary>
+        /// <param name="loadData"></param>
+        /// <returns></returns>
+        protected abstract List<GraphRelationItem> CreateGraph(object loadData);
+        public virtual void UploadGraph(List<GraphRelationItem> realtionItems)
+        {
+            string graphId = RelationRequest.GetCurrentGraphId(RelationType);
+            if (graphId == null) return;
+            var deleteObject = new JObject();
+            deleteObject.Add("graph_id", graphId);
+            RelationRequest.DeleteRelation(deleteObject);
+            if (realtionItems!=null&&realtionItems.Any())
+            {
+                var jarry = JArray.FromObject(realtionItems);
+                JObject jobject = new JObject();
+                jobject.Add("criterias", jarry);
+                RelationRequest.AddRelation(jobject);
+            }
 
         }
     }

+ 25 - 17
MBI/SAGA.GplotManage/RelationManager/SpaceRelationUploader.cs

@@ -14,22 +14,20 @@ namespace SAGA.GplotManage
         {
 
         }
-
-        public override void Upload()
+        protected override object GetDefaultUploadData()
         {
-            //计算数据
             SpaceComputerHandler spaceHandler = new SpaceComputerHandler();
             spaceHandler.ComputerWidthCache();
             //加载数据
             var data = SpaceComputerDataUtil.LoadData();
-            //使用数据
-            Upload(data);
+            return data;
         }
-
-        public override void Upload(object loadData)
+   
+        protected override List<GraphRelationItem> CreateGraph(object loadData)
         {
+            List<GraphRelationItem> items = new List<GraphRelationItem>();
             SpaceData spaces = loadData as SpaceData;
-            if (spaces == null) return;
+            if (spaces == null) return items ;
             spaces = GetSpaceData(spaces, GetRelatedEnum());
             foreach (var floorSpaceData in spaces.FloorDatas)
             {
@@ -39,33 +37,43 @@ namespace SAGA.GplotManage
                     relationSpaces.AddRange(space.UpElements);
                     foreach (var adjacentSpace in relationSpaces)
                     {
-                        //var rdata = GetReleateData(space.Id, adjacentSpace.Space.Id, ((int)GetRelationType(adjacentSpace.RelatedEnum)) + "");
-                        //this.Criterias.criterias.Add(rdata);
+                        GraphRelationItem item = new GraphRelationItem();
+                        item.FromId = space.Id;
+                        if (string.IsNullOrWhiteSpace(item.FromId))
+                        {
+                            continue;
+                        }
+                        item.ToId = adjacentSpace.Space.Id;
+                        if(string.IsNullOrWhiteSpace(item.ToId))
+                        {
+                            continue;
+                        }
+                        item.RelType = "1";
+                        items.Add(item);
                     }
                 }
             }
+            return items;
         }
-
-
         #region 准备数据
         public SpaceRelatedEnum GetRelatedEnum()
         {
             #region 获取关联信息
             switch (RelationType)
             {
-                case "a":
+                case "ElementSpNeighborhood":
                     {
                         return SpaceRelatedEnum.Adjacent;
                     }
-                case "b":
+                case "TrafficNetwork":
                     {
                         return SpaceRelatedEnum.Crossing;
                     }
-                case "c":
+                case "ConvectionNetwork":
                     {
                         return SpaceRelatedEnum.Radiation;
                     }
-                case "d":
+                case "RadiationNetwork":
                     {
                         return SpaceRelatedEnum.Ventilation;
                     }
@@ -84,7 +92,7 @@ namespace SAGA.GplotManage
                 }
             }
             return spaces;
-        }
+        }    
         #endregion
     }
 }

+ 32 - 7
MBI/SAGA.GplotManage/RelationManager/SystemRelationUploader.cs

@@ -3,6 +3,7 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using SAGA.GplotRelationComputerManage;
 
 namespace SAGA.GplotManage
 {
@@ -11,16 +12,40 @@ namespace SAGA.GplotManage
         public SystemRelationUploader(string relationType,string relationDisplay):base(relationType,relationDisplay)
         {
 
-        }
-        public override void Upload()
+        }    
+
+        protected override object GetDefaultUploadData()
         {
-            //RelationDataUtil
-            var data = string.Empty;
-            Upload(data);
+            LoadRelationData data = new LoadRelationData(RelationType);
+            return data;
         }
-        public override void Upload(object loadData)
+
+        protected override List<GraphRelationItem> CreateGraph(object loadData)
         {
-            
+            List<GraphRelationItem> items = new List<GraphRelationItem>();
+            LoadRelationData data = loadData as  LoadRelationData;
+            if(data==null)
+            {
+                return items;
+            }
+
+            var relations = RelationDataUtil.BuildRelations(data);
+            foreach (ReleateData originItem in relations)
+            {
+                GraphRelationItem item = new GraphRelationItem();
+                item.FromId = originItem.from_id;
+                if (string.IsNullOrWhiteSpace(item.FromId))
+                {
+                    continue;
+                }
+                item.ToId = originItem.to_id;
+                if (string.IsNullOrWhiteSpace(item.ToId))
+                {
+                    continue;
+                }
+                item.RelType = originItem.rel_type;
+            }
+            return items;
         }
     }
 }

+ 62 - 0
MBI/SAGA.GplotManage/RelationManager/WinComputeRelations.xaml

@@ -0,0 +1,62 @@
+<windows:WinBase
+    xmlns:windows="clr-namespace:SAGA.RevitUtils.Windows;assembly=SAGA.RevitUtils" x:Class="SAGA.GplotManage.RelationManager.WinComputeRelations"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+        xmlns:local="clr-namespace:SAGA.GplotManage.RelationManager"
+        mc:Ignorable="d"
+        Title="计算拓扑关系数据" Height="450" Width="800">
+    <Grid Margin="5">
+        <Grid.RowDefinitions>
+            <RowDefinition></RowDefinition>
+            <RowDefinition Height="30"></RowDefinition>
+            <RowDefinition Height="30"></RowDefinition>
+        </Grid.RowDefinitions>
+        <GroupBox Grid.Row="0" Header="拓扑关系型号列表" Margin="3" BorderBrush="Black">
+
+            <ListBox ItemsSource="{Binding CheckdItems}" BorderThickness="0"  ScrollViewer.HorizontalScrollBarVisibility="Disabled" Margin="0,5,0,5">
+                <ListBox.ItemsPanel >
+                    <ItemsPanelTemplate>
+                        <WrapPanel Orientation="Horizontal"  Width="{Binding Path=Width,RelativeSource={RelativeSource AncestorType=ListBox}}"/>
+                    </ItemsPanelTemplate>
+                </ListBox.ItemsPanel>
+                <ListBox.ItemContainerStyle>
+                    <Style TargetType="{x:Type ListBoxItem}">
+                        <Setter Property="Template">
+                            <Setter.Value>
+                                <ControlTemplate TargetType="{x:Type ListBoxItem}">
+                                    <Border Width="150">
+                                        <CheckBox IsChecked="{Binding IsChecked,Mode=TwoWay}"  HorizontalAlignment="Stretch">
+                                            <CheckBox.Content>
+                                                <TextBlock TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding Uploader.Display}"></TextBlock>
+                                            </CheckBox.Content>
+                                        </CheckBox>
+                                        <Border.ToolTip>
+                                            <TextBlock TextWrapping="Wrap" Text="{Binding Uploader.Display}"></TextBlock>
+                                        </Border.ToolTip>
+                                    </Border>
+                                </ControlTemplate>
+                            </Setter.Value>
+                        </Setter>
+                    </Style>
+                </ListBox.ItemContainerStyle>
+            </ListBox>
+
+        </GroupBox>
+        <StackPanel Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
+            <Grid>
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition></ColumnDefinition>
+                    <ColumnDefinition></ColumnDefinition>
+                </Grid.ColumnDefinitions>
+                <CheckBox IsChecked="{Binding IsReCompute,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Content="重新计算选中拓扑" HorizontalAlignment="Center" VerticalAlignment="Center"></CheckBox>
+                <CheckBox  IsChecked="{Binding IsUplod,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Content="重新上传选中拓扑" HorizontalAlignment="Center" VerticalAlignment="Center"></CheckBox>
+            </Grid>
+        </StackPanel>
+        <StackPanel Grid.Row="2" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right">
+            <Button   Height="23" Width="60"  Margin="10,0" Content="计算" Click="Ensure_Click"/>
+            <Button Height="23" Width="60" Margin="10,0" Content="关闭" Click="Close_Click"/>
+        </StackPanel>
+    </Grid>
+</windows:WinBase>

+ 134 - 0
MBI/SAGA.GplotManage/RelationManager/WinComputeRelations.xaml.cs

@@ -0,0 +1,134 @@
+using SAGA.DotNetUtils;
+using SAGA.DotNetUtils.WPF;
+using SAGA.GplotManage;
+using SAGA.RevitUtils.Windows;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace SAGA.GplotManage.RelationManager
+{
+    /// <summary>
+    /// WinComputeRelations.xaml 的交互逻辑
+    /// </summary>
+    public partial class WinComputeRelations : WinBase, INotifyPropertyChanged
+    {
+        #region 接口相关实现
+
+        [field: NonSerialized]
+        public event PropertyChangedEventHandler PropertyChanged;
+        public void NotifyPropertyChanged([CallerMemberName] string propertyName = "")
+        {
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+        }
+        #endregion
+        public WinComputeRelations()
+        {
+            InitializeComponent();
+            Init();
+            this.DataContext = this;
+        }
+
+     
+        private bool m_IsReCompute;
+        public bool IsReCompute
+        {
+            get { return this.m_IsReCompute; }
+            set
+            {
+                this.m_IsReCompute = value;
+                NotifyPropertyChanged();
+            }
+        }
+
+        private bool m_IsUplod;
+        public bool IsUplod
+        {
+            get { return this.m_IsUplod; }
+            set
+            {
+                this.m_IsUplod = value;
+                NotifyPropertyChanged();
+            }
+        }
+
+        public List<CheckedItem> CheckdItems
+        {
+           get;set;
+        }
+
+        private void Init()
+        {
+            IsReCompute = true;
+            IsUplod = true;
+            var uploaders = RelationDataManager.GetAllUploaders();
+            CheckdItems = new List<CheckedItem>(uploaders.Select(ch => new CheckedItem() { Uploader = ch }));
+        }
+
+        private void Ensure_Click(object sender, RoutedEventArgs e)
+        {
+            if(CheckdItems==null)
+            {
+                MessageBox.Show("请选中需要创建的拓扑类型");
+            }
+            List<RelationUploader> relationUploaders = this.CheckdItems.Where(c => c.IsChecked&&c.Uploader!=null).ToList().Select(c=>c.Uploader).ToList();
+            if(!relationUploaders.Any())
+            {
+                MessageBox.Show("请选中需要创建的拓扑类型");
+            }
+            #region 函数执行逻辑
+            if (IsUplod)
+            {
+                RelationDataManager manager = new RelationDataManager();
+                if (IsReCompute)
+                {
+                    manager.CommitRelationsByReComputer(relationUploaders);
+                }
+                else
+                {
+                    manager.CommitRelations(relationUploaders);
+                }
+            } 
+            else
+            {
+                RelationDataManager.ComputerRelations(relationUploaders, !IsReCompute);
+            }
+            #endregion
+        }
+
+        private void Close_Click(object sender, RoutedEventArgs e)
+        {
+            this.Close();
+        }
+    }
+
+
+    public class CheckedItem:BasePropertyChanged
+    {
+        public bool m_IsChecked;
+        public bool IsChecked
+        {
+            get { return this.m_IsChecked; }
+            set
+            {
+                this.m_IsChecked = value;
+            }
+        }
+        public RelationUploader Uploader
+        {
+            get;set;
+        }
+    }
+}

+ 7 - 0
MBI/SAGA.GplotManage/SAGA.GplotManage.csproj

@@ -135,6 +135,9 @@
     <Compile Include="RelationManager\RelationUploader.cs" />
     <Compile Include="RelationManager\SpaceRelationUploader.cs" />
     <Compile Include="RelationManager\SystemRelationUploader.cs" />
+    <Compile Include="RelationManager\WinComputeRelations.xaml.cs">
+      <DependentUpon>WinComputeRelations.xaml</DependentUpon>
+    </Compile>
     <Compile Include="SystemChecks\CheckSystemResultView.xaml.cs">
       <DependentUpon>CheckSystemResultView.xaml</DependentUpon>
     </Compile>
@@ -243,6 +246,10 @@
     </Content>
   </ItemGroup>
   <ItemGroup>
+    <Page Include="RelationManager\WinComputeRelations.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="SystemChecks\CheckSystemResultView.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>

+ 1 - 5
MBI/SAGA.GplotRelationComputerManage/PowerDistribution/Common/PowerComputerContext.cs

@@ -77,11 +77,7 @@ namespace SAGA.GplotRelationComputerManage
             else
             {
                 node.Type = MBIBuiltInCategory.Si;
-            }
-
-
-
-            //node.Infos =           
+            }        
             return node;
         }
 

+ 1 - 1
MBI/SAGA.GplotRelationComputerManage/RelationType/RelationTypeManager.cs

@@ -227,7 +227,7 @@ namespace SAGA.GplotRelationComputerManage
         /// <returns></returns>
         public static List<string> GetSystemRelationTypeNames()
         {
-            return new List<string>() { "ChillWaterLoop" };
+            //return new List<string>() { "ChillWaterLoop" };
             return GetSystemRelationTypes().Select(r => r.Type).ToList() ;
         }
     }