Hi Amine, Amine Marref wrote: > Thanks everyone, > > I can now compile the program and run it. > > This program is just about a tenth of the size of my target problems in future. It seems that I will sooner or later not be able to compile programs like this. > > The size of the current program can be reduced by using loops to specify domains and constraints on sublists of variables. This however, only applies to this case. Eventually, each single variable will have a domain and a set of constraints which are potentially different from all other variables, so I guess this flat modeling is necessary. > > I did not quite get the idea about the data file which should contain only "numbers". How can I get around the problem of needing to declare variables individually (and their distinctive set of constraints) by using a data file? > ECLiPSe is a general programming language, and it has all the constructs needed to write a "non-flat" program. How are you generating your current programs? I assume you have some sort of data that your program generator reads? For example, in your components program, I notice that you have various variable types, for the "EDGES", you have variables like E_21_27, etc. How are these represented in your original data, or in your program generator? In ECLiPSe, there are various ways of storing a collection of related variables, e.g. your EDGES variables. For example, assuming your 21 and 27 are array indexes, you can store them in a 2-D matrix. If your matrix is sparse, you can use a hash-table (lib(hash)) to store the data. You access a matrix element using its indexes, and you use a key (unique to the variable, so say something like edges21_27 for this example) to access the variable in a hash-table. So for the domain of each specific variable, you can put an entry that gives the domain for each variable, e.g. edges 21 27 0 1000 where "edges 21 27" refers to your variable, and 0 and 1000 are the upper and lower bounds of your variable. Of course you can have any number of variations on this -- I assume you already have some format to specify your data. What you need to do is to write the program in ECLiPSe to read this data, instead of doing this in your program generator. > P.S. How do I reply to this topic without generating new threads in the user-list archive? I also don't understand how the list archive decide to list the posts. It would be great if someone who do can post about it! Cheers, Kish -- This e-mail may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply e-mail and delete all copies of this message. Cisco Systems Limited (Company Number: 02558939), is registered in England and Wales with its registered office at 1 Callaghan Square, Cardiff, South Glamorgan CF10 5BT.Received on Wed Feb 03 2010 - 13:04:49 CET
This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET