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?