Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
362 views
in Technique[技术] by (71.8m points)

answer-set-programming - 使用最大化时如何在clingo中显示所有最大结果?(how to show all the maximum result in clingo when using the maximize?)

I'm currently writing an asp program.

(我目前正在编写一个ASP程序。)

when I comment the line #maximize{S:ce(S)}.

(当我评论#maximize {S:ce(S)}行时。)

within the program, the answer shows as follows

(在程序中,答案显示如下)

omit the Answer 1 to 6.

(省略答案1至6。)

Answer: 7 review(harris,english) review(ben,math) review(ben,chinese) review(nick,math) review(ben,english) review(nick,chinese) ce(4)

(答:7条评论(哈里斯,英语)评论(本,数学)评论(本,中文)评论(尼克,数学)评论(本,英语)评论(尼克,中文) ce(4))

Answer: 8 review(harris,english) review(ben,math) review(ben,chinese) review(nick,math) review(nick,english) review(nick,chinese) ce(4)

(答:8条评论(哈里斯,英语)评论(本,数学)评论(本,中文)评论(尼克,数学)评论(尼克,英语)评论(尼克,中文) ce(4))

SATISFIABLE

(满意)

in which the answer 7 and answer 8 have the same ce value of 4.

(其中答案7和答案8具有相同的ce值4。)

when I uncomment the line #maximize{S:ce(S)}.

(当我取消注释#maximize {S:ce(S)}行时。)

the answer shows as follows

(答案显示如下)

Answer: 1 review(ben,chinese) review(nick,math) ce(2) review(harris,math) review(ben,english) review(nick,english) review(nick,chinese) Optimization: -2

(答案:1条评论(本,中文)评论(nick,math)ce(2)条评论(harris,math)评论(ben,english)评论(nick,english)评论(nick,chinese)优化:-2)

Answer: 2 review(harris,english) review(ben,math) review(ben,chinese) ce(3) review(harris,math) review(nick,english) review(nick,chinese) Optimization: -3

(答案:2评价(harris,英语)评价(ben,数学)评价(ben,中文)ce(3)评价(harris,数学)评价(尼克,英语)评价(尼克,中文)优化:-3)

Answer: 3 review(harris,english) review(ben,math) review(ben,chinese) review(nick,math) ce(4) review(nick,english) review(nick,chinese) Optimization: -4

(答案:3评价(harris,英语)评价(ben,数学)评价(ben,中文)评价(nick,math) ce(4)评价(nick,english)评价(nick,chinese)优化:-4)

OPTIMUM FOUND

(最佳发现)

there is only one result of ce(4), but I'd like to get all the result of the maximum value of ce, what should I do to get the two result with the value ce(4).

(ce(4)只有一个结果,但是我想获得ce最大值的所有结果,我应该怎么做才能得到ce(4)的两个结果。)

  ask by A shur translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...