help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] Error: expression following = has invalid type


From: Diego Marin Santos
Subject: [Help-glpk] Error: expression following = has invalid type
Date: Wed, 14 Jul 2010 16:54:02 -0300

Hello,

I have a variable  "x{c in C, p in P, r in R}, binary"  that holds 1
if course c is taught in room s at period p and 0 otherwise.
The param "sc{s in S, c in C}" holds 1 if student s attend the course
c and 0 otherwise.

I need to create other variable "sp{s in S, p in P}" that will be a
function of x. This variable will hold 1 if student s have a course at
period p and 0 otherwise.

I wrote this var statement:

var sp{s in S, p in P} = sum{c in C} (sc[s,c] * sum{r in R} x[c,p,r]);

but i get this error: expression following = has invalid type.

how can i correct this?

Thanks in advance



reply via email to

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