It doesn't totally make sense to me that you would have integer variables with real coefficients. If the coefficients are irrational and are not scaled versions of each other, then the problem is impossible. Otherwise, you can just scale them by a common factor and make them integers. For instance, you could turn 3.1111x + 2.2222y = 8.44444 into 28x + 20y = 76.
--Alex On Tue, Jun 10, 2014 at 2:30 PM, cej38 <[email protected]> wrote: > I picked a toy problem that was really easy to solve, figuring that once I > had the idea down, I would be able to easily change the equation to the one > that I am interested in solving. In moving to my real problem I hit the > next snag I can't use real numbers within the equation. I note that the > equation hasn't changed, the values of x and y are still non-negative > integers. > > (run* [q] > (fresh [x y] > (fd/in x y (fd/interval 0 9)) > (fd/eq > (= (+ (* x 3.) (* y 2.)) 8.)) > (== q [x y]))) > > In my real problem I expect that I could have something like > > (run* [q] > (fresh [x y] > (fd/in x y (fd/interval 0 9)) > (fd/eq > (= (+ (* x 3.1111) (* y 2.2222)) 8.4444)) > (== q [x y]))) > > Is there away to do this? > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to [email protected] > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to a topic in the > Google Groups "Clojure" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/clojure/hje351kbvJA/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
