Hello, I am trying to use the built-in binary table handler in AMPL. From the AMPL book, it is not clear what the format of the data should be. I assume that line 1 contains a header with ampl.bit n m where n and m are integers. Line 2 contains a list of variable names e.g. var1 var2 and remaining lines are data .e.g. 1 2 11 12 However it is not clear whether line 1 should be written as "ampl.bit", n, m or "ampl.bit n m" similarly -- what is the format of the remaining lines. Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group. To post to this group, send email to [hidden email] To unsubscribe from this group, send email to [hidden email] For more options, visit this group at http://groups.google.com/group/ampl?hl=en -~----------~----~----~----~------~----~------~--~--- |
Art, There's additional information on the built-in binary table handler at either of the following two sites: www.netlib.org/ampl/tables netlib.sandia.gov/ampl/tables A README file points to source files simpbit.c and fullbit.c, which give examples of reading and writing .bit files. Where you say "I assume that line 1 contains a header with 'ampl.bit n m' ...", you are describing something that is more like the built-in text table format described in the book (page 201). The first line gives the file name (such as ampl.tab), the number of key columns, and the number of data columns; the second line gives the column headers; and each subsequent line gives one data value corresponding to each column. If you still have something specific in mind that you don't see how to do, let me know. I can suggest which AMPL table feature is likely to be most helpful. Bob Fourer [hidden email] > -----Original Message----- > From: [hidden email] [mailto:[hidden email]] On Behalf Of Art > Cohen > Sent: Wednesday, March 05, 2008 12:47 PM > To: AMPL Modeling Language > Subject: [AMPL 1644] binary table handlers > > > Hello, > > I am trying to use the built-in binary table handler in AMPL. From the > AMPL book, it is not clear what the format of the data should be. I > assume that line 1 contains a header with > > ampl.bit n m > > where n and m are integers. Line 2 contains a list of variable names > e.g. > > var1 var2 > > and remaining lines are data .e.g. > > 1 2 > 11 12 > > However it is not clear whether line 1 should be written as > > "ampl.bit", n, m > > or > > "ampl.bit n m" > > similarly -- what is the format of the remaining lines. > > Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group. To post to this group, send email to [hidden email] To unsubscribe from this group, send email to [hidden email] For more options, visit this group at http://groups.google.com/group/ampl?hl=en -~----------~----~----~----~------~----~------~--~--- |
Free forum by Nabble | Edit this page |