Skip to content
This repository was archived by the owner on Dec 20, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,5 @@ Click here to access these files

OTHER SOURCES

Test problems are also available by anonymous ftp here
Test problems are also available by anonymous ftp here

3 changes: 2 additions & 1 deletion MIT-LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -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.
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

3 changes: 2 additions & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -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.
All files are licensed under the MIT license. See MIT-LICENSE for details.

3 changes: 2 additions & 1 deletion analysis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,5 @@
end
end
puts ""
end
end

3 changes: 2 additions & 1 deletion base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,5 @@ def eval_unfulfilled_constraints

expected_constraints.length
end
end
end

3 changes: 2 additions & 1 deletion generate_graphs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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')
g.write('output/iterations_per_collision4.png')

3 changes: 2 additions & 1 deletion mutations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -279,4 +279,5 @@ def call(individual)
child.eval_fitness
child
end
end
end

3 changes: 2 additions & 1 deletion recombinations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,5 @@ def call(individual1, individual2)
neighbours.inject(0){|sum, n| sum += calc_collisions(n, constraint)}
end
end
end
end

3 changes: 2 additions & 1 deletion selections.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,5 @@ def select(x, population, options = {})
x.times { selection << population.sample }
selection
end
end
end

3 changes: 2 additions & 1 deletion spec/base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,5 @@
child.class.should == Individual
child.should_not == subject
end
end
end

3 changes: 2 additions & 1 deletion spec/mutations_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@
end
end
end
end
end

3 changes: 2 additions & 1 deletion spec/recombinations_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@
end
end
end
end
end

3 changes: 2 additions & 1 deletion spec/selections_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,5 @@ def initialize(fitness)
subject.select(5, @population, {}).length.should == 5
end
end
end
end

3 changes: 2 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@ def individual_generator(values = {})
it "has as many collisions as possible" do
subject.collisions.should == MAX_COLLISIONS
end
end
end

11 changes: 6 additions & 5 deletions timetabling.rb
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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
end

3 changes: 2 additions & 1 deletion watchr.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
watch('spec/.*_spec\.rb') {|match| system "rspec -c spec/" }
watch('.*\.rb') {|match| system "rspec -c spec/" }
watch('.*\.rb') {|match| system "rspec -c spec/" }