Class: SA_Analysis
- Inherits:
-
Object
- Object
- SA_Analysis
- Defined in:
- lib/flukso/plots.rb
Instance Method Summary collapse
-
#initialize(path, datafile, loadlevel) ⇒ SA_Analysis
constructor
A new instance of SA_Analysis.
- #plotSingleRun ⇒ Object
- #plotSingleRun_Accepted ⇒ Object
- #plotSingleRun_Energy ⇒ Object
- #plotSingleRun_Temperature ⇒ Object
Constructor Details
#initialize(path, datafile, loadlevel) ⇒ SA_Analysis
Returns a new instance of SA_Analysis.
434 435 436 437 438 439 440 |
# File 'lib/flukso/plots.rb', line 434 def initialize(path, datafile, loadlevel) @workingdir=path @datafile = File.(File.join(path, datafile)) @loadlevel = loadlevel puts "Using data from file #{@datafile}" if $verbose @runner = RRunner.new(path) end |
Instance Method Details
#plotSingleRun ⇒ Object
441 442 443 444 445 446 |
# File 'lib/flukso/plots.rb', line 441 def plotSingleRun methods.grep(/^plotSingleRun_/){|m| self.send(m) } sleep(1) end |
#plotSingleRun_Accepted ⇒ Object
475 476 477 478 479 480 481 482 483 484 485 486 487 488 |
# File 'lib/flukso/plots.rb', line 475 def plotSingleRun_Accepted drawcmd=" l<-length(data$Accepted)\n range<-1:l\n plot(range, data$Accepted, type=\"n\",\n main=\"Number of Accepted Solutions\",\n xlab=\"Iteration\",\n ylab=\"# Accepted\"\n )\n points(range, data$Accepted, pch=1)\n END_OF_CMD\n outfile=\"sa-accepted-\"[email protected]_s\n @runner.execute(@datafile, outfile, drawcmd)\nend\n" |
#plotSingleRun_Energy ⇒ Object
447 448 449 450 451 452 453 454 455 456 457 458 459 460 |
# File 'lib/flukso/plots.rb', line 447 def plotSingleRun_Energy drawcmd=" l<-length(data$Energy)\n range<-1:l\n plot(range, data$Energy, type=\"n\",\n main=\"Energy of the Solutions\",\n xlab=\"Iteration\",\n ylab=\"Absolute Energy\"\n )\n points(range, data$Energy)\n END_OF_CMD\n outfile=\"sa-energy-\"[email protected]_s\n @runner.execute(@datafile, outfile, drawcmd)\nend\n" |
#plotSingleRun_Temperature ⇒ Object
461 462 463 464 465 466 467 468 469 470 471 472 473 474 |
# File 'lib/flukso/plots.rb', line 461 def plotSingleRun_Temperature drawcmd=" l<-length(data$Temperature)\n range<-1:l\n plot(range, data$Temperature, type=\"n\",\n main=\"Temperature of the Solutions\",\n xlab=\"Iteration\",\n ylab=\"Temperature\"\n )\n points(range, data$Temperature, pch=1)\n END_OF_CMD\n outfile=\"sa-temperature-\"[email protected]_s\n @runner.execute(@datafile, outfile, drawcmd)\nend\n" |