jMetalSP icon indicating copy to clipboard operation
jMetalSP copied to clipboard

Possible to have more than one streaming datasource?

Open bronzels opened this issue 4 years ago • 1 comments

Dear jMetalSP commiters,

as optimization with large dataset usually takes long time, your streaming idea to add new data is brilliant to me. but my problem to resolve involves 2 kinds of data which is difficult to put into one class. as titles, any way to have more than one streaming datasource?

bronzels avatar Jun 19 '21 06:06 bronzels

Of course, you can have more than one streaming datasource. You only need to add as observable the same problem. I mean, more than one streaming datasource can change the same problem, because our methods are synchronized . For example, for the TSP problem,you can add more than one streaming data source:

application.setStreamingRuntime(new SparkRuntime(10, sparkConf)) .setProblem(problem) .setAlgorithm(algorithm) .addStreamingDataSource(streamingTSPSource,problem) .addStreamingDataSource(streamingTSPSource2,problem) .addStreamingDataSource(streamingTSPSource3,problem) .addAlgorithmDataConsumer(localDirectoryOutputConsumer) .addAlgorithmDataConsumer(chartConsumer) .run();

cbarba avatar Jun 22 '21 15:06 cbarba