[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] "multiplication of linear forms not allowed"

From: Meketon, Marc
Subject: Re: [Help-glpk] "multiplication of linear forms not allowed"
Date: Sun, 21 Oct 2012 14:41:00 -0500

Xypron used "M" as a large constant (e.g., 9999).  Not as a binary variable.


param M := 9999;

var B{J,K} >= 0;


s.t. a{j in J}: -M*sum{k in  K}B[j,k] <= A[j] <= M*sum{k in K}B[j,k];


-----Original Message-----
From: help-glpk-bounces+address@hidden [mailto:help-glpk-bounces+address@hidden On Behalf Of Reginald Beardsley
Sent: Sunday, October 21, 2012 10:46 AM
To: glpk
Subject: [Help-glpk] "multiplication of linear forms not allowed"



I'm trying to apply the following constraint following a suggestion by xypron:


var M{J} ,binary;

var B{J,K} ,>= 0;


s.t. a{j}: -M[j]*sum{k in  K}B[j,k] <= A[j] <= M[j]*sum{k in K}B[j,k];


The goal being to force A[j] = 0 if the sum over k of B[j,k] = 0;


glpsol 4.47 exits w/ the message in the subject line.  I found Steglich's post of last month, but am having trouble w/ translating the notation in the CMPL 1.7.0 manual to GMPL.


From context, I'm guessing that overbar indicates the maximum and underbar the minimum, but I can find nothing to confirm that. The first equation in section 8.3.1 appears to have a typo as there is no underbar in the range specification.  Even if I assume the typo, and explicitly specify the additional variables and  constraints, I still get the subject line message.  Just at a different point.


Is it possible to do this in GMPL?  If so, how?

At the moment, the only option I can see would be to make an initial solution w/o the constraint and then recast the problem and solve again.






Help-glpk mailing list


This e-mail and any attachments may be confidential or legally privileged. If you received this message in error or are not the intended recipient, you should destroy the e-mail message and any attachments or copies, and you are prohibited from retaining, distributing, disclosing or using any information contained herein. Please inform us of the erroneous delivery by return e-mail. Thank you for your cooperation.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]