Originally posted by: SystemAdmin
Hi,
When reading data from a database, the OPL data you're initializing has to be an array or a set.
In the
documentation for DBRead(), it says
"The DBRead instruction is used to read data from a database and insert the data elements into an OPL array or an OPL set." If you're interested in getting an integer (not a set nor an array), the workaround is to first read a set and then get that element with something like:
int period = first(setReadFromDB);
Hope this helps
#DecisionOptimization#OPLusingCPLEXOptimizer