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
Class AlgoParameters

    java.lang.Object
      edu.princeton.repeatedgames.rgsolve.AlgoParameters

All Implemented Interfaces:
  java.io.Serializable

    public class AlgoParameters

extends java.lang.Object
implements java.io.Serializable

This class stores a data structure representing rgsolve's settings.

See Also:
  Serialized Form

Nested Class Summary
`static class` | `AlgoParameters.ALGO_TYPE` enum type on algorithm choice

Field Summary
`AlgoParameters.ALGO_TYPE` | `algo_type` The algorithm to be used (AS or APS) by rgsolve
`double` | `angTol` If is `smoothHull` is selected, this tells the convex hull routine how "flat" angles between 3 adjacent points have to be to eliminate the middle point.
`double` | `ccwTol` If is `smoothHull` is selected, this tells the convex hull routine the minimum (robustly calculated) signed area to allow between 3 adjacent extreme points.
`boolean` | `continueIters` Whether the solver should quit after `keepIters` iterations or prompt the user for more iterations
`double` | `convergeTol` The convergence criterion that should be used by the solver.
`static AlgoParameters.ALGO_TYPE` | `DEF_ALGO_TYPE` default algoType: Abreu-Sannikov
`static double` | `DEF_ANG_TOL` default angTol: 1.0E-15
`static double` | `DEF_CCW_TOL` default ccwTol: 1.0E-15
`static boolean` | `DEF_CONTINUE_ITERS` default continueIters: true
`static double` | `DEF_CONVERGE_TOL` default convergeTol: 1.0E-12
`static boolean` | `DEF_DO_MULTI_THREAD` default doMultiThread: false
`static boolean` | `DEF_DO_ROUNDING` default doRounding: false
`static double` | `DEF_INTERSECT_TOL` default intersectTol: 1.0E-15
`static boolean` | `DEF_KEEP_ACTIONS` default keepActions: false
`static boolean` | `DEF_KEEP_ITERS` default keepIters: false
`static int` | `DEF_MAX_GEN_PTS` default maxGenPts: 100,000
`static int` | `DEF_MAX_ITERS` default maxIters: 500
`static int` | `DEF_ROUND_DIGITS` default roundDigits: 14
`static boolean` | `DEF_SMOOTH_HULL` default smoothHull: true
`static boolean` | `DEF_USE_MIN_MAX` default useMaxMin: true
`static boolean` | `DEF_USE_RECTANGLE_W0` defaule useRectangleW0: false
`boolean` | `doMultiThread` On systems with multi-core processors, selecting this tells the solver to break up some of the computationally intensive tasks within an iterations and to send each sub-task to a different processor to speed up computation time.
`boolean` | `doRounding` If selected, all calculations in the solver are rounded to the number of digits in `roundDigits`.
`static java.lang.String` | `extension` file extension for serialization
`double` | `intersectTol` This tells the program the \slack" to give the solver when calculating I.C.'s.
`boolean` | `keepActions` A switch for whether or not the program should keep a record of the I.C./Feasible-Set intersections (and thereby a record of all candidate extreme points generated), or just keep the extreme points that survive the convex hull operation.
`boolean` | `keepIters` A switch for whether the program should keep a record of all iterations performed, or just keep what happened in the last iteration
`int` | `maxGenPts` Typically, the solver generates many candidate extreme points over the course of an iteration, and then takes the convex hull at the end to delete extraneous points.
`int` | `maxIters` The maximum number of iterations the solver should do before prompting the user about whether to terminate the algorithm or to use more iterations.
`static int` | `MIN_CUTOFF` minimum number of tasks for a separate thread (100000)
`static int` | `MIN_MULTI_ACTIONS` miniumum number of action profiles to allow multi-threading (4000000)
`int` | `roundDigits` Digits to round to if `doRounding` is selected
`private static long` | `serialVersionUID` serialization ID
`boolean` | `smoothHull` This is a switch for whether the convex hull routine should "smooth" the hull by eliminating extraneous extreme points via certain robustness checks, or whether the convex hull routine should naively return all potential extreme points based on a potentially inaccurate floating point signed area calculations.
`boolean` | `useMinMax` Switch for whether the initial thread point should be the minmax payoffs, or the minimum component-wise payoffs
`boolean` | `useRectangleW0` Use a rectangle containing feasible set as W0 rather than hull of feasible payoffs

Constructor Summary
`protected` | `AlgoParameters()` Empty constructor
`` | `AlgoParameters(AlgoParameters.ALGO_TYPE algo_type, double convergeTol, double intersectTol, double angTol, double ccwTol, int maxIters, int maxGenPts, int roundDigits, boolean keepIters, boolean smoothHull, boolean useMinMax, boolean continueIters, boolean doRounding, boolean keepActions, boolean doMultiThread, boolean useRectangleW0)` Constructor that fills in fields Rounds all parameters up to 2^-51

Method Summary
`static AlgoParameters` | `getDefaults()` Returns default parameter values: `convergeTol = 1.0E-12` `ccwTol = 1.0E-15` `angTol = 1.0E-15` `keepIters = false` `smoothHull = true` `keepActions = true` `maxGenPts = 100000` `roundDigits = 14` `doRounding = false` `intersectTol = 1.0E-15` `continueIters = true` `useMinMax = true` `doMultiThread = false` `algo_type = ALGO_TYPE.AS` `useRectangleW0 = false`
`void` | `initializeValues(AlgoParameters.ALGO_TYPE algo_type, double convergeTol, double intersectTol, double angTol, double ccwTol, int maxIters, int maxGenPts, int roundDigits, boolean keepIters, boolean smoothHull, boolean useMinMax, boolean continueIters, boolean doRounding, boolean keepActions, boolean doMultiThread, boolean useRectangleW0)`
`static void` | `setMIN_CUTOFF(int mIN_CUTOFF)` Sets the field called 'mIN_CUTOFF' to the given value.
`static void` | `setMIN_MULTI_ACTIONS(int mIN_MULTI_ACTIONS)` Sets the field called 'mIN_MULTI_ACTIONS' to the given value.

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

### extension

    public static final java.lang.String extension

  file extension for serialization

  See Also:
    Constant Field Values

### MIN_MULTI_ACTIONS

    public static int MIN_MULTI_ACTIONS

  miniumum number of action profiles to allow multi-threading (4000000)

### MIN_CUTOFF

    public static int MIN_CUTOFF

  minimum number of tasks for a separate thread (100000)

### algo_type

    public AlgoParameters.ALGO_TYPE algo_type

  The algorithm to be used (AS or APS) by rgsolve

### convergeTol

    public double convergeTol

  The convergence criterion that should be used by the solver. The solver stops (and considers the routine \converged") if (a) the number of extreme points between successive iterates is the same and (b) the (sup-norm) distance between corresponding extreme points in successive iterates is less than this value.

### intersectTol

    public double intersectTol

  This tells the program the \slack" to give the solver when calculating I.C.'s. This is for cases where an I.C.-constraint is lies right up against the edge of the feasible set, and numerical error would cause the program to not generate the correct points.

### angTol

    public double angTol

  If is `smoothHull` is selected, this tells the convex hull routine how "flat" angles between 3 adjacent points have to be to eliminate the middle point. If the angle formed by the three points is in excess of Pi minus this value, the middle point is deleted.

### ccwTol

    public double ccwTol

  If is `smoothHull` is selected, this tells the convex hull routine the minimum (robustly calculated) signed area to allow between 3 adjacent extreme points. If the signed area is less than this value, the middle point is deleted.

### maxIters

    public int maxIters

  The maximum number of iterations the solver should do before prompting the user about whether to terminate the algorithm or to use more iterations.

### maxGenPts

    public int maxGenPts

  Typically, the solver generates many candidate extreme points over the course of an iteration, and then takes the convex hull at the end to delete extraneous points. However, to conservememory, once the number of candidate points exceeds this number, the hull is taken immediately and the extraneous points (up to that time) are deleted.

### keepIters

    public boolean keepIters

  A switch for whether the program should keep a record of all iterations performed, or just keep what happened in the last iteration

### smoothHull

    public boolean smoothHull

  This is a switch for whether the convex hull routine should "smooth" the hull by eliminating extraneous extreme points via certain robustness checks, or whether the convex hull routine should naively return all potential extreme points based on a potentially inaccurate floating point signed area calculations.

### useMinMax

    public boolean useMinMax

  Switch for whether the initial thread point should be the minmax payoffs, or the minimum component-wise payoffs

### continueIters

    public boolean continueIters

  Whether the solver should quit after `keepIters` iterations or prompt the user for more iterations

### doRounding

    public boolean doRounding

  If selected, all calculations in the solver are rounded to the number of digits in `roundDigits`.

### roundDigits

    public int roundDigits

  Digits to round to if `doRounding` is selected

### keepActions

    public boolean keepActions

  A switch for whether or not the program should keep a record of the I.C./Feasible-Set intersections (and thereby a record of all candidate extreme points generated), or just keep the extreme points that survive the convex hull operation.

### doMultiThread

    public boolean doMultiThread

  On systems with multi-core processors, selecting this tells the solver to break up some of the computationally intensive tasks within an iterations and to send each sub-task to a different processor to speed up computation time. Even if selected, the solver will only multi-thread games where the number of action profiles e xceeds five million.

### useRectangleW0

    public boolean useRectangleW0

  Use a rectangle containing feasible set as W0 rather than hull of feasible payoffs

### DEF_ALGO_TYPE

    public static final AlgoParameters.ALGO_TYPE DEF_ALGO_TYPE

  default algoType: Abreu-Sannikov

### DEF_MAX_ITERS

    public static final int DEF_MAX_ITERS

  default maxIters: 500

  See Also:
    Constant Field Values

### DEF_MAX_GEN_PTS

    public static final int DEF_MAX_GEN_PTS

  default maxGenPts: 100,000

  See Also:
    Constant Field Values

### DEF_KEEP_ITERS

    public static final boolean DEF_KEEP_ITERS

  default keepIters: false

  See Also:
    Constant Field Values

### DEF_KEEP_ACTIONS

    public static final boolean DEF_KEEP_ACTIONS

  default keepActions: false

  See Also:
    Constant Field Values

### DEF_SMOOTH_HULL

    public static final boolean DEF_SMOOTH_HULL

  default smoothHull: true

  See Also:
    Constant Field Values

### DEF_CCW_TOL

    public static final double DEF_CCW_TOL

  default ccwTol: 1.0E-15

  See Also:
    Constant Field Values

### DEF_ANG_TOL

    public static final double DEF_ANG_TOL

  default angTol: 1.0E-15

  See Also:
    Constant Field Values

### DEF_CONVERGE_TOL

    public static final double DEF_CONVERGE_TOL

  default convergeTol: 1.0E-12

  See Also:
    Constant Field Values

### DEF_INTERSECT_TOL

    public static final double DEF_INTERSECT_TOL

  default intersectTol: 1.0E-15

  See Also:
    Constant Field Values

### DEF_DO_ROUNDING

    public static final boolean DEF_DO_ROUNDING

  default doRounding: false

  See Also:
    Constant Field Values

### DEF_DO_MULTI_THREAD

    public static final boolean DEF_DO_MULTI_THREAD

  default doMultiThread: false

  See Also:
    Constant Field Values

### DEF_ROUND_DIGITS

    public static final int DEF_ROUND_DIGITS

  default roundDigits: 14

  See Also:
    Constant Field Values

### DEF_CONTINUE_ITERS

    public static final boolean DEF_CONTINUE_ITERS

  default continueIters: true

  See Also:
    Constant Field Values

### DEF_USE_MIN_MAX

    public static final boolean DEF_USE_MIN_MAX

  default useMaxMin: true

  See Also:
    Constant Field Values

### DEF_USE_RECTANGLE_W0

    public static final boolean DEF_USE_RECTANGLE_W0

  defaule useRectangleW0: false

  See Also:
    Constant Field Values

Constructor Detail

### AlgoParameters

    public AlgoParameters(AlgoParameters.ALGO_TYPE algo_type,
                          double convergeTol,
                          double intersectTol,
                          double angTol,
                          double ccwTol,
                          int maxIters,
                          int maxGenPts,
                          int roundDigits,
                          boolean keepIters,
                          boolean smoothHull,
                          boolean useMinMax,
                          boolean continueIters,
                          boolean doRounding,
                          boolean keepActions,
                          boolean doMultiThread,
                          boolean useRectangleW0)

  Constructor that fills in fields Rounds all parameters up to 2^-51

  Parameters:
    `algo_type` -
    `convergeTol` -
    `intersectTol` -
    `angTol` -
    `ccwTol` -
    `maxIters` -
    `maxGenPts` -
    `roundDigits` -
    `keepIters` -
    `smoothHull` -
    `useMinMax` -
    `continueIters` -
    `doRounding` -
    `keepActions` -
    `doMultiThread` -

### AlgoParameters

    protected AlgoParameters()

  Empty constructor

Method Detail

### initializeValues

    public void initializeValues(AlgoParameters.ALGO_TYPE algo_type,
                                 double convergeTol,
                                 double intersectTol,
                                 double angTol,
                                 double ccwTol,
                                 int maxIters,
                                 int maxGenPts,
                                 int roundDigits,
                                 boolean keepIters,
                                 boolean smoothHull,
                                 boolean useMinMax,
                                 boolean continueIters,
                                 boolean doRounding,
                                 boolean keepActions,
                                 boolean doMultiThread,
                                 boolean useRectangleW0)

### getDefaults

    public static AlgoParameters getDefaults()

  Returns default parameter values:
  `convergeTol = 1.0E-12`
  `ccwTol = 1.0E-15`
  `angTol = 1.0E-15`
  `keepIters = false`
  `smoothHull = true`
  `keepActions = true`
  `maxGenPts = 100000`
  `roundDigits = 14`
  `doRounding = false`
  `intersectTol = 1.0E-15`
  `continueIters = true`
  `useMinMax = true`
  `doMultiThread = false`
  `algo_type = ALGO_TYPE.AS`
  `useRectangleW0 = false`

  Returns:
    default parameters

### setMIN_MULTI_ACTIONS

    public static void setMIN_MULTI_ACTIONS(int mIN_MULTI_ACTIONS)

  Sets the field called 'mIN_MULTI_ACTIONS' to the given value.

  Parameters:
    `mIN_MULTI_ACTIONS` - The mIN_MULTI_ACTIONS to set.

### setMIN_CUTOFF

    public static void setMIN_CUTOFF(int mIN_CUTOFF)

  Sets the field called 'mIN_CUTOFF' to the given value.

  Parameters:
    `mIN_CUTOFF` - The mIN_CUTOFF to set.

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