I am confused about this situation: I have a binary variable \(x_{ij}\) and an integer variable \(y_j\). Also, if \(x_{ij}=1\) then \(y_j\) decreases by \(1\), i.e., \(y_j\gets y_j-1\). Here, \(y_j=c_j\) at the start of the otpimization process.

I don't know if I can express this constraint as a linear one? Can I juste write: \(y_j=y_j-x_{ij}\)? Doesn't this forces \(x_{ij}=0\) all times?

asked 17 Jan '18, 18:21

zbir's gravatar image

accept rate: 0%

edited 17 Jan '18, 18:30

Doesn't \(y_j\) have a starting value that is constant? If that is \(c_j\), could'nt it be written as \(y_j=c_j-\sum_i x_{ij}\) ? Maybe I did not understand the question right.


answered 17 Jan '18, 18:26

Naveen%20Divakaran's gravatar image

Naveen Divak...
accept rate: 25%

edited 19 Jan '18, 20:26

Yes, \(y_j=c_j\) at the start. See the updated question.

(17 Jan '18, 18:29) zbir

then ((y_j=c_j-\sum_{i}x_{ij})) should work

(17 Jan '18, 18:38) Naveen Divak...

Was my answer helpful? Or did I still understand your question wrong?

(18 Jan '18, 01:49) Naveen Divak...

I think you did understand the question correctly but which one is the right answer? Is it \(y_j=c_j-x_{ij}\) or \(y_j=c_j-\sum_i x_{ij}\)?

(18 Jan '18, 10:18) zbir

(y_j=c_j-\sum_i x_{ij})

(18 Jan '18, 10:21) Naveen Divak...
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: 17 Jan '18, 18:21

Seen: 505 times

Last updated: 19 Jan '18, 20:26

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