Originally posted by: GACNEU
hi all,
thanks for your advise firstly.
i wanna run a model with some data filee, and output results in .txt files. i modified the example, \opl\examples\opl\examples_suite\examples_suite.mod. In line 65, my model is added as such, "AddModel(models, "../A", "A.mod", "A.dat",null);". the post processing codes are written in execute block. but these codes seems have never run and output result i want.
please tell me how can i make the post processing codes run.
My simplied A.mod is as following:
//file A.mod
float A1 = ...;
float A2 = ...;
dvar boolean B1;
dvar boolean B2;
maximize A1*B1 + A2*B2;
subject to{
B1 + B2 ==1;
}
execute POST_PROCESS{
writeln("B1=",B1);
writeln("B2=",B2);
}
#DecisionOptimization#OPLusingCPLEXOptimizer