public HM3AOutputContext(
            ICalculationsAbstractFactory calculationsAbstractFactory,
            IDependenciesAbstractFactory dependenciesAbstractFactory,
            IResultElementsAbstractFactory resultElementsAbstractFactory,
            IResultsAbstractFactory resultsAbstractFactory,
            IHM3AModel HM3AModel,
            Solution solution,
            HM3AEncodingEnum HM3AEncodingEnum)
        {
            // BestBound
            this.BestBound = resultsAbstractFactory.CreateBestBoundFactory().Create(
                (decimal)solution.BestBound)
                             .GetValueForOutputContext(
                dependenciesAbstractFactory.CreateNullableValueFactory());

            // Gap
            this.Gap = resultsAbstractFactory.CreateGapFactory().Create(
                (decimal)solution.Gap)
                       .GetValueForOutputContext(
                dependenciesAbstractFactory.CreateNullableValueFactory());

            // NumberOfExploredNodes
            this.NumberOfExploredNodes = resultsAbstractFactory.CreateNumberOfExploredNodesFactory().Create(
                solution.NumberOfExploredNodes)
                                         .GetValueForOutputContext();

            // ObjectiveValue
            this.ObjectiveValue = resultsAbstractFactory.CreateObjectiveValueFactory().Create(
                (decimal)solution.ObjectiveValues.SingleOrDefault().Value)
                                  .GetValueForOutputContext(
                dependenciesAbstractFactory.CreateNullableValueFactory());

            // OverallWallTime
            this.OverallWallTime = resultsAbstractFactory.CreateOverallWallTimeFactory().Create(
                solution.OverallWallTime)
                                   .GetValueForOutputContext();

            // v(m, r)
            this.MachineOperatingRoomAssignments = HM3AModel.v.GetElementsAt(
                resultElementsAbstractFactory.CreatevResultElementFactory(),
                resultsAbstractFactory.CreatevFactory(),
                HM3AModel.mr)
                                                   .GetValueForOutputContext(
                dependenciesAbstractFactory.CreateNullableValueFactory());

            // w(j, r)
            this.SurgicalSpecialtyOperatingRoomAssignments = HM3AModel.w.GetElementsAt(
                resultElementsAbstractFactory.CreatewResultElementFactory(),
                resultsAbstractFactory.CreatewFactory(),
                HM3AModel.jr)
                                                             .GetValueForOutputContext(
                dependenciesAbstractFactory.CreateNullableValueFactory());

            // y(s, r)
            Iy y = HM3AModel.y.GetElementsAt(
                resultElementsAbstractFactory.CreateyResultElementFactory(),
                resultsAbstractFactory.CreateyFactory(),
                HM3AModel.sr);

            this.SurgeonOperatingRoomAssignments = y
                                                   .GetValueForOutputContext(
                dependenciesAbstractFactory.CreateNullableValueFactory());

            // SurgeonNumberAssignedOperatingRooms
            this.SurgeonNumberAssignedOperatingRooms = calculationsAbstractFactory.CreateSurgeonNumberAssignedOperatingRoomsCalculationFactory().Create().Calculate(
                resultElementsAbstractFactory.CreateSurgeonNumberAssignedOperatingRoomsResultElementFactory(),
                resultsAbstractFactory.CreateSurgeonNumberAssignedOperatingRoomsFactory(),
                calculationsAbstractFactory.CreateSurgeonNumberAssignedOperatingRoomsResultElementCalculationFactory().Create(),
                HM3AModel.s,
                y)
                                                       .GetValueForOutputContext(
                dependenciesAbstractFactory.CreateNullableValueFactory());

            // SurgicalSpecialtyNumberAssignedOperatingRooms
            this.SurgicalSpecialtyNumberAssignedOperatingRooms = calculationsAbstractFactory.CreateSurgicalSpecialtyNumberAssignedOperatingRoomsCalculationFactory().Create().Calculate(
                resultElementsAbstractFactory.CreateSurgicalSpecialtyNumberAssignedOperatingRoomsResultElementFactory(),
                resultsAbstractFactory.CreateSurgicalSpecialtyNumberAssignedOperatingRoomsFactory(),
                calculationsAbstractFactory.CreateSurgicalSpecialtyNumberAssignedOperatingRoomsResultElementCalculationFactory().Create(),
                HM3AModel.Δ,
                y)
                                                                 .GetValueForOutputContext(
                dependenciesAbstractFactory.CreateNullableValueFactory());
        }