[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-glpk] Possible Bug
From: |
Carlos Almeida |
Subject: |
[Bug-glpk] Possible Bug |
Date: |
Mon, 19 Feb 2007 23:30:44 +0300 |
Hi,
Please, can you tell me if this is a bug in glpksol?
----------------------------------------------------------------
# Model to solve line 1
set Resource;
set Facility;
set Item;
param Level := 30, integer, >= 0;
param Facility_Level {i in Facility};
/* Level of facility */
param Resource_Qte {i in Resource};
/* Quantities of resources */
param Resource_Objective {i in Resource};
/* Resource production objectives */
param Facility_Data {i in Facility, j in 0..Level, k in Item};
/* Information about each facility, production/hour, costs, etc... */
param Resource_Production {i in Facility, j in Resource};
/* Production of resource r by each facility */
param Energy_Contribution {i in Facility};
/* Power production of each power plant */
param Objective {i in Facility};
/* Production objective of resource */
var p {i in Facility} integer >= 1 <= 10;
/* level of production in 0..10 then * 10 = %s */
minimize time: sum {j in Resource} (
max(Resource_Objective[j] - Resource_Qte[j],0) /
(sum{i in Facility} Facility_Data[i, Facility_Level[i], j] * p[i]));
end;
----------------------------------------------------------------
I get the following error
facility.mod:35: operand following / has invalid type
Context: ...Facility_Data [ i , Facility_Level [ i ] , j ] * p [ i ] )
Model processing error
If I wrote like this I get error also:
minimize time: sum {j in Resource} (
max(Resource_Objective[j] - Resource_Qte[j],0) /
sum{i in Facility} Facility_Data[i, Facility_Level[i], j] / p[i]);
See:
Reading model section from /home/cmsa/ogame.mod...
/home/cmsa/ogame.mod:35: operand following / has invalid type
Context: ...} Facility_Data [ i , Facility_Level [ i ] , j ] * p [ i ] )
Model processing error
Only if both operations are '*' (plus) it gives no error!
I need this working with some urgency, and I get stucked here...
Please help.
Thank in advance,
Carlos Almeida
Hi,
Please, can you tell me if this is a bug in glpksol?
----------------------------------------------------------------
# Model to solve line 1
set Resource;
set Facility;
set Item;
param Level := 30, integer, >= 0;
param Facility_Level {i in Facility};
/* Level of facility */
param Resource_Qte {i in Resource};
/* Quantities of resources */
param Resource_Objective {i in Resource};
/* Resource production objectives */
param Facility_Data {i in Facility, j in 0..Level, k in Item};
/* Information about each facility, production/hour, costs, etc... */
param Resource_Production {i in Facility, j in Resource};
/* Production of resource r by each facility */
param Energy_Contribution {i in Facility};
/* Power production of each power plant */
param Objective {i in Facility};
/* Production objective of resource */
var p {i in Facility} integer >= 1 <= 10;
/* level of production in 0..10 then * 10 = %s */
minimize time: sum {j in Resource} (
max(Resource_Objective[j] - Resource_Qte[j],0) /
(sum{i in Facility} Facility_Data[i, Facility_Level[i], j] * p[i]));
end;
----------------------------------------------------------------
I get the following error 
facility.mod:35: operand following / has invalid type
Context: ...Facility_Data [ i , Facility_Level [ i ] , j ] * p [ i ] )
Model processing error
If I wrote like this I get error also:
minimize time: sum {j in Resource} (
max(Resource_Objective[j] - Resource_Qte[j],0) /
sum{i in Facility} Facility_Data[i, Facility_Level[i], j] / p[i]);
See:
Reading model section from /home/cmsa/ogame.mod...
/home/cmsa/ogame.mod:35: operand following / has invalid type
Context: ...} Facility_Data [ i , Facility_Level [ i ] , j ] * p [ i ] )
Model processing error
Only if both operations are '*' (plus) it gives no error!
I need this working with some urgency, and I get stucked here...
Please help.
Thank in advance,
Carlos Almeida
- [Bug-glpk] Possible Bug,
Carlos Almeida <=