123456789101112131415161718192021222324252627282930 |
- package ui.controller;
- public class HolonObject extends CpsObject {
-
- /*Array of all consumers*/
- HolonElement[] consumers;
- /*Array of all producers*/
- HolonElement[] producers;
- /*Total of consumption*/
- float currentEnergy;
- /**
- * State of the building:
- * 0 = fully supplied (currentEnergy == 0)
- * 1 = not enough energy (currentEnergy > 0)
- * 2 = oversupplied (currentEnergy < 0)
- */
- int state;
-
- /**
- * Constructor
- * Set by default the name of the object equals to the category name, until the user changes it.
- */
- public HolonObject() {
- super.setObjName("House");
- super.name = super.getObjName();
- System.out.println("You create a " + super.objName + " with ID " + super.ID);
- System.out.println("It's actual name is: " + super.name);
- }
-
- }
|