How to write the following functions

Hi,

I have the following objective function
F_{max}=\gamma*C + (1-\gamma)\sum_{i=1}^M\sum_{k=1}^Wd_ky_{ik} where: \gamma =(0,1) and d= [100,100,100,100].

This is an integer optimization. C (decision variable) is length of the assembly cycle in seconds. y_k (decision variable) contains the value 1 or 0 after optimization. I skipped constraints.

For example, the maximum cycle time of assembly is 10,000s. Then, I maximizing objective function.
C should be $<10,000$s. If yes, then everything is ok. If not
I change the structure of the assembly line, and then I calculate the objective function.

If y_k = 1, the operation was assigned to the assembly station. If
y_k = 0 then the operation has not been allocated to station assembly.

How to write the following function in CVX?. Exactly how to write this part of objective function \sum_{i=1}^M\sum_{k=1}^Wd_ky_{ik}

Regards,

It’s not clear to me what you are trying to do. What is C_\max? Is that just C?

This is an integer optimization. C (decision variable) is length of the assembly cycle in seconds. y_k (decision variable) contains the value 1 or 0 after optimization. I skipped constraints because I do not know how to write the cost functions .

Please edit your question to fully clarify. Again, what is C_\max? This looks like a linear objective, so I don’t understand your difficulty.

What is wrong with just gamma*C + (1-gamma)*sum(y,1)'*d? Consider this: suppose C and y are just normal MATLAB scalars and matrices. How would you compute the number F_\max? The answer is the same when these are CVX variables. We really can’t offer a full MATLAB tutorial here.