<html><head><base href="x-msg://274/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Michael,<div><br></div><div>The problem seems that a sum expression can only be combined with an addition or subtraction. Unfortunately I haven't described this fact in the manual. I'll changed it in the manual of the next release (together with a more understandable explanation for a set complement … some parts of the manual are a bit cryptic). </div><div><br></div><div>A formulation that should work looks like hat:</div><div>sum{ t in T, s in S : I_ts[t,s] * c_s[s] * m_ts[t,s] - sum{ t in T, s in S , r in R, k in K : I[t,s] * c_s[s] * w_rtk[r,t,k] * x_rtk[r,t,k] } }</div><div><br></div><div>I hope this expression is correct. I can't test it w/o the entire model. </div><div><br></div><div>Thanks,</div><div><br></div><div>Mike</div><div><br><div><div>Am 17.09.2013 um 16:57 schrieb Michael Bond:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr" tabindex="0" id=""><div name="divtagdefaultwrapper" id="divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Ok, tried the following and am getting a different error, 'unexpected SUM':<div><br></div><div>sum{ t in T, s in S : I_ts[t,s] * c_s[s] * m_ts[t,s] - I[t,s] * c_s[s] * sum{ r in R, k in K : w_rtk[r,t,k] * x_rtk[r,t,k] } }</div><div><br></div><div>I assume it's the same basic problem?</div><div><br></div><div>Also, two minor enhancements that would make debugging easier. First, having position within the line though that may be difficult. The other would be to include the actual symbol encountered for the SYMBOL_UNDEF error. I'm willing to put a patch together later if nobody else gets to it, just need to get this current project done first.</div><div><br><div dir="auto" style="color: rgb(40, 40, 40); "><hr tabindex="-1" style="display: inline-block; width: 699px; "><div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size: 11pt; "><b>From:</b><span class="Apple-converted-space"> </span>Mike Steglich <<a href="mailto:mike.steglich@th-wildau.de">mike.steglich@th-wildau.de</a>><br><b>Sent:</b><span class="Apple-converted-space"> </span>Monday, September 16, 2013 4:29 PM<br><b>To:</b><span class="Apple-converted-space"> </span>Michael Bond<br><b>Cc:</b><span class="Apple-converted-space"> </span><a href="mailto:cmpl@list.coin-or.org">cmpl@list.coin-or.org</a><br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [Cmpl] Yet another probably basic question</font><div> </div></div><div><div>Unfortunately it is not permitted to put variables in brackets. We change that ... but in the meantime you have to reformulate your objective function into two terms.</div><div><br>Am 16.09.2013 um 22:05 schrieb Michael Bond <<a href="mailto:mbond@videologygroup.com">mbond@videologygroup.com</a>>:<br><br></div><blockquote type="cite"><div><div name="divtagdefaultwrapper" id="divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Is it possible to implement the following as part of an objective and if so how would I represent it, removing the '-' at the beginning of course:<div><br></div><div><p style="margin-top: 0px; margin-bottom: 0px; "></p><f1a239245606221533d0dcba643f0f89.png><p style="margin-top: 0px; margin-bottom: 0px; "></p><br><div style="margin-top: 0px; margin-bottom: 0px; ">I tried the following and was getting an 'unexpected SYMBOL_VAR' error:</div><div style="margin-top: 0px; margin-bottom: 0px; "><br></div><div style="margin-top: 0px; margin-bottom: 0px; ">sum{ t in T, s in S : I[t,s] * c[s] * (m[t,s] - sum{ r in R, k in K : w[r,t,k] * x[r,t,k] })}</div><div style="margin-top: 0px; margin-bottom: 0px; "><br></div><div style="margin-top: 0px; margin-bottom: 0px; ">In the function x[r,t,k] is a variable, everything else is a parameter.</div></div></div><b>This email is intended only for the use of the individual(s) to whom it is addressed. If you have received this communication in error, please immediately notify the sender and delete the original email.</b></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Cmpl mailing list</span><br><span><a href="mailto:Cmpl@list.coin-or.org">Cmpl@list.coin-or.org</a></span><br><span><a href="http://list.coin-or.org/mailman/listinfo/cmpl">http://list.coin-or.org/mailman/listinfo/cmpl</a></span></div></blockquote></div></div></div></div><b>This email is intended only for the use of the individual(s) to whom it is addressed. If you have received this communication in error, please immediately notify the sender and delete the original email.</b>_______________________________________________<br>Cmpl mailing list<br><a href="mailto:Cmpl@list.coin-or.org">Cmpl@list.coin-or.org</a><br><a href="http://list.coin-or.org/mailman/listinfo/cmpl">http://list.coin-or.org/mailman/listinfo/cmpl</a></div></blockquote></div><br></div></body></html>