Re: confuse to determine the domain of variables



rinda wrote:
Libra wrote:
I'm not able to tell you when to stop.
I think that the problem could be in the solver, instead that in the
problem. I mean, I agree with Markus saying that maybe your solver is
not yet optimized (moreover, Ruby is a script language, therefore high
performances are not in its primal scope).
However, you can try to change the variable selection order in order to
speed up the solution process (remember the first-fail principle).

Regards
Libra

I am sorry.... Because of earth quick in taiwan, I could not access
google groups past days ago. I think the problem is I don't know how to
solve optimalization csp. I know how to solve csp and I implement it
successfully in ruby language with backtracking technique and
optionally forward checking technique. My solver can solve queen
problem. But I don't know how to model the optimalization csp so my
solver can solve it or how to extend my solver. Too bad I don't
understand prolog so I don't know how previous author can solve this
optimalization csp. I don't think first-fail principle can help me
because my solver need to find the best solution not the first solution
that satisfy the constraint.

Thank you.

After searching, I think I found the answer. I need to implement the
branch and bound technique in my solver. And.... first-fail principle
can be good to all solution too.

.