My Gecode page
Gecode is a C++ based constraint programming system, and (from the site) is an open, free, portable, accessible, and efficient environment for developing constraint-based systems and applications.
Main site
* Gecode
Download
* Download
Dokumentation
* Documentation
* Publications
* Modeling and Programming with Gecode
* See the great collection of examples
Mailing list etc
* Community
Interfaces to other systems
* Interfaces
* Solver for MiniZinc models: Gecode/FlatZinc. (See My MiniZinc page for more about MiniZinc and a collection of models.)
2013-03-30: Updated all the models to Gecode version 4.0. (See Changes in Version 4.0.0 (2013-03-14) for the changes in Gecode 4.0.)
My Gecode models
Below are some of my models for Gecode version 4.0. Explanation and references are in each specific file.
- 3_jugs2.cpp: 3 jugs problem, CP solution
- a_round_of_golf.cpp: A Round of Golf (Dell Logic Puzzles)
- abbots_puzzle.cpp: Abbott's puzzle (Dudeney)
- added_corner.cpp: Added corner puzzle
- all_differ_from_at_least_k_pos.cpp: Global constraint all_differ_from_at_least_k_pos (decomposition)
- all_equal.cpp: Global constraint all_equal (decomposition)
- all_interval.cpp: All interval problem (series), (CSPLib problem 7)
- all_min_dist.cpp: Global constraint all_min_dist (decomposition)
- all_regexp.cpp: Generating variants of names via regular expressions (two examples: "Henning Mankell", and "Kjellerstrand")
- alldifferent_cst.cpp: Global constraint alldifferent_cst (decomposition)
- alldifferent_except_0.cpp: Global constraint of alldifferent_except_0 (decomposition), also the slightly more general alldifferent_except_c
- alldifferent_modulo.cpp: Global constraint alldifferent_modulo (decomposition)
- alldifferent_on_intersection_modulo.cpp: Global constraint alldifferent_on_intersection_modulo (decomposition)
- among.cpp: Global constraint among (decomposition)
- among_seq.cpp: Global constraint among_seq (decomposition)
- arch_friends.cpp: Arch friends (Dell Logic Puzzles)
- assignment.cpp: Assignment problem (Winston)
- averbach_1.2.cpp: Seating puzzle, Problem 1.2 from Averbach & Chein "Problem Solving Through Recreational Mathematics"
- averbach_1.3.cpp: Problem 1.3 from Averbach & Chein "Problem Solving Through Recreational Mathematics"
- averbach_1.4.cpp: Seating puzzle, Problem 1.4, from Averbach & Chein "Problem Solving Through Recreational Mathematics")
- babysittning.cpp: Babysitting puzzle (Dell Logic Puzzles)
- bales_of_hay.cpp: Bales of Hay puzzle
- bin_packing.cpp: Some bin packing problems
- bin_packing2.cpp: (Decomposition of the) global constraint bin_packing (not exactly like the traditional bin packing))
- breaking_news.cpp: Breaking news puzzle (Dell Logic Puzzles)
- broken_weights.cpp: Broken weights problem
- building_a_house.cpp: Building a house, scheduling (with the
cumulatives
constraint)
- building_blocks.cpp: Building Blocks (Dell Logic Puzzle)
- bus_schedule.cpp: Bus scheduling (Taha)
- calculs_d_enfer.cpp: Calculs d'enfer puzzle (from the NCL manual)
- circling_squares.cpp: Circling squares
- circuit_orbit.cpp: Global constraint circuit (decomposition) using permutation orbits
- clique.cpp: Global constraint clique (decomposition), maximize the cardinality of cliques in a graph
- clock_triplets.cpp: Dean Clark's Clock Triplets Problem
- coins3.cpp: Minimum mumber of coins that allows one to pay exactly any amount smaller than one Euro (ECLiPSe)
- coins_grid.cpp: Placing coins on a grid (Tony Hurlimann)
- combinatorial_auction.cpp: Combinatorial auction
- contracting_costs.cpp: Contracting costs
- covering_opl.cpp: Set covering, selecting workers (from OPL example covering.mod)
- crossfigure.cpp: Crossfigure problem (CSPLib #21)
- crossword2.cpp: Cross word (standard CLP example). This version uses the built in
Element
for matrices.
- cumulatives_examples.cpp: The 8 examples of the
cumulatives
constraint from the paper A new multi-resource cumulatives constraint with negative heights (ps.Z) by Nicolas Beldiceanu and Mats Carlsson
- cur_num.cpp: Curious number
- curious_set_of_integers.cpp: Curious set of integers (Martin Gardner)
- debruin.cpp: de Bruijn sequences, both "classic" and "arbitrary"
- devils_word.cpp: Devil's word
- diet.cpp: simple diet problem (operations research)
- dinner.cpp: Dinner problem
- discrete_tomography.cpp: Discrete tomography
- distribute.cpp: (Decomposition of) global constraint distribute
- divisible_by_9_through_1.cpp: Divisible by 9 through 1 (truncated numbers). In "any" base.
- donald_gerald_robert.cpp: DONALD+GERALD=ROBERT, an experiment in "tweaking"
- drive_ya_nuts.cpp: Drive Ya Nuts puzzle (rotated "nuts")
- einstein_opl.cpp: Einstein puzzle. Gecode variant of the OPL model presented in Daniel Selman's Einstein's Puzzle
- exodus.cpp: Exodus puzzle (Dell Logic Puzzles)
- fancy.cpp: Mr Greenguest puzzle (Fancy dress problem, from LPL
- fill_a_pix.cpp: Fill-a-pix problem
- fill_in_the_squares.cpp: Fill in the squares problem (Brainjammer)
- five_brigands.cpp: Five brigands problem
- four_islands.cpp: Four islands puzzle (Dell Logic Puzzles)
- furniture_moving.cpp: Furniture moving (simple scheduling problem, from Marriott & Stuckey)
- futoshiki.cpp: Futoshiki puzzle
- general_store.cpp: General store problem
- global_contiguity.cpp: Global constraint global contiguity, decomposition using one variant inspired by the slide constraint, and one version using regular expressions
- hamming_distance.cpp: Hamming distance
- hanging_weights.cpp: Hanging weights problem
- heterosquare.cpp: Heterosquare problem
- hidato.cpp: Hidato puzzle
- huey_dewey_louie.cpp: Huey Dewey Louie logical puzzle
- inverse.cpp: (Decomposition of) global constraint inversei
- isbn.cpp: Some explorations of ISBN13
- jobs_puzzle.cpp: Jobs puzzle (standard problem from Automatic Reasoning
- just_forgotten.cpp: Just forgotten (Enigma puzzle #1517)
- K4P2GracefulGraph2.cpp: K4P2 GracefulGraph
- kakuro.cpp: Kakuro, a grid puzzle
- kenken2.cpp: KenKen, a grid puzzle
- killer_sudoku.cpp: Killer Sudoku
- knapsack_investments.cpp: Knapsack investments (from Lundgren, Rönnqvist, Värbrand "Optimeringslära")
- labeled_dice.cpp: Labeled dice problem, from Jim Orlin "Colored letters, labeled dice: a logic puzzle"
- latin_square_card_puzzle.cpp: Latin square card puzzle
- latin_squares.cpp: Latin squares
- least_diff.cpp: Least diff problem, an alphametic puzzle, minimize the difference ABCDE-FGHIJ where A..J is integers 0..9 (all different)
- lecture_series.cpp: Lecture series puzzle (Dell Logic Puzzles)
- lichtenstein_coloring.cpp: Coloring problem: coloring Lichtenstein's communes and exclaves)
- mamas_age.cpp: Mama's age problem
- map.cpp: Simple coloring problem (Van Hentenryck)
- marathon2.cpp: Marthon problem (problem from XPress)
- minesweeper2.cpp: Minesweeper
- miss_manners.cpp: Miss Manner's seating problem
- monks_and_doors.cpp: Monks and doors
- mr_smith.cpp: Mr Smith problem
- music_men.cpp: Music men problem
- nadel.cpp: Nadel's construction problem ("soft" version)
- number_of_days.cpp: Number of days problem (knapsack)
- olympic.cpp: Olympic puzzle (standard Prolog problem)
- organize_day.cpp: Organizing a day, simple scheduling
- pandigital_numbers.cpp: Pandigital numbers
- pert.cpp: Scheduling, simple PERT problem (van Hentenryck)
- pigeon_hole.cpp: Pigeon hole problem
- place_number_puzzle.cpp: Place number puzzle
- post_office_problem2.cpp: Post office problem (from Winston "Operations Research")
- pythagoras.cpp: Pythagoras number
- quasigroup_completion.cpp: Quasigroup Completion
- rabbits.cpp: Rabbits problem (Van Hentenryck, OPL Book)
- remainders.cpp: Remainders problem
- safe_cracking.cpp: Safe cracking problem
- schedule1.cpp: Simple sceduling problem
- scheduling_speakers.cpp: Scheduling speakers (Rina Dechter "Constraint Processing", page 72)
- send_more_money_any_base.cpp: SEND+MORE=MONEY in any base
- seseman.cpp: simple recreational mathematics puzzle. See the CGI-program Seseman convent problem
- seseman2.cpp: A more general model of the Seseman problem
- set_covering.cpp: Set covering: placing of fire stations (Winston "Operations Research")
- set_covering2.cpp: Set covering problem (Taha, placing of telephones on a campus)
- set_covering3.cpp: Set covering problem (Murty, select senators for committees)
- set_covering4.cpp: Set covering and set partition (Lundgren, Rönnqvist, Värbrand: "Optimeringslära"
- set_covering_deployment.cpp: Set covering deployment
- set_covering_skiena.cpp: Set covering problem (Skiena)
- set_partition.cpp: Set partition problem
- seven11.cpp: Sevel eleven problem
- sicherman_dice.cpp: Sicherman dice
- ski_assignment.cpp: Ski assignment problem
- smuggler_knapsack.cpp: Smuggler's knapsack
- sonet_problem.cpp: SONET problem
- square_root_of_wonderful.cpp: Square root of WONDERFUL (Martin Gardner)
- stable_marriage.cpp: Stable marriage problem (Van Hentenryck)
- strimko2.cpp: Strimko puzzles (Latin squares with "streams")
- stuckey_seesaw.cpp: Balancing on a seesaw (Marriot and Stuckey)
- subset_sum.cpp: Subset sum problem
- sudoku_pi.cpp: Pi Day Sudoku 2009
- survo_puzzle.cpp: Survo puzzle
- talisman_square.cpp: Talisman Square
- timpkin.cpp: Mrs Timpkin's age problem (Dudeney)
- to_num.cpp: Channeling an integer to an array of integer in a specific base
- torn_number.cpp: Torn number puzzle (Dudeney)
- tourist_site_competition.cpp: Tourist site competition (P. Flener)
- traffic_lights.cpp: Traffic lights problem (CSPLib problem 16)
- tunapalooza.cpp: Tunapalooza puzzle (Dell Logic Puzzles)
- twin_letters.cpp: Twin letters problem
- warehouse.cpp: Warehouse location problem (OPL example)
- who_killed_agatha.cpp: Who killed agatha? (The Dreadsbury Mansion Murder Mystery, an automated reasoning problem)
- who_killed_agatha2.cpp: Who killed agatha? (The Dreadsbury Mansion Murder Mystery, an automated reasoning problem). This version uses the built in
Element
for matrices.
- word_square.cpp: Word square, square matrix cross words (fill the whole square with unique words)
- word_square2.cpp: Word square, square matrix cross words (fill the whole square with unique words). This version uses the built in
Element
for matrices.
- xkcd.cpp: XKCD's knapsack problem. See the xkcd strip for the problem
- young_tableaux.cpp: Young tableaux and partitions
- zebra.cpp: The Zebra puzzle (standard constraint programming problem)
Also see
* My Constraint Programming Blog, especially the Gecode category
* My Constraint Programming page
* Common constraint programming problems
* My MiniZinc page
* My Zinc page
* My Choco page
* My JaCoP page
* My JaCoP/Scala page
* My Comet page
* My Gecode/R page
* My ECLiPSe page
* My Tailor/Essence' page
* My SICStus Prolog page
* My Google CP Solver page
* My OscaR page
* My JSR-331 page
* My Numberjack page
* My AIMMS+CP page
* My B-Prolog page
* My Choco3 page
* My Picat page
* My z3/python page
* My SWI-Prolog page
Back to my homepage
Created by Hakan Kjellerstrand hakank@gmail.com