protected void Compute()
        {
            try
            {
                const double thickness = 4.0;
                _doc = new Document(_name, "", "", DateTime.Now, null);
                // colors
                Color[] colors = new Color[6];
                for (int i = 0; i < 6; ++i) colors[i] = Color.Chocolate;
                // bundle
                BundleProperties bundleProperties = _doc.CreateNewBundle(_name, _name, BundleLength, BundleWidth, FlatThickness, FlatWeight, Color.Beige, NoFlats);
                // case
                BoxProperties caseProperties = _doc.CreateNewCase(_name, _name
                    , CaseInsideLength + 2.0 * thickness, CaseInsideWidth + 2.0 * thickness, CaseInsideHeight + 2.0 * thickness
                    , CaseInsideLength, CaseInsideWidth, CaseInsideHeight
                    , CaseWeight, colors);
                // constraint set
                BundleCaseConstraintSet constraintSet = new BundleCaseConstraintSet();
                // maximum case weight
                constraintSet.UseMaximumCaseWeight = false;
                constraintSet.MaximumCaseWeight = 0.0;
                // maximum number of items
                constraintSet.UseMaximumNumberOfBoxes = false;
                constraintSet.MaximumNumberOfBoxes = 0;

                _analysis = _doc.CreateNewBoxCaseAnalysis(
                    _name, _name
                    , bundleProperties, caseProperties
                    , constraintSet
                    , new BoxCaseSolver());
                // fill grid
                FillGrid();
            }
            catch (Exception ex)
            {
                _log.Error(ex.ToString());
            }
        }
        private void Compute()
        {
            try
            {
                _document = new Document(_name, _name, "", DateTime.Now, null);
                _analysis = null;
                // bundle
                BundleProperties bundleProperties = _document.CreateNewBundle(_name, _name, FlatLength, FlatWidth, FlatThickness, FlatWeight, Color.Beige, NoFlats);
                // pallet
                PalletProperties palletProp = _document.CreateNewPallet(CurrentPallet);
                // constraint set
                BundlePalletConstraintSet constraintSet = new BundlePalletConstraintSet();
                constraintSet.OverhangX = 0.0;
                constraintSet.OverhangY = 0.0;
                constraintSet.UseMaximumNumberOfCases = false;
                constraintSet.UseMaximumPalletWeight = false;
                constraintSet.UseMaximumWeightOnBox = false;
                constraintSet.UseMaximumHeight = true;
                constraintSet.MaximumHeight = MaximumPalletHeight;
                constraintSet.AllowAlignedLayers = true;
                constraintSet.AllowAlternateLayers = true;
                constraintSet.AllowedPatternString = "Column,Diagonale,Interlocked,Trilock,Spirale";

                _analysis = _document.CreateNewCasePalletAnalysis(
                    _name, _name
                    ,bundleProperties , palletProp
                    , null /*interlayer */, null /* interlayerAntiSlip */
                    , null /* palletCorners */, null  /*palletCap */, null /* palletFilm */
                    , constraintSet
                    , new CasePalletSolver()
                    );
                // fill grid
                FillGrid();
            }
            catch (Exception ex)
            {
                _log.Error( ex.ToString());
            }
        }