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개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!