Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Xudong Liu <xudong.liu23@gm...>  20130127 22:54:51
Attachments:
Message as HTML

Hello, I have an error with my ASP program that I cannot resolve. The error is: ERROR: cannot convert #supremum to integer in: rules.lp:52:12: T+C The line it refers to is: tScore(A, T + C) : cScore(A, C), times(A, T). I am trying to do an easy addition arithmetic operation that computes the sum of T and C for all A. When I changed the addition to just T or C, the solver acted perfectly. But not for any arithmetic operation between T and C, and I had the same error as here. I googled but there is no solutions. Hope someone would help me out of it. Thank you. Best Regards, Xudong Liu 
From: Roland Kaminski <kaminski@cs...>  20130127 23:03:22
Attachments:
signature.asc

On Sunday, January 27, 2013 05:54:39 PM Xudong Liu wrote: > Hello, > > I have an error with my ASP program that I cannot resolve. The error is: > > ERROR: cannot convert #supremum to integer in: > rules.lp:52:12: T+C > > The line it refers to is: > > tScore(A, T + C) : cScore(A, C), times(A, T). > > I am trying to do an easy addition arithmetic operation that computes the > sum of T and C for all A. When I changed the addition to just T or C, the > solver acted perfectly. But not for any arithmetic operation between T and > C, and I had the same error as here. I googled but there is no solutions. > Hope someone would help me out of it. Thank you. Hard to tell with only one line of the program. Just a guess: have you used #minaggregates and did not exclude empty case? Regards, Roland 
From: Martin <mjb@cs...>  20130127 23:55:43

On Sun, 20130127 at 17:54 0500, Xudong Liu wrote: > Hello, > > > I have an error with my ASP program that I cannot resolve. The error > is: > > > ERROR: cannot convert #supremum to integer in: > rules.lp:52:12: T+C > > > The line it refers to is: > > > tScore(A, T + C) : cScore(A, C), times(A, T). Please can you post the whole program? Or reduce it to a minimal test case? Without that it will be difficult for people to help you. Cheers,  Martin 
From: Roland Kaminski <kaminski@cs...>  20130128 00:20:33
Attachments:
signature.asc

On Sunday, January 27, 2013 06:22:26 PM Xudong Liu wrote: > Yes I did use #min aggregate to compute cScore/2: > > cScore(A, TT) : team(A), TT = #min [outterScore(A, Y, T) = T]. > where outterScore/3 is given as input, facts. Please reply to the mailing list. The other users might be interested in the answer too, might have to say something interesting too, or spot errors I made, ... :) Back to the problem. Just try: p(X) : X=#min[]. which gives you: p(#supremum). If you do not want this, then add an additional test: p(X) : X=#min[], X!=#supremum. Regards, Roland 
From: Xudong Liu <xudong.liu23@gm...>  20130128 00:57:03
Attachments:
Message as HTML

Great! That solved the problem very well. Thanks for this lesson Roland. And thanks for reminding me that I should've hit reply all. :) Best Regards, Xudong Liu On Jan 27, 2013, at 7:20 PM, Roland Kaminski <kaminski@...> wrote: > On Sunday, January 27, 2013 06:22:26 PM Xudong Liu wrote: >> Yes I did use #min aggregate to compute cScore/2: >> >> cScore(A, TT) : team(A), TT = #min [outterScore(A, Y, T) = T]. >> where outterScore/3 is given as input, facts. > > Please reply to the mailing list. The other users might be interested in the > answer too, might have to say something interesting too, or spot errors I > made, ... :) > > Back to the problem. Just try: > p(X) : X=#min[]. > > which gives you: > p(#supremum). > > If you do not want this, then add an additional test: > p(X) : X=#min[], X!=#supremum. > > Regards, Roland 
From: Roland Kaminski <kaminski@cs...>  20130128 09:30:11
Attachments:
signature.asc

On Sunday, January 27, 2013 07:56:51 PM Xudong Liu wrote: > Great! That solved the problem very well. Thanks for this lesson Roland. > And thanks for reminding me that I should've hit reply all. :) Btw if you use the text output (t), you find such things easily. 
Sign up for the SourceForge newsletter:
No, thanks