Matlog: Logistics Engineering Matlab Toolbox

Cities in NC

The Matlab Toolbox Matlog was developed for use in the course ISE 754 at NCSU. It should be compatible with Matlab versions 2014b to 2015b. The toolbox contains functions for solving the following types of problems:

  • Facility location: Continuous minisum facility location, alternate location-allocation (ALA) procedure, discrete uncapacitated facility location
  • Freight transport: Transport charges for TL and LTL, total logistics cost, aggregate multiple shipments
  • Vehicle routing: VRP, VRP with time windows, traveling salesman problem (TSP)
  • Networks: Shortest path, min cost network flow, minimum spanning tree problems
  • Geocoding: U.S. city or ZIP code to longitude and latitude, longitude and latitude to nearest city, Mercator projection plotting
  • Layout: Steepest descent pairwise interchange (SDPI) heuristic for QAP
  • General purpose: Linear programming using the revised simplex method procedure, mixed-integer linear programming, and Cplex interface to MILP
  • Data: U.S. cities with populations of at least 10,000, U.S. highway network (Oak Ridge National Highway Network); U.S. 3- and 5-digit ZIP codes; U.S. Census Block Group data

Matlog References

Matlog Reference (HTML) provides a listing of help information for each function in the Matlog toolbox.

Matlog: Logistics Engineering using Matlab, presents detailed example of the use of Matlog to solve a facility location and allocation problem.

Matlab References

Basic Concepts in Matlab, provides a short overview of Matlab

The Documentation, Manuals, and Tutorials on the MathWorks website (the developers of Matlab) provide the most comprehensive and up-to-date reference source for Matlab.

Installing Matlog

Copy the following zipped file containing the Matlog directory to your local computer:

Extracting the file will create the folder matlog. You should be able to save the folder anywhere on your computer. Navigate to that folder in Matlab using the Current Folder dialog box on the Matlab Toolbar and make it your current folder. At the Matlab command prompt, type pwd to see the full path to the Matlog folder, called, for example, mypathtomatlog. Copy this string to the clipboard and then navigate back to the folder that Matlab starts in and make it your current folder. Type edit startup to either create a new startup.m file or edit an existing startup.m file (you should not use the NCSU network startup.m file on when not connected to the campus network). Put or add the line


to your startup.m file and save it. Then, every time you start Matlab, just type startup at the command line to execute the startup.m script and add a path to Matlog so that you can access it. You can add other commands to your startup.m script that you would like to have executed each time you start Matlab can also be added to the file; for example, the format compact command is at the end of the file and is used to eliminate the blank lines that would otherwise appear between each line of output at the command window:

% Example startup.m file to access local install of Matlog
path(path,'mypathtomatlog')                                   % Path to access Matlog
matlogupdate                                                  % Run to check for updates
format compact                                                % Run to eliminate blank lines

You can also place your startup.m file in a folder on your search path so that it automatically gets started each time you start Matlab. Type userpath at the command line to determine the first user folder located on your computer and copy your startup.m file to this folder.

Updating Matlog

Between version changes, individual files in Matlog can/will change on a regular basis (e.g., fixing errors) and the entire Matlog zip file will be updated. Instead of having to re-copy all of Matlog from the new zip file, there are two ways to get just the files that have been updated:

See log file for a list of Matlog updates to date.


 Michael G. Kay, Fitts Department of Industrial and Systems Engineering, North Carolina State University, Raleigh, NC.