Thank youThe issue has been solved, your suggestions have worked.RegardsVictor
--- El lun 2-jul-12, Andrew Makhorin <m...@gnu.org> escribió: De: Andrew Makhorin <m...@gnu.org> Asunto: Re: [Help-glpk] Problem with min command A: "Victor Gutierrez" <vjavie...@yahoo.com.mx> Cc: help-glpk@gnu.org Fecha: lunes, 2 de julio de 2012, 12:52 > > Right now the code I have is the following, and the same error is > > presented: > > > > set SCHEDULES := 1..288 ; > > > > param Temp {k in SCHEDULES} := if k=1 then TempIN_Meas[k] else > > (if (TempIN_Meas[1]<TempSPDN[1] or > > TempIN_Meas[1]>TempSPUP[1]) then (Temp[k-1] + 5*(BetaAC * ActLev[k] + > > OutTemp[k]*GamaAC))/(1+5*GamaAC)); > > > > param index {k in SCHEDULES} := if (Temp[k]<TempSPDN[k] or > > Temp[k]>TempSPUP[k]) then 0 else k; > > > > param index1 := if card(SCHEDULES) = 0 then 1 else (min{k in > > SCHEDULES: index[k] != 0} k); > > > > Hmm... Try the following: > > param index1 := if card(SCHEDULES) = 0 then 1 else > (min{k in (SCHEDULES union { 0 }): index[k] != 0} k); Don't try. The following code works: set S := { 1, 2, 3 }; set T := { }; display if card(S) = 0 then 0 else (min{k in S}k); display if card(T) = 0 then 0 else (min{k in T}k); so your code also should work. Which the error message did you get?
_______________________________________________ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk