diff --git a/DESCRIPTION b/DESCRIPTION index cfe0ba7..fbf53b4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -94,4 +94,5 @@ Click here to access these files OTHER SOURCES -Test problems are also available by anonymous ftp here \ No newline at end of file +Test problems are also available by anonymous ftp here + diff --git a/MIT-LICENSE b/MIT-LICENSE index 227b821..b9d5b25 100644 --- a/MIT-LICENSE +++ b/MIT-LICENSE @@ -17,4 +17,5 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/README b/README index 1b8ad9a..53ba0e8 100644 --- a/README +++ b/README @@ -15,4 +15,5 @@ The timetable-data was retrieved from http://people.brunel.ac.uk/~mastjjb/jeb/or You need rspec 2.4.0 to run the test. For automatic testing install watchr and type "watchr watchr.rb" -All files are licensed under the MIT license. See MIT-LICENSE for details. \ No newline at end of file +All files are licensed under the MIT license. See MIT-LICENSE for details. + diff --git a/analysis.rb b/analysis.rb index afa76ae..23fab52 100644 --- a/analysis.rb +++ b/analysis.rb @@ -192,4 +192,5 @@ end end puts "" -end \ No newline at end of file +end + diff --git a/base.rb b/base.rb index 4d6b2bb..6f729f3 100644 --- a/base.rb +++ b/base.rb @@ -198,4 +198,5 @@ def eval_unfulfilled_constraints expected_constraints.length end -end \ No newline at end of file +end + diff --git a/generate_graphs.rb b/generate_graphs.rb index 14ad70a..8cac69a 100644 --- a/generate_graphs.rb +++ b/generate_graphs.rb @@ -111,4 +111,5 @@ def calculate_statistic(filename) g.data(filename.second, hddt4_iterations_per_collision[i].compact) end g.labels = hdtt4_labels -g.write('output/iterations_per_collision4.png') \ No newline at end of file +g.write('output/iterations_per_collision4.png') + diff --git a/mutations.rb b/mutations.rb index 71bac6f..44f0260 100644 --- a/mutations.rb +++ b/mutations.rb @@ -279,4 +279,5 @@ def call(individual) child.eval_fitness child end -end \ No newline at end of file +end + diff --git a/recombinations.rb b/recombinations.rb index 8f453f1..9e68312 100644 --- a/recombinations.rb +++ b/recombinations.rb @@ -170,4 +170,5 @@ def call(individual1, individual2) neighbours.inject(0){|sum, n| sum += calc_collisions(n, constraint)} end end -end \ No newline at end of file +end + diff --git a/selections.rb b/selections.rb index f3b28fd..6e3f9a8 100644 --- a/selections.rb +++ b/selections.rb @@ -56,4 +56,5 @@ def select(x, population, options = {}) x.times { selection << population.sample } selection end -end \ No newline at end of file +end + diff --git a/spec/base_spec.rb b/spec/base_spec.rb index 2aaff55..318dbbe 100644 --- a/spec/base_spec.rb +++ b/spec/base_spec.rb @@ -219,4 +219,5 @@ child.class.should == Individual child.should_not == subject end -end \ No newline at end of file +end + diff --git a/spec/mutations_spec.rb b/spec/mutations_spec.rb index 782bd8a..d554719 100644 --- a/spec/mutations_spec.rb +++ b/spec/mutations_spec.rb @@ -39,4 +39,5 @@ end end end -end \ No newline at end of file +end + diff --git a/spec/recombinations_spec.rb b/spec/recombinations_spec.rb index e101425..9776dd2 100644 --- a/spec/recombinations_spec.rb +++ b/spec/recombinations_spec.rb @@ -45,4 +45,5 @@ end end end -end \ No newline at end of file +end + diff --git a/spec/selections_spec.rb b/spec/selections_spec.rb index 2113748..bfc08b5 100644 --- a/spec/selections_spec.rb +++ b/spec/selections_spec.rb @@ -92,4 +92,5 @@ def initialize(fitness) subject.select(5, @population, {}).length.should == 5 end end -end \ No newline at end of file +end + diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 2c78e32..4903cc5 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -48,4 +48,5 @@ def individual_generator(values = {}) it "has as many collisions as possible" do subject.collisions.should == MAX_COLLISIONS end -end \ No newline at end of file +end + diff --git a/timetabling.rb b/timetabling.rb index 52a3d50..e716f61 100644 --- a/timetabling.rb +++ b/timetabling.rb @@ -1,10 +1,10 @@ # Copyright (c) 2011 Florian Pilz # See MIT-LICENSE for license information. -require 'base' -require 'mutations' -require 'recombinations' -require 'selections' +require './base.rb' +require './mutations.rb' +require './recombinations.rb' +require './selections.rb' require 'ostruct' require 'optparse' @@ -196,4 +196,5 @@ def self.read_possibilities(file, superclass) options[:cycles].times do Timetabling::run(options.merge({:constraints => constraints, :mutation => mutation, :recombination => recombination, :environmental_selection => environmental_selection, :number_of_slots => 30})) -end \ No newline at end of file +end + diff --git a/watchr.rb b/watchr.rb index 801b3c0..e11b677 100644 --- a/watchr.rb +++ b/watchr.rb @@ -1,2 +1,3 @@ watch('spec/.*_spec\.rb') {|match| system "rspec -c spec/" } -watch('.*\.rb') {|match| system "rspec -c spec/" } \ No newline at end of file +watch('.*\.rb') {|match| system "rspec -c spec/" } +