//TODO: MAKE ACCEPTING PARAMETERS FROM CALL //For now, it is boosted by static values and if check to null condition public void RecalculateGridParameters() { if (allBranches == null) allBranches = new BranchDataManager().GetAllBranches(); if (allBranchReactances == null) allBranchReactances = new BranchReactanceDataManager().GetAllBranchReactances(); if (allBranchResistances == null) allBranchResistances = new BranchResistanceDataManager().GetAllBranchResistances(); if (allNodes == null) allNodes = new NodeDataManager().GetAllNodes(); if (allActiveLoads == null) allActiveLoads = new NodeActiveLoadDataManager().GetAllNodeActiveLoads(); if (allReactiveLoads == null) allReactiveLoads = new NodeReactiveLoadDataManager().GetAllNodeReactiveLoads(); if (allNodeVoltages == null) allNodeVoltages = new NodeVoltageDataManager().GetAllNodeVoltages(); //this creates grid topology object GridTopology gridTopology = new GridTopology(allBranches, allNodes); // starts calculation for given parameters. gridTopology.DoCalculation(allBranches, allBranchReactances, allBranchResistances, allNodes, allActiveLoads, allReactiveLoads, allNodeVoltages); }
public void GridTopologyConstructorTest() { List<BranchDto> allBranches = null; // TODO: Initialize to an appropriate value List<NodeDto> allNodes = null; // TODO: Initialize to an appropriate value GridTopology target = new GridTopology(allBranches, allNodes); Assert.Inconclusive("TODO: Implement code to verify target"); }
public void DoCalculationTest() { List<BranchDto> allBranches = null; // TODO: Initialize to an appropriate value List<NodeDto> allNodes = null; // TODO: Initialize to an appropriate value GridTopology target = new GridTopology(allBranches, allNodes); // TODO: Initialize to an appropriate value List<BranchDto> allBranches1 = null; // TODO: Initialize to an appropriate value List<BranchReactanceDto> allBranchReactances = null; // TODO: Initialize to an appropriate value List<BranchResistanceDto> allBranchResistances = null; // TODO: Initialize to an appropriate value List<NodeDto> allNodes1 = null; // TODO: Initialize to an appropriate value List<NodeActiveLoadDto> allActiveLoads = null; // TODO: Initialize to an appropriate value List<NodeReactiveLoadDto> allReactiveLoads = null; // TODO: Initialize to an appropriate value List<NodeVoltageDto> allNodeVoltages = null; // TODO: Initialize to an appropriate value target.DoCalculation(allBranches1, allBranchReactances, allBranchResistances, allNodes1, allActiveLoads, allReactiveLoads, allNodeVoltages); Assert.Inconclusive("A method that does not return a value cannot be verified."); }