Originally posted by: FrankCAU
Hi,
I have a large dat file and two models. The first model needs all the data provided by the dat file but the second model needs only parts of it. However, if the second model does not have import statements for all the data objects in the dat file, I get the error 'the element [name of element] is not defined'.
Small example:
--- dat file ---
X = {0, 3, 4};
Y = {1, 2};
--- import statements of model 1 ---
{int} X = ...;
{int} Y = ...;
--- import statements of model 2 (which only needs the set X) ---
{int} X = ...;
For model 2 I get the error 'the element Y is not defined' because the data for Y is in the dat file but not read by the model file. I know I could handle this by having a second dat file without the Y data. But isn't there an option to have CPLEX accept that not all the data from the dat file needs to be loaded? This would be more convenient than handling different data files.
Thank you for your support.
Frank
#DecisionOptimization#OPLusingCPLEXOptimizer