1

I have the following MILP problem, relevant part of code:

param n, integer, >= 0;
set jobs := 1..n;
param P{i in jobs, j in jobs}, binary;

var s{i in jobs}, integer, >=0;
var e{i in jobs}, integer, >=0;

var Cmax, integer, >=0;

minimize total: Cmax;

s.t. crit_3{i in jobs,j in jobs}: s[i] >= e[j];

I want the criterion crit_3 to represent the following equation:

The constraint

Basically, I want the constraints to only activate for a given combination of i and j when the matrix P[i,j] = 1. How can I achieve this?

1 Answer 1

3

Something like s.t. crit_3{i in jobs,j in jobs: P[i,j]=1}: s[i] >= e[j]; should do the job.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.