partage
Class RandomComplexInstanceGenerator

java.lang.Object
  extended by partage.RandomComplexInstanceGenerator

public class RandomComplexInstanceGenerator
extends java.lang.Object

This class generates a random instance of the resource allocation problem with logical constraints and preferences.

Version:
July 07
Author:
Sylvain Bouveret

Nested Class Summary
static class RandomComplexInstanceGenerator.ExclusiveBundleConstraintsParameters
          A nested class for customizing the parameters for the constraints concerning exclusive bundles.
static class RandomComplexInstanceGenerator.ParticularConstraintsParameters
          A nested class for customizing the parameters for the particular constraints, forbidding a particular object to a particular agent.
static class RandomComplexInstanceGenerator.PreferencesParameters
          A nested class for customizing the parameters for the agents' preferences.
 
Field Summary
 RandomComplexInstanceGenerator.ExclusiveBundleConstraintsParameters bundle
          The attribute concerning the parameters for generating the exclusion constraints.
 boolean hasPreemptionConstraint
          true if and only if the preemption constraint must be present in the generated problem (default is true).
 int nA
          The number of agents of the problem to be generated.
 int nO
          The number of objects of the problem to be generated.
 RandomComplexInstanceGenerator.ParticularConstraintsParameters particular
          The attribute concerning the parameters for generating the particular constraints.
 RandomComplexInstanceGenerator.PreferencesParameters prefs
          The attribute concerning the parameters for generating the preferences.
 long seed
          The seed of the random instance generator.
 
Constructor Summary
RandomComplexInstanceGenerator(int _nA, int _nO)
          Instantiates a new RandomComplexInstanceGenerator by only specifying the number of agents, and the number of objects.
RandomComplexInstanceGenerator(int _nA, int _nO, long _seed)
          Instantiates a new RandomComplexInstanceGenerator by only specifying the number of agents, the number of objects and the seed.
RandomComplexInstanceGenerator(int _nA, int _nO, RandomComplexInstanceGenerator.ParticularConstraintsParameters _particular, RandomComplexInstanceGenerator.ExclusiveBundleConstraintsParameters _bundle, RandomComplexInstanceGenerator.PreferencesParameters _prefs, long _seed)
          Instantiates a new RandomComplexInstanceGenerator by completely specifying the parameters of the instance.
 
Method Summary
 ComplexInstance generate()
          This method generates an instance of the allocation problem with complex preferences and constraints.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nA

public int nA
The number of agents of the problem to be generated.


nO

public int nO
The number of objects of the problem to be generated.


hasPreemptionConstraint

public boolean hasPreemptionConstraint
true if and only if the preemption constraint must be present in the generated problem (default is true).


particular

public RandomComplexInstanceGenerator.ParticularConstraintsParameters particular
The attribute concerning the parameters for generating the particular constraints.


bundle

public RandomComplexInstanceGenerator.ExclusiveBundleConstraintsParameters bundle
The attribute concerning the parameters for generating the exclusion constraints.


prefs

public RandomComplexInstanceGenerator.PreferencesParameters prefs
The attribute concerning the parameters for generating the preferences.


seed

public long seed
The seed of the random instance generator.

Constructor Detail

RandomComplexInstanceGenerator

public RandomComplexInstanceGenerator(int _nA,
                                      int _nO,
                                      RandomComplexInstanceGenerator.ParticularConstraintsParameters _particular,
                                      RandomComplexInstanceGenerator.ExclusiveBundleConstraintsParameters _bundle,
                                      RandomComplexInstanceGenerator.PreferencesParameters _prefs,
                                      long _seed)
Instantiates a new RandomComplexInstanceGenerator by completely specifying the parameters of the instance.

Parameters:
_nA - The number of agents.
_nO - The number of objects.
_particular - The parameters of the particular constraints.
_bundle - The parameters of the exclusive bundle constraints.
_prefs - The parameters of the agents' preferences.
_seed - The seed of the random number generator.

RandomComplexInstanceGenerator

public RandomComplexInstanceGenerator(int _nA,
                                      int _nO,
                                      long _seed)
Instantiates a new RandomComplexInstanceGenerator by only specifying the number of agents, the number of objects and the seed.
The parameters are set to the following values :

Parameters:
_nA - The number of agents.
_nO - The number of objects.
_seed - The seed of the random number generator.

RandomComplexInstanceGenerator

public RandomComplexInstanceGenerator(int _nA,
                                      int _nO)
Instantiates a new RandomComplexInstanceGenerator by only specifying the number of agents, and the number of objects. The parameters are set to their defaults (see the other constructor), and the seed is set to the current time.

Parameters:
_nA - The number of agents.
_nO - The number of objects.
Method Detail

generate

public ComplexInstance generate()
This method generates an instance of the allocation problem with complex preferences and constraints.

Returns:
An instance of ComplexInstance generated according to the generator's parameters set.