Originally posted by: SystemAdmin
[jfk said:]
Hello,
indeed you can debug script blocks but not models. It is not an OPL limitation and please read on to understand why:
if you think it over you realize that you have 2 flow controls what you could "breakpoint":
1. a flow control in a script
2. the flow control of the search algorithms in an engine (what solves a model)
if we assume there is no No.1 (script), once a model is generated, in CPLEX you will have a matrix, in CPO you will have a collection of constraints to propagate with and you start a search based on the the (algorithmic) settings. Let say you have a line in the model like x>=10 (say x's integer, the continuous case is simpler). How could you stop at this line with a breakpoint? The constraint is not added dynamically to the search, an OPL model is declarative not imperative. Not mentioning that this constraint supposed to be always true during the search otherwise when the engine finds indication that the constraint can't be satisfied it would cut the node (backtrack) where x<10 and don't explore that branch anymore. To follow what is going on in the engine you have the engine log (you can direct it to a file and analyze it if you want btw) and access to the detailed engine flow control is not provided (you guess why, right?)<br />So the remaining case is flow control in a script, and that is where breakpoints-debug are provided.
cheers
#DecisionOptimization#OPLusingCPLEXOptimizer