[gecode-users] doing multiple minimising searches with the same space
Kish Shen
kisshen at cisco.com
Tue Jul 21 02:10:40 CEST 2009
Hi,
I am now trying to add support for the minimising search engines (BAB,
Restart) to the ECLiPSe-Gecode interface I am developing.
I think I can see how to implement the cost function, which is only
given at run-time (with the limitation that the cost is a finite domain
variable, which has must have a vlaue assigned at the end of labelling
all the variables specified in the search), *if* the search is done only
once:
In the Space class I use, I have a IntVarArray (called vInt),
representing the problem variables. To implement the cost variable, I
add a Cost IntVar to the space, and when the search routine is called, I
post an additional constraint
Cost = vInt[i]
where vInt[i] is the problem variable that is defined to be the cost
variable.
The constrain/cost member function required can then perform the right
action using the Cost variable.
However, at the ECLiPSe level, I can perform more than one minimising
search while solving a problem, with different cost variables (and
persumably with a different set of problem variables). I am not sure how
I can do this with what I know of Gecode's search engine interface, as I
have already posted a constraint linking Cost to the vInt[i], cost
vafriable for the previous search.
Thanks in advance for any help/suggestion for how I can program this!
Cheers,
Kish
--
This e-mail may contain confidential and privileged material for the
sole use of the intended recipient. Any review, use, distribution or
disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact
the sender by reply e-mail and delete all copies of this message.
Cisco Systems Limited (Company Number: 02558939), is registered in
England and Wales with its registered office at 1 Callaghan Square,
Cardiff, South Glamorgan CF10 5BT.
More information about the gecode-users
mailing list