Compileable

git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/branches/mira-mtm5@3497 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
hieuhoang1972 2010-09-17 07:35:31 +00:00
parent 36b6aad53e
commit c4635251e9
10 changed files with 596 additions and 821 deletions

View File

@ -83,16 +83,22 @@ namespace Mira {
m_manager = new MosesChart::Manager(*m_sentence, &system);
m_manager->ProcessSentence();
m_manager->CalcNBest(count,sentences);
}
void MosesDecoder::OutputNBestList(const MosesChart::TrellisPathList &sentences, std::vector<const Moses::ScoreComponentCollection*> &out)
{
MosesChart::TrellisPathList::const_iterator iter;
for (iter = sentences.begin() ; iter != sentences.end() ; ++iter)
{
const MosesChart::TrellisPath &path = **iter;
cerr << path << endl << endl;
const Moses::ScoreComponentCollection &scoreBreakdown = path.GetScoreBreakdown();
out.push_back(&scoreBreakdown);
}
cerr << std::flush;
}
}
}

View File

@ -68,12 +68,12 @@ class MosesDecoder : public Decoder {
virtual void getNBest(const std::string& source, size_t count, MosesChart::TrellisPathList& sentences);
void cleanup();
void OutputNBestList(const MosesChart::TrellisPathList &sentences, std::vector<const Moses::ScoreComponentCollection*> &out);
private:
MosesChart::Manager *m_manager;
Moses::Sentence *m_sentence;
void OutputNBestList(const MosesChart::TrellisPathList &nBestList, const Moses::TranslationSystem* system, long translationId);
};

View File

@ -27,7 +27,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include "FeatureVector.h"
#include "StaticData.h"
#include "ChartTrellisPathList.h"
#include "ChartTrellisPath.h"
#include "ScoreComponentCollection.h"
#include "Decoder.h"
#include "Optimiser.h"
@ -120,9 +121,11 @@ int main(int argc, char** argv) {
//Main loop:
srand(time(NULL));
MosesDecoder decoder;
Optimiser* optimiser = new DummyOptimiser();
DummyOptimiser optimiser;
size_t epochs = 1;
std::vector<float> currWeights, newWeights, losses;
for (size_t epoch = 0; epoch < epochs; ++epoch) {
//TODO: batch
for (size_t sid = 0; sid < inputSentences.size(); ++sid) {
@ -130,14 +133,46 @@ int main(int argc, char** argv) {
const vector<string>& refs = referenceSentences[sid];
//run decoder (TODO: hope & fear)
MosesChart::TrellisPathList sentences;
decoder.getNBest(input, 100, sentences);
MosesChart::TrellisPathList models, hopes, fears;
vector<const Moses::ScoreComponentCollection*> scores;
StaticData &staticNonConst = StaticData::InstanceNonConst();
// MODEL
PARAM_VEC bleuWeight(1, "0");
staticNonConst.GetParameter()->OverwriteParam("-weight-b", bleuWeight);
staticNonConst.ReLoadParameter();
decoder.getNBest(input, 100, models);
decoder.OutputNBestList(models, scores);
// HOPE
bleuWeight[0] = "+1";
staticNonConst.GetParameter()->OverwriteParam("-weight-b", bleuWeight);
staticNonConst.ReLoadParameter();
decoder.getNBest(input, 100, hopes);
decoder.OutputNBestList(hopes, scores);
// FEAR
bleuWeight[0] = "-1";
staticNonConst.GetParameter()->OverwriteParam("-weight-b", bleuWeight);
staticNonConst.ReLoadParameter();
decoder.getNBest(input, 100, fears);
decoder.OutputNBestList(fears, scores);
//extract scores from nbest + oracle
//run optimiser
const MosesChart::TrellisPath &pathOracle = hopes.Get(0);
const Moses::ScoreComponentCollection &oracle = pathOracle.GetScoreBreakdown();
optimiser.updateWeights(currWeights
, scores
, losses
, oracle
, newWeights);
//update moses weights
decoder.cleanup();

View File

@ -6,7 +6,7 @@ using namespace std;
namespace Mira {
float MiraOptimiser::updateWeights(const std::vector<float>& currWeights,
const std::vector<Moses::ScoreComponentCollection>& scores,
const std::vector<const Moses::ScoreComponentCollection*>& scores,
const std::vector<float>& losses,
const Moses::ScoreComponentCollection oracleScores,
std::vector<float>& newWeights) {
@ -18,8 +18,8 @@ namespace Mira {
float scoreChange = 0.0;
float norm = 0.0;
for(unsigned score = 0; score < scores[analyseSentence].size(); score++) {
float currentScoreChange = oracleScores[score] - scores[analyseSentence][score];
for(unsigned score = 0; score < scores[analyseSentence]->size(); score++) {
float currentScoreChange = oracleScores[score] - (*scores[analyseSentence])[score];
scoreChange += currentScoreChange * newWeights[score];
norm += currentScoreChange * currentScoreChange;
}
@ -39,13 +39,13 @@ namespace Mira {
else if(delta < lowerBound_)
delta = lowerBound_;
for(unsigned score = 0; score < scores[analyseSentence].size(); score++) {
newWeights[score] += (delta * (oracleScores[score] - scores[analyseSentence][score] ) );
for(unsigned score = 0; score < scores[analyseSentence]->size(); score++) {
newWeights[score] += (delta * (oracleScores[score] - (*scores[analyseSentence])[score] ) );
}
//calculate max. for criterioin
float sumWeightedFeatures = 0.0;
for(unsigned score = 0; score < scores[analyseSentence].size(); score++) {
for(unsigned score = 0; score < scores[analyseSentence]->size(); score++) {
sumWeightedFeatures += oracleScores[score]*newWeights[score];
}

View File

@ -30,7 +30,7 @@ namespace Mira {
public:
Optimiser() {}
virtual float updateWeights(const std::vector<float>& currWeights,
const std::vector<Moses::ScoreComponentCollection>& scores,
const std::vector<const Moses::ScoreComponentCollection*>& scores,
const std::vector<float>& losses,
const Moses::ScoreComponentCollection oracleScores,
std::vector<float>& newWeights) = 0;
@ -39,7 +39,7 @@ namespace Mira {
class DummyOptimiser : public Optimiser {
public:
virtual float updateWeights(const std::vector<float>& currWeights,
const std::vector<Moses::ScoreComponentCollection>& scores,
const std::vector<const Moses::ScoreComponentCollection*>& scores,
const std::vector<float>& losses,
const Moses::ScoreComponentCollection oracleScores,
std::vector<float>& newWeights) {newWeights = currWeights; return 0.0; }
@ -55,7 +55,7 @@ namespace Mira {
~MiraOptimiser() {}
virtual float updateWeights(const std::vector<float>& currWeights,
const std::vector<Moses::ScoreComponentCollection>& scores,
const std::vector<const Moses::ScoreComponentCollection*>& scores,
const std::vector<float>& losses,
const Moses::ScoreComponentCollection oracleScores,
std::vector<float>& newWeights);

View File

@ -197,7 +197,89 @@
<key>Notifications</key>
<array/>
<key>OpenEditors</key>
<array/>
<array>
<dict>
<key>Content</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1E1419E71243516B00123194</string>
<key>PBXProjectModuleLabel</key>
<string>Optimiser.cpp</string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1E1419E81243516B00123194</string>
<key>PBXProjectModuleLabel</key>
<string>Optimiser.cpp</string>
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
<string>1E1419EB1243516B00123194</string>
<key>history</key>
<array>
<string>1E1419E91243516B00123194</string>
<string>1E1419EA1243516B00123194</string>
</array>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<true/>
</dict>
<key>Geometry</key>
<dict>
<key>Frame</key>
<string>{{0, 20}, {1119, 626}}</string>
<key>PBXModuleWindowStatusBarHidden2</key>
<false/>
<key>RubberWindowFrame</key>
<string>599 111 1119 667 0 0 1280 778 </string>
</dict>
</dict>
<dict>
<key>Content</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1E14198D12434CE600123194</string>
<key>PBXProjectModuleLabel</key>
<string>Main.cpp</string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1E14198E12434CE600123194</string>
<key>PBXProjectModuleLabel</key>
<string>Main.cpp</string>
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
<string>1E1419EC1243516B00123194</string>
<key>history</key>
<array>
<string>1E1419D5124350E400123194</string>
</array>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<true/>
</dict>
<key>Geometry</key>
<dict>
<key>Frame</key>
<string>{{0, 20}, {1119, 626}}</string>
<key>PBXModuleWindowStatusBarHidden2</key>
<false/>
<key>RubberWindowFrame</key>
<string>15 111 1119 667 0 0 1280 778 </string>
</dict>
</dict>
</array>
<key>PerspectiveWidths</key>
<array>
<integer>-1</integer>
@ -271,14 +353,15 @@
<string>1E9DC6C6124268270059001A</string>
<string>08FB7795FE84155DC02AAC07</string>
<string>1C37FBAC04509CD000000102</string>
<string>1E9DC6DF1242685F0059001A</string>
<string>1C37FAAC04509CD000000102</string>
<string>1C37FABC05509CD000000102</string>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
<array>
<array>
<integer>20</integer>
<integer>9</integer>
<integer>7</integer>
<integer>0</integer>
</array>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
@ -301,7 +384,7 @@
<real>186</real>
</array>
<key>RubberWindowFrame</key>
<string>392 268 788 504 0 0 1280 778 </string>
<string>446 260 788 504 0 0 1280 778 </string>
</dict>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
@ -317,7 +400,7 @@
<key>PBXProjectModuleGUID</key>
<string>1CE0B20306471E060097A5F4</string>
<key>PBXProjectModuleLabel</key>
<string>Decoder.cpp</string>
<string>Optimiser.h</string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
@ -325,18 +408,18 @@
<key>PBXProjectModuleGUID</key>
<string>1CE0B20406471E060097A5F4</string>
<key>PBXProjectModuleLabel</key>
<string>Decoder.cpp</string>
<string>Optimiser.h</string>
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
<string>1E9DC84E12427A870059001A</string>
<string>1E1419E61243516B00123194</string>
<key>history</key>
<array>
<string>1E9DC644124260520059001A</string>
<string>1E9DC77B124270D90059001A</string>
<string>1E9DC77C124270D90059001A</string>
<string>1E9DC7DB124273C40059001A</string>
<string>1E9DC82B12427A070059001A</string>
<string>1E9DC9B6124289920059001A</string>
<string>1E9DC9B7124289920059001A</string>
<string>1E1419E51243516B00123194</string>
<string>1E14199112434D6600123194</string>
</array>
</dict>
<key>SplitCount</key>
@ -348,14 +431,14 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {580, 260}}</string>
<string>{{0, 0}, {580, 232}}</string>
<key>RubberWindowFrame</key>
<string>392 268 788 504 0 0 1280 778 </string>
<string>446 260 788 504 0 0 1280 778 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>260pt</string>
<string>232pt</string>
</dict>
<dict>
<key>ContentConfiguration</key>
@ -368,14 +451,14 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 265}, {580, 198}}</string>
<string>{{0, 237}, {580, 226}}</string>
<key>RubberWindowFrame</key>
<string>392 268 788 504 0 0 1280 778 </string>
<string>446 260 788 504 0 0 1280 778 </string>
</dict>
<key>Module</key>
<string>XCDetailModule</string>
<key>Proportion</key>
<string>198pt</string>
<string>226pt</string>
</dict>
</array>
<key>Proportion</key>
@ -394,9 +477,9 @@
</array>
<key>TableOfContents</key>
<array>
<string>1E9DC699124266BE0059001A</string>
<string>1E14198812434CE600123194</string>
<string>1CE0B1FE06471DED0097A5F4</string>
<string>1E9DC69A124266BE0059001A</string>
<string>1E14198912434CE600123194</string>
<string>1CE0B20306471E060097A5F4</string>
<string>1CE0B20506471E060097A5F4</string>
</array>
@ -534,15 +617,15 @@
<integer>5</integer>
<key>WindowOrderList</key>
<array>
<string>1E9DC82F12427A070059001A</string>
<string>1E9DC83012427A070059001A</string>
<string>1E14199612434D6800123194</string>
<string>1E5ADDB112425FB5005C8D71</string>
<string>/Users/hieuhoang/Documents/unison/workspace/Projects/sourceforge/branches/mira-mtm5/mira/mira.xcodeproj</string>
<string>1C78EAAD065D492600B07095</string>
<string>1CD10A99069EF8BA00B06720</string>
<string>/Users/hieuhoang/Documents/unison/workspace/Projects/sourceforge/branches/mira-mtm5/mira/mira.xcodeproj</string>
<string>1E14198D12434CE600123194</string>
<string>1E1419E71243516B00123194</string>
</array>
<key>WindowString</key>
<string>392 268 788 504 0 0 1280 778 </string>
<string>446 260 788 504 0 0 1280 778 </string>
<key>WindowToolsV3</key>
<array>
<dict>
@ -621,7 +704,7 @@
<key>TableOfContents</key>
<array>
<string>1E5ADDB112425FB5005C8D71</string>
<string>1E9DC69B124266BE0059001A</string>
<string>1E14194C12434AF300123194</string>
<string>1CD0528F0623707200166675</string>
<string>XCMainBuildResultsModuleGUID</string>
</array>
@ -634,7 +717,7 @@
<key>WindowToolGUID</key>
<string>1E5ADDB112425FB5005C8D71</string>
<key>WindowToolIsVisible</key>
<true/>
<false/>
</dict>
<dict>
<key>FirstTimeWindowDisplayed</key>
@ -665,8 +748,8 @@
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {316, 185}}</string>
<string>{{316, 0}, {378, 185}}</string>
<string>{{0, 0}, {316, 201}}</string>
<string>{{316, 0}, {378, 201}}</string>
</array>
</dict>
<key>VerticalSplitView</key>
@ -681,8 +764,8 @@
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {694, 185}}</string>
<string>{{0, 185}, {694, 196}}</string>
<string>{{0, 0}, {694, 201}}</string>
<string>{{0, 201}, {694, 180}}</string>
</array>
</dict>
</dict>
@ -715,12 +798,12 @@
<real>148</real>
</array>
<key>Frame</key>
<string>{{316, 0}, {378, 185}}</string>
<string>{{316, 0}, {378, 201}}</string>
<key>RubberWindowFrame</key>
<string>413 327 694 422 0 0 1280 778 </string>
<string>519 321 694 422 0 0 1280 778 </string>
</dict>
<key>RubberWindowFrame</key>
<string>413 327 694 422 0 0 1280 778 </string>
<string>519 321 694 422 0 0 1280 778 </string>
</dict>
<key>Module</key>
<string>PBXDebugSessionModule</string>
@ -743,18 +826,18 @@
<key>TableOfContents</key>
<array>
<string>1CD10A99069EF8BA00B06720</string>
<string>1E9DC6EF124269F80059001A</string>
<string>1E14194D12434AF300123194</string>
<string>1C162984064C10D400B95A72</string>
<string>1E9DC6F0124269F80059001A</string>
<string>1E9DC6F1124269F80059001A</string>
<string>1E9DC6F2124269F80059001A</string>
<string>1E9DC6F3124269F80059001A</string>
<string>1E9DC6F4124269F80059001A</string>
<string>1E14194E12434AF300123194</string>
<string>1E14194F12434AF300123194</string>
<string>1E14195012434AF300123194</string>
<string>1E14195112434AF300123194</string>
<string>1E14195212434AF300123194</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.debugV3</string>
<key>WindowString</key>
<string>413 327 694 422 0 0 1280 778 </string>
<string>519 321 694 422 0 0 1280 778 </string>
<key>WindowToolGUID</key>
<string>1CD10A99069EF8BA00B06720</string>
<key>WindowToolIsVisible</key>
@ -1060,18 +1143,18 @@
<string>743 379 452 308 0 0 1280 1002 </string>
</dict>
<dict>
<key>FirstTimeWindowDisplayed</key>
<false/>
<key>Identifier</key>
<string>windowTool.breakpoints</string>
<key>IsVertical</key>
<integer>0</integer>
<false/>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXBottomSmartGroupGIDs</key>
@ -1113,7 +1196,7 @@
<key>PBXTopSmartGroupGIDs</key>
<array/>
<key>XCIncludePerspectivesSwitch</key>
<integer>0</integer>
<false/>
</dict>
<key>GeometryConfiguration</key>
<dict>
@ -1125,7 +1208,7 @@
<real>168</real>
</array>
<key>RubberWindowFrame</key>
<string>315 424 744 409 0 0 1440 878 </string>
<string>182 346 744 409 0 0 1280 778 </string>
</dict>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
@ -1133,6 +1216,8 @@
<string>185pt</string>
</dict>
<dict>
<key>BecomeActive</key>
<true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
@ -1145,7 +1230,7 @@
<key>Frame</key>
<string>{{190, 0}, {554, 368}}</string>
<key>RubberWindowFrame</key>
<string>315 424 744 409 0 0 1440 878 </string>
<string>182 346 744 409 0 0 1280 778 </string>
</dict>
<key>Module</key>
<string>XCDetailModule</string>
@ -1169,22 +1254,22 @@
<string>XCDetailModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<true/>
<key>TableOfContents</key>
<array>
<string>1CDDB66807F98D9800BB5817</string>
<string>1CDDB66907F98D9800BB5817</string>
<string>1E14199612434D6800123194</string>
<string>1E14199712434D6800123194</string>
<string>1CE0B1FE06471DED0097A5F4</string>
<string>1CA1AED706398EBD00589147</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.breakpointsV3</string>
<key>WindowString</key>
<string>315 424 744 409 0 0 1440 878 </string>
<string>182 346 744 409 0 0 1280 778 </string>
<key>WindowToolGUID</key>
<string>1CDDB66807F98D9800BB5817</string>
<string>1E14199612434D6800123194</string>
<key>WindowToolIsVisible</key>
<integer>1</integer>
<false/>
</dict>
<dict>
<key>Identifier</key>

File diff suppressed because it is too large Load Diff

View File

@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
1E14194512434AE900123194 /* Optimiser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E14194412434AE900123194 /* Optimiser.cpp */; };
1E9DC63C1242602F0059001A /* Decoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E9DC6391242602F0059001A /* Decoder.cpp */; };
1E9DC63D1242602F0059001A /* Main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E9DC63B1242602F0059001A /* Main.cpp */; };
1E9DC6DA1242684C0059001A /* libmoses-chart.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E9DC6D1124268310059001A /* libmoses-chart.a */; };
@ -20,21 +21,21 @@
isa = PBXContainerItemProxy;
containerPortal = 1E9DC6C6124268270059001A /* moses.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = D2AAC046055464E500DB518D /* libmoses.a */;
remoteGlobalIDString = D2AAC046055464E500DB518D;
remoteInfo = moses;
};
1E9DC6D0124268310059001A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1E9DC6CC124268310059001A /* moses-chart.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = D2AAC046055464E500DB518D /* libmoses-chart.a */;
remoteGlobalIDString = D2AAC046055464E500DB518D;
remoteInfo = "moses-chart";
};
1E9DC6D8124268440059001A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1E9DC6D4124268440059001A /* OnDiskPt.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = D2AAC046055464E500DB518D /* libOnDiskPt.a */;
remoteGlobalIDString = D2AAC046055464E500DB518D;
remoteInfo = OnDiskPt;
};
/* End PBXContainerItemProxy section */
@ -53,6 +54,7 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
1E14194412434AE900123194 /* Optimiser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Optimiser.cpp; sourceTree = "<group>"; };
1E9DC6391242602F0059001A /* Decoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Decoder.cpp; sourceTree = "<group>"; };
1E9DC63A1242602F0059001A /* Decoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Decoder.h; sourceTree = "<group>"; };
1E9DC63B1242602F0059001A /* Main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Main.cpp; sourceTree = "<group>"; };
@ -95,6 +97,7 @@
08FB7795FE84155DC02AAC07 /* Source */ = {
isa = PBXGroup;
children = (
1E14194412434AE900123194 /* Optimiser.cpp */,
1E9DC63E124260370059001A /* Optimiser.h */,
1E9DC6391242602F0059001A /* Decoder.cpp */,
1E9DC63A1242602F0059001A /* Decoder.h */,
@ -227,6 +230,7 @@
files = (
1E9DC63C1242602F0059001A /* Decoder.cpp in Sources */,
1E9DC63D1242602F0059001A /* Main.cpp in Sources */,
1E14194512434AE900123194 /* Optimiser.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View File

@ -33,5 +33,11 @@ TrellisPathList::~TrellisPathList()
Moses::RemoveAllInColl(m_collection);
}
const TrellisPath &TrellisPathList::Get(size_t ind) const
{
assert(ind < m_collection.size());
return *m_collection[ind];
}
} // namespace

View File

@ -48,6 +48,7 @@ public:
size_t GetSize() const
{ return m_collection.size(); }
const TrellisPath &Get(size_t ind) const;
//! add a new entry into collection
void Add(TrellisPath *trellisPath)