Question: How to use Grid:-Seq in a procedure that calls a function of a package?

Hello

I am trying to use Grid:-Seq to speed up some calculations.  To this end, I wrote the following procedure:

fun:=proc(model1::list,model2::list,vars::list,conds::set,tlim::numeric)
description "This function returns models with matching structures":
local ans1,ans2,res:=NULL:
if evalb(expand(model1)<>expand(model2)) then
     (ans1,ans2):=UtilsIORelation:-findMatchingStructures(subs(conds,model1),subs(conds,model2),vars,tlim):
     if nops(ans1) > 1 then
        res:=model1:
     end if:
end if:
return(res):
end proc:

I checked if the procedure works by issuing the following command

 

aux:=[seq](fun(modelX[i],model,vars,conds,2),i=1..nops(modelX)):

and it did work. The result is what I needed. 

But when I try it using Grid:-Seq instead of seq, I got the following error message:

infolevel[Grid:-Seq]:=3:
Grid:-Set(fun,findMatchingStructures,'model','vars','conds');
aux:=[Grid:-Seq](fun(modelX[i],model,vars,conds,2),i=1..nops(modelX)):

 

Error, (in fun) findMatchingStructures is not a command in the UtilsIORelation package.

 

What am I missing?   

Many thanks

 

 

 

Please Wait...