how can i write the objective function with constraint given?

7 views (last 30 days)
hi friends, can anyone help me where can i refer and follow step by step how can i solve this problem.. b'coz i'm not very good in programming i would like to learn more about it.. i have refer this paper to see the result, but i'm totally lost where to start and how to compute this.
P to represent the storage location of each split, and the element pij indicates the storage location of split di, where integer pij ∈ {1; 2; : : : ;N}, in which i = 1; 2; · · · ;m and j = 1; 2; 3.
vector S = {s1; s2; · · · ; sm+r} to represent the final task scheduling scheme, where the ith element indicates that task ti is assigned on server msi , where 1 ≤ si ≤ N and i = 1; 2; · · · ;m + r.
objective function indicates the minimum sum --> NΣk=1(COk − (CSk + NMk × CM + NRk × CR))^2
subject to
1)S{ si ∈ {pi1; pi2; pi3} if i = 1; : : : ; m; sj ∈ {1; 2; : : : ;N} if j = m + 1; : : : ;m + r:
2) NMk = {si si = k; i = 1; 2; : : : ;m}|; where k = 1; 2; : : : ;N:
3)NRk = {si si = k; i = m + 1; : : : ;m + r}|;where k = 1; 2; : : : ;N:
4)CSk + NMk × CM + NRk × CR ≤ 1; where k = 1; 2; : : : ;N:
Constraints (1) expresses that if a map task ti (where i = 1; 2; · · · ;m) is assigned on server msi , then server msi must have stored its corresponding input data.
what i did for the 1st step is
function f = objfun(x)
k=1:N;
f = sum (CO_k - (CS_k + (NM_k * CM)+(NR_k * CR))).^2;
and for constraint part i'm totally stuck and dont know where can i refer to
function [c,ceq] = confun(x)
subject to
S(i): p(i1);p(i2);p(i3);
S(j): 1:N;
%nonlinear inequality constraints
.....
hope i can find solution and example to do it in .m file coding thank you.

Accepted Answer

Alan Weiss
Alan Weiss on 23 Jan 2013
This is a mixed integer nonlinear programming problem. The only solver in MATLAB toolboxes that addresses this type of problem is ga.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

More Answers (0)

Categories

Find more on Problem-Based Optimization Setup in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!