Download
GitHub (source files): https://github.com/andrewgchio/SmartSPEC
Requirements
The software requirements for each component of SmartSPEC is written provided below. Note that you only need to install the dependencies for the component that you wish to use.
Scenario Learning
The Scenario Learning component is written in Python and requires the following dependencies:
- Python (version >= 3.6.8)
- numpy(version >= 1.19.2)
- pandas (version >= 1.1.0)
- matplotlib (version >= 3.2.2)
- scikit-learn (version >= 0.24.2)
- python-rapidjson (version >= 1.5)
- tqdm (version >= 4.62.3)
- ruptures (for break point detection) (version >= 1.1.5)
- MySQL Python Connector (version >= 8.0.13)
Most of these requirements can be fulfilled by using an Anaconda environment. After installing Anaconda, open the Anaconda command line and execute:
conda create --name smartspec
conda activate smartspec
conda install python-rapidjson numpy pandas matplotlib tqdm scikit-learn
pip install ruptures mysql-connector-python
To run the Scenario Learning component afterwards, you will need to activate the smartspec
environment:
conda activate smartspec
MySQL Database Setup
A local MySQL database is used as the data source for learning metaevents and metapeople. To set up the local data source:
- Start your local MySQL service
- Create a database named
simulation_seed
with a tableconnectivity
. This can be accomplished with the following SQL script.
CREATE TABLE simulation_seed.connectivity
(
wifi_ap VARCHAR(32) NULL,
cnx_time DATETIME NULL,
client_id VARCHAR(64) NULL
);
- Populate table by importing data. This data should be in the following form:
wifi_ap,cnx_time,client_id
1,2017-01-01 07:30:31,81
9,2017-01-01 10:39:13,72
8,2017-01-01 10:40:08,72
...
mysql_native_password
.
- Note, the local data queries can be optimized by setting indices as follows:
CREATE INDEX cnx_date ON simulation_seed.connectivity (cnx_time);
CREATE INDEX idx_ap ON simulation_seed.connectivity (wifi_ap);
CREATE INDEX time_and_ap ON simulation_seed.connectivity (cnx_time, wifi_ap);
Scenario Generation
The Scenario Generation component is written in C++17 and requires the following dependencies:
- C++ (version >= 17)
- boost (version >= 1.68.0)
- date (included in project)
- rapidjson (included in project)
GUI Toolkit
The GUI Toolkit is written in Java 8 and requires the following dependencies:
- Java (version >= 8)
- Java FX (version >= 17)
- json-simple (version >= 1.1.1)
- ini4j (version >= 0.5.4)
json-simple
and ini4j
dependencies should be downloaded as jar
files.