本文整理汇总了C++中DataContainer::extractCvsSnapshot方法的典型用法代码示例。如果您正苦于以下问题:C++ DataContainer::extractCvsSnapshot方法的具体用法?C++ DataContainer::extractCvsSnapshot怎么用?C++ DataContainer::extractCvsSnapshot使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataContainer
的用法示例。
在下文中一共展示了DataContainer::extractCvsSnapshot方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DataContainer
DataContainer * ModelRunner::constructDataContainer(double optInRate, int batchWindowLengthInSec) {
DataContainer * pDataContainer = NULL;
/*
* STEP 1: read parse CSV input
*/
// pDataContainer = new DataContainer(pDataInput->_inputPath, pDataInput->_cvsFilename, pDataInput->_timelineStr, optInRate, pDataInput->_simLengthInMinutes, pDataOutput->_printDebugFiles, pDataOutput->_printToScreen, pGeofence);
pDataContainer = new DataContainer(pDataInput->_inputCvsFile, pDataInput->_timelineStr, optInRate, pDataInput->_simLengthInMinutes, pDataOutput->_printDebugFiles, pDataOutput->_printToScreen, pGeofence);
pDataContainer->setBatchWindowInSeconds(batchWindowLengthInSec);
try {
pDataContainer->extractCvsSnapshot();
} catch( FileNotFoundException &ex ) {
std::cerr << "\n*** FileNotFoundException thrown ***" << std::endl;
std::cerr << ex.what() << std::endl;
std::cerr << "\t(exiting unsuccessfully) " << std::endl;
exit(1);
}
/*
* step 2: filter uberX users to proxy for uberPOOL trips
*/
pDataContainer->generateUberPoolTripProxy(); // get uberPOOL users
int nPoolTrips = pDataContainer->buildUberPOOLTrips(); // build only uberPOOL trips (subset of all trips which also contain uberX trips)
std::cout << Utility::intToStr(nPoolTrips) << " uberPOOL trips created" << std::endl;
/*
* step 3: convert Trip objects into:
* (i) Request objects (i.e. Trips that have not yet been dispatched)
* (ii) Dispatch objects (i.e. Driver-Rider pairs that have been dispatched)
*/
pDataContainer->populateRequestsAndTrips();
_initRequests = pDataContainer->getInitPoolRequestsAtTimeline();
_allRequestsInSim = pDataContainer->getAllPoolRequestsInSim();
_initOpenTrips = pDataContainer->getInitOpenTripsAtTimeline();
return pDataContainer;
}