Skip to main content
added 17 characters in body
Source Link
RobPratt
  • 34.3k
  • 2
  • 47
  • 90

IF $\sum\limits_iX_i\ge6$$\sum\limits_d X_{i,d}\ge6$ THEN $Y_i = 1$ (strictly)

AND

IF $\sum\limits_iX_i<6$$\sum\limits_d X_{i,d}<6$ THEN $Y_i = 0$ (strictly)

$x$$X$ and $y$$Y$ are binary variables.

What I'm actually trying to do is to charge the objective function some value whenever $Y_i = 1$. That is, for each $i$, if $Y_i=1$, the term $C\cdot Y_i$ is charged in the objective function only and only if $\sum\limits_dX_d\ge6$$\sum\limits_d X_{i,d}\ge6$.

Here are some more details about the problem if needed.

  • $i =$$I =$ set of workers (a total of 5 workers);

  • $D =$ set of days (a total of 6 days);

  • $C=$ cost for each worked day is fixed.

If a worker worked for 6 days, then the cost of the sixth day is double the normal cost i.e. $= 2C$.

Define $X_{id} = 1$$X_{i,d} = 1$ if worker $i$ works on day $d$ and 0 otherwise, so I want to charge the objective function a cost if the sum of $X_{id}$$X_{i,d}$ over $d$ equals $6$ for each $i\in I$.

How can introduce such a variable that would charge the objective function?

IF $\sum\limits_iX_i\ge6$ THEN $Y_i = 1$ (strictly)

AND

IF $\sum\limits_iX_i<6$ THEN $Y_i = 0$ (strictly)

$x$ and $y$ are binary variables.

What I'm actually trying to do is to charge the objective function some value whenever $Y_i = 1$. That is, for each $i$, if $Y_i=1$, the term $C\cdot Y_i$ is charged in the objective function only and only if $\sum\limits_dX_d\ge6$.

Here are some more details about the problem if needed.

  • $i =$ set of workers (a total of 5 workers);

  • $D =$ set of days (a total of 6 days);

  • $C=$ cost for each worked day is fixed.

If a worker worked for 6 days, then the cost of the sixth day is double the normal cost i.e. $= 2C$.

Define $X_{id} = 1$ if worker $i$ works on day $d$ and 0 otherwise, so I want to charge the objective function a cost if the sum of $X_{id}$ over $d$ equals $6$ for each $i\in I$.

How can introduce such a variable that would charge the objective function?

IF $\sum\limits_d X_{i,d}\ge6$ THEN $Y_i = 1$ (strictly)

AND

IF $\sum\limits_d X_{i,d}<6$ THEN $Y_i = 0$ (strictly)

$X$ and $Y$ are binary variables.

What I'm actually trying to do is to charge the objective function some value whenever $Y_i = 1$. That is, for each $i$, if $Y_i=1$, the term $C\cdot Y_i$ is charged in the objective function only and only if $\sum\limits_d X_{i,d}\ge6$.

Here are some more details about the problem if needed.

  • $I =$ set of workers (a total of 5 workers);

  • $D =$ set of days (a total of 6 days);

  • $C=$ cost for each worked day is fixed.

If a worker worked for 6 days, then the cost of the sixth day is double the normal cost i.e. $= 2C$.

Define $X_{i,d} = 1$ if worker $i$ works on day $d$ and 0 otherwise, so I want to charge the objective function a cost if the sum of $X_{i,d}$ over $d$ equals $6$ for each $i\in I$.

How can introduce such a variable that would charge the objective function?

edited body
Source Link
MAHER
  • 21
  • 4

IF $\sum\limits_iX_i\ge6$ THEN $Y_i = 1$ (strictly)

AND

IF $\sum\limits_iX_i<6$ THEN $Y_i = 0$ (strictly)

$x$ and $y$ are binary variables.

What I'm actually trying to do is to charge the objective function some value whenever $Y_i = 1$. That is, for each $i$, if $Y_i=1$, the term $C\cdot Y_i$ is charged in the objective function only and only if $\sum\limits_iX_i\ge6$$\sum\limits_dX_d\ge6$.

Here are some more details about the problem if needed.

  • $i =$ set of workers (a total of 5 workers);

  • $D =$ set of days (a total of 6 days);

  • $C=$ cost for each worked day is fixed.

If a worker worked for 6 days, then the cost of the sixth day is double the normal cost i.e. $= 2C$.

Define $X_{id} = 1$ if worker $i$ works on day $d$ and 0 otherwise, so I want to charge the objective function a cost if the sum of $X_{id}$ over $i$$d$ equals $6$ for each $d\in D$$i\in I$.

How can introduce such a variable that would charge the objective function?

IF $\sum\limits_iX_i\ge6$ THEN $Y_i = 1$ (strictly)

AND

IF $\sum\limits_iX_i<6$ THEN $Y_i = 0$ (strictly)

$x$ and $y$ are binary variables.

What I'm actually trying to do is to charge the objective function some value whenever $Y_i = 1$. That is, for each $i$, if $Y_i=1$, the term $C\cdot Y_i$ is charged in the objective function only and only if $\sum\limits_iX_i\ge6$.

Here are some more details about the problem if needed.

  • $i =$ set of workers (a total of 5 workers);

  • $D =$ set of days (a total of 6 days);

  • $C=$ cost for each worked day is fixed.

If a worker worked for 6 days, then the cost of the sixth day is double the normal cost i.e. $= 2C$.

Define $X_{id} = 1$ if worker $i$ works on day $d$ and 0 otherwise, so I want to charge the objective function a cost if the sum of $X_{id}$ over $i$ equals $6$ for each $d\in D$.

How can introduce such a variable that would charge the objective function?

IF $\sum\limits_iX_i\ge6$ THEN $Y_i = 1$ (strictly)

AND

IF $\sum\limits_iX_i<6$ THEN $Y_i = 0$ (strictly)

$x$ and $y$ are binary variables.

What I'm actually trying to do is to charge the objective function some value whenever $Y_i = 1$. That is, for each $i$, if $Y_i=1$, the term $C\cdot Y_i$ is charged in the objective function only and only if $\sum\limits_dX_d\ge6$.

Here are some more details about the problem if needed.

  • $i =$ set of workers (a total of 5 workers);

  • $D =$ set of days (a total of 6 days);

  • $C=$ cost for each worked day is fixed.

If a worker worked for 6 days, then the cost of the sixth day is double the normal cost i.e. $= 2C$.

Define $X_{id} = 1$ if worker $i$ works on day $d$ and 0 otherwise, so I want to charge the objective function a cost if the sum of $X_{id}$ over $d$ equals $6$ for each $i\in I$.

How can introduce such a variable that would charge the objective function?

Became Hot Network Question
edited title
Source Link
TheSimpliFire
  • 5.5k
  • 5
  • 23
  • 56

IF (Smmation over i in Xi >= 6$\sum\limits_iX_i\ge6$ THEN ) >> Then >> Yi = 1$Y_i = 1$ (strictly).

AND

IF (Smmation over i in Xi < 6$\sum\limits_iX_i<6$ THEN ) >> Then Yi = 0$Y_i = 0$ ( strictlystrictly)

x$x$ and y$y$ are binary variables.

** What I'm actually trying to do is to charge the objective function some value whenever Yi = 1$Y_i = 1$. That That is, for each "i"$i$, if Yi=1$Y_i=1$, the term ( c*Yi)$C\cdot Y_i$ is charged in the objective function only and only if SUM ( Xi over i ) >= 6$\sum\limits_iX_i\ge6$.

Here are some more details about the problem if needed.

i = set of workers a total of 5 wokers.

D = set of days a total of 6 days.

C= cost foe each worked day is fixed

  • $i =$ set of workers (a total of 5 workers);

  • $D =$ set of days (a total of 6 days);

  • $C=$ cost for each worked day is fixed.

BUT IFIf a worker workredworked for 6 days, then the cost of the sixth day is doubldouble the normal cost i.e. = 2C

Xid = 1 If worker i workes on Day d, 0 otherwise$= 2C$.

Define $X_{id} = 1$ if worker $i$ works on day $d$ and 0 otherwise, so I want to charge the objective function a cost if the summation(Xid)sum of $X_{id}$ over i = 6 ;$i$ equals $6$ for each d belongs to D$d\in D$.

How can introduce such a variable that would charge the objective function?

IF (Smmation over i in Xi >= 6 ) >> Then >> Yi = 1 (strictly).

AND

IF (Smmation over i in Xi < 6 ) >> Then Yi = 0 ( strictly)

x and y are binary variables.

** What I'm actually trying to do is to charge the objective function some value whenever Yi = 1. That is, for each "i" if Yi=1, the term ( c*Yi) is charged in the objective function only and only if SUM ( Xi over i ) >= 6.

Here are some more details about the problem if needed.

i = set of workers a total of 5 wokers.

D = set of days a total of 6 days.

C= cost foe each worked day is fixed

BUT IF a worker workred for 6 days, then the cost of the sixth day is doubl the normal cost i.e. = 2C

Xid = 1 If worker i workes on Day d, 0 otherwise

so I want to charge the objective function a cost if the summation(Xid) over i = 6 ; for each d belongs to D

How can introduce such a variable that would charge the objective function?

IF $\sum\limits_iX_i\ge6$ THEN $Y_i = 1$ (strictly)

AND

IF $\sum\limits_iX_i<6$ THEN $Y_i = 0$ (strictly)

$x$ and $y$ are binary variables.

What I'm actually trying to do is to charge the objective function some value whenever $Y_i = 1$. That is, for each $i$, if $Y_i=1$, the term $C\cdot Y_i$ is charged in the objective function only and only if $\sum\limits_iX_i\ge6$.

Here are some more details about the problem if needed.

  • $i =$ set of workers (a total of 5 workers);

  • $D =$ set of days (a total of 6 days);

  • $C=$ cost for each worked day is fixed.

If a worker worked for 6 days, then the cost of the sixth day is double the normal cost i.e. $= 2C$.

Define $X_{id} = 1$ if worker $i$ works on day $d$ and 0 otherwise, so I want to charge the objective function a cost if the sum of $X_{id}$ over $i$ equals $6$ for each $d\in D$.

How can introduce such a variable that would charge the objective function?

edited title
Link
TheSimpliFire
  • 5.5k
  • 5
  • 23
  • 56
Loading
Source Link
MAHER
  • 21
  • 4
Loading