Пример #1
0
 public PackPalletAnalysis CreateNewPackPalletAnalysis(
     string name, string description
     , PackProperties pack, PalletProperties pallet
     , InterlayerProperties interlayer
     , PackPalletConstraintSet constraintSet
     , List<PackPalletSolution> solutions)
 {
     PackPalletAnalysis analysis = new PackPalletAnalysis(
         pack
         , pallet
         , interlayer
         , constraintSet);
     analysis.Name = name;
     analysis.Description = description;
     // insert in list
     _packPalletAnalyses.Add(analysis);
     // set solutions
     analysis.Solutions = solutions;
     // notify listeners
     NotifyOnNewPackPalletAnalysisCreated(analysis);
     // set solution selected if it is unique
     if (solutions.Count == 1)
         analysis.SelectSolutionByIndex(0);
     return analysis;
 }