fuck my life, this is so bad

This commit is contained in:
2021-04-06 01:43:07 +02:00
parent 17fabc368e
commit 8d8bbbf0ae
12 changed files with 277 additions and 10 deletions

View File

@@ -57,7 +57,7 @@ public class VRGameFog {
Log.printLine("Starting VRGame...");
try {
Log.disable();
//Log.disable();
int num_user = 1; // number of cloud users
Calendar calendar = Calendar.getInstance();
boolean trace_flag = false; // mean trace events
@@ -74,7 +74,7 @@ public class VRGameFog {
createFogDevices(broker.getId(), appId);
ModuleMapping moduleMapping = ModuleMapping.createModuleMapping(); // initializing a module mapping
if(CLOUD){
// if the mode of deployment is cloud-based
/*moduleMapping.addModuleToDevice("connector", "cloud", numOfDepts*numOfMobilesPerDept); // fixing all instances of the Connector module to the Cloud
@@ -263,15 +263,15 @@ public class VRGameFog {
application.addAppEdge("client", "DISPLAY", 1000, 500, "GLOBAL_STATE_UPDATE", Tuple.DOWN, AppEdge.ACTUATOR); // adding edge from Client module to Display (actuator) carrying tuples of type GLOBAL_STATE_UPDATE
/*
* Defining the input-output relationships (represented by selectivity) of the application modules.
* Defining the input-output relationships (represented by selectivity) of the application modules.
*/
application.addTupleMapping("client", "EEG", "_SENSOR", new FractionalSelectivity(0.9)); // 0.9 tuples of type _SENSOR are emitted by Client module per incoming tuple of type EEG
application.addTupleMapping("client", "CONCENTRATION", "SELF_STATE_UPDATE", new FractionalSelectivity(1.0)); // 1.0 tuples of type SELF_STATE_UPDATE are emitted by Client module per incoming tuple of type CONCENTRATION
application.addTupleMapping("concentration_calculator", "_SENSOR", "CONCENTRATION", new FractionalSelectivity(1.0)); // 1.0 tuples of type CONCENTRATION are emitted by Concentration Calculator module per incoming tuple of type _SENSOR
application.addTupleMapping("client", "GLOBAL_GAME_STATE", "GLOBAL_STATE_UPDATE", new FractionalSelectivity(1.0)); // 1.0 tuples of type GLOBAL_STATE_UPDATE are emitted by Client module per incoming tuple of type GLOBAL_GAME_STATE
/*
* Defining application loops to monitor the latency of.
* Defining application loops to monitor the latency of.
* Here, we add only one loop for monitoring : EEG(sensor) -> Client -> Concentration Calculator -> Client -> DISPLAY (actuator)
*/
final AppLoop loop1 = new AppLoop(new ArrayList<String>(){{add("EEG");add("client");add("concentration_calculator");add("client");add("DISPLAY");}});