This question is similar to the following:

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

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


answered 08 Dec '14, 10:52

jfpuget's gravatar image

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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: 04 Dec '14, 15:18

Seen: 910 times

Last updated: 08 Dec '14, 10:52

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