/
MoleSimulationLoader.java
54 lines (46 loc) · 1.76 KB
/
MoleSimulationLoader.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*********************************************************************************************
*
*
* 'MoleSimulationLoader.java', in plugin 'msi.gama.headless', is part of the source code of the GAMA modeling and
* simulation platform. (v. 1.8.1)
*
* (c) 2007-2020 UMI 209 UMMISCO IRD/UPMC & Partners
*
* Visit https://github.com/gama-platform/gama for license information and developers contact.
*
*
**********************************************************************************************/
package msi.gama.headless.openmole;
import java.io.File;
import java.io.IOException;
import java.util.List;
import msi.gama.headless.core.GamaHeadlessException;
import msi.gama.headless.core.HeadlessSimulationLoader;
import msi.gama.kernel.model.IModel;
import msi.gama.precompiler.GamlProperties;
import msi.gaml.compilation.GamlCompilationError;
public abstract class MoleSimulationLoader {
/**
*
* @param modelPath
* @return a compiled model
* @throws IOException
* @throws GamaHeadlessException
* @deprecated use loadModel(File, List<GamlCompilationError>) instead
*/
@Deprecated
public static IModel loadModel(final File modelPath) throws IOException, GamaHeadlessException {
return loadModel(modelPath, null);
}
public static IModel loadModel(final File modelPath, final List<GamlCompilationError> errors)
throws IOException, GamaHeadlessException {
return loadModel(modelPath, errors, null);
}
public static IModel loadModel(final File modelPath, final List<GamlCompilationError> errors,
final GamlProperties metadata) throws IOException, GamaHeadlessException {
return HeadlessSimulationLoader.loadModel(modelPath, errors, metadata);
}
public static IMoleExperiment newExperiment(final IModel model) {
return new MoleExperiment(model);
}
}