Dear Mark,

The function IsDet tells you whether some variable is determined or not. It also works for FD and FS variables.

So, you can simple count how many variables are presently determined, e.g.

  {Length {Filter AllVars IsDet}}

Then you compute their percentage considering all variables.

Finally, you can add an explorer action so that you simply click spaces in the explorer to learn how far they got searchwise, e.g.,

{Explorer.object
add(information proc {$ I Root} {Browse I#detPercent ({ComputePercentage Root})} end
     label: 'Browse percentage of det vars')}

Note that for this to work all your variables must be accessible via the root variable of the script. The function ComputePercentage (which you would have to write :) collects all variables of your script and returns the percentage of determined variables.

Best
Torsten

On 20 Feb 2009, at 09:10, mark richardson wrote:
Hi,

Torsten - Have you got any sample code or a little more information on
how to do that?

Regards
Mark

Torsten Anders wrote:
Dear Mark,

I am sometimes simply checking the percentage of the variables (FD
and FS) already determined. I even added an explorer action for that,
so I can learn with a click how far some space got if things seems
"stalled" at times.

Best
Torsten

On Feb 15, 2009, at 9:05 AM, mark richardson wrote:
I have a program which uses finite sets to schedule a college
timetable.
The solution is stored in a list of finite sets, each set
representing a
timetabled class and containing the students allocated to that class. What I want is some form of progress indicator to reflect the progress
of the solution. My initial thought was something along the lines of
'FS.reflect.unknown' to get a total of undetermined values in each
set,
then total them and use the final total displayed in a text box. The
total should, I imagine, keep reducing in general until it reaches
zero.
Would this badly affect the total run-time for the solution though?
The total solution at the moment takes around 20 seconds so a 50%
increase in run-time wouldn't be too bad.
Can anyone suggest a simpler method? The progress indicator doesn't
have
to be precise, just a rough guide to the time left. But it mustn't

Regards

Mark Richardson

 --
Mark Richardson
Final year undergraduate
University of Teesside

____________________________________________________________________ __
___________
mozart-users mailing list                               mozart-
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

_____________________________________________________________________ ____________

mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users



--
Mark Richardson
Final year undergraduate
University of Teesside

______________________________________________________________________ ___________ mozart-users mailing list mozart- [email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to