(URGENT) How can I write the following matlab code written for 24 hours, for 365 days? I just want to see how it is done

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

(URGENT) How can I write the following matlab code written for 24 hours, for 365 days? I just want to see how it is done

Post by answerhappygod »

(URGENT) How can I write the following matlab code written for
24 hours, for 365 days? I just want to see how it is done in such
optimizations. in MATLAB
X=24;
Tmin=0;
Tmax=1;
Tf=1;
Hmin=0;
Hmax=1;
N= [0 0 0 0 0 0 0 0 0 0 0 0 0];
T= optimvar('T',X,'LowerBound',Tmin,'UpperBound',Tmax);
H=optimvar('H',X,'LowerBound',Hmin,'UpperBound',Hmax);
A=optimvar('A',X,'LowerBound',0); F =
optimproblem('ObjectiveSense','max');
TA.Constraints.c1=T>=Tf;
TA.Constraints.c2=H>=Hmin;
TA.Constraints.c3=A<=((T-H));
TA.Objective= T-A;
sol = solve(TA);
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply