class UcteNode implements UcteRecord, Comparable<UcteNode> {

    public boolean isGenerator() {
        // we consider there is a generator connected to the node if
        //   - node is regulating voltage
        //   - or active power generation is defined and non null
        //   - or reactive power generation is defined and non null
        //   - or active limits are both defined (min and max), one is non null and there are not equal
        //   - or reactive limits are both defined (min and max), one is non null and there are not equal
        return isRegulatingVoltage()
                || (!Float.isNaN(activePowerGeneration) && activePowerGeneration != 0)
                || (!Float.isNaN(reactivePowerGeneration) && reactivePowerGeneration != 0)
                || (!Float.isNaN(minimumPermissibleActivePowerGeneration)
                    && !Float.isNaN(maximumPermissibleActivePowerGeneration)
                    && (minimumPermissibleActivePowerGeneration != 0 || maximumPermissibleActivePowerGeneration != 0)
                    && minimumPermissibleActivePowerGeneration != maximumPermissibleActivePowerGeneration)
                || (!Float.isNaN(minimumPermissibleReactivePowerGeneration)
                    && !Float.isNaN(maximumPermissibleReactivePowerGeneration)
                    && (minimumPermissibleReactivePowerGeneration != 0 || maximumPermissibleReactivePowerGeneration != 0)
                    && minimumPermissibleReactivePowerGeneration != maximumPermissibleReactivePowerGeneration);
    }

    public  UcteNode(UcteNodeCode code, String geographicalName, UcteNodeStatus status, UcteNodeTypeCode typeCode,
                    float voltageReference, float activeLoad, float reactiveLoad, float activePowerGeneration,
                    float reactivePowerGeneration, float minimumPermissibleActivePowerGeneration,
                    float maximumPermissibleActivePowerGeneration, float minimumPermissibleReactivePowerGeneration,
                    float maximumPermissibleReactivePowerGeneration, float staticOfPrimaryControl,
                    float nominalPowerPrimaryControl, float threePhaseShortCircuitPower, float xrRatio,
                    UctePowerPlantType powerPlantType);

}