Giter VIP home page Giter VIP logo

hakank / hakank Goto Github PK

View Code? Open in Web Editor NEW
354.0 44.0 74.0 36.41 MB

My public programs and models - mostly combinatorial problems and puzzles

License: MIT License

HTML 8.25% Prolog 15.60% Java 5.08% C++ 2.77% Ruby 0.71% Python 15.02% C# 2.09% Shell 0.02% Mathematica 0.43% Perl 0.13% Scala 1.86% OpenEdge ABL 1.26% AMPL 2.42% Raku 0.20% JavaScript 34.16% R 0.01% Julia 7.09% PDDL 2.91%
constraint-programming constraint-satisfaction minizinc picat z3py gecode essence jacop ampl comet

hakank's Introduction

hakank

Here I will place my public programs and models. Most are available as individual files at different pages of http://www.hakank.org/

Here's a summary of the directories so far:

  • aimms: AIMMS system, linear/integer programming and constraint programming
  • ampl: AMPL: integer/linear programming and constraint programming
  • answer_set_programming: Answer Set Programming
  • apl: APL (note: index.html contains codes etc)
  • blog_ppl: BLOG, probabilistic programming language
  • bprolog: B-Prolog, logic programming, constraint programming, tabling, loops etc
  • choco3: Choco v3, constraint programming
  • comet: Comet, constraint programming, linear/integer programming, constraint-based local search
  • common_cp_models: Listing of common CP problems (just index.html with statistics and links to the models)
  • cpmpy: CPMPy: Constraint modelling system in Python. Supports OR-Tools CP-SAT and PySAT solvers.
  • eclipse_clp: ECLiPSe CLP, Prolog, logic programming, constraint programming, loops etc
  • essence_savile_row: Essence'/Saville Row, constraint programming
  • essence_tailor: Essence'/Tailor, constraint programming
  • eureqa: Eureqa/Formulize, genetic programming
  • frink: Frink, high level programming language
  • gecode: Gecode, constraint programming
  • gecode_r: Gecode/R, Ruby interface to Gecode
  • google_or_tools: Google or-tools, constraint programming, integer/linear programming, Java, Python, and C#
  • j: J array programming language J (note: index.html contains code etc)
  • jacop: JaCoP and JaCoP/Scala, constraint programming
  • java: Java programs (mostly Project Euler)
  • javascript: JavaScript programs
  • jgap: JGAP, genetic programming
  • jsr_331: JSR-331, Java API for constraint programming
  • julia: Julia programming language (General Julia programming)
  • julia/constraints: Julia ConstraintSolver.jl models (Constraint Programming)
  • julia/turing: Julia Turing.jl models (Probabilistic Programming)
  • k: K, array programming language (note: index.html contains code etc)
  • kattis: Some of my entries for the Kattis competitive programming problems. Mostly in SWI-Prolog, but also in Python and Ruby.
  • mathematica: Mathematica, mathematical programming
  • minizinc: MiniZinc, constraint programming. Also G12 Zinc files.
  • numberjack: Numberjack, constraint programming
  • oocalc_excel: oocalc/Excel, some few linear/integer programming models
  • oscar: OscaR, constraint programming
  • pddl: PDDL (planning language)
  • perl6: Perl6 programming language
  • picat: Picat, constraint programming, logic programming, loops, tabling, etc
  • poplog: Poplog Pop-11 high-level programming language
  • popper: Popper, Inductive Logic Programming (ILP) system
  • project_euler: Project Euler
  • psi_ppl: PSI, probabilistic programming language
  • python: Python programs (Project Euler)
  • sabr: SABR, constraint-based planning language
  • setlx: SETL and SetlX, high level set based programming language
  • sicstus: SICStus Prolog, constraint programming, logic programming, loops, etc.
  • swi_prolog: SWI-Prolog, constraint programming, logic programming, etc.
  • turbo_prolog: Some of my old Turbo Prolog programs (from 1989-1990)
  • unicon: Unicon/Icon, high level programming language
  • webppl: WebPPL, a probabilistic programming language (as subset of JavaScript)
  • weka: Weka, data mining/machine learning, Java files, HTML, and data files (ARFF and CSV)
  • z3: Z3/Z3Py theorem prover / SMT solver

I'll try to keep this repository as updated as possible.

Hakan Kjellerstrand (a.k.a. hakank) [email protected]

hakank's People

Contributors

hakank avatar tias avatar wikunia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hakank's Issues

Bug in cabling.py

I'm looking to use OR-Tools to replicate your CPMpy model https://github.com/hakank/hakank/blob/master/cpmpy/cabling.py
Lines 177-179, in the second model, say:

  for i in range(n):
    a,b,num = cable_struct[i]
    model += [t[i] == abs(x[a]-x[b])*num]

I believe that the range should be:
for i in range(len(cable_struct)):
The current code returns the correct solution because the example just happens to have n == len(cable_struct) but that isn't true in general.

whats the type of license here

Hi Hakan,

I very much like your code. It makes for example good use of Prolog
comments. But I am little bit at loss. What is the license of all that?

Best Regards

An help for Picat

I'm sorry for contacting you here, but I'm having some trouble with Picat and I wish ask you for help if you can.

(the question is not strictly related to this repository)

I'm implementing a solver for {log} language in Picat (you can find my code here).

The trouble

I'm parsing a formula given in input by the user with the picat built-in function parse_term/2. The formula is made by a list of terms like this: [eq(X,1), ...].
The parse_term/2 function returns a term representing my formula, but also a map for name of variables and variables themselves.

My objective is to store this map in a global variable and retrieve it when the solver solves the formula to convert back the variables to their original names.

The problem is that I put the map into a global map using get_global_map().put(k, V) and then when I retrieve it using get_global_map().get(k) the keys of this map are unchanged while values (real variables) have changed.

Why this happens? What I'm doing wrong?

Code references

Here is where I would convert back variables to their real names:

And here is the function that should convert back variables. Note that this is not working only if I use vars map retrieved from the global map; passing directly the vars map makes this works.

spp.mzn loop bug

spp.mzn when applying to indirect graph may generate graph loops.

e.g. 1->2, 2->1 may present in the same time in a result.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.