In our OPL .mod file, we would like to include some error messages in an Oracle database output table when the model is infeasible.
We are using addOnly to do this, but the tuple does not get written to the database.
In the example below, when the model solves, data for #1 and #2 show up in the database table.
However, when the model is infeasible, data for #3 and #4 do not show up in the database table.
Apparently, data is not written to output tables when the model is infeasible.
Questions:
1. Is there a better way to accomplish our task of writing some error messages (in OPL) to an output table when the model is infeasible?
2. If this is the best way to proceed, is there an extra step we must take to persist the output data when the model is infeasible?
Thanks!
if (cplex.solve()){
thisOplModel.issueLog.addOnly(1,”Heading-1″,”Description-1″);
thisOplModel.issueLog.addOnly(2,”Heading-2″,”Description-2″);
}else{
thisOplModel.issueLog.addOnly(3,”Heading-3″,”Description-3″);
thisOplModel.issueLog.addOnly(4,”Heading-4″,”Description-4″);
}
Source: How to persist data to an output table when the model is infeasible