Message Boards Message Boards

GROUPS:

Maximize function with constraints?

Posted 10 months ago
543 Views
|
0 Replies
|
0 Total Likes
|

Hello there,

I want to write a program, that maximizes a utility function where you have a starting capital and you can influence every period the amount of reinsurance. Now I want the Reinsurance to be optimized, but I just can reinsure a positive amount and also it needs to be less than my maximum loss. Which means I need to put in some constraints. When I do so, by telling the reinsurance should be >= 0 it only gives me positive Integer Values back. I want it to be possible for every real number in this range. Also it doesn't seem to work properly, because if I change some constants like the starting capital, the optimal reinsurance seems to stay the same. That shouldn't be the case.

Nutzenfkt[[LebendeInt + 1]]= Maximize[{Nutzenfkt[[LebendeInt+1]],RueckV>=0},{RueckV}];

So I got an entry that should just be maximized in terms of "RueckV". Also I thought about replacing "RueckV>=0" by

"Element[RueckV,Interval[0,LebendeInt]]"

, but then the code stops working, with the following Error message:

NMaximize::nnum: The function value {-100.} is not a number at {Subscript[RueckV$76554, 1]} = {0.}.

I plan to take this code to the master thesis, so that I think I can't make it public in full?

Thanks for your help Till

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