private int minimumLength(TimeUnitsType periodUnit)
 {
     switch (periodUnit)
     {
     case TimeUnitsType.Day:
     case TimeUnitsType.Week:
     case TimeUnitsType.Month:
         return(1);
     }
     return(0);
 }
        private int maximumLength(TimeUnitsType periodUnit)
        {
            switch (periodUnit)
            {
            case TimeUnitsType.Day:
                return(365);

            case TimeUnitsType.Week:
                return(52);

            case TimeUnitsType.Month:
                return(12);
            }
            return(0);
        }
        private DateTimeOffset GetCalculatedDate(DateTimeOffset date, TimeUnitsType timeUnitsType, int timeLength)
        {
            switch (timeUnitsType)
            {
            case TimeUnitsType.Day:
                return(date.AddDays(timeLength));

            case TimeUnitsType.Week:
                return(date.AddDays(timeLength * 7));

            case TimeUnitsType.Month:
                return(date.AddMonths(timeLength));
            }
            return(date);
        }
Пример #4
0
        public OutComp(OutComp comp)
            : base(comp)
        {
            phase         = comp.phase;
            retention     = comp.retention;
            average       = comp.average;
            retention0    = comp.retention0;
            retentionTime = comp.retentionTime;
            drawPosition  = comp.drawPosition;

            sigma    = comp.sigma;
            width    = comp.width;
            hwidth   = comp.hwidth;
            swidth   = comp.swidth;
            height   = comp.height;
            purity   = comp.purity;
            recovery = comp.recovery;

            totm   = comp.totm;
            totmup = comp.totmup;
            totmlp = comp.totmlp;

            willElute = comp.willElute;
            eluted    = comp.eluted;
            outCol    = comp.outCol;

            intIt    = comp.intIt;
            intItSet = comp.intItSet;

            units     = comp.units;
            volUnits  = comp.volUnits;
            timeUnits = comp.timeUnits;
            massUnits = comp.massUnits;

            filterSigma = comp.filterSigma;
        }
Пример #5
0
 public TimeUnit(TimeUnitsType timeUnits, int length)
 {
     Unit   = timeUnits;
     Length = length;
 }
Пример #6
0
        public void reset()
        {
            comps = new List <Comp>();

            profile = ProfileType.CCC;
            model   = ModelType.Probabilistic;
            runMode = RunModeType.UpperPhase;
            eeMode  = EEModeType.None;

            vc = 100;
            uf = 0.5f;
            lf = 1 - uf;

            fu = 1;
            fl = 0;

            column       = 100;
            probUnits    = 10000;
            densitySteps = 200;

            mixSpeed   = 1;
            efficiency = 1;
            ka         = 0.01f;

            doMaxIt = false;
            maxIt   = 10;

            autoFilter = true;

            vdeadUnits         = QuantityType.Volume;
            vdeadInEnabled     = false;
            vdeadOutEnabled    = false;
            vdeadInjectEnabled = false;
            vdeadIn            = 0;
            vdeadOut           = 0;
            vdeadInject        = 0;

            injectMode      = InjectModeType.Instant;
            injectPhase     = PhaseType.Upper;
            injectPos       = 0;
            injectVolume    = 1;
            injectFeedUnits = QuantityType.Volume;
            injectFeed      = 0;

            intMode       = IntModeType.Time;
            intStartPhase = PhaseType.Upper;
            intUpSwitch   = 0;
            intLpSwitch   = 0;
            intUpComp     = -1;
            intLpComp     = -1;
            intMaxIt      = 10;
            intFinalElute = true;

            ptransMode = false;
            ptransu    = 1;
            ptransl    = 1;

            kDefinition = KdefType.U_L;

            viewUnits = QuantityType.Volume;

            volUnits  = VolUnitsType.ml;
            massUnits = MassUnitsType.mg;
            timeUnits = TimeUnitsType.min;

            advancedMode = false;
        }