Hi Torsten, Thanks so much for your reply. I think I more or less understand that and did minor enhancement in search code (e.g., doing forced garbage collection if memory exceeds certain level after copying the space. As I found that sometimes copying happens so fast and crashes that it does not allow GC to clean up). I also played with RCD (recomputation distance) and that does help in terms of reducing memory consumption. I did read some papers of Christian Schulte regarding these issues. Are there some data points (references) as to how big a problem Oz could handle and its resource usage statistics?
Thanks again, Ashis -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Torsten Anders Sent: Wednesday, June 17, 2009 5:56 PM To: Mozart users Subject: Re: Constraint Definition Dear Ashis, Oz' constraint model is based on copying -- simplified, whenever a constraint solver makes a decision (a distribution step) then it copies everything known about the problem at this time during search (space copy). Your memory consumption is very likely caused by this copying: the memory consumption depends on the size of your data, and the size of the search space (how often it is copied). As I said, this is a bit simplified, but I hope you get the idea. There are different ways to reduce the amount of memory required. The best way is to optimise your distribution strategy: if you reduce the search tree then you also reduce the memory consumption. Further, you can trade memory for computation time using recomputation. The best source for further information on this matter is Christian Schulte's book, but also the Constraint Programming Tutorial will help. Best Torsten On Jun 17, 2009, at 9:25 PM, Maity, Ashis K wrote: > Hi, > > One of my constraint definitions in a scheduling problem is using > extensive memory and computation time (please see attached). We > call it > UsageConsraint. The basic idea is something like this -- a resource > should not spend more than a certain amount of time in a time period > (i.e., a pilot will not fly more than 8 hrs in a 24 hr window). Can > anybody quickly browse the code and see if there are some big pitfalls > that are causing so much resource usage? For this constraint Oz engine > is using as much as 2 GB of memory for 100 tasks with 50 or so > resources > and I need to run this for 1000 tasks or more. Any help is much > appreciated. > > proc {ApplyConstraint RU Task PeriodStart PeriodEnd Duration > ConstraintResourceId} > {FD.impl > (RU.id =: ConstraintResourceId) > ({FD.exor > {FD.conj > ( > {FD.conj > (Task.start >=: PeriodStart) > (Task.start <: PeriodEnd) > } > ) > (Duration \=: 0) > } > > {FD.conj > ( > {FD.nega > {FD.conj > (Task.start >=: PeriodStart) > (Task.start <: PeriodEnd) > } > } > ) > (Duration =: 0) > } > }) > 1 > } > End > > Thanks, > > > -- > Torsten Anders > Interdisciplinary Centre for Computer Music Research > University of Plymouth > Office: +44-1752-586219 > Private: +44-1752-558917 > http://strasheela.sourceforge.net > http://www.torsten-anders.de > > > ________________________________________________________________________ _________ 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
