[Cmpl] Yet another probably basic question

Michael Bond mbond at videologygroup.com
Wed Sep 18 11:11:46 EDT 2013


I assume 'parameters:' should have been 'constraints:'. That seems to work, thank you.

________________________________________
From: Mike Steglich <mike.steglich at th-wildau.de>
Sent: Wednesday, September 18, 2013 8:41 AM
To: Michael Bond
Cc: cmpl at list.coin-or.org
Subject: Re: [Cmpl] Yet another probably basic question

This Cmpl error is correct because an isolated parameter in an objective function doesn't have an impact on the solution. But to calculate the correct value you can formulate  your objective function as a equality constraint with a variable that is used as objective function …

e.g.:

variables:
        theValue : real;
objectives:
        theValue ->max;
parameters:
        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] } = theValue;



Am 18.09.2013 um 14:13 schrieb Michael Bond:

> This leads to the problem that the first sum{} does not have a variable which then produces the error 'Objective function is not well formed - Contains a constant parameter, which is ignored.'.
>
> ________________________________________
> From: Mike Steglich <mike.steglich at th-wildau.de>
> Sent: Tuesday, September 17, 2013 11:29 AM
> To: Mike Steglich
> Cc: Michael Bond; cmpl at list.coin-or.org
> Subject: Re: [Cmpl] Yet another probably basic question
>
> Sorry … there were a mistake with a }
>
> The correct expression should be:
> 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] }
>
> Am 17.09.2013 um 17:25 schrieb Mike Steglich:
>
>> 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] } }
> 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.



More information about the Cmpl mailing list