• Aucun résultat trouvé

AnyLogic Presentation and Model Set-Up

Chapter 4. Design of a Novel Trust Metric and Model for Wi-Fi Selection,

5.1 AnyLogic Presentation and Model Set-Up

This subsection presents the simulator that we used during our simulation. The choice of simulator is very important because each simulator has specific characteristics. This subsection also presents the model Set-Up.

5.1.1 Anylogic Presentation

To achieve our simulation, we chose the simulator AnyLogic.

AnyLogic is a simulator that offers a wide range of features, including three major modelling methodologies. AnyLogic supports the System Dynamics(SD) modelling approach. There are many spheres where system dynamics simulation can be successfully applied — the range of SD applications include business, urban, social and ecological types of systems. AnyLogic allows you to create complex dynamic models using standard SD graphical notations. AnyLogic supports the agent-based modelling approach, successfully applied in a wide range of fields such as ecology, sociology, economics, traffic simulation and many others. Agent-based modelling is used to model markets (the agent is a potential customer), competition and supply chains (the agent is a company), population (the agent is a family, a citizen or a voter),

etc. Agent-based models allow you to gain an insight into the general behaviour of the system, assuming the behaviour of its elements does not show any global knowledge about the system.

AnyLogic provides an Enterprise Library and a discrete-event simulation library containing objects that can be used to rapidly simulate complex discrete-events systems like:

Manufacturing processes with detailed shop floor layouts

Simple and complex service systems (e.g. banks, airports, hospitals etc.)

Business processes with activity based costing

Logistics and supply chain models

An Enterprise Library allows to create flexible models, collect basic and advanced statistics and effectively visualise the process being modelled to validate and present model.

AnyLogic allows for the use of these three methods in one simulation. In our simulations, we use these three modelling processes. Agents allow modeling the APs and the users. Thus, we chose this simulator because of the many features that allow to easily simulate and recover the simulation results because AnyLogic also provides various tools that represent the results of the simulation in several forms.

5.1.2 Model Set-up

This section presents the steps for the realisation of our simulation and explains its purpose. Our simulation simulates different situations through several scenarios in which users will be able to connect to different Wi-Fi networks. The user will be able to receive recommendations from those friends who may or may not be trustworthy. Users will select the best network according to their preferences and take into account information about the context in which they are located. The contextual information will enable us to see if the user is inside or outside a building, and also their mobility; that is to say if the user is stationary or mobile. The context we gather will also inform us of the type of application that the user is currently using.

Figure 8 shows the class diagram of the actors involved in our simulation.

Figure 8 Class diagram of actors involved

The AP represents the network that the users can connect to.

Facebook is used to recover the recommendations from friends.

The server plays the role of "aggregator" of all the votes made by the users for an AP. So when a user evaluates an AP, her assessment is stored on the server for other local users to see it.

Users and APs representing networks have distinct behaviours.

Thus, we define the possible behaviours of these two actors.

Thus, in our simulation, we will define some APs and users with different behaviours; as described above. Our trust and reputation system should be able to quickly detect different types of APs (APNs, APMs and APSs) that do not meet the needs of users, as well as detect malicious users. But above all, our reputation system and trust must be resistant to different attacks:

 Consideration of a behaviour change, that is to say that the APs are able to gain the trust of users by acting normally to acquire a good value of trust in order to deceive (Whitewashing).

 Taking into account the change in user behaviour.

 Introduction of malicious APs (Intrusion APM): Here we introduce a new APM in order to see how long our system will take to detect it.

 Introduction of a malicious group of APs (Intrusion APM Group): Here we introduce a group of several APMs to see if our system is resistant to such attacks.

 Introduction of a malicious user (Intrusion UM): Here we introduce a UM to see if our system is resistant to such an attack.

Our system should be able to detect the change in behaviour of APs. We will implement behaviour changes depending on the trust value of the AP.

In our simulation, we also incorporate information about the context as well as the location of the user or the type of Wi-Fi network of the APs; this is so we can better define the situation when the user logs on or when they want to connect to refine the value of confidence one can have in an AP. We also simulate access to recommendations from friends on Facebook.

The basic element of an agent based model is the agent itself. By using an agent based model, we have created a new class that behaves as an AP. Each device is associated to a given agent with a matching location. As the device is not static, we have modeled its mobility using X and Y as random variables.

The movement and the status of our agents are controlled by a state-chart which represents the exact behaviour of the device as represented in Figure 9.

Figure 9 State-chart: Fixed APs and Mobile Users

Figure 9 shows all the states in which an agent can pass.

Actors: initial state for all agents.

AP: the agent becomes an AP.

User: the agent becomes a User.

MaliciousAP: defines the AP as an APM.

NormalAccessPoint: defines the AP as an APN.

MaliciousUser: defines the agent User as a UM.

NormalUser: defines the agent as a UN.

Processing: State responsible for the vote of the user after using the AP.

MaliciousUserUsingNormalAP: UM uses an APN.

MaliciousUserUsingMaliciousAP: UM uses an APM.

NormalUserUsingMaliciousAP: UN uses an APM.

NormalUserUsingNormalAP: UN is using an APN

FinishState: state in which all users finish being connected to an AP. Resetting the different variables of a user take place in this state.

Important Transitions Important transitions

Connection: this transition is responsible for connecting users to a given AP according to its confidence value.

Back: refers users to the User status in order to make the simulation continue.

Users and APs have parameters representing the context information and also the behaviour change.

The Facebook platform is modeled by a table of all users and their friends. The number of friends will then be configured to launch the simulation.

In Figure 18, each agent starts in an “Actors” state on the state-chart. Some of our agents were APs, so some of them switched to the state “AccessPoint” and the rest switched to the state

“MobileDevice”. The two kinds of agents were placed on the map according to their GPS positions taken from the Swiss hotspots reference2. The rest of our agents were considered as mobile nodes, and each of them followed a random mobility model. The MobileDevice represents the user with her MP and she will connect to an AP that is in range.

2http://www.swiss-hotspots.ch/

In figure 10 we have two states-charts one for “AP” and the second one for the “User”

Figure 10: State-chart for Access Point and User

As can be seen in Figure 10, the “AccessPoint” agents can have three different states: Malicious, which means that the AP is not good and its trust value is lower than 0.5; Normal, which means that the AP is good and its trust value is higher than 0.5; and SuspiciousAP, which means that the AP can change its status. The

“MobileDevice” agents can have two different states:

MaliciousUser, which means that the User will cheat by giving incorrect ratings, meaning that the rating will not correspond to the real status of the AP; and NormalUser, which means that the User will not cheat and they will give a fair rating.