[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] how to use prod?
From: |
Andrew Makhorin |
Subject: |
Re: [Help-glpk] how to use prod? |
Date: |
Tue, 20 Mar 2007 19:23:17 +0300 |
> I am trying to use prod to calculate the production of numbers
> stored in an array x.
>
> I wrote: prod {i in 1..5} x[i]; // same format with sum
>
> but I was told "integrand following prod{...} has invalid type".
>
> it seems there is sth wrong with x[i]. (if i use i, everything will
> be fine.)
>
> anybody know this?
The error happens because x[i] is a variable. You cannot use
non-linear constraints in MathProg.