[Avida-SVN] r1147 - branches/uml/source/main

hjg at myxo.css.msu.edu hjg at myxo.css.msu.edu
Mon Dec 18 07:50:29 PST 2006


Author: hjg
Date: 2006-12-18 10:50:28 -0500 (Mon, 18 Dec 2006)
New Revision: 1147

Modified:
   branches/uml/source/main/cOrganism.cc
   branches/uml/source/main/cTaskLib.cc
Log:
Modified tasks for multi-sensor example.


Modified: branches/uml/source/main/cOrganism.cc
===================================================================
--- branches/uml/source/main/cOrganism.cc	2006-12-18 03:05:22 UTC (rev 1146)
+++ branches/uml/source/main/cOrganism.cc	2006-12-18 15:50:28 UTC (rev 1147)
@@ -508,25 +508,6 @@
 			break;
 		case 1:
 			temp = "";
-			temp += "<UML:Transition.effect>  <UML:UninterpretedAction xmi.id=\"XDE-8280CF2B-DA14-4989-AC7F-D83012DE3234\"";
-			temp +=  "isAsynchronous=\"false\" name=\"\" isSpecification=\"false\"> ";
-			temp += "<UML:Action.script> <UML:ActionExpression language=\"\" ";
-			temp += " body=\"^TempSensor.getOpState()\"/>  </UML:Action.script> ";
-			temp += " </UML:UninterpretedAction> </UML:Transition.effect>\n";
-			(*it).second =temp;
-			break;
-		case 2:
-			temp = "";
-			temp += "<UML:Transition.trigger> <UML:Event> <UML:ModelElement.namespace>";
-			temp += "<UML:Namespace> <UML:Namespace.ownedElement> ";
-			temp += "<UML:CallEvent xmi.id=\"XDE-C2891D3C-A49E-4DF0-BD95-A291630F4E4B\" ";
-			temp += " operation=\"XDE-4437EBF1-9C42-4EB4-B7CF-415697B567CD\" name=\"setTempOpState\"";
-			temp += " isSpecification=\"false\"/> </UML:Namespace.ownedElement> </UML:Namespace>";
-			temp += " </UML:ModelElement.namespace> </UML:Event>  </UML:Transition.trigger>\n";
-			(*it).second = temp;
-			break;	
-		case 3: 
-			temp = "";
 			temp += "<UML:Transition.effect> <UML:UninterpretedAction xmi.id=\"XDE-176F1237-1448-4226-A095-075FABD68B33\"";
 			temp += " isAsynchronous=\"false\" name=\"\" isSpecification=\"false\">";
 			temp += "<UML:Action.script> <UML:ActionExpression language=\"\" "; 
@@ -534,7 +515,7 @@
 			temp += "</UML:UninterpretedAction> </UML:Transition.effect> \n";
 			(*it).second = temp;
 			break;
-		case 4: 
+		case 2:
 			temp = "";
 			temp += "<UML:Transition.trigger> <UML:Event> <UML:ModelElement.namespace> ";
             temp += "<UML:Namespace> <UML:Namespace.ownedElement> ";
@@ -544,9 +525,28 @@
 			temp += " </UML:ModelElement.namespace> </UML:Event> </UML:Transition.trigger>\n";
 			(*it).second = temp;
 			break;
-		case 5:
+		case 3: 
 			(*it).second = "";
 			break;
+		case 4: 
+			temp = "";
+			temp += "<UML:Transition.effect>  <UML:UninterpretedAction xmi.id=\"XDE-8280CF2B-DA14-4989-AC7F-D83012DE3234\"";
+			temp +=  "isAsynchronous=\"false\" name=\"\" isSpecification=\"false\"> ";
+			temp += "<UML:Action.script> <UML:ActionExpression language=\"\" ";
+			temp += " body=\"^TempSensor.getOpState()\"/>  </UML:Action.script> ";
+			temp += " </UML:UninterpretedAction> </UML:Transition.effect>\n";
+			(*it).second =temp;
+			break;
+		case 5:
+			temp = "";
+			temp += "<UML:Transition.trigger> <UML:Event> <UML:ModelElement.namespace>";
+			temp += "<UML:Namespace> <UML:Namespace.ownedElement> ";
+			temp += "<UML:CallEvent xmi.id=\"XDE-C2891D3C-A49E-4DF0-BD95-A291630F4E4B\" ";
+			temp += " operation=\"XDE-4437EBF1-9C42-4EB4-B7CF-415697B567CD\" name=\"setTempOpState\"";
+			temp += " isSpecification=\"false\"/> </UML:Namespace.ownedElement> </UML:Namespace>";
+			temp += " </UML:ModelElement.namespace> </UML:Event>  </UML:Transition.trigger>\n";
+			(*it).second = temp;
+			break;	
 /*		case 6:
 			 (*it).second = "setBrightnessValue(brightnessValue)";
 			break;

Modified: branches/uml/source/main/cTaskLib.cc
===================================================================
--- branches/uml/source/main/cTaskLib.cc	2006-12-18 03:05:22 UTC (rev 1146)
+++ branches/uml/source/main/cTaskLib.cc	2006-12-18 15:50:28 UTC (rev 1147)
@@ -1943,10 +1943,12 @@
 {
 	double bonus = 0.0;
 
-	// brightness sensor & ms
-		if (ctx->organism->findTrans(2, 1, 2)) { 
+	// brightness sensor 
+	//	if (ctx->organism->findTrans(2, 1, 2)) { 
 	// gsm:
 //	if (ctx->organism->findTrans(2, 3, 2)) { 
+	if (ctx->organism->findTrans(2, 3, 2)) { 
+
 	
 		bonus = 1.0;
 	}
@@ -1964,7 +1966,7 @@
 	// gsm:
 	//if (ctx->organism->findTrans(3, 4, 3)) { 
 	// ms
-	if (ctx->organism->findTrans(1, 3, 3)) {
+	if (ctx->organism->findTrans(3, 1, 3)) {
 
 		bonus = 1.0;
 	}
@@ -1982,7 +1984,7 @@
 	// gsm
 //	if (ctx->organism->findTrans(4, 1, 4)) { 
 	// ms
-	if (ctx->organism->findTrans(3, 4, 4)) { 
+	if (ctx->organism->findTrans(1, 4, 4)) { 
 
 		bonus = 1.0;
 	}




More information about the Avida-cvs mailing list