Created
June 22, 2018 09:22
-
-
Save Sultan91/37bf661c11a8f4d89499dcf9fe2b4ab4 to your computer and use it in GitHub Desktop.
Reward function that aimed to save power and stay within temperature limits
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [ err ] = rewardFunc_test( setpointT, actualT, power, constraint) | |
low = constraint(1); | |
high = constraint(2); | |
if (actualT>low & actualT<high) | |
err = -(abs(setpointT - actualT))^2 - power/100; | |
else | |
err = -(abs(setpointT - actualT))^2 -1000- power/100; | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment