On Wed, Aug 10, 2011 at 12:43 AM, Chanseok Oh <chans...@gmail.com> wrote:
> Thank you very much for the explanation. Unfortunately, this approach
> is not suitable in my case for a few reasons.
>
> (1) Most importantly, this alternative method appears to lose all the
> benefit of learning clauses and confict analysis.
> (2) I am experimenting with very large instances (~180K variables),
> and the number of variables I want to branch on first ranges from
> hundreds to a few thousands (even larger than this sometimes). My
> speculation is that following this approach will incur hugh overhead.
> I cannot think of storing every conflict clause returned and analyzing
> them to decide the next assignment.
>
> Basically, what I have developed is a new branching scheme which I
> believe will outperform VSIDS for a very definite reason, and what I
> am trying to do is benchmarking. Judging from your response, I think I
> need to modify the code a bit to simulate this. I have never looked
> into it, so it would be very helpful if you could point out where to
> start. Just pointing out which files or (hopefully) functions would be
> modifed would be fine.
I've made a patch to the current mainline of MiniSat that allows you
to do what you want. You can find it in the github minisat repository.
Here's a direct link to the branch with the patch:
https://github.com/niklasso/minisat/tree/top/varorder/partial-static-order
There is one new method to the solver class that is called
"setVarOrdering()" that one can use the declare fixed priorities for
variables. In the variable heuristic variables are then chosen based
on a lexicographic order of priorites (increasing) and dynamic
activity (decreasing). For example:
setVarOrdering(x, 0);
setVarOrdering(y, 1);
setVarOrdering(z, 2);
setVarOrdering(w, 2);
This will guarantee that x is chosen first, then y, then the order of
z and w is decided by their current VSIDS activity.
Note that there is a slight performance hit with this patch, but it is
small enough that I'd be very surprised if it matters for you.
Let me know if you have any questions,
Regards,
/Niklas
No problem. It didn't take long (15 min + testing) and I expect others
my find this useful at times.
The hard part of evaluating your idea is still up to you :)
Regards,
/Niklas