Log In | Get Help   
Home My Page Projects Code Snippets Project Openings Mareframe
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files
[mareframe] Diff of /trunk/gadget/readmain.cc
[mareframe] / trunk / gadget / readmain.cc Repository:
ViewVC logotype

Diff of /trunk/gadget/readmain.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1, Mon Feb 10 17:09:07 2014 UTC revision 20, Fri Apr 7 09:20:55 2017 UTC
# Line 278  Line 278 
278  //  //
279  // A function to read optimisation information  // A function to read optimisation information
280  //  //
281  void Ecosystem::readOptimisation(CommentStream& infile) {  void Ecosystem::readOptimisation(CommentStream& infile, unsigned* seed) {
282    char* text = new char[MaxStrLength];    char* text = new char[MaxStrLength];
283    strncpy(text, "", MaxStrLength);    strncpy(text, "", MaxStrLength);
284    handle.logMessage(LOGMESSAGE, "Reading optimisation information");    handle.logMessage(LOGMESSAGE, "Reading optimisation information");
# Line 305  Line 305 
305        optvec.resize(new OptInfoSimann());        optvec.resize(new OptInfoSimann());
306      else if (strcasecmp(text, "[bfgs]") == 0)      else if (strcasecmp(text, "[bfgs]") == 0)
307        optvec.resize(new OptInfoBFGS());        optvec.resize(new OptInfoBFGS());
308        else if (strcasecmp(text, "[pso]") == 0)
309          optvec.resize(new OptInfoPso());
310      else      else
311        handle.logFileUnexpected(LOGFAIL, "[hooke], [simann], or [bfgs]", text);        handle.logFileUnexpected(LOGFAIL, "[hooke], [simann], [bfgs], or [pso]", text);
312    
313      if (!infile.eof()) {      if (!infile.eof()) {
314        infile >> text;        infile >> text;
315          optvec[count]->setSeed(seed);
316        optvec[count]->read(infile, text);        optvec[count]->read(infile, text);
317      } else      } else
318        handle.logMessage(LOGINFO, "Warning - no parameters specified for optimisation algorithm");        handle.logMessage(LOGINFO, "Warning - no parameters specified for optimisation algorithm");

Legend:
Removed from v.1  
changed lines
  Added in v.20

root@forge.cesga.es
ViewVC Help
Powered by ViewVC 1.0.0  

Powered By FusionForge