« Return to Thread: Unbounded or badly scaled problem

[AMPL 2659] Re: Unbounded or badly scaled problem

by Robert Fourer-2 :: Rate this Message:

Reply to Author | View in Thread



This does not appear to be a badly scaled problem, but rather an unbounded
problem.  To see that, I added a constraint that places a lower bound of
-100000000 on the objective function:

subj to obj_lower_bound:
  sum{i in LOCATIONS, j in PROC_TIMES, k in PROC_TIMES}
    exp((j - k)*interest_rate/tyr)*(cotton_price[i,k]*
    (Buy_Cotton[i,j,k] - Sell_Cotton[i,j,k])) >= -1000000000;

Then MINOS returned the solution copied below, in which the objective value
is exactly equal to -100000000.  To prevent this behavior you would need to
add some constraints or bounds, or otherwise fix your model, so that such
solutions would no longer be possible.

Bob Fourer
4er@...


ampl: display {j in 1.._nvars: _var[j] > 0} (_varname[j],_var[j]);

:                _varname[j]                    _var[j]         :=
1     "Machines['Lahore',1]"                   100
2     "Machines['Lahore',2]"                  1000
3     "Machines['Lahore',3]"                  1000
4     "Machines['Lahore',4]"                  1000
5     "Machines['Lahore',5]"                  1000
6     "Machines['Lahore',6]"                  1000
7     "Machines['Lahore',7]"                  1000
15    "Buy_Cotton['Lahore',1,1]"            574860
16    "Buy_Cotton['Lahore',1,2]"           5748500
19    "Buy_Cotton['Lahore',1,5]"           5748600
24    "Buy_Cotton['Lahore',2,3]"           5748600
32    "Buy_Cotton['Lahore',3,4]"           5748600
47    "Buy_Cotton['Lahore',5,5]"                 9.31323e-10
48    "Buy_Cotton['Lahore',5,6]"                 0.000243824
55    "Buy_Cotton['Lahore',6,6]"           5748600
56    "Buy_Cotton['Lahore',6,7]"           5748600
69    "Buy_Cotton['Karachi',1,6]"                7.27119e+11
113   "Ut['Lahore',1]"                           0.001
114   "Ut['Lahore',2]"                           0.001
115   "Ut['Lahore',3]"                           0.001
116   "Ut['Lahore',4]"                           0.001
117   "Ut['Lahore',5]"                           0.001
118   "Ut['Lahore',6]"                           0.001
119   "Ut['Lahore',7]"                           0.001
127   "temp_Required_Cotton['Lahore',1]"    574860
128   "temp_Required_Cotton['Lahore',2]"   5748600
129   "temp_Required_Cotton['Lahore',3]"   5748600
130   "temp_Required_Cotton['Lahore',4]"   5748600
131   "temp_Required_Cotton['Lahore',5]"   5748600
132   "temp_Required_Cotton['Lahore',6]"   5748600
133   "temp_Required_Cotton['Lahore',7]"   5748600
141   "Required_Cotton['Lahore',1]"         574860
142   "Required_Cotton['Lahore',2]"        5748600
143   "Required_Cotton['Lahore',3]"        5748600
144   "Required_Cotton['Lahore',4]"        5748600
145   "Required_Cotton['Lahore',5]"        5748600
146   "Required_Cotton['Lahore',6]"        5748600
147   "Required_Cotton['Lahore',7]"        5748600
163   "Sell_Cotton['Lahore',2,2]"          5748600
166   "Sell_Cotton['Lahore',2,5]"          5748600
171   "Sell_Cotton['Lahore',3,3]"          5748600
179   "Sell_Cotton['Lahore',4,4]"          5748600
195   "Sell_Cotton['Lahore',6,6]"                0.000243824
203   "Sell_Cotton['Lahore',7,7]"          5748600
244   "Sell_Cotton['Karachi',6,6]"               7.27119e+11



> -----Original Message-----
> From: ampl@... [mailto:ampl@...]
> On Behalf Of msaqib [msaqib@...]
> Sent: Thursday, July 09, 2009 11:19 AM
> To: ampl@...
> Subject: [AMPL 2633] Re: Unbounded or badly scaled problem
>
>
>
> The last message missed the model file
>
>
>
> Hello everyone
> My optimization problem is the following scenario:
> 1- Raw material (cotton) is needed at different locations to meet a
> minimum
> production workload
> 2- Production units are available at different locations.
> 3- Raw material costs vary every day, and are possibly different at each
> location.
> 4- Production machines consume cotton at two different rates (idle and
> peak).
> 5- Production time unit (say, shifts or days) may or may not be the same
> as
> the procurement time units. For instance, you can buy cotton once every
> day.
> You can do futures purchases based on projected future cost.
> 6- Our inventory may already have some cotton procured for a certain
> production intervals.
> 7- If I have excesss cotton at some unit, I can dispose of it in the
> market
> I've implemented the model in AMPL and tried to solve it using minos
> solver,
> and I get the following error: "Unbounded or badly scaled problem." If I
> get
> rid of the selling option (point 7 above, by removing the Sell_Cotton term
> in the objective function, the solver finds and optimal solution.
> Could you kindly take a look at the attached model and data file and
> suggest
> why this is a badly scaled problem?
> Thanks and best regards

> > http://www.nabble.com/file/p24413197/MyProblem.txt MyProblem.txt
> > http://www.nabble.com/file/p24413197/MyProblem-Data.txt MyProblem-
> Data.txt
> >
> http://www.nabble.com/file/p24413207/MyProblem.txt MyProblem.txt
> --



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To post to this group, send email to ampl@...
To unsubscribe from this group, send email to ampl+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ampl?hl=en
-~----------~----~----~----~------~----~------~--~---

 « Return to Thread: Unbounded or badly scaled problem