Brian,<div><br></div><div>Thanks for the feedback. Yes, it does always penalize. The past few days I have been trying to use the turnover objective as a maximum allowable turnover and only penalize if turnover > objective$max, but I was getting results I was not expecting... it seemed to penalize even if the target value was greater than the calculated value. I'll test this a few different ways to try to get it working</div>
<div><br></div><div>Thanks,</div><div>Ross</div><div><br><div class="gmail_quote">On Fri, Jun 28, 2013 at 1:05 PM, Brian G. Peterson <span dir="ltr"><<a href="mailto:brian@braverock.com" target="_blank">brian@braverock.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I saw commit r2463, and I thought I'd comment that something looks off.<br>
<br>
right now, with targets on objectives, we're trying to get as close to the target as possible.<br>
<br>
With min/max ranges for objectives, I think we would penalize if and only if the objective is outside the min or the max.<br>
<br>
if (!is.null(objective$min) & !is.null(objective$max)){<br>
# we have a min and max<br>
out = out + penalty * objective$multiplier *<br>
((tmp_measure - objective$max) + (objective$min - tmp_measure))<br>
}<br>
<br>
This code seems to always penalize.<br>
<br>
I haven't run it, so I may be reading it wrong, but it seems that supporting this would require you to first test for being outside the range, and *then* penalize the objective if and only if outside the range.<br>
<br>
Regards,<br>
<br>
Brian<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Brian G. Peterson<br>
<a href="http://braverock.com/brian/" target="_blank">http://braverock.com/brian/</a><br>
Ph: <a href="tel:773-459-4973" value="+17734594973" target="_blank">773-459-4973</a><br>
IM: bgpbraverock<br>
______________________________<u></u>_________________<br>
GSoC-PortA mailing list<br>
<a href="mailto:GSoC-PortA@lists.r-forge.r-project.org" target="_blank">GSoC-PortA@lists.r-forge.r-<u></u>project.org</a><br>
<a href="http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta" target="_blank">http://lists.r-forge.r-<u></u>project.org/cgi-bin/mailman/<u></u>listinfo/gsoc-porta</a><br>
</font></span></blockquote></div><br></div>