diff --git a/simulation/trip-generator.js b/simulation/trip-generator.js index 360027b..a435f25 100644 --- a/simulation/trip-generator.js +++ b/simulation/trip-generator.js @@ -1,14 +1,14 @@ -const helper = require("./utils").helper; -const SQLiter = require("./utils").SQLiter; +const stationHelper = require("./utils").stationHelper; +const SQLiteHelper = require("./utils").SQLiteHelper; let requestsMade = 0; // Generate trips for all stations async function generateTrips() { - const stations = await helper.getAllStations(); + const stations = await stationHelper.getStations(); // Open connection to SQLite database - const dbc = SQLiter.getDBConnection(); + const dbc = SQLiteHelper.getDBConnection(); for (i = 0; i < stations.length; i++) { const currentStation = stations[i]; @@ -29,7 +29,7 @@ async function generateTrips() { } // Close connection to SQLite database - SQLiter.closeDBConnection(dbc); + SQLiteHelper.closeDBConnection(dbc); } // Generate a single trip diff --git a/simulation/utils.js b/simulation/utils.js index 7a582f3..ee4a423 100644 --- a/simulation/utils.js +++ b/simulation/utils.js @@ -350,4 +350,4 @@ const publicHelper = { } } -module.exports = { publicHelper }; +module.exports = { publicHelper, stationHelper, SQLiteHelper };