bdi4jade

Minor changes

9/22/2013 11:14:13 PM

Details

diff --git a/bdi-jade-test/src/br/ufrgs/inf/bdi4jade/examples/template/Constants.java b/bdi-jade-test/src/br/ufrgs/inf/bdi4jade/examples/template/Constants.java
index dbd7563..3f4500e 100644
--- a/bdi-jade-test/src/br/ufrgs/inf/bdi4jade/examples/template/Constants.java
+++ b/bdi-jade-test/src/br/ufrgs/inf/bdi4jade/examples/template/Constants.java
@@ -13,13 +13,9 @@ import br.ufrgs.inf.bdi4jade.softgoal.Softgoal;
 public interface Constants {
 
 	// Softgoals
-	public static final Softgoal COMFORT = new NamedSoftgoal("COMFORT");
-	public static final Softgoal COST = new NamedSoftgoal("COST");
-	public static final Softgoal PERFORMANCE = new NamedSoftgoal("PERFORMANCE");
-	public static final Softgoal SAFETY = new NamedSoftgoal("SAFETY");
-	public static final Softgoal SECURITY = new NamedSoftgoal("SECURITY");
+	public static final Softgoal Softgoal1 = new NamedSoftgoal("Softgoal1");
+	public static final Softgoal Softgoal2 = new NamedSoftgoal("Softgoal2");
 
-	public static final Softgoal ALL_SOFTGOALS[] = { COMFORT, COST,
-			PERFORMANCE, SAFETY, SECURITY };
+	public static final Softgoal ALL_SOFTGOALS[] = { Softgoal1, Softgoal2 };
 
 }
diff --git a/bdi-jade-test/src/br/ufrgs/inf/bdi4jade/examples/template/MyAgent.java b/bdi-jade-test/src/br/ufrgs/inf/bdi4jade/examples/template/MyAgent.java
index d07970e..bac015a 100644
--- a/bdi-jade-test/src/br/ufrgs/inf/bdi4jade/examples/template/MyAgent.java
+++ b/bdi-jade-test/src/br/ufrgs/inf/bdi4jade/examples/template/MyAgent.java
@@ -31,7 +31,7 @@ public class MyAgent extends UtilityBasedBDIAgent {
 		this.getRootCapability().getPlanLibrary().addPlan(new MyPlan2());
 
 		initPreferences();
-		
+
 		addGoal(new MyGoal());
 	}
 
@@ -40,11 +40,9 @@ public class MyAgent extends UtilityBasedBDIAgent {
 				.getRootCapability().getBeliefBase()
 				.getBelief(SoftgoalPreferences.NAME);
 
-		preferences.setPreferenceForSoftgoal(Constants.COMFORT, 0.1);
-		preferences.setPreferenceForSoftgoal(Constants.COST, 0.2);
-		preferences.setPreferenceForSoftgoal(Constants.PERFORMANCE, 0.15);
-		preferences.setPreferenceForSoftgoal(Constants.SAFETY, 0.4);
-		preferences.setPreferenceForSoftgoal(Constants.SECURITY, 0.15);
+		preferences.setPreferenceForSoftgoal(Constants.Softgoal1, 0.1);
+		preferences.setPreferenceForSoftgoal(Constants.Softgoal2, 0.2);
+
 	}
 
 }
\ No newline at end of file
diff --git a/bdi-jade-test/src/br/ufrgs/inf/bdi4jade/examples/template/plan/MyPlan1.java b/bdi-jade-test/src/br/ufrgs/inf/bdi4jade/examples/template/plan/MyPlan1.java
index 7e821a6..abae90c 100644
--- a/bdi-jade-test/src/br/ufrgs/inf/bdi4jade/examples/template/plan/MyPlan1.java
+++ b/bdi-jade-test/src/br/ufrgs/inf/bdi4jade/examples/template/plan/MyPlan1.java
@@ -8,6 +8,7 @@ import java.util.List;
 import java.util.Map;
 
 import br.ufrgs.inf.bdi4jade.examples.planselection.Softgoals;
+import br.ufrgs.inf.bdi4jade.examples.template.Constants;
 import br.ufrgs.inf.bdi4jade.examples.template.goal.MyGoal;
 import br.ufrgs.inf.bdi4jade.plan.PlanContribution;
 import br.ufrgs.inf.bdi4jade.softgoal.Softgoal;
@@ -27,13 +28,13 @@ public class MyPlan1 extends SimplePlan {
 		List<PlanContribution> sgContributions = null;
 
 		sgContributions = new ArrayList<PlanContribution>();
-		sgContributions.add(new PlanContribution(Softgoals.SAFETY, 0.6, 0.0));
-		sgContributions.add(new PlanContribution(Softgoals.SAFETY, 0.4, 1.0));
+		sgContributions.add(new PlanContribution(Constants.Softgoal1, 0.6, 0.0));
+		sgContributions.add(new PlanContribution(Constants.Softgoal2, 0.4, 1.0));
 		contributions.put(Softgoals.SAFETY, sgContributions);
 
 		sgContributions = new ArrayList<PlanContribution>();
-		sgContributions.add(new PlanContribution(Softgoals.SAFETY, 0.2, 0.0));
-		sgContributions.add(new PlanContribution(Softgoals.SAFETY, 0.8, 1.0));
+		sgContributions.add(new PlanContribution(Constants.Softgoal1, 0.2, 0.0));
+		sgContributions.add(new PlanContribution(Constants.Softgoal2, 0.8, 1.0));
 		contributions.put(Softgoals.PERFORMANCE, sgContributions);
 	}
 
diff --git a/bdi-jade-test/src/br/ufrgs/inf/bdi4jade/examples/template/plan/MyPlan2.java b/bdi-jade-test/src/br/ufrgs/inf/bdi4jade/examples/template/plan/MyPlan2.java
index 964efd8..eae09b5 100644
--- a/bdi-jade-test/src/br/ufrgs/inf/bdi4jade/examples/template/plan/MyPlan2.java
+++ b/bdi-jade-test/src/br/ufrgs/inf/bdi4jade/examples/template/plan/MyPlan2.java
@@ -8,6 +8,7 @@ import java.util.List;
 import java.util.Map;
 
 import br.ufrgs.inf.bdi4jade.examples.planselection.Softgoals;
+import br.ufrgs.inf.bdi4jade.examples.template.Constants;
 import br.ufrgs.inf.bdi4jade.examples.template.goal.MyGoal;
 import br.ufrgs.inf.bdi4jade.plan.PlanContribution;
 import br.ufrgs.inf.bdi4jade.softgoal.Softgoal;
@@ -26,13 +27,13 @@ public class MyPlan2 extends SimplePlan {
 		List<PlanContribution> sgContributions = null;
 
 		sgContributions = new ArrayList<PlanContribution>();
-		sgContributions.add(new PlanContribution(Softgoals.SAFETY, 0.3, 0.0));
-		sgContributions.add(new PlanContribution(Softgoals.SAFETY, 0.7, 1.0));
+		sgContributions.add(new PlanContribution(Constants.Softgoal1, 0.3, 0.0));
+		sgContributions.add(new PlanContribution(Constants.Softgoal2, 0.7, 1.0));
 		contributions.put(Softgoals.SAFETY, sgContributions);
 
 		sgContributions = new ArrayList<PlanContribution>();
-		sgContributions.add(new PlanContribution(Softgoals.SAFETY, 0.5, 0.0));
-		sgContributions.add(new PlanContribution(Softgoals.SAFETY, 0.5, 1.0));
+		sgContributions.add(new PlanContribution(Constants.Softgoal1, 0.5, 0.0));
+		sgContributions.add(new PlanContribution(Constants.Softgoal2, 0.5, 1.0));
 		contributions.put(Softgoals.PERFORMANCE, sgContributions);
 	}