Question: Simultaneous optimization of 3 variables? Showing error while using NLPsolve?

To get optimum value (maximum) of 3 variable p, q and w. Where p and q are from the function E1(p,q) and w from the function M1(p,q). The algorithm to obtain the optimum value is described below:-
step 1: Initialize w = c = 20

step2: Evaluate E1(p,q) by substituting w in it.

step3: Find optimum value of p and q from function E1(p,q) using NLPsolve or any other optimiztion method.

step 4: Substitute q optimum value into function M1(p,q) and evaluate it.

step 5: find optimum value of w from optimizing function M1(p,q).

step 6: substitute optimum value of w to E1(p,q) and evaluate it.

step 7: do step 3

step 8: do step 5 and 6

step 9: stop the loop when (w final - w previous) <0.05

I have done this through NLPsolve but it is showing error "Error, (in int) integration range or variable must be specified in the second argument, got 5000 = -3500 .. 1500*p+q-100000"

I am attaching the worksheet below. Please see the numerical analysis part below in the sheet. maple_question.mw

Please Wait...