i am trying to find 3 sources (x1,x2,x3) while x3 = the demand , and y = process center , z = distribution center (facility installations) are binary (0 or 1).
how i write this as functional object in matlab solver for this given equation picture
1 次查看(过去 30 天)
显示 更早的评论
%%i have already set my reasonable data for the variables data %% Mixed Integer optimization
clc; clear all; close all;
Djv = 30; %annual demand for type v vehicles in market j
mij = 12; %mileage between distribution center location i to location j
c1sk = 1000; %cost of shipping a vehicle from source s to processing center location k
c2ki = 1000; %cost of shipping a vehicle from processing center location k to distribution center location i
Lj = 10; %load factor for market j
fit = 100000; %fixed annual operating and real estate cost of installing a Type t facility in distribution center location i
T1 = 1000; % fixed component for a truck's shipment cost
T2 = 100; %variable component for a truck's shipment cost
Ci = 10; %annual shipment capacity of a Type I facility at distribution center location i
x1skv = 30; %annual shipment of type v vehicles from source s to processing center location k
x2kiv = 5; %annual shipment of type v vehicles from processing center location k to distribution locaion i
g = 1; %fixed annual operating and real estate cost of installing
采纳的回答
semi legend
2018-11-8
%%constructing the Object function would be like this use vectors
%F(x)=c1*x1 + c2*x2 + (x3/L)*(T1 + T2*mij) + f*y + g * z
% Object function f = [c1sk, c2ki, (T1 + T2*mij)/Lj,fit, g];
%you need also to get object variable count
intcon = length(f);
create then the linear equivalent , and inequilvent , make the boundaries equal or greater than zero , array of zeroes , force x4, x5 (y,z) to be binary
call your solver using the functional object , well done mate on the reasonable data
3 个评论
semi legend
2018-11-8
编辑:semi legend
2018-11-8
i prefer you use the live editor , done use the script when you open a new project, i am coming back and back to this topic it looks interesting
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Performance 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!