Hi,

Looks very interesting.

I was playing around with it yesterday at REPL, and I could not figure out 
how to do constraints with floats. Are all domains limited to integers at 
the moment, and if so do you have plans to add support for floating point 
domains in the future?

- Olli

On Saturday, March 8, 2014 6:41:43 AM UTC+7, Alex Engelberg wrote:
>
> Loco is now on version 0.2.0. The only major change is that I renamed 
> "$all-different?" to "$distinct" (now takes a list of args instead of a 
> variable number of args), and renamed "$circuit?" to "$circuit". This is 
> mostly because I wanted to provide more consistency throughout the function 
> names by eliminating question marks. I realize that this is a small set of 
> changes to push so early, but I figured it was best to get it out there as 
> early as possible so people won't get too attached to the old functions.
>
> --Alex
>
> On Tuesday, March 4, 2014 1:46:51 PM UTC-8, Alex Engelberg wrote:
>>
>> Hi everyone.
>>
>> About 6 months ago, I created a Constraint Programming library called 
>> CloCoP <https://github.com/aengelberg/clocop>. It was a Clojure wrapper 
>> for a Java library, and it mostly maintained the "imperative" propagation 
>> style. However, I was recently inspired to rework the library to have a 
>> more declarative, functional taste.
>>
>> You can visit the github page <https://github.com/aengelberg/loco> for 
>> more details, but here is some sample code.
>> (use 'loco.core)
>> (use 'loco.constraints)
>> (defn solve-problem []
>>   (solution
>>     [($in :x 1 5)       ; x is between 1 and 5
>>      ($in :y 1 5)       ; y is between 1 and 5
>>      ($= ($+ :x 4) :y)] ; x + 4 = y
>>   ))
>> (solve-problem)
>> => {:x 1, :y 5}
>>
>> When you call a constraint function (that begins with a dollar sign), 
>> Clojure data is returned instead of a mysterious Java object.. The Java 
>> library underneath is now only accessed when the entire problem is passed 
>> to the "solution" function.
>>
>> Loco is a good choice for speedily solving integer-domain problems. Let 
>> me know what you think of the new problem model; I believe that it allows 
>> for easier construction and manipulation of a model before solving it.
>>
>> --Alex
>>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to