Thanks Wolfgang. Your suggestion is great and I played with it. But I am
still not getting the information that I was looking for. Just to give
you a context, the problem I am trying to solve is a scheduler problem
where I have two domains (I have others as well -- but these two are
predominant) -- Resources and Start Times. What I am trying to get is to
obtain a partial solution so that I can tell user what could be blocking
to get a successful schedule. In my best failed solution list, I could
obtain the various Resource selections that the Scheduler is doing, but
I could never see it picking any start time. Perhaps by picking
Resources itself it knows that there is not a valid start time and hence
it fails before executing the following: {FD.assign min Starts} (or
equivalent code). I wanted it to provide both a Start time and Resource
pick for some of the tasks as a partial solution instead of just giving
domain for the Start time no matter what. I have tried to define problem
where the issue is only with start time and not with resources -- but
still I never get pick for the Start time.
Result:returnData(best_failed:
[best_failed(
root:result(
cost:scores(123:scoredata(score:0
type:tcf_action_min_makespan) 1995:scoredata(score:0
type:rcf_action_lelvel_load) lname_DEFAULT:scoredata(score:0
type:rcf_action_level_load) lname_totalscore:scoredata(score:0
type:totalscore))
tasks:[
task_Label_1(dur:5 priority:1
resources_used:[ru(comb:3 id:_{1001 1002} num:1
resourceType:1)] start:_{0#5}
taskType:[1])
task_Label_2(dur:5 priority:1
resources_used:[ru(comb:3 id:1002 num:1 resourceType:1)]
start:_{0#5} taskType:[1])
task_Label_3(dur:5 priority:1
resources_used:[ru(comb:3 id:1002 num:1 resourceType:1)]
start:_{0#5} taskType:[1])])
space:<Space>)
Thanks so much,
Ashis
-----Original Message-----
From: [email protected] [mailto:[email protected]]
On Behalf Of Wolfgang Meyer
Sent: Tuesday, February 24, 2009 3:41 AM
To: Mozart users
Subject: Re: Browser problem/Failed Space
Maity, Ashis K wrote:
> ...
> Changing the topic now, is there a way to save a Space that has
failed?
> We want to store the values of that Space that has failed? Is that
> possible? In the code snippet below, we could store the values of the
> Space when it has succeeded or had alternatives. But can not do the
same
> thing when it has failed? What we can do so that we store the values
> before it decides that it would fail? Am I able to state my problem?
...
As far as I know, all information within a space is lost as soon as it
fails.
Needing that information might suggest a problem with your design
because in a failed space, the data has become inconsistent and invalid.
That said, there is a way to send data out from a space shortly before
it fails. Just use try-catch around your computation and send the data
to a port:
declare
Stream
P = {NewPort Stream}
S = {Space.new
proc {$ R}
try
R = 3
R = R+1
catch E then
{Port.send P R}
raise E end
end
end}
in
case {Space.ask S}
of failed then
{Browse Stream.1}
end
Cheers,
Wolfgang
________________________________________________________________________
_________
mozart-users mailing list
[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