[Avida-SVN] r2722 - branches/developers/avida-edward/source/python/AvidaGui2
kaben at myxo.css.msu.edu
kaben at myxo.css.msu.edu
Mon Jul 21 13:10:51 PDT 2008
Author: kaben
Date: 2008-07-21 16:10:51 -0400 (Mon, 21 Jul 2008)
New Revision: 2722
Modified:
branches/developers/avida-edward/source/python/AvidaGui2/pyDefaultFiles.py
branches/developers/avida-edward/source/python/AvidaGui2/pyEduWorkspaceCtrl.py
branches/developers/avida-edward/source/python/AvidaGui2/pyFreezerCtrl.py
Log:
Avida-ED Freezer: Changed the @example in the Configured Dishes shelf in the
Freezer back to a world size of 30x30, and added a hidden @default configured
dish with a world size of 60x60.
- To make a new workspace, Avida-ED tries to copy certain default items from
the current workspace, including @default.empty. If these items don't exist
in the current workspace, they will be generated, including @default.empty.
- @default.empty is hidden from the Freezer, even when it's in the workspace.
This means that it can't be deleted from the Avida-ED GUI, and since we can't
save over an existing file, it can't be modified from the GUI.
- The file can still be edited, and after it's been edited in the current
workspace, it will be inherited into new workspaces.
- If the current workspace was created from an older version of Avida-ED and
doesn't contain @default.empty then @default.empty will be generated.
- The previous version would create an error message saying
"freezer/@default.empty does not exist -- please start experiment by dragging
dish". Do we want to keep this behavior?
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyDefaultFiles.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyDefaultFiles.py 2008-07-21 18:37:17 UTC (rev 2721)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyDefaultFiles.py 2008-07-21 20:10:51 UTC (rev 2722)
@@ -281,6 +281,26 @@
lines = lines + ["inst_set.default", ""]
lines = lines + ["inst_set.default", "# Search with no template returns current position (abs line number) in"]
lines = lines + ["inst_set.default", "# genome."]
+ tmp_file_name = os.path.join("freezer", "@default.empty")
+ lines = lines + [tmp_file_name, "*SETTINGS"]
+ lines = lines + [tmp_file_name, "RANDOM_SEED 0"]
+ lines = lines + [tmp_file_name, "DEATH_METHOD 2"]
+ lines = lines + [tmp_file_name, "COPY_MUT_PROB 0.03"]
+ lines = lines + [tmp_file_name, "WORLD-X 60"]
+ lines = lines + [tmp_file_name, "WORLD-Y 60"]
+ lines = lines + [tmp_file_name, "BIRTH_METHOD 0"]
+ lines = lines + [tmp_file_name, "START_CREATURE0 default"]
+ lines = lines + [tmp_file_name, "AGE_LIMIT 100"]
+ lines = lines + [tmp_file_name, "MAX_UPDATES -1"]
+ lines = lines + [tmp_file_name, "REWARD_NOT YES"]
+ lines = lines + [tmp_file_name, "REWARD_NAND YES"]
+ lines = lines + [tmp_file_name, "REWARD_AND YES"]
+ lines = lines + [tmp_file_name, "REWARD_ORN YES"]
+ lines = lines + [tmp_file_name, "REWARD_OR YES"]
+ lines = lines + [tmp_file_name, "REWARD_ANDN YES"]
+ lines = lines + [tmp_file_name, "REWARD_NOR YES"]
+ lines = lines + [tmp_file_name, "REWARD_XOR YES"]
+ lines = lines + [tmp_file_name, "REWARD_EQU YES"]
tmp_file_name = os.path.join("freezer", "@example.empty")
lines = lines + [tmp_file_name, "*SETTINGS"]
lines = lines + [tmp_file_name, "RANDOM_SEED 0"]
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyEduWorkspaceCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyEduWorkspaceCtrl.py 2008-07-21 18:37:17 UTC (rev 2721)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyEduWorkspaceCtrl.py 2008-07-21 20:10:51 UTC (rev 2722)
@@ -298,6 +298,7 @@
os.mkdir(os.path.join(new_dir,"freezer","@example.full"))
filesToCopy = ["environment.default", "inst_set.default",
"events.default", "avida_cfg.default",
+ os.path.join("freezer", "@default.empty"),
os.path.join("freezer", "@example.empty"),
os.path.join("freezer", "@ancestor.organism"),
os.path.join("freezer", "@example.full", "average.dat"),
@@ -788,16 +789,18 @@
# click the default empty petri dish from the freezer
file_name = os.path.join(self.m_session_mdl.m_current_freezer,
- "@example.empty")
+ "@default.empty")
if not(os.path.exists(file_name)):
- warningNoMethodName(file_name +
- " does not exist -- please start experiment by dragging dish")
- return
+ short_file_name = os.path.join("freezer", "@default.empty")
+ pyDefaultFiles(short_file_name, file_name)
+ #warningNoMethodName(file_name +
+ # " does not exist -- please start experiment by dragging dish")
+ #return
thawed_item = pyReadFreezer(file_name)
self.m_session_mdl.m_session_mdtr.emit(PYSIGNAL("startNewExperimentSig"),
())
self.m_session_mdl.m_session_mdtr.emit(PYSIGNAL("doDefrostDishSig"),
- ("@example", thawed_item,))
+ ("@default", thawed_item,))
self.m_session_mdl.m_session_mdtr.emit(
PYSIGNAL("freezerItemDoubleClicked"), (file_name, ))
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyFreezerCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyFreezerCtrl.py 2008-07-21 18:37:17 UTC (rev 2721)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyFreezerCtrl.py 2008-07-21 20:10:51 UTC (rev 2722)
@@ -246,10 +246,13 @@
last_org = None
for file in freezer_dir:
if file.endswith(".empty"):
- dish_name = file[:-6]
- tmp_item = QListViewItem(self.m_empty_item, last_empty)
- tmp_item.setText(0,dish_name)
- last_empty = tmp_item
+ if file.endswith("@default.empty"):
+ pass
+ else:
+ dish_name = file[:-6]
+ tmp_item = QListViewItem(self.m_empty_item, last_empty)
+ tmp_item.setText(0,dish_name)
+ last_empty = tmp_item
if file.endswith(".full"):
dish_name = file[:-5]
tmp_item = QListViewItem(self.m_full_item, last_full)
More information about the Avida-cvs
mailing list