[Cmpl] Yet another probably basic question

Mike Steglich mike.steglich at th-wildau.de
Tue Sep 17 11:25:45 EDT 2013


Hi Michael,

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). 

A formulation that should work looks like hat:
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] } }

I hope this expression is correct. I can't test it w/o the entire model. 

Thanks,

Mike

Am 17.09.2013 um 16:57 schrieb Michael Bond:

> Ok, tried the following and am getting a different error, 'unexpected SUM':
> 
> 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] } }
> 
> I assume it's the same basic problem?
> 
> 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.
> 
> From: Mike Steglich <mike.steglich at th-wildau.de>
> Sent: Monday, September 16, 2013 4:29 PM
> To: Michael Bond
> Cc: cmpl at list.coin-or.org
> Subject: Re: [Cmpl] Yet another probably basic question
>  
> 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.
> 
> Am 16.09.2013 um 22:05 schrieb Michael Bond <mbond at videologygroup.com>:
> 
>> 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:
>> 
>> <f1a239245606221533d0dcba643f0f89.png>
>> 
>> I tried the following and was getting an 'unexpected SYMBOL_VAR' error:
>> 
>> 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] })}
>> 
>> In the function x[r,t,k] is a variable, everything else is a parameter.
>> 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.
>> _______________________________________________
>> Cmpl mailing list
>> Cmpl at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/cmpl
> 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._______________________________________________
> Cmpl mailing list
> Cmpl at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cmpl

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cmpl/attachments/20130917/ba2992f3/attachment.html>


More information about the Cmpl mailing list