<commit_before>package v2.simulators;

import v2.core.Destination;
import v2.core.Engine;
import v2.core.Topology;
import v2.io.reporters.Reporter;
import v2.main.Parameters;

public abstract class Setup {

    protected final Engine engine;
    protected final Topology topology;
    protected final Destination destination;

    public Setup(Engine engine, Topology topology, Destination destination) {
        this.engine = engine;
        this.topology = topology;
        this.destination = destination;
    }

    public abstract DataCollector getDataCollector();

    public abstract void setup();

    public abstract void start();

    public abstract void cleanup();

    public abstract void report(Reporter reporter, Parameters parameters);

}
<commit_msg>Added documentation to "Setup" Implemented the start() method<commit_after>package v2.simulators;

import v2.core.Destination;
import v2.core.Engine;
import v2.core.Topology;
import v2.io.reporters.Reporter;
import v2.main.Parameters;

/**
 * A simulation setup defines the behaviour of the simulation.
 */
public abstract class Setup {

    protected final Engine engine;
    protected final Topology topology;
    protected final Destination destination;

    /**
     * Initializes a setup with the global requisites: an engine, topology, and destination.
     *
     * @param engine        engine to simulate with.
     * @param topology      topology to simulate.
     * @param destination   destination to simulate for.
     */
    public Setup(Engine engine, Topology topology, Destination destination) {
        this.engine = engine;
        this.topology = topology;
        this.destination = destination;
    }

    /**
     * Returns the data collector used to collect simulation data.
     *
     * @return the data collector used to collect simulation data.
     */
    public abstract DataCollector getDataCollector();

    /**
     * (Template Method)
     *
     * Called before starting each simulation. Subclasses should use this method to implement any necessary
     * initial setup before the simulation starts.
     */
    public abstract void setup();

    /**
     * Starts the simulation.
     */
    public final void start() {
        engine.simulate(topology, destination);
    }

    /**
     * (Template Method)
     *
     * Called after finishing a simulation instance. Subclasses should use this method to implement any
     * necessary final cleanup after the simulation finishes.
     */
    public abstract void cleanup();

    /**
     * Reports the setup parameters. (Visit method of a visitor pattern)
     *
     * @param reporter      reporter used to report (Visitor)
     * @param parameters    parameters of the simulator.
     */
    public abstract void report(Reporter reporter, Parameters parameters);

}

{'fraction_non_alphanumeric': 0.07512402551381998, 'fraction_numerical': 0.004252303330970942, 'mean_word_length': 2.9262865090403336, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6060543', 'n_tokens_mistral': 724, 'n_tokens_neox': 688, 'n_words': 264}