出于某种原因,当我使用@ScheduledMethod时,我的方法不会被调用。不知道什么是错误的,因为我以前用过它,一切都很好。重现symphony @ScheduleMethod问题
下面是代码:
import repast.simphony.engine.schedule.ScheduledMethod;
public class WindGen {
private double power;
@ScheduledMethod(start = 1, interval = 1, priority = 2)
private void generatePower() {
int t = SystemOperator.getT();
power = 20 * Math.sin(Math.toRadians(t * 360/48) + 30);
}
public double getPower() {
return power;
}
}
在此先感谢, 迪娜。