-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPointSource.java
More file actions
51 lines (47 loc) · 1.41 KB
/
PointSource.java
File metadata and controls
51 lines (47 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package com.masim.emissionAgents;
import com.masim.core.SourceTYpe;
import com.masim.gameTheory.PrisonnerDelimmaUtl;
import com.masim.gameTheory.VoteStrategyUtl;
import com.masim.utils.CBox;
import com.masim.utils.Location;
import com.masim.utils.Pollutant;
import com.masim.utils.SimulationFramework;
public class PointSource extends EmissionUnit {
public void setup() {
// setEnabledO2ACommunication(true, 2);
switch (SimulationFramework.currentStrategy) {
// no behaviour is needed, because there is no cooperation between
// agents.
case GREEDY:
addBehaviour(new GreedyStrategy(this,
SimulationFramework.SIMSPEED));
break;
case NAIVE:
addBehaviour(new ModeratePollutionNAIVE(this,
SimulationFramework.SIMSPEED));
break;
case CENTRALIZED:
addBehaviour(new ReceiveASKforERBehaviour(this,
SimulationFramework.SIMSPEED));
break;
case NEGOTIATION: {
//if((SimulationFramework.sourcesInfo.get(this.getLocalName())).uncontrolled==true) return;
PrisonnerDelimmaUtl.getInstance().putInGame(this);
addBehaviour(new ModeratePollutionGameTheoryPD(this,
SimulationFramework.SIMSPEED));
break;
}
case Voting :{
VoteStrategyUtl.getInstance().putInGame(this);
addBehaviour(new ModeratePollutionVoting(this,
SimulationFramework.SIMSPEED));
}
break;
case Qlearning: {
break;
}
default:
break;
}
}
}