The Complete Sampling

Basics

The complete sampling consists in providing an exhaustive combination of all the values taken by a set of Prototypes. The number of considered Prototypes is not limited. However the combinatorics increases dramatically with the number of Prototypes and the number of considered values for each of them.

For instance, let us consider 3 Prototypes p1, p2, p3, defined respectively on intervals [1 ; 4], [1 ; 2], [1 ; 3] and with a sampling step of 1 for each of them. The Complete Sampling will generate 24 samplings as follow :

(1,1,1) (1,1,2) (1,1,3)
(1,2,1) (1,2,2) (1,2,3)
(2,1,1) (2,1,2) (2,1,3)
(2,2,1) (2,2,2) (2,2,3)
(3,1,1) (3,1,2) (3,1,3)
(3,2,1) (3,2,2) (3,2,3)
(4,1,1) (4,1,2) (4,1,3)
(4,2,1) (4,2,2) (4,2,3)

Creation

In OpenMOLE, a Complete Sampling will provide the full combinatory of The Domains and / or The Samplings it takes as input.

> Right click on the Sampling Composition area, select Add Sampling and then Complete in the Sampling panel that shows up.
completeSampling
>  Then, the only thing to do is to provide it with the Domains and/or Samplings to be combined in the Complete Sampling. To do so, create Domains and/or Samplings and connect them to the Complete Sampling (Shift + drag from the source domain to the Complete Sampling).completeSamplingScene

Example

Let’s take the previous Composition as example: we combine

  • a Range of 6 Double from 0 to 5 and
  • values read from the first column – called param1 – of a CSV file (containing two rows):
param1,param2
2,2.3
7,52.5

> create first two Prototypes of type Double and Integer named p1 and p2.
> add a Complete Sampling on the Sampling Composition Scene
> add a Domain on the Scene, click on it an select a Range taking its values from 0 to 5rangeDomain0to5> add a CSV Sampling mapping the param1 column to the p2 Prototype csvSamplingExample
> create an Exploration Task and select the previously built SamplingexplorationTaskExample
> add the Exploration Task on a Scene
> add a Display Hook on itaddHookExample
> the Mole (of only one Task !) is now ready to be run : press the build Button
> the execution shows up in a new tab. Set the Hook to see the Prototypes p1 and p2.
hooksExample
> Switch to the Execution progress view and press the play button
startButton
> the Mole is run and you can see the following output :
{p1=[0.0, 0.0, 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0], p2=[2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7]}