Tutorial - CP in OZ

Sebastian Manzano B. Sebastian.Manzano at sun.com
Wed Nov 13 18:52:55 CET 2002


IMHO proc's don't work that way. Maybe it should be a fun?

My two cents.

-Sebastian

Md Ridzuan Mukhtar wrote:

> TQ very much Lief but as I went foward I got another problem.
> 
>  
> 
> Why did it got an error (as below) on line 21 column 23 (the italic true) ?
> 
>  
> 
> Apologize me for a beginner questions
> 
>  
> 
> TIA
> 
>  
> 
> Ridzuan
> 
>  
> 
> error
> 
> -------
> 
>  
> 
> declare
> TimeBound = 25
> Tasks = [a(machine:1) b(machine:2) c(machine:1)
>   d(machine:3) e(machine:4) f(machine:1)]
> Machines = m([3 7#9 TimeBound] [7#24] [4#11] [6#11 TimeBound])
> fun {MakeSchedule Tasks}
>    {Map Tasks fun {$ Task} {AdjoinAt Task start _} end}
> end
> Schedule = {MakeSchedule Tasks}
> {Browse Schedule}
> proc {TimePoints Schedule}
>    {ForAll Schedule proc {$ Task} Task.start::0#TimeBound end}
> end
> {TimePoints Schedule}
> proc {ResourceConstraints Schedule}
>    {ForAll Schedule
>     proc {$ Task} Task.start::Machines.(Task.machine)end}
> end
> {ResourceConstraints Schedule}
> proc {PrecedenceConstraints T1|Tr}
>    case Tr of nil then true
>    [] T2|_ then T1.start <: T2.start {PrecedenceConstraints Tr}
>    end
> end
> {PrecedenceConstraints Schedule}
> 
>  
> 
> %************************** syntax error ************************
> %**
> %** expression at statement position
> %**
> %** in file "Oz", line 21, column 23
> %** ------------------ rejected (1 error)
> 
>  


-
Please send submissions to users at mozart-oz.org
and administriva mail to users-request at mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.





More information about the mozart-users mailing list