The documentation for optimizerFORCES shows a second return argument success which is not used consistently throughout. Some problems are handled by throwing an error(...) (which leaves success unset), others use disp to show a message and set success = 0.
Since success is initialized as 1 I suspect potential for misreporting success, e.g. in cases where no error is thrown but success is not re-set or if it is set multiple times.
Due to the high complexity in optimizerFORCES I find it preferable to throw an error as soon as a game-breaking issue occurs, e.g. a model incompatible with FORCES Pro. success should exactly mirror the return argument of generateCode in FORCES Pro.
The documentation for
optimizerFORCESshows a second return argumentsuccesswhich is not used consistently throughout. Some problems are handled by throwing anerror(...)(which leavessuccessunset), others usedispto show a message and setsuccess = 0.Since
successis initialized as1I suspect potential for misreporting success, e.g. in cases where noerroris thrown butsuccessis not re-set or if it is set multiple times.Due to the high complexity in optimizerFORCES I find it preferable to throw an
erroras soon as a game-breaking issue occurs, e.g. a model incompatible with FORCES Pro.successshould exactly mirror the return argument ofgenerateCodein FORCES Pro.