Hi,

I have just started looking at upgrading the ECLiPSe Gecode interface to Gecode 4 (it currently supports Gecode 3.7), and I have run into a problem with AFC, which I am not sure how to deal with, so I would be very grateful if someone can give me some suggestion on how to deal with this.

Some background: our Gecode interface code uses a space where the IntVars are stored in a IntVarArgs, and actual problem variables are added dynamically during execution.

The search can be performed in Gecode using a search engine, or in ECLiPSe. The user can also obtain various properties of the IntVar variables, including the AFC for that variable. For the AFC, this was obtained using the afc() method of IntVar. This method is no longer in Gecode 4.

Looking at the MPG, you now need to initialise an integer variable array (xs) for AFC information:

IntAFC afc(home, xs);

and to change the decay later,

afc.decay(0.95)

-- I assume this applies to the xs array.

and branching:

branch(home, xs, INT_VAR_AFC_MAX(), INT_VAL_MIN())

where xs must be the same as before.

I am not sure how to use this in my interface, both for doing search in ECLiPSe, or using a search engine.

The reason are that my variables are added dynamically, and at any time, including after propagation (and some search) have been performed on existing variables, so there isn't a time-point when I create the IntAFC object with all the variables. In the case of using a search engine, the search may be only part of the full search, i.e. so I cannot assume I only want AFC for the variables in the branch() call above (i.e. xs).

Ideally, with 4.0, I would like to be able to change the decay factor as well, at least for all variables (this would mean the decay value would apply to any variables created (logically) after setting the decay factor. Perhaps it would also be useful to change the decay factor for a subset of variables, but I am not sure if that can be done -- because the search can then involve variables with different decay factor.

In the case of doing search in ECLiPSe, I need to obtain the AFC for a variable -- how do I do this now?

Thanks in advance for any information and help!

--Kish

_______________________________________________
Gecode users mailing list
users@gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to