|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.princeton.repeatedgames.rgsolve.games.Game
edu.princeton.repeatedgames.rgsolve.games.specialgames.BertrandPerfectSubs
public class BertrandPerfectSubs
A Bertrand Game with the demand function for player i Q(pi, pj) = A - B * pi [if pi < pj] Q(pi, pj) = 0 [if pi > pj] Q(pi, pj) = (A - B * pi)/2 [if pi = pj] Constant marginal costs are c1 and c2 Maximum price is A/B
| Field Summary | |
|---|---|
(package private) double |
A
Quantity demanded at price zero |
(package private) double |
B
(Negative) slope of demand curve |
(package private) double |
c1
Constant marginal cost of player 1 |
(package private) double |
c2
Constant marginal cost of player 2 |
(package private) double |
maxPrice
Highest price action |
private static long |
serialVersionUID
Serialization ID |
| Fields inherited from class edu.princeton.repeatedgames.rgsolve.games.Game |
|---|
description, extension |
| Constructor Summary | |
|---|---|
BertrandPerfectSubs(int m1,
int m2,
double delta,
double A,
double B,
double c1,
double c2)
Constructor |
|
| Method Summary | |
|---|---|
double |
getA()
Returns the value of the field called 'a'. |
double |
getB()
Returns the value of the field called 'b'. |
double |
getC1()
Returns the value of the field called 'c1'. |
double |
getC2()
Returns the value of the field called 'c2'. |
double |
getMaxPrice()
Returns the value of the field called 'maxPrice'. |
static long |
getSerialversionuid()
Returns the value of the field called 'serialversionuid'. |
double |
payoff1(int a1,
int a2)
payoff to player 1 |
double |
payoff2(int a1,
int a2)
payoff to player 2 |
| Methods inherited from class edu.princeton.repeatedgames.rgsolve.games.Game |
|---|
actionUsable, copyUsableActions, delta, m, m1, m2, payoff, setActionUsable, setDescription, setDiscount, usableActionsDefined |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
double A
double B
double c1
double c2
double maxPrice
| Constructor Detail |
|---|
public BertrandPerfectSubs(int m1,
int m2,
double delta,
double A,
double B,
double c1,
double c2)
m1 - number of actions for player 1m2 - number of actions for player 2delta - A - B - c1 - c2 - | Method Detail |
|---|
public double payoff1(int a1,
int a2)
Game
payoff1 in class Gamea1 - player 1 actiona2 - player 2 action
public double payoff2(int a1,
int a2)
Game
payoff2 in class Gamea1 - player 1 actiona2 - player 2 action
public static long getSerialversionuid()
public double getA()
public double getB()
public double getC1()
public double getC2()
public double getMaxPrice()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||