My Oscar (Scala in OR) page
OscaR - (Scala in OR) is a constraint solver based on Scala (former called Scampi).
Special thanks to Pierre Schaus for the Constraint Programming part of OscaR. (I have almost exclusively worked with the CP part.)
Links:
My OscaR models
Here are some of my OscaR models. Most of them (if not all) has been pushed to the example OscaR repo: src/dev/oscar-cp-examples/src/main/scala/oscar/cp/examples/hakank/. Thanks to Pierre Schaus for improving several of these models.
- ABCEndview.scala: ABC End View grid puzzle (a.k.a. "Easy as ABC", "Last Man Standing")
- AddedCorner.scala: Added corner problem
- AllDifferentExcept0.scala: Decomposition of
alldifferent_except_0
(with a decomposition of the increasing
constraint)
- AllIntervals.scala: All intervals (CSPLib #7)
- Alphametic.scala: Fairly general (simple) alphametic solver
- AlphameticGenerate.scala: A simple alphametic problem generator (generate words from a word list and test...)
- AppointmentSchedulingSet.scala: Appointment Scheduling, set approach (from the Stack Overflow question: Appointment scheduling algorithm (N people with N free-busy slots, constraint-satisfaction))
- APuzzle.scala: The "8809=6" puzzle (See God plays dice A puzzle)
- ArchFriends.scala: Arch Friends problem (Dell Logic Puzzles)
- ARoundOFGolf.scala: A Round of Golf problem (Dell Logic Puzzles)
- Assignment.scala: Assignment problem (Winston)
- BalesOfHay.scala: Bales of hay problem (from The Math Less Traveled The haybaler)
- BowlsAndOranges.scala: Bowls and oranges problem
- BreakingNews.scala: Breaking news problem (Dell Logic Puzzles)
- BrokenWeights.scala: Broken weights problem
- BuildingAHouseScheduling.scala: Building a house (using scheduling API) (from OPL)
- BusSchedule.scala: Bus scheduling problem (Taha)
- CalculsDEnfer.scala: Calculs d'Enfer problem (from the NCL manual)
- CircuitTest.scala: Test of a decomposition of
circuit
as well as an "path extractor" for the circuit.
- ClockTriplets.scala: Clock triplets problem (Dean Clark via Martin Gardner)
- Coins3.scala: Minimum mumber of coins that allows one to pay exactly any amount smaller than one Euro (from the ECLiPSe book)
- CoinsGrid.scala: Coins grid problem
- CombinatorialAuction.scala: Combinatorial auction
- ContiguityRegular.scala: Decomposition of
contiguity
constraint (using regular
and Automaton
)
- CostasArray.scala: Costas Array
- CoveringOpl.scala: Set covering problem (OPL) (using a decomposition of
scalarProduct
constraint)
- Crew.scala: Crew allocation problem
- CrossWord.scala: Simple crossword problem
- Crypta.scala: Crypta, alphametic problem (standard Prolog benchmark)
- Crypto.scala: Crypto, alphametic problem (standard Prolog benchmark)
- Crypto2.scala: Alternative approach to Crypto, alphametic problem (standard Prolog benchmark)
- CuriousSetOfIntegers.scala: Curious set of integers (Martin Gardner)
- DeBruijn.scala: de Bruijn sequence (using a decomposition of
toNum
, and min
constraints)
- Diet.scala: Simple diet opimization problem
- Diet2.scala: Simple diet opimization problem (alternative)
- DivisibleBy9Through1.scala: Divisible by 9 through 1
- Eq10.scala: Eq10 (standard benchmarking problem)
- EinavPuzzle.scala: Solving A programming puzzle from Einav
- EinsteinPuzzle.scala: Einstein logic puzzle (variant of Zebra, see below)
- Fancy.scala: Fancy dress puzzle (Mr Greenguest puzzle) (LPL)
- FillAPix.scala: Fill-a-pix grid puzzle.
Problem instances:
- FiveFloors.scala: Five Floors (logic puzzle)
- FourIslands.scala: Four Islands problem (Dell Logic Puzzles)
- FurnitureMoving.scala: Furniture moving, a simple scheduling problem (using decomposition of
cumulative
)
- FurnitureMovingScheduling.scala: Furniture moving, using Scheduling API
- FurnitureMovingScheduling2.scala: Furniture moving, using Scheduling API (a more compact version)
- Futoshiki.scala: Futoshiki grid puzzle
- GolombRuler.scala: Golomb ruler (CSPLib #6)
- Grocery.scala: Grocery problem
- Hidato.scala: Hidato grid puzzle (slow)
- HidatoTable.scala: Hidato grid puzzle (faster version using table constraint.)
- JustForgotten.scala: Just forgotten puzzle (Enigma problem #1517)
- Kakuro.scala: Kakuro grid puzzle
- KenKen2.scala: KenKen grid puzzle
- KillerSudoku.scala: Killer Sudoku grid puzzle
- Langford.scala: Langford's number problem (CSPLib #24)
- LeastDiff.scala: Least difference problem (minimize the difference ABCDE-FGHIJ)
- Lectures.scala: Lectures, schedule problem (from Biggs "Discrete Mathematics")
- MagicSequence.scala: Magic sequence
- MagicSquare.scala: Magic square
- MagicSquareAndCards.scala: Magic square and cards (Martin Gardner)
- MapColoring.scala: Map coloring
- MapColoring2.scala: Map coloring, alternative approach
- MapColoring3.scala: Map coloring, alternative approach
- Marathon.scala: Marathon puzzle (from Xpress)
- MaxFlowTaha.scala: Maximum flow problem (Taha)
- MaxFlowWinston1.scala: Maximum flow problem (Winston)
- Minesweeper.scala: Minesweeper
Data files:
- MrSmith.scala: Mr Smith problem (logic problem from IF Prolog)
- MyModulo.scala: Decomposition of
modulo
constraint
- NontransitiveDice.scala: Nontransitive dice
- NurseRosteringRegular.scala: Nurse rostering using
regular
constraint
- NurseRosteringRegular2.scala: Nurse rostering using
regular
constraint (with a little different requirements than NurseRosteringRegular.scala)
- Olympic.scala: Olympic puzzle (alphametic, standard Prolog benchmark)
- OrganizeDay.scala: Organizing a day, simple scheduling problem
- OrganizeDaySchedule.scala: Organizing a day, variant using the Scheduling API
- PandigitalNumbers.scala: Pandigital numbers
- PMedian.scala: P-median problem (from the OPL manual)
- PhotoProblem.scala: Photo problem (From Mozart/Oz) (with a decomposition of the
inverse
constraint)
- PlaceNumberPuzzle.scala: Place number puzzle
- PostOfficeProblem.scala: Post office problem (Winston)
- QuasigroupCompletion.scala: Quasigroup completion
Data files:
- Rogo2.scala: Rogo grid puzzle solver
Data files:
- SafeCracking.scala: Safe cracking puzzle (Oz primer)
- SchedulingSpeakers.scala: Scheduling speakers (Rina Dechter)
- SecretSanta.scala: Secret Santa problem
- SecretSanta2.scala: Secret Santa problem II (optimizing "Santa distance")
- SendMoreMoneyAnyBase.scala: SEND+MORE=MONEY alphametic problem in "any" base
- SendMoreMoney.scala: SEND+MORE=MONEY alphametic problem
- SendMostMoney.scala: SEND+MOST=MONEY alphametic optimization problem
- SequenceSum.scala: Sequence sum: sum each subsequence of length s to m. (Decomposition of
sequence_sum
constraint)
- Seseman.scala: Seseman convent problem
- SetCovering.scala: Set covering problem, placing of firestations (Winston)
- SetCovering2.scala: Set covering problem, number of security telephons on a campus (Taha)
- SetCovering3.scala: Set covering problem, senators making a committe (Murty)
- SetCovering4.scala: Set covering problem (and set partition), work scheduling (Lundgren, Roennqvist, Vaerbrand "Optimeringslaera")
- SetCoveringDeployment.scala: Set covering deployment problem
- SetCoveringSkiena.scala: Set covering problem (Steven Skiena)
- SetPartition.scala: Set partition problem
- SichermanDice.scala: Sicherman dice
- SkiAssignment.scala: Ski assignment problem
- Strimko.scala: Strimko puzzle (Latin squares with "streams")
- StableMarriage.scala: Stable marriage problem (van Hentenryck, with a couple of different problem instances)
- StableMarriageRandom.scala: Stable marriage problem, randomized problem instance
- Sudoku.scala: Sudoku solver
- Sudoku2.scala: Sudoku solver, with the added functionality to read a problem instance file such as those in the page sudoku_problems. (A zip file with these files are sudoku_data.zip)
- SurvoPuzzle.scala: Survo puzzle
- ToNum.scala: channeling between a number and an array
- Tomography.scala: Discrete Tomography
- TrafficLights.scala: Traffic lights problem (CSPLib #16)
- WhoKilledAgatha.scala: Who killed agatha? (The Dreadsbury Mansion Murder Mystery, a automated reasoning problem).
- WordSquare.scala: Word square puzzle
- YoungTableaux.scala: Young Tableaux and partition
- Xkcd.scala: Xkcd knapsack problem
- Zebra.scala: Zebra problem ("Who own the zebra"?) (Lewis Caroll)
- Zebra2.scala: Zebra problem ("Who own the zebra"?) (Lewis Caroll), alternative version
Also see My Constraint Programming Blog, and
* Common constraint programming problems
* MiniZinc page
* My Zinc page
* My JaCoP 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 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