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

## lbg.simulator.tools.generator
Class PolicyEnumerator

    java.lang.Object
      lbg.simulator.tools.generator.ScenarioSetGenerator
          lbg.simulator.tools.generator.PolicyEnumerator

    public class PolicyEnumerator

extends ScenarioSetGenerator

Given an incomplete Scenario file (i.e. not describing Peers strategy), a PolicyEnumerator enumerates all combinations of Accountant, Scheduler and Negotiator, and generates a scenario for each combination.

The generated scenarios are written to disk, as a well as a Job Description File to run them.

Author:
  Cyril Briquet

Constructor Summary
`PolicyEnumerator(java.lang.String[] args)`

Method Summary
`void` | `checkArgs(java.lang.String[] args)`
`void` | `generateScenarios()` Enumerates scenarios.
`Scenario` | `getBaseScenario()`
`int` | `getBucketCount()`
`int` | `getExpectedScenariiCount()`
`int` | `getGeneratedScenariiCount()`
`java.util.Set<java.lang.String>` | `getGeneratedScenariiFileNames()`
`java.lang.String` | `getJarCompleteFileName()`
`JDFWriterFactory` | `getJDFWriterFactory()`
`java.lang.String` | `getMainClass()`
`java.lang.String` | `getScenarioBaseName()`
`java.lang.String` | `getScenarioCompleteFileName()`
`java.lang.String` | `getScenarioFileName()`
`static void` | `main(java.lang.String[] args)`
`java.lang.String` | `toString()`
`protected void` | `updateScenario(Scenario sc, ScenarioPayload sc_payload)` Updates target scenario with target payload.

Methods inherited from class lbg.simulator.tools.generator.ScenarioSetGenerator
`generateBucketJDF, generateJDF, generateScenariiBuckets, generateScenario, generateScenarioFileName, run, storeScenario`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### PolicyEnumerator

    public PolicyEnumerator(java.lang.String[] args)
                     throws GridException

Throws:
  `GridException`

Method Detail

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### getExpectedScenariiCount

    public int getExpectedScenariiCount()

  Specified by:
    `getExpectedScenariiCount` in class `ScenarioSetGenerator`

### getGeneratedScenariiCount

    public int getGeneratedScenariiCount()

  Specified by:
    `getGeneratedScenariiCount` in class `ScenarioSetGenerator`

### getJDFWriterFactory

    public JDFWriterFactory getJDFWriterFactory()

  Specified by:
    `getJDFWriterFactory` in class `ScenarioSetGenerator`

### getBaseScenario

    public Scenario getBaseScenario()

  Specified by:
    `getBaseScenario` in class `ScenarioSetGenerator`

### getScenarioCompleteFileName

    public java.lang.String getScenarioCompleteFileName()

  Specified by:
    `getScenarioCompleteFileName` in class `ScenarioSetGenerator`

### getScenarioFileName

    public java.lang.String getScenarioFileName()

  Specified by:
    `getScenarioFileName` in class `ScenarioSetGenerator`

### getScenarioBaseName

    public java.lang.String getScenarioBaseName()

  Specified by:
    `getScenarioBaseName` in class `ScenarioSetGenerator`

### getJarCompleteFileName

    public java.lang.String getJarCompleteFileName()

  Specified by:
    `getJarCompleteFileName` in class `ScenarioSetGenerator`

### getBucketCount

    public int getBucketCount()

  Specified by:
    `getBucketCount` in class `ScenarioSetGenerator`

### getMainClass

    public java.lang.String getMainClass()

  Specified by:
    `getMainClass` in class `ScenarioSetGenerator`

### getGeneratedScenariiFileNames

    public java.util.Set<java.lang.String> getGeneratedScenariiFileNames()

  Specified by:
    `getGeneratedScenariiFileNames` in class `ScenarioSetGenerator`

### checkArgs

    public void checkArgs(java.lang.String[] args)
                   throws GridException

  Specified by:
    `checkArgs` in class `ScenarioSetGenerator`
  Throws:
    `GridException`

### generateScenarios

    public void generateScenarios()
                           throws GridException

  Description copied from class: `ScenarioSetGenerator`
  Enumerates scenarios. For each scenario, calls generateScenario() and passes the scenario index and payload.

  Specified by:
    `generateScenarios` in class `ScenarioSetGenerator`
  Throws:
    `GridException`

### updateScenario

    protected void updateScenario(Scenario sc,
                                  ScenarioPayload sc_payload)
                           throws GridException

  Description copied from class: `ScenarioSetGenerator`
  Updates target scenario with target payload. For maximum efficiency, should not be synchronized.

  Specified by:
    `updateScenario` in class `ScenarioSetGenerator`
  Throws:
    `GridException`

### main

    public static void main(java.lang.String[] args)

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

> Copyright (c) 2005-2008, Cyril Briquet, parts Xavier Dalem.