[gecode-users] posting of expressions
Kish Shen
kisshen at cisco.com
Tue Jul 13 16:56:57 CEST 2010
Hi,
As I have mentioned in my previous posts, I have been rewriting the code
for handling expressions for the ECLiPSe interface to Gecode. I am
wondering if there are any performance advantages in different ways of
handling certain special cases of expressions, like sum.
I had some special code that handled summation of variables using linear:
linear(*solver, vars, rel, sum)
where vars in IntVarArgs, sum is int (although I guess it could be
generalised to IntVar as well), and rel is IntRelType.
This code does not seem to be used at the moment, I assumed I had it to
handle some specific ECLiPSe code that I wanted to run quickly with the
interface.
Instead, such summed expressions are now handled through the general
expression handling code, and passed to Gecode as a LinRel through
minimodel. The sum is passed as a series of +, e.g. A+B+C rather than
using sum of a IntVarArg, because the code was written for Gecode 3.0.2,
which I don't think supported sum.
Is it more efficient to use the more specialised linear to post such
expressions, and is it more efficient to use sum in LinExpr rahter than
a series of +?
Thanks in advance for any information!
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