Example #1
0
        public IHttpActionResult Calculate(List <PinchAnalysis_DLL.NormalStream> streams, List <PinchAnalysis_DLL.UtilityStream> UtilityStreams, double ApproachTemp)
        {
            List <Interval> interval = new List <Interval>();
            List <Net>      net      = new List <Net>();

            if (CurrentApproach == -1)
            {
                CurrentApproach = Bisection(1, 100, 0.01, streams);
            }
            getPinchPoint getPinch = new getPinchPoint(streams, UtilityStreams, interval, net, ApproachTemp, streams[0].Units, this.formNumber);

            getPinch.drawGccDiagram();
            getPinch.drawHTDiagram();
            getPinch.drawGridDiagram();
            getPinch.getCurrentDuties();
            getPinch.getCurrentDutiesPerUtility();
            getPinch.CurrentApproach = CurrentApproach;
            Solution answer = getPinch.Answer();

            return(Ok(answer));
        }
Example #2
0
        public getPinchPoint PinchFun(PinchDataModels model, int approach, int type)
        {
            model.Approach = approach;
            if (type == 0)
            {
                postStreams((StreamModel)model);
            }
            else
            {
                postExchangers((ExchangerModel)model);
            }

            List <Interval> interval = new List <Interval>();
            List <Net>      net      = new List <Net>();
            getPinchPoint   trial    = new getPinchPoint(Streams, UtilityStreams, interval, net, model.Approach, model.Units, this.formNumber);

            trial.getCurrentDuties();
            trial.drawGccDiagram();
            trial.drawHTDiagram();
            return(trial);
        }