My ConstraintSolver.jl page
Here is a collection of my Julia ConstraintSolver.jl models.
For more about Julia and ConstraintSolver.jl see:
My Julia ConstraintSolver.jl models
The utils file constraints_utils.jl are included in all models so it should be downloaded as well. It contains the following functions/constraints (decompositions). Note that some of these might be considered experimental.
GitHub repo for these models: github.com/hakank/hakank/tree/master/julia/constraints.
-
resize_matrix
: Resize a column matrix ([[1,2,3],[4,5,6],[7,8,9]]) to row matrix ([1 2 3; 4 5 6; 7 8 9]])
-
print_grid
: Print a grid/matrix
-
scalar_product
-
to_num
: convert an array of digits (in some base) to/from the corresponding number
-
increasing
, increasing_strict
-
decreasing
, decreasing_strict
-
all_different_except_c
-
count_ctr
: count constraint (generalized)
-
count_ctr2
: count constraint (generalized)
-
my_abs
: abs(x,y,abs_val) and abs(x,abs_val)
-
my_element
-
global_cardinality_count
-
my_min
-
my_max
-
my_argmin
: argmin
-
my_argmax
: argmax
-
modulo
: modulo(x,y,z) (x mod y == z). Note: it use table constraint which might blow up so handle with care.
-
cumulative
-
circuit
-
circuit_path
-
inverse
(1d version of assignment_ctr
)
-
assignment_ctr
(2d version of inverse
)
-
matrix_element
(Somewhat experimental)
-
regular
-
atmost
-
atleast
-
exactly
-
latin_square
-
no_overlap
-
global_contiguity_regular
-
either_eq
-
is_member_of
-
among
Here are the (other) models.
- a_puzzle.jl: A puzzle (God plays dice)
- a_round_of_golf.jl: A Round of Golf puzzle (Dell Logic problems)
- added_corner.jl: Added corner puzzle
- alphametic.jl: Alphametic puzzles (solve string problems such as 'SEND+MORE=MONEY')
- all_different_except_0.jl: Test of constraint
all_different_except_c
- all_interval.jl: All interval problem
- all_partitions.jl: All partitions of an integer
- among.jl: Test of global constraint
among
- arch_friends.jl: Arch Friends (Dell logic puzzle)
- archery_puzzle.jl: Archery puzzle
- assignment.jl: Assigment model. assignment_instances.jl: Assigment instances
- assignment_constraint.jl: Global constraint
assignment_ctr
- atmost_test.jl: Test of global constraints
atmost
, atleast
, and ,exactly
- balanced_brackets.jl: Balanced brackets
- bales_of_hay.jl: Bales of Hay puzzle
- breaking_news.jl: Breaking News puzzle
- broken_weights.jl: Broken weights
- bus_schedule.jl: Bus scheduling
- calculs_d_enfer.jl: Calculs d'enfer puzzle
- circuit.jl: Test of global constraint
circuit
- circuit_path.jl: Test of global constraint
circuit_path
- coins_grid.jl: Coins grid problem
- coins3.jl: A coin problem
- coins3_2.jl: Another coin problem
- combinatorial_auction.jl: Combinatorial Auction
- costas_array.jl: Costas array
- covering_opl.jl: Set covering problem (OPL)
- crypta.jl: Crypta alphametic puzzle
- crypto.jl: Crypto alphametic puzzle
- cumulative_test.jl: Test of
cumulative
- cur_num.jl: Curious number (Dudeney)
- curious_set_of_integers.jl: Curious set of integers (Gardner)
- debruijn.jl: de Bruijn sequences (both classical and 'arbitrary')
- devils_word.jl: Devil's Word
- diet.jl: Simple diet optimization problem
- discrete_tomography.jl: Discrete tomography
- donald_gerald_robert.jl: DONALD+GERALD=ROBERT
- eq10.jl: Eq 10 problem
- eq20.jl: Eq 20 problem
- fancy.jl: Mr Greenguest fancy dress puzzle
- fill_a_pix.jl: Fill-A-Pix grid puzzle
- four_islands.jl: Four Islands puzzle
- furniture_moving.jl: Scheduling problem (moving furnitures)
- futoshiki.jl: Futoshiki grid puzzle
- global_cardinality_count.jl: Test of
global_cardinality_count
- global_contiguity_regular.jl: Test of
global_contiguity_regular
- golomb_ruler.jl: Golomb ruler
- golomb_ruler2.jl: Golomb ruler (different approach)
- hamming_distance.jl: Hamming distance
- huey_dewey_louie.jl: Huey, Dewey, and Louie puzzle
- inverse.jl: Global constraint
inverse
- isbn.jl: Some explorations of ISBN13
- jobs_puzzle.jl: Jobs puzzle
- just_forgotten.jl: Just Forgotten puzzle
- kakuro.jl: Kakuro grid puzzle
- killer_sudoku.jl: Killer Sudoku
- labeled_dice.jl: Blocks problem: 'Labeled dice' and 'Building Blocks'
- langford.jl: Langford's number problem L(2,N)
- least_diff.jl: Least diff problem (minimize the difference ABCDE-FGHIJ for distinct digits A..J)
- lectures.jl: Lectures scheduling
- magic_hexagon.jl: Magic hexagon
- magic_sequence.jl: Magic sequence
- magic_square.jl: Magic square
- magic_square_and_cards.jl: Magic square and cards (Gardner)
- map_coloring.jl: Map coloring
- marathon2.jl: Marathon logic puzzle
- matrix_element.jl Test of
matrix_element
(experimental)
- max_flow_winston1.jl Maximum flow problem (Winston)
- minesweeper.jl, minesweeper_problems.jl: Minesweeper
- monks_and_doors.jl, Monks and Doors puzzle
- monks_and_doors2.jl, Monks and Doors puzzle (slightly different encoding)
- mr_smith.jl: Smith family logic puzzle
- mr_smith2.jl: Smith family logic puzzle (alternative model)
- mr_smith2b.jl: Smith family logic puzzle (alternative model II)
- nontransitive_dice.jl: Nontransitive dice
- nqueens.jl: N-queens
- nqueens2.jl: N-queens, another approach
- number_of_days.jl: Number of days problem
- olympic.jl: Olympic logic puzzle
- organize_day.jl: Organize day (simple scheduling)
- p_median.jl: P median problem
- pert.jl: Simple PERT problem
- photo_problem.jl: Photo arrangement problem
- place_number_puzzle.jl: Place number puzzle
- quasigroup_completion.jl, : Quasigroup Completion
- regular.jl: Some tests of
regular
global constraint
- scheduling_speakers.jl: Scheduling speakers
- safe_cracking.jl: Safe cracking puzzle
- secret_santa.jl: Secret santa (from Ruby Quiz)
- secret_santa2.jl: Secret santa (from Maple Primes question)
- send_more_money.jl: SEND+MORE=MONEY
- send_more_money_any_base.jl: SEND+MORE=MONEY in "any" base
- send_most_money.jl: SEND+MOST=MONEY (objective: maximize MONEY and show all optimal solutions)
- seseman.jl: Seseman's convent problem
- set_covering.jl: Set covering (placing firestations)
- set_covering_deployment.jl: Set covering deployment
- set_covering2.jl: Set covering (placing of telephones)
- set_covering3.jl: Set covering (minimize number of senators in a committee)
- set_covering4.jl: Set covering/set partition, minimize cost of selecting alternatives
- set_covering_skiena.jl: Set covering (Skiena)
- set_partition.jl: Set partition problem
- sicherman_dice.jl: Sicherman dice
- ski_assignment.jl: Ski assignment
- steiner.jl: Steiner triple problem (binary representation)
- steiner2.jl: Steiner triple problem (integer representation, faster)
- strimko2.jl: Strimko grid puzzle
- subset_sum.jl: Subset sum problem
- sudoku.jl, sudoku_problems.jl: Sudoku with quite a few problem instances
- survo_puzzle.jl, : Survo puzzle
- test_all_models.jl: Test all (public) ConstraintSolver.jl models (from this web page)
- to_num.jl: Test of
to_num
constraint
- tourist_site_competition.jl: Tourist site competition
- traffic_lights.jl: Traffic lights problem
- tsp.jl: TSP (Traveling Salesperson Problem)
- warehouse_location.jl: Warehouse location problem (OPL)
- who_killed_agatha.jl: Who killed Agatha problem
- xkcd.jl: XKCD subset sum problem
- young_tableaux.jl: Young Tableaux
- zebra.jl: Zebra logic puzzle
- zoo.jl: Zoo, buses, and kids
Back to my homepage
Created by Hakan Kjellerstrand (hakank@gmail.com)