[gecode-users] performance issues
Kish Shen
kisshen at cisco.com
Thu Jul 15 04:23:45 CEST 2010
Hi Christian,
An update to my performance problem: the problem was after all caused by
my new code, rather than Gecode. The reason is that the search in that
example uses the #= and #\= constraints to set/exclude values from a
variable's domain, and the conversion of these constraints into Gecode
calls is precisely the code I changed, and this code is now more
expensive, as it has to deal with various types of expressions.
The overhead with these constraints are probably unavoidable, and in
most cases the overheads are not significant when they are only used
during modelling, rather than in the search as in this case.
I changed the example to directly assign the value instead of using #=,
and used refified domain constraint (with the boolean set to 0) to
exclude a value, and the execution is now faster, probably even faster
than the old results.
I have also been thinking about your last reply:
Christian Schulte wrote:
> If you post constraints on the IntVars before their domain is reduced to
> 0..1 then some propagators might have to resort to a less efficient
> representation. The difference can range from anything like 10% (linear
> constraints, for example) to 50% (extensional constraints, for example).
This should not happen -- what happens is that my code now extract all
new variables from an expression, and add them to gecode with a default
domain, and then change any that are also booleans to the 0..1 domain.
This happens before any constraints are posted for these variables.
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 users
mailing list