Indexing issue

9 views
Skip to first unread message

Sarthak Khatri

unread,
Nov 29, 2022, 3:31:28 PM11/29/22
to AMPL Modeling Language
Hello,
I am currently working on a  Generalized Lot Sizing Problem where I defined a set with a list of cities and then have choose the production and warehouse location from that set. But the warehouse and production location should be different.
set A;
param p{i in A};
param w{i in A};
I am facing difficulty in writing code for that.
Can anyone help me with that?

               
           
       
      

AMPL Google Group

unread,
Nov 30, 2022, 2:01:42 PM11/30/22
to AMPL Modeling Language
Can you provide some more information?
  • Is A the set of cities?
  • Do you want to choose just one production location and one warehouse location from the set of cities? Or do you want to choose a production location and a warehouse location to be associated with each city -- but maybe different locations for different cities?
  • Do you choose the production and warehouse location before you solve the optimization problem? Or are those locations to be chosen by the solver when it optimizes the objective function?


--
Robert Fourer
am...@googlegroups.com
{#HS:2082603494-113030#}
Reply all
Reply to author
Forward
0 new messages