Use of linprog with an implicit function attached
조회 수: 1 (최근 30일)
이전 댓글 표시
I am trying to use linprog as shown in the code below where: PV_supply, WT_supply and Diesel_supply are 24x1. As you can see, the "diesel_cost" which is a part of the objective function "f" is a function of the "Diesel_supply" which I am trying to vary per hour of the 24 hour data set.
However, at the same time this diesel cost is related to the "Diesel_supply" that is in the inequality constraint "A".
Diesel_generator_energy = sum(Diesel_supply);
Diesel_cost = Diesel_generator_energy*Diesel_cost_per_kWh;
A = [-PV_supply -WT_supply -Diesel_supply];
b = [-Demand;];
f = [CRF_PV*CC_PV; CRF_WT*CC_WT; CRF_Diesel_generator*CC_Diesel+Diesel_cost];
[x,fval,exitflag] = linprog(f,A,b,[],[],lb,ub)
I am struggling to understand, if first of all, it is possible to do such a programme and what the technique will be i.e if the "Diesel_supply" values are completely unknown (only the size is known) can I formulate for minimising the objective function, meeting the constraints with an unknown vector? If this can be done with more input information, what will this be?
I do know the following equation which I am not sure if it can be used:
Diesel_cost = diesel_cost_litres*( b*diesel_generator_capacity + a*diesel_supply) where a and b and diesel_cost_litres are constants.
for example, the "diesel_supply" is what I am looking for, but if I was to predetermine the "diesel_generator_capacity" to a scalar value then I might be able to minimize "Diesel_cost" in the function "f" somehow?
thank you
댓글 수: 1
Richard Brown
2012년 7월 9일
I'm not sure I particularly understand the way you've phrased your question very well, but surely if diesel_generator_capacity is known, and Diesel_cost is known from your second equation, then Diesel_supply is also known (from your equation involving diesel_cost_litres ).
otherwise no, you can't run linprog with undefined variables in the constraints.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with Optimization Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!