Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.princeton.repeatedgames.rgsolve.games.specialgames
Class SimpleCournot

    java.lang.Object
      edu.princeton.repeatedgames.rgsolve.games.Game
          edu.princeton.repeatedgames.rgsolve.games.specialgames.SimpleCournot

All Implemented Interfaces:
  java.io.Serializable

    public class SimpleCournot

extends Game
implements java.io.Serializable

"A simple Cournot game with demand P(Q) = max{0, A - B * Q}, and marginal costs c1 and c2, with quantity actions on [0, A/B] and discount delta

See Also:
  Serialized Form

Field Summary
`private double` | `A` demand price intercept
`private double` | `B` demand price slope
`private double[]` | `c` marginal costs to players
`private double` | `maxOutput` maximum output that drives price to zero
`private static long` | `serialVersionUID` serialization ID

Fields inherited from class edu.princeton.repeatedgames.rgsolve.games.Game
`description, extension`

Constructor Summary
`SimpleCournot(int m1, int m2, double delta, double A, double B, double c1, double c2)`

Method Summary
`double` | `A()`
`double` | `B()`
`double` | `c(int player)`
`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, 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

### serialVersionUID

    private static final long serialVersionUID

  serialization ID

  See Also:
    Constant Field Values

### maxOutput

    private double maxOutput

  maximum output that drives price to zero

### A

    private double A

  demand price intercept

### B

    private double B

  demand price slope

### c

    private double[] c

  marginal costs to players

Constructor Detail

### SimpleCournot

    public SimpleCournot(int m1,
                         int m2,
                         double delta,
                         double A,
                         double B,
                         double c1,
                         double c2)

Parameters:
  `m1` - player 1 action number
  `m2` - player 2 action number
  `delta` - discount
  `A` - price equation intercept
  `B` - price equation slope
  `c1` - marginal cost player 1
  `c2` - marginal cost player 2

Method Detail

### payoff1

    public double payoff1(int a1,
                          int a2)

  Description copied from class: `Game`
  payoff to player 1

  Specified by:
    `payoff1` in class `Game`
  Parameters:
    `a1` - player 1 action
    `a2` - player 2 action
  Returns:
    the payoff to player 1

### payoff2

    public double payoff2(int a1,
                          int a2)

  Description copied from class: `Game`
  payoff to player 2

  Specified by:
    `payoff2` in class `Game`
  Parameters:
    `a1` - player 1 action
    `a2` - player 2 action
  Returns:
    the payoff to player 2

### A

    public double A()

  Returns:
    price equation intercept

### B

    public double B()

  Returns:
    price equation slope

### c

    public double c(int player)

  Parameters:
    `player` -
  Returns:
    marginal cost to player `player`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD