help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] operand has invalid type


From: Oscar Gustafsson
Subject: Re: [Help-glpk] operand has invalid type
Date: Tue, 23 Oct 2007 08:54:59 +0200 (MEST)

On Mon, 22 Oct 2007, Leonard, Tim wrote:
I'm getting "operand following / has invalid type" on line 9
(Hardness[p]/Speed[a]) of this program.  I confess to being baffled by
the rules about vars and params.  Would you be so kind as to try to
explain.

var Speed {Algorithm} >= 0;
var Hardness {Problem} >= 0;

param MeasuredTime {p in Problem, a in Algorithm};
param PredictedTime {p in Problem, a in Algorithm} :=
 Hardness[p] / Speed[a];
Both Hardness and Speed are variables and GLPK is a linear programming kit, so this type of non-linear formulation can not be used. Also a param can only be defined from other parameters, so if Speed and Hardness were paramteters this would be totally valid.

/Oscar




reply via email to

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