My ILOG OPL page
Here are some of my ILOG OPL models, using IBM ILOG CPLEX Optimization Studio.
Note that most of these models includes code for generating all solutions and labeling. This is often not needed but I prefer this approach (for testing and debugging). Also, this means that the selected strategies might not be the best/fastest.
Please also note that these models were written in 2013 but was - for certain reasons not published until 2025. This mean that there might be newer and better ways of modeling these problems.
These models are also available at my GitHub repo: github.com/hakank/hakank/tree/master/opl.
- a_puzzle.mod: "A Puzzle", 8809=6,... (from God Plays Dice "A Puzzle")
- a_round_of_golf.mod: A Round of Golf (Dell Logic Puzzles)
- abbots_puzzle.mod: Abbot's puzzle (Dudeney)
- all_interval.mod: All interval problem (CSPLib #7)
- added_corner.mod: Added Corner puzzle
- alldifferent_except_0.mod: Decomposition of the global constraint
alldifferent_except_0
- arch_friends.mod: Arch Friends problem (Dell Logic Puzzles)
- assignment.mod: Assignment problem (Wayne Winston "Operations Research")
- babysitting.mod: Babysitting puzzle (Dell Logic Puzzles)
- bales_of_hay.mod: Bales of Hay (weighing problem)
- breaking_news.mod: Breaking News (Dell Logic Puzzles)
- broken_weights.mod: Broken weights (another weighing problem)
- bus_schedule.mod: Bus scheduling problem (Taha "Introduction to Operations Research")
- calculs_d_enfer.mod: Calculs d'Enfer puzzle (NCL manual)
- circling_square.mod: Circling square problem (Dudeney)
- circuit.mod: Decomposition of global constraint
circuit
(with extraction of the path as well)
- coins_grid.mod: Coins grid problem (Tony Hurlimann)
- coins3.mod: Minimum mumber of coins that allows one to pay exactly any amount smaller than one Euro
- coins3b.mod: Minimum mumber of coins that allows one to pay exactly any amount smaller (here we also decide about the denominations of the coins)
- combinatorial_auction.mod: Combinatorial Auction
Data files:
- costas_array.mod: Costas array
- crew.mod: Crew allocation problem (Gecode)
- crossword2.mod: Simple crossword puzzle
- crypta.mod: Cryptarithmetic puzzle (standard Prolog benchmark)
- crypto.mod: Cryptarithmetic puzzle (standard Prolog benchmark)
- cur_num.mod: Curious Numbers (Dudeney)
- curious_set_of_integers.mod: Curious set of integers (Martin Gardners)
- debruijn.mod: de Bruijn sequences (both "classical" and "arbitrary)
- devils_word.mod: Devil's Word
- diet1.mod: Simple diet optimization problem
- discrete_tomography.mod: Discrete tomography
- divisible_by_9_through_1.mod: Divisible by 9 through 1 (alphametic) puzzle
- dudeney_numbers.mod: Dudeney Numbers
- einav_puzzle.mod: Optimization problem (A programming puzzle from Einav)
- eq10.mod: Eq10, standard benchmark problem
- eq20.mod: Eq20, standard benchmark problem
- eyedrop_optimize2.mod: Optimize the time (hour) a number of different eye drops should be taken on a day (disperse each type as much as possible).
Data files:
- fancy.mod: Fancy dress problem (Mr Greenguest puzzle)
- finding_celebrities.mod: Finding celebrities at a party
Data files:
- four_islands.mod: Four Islands puzzle (Dell Logic Puzzle)
- fractions.mod: Fractions puzzle (Prolog benchmark)
- furniture_moving.mod: Furniture moving, simple scheduling using a decomposition of
cumulative
- fill_a_pix.mod: Fill-a-Pix puzzle
- futoshiki.mod: Futoshiki grid puzzle
- general_store.mod: General Store problem (Sam Loyd)
- global_contiguity.mod: Decomposition of global constraint
global contiguity
- grocery.mod: Grocery puzzle
- hamming_distance.mod: Hamming distance
- handshaking.mod: Halmos' handshake problem
- heterosquare.mod: Heterosquare
- hidato.mod: Hidato puzzle
- hidato_table.mod: Hidato puzzle using allowedAssignments (faster)
- isbn.mod: Some explorations in ISBN13
- jobs_puzzle.mod: Jobs Puzzle (Larry Wos, an automated reasoning problem)
)
- just_forgotten.mod: Just Forgotten puzzle (Enigma puzzle #1517)
- kakuro.mod: Kakuro grid puzzle
- kenken2.mod: KenKen grid puzzle
- killer_sudoku.mod: Killer Sudoku
- labeled_dice.mod: Labeled dice problem (from Jim Orlin Colored letters, labeled dice: a logic puzzle
- langford.mod: Langford's number problem (CSPLib #24)
- least_diff.mod: Minimizing the difference ABCDE-FGHIJ (distinct digits)
- lectures.mod: Lecture planning problem (as a coloring problem, simple) (Biggs "Discrete Mathematics")
- magic_hexagon.mod: Magic hexagon (CSPLib #23)
- magic_sequence.mod: Magic sequence (CSPLib #19)
- magic_square.mod: Magic square (CSPLib #19)
- magic_square_and_cards.mod: Magic square and cards (Martin Gardner)
- map1.mod: Simple map color problem
- map2.mod: Simple map color problem
- map3.mod: Simple map color problem
- marathon2.mod: Marathon logic puzzle
- minesweeper.mod: Minesweeper
- mr_smith.mod: Mr Smith problem (logic puzzle, IF Prolog)
- nontransitive_dice.mod: Nontransitive dice
Data files:
- olympic.mod: Olympic logic puzzle (Prolog benchmark)
- organize_day.mod: Organize a day, simple schediling problem
- pert.mod: Simple PERT example
- photo_problem.mod: Photo problem
Data files:
- pigeon_hole.mod: Pigeon hole problem
- place_number_puzzle.mod: Place number puzzle
- post_office_problem2.mod: Post office problem
- quasigroup_completion.mod: Quasigroup completion
- queens.mod: N-Queens problem
- safe_cracking.mod: Safe cracking puzzle
- scheduling_speakers.mod: Scheduling speakers (Rina Dechter "Constraint Processing")
- secret_santa.mod: Secret Santa problem (Ruby Quiz Puzzle)
- secret_santa2.mod: Secret Santa problem, maximize the "Santa distance"
- send_more_money.mod: SEND+MORE=MONEY
- send_more_money1.mod: SEND+MORE=MONEY (simpler version)
- send_more_money_any_base.mod: SEND+MORE=MONEY in "any" base
- send_most_money.mod: SEND+MOST=MONEY (where we maximize MONEY)
- seseman.mod: Seseman's Convent problem
- set_covering.mod: Simple set covering problem (placing firestation, from Wayne Winston "Operations Research")
- set_covering2.mod: Set covering problem (Taha "Operations Research")
- set_covering3.mod: Set covering problem, senators and committes (Katta G. Murty)
- set_covering4.mod: Set covering/Set partition problem (Lundgren, Ronnqvist, Varbrand "Optimeringslara" [Optimization theory])
- set_covering_deployment.mod: Set covering Deployment
- set_covering_skiena.mod: Set covering (Steven Skiena)
- sicherman_dice.mod: Sicherman Dice
- ski_assignment.mod: Ski assignment problem
- stable_marriage.mod: Stable marriage problem
Data files:
- strimko2.mod: Strimko grid puzzle
Data files:
- stuckey_seesaw.mod: Seesaw balancing problem (Marriott and Stuckey: "Programming with Constraints")
- subset_sum.mod: Subset sum problem (Katta G. Murty)
- sudoku.mod: Sudoku solver
- survo_puzzle.mod: Survo puzzle
- talisman_square.mod: Talisman square
- tourist_site_competition.mod: Tourist Site Competition
- traffic_lights_table.mod: Traffic lights (CSPLib #16)
- to_num.mod: Channeling between a number and an array of decision variables
- twin_letters.mod: Twin letters puzzle
- wedding_optimal_chart.mod: Finding an optimal wedding seating chart
- xkcd.mod: xkcd's knapsack (subset sum) problem (xkcd.com/287/)
- young_tableaux.mod: Young tableaux and partition
- zebra.mod: Zebra problem (who owns the zebra? who drinks water?)
Also, see my other pages about constraint programming systems:
* My Constraint Programming Blog
* Constraint Programming
* Common constraint programming problems
* My Zinc page
* My JaCoP page
* My JaCoP/Scala page
* My Choco page
* My Gecode/R page
* My Comet page
* My Gecode 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