I have a model optimization problem: maximize rent, ri, through signals, si and sj, given someone's initial social position, SPi and SPj. Signals have a cost of 1, so the constraint is that D[ri, si] == 1 and D[ri, sj] == 1.
I get the error message
NArgMax::bcons: The following constraints are not valid:
....the whole equation for the constraint here...
Constraints should be equalities, inequalities, or domain specifications involving the variables. >>
I guess my questions are:
Is the problem simply due to my parameters no allowing a solution within the constraint?
Can I use the defined variables in the
NArgMaxinsidesignalFunc? (should they be defined as functions?)
Is NArgMax the right solution here?
α = 1000;
β = 0.03;
γ = 0.02;
m = 4000;
ω = 1;
ti = (α SPj (β sj - γ ((sj - si)/(sj + sj))^2 + 1)) +
(α SPi (β si - γ ((si - sj)/(si + sj))^2 + 1));
ri = ω (-(tr^2) + 2 m tr) /. tr -> ti
dsi = FullSimplify[D[ri, si],
Assumptions -> {Element[{si, sj}, Reals]}];
dsj = FullSimplify[D[ri, sj],
Assumptions -> {Element[{si, sj}, Reals]}];
signalFunc[{SPi_, SPj_}] :=
NArgMax[{ri, dsi == 1, dsj == 1}, {si, sj}];
signalFunc[{0.8, 1.5}];
NArgMax? I still get an error there – Cameron Murray Dec 20 '12 at 1:09SPiorSPjdo not have values, thenNArgMaxis being asked to optimize a symbolic expression, which it cannot do. – whuber Dec 20 '12 at 2:44SPiandSPjas arguments - is that not sufficient? I think that is Daniel's point. If I put the full equations insideNArgMax' I get the error >NArgMax::nosat: Obtained solution does not satisfy the following constraints within Tolerance -> 0.001: – Cameron Murray Dec 20 '12 at 3:32Dis a predefined MMA function to compute the derivative, so that expressions likeD[ri, si] == 1are (at best) meaningless. – whuber Mar 16 at 3:40