RE: [AMPL 12460] Indexing over sets and time periods beginning

瀏覽次數:29 次
跳到第一則未讀訊息

Robert Fourer

未讀,
2016年8月16日 下午1:45:502016/8/16
收件者:am...@googlegroups.com
In the constraint

subject to six_fivea {t in 1..T}:
sum {k in reservoirs} open_res[k,1] >= resmin_num_fperiod[k];

there are two errors. First, k is only defined on the left side of the >= constraint, where it is used in the summation; AMPL cannot determine what value of k to use on the right side. This is the cause of the "k is not defined" error message. Second, the parameter on the right side has been defined to be indexed over two sets:

param resmin_num_fperiod {reservoirs,1..T};

Thus when you refer to resmin_num_fperiod you need to index it with two "subscripts" -- for example, resmin_num_fperiod[k,t] would be acceptable, but not resmin_num_fperiod[k]. This is the cause of the "resmin_num_fperiod needs 2 subscripts, not 1" error message. The other error messages that you see are caused the same errors in three other constraints.

Since resmin_num_fperiod is defined as "minimum number of reservoirs that are open at the beginning of the first time period" this parameter should probably not be indexed over {reservoirs,1..T} -- it is just one number, not an indexed collection of numbers. Also the constraint six_fivea should probably not be indexed over {t in 1..T} since it does not depend on the time period t at all. (You should suspect something wrong when the constraint is indexed by t but then t is never used in the constraint expression.)

Bob Fourer
am...@googlegroups.com

=======

From: am...@googlegroups.com [mailto:am...@googlegroups.com] On Behalf Of Nasiru Abdullahi
Sent: Monday, August 15, 2016 8:37 PM
To: ampl
Subject: Re: [AMPL 12460] Indexing over sets and time periods

I have developed the model but I have been encountering a lot of errors, this one am stuck on it since two days ago
see the attached document for the whole model.
My problem in snstraints six_fivea, constraint six_fiveb, constraints six_sixa and constraints six_sixb.


Nasiru Abdullahi

未讀,
2016年8月17日 中午12:40:122016/8/17
收件者:am...@googlegroups.com
Thanks Prof. Bob and Victor

Let me review the model again
Thanks once more
M.N Abdullahi
> --
> You received this message because you are subscribed to the Google Groups
> "AMPL Modeling Language" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ampl+uns...@googlegroups.com.
> To post to this group, send email to am...@googlegroups.com.
> Visit this group at https://groups.google.com/group/ampl.
> For more options, visit https://groups.google.com/d/optout.
>

Nasiru Abdullahi

未讀,
2016年8月23日 上午10:29:342016/8/23
收件者:ampl
Hello, Good day all
the attached files are my model and Data, I have been battling this issue of "impossible deduced bounds" can any one help me out to figure out what need to be done is urgent pls
error solve command:
ampl: solve;
presolve, variable open_res['r8',3]:
        impossible deduced bounds: lower = 2, upper = 1;
        difference = 1
presolve, variable open_res['r6',3]:
        impossible deduced bounds: lower = 2, upper = 1;
        difference = 1
presolve, variable open_res['r5',2]:
        impossible deduced bounds: lower = 2, upper = 1;
        difference = 1
presolve, variable open_res['r3',3]:
        impossible deduced bounds: lower = 2, upper = 1;
        difference = 1
presolve, variable open_res['r1',3]:
        impossible deduced bounds: lower = 2, upper = 1;
        difference = 1
1 presolve messages suppressed.
ampl:

Thanks
Nasir A

multi_period_kmwdp.mod
multi_period_kmwdp.dat

Victor Zverovich

未讀,
2016年8月24日 下午5:47:552016/8/24
收件者:am...@googlegroups.com
Answered in https://groups.google.com/d/msg/ampl/0iLMCtYAU_0/BEFvDXJnAAAJ. Please avoid duplicate postings.

- Victor


> To post to this group, send email to am...@googlegroups.com.
> Visit this group at https://groups.google.com/group/ampl.
> For more options, visit https://groups.google.com/d/optout.
>

--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
回覆所有人
回覆作者
轉寄
0 則新訊息