Main

## Main.ErrorMessages History

June 09, 2017, at 01:52 AM by 10.5.113.159 -

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.

1. A variable constraint may be the source of the error.
2. An equation may be the source of the error.
3. 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.

June 09, 2017, at 01:43 AM by 10.5.113.159 -
Changed lines 26-29 from:

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.

to:

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?

June 09, 2017, at 01:27 AM by 10.5.113.159 -
Changed lines 26-28 from:

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.

to:

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.

June 09, 2017, at 01:26 AM by 10.5.113.159 -
Changed line 5 from:

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.

to:

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.

June 09, 2017, at 01:25 AM by 10.5.113.159 -

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;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();


</script> </div> <gcse:search></gcse:search> (:htmlend:)

June 09, 2017, at 01:17 AM by 10.5.113.159 -
Changed lines 5-8 from:

Problem: Tag Retrieval Error: -99999

 apm_tag(s,a,'variable.option') returns -99999

to:

Question: Why does the MATLAB or Python function apm_tag(s,a,'variable.option') return a value of -99999?

June 09, 2017, at 01:16 AM by 10.5.113.159 -
Changed lines 5-8 from:
##### Tag Retrieval Error: -99999

Problem Description:

to:

Problem: Tag Retrieval Error: -99999

Changed lines 9-11 from:

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.

to:

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.

June 09, 2017, at 01:15 AM by 10.5.113.159 -

(: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.