Forum Discussion
FICO
8 years agoCommunity Manager
Sum duplicate entries from input data file
Is there a command to sum duplicate entries from an input data file in an "initializations from..." block? For example, if I have a file input.dat: Cost: [ (A) 1 (A) 2 (B) 5 ] and my Mosel co...
FICO
8 years agoCommunity Manager
The 'initializations' format does not allow you to use the same index multiple times for the same table. If you can distribute the multiple occurrences within your data into several tables you could read these into some temporary structures and later add them.
Otherwise, the only possibility I see for implementing this behaviour would be to write your own data reading routine, such as in these examples:
https://examples.xpress.fico.com/example.pl?id=readfile
FICO Xpress Optimization Examples Repository: Parsing a CSV-format data file (https://examples.xpress.fico.com/example.pl?id=readcsv)
Related Content
Related Content
?1030Error: Duplicate column names
I was adding some variables to the problem but is showed error telling there are duplicate columns in variable. I have created a small code to reproduce the error which is as follows. import xpress...4 years agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum1 unread comment1 unread0Views0likes1CommentData Input from Excel
Hello, I am having trouble reading the data from an excel spreadsheet into my model. I get the error message saying "wrong number of columns". I tried the following: It also didn't work wh...2 years agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum2 unread comments2 unread0Views0likes2Comments