Exemplo n.º 1
0
        protected override void ExportAnalysisSpecific(Analysis analysis)
        {
            var analysisCylinderPallet = analysis as AnalysisCylinderPallet;

            // analysis name
            WSheet.Cells[RowIndex, 1] = analysisCylinderPallet.Name;
            // cylinder
            var cylinderProperties = analysisCylinderPallet.Content as CylinderProperties;

            WSheet.Cells[RowIndex, 2] = cylinderProperties.Name;
            WSheet.Cells[RowIndex, 3] = cylinderProperties.Description;
            WSheet.Cells[RowIndex, 4] = cylinderProperties.RadiusOuter * 2.0;
            WSheet.Cells[RowIndex, 5] = cylinderProperties.Height;
            // pallet name
            var palletProperties = analysisCylinderPallet.Container as PalletProperties;

            WSheet.Cells[RowIndex, 6] = palletProperties.Name;
            // constraint set
            ConstraintSetPackablePallet constraintSet = analysisCylinderPallet.ConstraintSet as ConstraintSetPackablePallet;

            WSheet.Cells[RowIndex, 7] = constraintSet.OptMaxHeight.Value;
            // solution
            Solution sol = analysisCylinderPallet.Solution;

            WSheet.Cells[RowIndex, 8]  = sol.ItemCount;
            WSheet.Cells[RowIndex, 9]  = sol.LayerCount;
            WSheet.Cells[RowIndex, 10] = sol.LayerBoxCount(0);
            WSheet.Cells[RowIndex, 11] = sol.LoadWeight;
            WSheet.Cells[RowIndex, 12] = sol.Weight;
            WSheet.Cells[RowIndex, 13] = sol.VolumeEfficiency;

            InsertImage(analysis, 14);
        }
Exemplo n.º 2
0
 public AnalysisCylinderPallet(
     Packable packable,
     PalletProperties palletProperties,
     ConstraintSetPackablePallet constraintSet)
     : base(packable, palletProperties, constraintSet)
 {
 }
        private ConstraintSetPackablePallet BuildConstraintSet()
        {
            var constraintSet = new ConstraintSetPackablePallet()
            {
                Overhang     = new Vector2D(uCtrlOverhang.ValueX, uCtrlOverhang.ValueY),
                OptMaxWeight = uCtrlOptMaximumWeight.Value
            };

            constraintSet.SetMaxHeight(new OptDouble(true, uCtrlMaximumHeight.Value));
            return(constraintSet);
        }
        private ConstraintSetPackablePallet BuildConstraintSet()
        {
            // constraint set
            ConstraintSetPackablePallet constraintSet = new ConstraintSetPackablePallet();

            // overhang
            constraintSet.Overhang = new Vector2D(uCtrlOverhang.ValueX, uCtrlOverhang.ValueY);
            // conditions
            constraintSet.SetMaxHeight(new OptDouble(true, uCtrlMaximumHeight.Value));
            constraintSet.OptMaxWeight = uCtrlOptMaximumWeight.Value;
            return(constraintSet);
        }
Exemplo n.º 5
0
        private ConstraintSetPackablePallet BuildConstraintSet()
        {
            var constraintSet = new ConstraintSetPackablePallet()
            {
                Overhang     = Overhang,
                OptMaxWeight = MaxPalletWeight,
                OptMaxNumber = MaxNumber
            };

            constraintSet.SetMaxHeight(new OptDouble(true, MaxPalletHeight));
            constraintSet.Container = SelectedPallet;
            return(constraintSet);
        }
Exemplo n.º 6
0
 private loadSpace BuildLoadSpace(AnalysisLayered analysis)
 {
     if (analysis is AnalysisPackablePallet analysisPackablePallet)
     {
         PalletProperties            palletProperties = analysisPackablePallet.PalletProperties;
         ConstraintSetPackablePallet constraintSet    = analysisPackablePallet.ConstraintSet as ConstraintSetPackablePallet;
         return(new loadSpace()
         {
             id = 1,
             name = palletProperties.Name,
             length = palletProperties.Length,
             width = palletProperties.Width,
             baseHeight = palletProperties.Height,
             maxLengthOverhang = constraintSet.Overhang.X,
             maxWidthOverhang = constraintSet.Overhang.Y,
             maxLoadHeight = constraintSet.OptMaxHeight.Activated ? constraintSet.OptMaxHeight.Value : 0.0,
             maxLoadWeight = constraintSet.OptMaxWeight.Activated ? constraintSet.OptMaxWeight.Value : 0.0
         });
     }
     else
     {
         throw new Exception($"Unexpected analysis type : {analysis.GetType()}");
     }
 }