From 7630a8f04b645206571049dcd289af13ea7a7041 Mon Sep 17 00:00:00 2001
From: Alexandre <alexandre.perles@gmail.com>
Date: Fri, 2 Jun 2023 14:25:06 +0200
Subject: [PATCH] Use AMAK 3.0.4

---
 .idea/gradle.xml                                          | 1 -
 build.gradle                                              | 5 +++--
 settings.gradle                                           | 4 ++--
 src/main/java/fr/irit/smac/clumate/amas/ClusterAgent.java | 3 ++-
 4 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 92a6a72..2a65317 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -9,7 +9,6 @@
         <option name="modules">
           <set>
             <option value="$PROJECT_DIR$" />
-            <option value="$PROJECT_DIR$/../amak" />
           </set>
         </option>
       </GradleProjectSettings>
diff --git a/build.gradle b/build.gradle
index 2b938bc..98f190c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -8,12 +8,13 @@ version = '1.0-SNAPSHOT'
 
 repositories {
     mavenCentral()
+    maven { url "https://jitpack.io" }
 }
 
 dependencies {
     // AMAK (Only one of the next two lines should be uncommented. Also, settings.gradle file should also be modified)
-    // implementation 'com.github.alexandreprl:amak:v3-SNAPSHOT'// Uncomment this line to get AMAK from git repository (The last part matches a tag, a commit hash or the last commit of a branch : branchName-SNAPSHOT
-    implementation project(':amak') // Uncomment this line to get AMAK from local
+     implementation 'com.github.alexandreprl:amak:3.0.4'// Uncomment this line to get AMAK from git repository (The last part matches a tag, a commit hash or the last commit of a branch : branchName-SNAPSHOT
+//    implementation project(':amak') // Uncomment this line to get AMAK from local
     testImplementation platform('org.junit:junit-bom:5.9.1')
     testImplementation 'org.junit.jupiter:junit-jupiter'
 
diff --git a/settings.gradle b/settings.gradle
index af11a34..751f796 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,5 +1,5 @@
 rootProject.name = 'CluMATE'
 
 // Uncomment the two next lines when building amak locally
-include ':amak'
-project(':amak').projectDir = new File(settingsDir, '../amak')
\ No newline at end of file
+//include ':amak'
+//project(':amak').projectDir = new File(settingsDir, '../amak')
\ No newline at end of file
diff --git a/src/main/java/fr/irit/smac/clumate/amas/ClusterAgent.java b/src/main/java/fr/irit/smac/clumate/amas/ClusterAgent.java
index 28fae1f..0840cf1 100644
--- a/src/main/java/fr/irit/smac/clumate/amas/ClusterAgent.java
+++ b/src/main/java/fr/irit/smac/clumate/amas/ClusterAgent.java
@@ -123,8 +123,9 @@ public class ClusterAgent<T extends DataPoint> extends Agent<ClusterAMAS<T>, Clu
 		switch (state) {
 			case DORMANT -> {
 				decideToDie = false;
-				if (receivedClusterForRequestSimilarity == null) {
+				if (receivedClusterForRequestSimilarity == null && amas.getMasSettings().amasOptions().contains(AMASOption.Forget)) {
 					// TODO decide to die logic
+
 				}
 			}
 			case DECIDING -> {
-- 
GitLab