A Discrete-Event-Simulation program written in C, that simulates a given number of users
and their internet activity on certain websites.
The users will get websites recommended based on a collaborative filtering recommendation system with sustainability in mind.
As the simulation progresses the chance of the user taking a more sustainable choice will increase.
The output will show the different simulation blocks with their respective sustainable choice value.
This project is a part of the P1 project on first semester (Software).
Group: SW B222
Made by: Ali, Viktor, Frederik, Thorbjørn, Jonas, Alexander
git clone https://github.com/FredTheNoob/P1-Sustainable-Internet
- Navigate to the input directory
A boilerplate file (websites_data.csv) is provided for use.
If you wish to use your own make sure you follow the csv's format (Avg. visit duration [s],Pages per visit,Weight,Category).
- Open the simulation_input.txt file
- Configure the parameters to your liking (check out the Simulation input explanation)
To build the simulation with the input files ensure you are in the root directory, then run:
make
You can then run the simulation in your command line of choice by writing:
./a.out
Or on Windows machines:
./a.exe
- How many active internet users to have in the simulation.
- The amount of websites in the input csv file.
- The amount of categories in the input csv file.
- How much time (in seconds) the users have on average each day of the simulation.
- The amount of days the simulation should run.
- The amount of simulations to run.
- How much the sustainable choice of the users should increment by each block of simulation.
(where a block would be referred to as running NUM_SIMULATIONS times)
Certain functions have been handpicked for a CUTest. This test has been used for black box testing,
and is split into two suites (InsertWebsiteNodeTest.c and WebsiteTest.c)
In the root directory run:
make -C Tests
In the root directory run:
./Tests.out