[AMPL 15269] Modeling Linear Problem of Production

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[AMPL 15269] Modeling Linear Problem of Production

Cristian Vera
Hi
I'm trying to modeling a problem of production with inventory in two different warehouse. 
The parameters are in different dimension of matrix, the demand are in 26x5, for example, but when I begin to run this program in AMPL send me an error like this:

ampl: include run.run;
Error at _cmdno 2 executing "solve" command
(file run.run, line 5, offset 69):
error processing param D:
105 invalid subscripts discarded:
D[6,1]
D[6,2]
D[6,3]
and 102 more.
Error at _cmdno 2 executing "solve" command
(file run.run, line 5, offset 69):
error processing param CV:
105 invalid subscripts discarded:
CV[6,1]
CV[6,2]
CV[6,3]
and 102 more.
Error at _cmdno 2 executing "solve" command
(file run.run, line 5, offset 69):
error processing param CI:
105 invalid subscripts discarded:
CI[6,1]
CI[6,2]
CI[6,3]
and 102 more.
Error at _cmdno 2 executing "solve" command
(file run.run, line 5, offset 69):
error processing objective costo:
no value for CV[1,6]

I think that my mistake is in the definition of the constraints because I think that the program scour wrong the matrix.
I add the model, parameters and .run, please I will be so grateful with your help.
Thanks so much.

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

[AMPL 15270] Re: Modeling Linear Problem of Production

Cristian Vera
Attach the files

El viernes, 1 de diciembre de 2017, 21:13:22 (UTC-3), Cristian Vera escribió:
Hi
I'm trying to modeling a problem of production with inventory in two different warehouse. 
The parameters are in different dimension of matrix, the demand are in 26x5, for example, but when I begin to run this program in AMPL send me an error like this:

ampl: include run.run;
Error at _cmdno 2 executing "solve" command
(file run.run, line 5, offset 69):
error processing param D:
105 invalid subscripts discarded:
D[6,1]
D[6,2]
D[6,3]
and 102 more.
Error at _cmdno 2 executing "solve" command
(file run.run, line 5, offset 69):
error processing param CV:
105 invalid subscripts discarded:
CV[6,1]
CV[6,2]
CV[6,3]
and 102 more.
Error at _cmdno 2 executing "solve" command
(file run.run, line 5, offset 69):
error processing param CI:
105 invalid subscripts discarded:
CI[6,1]
CI[6,2]
CI[6,3]
and 102 more.
Error at _cmdno 2 executing "solve" command
(file run.run, line 5, offset 69):
error processing objective costo:
no value for CV[1,6]

I think that my mistake is in the definition of the constraints because I think that the program scour wrong the matrix.
I add the model, parameters and .run, please I will be so grateful with your help.
Thanks so much.

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.

Datos.dat (3K) Download Attachment
modelo.mod (2K) Download Attachment
run.run (127 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

[AMPL 15288] Re: Modeling Linear Problem of Production

ptiwari
In reply to this post by Cristian Vera
In your data file, you are specifying T as row and I as a column for the param D. However, you have treated I as row and T as column in the model file by using param D{I,T}; declaration. You should put 'tr' while specifying data in the data file. So, your statement in data file should be

param D (tr): 1 2 3 4 5
1 ....
.....
 ;

On Friday, December 1, 2017 at 4:13:22 PM UTC-8, Cristian Vera wrote:
Hi
I'm trying to modeling a problem of production with inventory in two different warehouse. 
The parameters are in different dimension of matrix, the demand are in 26x5, for example, but when I begin to run this program in AMPL send me an error like this:

ampl: include run.run;
Error at _cmdno 2 executing "solve" command
(file run.run, line 5, offset 69):
error processing param D:
105 invalid subscripts discarded:
D[6,1]
D[6,2]
D[6,3]
and 102 more.
Error at _cmdno 2 executing "solve" command
(file run.run, line 5, offset 69):
error processing param CV:
105 invalid subscripts discarded:
CV[6,1]
CV[6,2]
CV[6,3]
and 102 more.
Error at _cmdno 2 executing "solve" command
(file run.run, line 5, offset 69):
error processing param CI:
105 invalid subscripts discarded:
CI[6,1]
CI[6,2]
CI[6,3]
and 102 more.
Error at _cmdno 2 executing "solve" command
(file run.run, line 5, offset 69):
error processing objective costo:
no value for CV[1,6]

I think that my mistake is in the definition of the constraints because I think that the program scour wrong the matrix.
I add the model, parameters and .run, please I will be so grateful with your help.
Thanks so much.

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.