public ElementsSetUnitTests() { _elements = new ElementsSet { // Id, PotentialRisk (vci), ManagedRisk (pds) new Element(1, 0, 0), new Element(2, 0, 0), new Element(3, 700, 0), new Element(4, 220, 0), new Element(5, 280, 0), new Element(6, 1100, 800), new Element(7, 890, 350), new Element(8, 430, 10), new Element(9, 320, 112), new Element(10, 180, 65) }; }
public WhatIfEngineUnitTests() { var elements = new ElementsSet { new Element(101, 630, 440), new Element(102, 512, 234), new Element(103, 750, 156), new Element(104, 1086, 845), new Element(105, 820, 532), }; _whatIfEngine = new WhatIfEngine(elements); var _actions = new List <ReductionAction> { new ReductionAction(1011, 101, "A101-1", 30, 40, 7), new ReductionAction(1012, 101, "A101-2", 12, 20, 27), new ReductionAction(1013, 101, "A101-3", 43, 10, 37), new ReductionAction(1014, 101, "A101-4", 22, 20, 27), new ReductionAction(1021, 102, "B102-1", 78, 50, 5), new ReductionAction(1022, 102, "B102-2", 43, 50, 5), new ReductionAction(1023, 102, "B102-3", 22, 5, 50), new ReductionAction(1024, 102, "B102-4", 12, 5, 50), new ReductionAction(1025, 102, "B102-5", 66, 25, 20), new ReductionAction(1031, 102, "C103-1", 145, 100, 98), new ReductionAction(1032, 102, "C103-2", 23, 150, 48), new ReductionAction(1033, 102, "C103-3", 25, 50, 148), new ReductionAction(1041, 104, "D104-1", 78, 41, 200), new ReductionAction(1051, 105, "E105-1", 115, 20, 21), new ReductionAction(1052, 105, "E105-2", 132, 0, 41), new ReductionAction(1053, 105, "E105-3", 7, 41, 0), new ReductionAction(1054, 105, "E105-4", 89, 10, 31), new ReductionAction(1055, 105, "E105-5", 25, 31, 10), new ReductionAction(1056, 105, "E105-6", 34, 20, 21), new ReductionAction(1057, 105, "E105-7", 112, 20, 21), }; _whatIfEngine.SetActions(_actions); _whatIfEngine.ExecuteAnalysis(); }
public WhatIfEngineUnitTests() { ElementsSet elements = new ElementsSet { new Element(1, 0, 0), new Element(2, 0, 0), new Element(3, 700, 0), new Element(4, 220, 0), new Element(5, 280, 0), new Element(6, 1100, 800), new Element(7, 890, 350), new Element(8, 430, 10), new Element(9, 320, 112), new Element(10, 180, 65) }; _whatIfEngine = new WhatIfEngine(elements); // PDS cost, IngPDS cost, NotClassified volume _whatIfEngine.ExecuteAnalysis(12, 2, 3); _actions = _whatIfEngine.Actions; }
public WhatIfEngine(ElementsSet elements) { _elements = elements; _elements.CalculatePerimeterRiskFactorsAndUpdateAbsentElements(); }