コード例 #1
0
 public Calculation(AHPIndexHierarchy ahp, GroupedMonitorDataByTime groupedMonDataByTime, DateTime evaluationDate)
 {
     _ahpIndexHierarchy = ahp;
     _judgementMatrixInfosSet = BinaryIO.ReadMatrixInfosSet();///读取判断矩阵
     _ahpIndexUtil = new AHPIndexHierarchyUtil(ahp);
     InitialBaseData(groupedMonDataByTime, evaluationDate);
     if (!IsMatrixExist())
     {
         MessageBox.Show("需要定义判断矩阵!");
         return;
     }
     CalculateWeightVctor();
     CalculateFuzzyMatrix();
     ShowResult();
 }
コード例 #2
0
        public MainWindow()
        {
            viewModel = new MainWindowViewModel();
            this.DataContext = viewModel;
            InitializeComponent();
            HealthEvaluationGlobals.MyAHPIndexHierarchys = this.viewModel.MyAHPIndexHierarchys;//临时的全局化方案,后面再整体修改

            AHPIndexHierarchyUtil ahpHierarchyUtil = new AHPIndexHierarchyUtil(this.viewModel.MyAHPIndexHierarchys[0]);
            var model = new TreeModel<AHPIndexHierarchy, string>();
            model.ChildNodesPath = "ChildrenNames";
            model.NodeKeyPath = "Name";
            model.ParentNodePath = "ParentName";
            model.NodesSource = ahpHierarchyUtil.ahpIndexList;
            myDiagram.Model = model;
        }
コード例 #3
0
 private void btnTestTreeDiagram_Click(object sender, RoutedEventArgs e)
 {
     AHPIndexHierarchyUtil ahpHierarchyUtil = new AHPIndexHierarchyUtil(this.viewModel.MyAHPIndexHierarchys[0]);
     var model = new TreeModel<AHPIndexHierarchy, string>();
     model.ChildNodesPath = "ChildrenNames";
     model.NodeKeyPath = "Name";
     model.ParentNodePath = "ParentName";
     model.NodesSource = ahpHierarchyUtil.ahpIndexList;
     TestGoWPFWnd.model = model;
     TestGoWPFWnd testGoWpfWnd = new TestGoWPFWnd();
     testGoWpfWnd.Show();
 }