Operations Research topics: SAS/OR,
SAS Optimization, and SAS Simulation Studio

Run without errors but "Infeasible or Unbounded"

Reply
Frequent Contributor
Posts: 107

Run without errors but "Infeasible or Unbounded"

Hi,

The problem is about cost minimization in a serial supply chain.

My code for optimization runs without error, but always shows "Infeasible or Unbounded" for solution status.

I changed parameters of demand and initial or ending inventory, but still remains same.

Thanks! And below in the attachment is the code as well as diagram description.

Attachment
SAS Employee
Posts: 447

Re: Run without errors but "Infeasible or Unbounded"

You have indexing issues in several constraint declarations.  For example, it does not make sense to use "j in SUPPLIERS" and "p in PRODUCTS" in both places here:


constraint inv_flow1 {j in SUPPLIERS, m in RAW_MATERIALS, p in PRODUCTS}:

   sum {j in SUPPLIERS} raw_quantity_1[j,m] + initial_1 = inv_raw1 + sum {p in Products} bill_ratio[m,p]*pro_size1

;


I suspect that you mean instead:


constraint inv_flow1 {m in RAW_MATERIALS}:

   sum {j in SUPPLIERS} raw_quantity_1[j,m] + initial_1 = inv_raw1 + sum {p in Products} bill_ratio[m,p]*pro_size1

;


But you might have meant:


constraint inv_flow1 {j in SUPPLIERS, m in RAW_MATERIALS, p in PRODUCTS}:

   raw_quantity_1[j,m] + initial_1 = inv_raw1 + bill_ratio[m,p]*pro_size1

;


Please correct these and see if that takes care of things.

By the way, you might find the EXPAND statement helpful to see whether the model you generated is what you intended:

SAS/OR(R) 13.2 User's Guide: Mathematical Programming

Frequent Contributor
Posts: 107

Re: Run without errors but "Infeasible or Unbounded"

Thanks for your reply!

Then I tried to change my constraints in the way you mentioned, where this is what I mean.

constraint inv_flow1 {m in RAW_MATERIALS}:

   sum {j in SUPPLIERS} raw_quantity_1[j,m] + initial_1 = inv_raw1 + sum {p in Products} bill_ratio[m,p]*pro_size1

;

But errors come out for example:

con raw_interval1 {m in RAW_MATERIALS}:

      sum {q in PRICE_INTERVALS} raw_quantity1_1[m,q]+raw_quantity2_1[m,q]+raw_quantity3_1[m,q] = sum {j in SUPPLIERS} raw_quantity_1[j,m];

ERROR 537-782: The symbol 'q' is unknown.

And similar errors show up. I guess whether it should be at the prior way I did?

Thanks!

SAS Employee
Posts: 447

Re: Run without errors but "Infeasible or Unbounded"

You need parentheses around the entire summand:

sum {q in PRICE_INTERVALS} (raw_quantity1_1[m,q]+raw_quantity2_1[m,q]+raw_quantity3_1[m,q])

Frequent Contributor
Posts: 107

Re: Run without errors but "Infeasible or Unbounded"

Hi,

Thank you!

I tried to change the constraints in this way, and run the code again.

Still no errors, but the Solution Status is still Infeasible or Unbounded. 

And I noticed that in the log file, the following conditions happen a lot :

constraint inv_flow1 {m in RAW_MATERIALS}:

                                            -

                                            777

NOTE 777-782: The name 'm' hides an outer declaration.

Does it matter?

Thank you so much!

SAS Employee
Posts: 447

Re: Run without errors but "Infeasible or Unbounded"

That note is because you declare M as a numeric parameter:

     num M = 1000000;

but then later use it as a dummy index:

    

     m in RAW_MATERIALS

(M and m are treated the same because PROC OPTMODEL is case-insensitive.)  It is better to rename one of them, say bigM instead of M.

Please make these changes and then attach the new code.

Frequent Contributor
Posts: 107

Re: Run without errors but "Infeasible or Unbounded"

OK!

Ask a Question
Discussion stats
  • 6 replies
  • 511 views
  • 0 likes
  • 2 in conversation