I have a question regarding two constraints which causes errors in my AMPL (+MINOS/Gurobi) model.

Basically I have a total production concurring in timestep t, for refinement factory f and product p which is the sum between x, the raw materials from supply station i in town j, used for product p in refinement factory f in time t (multiplied by factor u which describes how much of the raw material which becomes an actual product when the waste materials has been deduced) and Rec.

Rec is an actual produced product in timestep p at factory ha (where ha is a subset of f, and describes a set of factories whose products are much less profitable than those produced in f, and in fact products from ha can be used as an input to the production occuring in f to increase the factor u, which for the refined products are called ru). I.e. ru is a factor discribing how much of Rec will become a new product. Here gp is the product from ha and p the new product which will be produced in p.

subject to Constraint2 {t in T,p in P, f in F}:
      prod[f,p,t] = sum{(i,j) in LINKS} x[i,j,p,t,f]*u[i,j,p] + 
      sum{ha in H,gp in P: gp<>p} Rec[ha,f,gp,t]*ru[gp,p];

subject to Constraint10 {p in P, t in T, f in F}:
     Sell[f,p,t] + sum{ha in H} Rec[ha,f,p,t] = prod[f,p,t];

Constraint 10 merely shows where "Rec" occurs. It is the difference between the amount Sold in a time step and what has been produced.

The question is when I try to implement this it never occurs that any Rec > 0 (where I've "manipulated" my data so that the products in ha is 100 times less profitable than those from f, and that the exchange rate u is 100 times lesser than those in ru which surely would be a more optimal solution to include recycling than not to). Is there any way to achieve the desired result? Each time step is 1 year which I why I need it to be in the same time step.

The problem is MIP due to me having binary variables in a different constraint.

asked 30 Jan '15, 03:17

Cenderze's gravatar image

accept rate: 0%

Is the problem an MILP, MIQP or MINLP?

(30 Jan '15, 08:41) optimizer

A general approach for debugging a model like this is to construct by hand (or in a spreadsheet) a solution that you believe (a) is feasible, (b) has Rec > 0 and (c) is better than the solution (with Rec = 0?) produced by your model. Your solution does not need to be optimal, just feasible. Then fix all the variables in the model to the values you chose, run the model, and see if the solution is accepted with the objective value you expected, accepted but with an inferior objective value (in which case, check your formulation of the objective function), or rejected as infeasible (in which case have the solver identify a conflict and check your formulation of the constraints involved in the conflict).


answered 30 Jan '15, 15:39

Paul%20Rubin's gravatar image

Paul Rubin ♦♦
accept rate: 19%

@paul rubin Thanks for your help! I managed to solve this by applying this technique.

(02 Feb '15, 06:07) Cenderze
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 30 Jan '15, 03:17

Seen: 763 times

Last updated: 02 Feb '15, 06:07

OR-Exchange! Your site for questions, answers, and announcements about operations research.