FMU/Source/Model_Lights.cpp
// computing the inside illuminance according
// as a sum of all walls' contributions //
// Dont have this figure
// float Lumint = pZone->getTotalInternalIlluminance0();
computing the inside illuminance according
as a sum of all walls' contributions
Dont have this figure
float Lumint = pZone->getTotalInternalIlluminance0().
computing the inside illuminance according as a sum of all walls ' contributions Dont have this figure float Lumint = pZone - > getTotalInternalIlluminance0 () .
bool Model_Lights::arrival(bool state, double Lumint) {
    float a01arr = -0.0175;
    float b01arr = -4.0835;
    float c01arr = 1.0361;
    float m01arr = 1.8223;
    bool currentLightState = state;
    if (!state) {
        float probonarr;  
        float log10lumint = 0;
        if (Lumint > 0) {
            log10lumint = std::log10(Lumint);
        }
        if (log10lumint <= 0.843f) {
            probonarr = 1.f;
        } else if (log10lumint >= 2.818f) {
            probonarr = 0.f;
        } else {
            float log10lumintm01arr = 0;
            if (Lumint - m01arr > 0) {
                log10lumintm01arr = log10(Lumint - m01arr);
            }
            probonarr = a01arr + c01arr /
                          (1.f + exp(-b01arr * (log10lumintm01arr)));
        }
        if (Utility::randomDouble(0.0, 1.0) < probonarr) {
            currentLightState = 1.f;
        } else {
            currentLightState = 0.f;
        }
    }
    return currentLightState;
}
bool Model_Lights :: arrival ( bool state , double Lumint ) { float a01arr = -0.0175 ; float b01arr = -4.0835 ; float c01arr = 1.0361 ; float m01arr = 1.8223 ; bool currentLightState = state ; if ( ! state ) { float probonarr ; float log10lumint = 0 ; if ( Lumint > 0 ) { log10lumint = std :: log10 ( Lumint ) ; } if ( log10lumint <= 0.843f ) { probonarr = 1.f ; } else if ( log10lumint >= 2.818f ) { probonarr = 0.f ; } else { float log10lumintm01arr = 0 ; if ( Lumint - m01arr > 0 ) { log10lumintm01arr = log10 ( Lumint - m01arr ) ; } probonarr = a01arr + c01arr / ( 1.f + exp ( - b01arr * ( log10lumintm01arr ) ) ) ; } if ( Utility :: randomDouble ( 0.0 , 1.0 ) < probonarr ) { currentLightState = 1.f ; } else { currentLightState = 0.f ; } } return currentLightState ; }
computing the inside illuminance according
as a sum of all walls' contributions
Dont have this figure
float Lumint = pZone->getTotalInternalIlluminance0();
computing the inside illuminance according as a sum of all walls ' contributions Dont have this figure float Lumint = pZone - > getTotalInternalIlluminance0 () ;
// Hunt D R G, 1980. Predicting artificial lighting use a method based upon observed patterns of behavior. Lighting Research & Technology 12[1], 7-14. // --- 2a. If the light is already off when occupant arrives ---------- //  hunt 1980 model // usage of the probability to define the lights state