Need help to formulate following conditionals in linear equations

Problems with modeling
Post Reply
parag_patil
User
User
Posts: 30
Joined: 2 years ago
Location: Ahmedabad
Contact:

Need help to formulate following conditionals in linear equations

Post by parag_patil »

I want to formulate the set of linear equations for the following conditions:

Code: Select all

Q(i) = 0, if y(i) = 1

Q(i) = P(i), if  sum(i,y(i)) = 0

Q(i) =P(i-r), if sum(i,y(i))$(ord(i)<r) and y(i)$(ord(i)=r)=1 and y(i) =0

Here

Code: Select all

set i,r;

alias(i,r);

Parameter P(i) "arbitrary vector of length i";

Variable Q(i)

Binary Variable y(i)
I want linear equations so that I can use it in solving a MIP problem

Thank you.
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: Need help to formulate following conditionals in linear equations

Post by bussieck »

Search for logical constraints in the forum. Many examples. I also often recommend the book by HP Williams. -Michael
parag_patil
User
User
Posts: 30
Joined: 2 years ago
Location: Ahmedabad
Contact:

Re: Need help to formulate following conditionals in linear equations

Post by parag_patil »

Thank you for your reply. Can you please reply the name of the book. Thanks
User avatar
dirkse
Moderator
Moderator
Posts: 214
Joined: 7 years ago
Location: Fairfax, VA

Re: Need help to formulate following conditionals in linear equations

Post by dirkse »

Model Building in Mathematical Programming
parag_patil
User
User
Posts: 30
Joined: 2 years ago
Location: Ahmedabad
Contact:

Re: Need help to formulate following conditionals in linear equations

Post by parag_patil »

Thank you for your reply.

Basically, I found the way , I should formulate the problem.

However, modelling the problem in linear terms has become the problem for me.

Please see this link : https://math.stackexchange.com/question ... onstraints


Can you , if possible, help me to formulate the above conditions with linear equations?

Thank you.
Post Reply