This question is similar to the following:

https://www.or-exchange.org/questions/9203/forcing-the-value-of-consecutive-variables

with the following twist: I'd like for the non-zero values to be fixed at a level, but that level is a continuous variable, between defined (known) bounds. [ We have some flexibility in the number of resources we deploy out to tackle a certain job].

I'd like for the model to stay linear as much as possible, though i haven't been able to figure out how to hack the accepted answer (to the question i've linked to above) to fit my scenario.

My fallback is to try a constrained "minimum variance" set of constraints, but that has multiple drawbacks:

  • run-time for a quadratic model might be much larger
  • the resulting profile of values is not guaranteed to be "consecutively" non-zero
  • the resulting profile of values may not be as "brick wall" as i'd like.

This complication arose in a resource scheduling scenario: the jobs (demand side) are defined in two different ways:

  • Type 1: Job requires x hours of supply (ideally the supply profile allocated to the job should look "rectangular" or like a brick wall) spread out over a (variable) number of weeks.
  • Type 2: Job demand in hours by week is fixed (this is the easier of the two).

There is a weekly supply side constraint, which is simple.

asked 04 Dec '14, 15:18

jumblees's gravatar image

jumblees
9116
accept rate: 0%


A simple way is to add a binary variable xt for each of the original variables yt you have. xt = 0 iff yt = 0, and xt = 1 iff yt = z where z is the continuous variable.

There are bounds on z, say l <= z <= u

I would therefore state the constraints:

xt = 1 implies yt = z :

l . (1 - xt) <= z - yt <= u . (1 - xt)

xt = 0 implies yt = 0:

yt <= u . xt

Then I would state the consecutive constraint on the x_t variables

link

answered 08 Dec '14, 10:52

jfpuget's gravatar image

jfpuget
2.5k310
accept rate: 8%

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

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

Tags:

×231
×127
×27

Asked: 04 Dec '14, 15:18

Seen: 735 times

Last updated: 08 Dec '14, 10:52

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