Hi,

I know another newbie question but I think this one is very easy. I simply want to assign the current task label that is being processed so if the constraints fail I can tell what task had the problem. I try this:

{System.show {Label T}}
{LastTask = {Label T} }

curly braces are used for procedure/function calls. Roughly, the syntax is something like {Procedure_Name Parameter1 Parameter2}. So using {LastTask={Label T}} says "unify the result of {Label T} with LastTask" and use the result (the label of T) as a unary procedure and execute it. This is exactly what the error message says:

%** Application of non-procedure and non-object
You execute a non-procedure (which is of course an error)
%**
%** In statement: {p7}
Your "T" has label p7 :-)

%** Call Stack:
%** procedure in file "./tinyErpScheduler.oz", line 96, column 5, PC = 135959244
Here's the line number, so you have all information you need.

I also want to clone the Start record.  I try:

{Record.clone Start ClonedStart}
I don't know what your Start / ClonedStart variables look like, but perhaps Start is not determined? (I.e. a free variable, or an open record?) If not, maybe using ClonedStart afterwards blocks - Record.clone leaves the new record with fresh free variables at each feature. Always be sure to check the docs! It's very useful.

and it causes my oz program to just hang. What do I clone the Start record?


If you need to clone a record with FDInt variables at the features, just use Record.map like this:

ClonedStart={Record.map Start fun {$ Orig} {FD.int {FD.reflect.dom Orig}} end}


Cheers,
Filip

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

Reply via email to