For thermal comfort monitoring, I am working on a work flow in Dynamo. Now I am in the step that I must define the conditions (Relative Humidity and Temperature of each room). First I used the script written by @jacob.small for the following condition as shown in the attached image:
Relative Humidity -------- Acceptable Operating Temperature
If 30% -----------------------------------------24.8-28
If 60% -----------------------------------------23-25.5
rooms.GetParameterValueByName(
"Humidity"
);
Temp =
rooms.GetParameterValueByName(
"Temperature"
);
RH30Min = 24.8;
RH30Max = 28;
RH60Min = 23;
RH60Max = 25.5;
//then do some logic work
CalculatedWorkingRange =
RH == 60?
//is the temp less than the max?
Temp<RH60Min?
"Also Too Cold!":
//if not is the temp over the max?
Temp>RH60Max?
"Also Too Hot!":
//if so than the temp is good
"Also Just Right!":
// but if the RH was neither 60 nor 30...
"Your condensation is showing";
//if the RH is 30
RH == 30?
//is the temp less than the min?
Temp < RH30Min?
"Too Cold!":
//if not is the temp over the max?
Temp > RH30Max?
"Too Hot!":
//if not the temp is good
"Just Right!":
//and set my parameter value with my result
rooms.SetParameterByName(
"Working Range Check",
CalculatedWorkingRange
);
Now I am going to modify this script based on the new conditions as shown in the following table:
Could you please help me to modify this script? Thank u so much in advance
Thanks. As you see in the attached table, the new condition statements have been changed.
The previous condition was when RH=30% then the temperature should be between 24.5-28, and when the RH=60%, then the temperature should be between 23-25.5
Now I want to say if the 30=<RH<60, then the temperature should be between 24.5-28, and when the 60=<RH<70, then the temperature should be between 23-25.5 .
So instead of (==) in the first condition, I am going to use (=< <) in the new condition
@MOJTABA256 If the parameter value of Acceptable Operating Temperature is text indicating the range, then … aot = rh>=30 && rh<60 ? "24.5 - 28°C" : (rh>=60 && rh<70 ? "23 - 25.5°C" : "23 - 28°C");
Thank you so much dear @awilliams , @Vikram_Subbaiah and @Yna_Db for your response.
I modified my script and finally it worked. Then I tried to color coding my rooms based on “Working Range Check” parameter. I want to highlight the room in red color when “Working Range Check” is hot and also too hot, and in blue when “Working Range Check” is too cold and also too cold, and in yellow when “Working Range Check” parameter is unaccepted humidity. I tried to do it by writing a script but unfortunately it doesn’t work. I attached it here. Could you please look at my script and tell me where the problem is? Thank you