Commit 1f4ec9fb authored by Loris Croce's avatar Loris Croce
Browse files

update todos

parent 9152b445
Pipeline #37899 canceled with stages
......@@ -144,7 +144,6 @@ public class Simulator {
patch.setFarmSimple(farmer.getFarm());
}
}
//TODO init params and dynamics if from xml
this.dynamicsList = parameters.getDynamics();
for (Dynamics dynamics : dynamicsList) {
dynamics.setTimeStamp(timestamp);
......@@ -167,7 +166,6 @@ public class Simulator {
public static Simulator loadSimulator(InputStream input) throws FileNotFoundException {
XStream xstream = createXstream();
final Simulator simulator = (Simulator) xstream.fromXML(input);
// TODO load parameters
simulator.parameters = (Parameters) xstream.fromXML(new FileInputStream(simulator.paramsPath));
simulator.initIgnoredFields();
return simulator;
......
......@@ -10,7 +10,6 @@ public abstract class Dynamics {
protected transient DynamicsLogger logger;
protected String timeStamp = "timestamp";
//todo add parameter file but careful init or xstream config
protected String configPath;
public abstract void process(SimulationContext context, List<GeoArea> geoAreas, List<Farmer> farmers, Flow global,
......
......@@ -19,7 +19,6 @@ public class ProductionDynamics extends Dynamics {
@Override
public void process(SimulationContext context, List<GeoArea> geoAreas, List<Farmer> farmers, Flow global,
Parameters parameters, TimeUnit timeUnit) {
//TODO fix minimal.xml logs appearing in simulator.xml
for (Farmer farmer : farmers) {
produced.addStock(farmer.getFarm().produce());
logger.logQuantities(context.getTimestep(), farmer.getFarm().getGeoArea(), produced,
......
......@@ -203,8 +203,6 @@ public class SimulatorMinimalTest {
//@Test
public void createProductList() throws IOException {
//TODO replace by xstream Map<Product, Map<Product, Double>>
XStream xStream = new XStream();
xStream.addPermission(NoTypePermission.NONE);
xStream.allowTypesByRegExp(new String[]{".*"});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment