timetabling problem, sum tuplas

David López deibyd at gmail.com
Mon Sep 25 17:46:23 CEST 2006


hello to all

I have the following problem:

I have declared tupla on tupla, this is my script:


declare
NumberOfRooms=3
NumberOfSubjects=3
NumberOfPeriods=3
X={MakeTuple rooms NumberOfRooms}
   for M in 1..NumberOfRooms do
      X.M={MakeTuple subjects NumberOfSubjects}
      for W in 1..NumberOfSubjects do
	 X.M.W={FD.tuple periods NumberOfPeriods 0#1}
      end
   end

   proc{Salas4 Vars}
      {FD.sumC 3 periods '=<:' 1}
      Vars = for M in 1..NumberOfRooms   collect:Collect do
		for W in 1..NumberOfSubjects do
		   for L in 1..NumberOfPeriods do
		      {Collect X.M.W.L}
		   end
		end
	     end
      {FD.distribute ff Vars}
   end

   {ExploreOne Salas4}

but i have follow constrain, and one of them it is:
all room m must be assigned to a subjet w in a period l, for all room
and all period    how can i do this?

or how can i sum evry subject for all periods an for all rooms the same
constrain that you can see in pdf.

tnaks for answer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: modelo_oz.pdf
Type: application/pdf
Size: 21073 bytes
Desc: not available
Url : http://lists.gforge.info.ucl.ac.be/pipermail/mozart-users/attachments/20060925/a486a81b/modelo_oz.pdf


More information about the mozart-users mailing list