/** * Saves state of EvCustomer instances */ @Override public void saveBootstrapState () { service.getServerConfiguration().saveBootstrapState(evCustomers); }
@Override public void saveBootstrapState () { serverConfig.saveBootstrapState(models); for (AbstractCustomer model : models) { // some models have to save local state model.saveBootstrapState(); } }
/** * Saves coefficients for the current timeslot in the form needed for * configuration at the start of the sim session, then adds them to the * bootstrap state. */ public void saveBootstrapState (ServerConfiguration serverConfig) { int horizon = timeslotCoefficients.length; int index = (timeslotRepo.currentSerialNumber() - ringOffset) % horizon; ArrayList<String> newCoeff = new ArrayList<String>(); for (Double coeff : timeslotCoefficients[index]) { newCoeff.add(coeff.toString()); } coefficients = newCoeff; serverConfig.saveBootstrapState(this); }