Originally posted by: SystemAdmin
[adgro said:]
It seems that code like
...
var source = new IloOplModelSource(modelName);
var def = new IloOplModelDefinition(source);
...
only can be used in a main {...} block.
If I put it in an execute {...} block then
I got the error:
Element "IloOplModelSource" does not exist in OPL model
Problem is: I would like to put the code in a separate .mod file
and include that model file in my 'main file', like:
include "run-model-infos.mod";
main {
// real main:
...
}
Now, there can be only one "main { ... }" block and thus
no main block in the file "run-model-infos.mod".
So I am stuck on this.
Anyone knows how to solve this?
Why is using a IloOplModelSource not possible in a execute block??
Regards,
Ad.
#DecisionOptimization#OPLusingCPLEXOptimizer