Troubleshooting Guide for APMonitor
Main.ErrorMessages History
Hide minor edits - Show changes to markup
Question: The solver reports that the problem is infeasible. How can I identify the problem to achieve a successful solution?
Solution: An infeasible solution message may be the result of several causes.
- A variable constraint may be the source of the error.
- An equation may be the source of the error.
- The problem may be non-convex (multiple local minima are possible) and the initial guess leads the solver to an infeasible region.
An infeasibility report is generated and can be retrieved with the following command.
apm_get(s,a,'infeasibilities.txt')
The report shows a summary of possible infeasible equations and variable constraints. A good practice is to remove variable constraints until the problem becomes feasible. Another way to identify an infeasible constraint is to set COLDSTART=2. This performs a block triangular decomposition of the problem to identify the subset of variables and equations that are causing the infeasible solution.
Question: Why does the MATLAB or Python function apm_tag(s,a,'variable.option') return a value of -99999?
Solution: Options can be read after the solution with the command to access a tag from the database. If the tag does not exist, a value of -99999 is returned. Refer to the web interface by opening apm_web(s,a) to check if the option is available or the options documentation.
Question: The program does not produce a solution. What is the source of the error?
Solution: A good first place to look is in output from APMonitor where an error message may point to the problem. To view the error message, display the output of the solve command.
% in MATLAB output = apm(s,a,'solve'); disp(output) # in Python output = apm(s,a,'solve'); print(output)
Question: The program stops with an error that points to a specific line in the model. What is wrong with the expression?
Solution: When APMonitor can't compile an expression, it returns an error message with a question mark (?) underneath the specific point where it found the error. Missing parenthesis, duplicate variable names, uninitialized intermediate variables out of order, and inconsistent vectors indices are some of the common errors. For complicated expressions, it can be helpful to break the expression into multiple smaller expressions to find the source. APMonitor is not case sensitive (lower and upper case are equal) and spaces are removed before compiling equations. Reserved keywords that form mathematical expressions will give an error if used to start a variable name.
Question: Why does the MATLAB or Python function
result = apm_tag(s,a,'variable.option')
return a value of -99999 for the result?
Question: Why does the MATLAB or Python function apm_tag(s,a,'variable.option') return a value of -99999?
Solution: Options can be read after the solution with the command to access a tag from the database. If the tag does not exist, a value of -99999 is returned. Refer to the web interface by opening apm_web(s,a) to check if the option is available or the options documentation.
Question: Why does the MATLAB or Python function apm_tag(s,a,'variable.option') return a value of -99999?
Solution: Options can be read after the solution with the command to access a tag from the database. If the tag does not exist, a value of -99999 is returned. Refer to the web interface by opening apm_web(s,a) to check if the option is available or the options documentation.
This is a page dedicated to describing common error messages in APMonitor and the remedies to fix them. Please consider posting a message with the exact application needed to reproduce the error to the Discussion Group if the solution is not found here, in the discussion group archive, or in the documentation. A search dialog is available on the sidebar to search the documentation for keywords.
This is a page dedicated to describing common error messages in APMonitor and the remedies to fix them. Please consider posting a message with the exact application needed to reproduce the error to the Discussion Group if the solution is not found here, in the discussion group archive, or in the documentation. A search dialog is available on the sidebar to search the documentation for keywords or below in a custom Google search bar that is tailored to APMonitor topics.
This is a page dedicated to describing common error messages in APMonitor and the remedies to fix them. Please consider posting a message with the exact application needed to reproduce the error to the Discussion Group if the solution is not found here, in the discussion group archive, or in the documentation. A search dialog is available on the sidebar to search the documentation for keywords.
(:html:) <div> <script>
(function() { var cx = '007597053916239890601:iir_mpcfabw'; var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true; gcse.src = 'https://cse.google.com/cse.js?cx=' + cx; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s); })();
</script> </div> <gcse:search></gcse:search> (:htmlend:)
Problem: Tag Retrieval Error: -99999
apm_tag(s,a,'variable.option') returns -99999
Question: Why does the MATLAB or Python function apm_tag(s,a,'variable.option') return a value of -99999?
Tag Retrieval Error: -99999
Problem Description:
Problem: Tag Retrieval Error: -99999
Solution
Options can be read after the solution with the command to access a tag from the database. If the tag does not exist, a value of -99999 is returned. Refer to the web interface by opening apm_web(s,a) to check if the option is available or the options documentation.
Solution: Options can be read after the solution with the command to access a tag from the database. If the tag does not exist, a value of -99999 is returned. Refer to the web interface by opening apm_web(s,a) to check if the option is available or the options documentation.
(:title Troubleshooting Guide for APMonitor:) (:keywords nonlinear, model, predictive control, APMonitor, differential, algebraic, modeling language:) (:description A description of APMonitor error messages and a guide on how to fix syntax and program errors.:)
Tag Retrieval Error: -99999
Problem Description:
apm_tag(s,a,'variable.option') returns -99999
Solution
Options can be read after the solution with the command to access a tag from the database. If the tag does not exist, a value of -99999 is returned. Refer to the web interface by opening apm_web(s,a) to check if the option is available or the options documentation.