[Avida-SVN] r2734 - in branches/uml-merge: source/orchid tests/_orchid-avida-marple/config tests/_orchid-avida-mde/config
hjg at myxo.css.msu.edu
hjg at myxo.css.msu.edu
Tue Jul 29 13:20:12 PDT 2008
Author: hjg
Date: 2008-07-29 16:20:12 -0400 (Tue, 29 Jul 2008)
New Revision: 2734
Modified:
branches/uml-merge/source/orchid/cMDEPropertyGenerator.cc
branches/uml-merge/source/orchid/cMDEPropertyGenerator.h
branches/uml-merge/source/orchid/cOrchidFactory.cc
branches/uml-merge/source/orchid/cOrchidPopulation.cc
branches/uml-merge/source/orchid/cOrchidPopulation.h
branches/uml-merge/source/orchid/cUMLModel.cc
branches/uml-merge/source/orchid/cUMLModel.h
branches/uml-merge/tests/_orchid-avida-marple/config/avida.cfg
branches/uml-merge/tests/_orchid-avida-marple/config/environment-uml.cfg
branches/uml-merge/tests/_orchid-avida-mde/config/environment-uml.cfg
Log:
fixes to get avida-marple working.
Modified: branches/uml-merge/source/orchid/cMDEPropertyGenerator.cc
===================================================================
--- branches/uml-merge/source/orchid/cMDEPropertyGenerator.cc 2008-07-29 18:59:56 UTC (rev 2733)
+++ branches/uml-merge/source/orchid/cMDEPropertyGenerator.cc 2008-07-29 20:20:12 UTC (rev 2734)
@@ -9,7 +9,7 @@
using namespace std;
-cMDEPropertyGenerator::cMDEPropertyGenerator(int rcm) {
+cMDEPropertyGenerator::cMDEPropertyGenerator() {
//init property data
expression_p = 0;
expression_q = 0;
@@ -28,7 +28,7 @@
m_response_property_success =0;
m_response_property_failure =0;
m_suppressed = 0;
- m_related_class_mode = rcm;
+ m_related_class_mode = 0;
}
Modified: branches/uml-merge/source/orchid/cMDEPropertyGenerator.h
===================================================================
--- branches/uml-merge/source/orchid/cMDEPropertyGenerator.h 2008-07-29 18:59:56 UTC (rev 2733)
+++ branches/uml-merge/source/orchid/cMDEPropertyGenerator.h 2008-07-29 20:20:12 UTC (rev 2734)
@@ -26,7 +26,7 @@
class cMDEPropertyGenerator {
public:
- cMDEPropertyGenerator(int);
+ cMDEPropertyGenerator();
~cMDEPropertyGenerator();
// Get info about the properties satisfied by the model.
Modified: branches/uml-merge/source/orchid/cOrchidFactory.cc
===================================================================
--- branches/uml-merge/source/orchid/cOrchidFactory.cc 2008-07-29 18:59:56 UTC (rev 2733)
+++ branches/uml-merge/source/orchid/cOrchidFactory.cc 2008-07-29 20:20:12 UTC (rev 2734)
@@ -83,6 +83,11 @@
infile >> temp1 >> witness_mode;
infile >> temp1 >> gen_mode;
infile >> temp1 >> related_class_mode;
+
+ model->SetHydraMode(hydra_mode);
+ model->SetWitnessMode(witness_mode);
+ model->SetGenMode(gen_mode);
+ model->SetRelatedClassMode(related_class_mode);
// resize state diagrams & classes to correspond to the Number of classes.
model->ResizeClasses(Num_classes);
@@ -338,6 +343,9 @@
}
infile.close();
+
+ // Create expressions
+ model->CreateExpressionsFromClasses();
return model;
}
Modified: branches/uml-merge/source/orchid/cOrchidPopulation.cc
===================================================================
--- branches/uml-merge/source/orchid/cOrchidPopulation.cc 2008-07-29 18:59:56 UTC (rev 2733)
+++ branches/uml-merge/source/orchid/cOrchidPopulation.cc 2008-07-29 20:20:12 UTC (rev 2734)
@@ -2,7 +2,6 @@
#include "cOrchidFactory.h"
#include "cWorld.h"
-#include <cassert>
cOrchidPopulation::cOrchidPopulation(cWorld* world)
: m_world(world)
Modified: branches/uml-merge/source/orchid/cOrchidPopulation.h
===================================================================
--- branches/uml-merge/source/orchid/cOrchidPopulation.h 2008-07-29 18:59:56 UTC (rev 2733)
+++ branches/uml-merge/source/orchid/cOrchidPopulation.h 2008-07-29 20:20:12 UTC (rev 2734)
@@ -1,6 +1,8 @@
#ifndef _C_ORCHIDPOPULATIONINTERFACE_H_
#define _C_ORCHIDPOPULATIONINTERFACE_H_
+#include <cassert>
+
class cUMLModel;
class cWorld;
@@ -10,9 +12,7 @@
cOrchidPopulation(cWorld* world);
~cOrchidPopulation();
- cUMLModel* GetUMLModel() {
- //assert(m_model);
- return m_model; }
+ cUMLModel* GetUMLModel() { assert(m_model); return m_model; }
protected:
cWorld* m_world;
Modified: branches/uml-merge/source/orchid/cUMLModel.cc
===================================================================
--- branches/uml-merge/source/orchid/cUMLModel.cc 2008-07-29 18:59:56 UTC (rev 2733)
+++ branches/uml-merge/source/orchid/cUMLModel.cc 2008-07-29 20:20:12 UTC (rev 2734)
@@ -47,8 +47,8 @@
// percent_scenario_complete = 0;
// Initialize the property generator.
-// gen = new cMDEPropertyGenerator(_cfg_related_class_mode);
- CreateExpressionsFromClasses();
+ //gen = new cMDEPropertyGenerator();
+
}
@@ -162,17 +162,17 @@
void cUMLModel::PrintXML()
{
-// xml = "";
-// xml = xi.xml_begin;
-//
+ xml = "";
+ xml = xi.xml_begin;
+
// std::cout << xi.classes_info.size() << " " << state_diagrams.size() << std::endl;
-// assert (xi.classes_info.size() == state_diagrams.size());
-//
-// for (unsigned int i=0; i<xi.classes_info.size(); i++) {
-// xml += xi.classes_info[i];
-// xml += (GetStateDiagram(i))->GetXMI("sd" + i);
-// }
-// xml += xi.xml_end;
+ assert (xi.classes_info.size() == state_diagrams.size());
+
+ for (unsigned int i=0; i<xi.classes_info.size(); i++) {
+ xml += xi.classes_info[i];
+ xml += (GetStateDiagram(i))->GetXMI("sd" + i);
+ }
+ xml += xi.xml_end;
}
std::string cUMLModel::GetXML()
Modified: branches/uml-merge/source/orchid/cUMLModel.h
===================================================================
--- branches/uml-merge/source/orchid/cUMLModel.h 2008-07-29 18:59:56 UTC (rev 2733)
+++ branches/uml-merge/source/orchid/cUMLModel.h 2008-07-29 20:20:12 UTC (rev 2734)
@@ -121,12 +121,17 @@
bool ReadyForHydra();
bool GetWitnessMode() {return witnessMode; }
int GetGenMode() { return genMode; }
- int GetRelatedClassMode() { return relatedClassMode; }
+// int GetRelatedClassMode() { return relatedClassMode; }
void ResizeClasses(int num_class) { classes.resize(num_class); state_diagrams.resize(num_class); }
cUMLClass* GetUMLClass(int class_num);
cUMLStateDiagram* GetUMLStateDiagram(int sd_num);
void AddScenario(scenario_info s) { scenarios.push_back(s); }
+
+ void SetGenMode (int gm) { genMode = gm; }
+ void SetWitnessMode (bool wm) { witnessMode = wm; }
+ void SetHydraMode (int hm) { hydraMode = hm; }
+ void SetRelatedClassMode (int rcm) { gen->SetRelatedClassMode(rcm); }
protected:
std::string xml;
@@ -140,7 +145,7 @@
int max_trans;
bool witnessMode; // Mode 0 = model generation; mode 1 = property generation.
int genMode; // 0 = Print, 1 = contribute to interest + Print, 2 = forbid unrelated + Print.
- int relatedClassMode;
+// int relatedClassMode;
double percent_scenario_complete;
cMDEPropertyGenerator* gen;
};
Modified: branches/uml-merge/tests/_orchid-avida-marple/config/avida.cfg
===================================================================
--- branches/uml-merge/tests/_orchid-avida-marple/config/avida.cfg 2008-07-29 18:59:56 UTC (rev 2733)
+++ branches/uml-merge/tests/_orchid-avida-marple/config/avida.cfg 2008-07-29 20:20:12 UTC (rev 2734)
@@ -22,7 +22,7 @@
# 2 = Torus
# 3 = Clique
RANDOM_SEED 83123671 # Random number seed (0 for based on time)
-HARDWARE_TYPE 0 # 0 = Original CPUs
+HARDWARE_TYPE 5 # 0 = Original CPUs
# 1 = New SMT CPUs
# 2 = Transitional SMT
# 3 = Experimental CPU
@@ -327,3 +327,10 @@
BIOMIMETIC_REFRACTORY_PERIOD 0.0 # Number of updates affected by refractory period
BIOMIMETIC_MOVEMENT_STEP 0 # Number of cells to move Avidian on move instruction
BIOMIMETIC_K 0 # Carrying capacity in number of organisms
+
+
+### ORCHID_GROUP ###
+# Orchid settings
+ENABLE_ORCHID 1 # Enable the Orchid subsystem, 0==off (default), 1
+==on.
+ORCHID_SEED_MODEL seed-model.cfg # UML configuration file.
Modified: branches/uml-merge/tests/_orchid-avida-marple/config/environment-uml.cfg
===================================================================
--- branches/uml-merge/tests/_orchid-avida-marple/config/environment-uml.cfg 2008-07-29 18:59:56 UTC (rev 2733)
+++ branches/uml-merge/tests/_orchid-avida-marple/config/environment-uml.cfg 2008-07-29 20:20:12 UTC (rev 2734)
@@ -12,4 +12,4 @@
#
##############################################################################
-REACTION CP check-props process:value=1.0:type=mult requisite:max_count=1
+REACTION CP check-props process:value=1.0:type=mult requisite:max_count=1:divide_only=1
Modified: branches/uml-merge/tests/_orchid-avida-mde/config/environment-uml.cfg
===================================================================
--- branches/uml-merge/tests/_orchid-avida-mde/config/environment-uml.cfg 2008-07-29 18:59:56 UTC (rev 2733)
+++ branches/uml-merge/tests/_orchid-avida-mde/config/environment-uml.cfg 2008-07-29 20:20:12 UTC (rev 2734)
@@ -14,12 +14,12 @@
# Designed to evolve obstacle avoidance.
#REACTION ND non-determinism process:value=1.0:type=pow requisite:max_count=1
-REACTION SC scens process:value=1.0:type=pow requisite:max_count=1
-REACTION HYDRA hydra process:value=1.0:type=pow requisite:max_count=1
-REACTION WIT1 spin-w1 process:value=1.0:type=pow requisite:max_count=1
-REACTION SPIN1 spin1 process:value=1.0:type=pow requisite:max_count=1
-REACTION WIT2 spin-w2 process:value=1.0:type=pow requisite:max_count=1
-REACTION SPIN2 spin2 process:value=1.0:type=pow requisite:max_count=1
-REACTION MIN-TR min-trans process:value=5.0:type=pow requisite:max_count=1
-#REACTION EXMI export-xmi process:value=1.0:type=pow requisite:max_count=1
-#REACTION CP check-props process:value=1.0:type=mult requisite:max_count=1
+REACTION SC scens process:value=1.0:type=pow requisite:max_count=1:divide_only=1
+REACTION HYDRA hydra process:value=1.0:type=pow requisite:max_count=1:divide_only=1
+REACTION WIT1 spin-w1 process:value=1.0:type=pow requisite:max_count=1:divide_only=1
+REACTION SPIN1 spin1 process:value=1.0:type=pow requisite:max_count=1:divide_only=1
+REACTION WIT2 spin-w2 process:value=1.0:type=pow requisite:max_count=1:divide_only=1
+REACTION SPIN2 spin2 process:value=1.0:type=pow requisite:max_count=1:divide_only=1
+REACTION MIN-TR min-trans process:value=5.0:type=pow requisite:max_count=1:divide_only=1
+#REACTION EXMI export-xmi process:value=1.0:type=pow requisite:max_count=1:divide_only=1
+#REACTION CP check-props process:value=1.0:type=mult requisite:max_count=1:divide_only=1
More information about the Avida-cvs
mailing list