Modellbildung und Simulation SS 2010
Blatt 1, Aufgabe 1
> | restart; |
> | with(plots): |
Warning, the name changecoords has been redefined
Um nachher nicht so viel schreiben zu müssen, merken wir uns die meisten der Parameter für das Zeichnen:
> | poptions := x1=0..60,x2=0..60,view=0..1500, axes=BOXED,grid=[30,30],style=wireframe, orientation=[-145,45],thickness=1: |
> |
Gewinnfunktionen
Gewinn des ersten Bauern:
> | Gewinn1 := (x1,x2) -> (120-2*(x1+x2))*x1-x1^2; |
> | pGewinn1 := plot3d(Gewinn1(x1,x2),poptions,color=RED): |
> | display(pGewinn1); |
Dto. für den zweiten Bauern:
> | Gewinn2 := (x1,x2) -> (120-2*(x1+x2))*x2-x2^2; |
> | pGewinn2 := plot3d(Gewinn2(x1,x2),poptions,color=BLUE): |
> | display({pGewinn1,pGewinn2}); |
> |
> |
Antwortfunktionen (Reaktionsabbildungen) r1 und r2
Optimale Erntemenge für Bauer 1 bei gegebenem x2:
> | r1 := solve(diff(Gewinn1(x1,x2),x1)=0,x1); |
Dasselbe als Funktion von x2:
> | r1fkt := unapply(r1,x2); |
Diese Kurven beschreiben die jeweiligen Gewinne längs der Bahn (x1,x2)=(r1fkt(t),t)):
> | pGewinn2_r1 := spacecurve( [r1fkt(t),t,Gewinn2(r1fkt(t),t)], t=0..60,color=GREEN,thickness=3): |
> | pGewinn1_r1 := spacecurve( [r1fkt(t),t,Gewinn1(r1fkt(t),t)], t=0..60,color=BLACK,thickness=3): |
> | display([pGewinn1,pGewinn1_r1,pGewinn2_r1]); |
Und umgekehrt:
> | r2 := solve(diff(Gewinn2(x1,x2),x2)=0,x2); |
> | r2fkt := unapply(r2,x1); |
> | pGewinn1_r2 := spacecurve( [t,r2fkt(t),Gewinn1(t,r2fkt(t))], t=0..60,color=GREEN,thickness=3): |
> | pGewinn2_r2 := spacecurve( [t,r2fkt(t),Gewinn2(t,r2fkt(t))], t=0..60,color=BLACK,thickness=3): |
> | display([pGewinn1,pGewinn2, pGewinn1_r1,pGewinn1_r2, pGewinn2_r1,pGewinn2_r2]); |
> |
> |
Gleichgewichtspunkt
Rechnen wir uns noch den Gleichgewichtspunkt aus (ein Wert reicht wegen Symmetrie):
> | x_gleichgewicht := solve(r1fkt(r2fkt(t))=t,t); |
> | Gewinn1(x_gleichgewicht,x_gleichgewicht); |
> |
> |
Ein Erdbeerkartell
Und was wäre der optimale Betrag, den beide bei perfekter Kooperation herausholen könnten (vorausgesetzt, das Kartellamt schreitet nicht ein)?
> | Gesamtgewinn := Gewinn1(x1,x2)+Gewinn2(x1,x2); |
> | plot3d(Gesamtgewinn,poptions); |
> | solve({diff(Gesamtgewinn,x1)=0,diff(Gesamtgewinn,x2)=0},{x1,x2}); |
> | Gewinn1(12,12); |
> |
> |