Message Boards Message Boards

Mathematica v12.3.0 has detected an internal error

Posted 2 years ago

Hello, I am using Mathematica v12.3.0.0 windows 64bit. I am trying to solve an optimization problem using NMaximize function. The objective function is mixed integer nonlinear and has 8 decision variables. After running the code, the following error is generated-

enter image description here

I am assuming this is an internal bug in Mathematica v12.3.0.0

There are no errors in code as the output is generated when numerical values are assigned to decision variables and objective function expression is called. Screenshot is as-

enter image description here

Can any one rectify the problem? Also, Is the program working in other versions of Mathematica? The program is attached.

Attachments:
4 Replies

I will suggest using numeric integration (NIntegrate instead of Integrate) and forcing the objective function to only fire when given explicit numbers in the input. This can be done as below.

objfun[Q1_?NumberQ, Q2_?NumberQ, Q3_?NumberQ, Q4_?NumberQ, 
 y1_?NumberQ, y2_?NumberQ, y3_?NumberQ, y4_?NumberQ] := ...
POSTED BY: Daniel Lichtblau

Hello Sir, I changed all Integrate to NIntegrate as per your suggestion. Also I used NumberQ function so that NIntegrate can carry out symbolic integration. This are my new outputs-

Out[449]= objfun[150, 150, 150, 150, 1, 1, 1, 1]

During evaluation of In[413]:= NMaximize::nnum: The function value -objfun[1.20631,1.91918,1.34474,1.24744,1,1,1,1] is not a number at {Q1,Q2,Q3,Q4,y1,y2,y3,y4} = {1.20631,1.91918,1.34474,1.24744,1,0.601167,0.526325,0.919202}.

Previously, the test function was giving output but now it is not giving the output. And the Nmaximize function is showing that the function is not a number. All the used symbolic variables are either assigned a value or used as an Integration variable. I am attaching the modified code for reference.

Attachments:

I can confirm that I get the same output and error message using V12.3.1. I still don't have enough info about its cause and forgot to monitor RAM consumption while calculating it.

POSTED BY: Ahmed Elbanna

Sir, I am using 32gb ram and i7 processor machine. The ram consumption was about 6.2 gb. Also since I am using Maximization, I can confirm that the objective function is concave in nature.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract