Esempio n. 1
0
        /// <summary>
        /// Creates a new truck analysis based on solution
        /// </summary>
        /// <param name="name">Analysis name</param>
        /// <param name="description">Description</param>
        /// <param name="truckProperties">Truck</param>
        /// <param name="constraintSet">ConstraintSet</param>
        /// <param name="solver">Solver to use to generate solutions</param>
        /// <returns></returns>
        public TruckAnalysis CreateNewTruckAnalysis(string name, string description, TruckProperties truckProperties, TruckConstraintSet constraintSet, ITruckSolver solver)
        {
            TruckAnalysis truckAnalysis = new TruckAnalysis(this.ParentDocument, _analysis, this, truckProperties, constraintSet);
            truckAnalysis.Name = name;
            truckAnalysis.Description = description;
            _truckAnalyses.Add(truckAnalysis);
            AddDependancy(truckAnalysis);
            solver.ProcessAnalysis(truckAnalysis);
            ParentDocument.NotifyOnNewTruckAnalysisCreated(_analysis, this, truckAnalysis);
            ParentDocument.Modify();

            return truckAnalysis;
        }
Esempio n. 2
0
        /// <summary>
        /// Creates a new truck analysis based on solution
        /// </summary>
        /// <param name="name">Analysis name</param>
        /// <param name="description">Description</param>
        /// <param name="truckProperties">Truck</param>
        /// <param name="constraintSet">ConstraintSet</param>
        /// <param name="solver">Solver to use to generate solutions</param>
        /// <returns></returns>
        public TruckAnalysis CreateNewTruckAnalysis(string name, string description, TruckProperties truckProperties, TruckConstraintSet constraintSet, ITruckSolver solver)
        {
            TruckAnalysis truckAnalysis = new TruckAnalysis(this.ParentDocument, _analysis, this, truckProperties, constraintSet);

            truckAnalysis.ID.SetNameDesc(name, description);
            _truckAnalyses.Add(truckAnalysis);
            AddDependancy(truckAnalysis);
            solver.ProcessAnalysis(truckAnalysis);
            ParentDocument.Modify();

            return(truckAnalysis);
        }