optimization - for loop in matlab -


Hello, I have the following code which I believe is incorrectly indexed and therefore I can not find the answer Is

  diesel_matrix = axle ('test_diesel.xlsx', 'sheet2'); Diesel_supply = Diesel_matrix (:, 1); % Of diesel generator electricity generation hourly_cost = Diesel_matrix (:, 2); Zed = 1:21 A = [-PV_supply-WT_supply -Disel_supply (z) * for (24,1)] the costs of the diesel generator running on that production; F = [CRF_PV * CCIPV; CRF_WT * CC_WT; (CRF diesel_generator * CCDLL) + zodiac (hour clock (1: z)]; B = - Demand; [X, fval, exitflag] = linprog (f, a, b, [], [], lb, ub) end   

I try to loop only for the third column of matrix I am a I would like to loop for all the rows in "Diesel_Propay" per line of matrix A

, this time the code works for 21 sets of X output, but column 3 is either line 1,2, From "Diesel_Props" to line 21 till 3 etc. Verhas, I'm trying to get it to line 1 and 2 and 3 and 4 etc. for line 21 of "Diesel_Pply". This will allow me to check all the elements in "DSL-Cipli"

"post-text" itemprop = "text">

Conversation @ User 643469 and I had in chat (comment section See link in) and after seeing the documentation for linprog, I think you need to store the results of each z-walking in the data structure, and then select the best one after the loop ends.

As I think, there are 21 different ways in the generator that you can run and it is subject to 24 different obstacles

  [x, fval, exitflag ] = Linprog  

, Ub

use

  Val = linprog (f, a, b, [], [], lb, ub) result (z) = val; After the loop is over, you will be left with the result matrix with the dimensions of 4x21, where the first column has X-values, the second has flavor values, and the third is the value to exit. Through this 'result' matrix you can determine that you have 21 modes to run the generator.   

Comments