Skip to content
Snippets Groups Projects
Commit f227da9b authored by Bart Arendarczyk's avatar Bart Arendarczyk
Browse files

Initial trade set at the start rather than 2nd timestep.

parent 0b0a9ac6
No related branches found
No related tags found
No related merge requests found
......@@ -99,6 +99,10 @@ public class ModelMain {
private void doTimestep(Timestep timestep) {
LogWriter.println("Timestep: " + timestep.toString());
if (ModelConfig.IS_CALIBRATION_RUN && timestep.isInitialTimestep()) { // initialize trade and production
internationalMarket.determineInternationalTrade(countryAgents.getAll(), timestep);
}
yieldSurfaces = getYieldSurfaces(timestep); // this will wait for the marker file from LPJ if configured to do so
getUpdateIrrigationData(timestep); // updating currentIrrigationData
......
......@@ -39,7 +39,7 @@ public class GlobalPrice implements Serializable {
public static GlobalPrice createInitial(double exportPrice, double intitalStock) {
return new GlobalPrice(new Timestep(ModelConfig.START_TIMESTEP-1), exportPrice, intitalStock, Double.NaN,
Double.NaN, Double.NaN, Double.NaN, Double.NaN, 0.0, intitalStock / 0.1);
Double.NaN, Double.NaN, Double.NaN, Double.NaN, 0.0, Double.NaN);
}
public double getExportPrice(){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment