Hello all, I would like to kindly ask for your help, if you are familiar with optimization how i can modeling this function by minimize f

1 view (last 30 days)
T(1)=20, Ts=24, P=3 , i=[1..24], load('C.mat','C')
p(i)=p*S(i)
min f=P(i)*C(i)
if T(i)>Ts then S(i)=0
else if T(i)>Ts then S(i)=1
end
T(i+1)=0.25*T(i)+(0.07*2.5*p(i))/0.14

Answers (1)

Alan Weiss
Alan Weiss on 25 Mar 2015
I am not sure what you are asking. Do you have a fixed array and you are trying to scan the array and find the location and value of the minimum? In that case, use the min function.
If, however, you have a function of a multidimensional continuous variable, then you might want to consult the documentation for fminsearch, which can minimize functions of several variables.
If neither of those satisfy you, then please try asking a question in complete sentences so we don't have to guess at what you mean.
Alan Weiss
MATLAB mathematical toolbox documentation
  2 Comments
jamal abushnaf
jamal abushnaf on 29 Mar 2015
Thank you Alan,I appreciate your time, my question is to minimize the total cost which is summation of the product between real-time price ( Price.mat ) and the energy consumed ( AC_load.mat ), subject to the consumer comfort (temperature tolerances) and physical limit of air-conditioner constraints. the optimization problem * min C= summation(Price(i)*AC_load(i)) * in 24 hours and subject to : Tmin<= Tin(i) <= Tmax , 0<=AC_load(i)<=AC_load_max , Tmin=Tdesire-allowed deviation Tmax=Tdesire+allowed deviation where next indoor temperature can be calculated from this equation * T(i+1)=0.25*T(i)+(0.07*2.5*AC_load(i))/0.14 I hope that is more clear, now could you please help me how I can solve this problem using an optimization tool solver such as GA , MILP or linear programmin.
Alan Weiss
Alan Weiss on 30 Mar 2015
I am not sure what your control variables are, meaning the variables that you can change in order to try to optimize something. But your problem sounds like a linear programming problem. See this example and the function reference page for details.
Alan Weiss
MATLAB mathematical toolbox documentation

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!