Clear Filters
Clear Filters

how i write this as functional object in matlab solver for this given equation picture

1 view (last 30 days)
%%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
  1 Comment
yaser alsultan
yaser alsultan on 8 Nov 2018
Edited: yaser alsultan on 8 Nov 2018
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).

Sign in to comment.

Accepted Answer

semi legend
semi legend on 8 Nov 2018
%%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 Comments
semi legend
semi legend on 8 Nov 2018
Edited: semi legend on 8 Nov 2018
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
yaser alsultan
yaser alsultan on 8 Nov 2018
Edited: yaser alsultan on 8 Nov 2018
sorry for the delay answer this equation was set 2 weeks ago but i accidentally unsaved everything in my laptop thank you for you time sir , i am a new learner

Sign in to comment.

More Answers (0)

Categories

Find more on Mathematics in Help Center and File Exchange

Products


Release

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!