public static void WriteTripForTDM(ITripWrapper trip, TDMTripListExporter tdmTripListExporter)
        {
            if (tdmTripListExporter == null)
            {
                return;
            }

            tdmTripListExporter.Export(trip);
        }
Beispiel #2
0
        public static void Initialize(string name, int nBatches, bool loadData = true)
        {
            var helper = new FactoryHelper(Global.Configuration);

            _type = helper.ChoiceModelRunner.GetChoiceModelRunnerType();

            if (!Global.Configuration.IsInEstimationMode)
            {
                ThreadQueue = new ThreadQueue();
            }

            //ExporterFactory = Global.Kernel.Get<ExporterFactory>();

            // e.g. 30 minutes between each minute span
            SmallPeriodDuration = DayPeriod.SmallDayPeriods.First().Duration;

            if (Global.Configuration.ShouldOutputTDMTripList)
            {
                TDMTripListExporter = new TDMTripListExporter(Global.GetOutputPath(Global.Configuration.OutputTDMTripListPath), Global.Configuration.TDMTripListDelimiter);
            }

            if (loadData)
            {
                LoadData();
            }


            TotalTimesHouseholdModelSuiteRun = new int[nBatches];

            TotalTimesPersonModelSuiteRun = new int[nBatches];

            TotalTimesHouseholdDayModelSuiteRun = new int[nBatches];

            TotalTimesJointHalfTourGenerationModelSuiteRun = new int[nBatches];

            TotalTimesJointTourGenerationModelSuiteRun = new int[nBatches];

            TotalTimesPersonDayMandatoryModelSuiteRun = new int[nBatches];

            TotalTimesPersonDayModelSuiteRun = new int[nBatches];

            TotalTimesPartialJointHalfTourModelSuiteRun = new int[nBatches];

            TotalTimesFullJointHalfTourModelSuiteRun = new int[nBatches];

            TotalTimesMandatoryTourModelSuiteRun = new int[nBatches];

            TotalTimesJointTourModelSuiteRun = new int[nBatches];

            TotalTimesNonMandatoryTourModelSuiteRun = new int[nBatches];

            TotalTimesTourModelSuiteRun = new int[nBatches];

            TotalTimesTourTripModelsRun = new int[nBatches];

            TotalTimesTourSubtourModelsRun = new int[nBatches];

            TotalTimesProcessHalfToursRun = new int[nBatches];

            TotalTimesTourSubtourModelSuiteRun = new int[nBatches];

            TotalTimesSubtourTripModelsRun = new int[nBatches];

            TotalTimesProcessHalfSubtoursRun = new int[nBatches];

            TotalTimesAutoOwnershipModelRun = new int[nBatches];

            TotalTimesWorkLocationModelRun = new int[nBatches];

            TotalTimesSchoolLocationModelRun = new int[nBatches];

            TotalTimesPaidParkingAtWorkplaceModelRun = new int[nBatches];

            TotalTimesWorkUsualModeAndScheduleModelRun = new int[nBatches];

            TotalTimesTransitPassOwnershipModelRun = new int[nBatches];

            TotalTimesMandatoryTourGenerationModelRun = new int[nBatches];

            TotalTimesMandatoryStopPresenceModelRun = new int[nBatches];

            TotalTimesJointHalfTourGenerationModelRun = new int[nBatches];

            TotalTimesFullJointHalfTourParticipationModelRun = new int[nBatches];

            TotalTimesPartialJointHalfTourParticipationAndChauffeurModelsRun = new int[nBatches];

            TotalTimesJointTourGenerationModelRun = new int[nBatches];

            TotalTimesJointTourParticipationModelRun = new int[nBatches];

            TotalTimesPersonDayPatternModelRun = new int[nBatches];

            TotalTimesPersonTourGenerationModelRun = new int[nBatches];

            TotalTimesPersonExactNumberOfToursModelRun = new int[nBatches];

            TotalTimesWorkTourDestinationModelRun = new int[nBatches];

            TotalTimesTourDestinationModelRun = new int[nBatches];

            TotalTimesOtherTourDestinationModelRun = new int[nBatches];

            TotalTimesWorkBasedSubtourGenerationModelRun = new int[nBatches];

            TotalTimesTourDestinationModeTimeModelRun = new int[nBatches];

            TotalTimesTourModeTimeModelRun = new int[nBatches];

            TotalTimesWorkTourModeModelRun = new int[nBatches];

            TotalTimesWorkTourTimeModelRun = new int[nBatches];

            TotalTimesSchoolTourModeModelRun = new int[nBatches];

            TotalTimesSchoolTourTimeModelRun = new int[nBatches];

            TotalTimesEscortTourModeModelRun = new int[nBatches];

            TotalTimesOtherHomeBasedTourModeModelRun = new int[nBatches];

            TotalTimesOtherHomeBasedTourTimeModelRun = new int[nBatches];

            TotalTimesWorkSubtourDestinationModelRun = new int[nBatches];

            TotalTimesBusinessSubtourDestinationModelRun = new int[nBatches];

            TotalTimesOtherSubtourDestinationModelRun = new int[nBatches];

            TotalTimesWorkBasedSubtourModeModelRun = new int[nBatches];

            TotalTimesWorkBasedSubtourTimeModelRun = new int[nBatches];

            TotalTimesTripModelSuiteRun = new int[nBatches];

            TotalTimesIntermediateStopGenerationModelRun = new int[nBatches];

            TotalTimesIntermediateStopGenerated = new int[nBatches];

            TotalTimesChangeModeStopGenerated = new int[nBatches];

            TotalTimesChangeModeLocationSet = new int[nBatches];

            TotalTimesChangeModeTransitModeSet = new int[nBatches];

            TotalTimesTripIsToTourOrigin = new int[nBatches];

            TotalTimesNextTripIsNull = new int[nBatches];

            TotalTimesIntermediateStopLocationModelRun = new int[nBatches];

            TotalTimesTripModeTimeModelRun = new int[nBatches];

            TotalTimesTripModeModelRun = new int[nBatches];

            TotalTimesTripTimeModelRun = new int[nBatches];

            TotalTimesActumPrimaryPriorityTimeModelRun = new int[nBatches];

            TotalTimesLDPrimaryPriorityTimeModelRun = new int[nBatches];

            TotalTimesHouseholdDayPatternTypeModelRun = new int[nBatches];

            TotalTimesPersonDayPatternTypeModelRun = new int[nBatches];

            TotalTimesWorkAtHomeModelRun = new int[nBatches];
            TotalPersonDays = new int[nBatches];

            TotalHouseholdDays = new int[nBatches];

            TotalInvalidAttempts = new int[nBatches];
        }