"org/drools/spring/examples/jiahvac/control/hvac.appctx.xml");
final WorkingMemory workingMemory =
(WorkingMemory) applicationContext.getBean("workingMemory");
final Simulator simulator =
(Simulator) applicationContext.getBean("simulator");
final TempuratureControl control =
(TempuratureControl) applicationContext.getBean("tempuratureControl");
workingMemory.assertObject(control);
for (Floor floor : simulator.getFloors()) {
workingMemory.assertObject(floor.getThermometer(), true);
workingMemory.assertObject(floor.getVent(), true);
}
for (HeatPump pump : simulator.getHeatPumps()) {
workingMemory.assertObject(pump, true);
}
System.out.println("---- begin initial fireAllRules");
workingMemory.fireAllRules();
System.out.println("---- end initial fireAllRules");