Route Optimiser Hidden Mode v1 - dps-int.se Optimiser Hidden Mode… · The DPS modules for...
Transcript of Route Optimiser Hidden Mode v1 - dps-int.se Optimiser Hidden Mode… · The DPS modules for...
Route Optimiser Hidden
Mode v1.6
Route Optimiser Hidden Mode Page 1
Contents
Revision Control 3
Introduction 4
Conventions 4
Running Import in hidden mode 5
Introduction 5
Parameters 5
Example command 6
Extended error messages 7
Field numbers 7
Error types 8
Reasons for import to fail 9
Product fields 9
Error messages (only available in interactive mode) 10
Error numbers – Import file reading 10
Error numbers – Data processing 10
Error numbers – Quick Address 11
Error numbers – Dynamic import 12
Parameter driven features 14
Pre and Post import functions 14
Running W32Auto 14
Introduction 14
Parameters 14
Recalculate routes and orders 14
Progress 14
Diagnostics mode 15
LogiXIE 15
Black box matrix builder 17
Parameters 17
Status output format 22
Status values 22
Vehicle INI file format 23
Page 2 Route Optimiser Hidden Mode
[Vehicle] 23
Speeds 23
RDS – example usage of upload record types 24
Introduction 25
Order data 26
Depot import 26
Fleet availability 27
Auto header 27
Combined route and summary upload 27
Route Optimiser Hidden Mode Page 3
Revision Control
Revision Date By Details
1.0 05/10/15 Mohammad
Arif
Initial version – Content taken from Interface
Suggestions v46
1.1 29/02/15 Mohammad
Arif
Updated the definition for the /o2 flag for
Import
1.2 29/07/16 Mohammad
Arif
Example command line structures for passing
restrictions to Import and Morpheus added
1.3 04/10/18 Mohammad
Arif
Added xDima instructions for matrix building
Added PTV Vehicle INI section
1.4 13/12/18 Mohammad
Arif
Add example command line structure for a
local matrix through xDima
1.5 02/01/19 Andrew
Gibbons
Made various changes for more detail in the
command line switches
1.6 19/07/19 Mohammad
Arif
Added extra error codes to ‘Dynamic Import’
table
Page 4 Route Optimiser Hidden Mode
Introduction
The DPS modules for integration are designed to allow other systems to benefit from
the power of the Route Optimiser vehicle scheduling algorithm without the necessity
of having a full RO system.
Conventions
Defining the goal or identifying the reason why an action or activity should take places.
Throughout the document, this type of highlight identifies key notes.
Impact points identify where caution needs to be used. It may seem a great idea to run
the top level of detail, and the most detailed set of requirements, however if this is taken
too far then there may be a negative IMPACT on the result.
Where possible we will make a recommendation
INI settings
Route Optimiser Hidden Mode Page 5
Running Import in hidden mode
Introduction
The standard Route Optimiser import program WLI32.EXE can be run in hidden mode.
The file name must be specified within the PL.INI file within the work area. For details,
please see the PLINI settings document.
As with all DPS software, the usage of W32Auto is dependent on license keys.
When working with Y cache map databases, the import engine can be configured to
produce a local matrix. Morpheus.dll is needed in the LogiX32 folder which is not
installed as default
Parameters
The following Parameters are available
Parameter Usage
/# Full path to DPS.INI
/A Allows the request to run a post import program on exit. Spaces in the
command line section of the Post import program should be
replaced by a right curly bracket e.g.
/ae:\carp\logix32\wlass32.exe,/h}/test,1,1. This is to prevent the
program parsing the command line as part of the main program's
command line.
/B Full path for the errors file, overrides the settings in PL.INI
/C Minimum confidence level. Used to overrule the default confidence
level if being used as a validation tool.
/D Map database to be used. This setting only applies when Import is
given a full dataset to import, and is expected to process the data in
a temporary work area i.e. /DGBE
/E Extended error mode.
works with /H to output the number of columns in error, and an error
key to define the reason for rejection
/F Full path to import file, overrides the settings in PL.INI
Must be in hidden mode
Do not use in conjunction /L
/H Hidden mode
When import has finished WLSRITOT.INI contains a value of
ProgressPercent=100.
WLSRITOT.INI will not be updated whilst there is a ICF.LOK in the work
area.
/J 0 (default) - Unknown
1 - containing Avoids/Bans records (.RJny)
4 - containing Barrier records (.RBar)
5 - containing Polygon restriction sections (.RPly)
6 - files list. These files will contain a list of restriction files and their
corresponding types in the above format for the Morpheus system to
systematically action. (.RLst)
'/J' allows the user to pass a Matrix Restrictions file and its
corresponding filetype (optional) on the Import engine command
line. This is a RL5/6 Matrix Restriction file. If the filetype is not included
then RL5/6 determines the file type from its extension. Otherwise it will
be presumed the file is of whichever file type is passed. The file type is
passed as the file type number followed by a right curly brace directly
Page 6 Route Optimiser Hidden Mode
before the file path. e.g. "1}<Path to a RJny File>". The filename will
be written to the new MatrixRestrictionFile setting in the Matrix Build
info of the [Import32] section of PL.INI
/L Full path to a Filelist
Do not use in conjunction /F
After each run the file list will be removed
/M Import mode, works with /H
0 = validate no import
1 = Import data for rows without errors, and report errors for rows in
error
2 = Import and recalculate routes and orders
All other values are recalculate routes and orders
If not set use the hidden mode will always update
/O 0 = (default) means that there are no options set.
1 = If Bit 0 is set (add 1) then this informs the engine that no depots are
allowed to be imported regardless of any other permissions.
2 = If Bit 1 is set (add 2) then the engine removes any part of the path
containing the characters '\' or '/' up to and including the last
instance of either character when the path value is checked on G
records.
/S Run auto at end of the import process
/T Test mode, temporary work areas created in the /W directory are not
deleted
Only use for testing as the machine could run out of space, or the
directory could run out of entries.
/W Base path to create temporary work areas. Unless /T is specified the
work area is created in a fresh folder, then deleted.
Incompatible with /U
Import will attempt to find an unused folder name based on the
machines current date and time
/X States that all the characters to the right are deemed to be the start
directory and the program will attempt to change to this directory on
start-up. All the characters to the left of /X become the rest of the
command line. It is important therefore that the starting directory is
the LAST parameter on the command line.
/Z Importing in 'Black Box' mode we can override settings. We have
added a 32 bit map for future proofing. This is similar to the /O option.
If the /Z option is selected then columns for all 25 product types are
recognised by default.
If you need totals to be written to the WLSRITOT.INI, the following must be set.
Within the [Import32] section of the PL.INI the following entry WritetotalsINI=yes
WLSRITOT.INI is regenerated when the ICF.LOK file is deleted
If you need errors from all files in a file list, set ClearErrors=no in the Import32 section of
PL.INI
Example command
To import data into an existing profile, and using post import setting run auto
C:\carp\logix32\wli32.exe /H /DGBE /S /X"c:\carp\workarea\test1\"
To import a file defined as a command line parameter, into a temporary profile, and
using post import setting run auto
Route Optimiser Hidden Mode Page 7
C:\carp\logix32\wli32.exe /H /DGBE /S /F"c:\data\m1\data1.csv"
/W"c:\carp\workarea\temp\"
To import a map restrictions file into an existing profile. Note: MatrixBuildRequired must
be switched on with other necessary parameters.
C:\Carp\Logix32\Wli32.exe /H /f"C:\Orders.csv" /J"5}C:\PolyFile.RPly"
/x"C:\Workarea\Profile"
Files list
c:\carp\logix32\wli32.exe /H /f"C:\Orders.csv" /J"6}C:\FilesList.rlst"
/x"C:\Workarea\Profile"
When passing restriction files via the command line to the Import engine the file
extensions must be .RJny (Journey files), .RPly (Polygon files), .RBar (Barrier files) and .RLst
(List Files),
Running on Windows 8 using a command prompt to run WLI32 with matrix build the
build process continues after the CMD prompt has returned. This seems to be caused by
‘When executing an application that is a 32-bit GUI application, CMD.EXE does not wait for
the application to terminate before returning to the command prompt. This new behaviour
does NOT occur if executing within a command script.’
It seems one way to get round this would be to use a command like
Start /wait c:\carp\logix32\wli32.exe etc.
Extended error messages
The data consists of a string containing the field number and error message,
separated by a “{“. This paring will be repeated once for each field in error, each
pair will also be separated by a “{“.
Field numbers
Field Number
Error status 0
Type 1
Action 2
Call reference 3
Order ref 4
Call name 5
Vehicle ban 6
Ban days 7
Open1 8
Close1 9
Open2 10
Close2 11
Zone 12
Address 13
Order type 14
Book time 15
Work time 16
Depot time 17
Fixed time 18
Revenue 19
Product 20
Last product 44
Page 8 Route Optimiser Hidden Mode
Field Number
Priority 45
Vehicle 46
Pair 47
Group 48
Shelf life 49
Sequence 50
Uninterrupted 51
Position 52
Book day 53
Work speed 54
Depot cap1 55
Depot cap2 56
Preferred depot 57
Total capacity 1 58
Total capacity 2 59
Category 60
Stock 61
Etc km 62
Etc hour 63
Supply cost 1 64
Supply cost 2 65
Error types
Error Meaning
I_IMPORT_ERR1 Invalid Type
I_IMPORT_ERR2 Invalid Action
I_IMPORT_ERR4 Ambiguous place name only
I_IMPORT_ERR5 Post Zone only
I_IMPORT_ERR6 Major City - known but vague only
I_IMPORT_ERR7 Unsupported unique one-word place name only
I_IMPORT_ERR8 Supported unique one-word place name only
I_IMPORT_ERR9 Unique multi-word place name only
I_IMPORT_ERR10 Reinforced unique place name only
I_IMPORT_ERR11 Post sector only
I_IMPORT_ERR12 Full British Postcode - Quick Address only
I_IMPORT_ERR13 No location Given
I_IMPORT_ERR14 Location not recognized
I_IMPORT_ERR15 Outside Scan Boundaries
I_IMPORT_ERR18 Did not match confidence level
I_IMPORT_ERR19 Invalid Group number
I_IMPORT_ERR20 Value out of range
I_IMPORT_ERR21 Duplicate Call Point
I_IMPORT_ERR22 Call Point not found
I_IMPORT_ERR23 Missing Call Point Reference
I_IMPORT_ERR24 Duplicate Order
I_IMPORT_ERR25 Order Not Found
I_IMPORT_ERR26 Missing Order Reference
I_IMPORT_ERR27 Invalid Customer name
I_IMPORT_ERR28 Missing Depot name
I_IMPORT_ERR29 Duplicate Depot
I_IMPORT_ERR30 Depot not found
Route Optimiser Hidden Mode Page 9
Error Meaning
I_IMPORT_ERR31 Invalid Vehicle bans value
I_IMPORT_ERR32 Invalid Closed Days value
I_IMPORT_ERR33 Invalid Time value
I_IMPORT_ERR34 Overlapping Time Windows
I_IMPORT_ERR35 Invalid Zone Value
I_IMPORT_ERR36 Invalid Order Type
I_IMPORT_ERR37 Invalid Imposed Book Time value
I_IMPORT_ERR38 Invalid Imposed Work Time value
I_IMPORT_ERR39 Invalid Imposed Depot Time value
I_IMPORT_ERR40 Invalid Imposed Fix Time value
I_IMPORT_ERR41 Invalid Imposed revenue value
I_IMPORT_ERR42 Invalid Product Number
I_IMPORT_ERR43 Invalid Product Quantity
I_IMPORT_ERR44 Invalid Priority value
I_IMPORT_ERR45 Priority must be in the range 1..9
I_IMPORT_ERR46 Invalid Vehicle Group
I_IMPORT_ERR47 Invalid Pair number
I_IMPORT_ERR48 Invalid Shelf Life number
I_IMPORT_ERR49 Invalid Sequence number
I_IMPORT_ERR50 Invalid Interrupt Flag
I_IMPORT_ERR51 Invalid Throughput capacity per day
I_IMPORT_ERR52 Overlapping Depot capacities
I_IMPORT_ERR53 Invalid Preferred Depot
I_IMPORT_ERR54 Invalid Throughput capacity per planning period
I_IMPORT_ERR55 Overlapping Depot Capacities
I_IMPORT_ERR56 Invalid Depot Category
I_IMPORT_ERR57 Invalid Depot Stock
I_IMPORT_ERR58 Invalid Estimated Transport Cost Per Distance Unit
I_IMPORT_ERR59 Invalid Estimated Transport Cost Per hour
I_IMPORT_ERR60 Invalid Depot Supply cost
I_IMPORT_ERR61 Outside Location Boundaries
I_IMPORT_ERR62 Invalid Position
I_IMPORT_ERR63 Invalid Book Day
I_IMPORT_ERR64 Invalid Work Speed
I_IMPORT_ERR65 No Errors detected
I_IMPORT_ERR66 Product Quantities differ
I_IMPORT_ERR67 No corresponding order found
I_IMPORT_ERR68 Order is already linked to another
I_IMPORT_ERR69 Order is allocated to a route
I_IMPORT_ERR70 Order types correspond
I_IMPORT_ERR71 Corresponding order has errors
I_IMPORT_ERR72 The Maximum number of orders allowed has been
reached
I_IMPORT_ERR73 The Maximum number of depots allowed has been
reached
Reasons for import to fail
Product fields
Page 10 Route Optimiser Hidden Mode
When read product fields, only the first 6 characters of the field name are interpreted,
therefore, PROD1_BASE, is actually read as PROD1. Therefore, if PROD1_BASE appears
earlier in your import columns than PROD1, then PROD1_BASE takes precedence.
Error messages (only available in interactive mode)
Error numbers – Import file reading
Number Category Field
-1 DB
Connect
Cannot initialise list
-2 DB
Connect
Connection failed
-3 DB
Connect
Database error
-4 DB
Connect
Table does not exist
-5 DB
Connect
File already exists
-6 DB
Connect
DB object not initialised
-7 DB
Connect
Query object not initialised
-8 DB
Connect
DB not initialised
-9 DB
Connect
DB not open
-1 MS-Access Cannot initialise list
-2 MS-Access MDB does not exist
-3 MS-Access Unknown error
-4 MS-Access Table does not exist
-5 MS-Access MDB file already exists
-4999 Excel Cannot find worksheet file
-5000 Excel Cannot open worksheet file
-5001 Excel Unknown error
-5002 Excel Error reading worksheet data dictionary
-5003 Excel Cannot set total rows in worksheet range
-5004 Excel Cannot select all data in the current worksheet
-5005 Excel Read past end of worksheet
-5006 Excel Cannot read record from worksheet
-5007 Excel Cannot close worksheet
-9998 Database Cannot open TaskMast.DBF, TaskConf.DBF or TaskErr.DBF
Error numbers – Data processing
Route Optimiser Hidden Mode Page 11
Number Category Field
-1 Gazetteer Cannot find GazetteS.ini
-2 Gazetteer Invalid path to street level gazetteer
-3 Gazetteer Cannot find GazetteS file
-4 Gazetteer Cannot open GazetteS file
-5 Gazetteer Cannot read GazetteS file
-6 Gazetteer Invalid GazetteS file
-9 Gazetteer Invalid database code
-11 Gazetteer Cannot create street level locator form
-12 Gazetteer Insufficient fields returned
Error numbers – Quick Address
Number Category Field
-1000 QA Fatal
-1001 QA Insufficient memory
-1005 QA Cannot initialize
-1006 QA Initialisation failure
-1010 QA QA file open
-1011 QA File File exists
-1012 QA File File read error
-1013 QA File File write error
-1014 QA File File deletion error
-1016 QA File File access error
-1017 QA File Incorrect file version
-1018 QA File File handle error
-1019 QA File File creation error
-1020 QA File File rename error
-1021 QA File expired, QA database out of date
-1022 QA File not demo version
-1025 QA Read failure
-1026 QA Write failure
-1027 QA Incorrect drive specification
-1028 QA Incorrect directory specification
-1029 QA Directory creation error
-1030 QA Invalid option
-1031 QA Invalid INI file
-1032 QA Invalid Log file
-1033 QA Memory problem
-1034 QA Invalid Hot key
-1035 QA Hot key used
-1036 QA Invalid resource
-1037 QA Invalid data directory
-1038 QA Invalid temporary directory
-1040 QA Unknown error
-1041 QA Duplicate
-1042 QA Invalid action
-1050 QA CC CC failure
-1051 QA CC CC invalid code
-1052 QA CC CC access failure
-1053 QA CC CC missing dongle
-1054 QA CC CC invalid units
Page 12 Route Optimiser Hidden Mode
Number Category Field
-1055 QA CC CC no meter
-1060 QA CC CC installation error
-1061 QA CC CC expired
-1062 QA CC CC date time error
-1063 QA CC CC user limit
-1064 QA CC CC activation error
-1065 QA CC CC invalid drive specification
-1070 QA Authorisation error
-1080 QA Read error, nothing read
-1090 QA Missing task
Error numbers – Dynamic import
Route Optimiser Hidden Mode Page 13
Number Category Field
-1000 Dynamic import User terminated request
-1001 Dynamic import Process terminated
-1002 Dynamic import Import not registered
-3000 Dynamic import Cannot find source file
-3001 Dynamic import Cannot find parent directory
-3002 Dynamic import Invalid temporary profile
-3003 Dynamic import Cannot change to temporary profile
-3004 Dynamic import Invalid extension
-3005 Dynamic import Cannot read import file
-3006 Dynamic import Invalid import file type
-3007 Dynamic import Command line directory errors
-3020 CL Folder is not a profile
-3021 CL Invalid folder
-3022 CL Cannot change to folder
-4000 Dynamic import Invalid active profile
-4001 Dynamic import Cannot find import file
-4002 Dynamic import Geo database failure
-4003 Dynamic import Active profile failure
-5000 GDI Invalid main form
-5001 GDI Program set-up failed
-5002 GDI Invalid parameters
-5003 GDI Main form set-up failed
-5004 GDI Main form reset failed
-5005 GDI Location form set-up failed
-6000 Processing Cannot start process
-6001 Processing Processing failed
-6002 Processing Import of file failed
-8000 Data read Failed to set-up the import row list
-8001 Data read TaskMast Failure
-8002 Data read Failed to initialise import
-8003 Data read Invalid header row
-8004 Data read Header row not set
-8005 Data read Cannot parse header row
-8006 Data read No data to process
-9960 WebAPI Error Unknown
-9969 WebAPI MISSING_OR_INVALID_VEHICLETYPE
-9970 WebAPI MISSING_OR_INVALID_STARTDEPOT
-9971 WebAPI MISSING_OR_INVALID_ROUTENAME
-9972 WebAPI MISSING_OR_INVALID_LXAUTOINI
-9973 WebAPI INVALID_AUTOCONTROL
-9974 WebAPI GAZFILES_OPEN_FAIL
-9975 WebAPI NO_ORDERS_TO_SCHEDUL
-9976 WebAPI MISSING_OR_INVALID_PROFILE
-9977 WebAPI DISPLAYLIST
-9987 WebAPI VEHICLE_NOT_FOUND
-9979 WebAPI DEPOT_NOT_FOUND
-9980 WebAPI AUTOREP
-10000 Profile Profile invalid depots
Page 14 Route Optimiser Hidden Mode
Parameter driven features
Pre and Post import functions
It is possible to define scripts / applications which are executed by import before and
upon completion of import. These scripts are run when the Play button is pressed
within import, not at the point that import itself is run.
Running W32Auto
Introduction
The W32Auto black box schedule engine, works in tandem with WLSRI import engine.
When executing the W32AUTO engine the current path must be that of the work area
to be scheduled.
When scheduling is complete, W32Auto writes an AutoLog.fin file to the work area.
W32Auto is not included as part of a Standard Route Optimiser installation
As with all DPS software, the usage of W32Auto is dependent on license keys.
Parameters
The following Parameters are available
Parameter Usage
Path to the map database cfg file i.e.
C:\Carp\DATA-GBE\datacfg.GBE
Path to the matrix file i.e.
C:\Carp\DATA-GBE\ROADMAPQ.GBE
/H Hidden mode
By default W32Auto runs in interactive mode
/I Online mode, can be used in conjunction with /H. In online mode
W32Auto outputs status information via progress files
When running in hidden mode the two path parameters are mandatory
When running in interactive mode the path parameters are specified as part of the
WAUTODO.INI.
Recalculate routes and orders
It is often the case that a set workarea just needs recalculating, to assess any
changes either to order sizes, or because “Actual” times have been set.
This can be achieved with the following settings.
• As a “H” record
1}1}6}9}-1}-1}""}0
Progress
W32Auto can return status information via the “Progress.gau” file, which is written to
the work area. If the /I command line parameter is set, then status information will be
written to the “Progress.gau” file at the next available point after a request is made.
The calling application can make a request for status information by writing a “1” to
the “Progress.nsr” file in the work area. W32Auto will write a 0 (zero) to the file when it
has processed the request.
Route Optimiser Hidden Mode Page 15
The data is written to the “Progress.gau” file in the following as a record of with the
following format.
typedef struct
{
int lSize; // size of structure
int lVers[4]; /* The version number of the Auto DLL
0 = Major version
1 = Minor version
2 = Release
3 = Build
*/
int lSR; /* communication flag caller->auto
1 = tell auto to pass progress info
2 = tell auto to stop gracefully
3 = stop quickly
Auto always resets this field to 0.
*/
int lErr; //
int lStat; //
int lNJnys; //
int lNTrps; //
int lNights; //
int lShift; //
int lDist; // Kms or tenth Kms ?
int lNDel; //
double dDQ1; //
double dDQ2; //
double dDQ3; //
int lNCol; //
double dCQ1; //
double dCQ2; //
double dCQ3; //
int lUtil1; //
int lUtil2; //
int lUtil3; //
double dBars[5]; // the five progress bars ( 0-100)
// [0]= read orders
// [1]= matrix build
// [2]= tried
// [3]= Allocated
// [4]= optimised
}
The data is written 4 byte aligned, therefore an int is a 4-byte integer, and a double is
8 bytes.
Diagnostics mode
By default, W32Auto displays a simple text based status screen when running in
interactive mode
When running in interactive mode, W32Auto can be controlled by the WAUTODO.INI
file located in your Logix32 directory. An example file follows.
[AUTOTEST]
user =0
datacfg =C:\CARP\DATA-gbx\DATACFG.gbx
lingo =C:\CARP\LOGIX32\ENGLISH.INI
roadmapq =C:\CARP\DATA-gbx\ROADMAPQ.gbx
logix =C:\CARP\LOGIX.INI
workarea =C:\Workarea\Test1
LogiXIE
Page 16 Route Optimiser Hidden Mode
The attached package contains the LogiXIE manual in PDF
format.
Route Optimiser Hidden Mode Page 17
Black box matrix builder
As part of the Route Optimiser suite of programs (depending on license) DPS provide
the facility to build Y-cache matrix files via the Black box matrix builder
Morpheus2BB.EXE.
Morpheus2BB.EXE is not included as part of a Standard Route Optimiser installation
As with all DPS software, the usage of Morpheus2BB is dependent on license keys.
Morpheus2BB works based on an existing work area. Therefore, all required depots,
orders or call points must be loaded into the work area.
Parameters
The following Parameters are available
Parameter Usage
/a Add to existing mode.
Keeps existing matrix values and adds any new times and distances.
Cannot be used in conjunction with /r
/b<n,w,s,e> Boundary rectangle in decimal degrees latitude longitude i.e.
<n,w,s,e>=North,West,South,East
Any points outside of the boundary rectangle are ignored format
North,West,South,East
If for example a rogue order is imported outside of the normal
territory, the total processing time can increase dramatically this
setting helps to filter out these orders as they are not considered for
use as a matrix point.
/d Include depots. If omitted depots are ignored
/e<s> Load matrix points from fil(E) Can be either:
*.dbf - with lat, long fields,
*.jny - with lat/long or DPS Y Coordinated,
or a matrix file with the correct map file extension
/f<n> (F)requency of status information output, in seconds.
The output format is defined later
NOTE: Requires threads, so not to be used with /N
Default = -1 (no action)
/g<s> (G)eopath. This can either be the code for the map database i.e.
UKA, or the full path the GEOY file (including the extension).
NOTE: Has no effect if /P is used to set the profile path, as the map
will be retrieved from the profile settings
/h (H)idden mode, no screen messages
/i<n> Delete any (I)naccessible/(I)nvalid nodes If <n> is greater than zero, then only delete nodes if less than <n>%
of nodes are inaccessible
If <n> equals zero, then no points will be deleted
If <n> equals -1, then all inaccessible points will be deleted
Default = -1 (no action)
/j<n> Load (J)ourney data and/or restrictions. Loads bans/avoid-
points/poly-restrictions from (J)ourney file, PLY restriction file, or
existing matrix file
Can be either *.jny - with lat/long or DPS Y Coordinates, *.ply/*.plym
- poly-restriction file, or a matrix file with the correct map file
extension.
Page 18 Route Optimiser Hidden Mode
It is possible to pass a road-bans/avoids file with any file extension
by prefixing the filepath with a type number followed by '}'.
It is also possible to load multiple road bans files using either an '.LST'
file extension containing a list of files with file type prefrix (see
above). Alternately, any file extension can be used if the file type
prefix of FT_LstFile (6).
FT_UnKnown = 0
FT_Journey = 1
FT_dbf = 2
FT_matrix = 3
FT_Barrier = 4
FT_PlyRst = 5
FT_LstFile = 6 File containing a list of file paths
Example: 5}D:\CARP\Workarea\Project\Profile\restrictions.xyz
This will force RL6 to load the 'restrictions.xyz' file using the '.PLY'
parsing routine.
/k<n> (K)eep/maintain existing bans/avoid points/poly-restrictions from
existing matrix file
Integer value representing a bitmap Range: 0 to 31
BIT 0 = Maintain Existing Speeds
BIT 1 = Maintain Existing Bans
BIT 2 = Maintain Existing Avoids
BIT 3 = Maintain Existing Barriers
BIT 4 = Maintain Existing Points
Example: /K25 = Bitmap(11001) = Maintain Existing Speeds, Barriers
and Points
Default = -1 (no action)
/L<s> (L)anguage
Three character language code
/m<s> Matrix file output location
Set the destination file path for the new matrix file. Default location
is current directory (usually profile directory) with the file name
LMSMatQ.xxx, where xxx is the map database code. File name must
be provided.
/n (N)o threads mode NOTE: Threads are required for regular progress output
The progress file be initialised, but will not be written until after the
matrix build is complete
/o<s> Output status file full path
/p<s> Path to the profile to be used as the data source
/q (Q)uiet mode (No debug/log) NOTE: No effect at present!!!
/r Rebuild matrix. It keeps all the points in the existing matrix and
recalculates all time and distances
/s<n> Shutdown time after termination in seconds.
To allow a graceful exit what is the maximum amount of time that
the program can continue after the max run time is exceeded.
/t<n> Tasks loading flag.
If not set (or all other values) load both tasks and call points
0 = No Callpoints and No Orders
1 = Tasks only
2 = Callpoints only
3 = Callpoints or Orders
/u<n> (U)ser session number
Route Optimiser Hidden Mode Page 19
Allows the user to save/re-use custom vehicles, costs, UGaz files, etc.
/v<s> Path to the vehicle settings file or vehicle name (eg. 'LOGIX',
'default', etc...).
Either full path to vehicle INI file, or just the file name (searches in the
current/profile directory).
Or simply 'RO vehicle'/'PTV vehicle profile' name (eg. 'LOGIX',
'default', etc...).
The output format is defined later
/w<s> Temporary working path. Location for storing temporary files.
Default location is current directory (usually profile directory)
/x<n> Maximum runtime in seconds
/x<cccc><s> XServer2 commands (Can use multiple switches e.g. /XDSAV<id>
/XPATH<path>)
XDSBL<name> - xDima Start new matrix Build Job (external matrix is
labelled with <name>) Mandatory
XCNFG<path> - Custom XServer2 config. file path (Default='<exe-
path>\<exe-name>.ini')
XPATH<path> - Used when needing a separate file <path> switch
as well as <id>
XUSER<name> - Username used to provide a 'scope' <name> for
stored matrices (helps to filter available external matrices). NOTE:
Only characters [a-z0-9] allowed.
XRPRF<path> - 'Request Profile' <path> for XML file containing the
default/base or additional settings. Must match the correct SOAP
formatting for 'requestProfile' element.
XOUTJ - Write output in JSON format (Default=CSV)
XOUTX - Write output in XML format (Default=CSV)
XRCFG - xRuntime Get list of available vehicle profiles on server (No
data following switch) (POSSIBLY NO FUNCTIONALITY USING PUBLIC
SERVER)
XRCFG<path> - xRuntime Get individual vehicle profile data from
server (<path> follows switch, e.g. 'profile/routing/bicycle.xml')
(POSSIBLY NO FUNCTIONALITY USING PUBLIC SERVER)
XHPRN<int> - xDima/xData HPRN options is a 32 bit integer flag.
Used to set options for when to build new HPR Network when
building xDima matrix (use with /XDBLD, /XDRBD, /XDSBL or /XDSRB)
0 = xs2f_HPRN_None (Will default to 'xs2f_HPRN_UseIfAvailable')
1 = xs2f_HPRN_UseNever (Set RoutingType = CONVENTIONAL)
2 = xs2f_HPRN_UseIfAvailable (Set RoutingType =
HIGH_PERFORMANCE_ROUTING_WITH_FALLBACK_CONVENTIONAL
(DEFAULT)
4 = xs2f_HPRN_UseAlways (Set RoutingType =
HIGH_PERFORMANCE_ROUTING)
8 = xs2f_HPRN_BuildIfNoneFound (Build new HPRN if no match
found)
16 = xs2f_HPRN_ListMatchingOnly (Only list HPR networks
if they match current routing profile)
32 = xs2f_HPRN_DeleteAfterUse (Delete the new HPR network
after it has been used to build a matrix)
XDLST - xDima List matrices (use with /XOUTJ or /XOUTX and/or
XPATH<path> for custom file name - Default 'List.csv')
XDDEL<id> - xDima Delete matrix (use with /XPATH<path> for list of
IDs)
Page 20 Route Optimiser Hidden Mode
XDBLD<name> - xDima Build new matrix (external matrix is
labelled with <name>)
XDRBD<id> - xDima Rebuild existing matrix (rebuild existing matrix
with ID)
XDSAV<id> - xDima Save built matrix
XDSRB<id> - xDima Start new matrix Rebuild Job (rebuild existing
matrix with ID)
XDJRS<id> - xDima Get matrix build Job Result
XDJWT<id> - xDima Watch Job
XDJST<id> - xDima Stop Job
XDJDL<id> - xDima Delete Job
XDTLS - xData List HPR Networks (use with /XOUTJ or /XOUTX and/or
/XPATH<path> for custom file name - Default 'List.csv')
XDTDL<id> - xData Delete HPR Network (use with /XPATH<path> for
list of IDs)
XDTSC<name> - xData Start new HPR Network Build Job (external
HPR network is labelled with <name>)
XDTJR<id> - xData Get HPR Network Build Job Result
XDTJW<id> - xData Watch Job
XDTJS<id> - xData Stop Job
XDTJD<id> - xData Delete Job
If neither /a or /r are specified, then any existing matrix and points are ignored.
The following is an example command line.
C:\Carp\logiX32\Morpheus2BB.exe /b53.0,-1.3,52.3,-3.0 /d /f10
/gC:\Carp\Roaddata\Data-UKA\GEOY.UKA
/oC:\Carp\workarea\test\status.txt
or
C:\Carp\logiX32\Morpheus2BB.exe "/d" "/t1" "/vmat_veh.ini"
"/pD:\ROProfiles\marif\Copied Profiles\Monday-Test1-TT" "/I1"
"/oD:\ROProfiles\marif\Copied Profiles\Monday-Test1-TT\m2xx.txt" "/gE:\Maps\DATA-TTY\GEOY.TTY" "/h"
PLY File passed on the command line
C:\Carp\logiX32\Morpheus2BB.exe "/d" "/t3"
"/JC:\Workarea\Testing\MatrixBuildViaCommandLine\PolyUK.ply"
"/pC:\Workarea\Testing\MatrixBuildViaCommandLine\ProfileUK" "/I1"
"/oC:\Workarea\Testing\MatrixBuildViaCommandLine\ProfileUK\m2xx.txt"
"/gC:\Carp\Roaddata\Data-UKT\GEOY.UKT" "/h"
JNY File passed on the command line
C:\Carp\logiX32\Morpheus2BB.exe "/d" "/t3"
"/JC:\Workarea\Testing\MatrixBuildViaCommandLine\Bans.jny"
"/pC:\Workarea\Testing\MatrixBuildViaCommandLine\ProfileUK" "/I1"
"/oC:\Workarea\Testing\MatrixBuildViaCommandLine\ProfileUK\m2xx.txt"
"/gC:\Carp\Roaddata\Data-UKT\GEOY.UKT" "/h"
LST File passed on the command line
C:\Carp\logiX32\Morpheus2BB.exe "/d" "/t3"
"/J6}C:\Workarea\Testing\MatrixBuildViaCommandLine\FilesList.lst"
"/pC:\Workarea\Testing\MatrixBuildViaCommandLine\ProfileUK" "/I1"
"/oC:\Workarea\Testing\MatrixBuildViaCommandLine\ProfileUK\m2xx.txt"
"/gC:\Carp\Roaddata\Data-UKT\GEOY.UKT" "/h"
LST file structure
Route Optimiser Hidden Mode Page 21
Instructions to build global xDima matrices by running Morpheus2BB.exe in Command
Line Mode
Note: Morpheus will always delete the xDima matrix file after it’s been converted to
an LMSMATQ
1. Ensure you have a copy of Morpheus2BB.exe in your CARP\LogiX32 folder. If
not, download the Morpheus2 REL and extract Morpheus2BB.exe into the
LogiX32 folder.
2. Create a copy of 'Morpheus2BB_example.ini' to 'Morpheus2BB.ini' in the same
LogiX32 folder, and modify any settings you need to.
3. Ensure that the required map exists on your PC.
4. Create a suitable directory for saving the new matrix (should not be the same
as the existing map folder). This setting will be sent to Morpheus2BB using the
‘/p<path>’ (e.g. "/pD:\CARP\MatrixBuilds\PTV\UK"). Make sure there is not an
existing LMSMATQ.XUK in this folder.
Note: If you intend on using the orders from a profile then along with the /T,
the /P will have the be the path to the profile.
5. Run Morpheus2BB from the command line in two ways:
a. SIMPLE MODE:
There are a few simple batch files that can be run to simplify the
process and monitor progress automatically.
Extract ALL the files from the attached ‘m2bb_cmd.zip’ into the new
matrix folder that you will use.
Open ‘_doJob.bat’ in Notepad and check that the ‘SET
LOGIX32_DIR=D:\CARP\LOGIX32’ is correct for your setup.
Run the batch file ‘startJob.bat’ and follow the prompts (probably just
press ‘y’ for most questions).
The progress will automatically refresh every couple of seconds.
b. ADVANCED MODE:
Run the command line:
Morpheus2BB.exe /gXUK /k17 /XUSERglobalmats "/XDSBLNew PTV
UK Speed Table" "/pD:\CARP\MatrixBuilds\PTV\UK" /vdefault /h
For other maps, change the ‘/gXUK’ to ‘/g<map code>’ (e.g. /gSNY).
The full details on all the command line switches are listed at the top of
this file.
You can check progress of the job in the target folder by opening the
file M2X.TXT in NOTEPAD, or running the 'ShowProgress.bat' file.
6) Troubleshooting:
a. If you need to stop the current Morpheus2BB job at any time, simply
run the ‘stopJob.bat’ file and wait a few seconds. Once stopped, run
the ‘deleteJob.bat’ file.
b. If Morpheus2BB is still running in Task Manager, and ‘stopJob.bat’ did
not work after a minute, then run ‘StopMorpheus2BB_EXE.bat’, or kill the
process in Task Manager
The following is an example command line.
Page 22 Route Optimiser Hidden Mode
The below command line is telling Morpheus to take the orders from TASK, use the
depots from DEPOT, make a call the xDima, output path for progress and the resulting
matrix path and name.
Generic structure
C:\Carp\Logix32\Morpheus2BB.exe /T1 /D /gXUK /k1 /XUSERglobalmats "/XDSBLNew
PTV UK Speed Table" "/pProfile Path" "/oProgress Output Path" "/mMatrix Path and
Name" /vdefault /h
Actual example
C:\Carp\Logix32\Morpheus2BB.exe /T1 /D /gXUK /k1 /XUSERglobalmats "/XDSBLNew
PTV UK Speed Table" "/pC:\WORKAREA\WHISTLE-
TNT\10_TRUNKING_PLAN_AS_IS\10_TRUNKING_PLAN_AS_IS"
"/oC:\Carp\Roaddata\NewMatrices"
"/mC:\Carp\Roaddata\NewMatrices\NewMatrix.XUK" /vdefault /h
Status output format
The following data is written to the file. Each time the file is updated, the old data is
overwritten. Where applicable the data is packed with leading zeros.
0000,0000,0000,00000000,XXXXXXXXXXXXX
NOTE: Sometimes ‘Total number of points’ is 0100 to indicate that the 'Current point’ is
a percentage not actual number of points
Item Size Type Usage
Status 4 Num Current activity / exit code
Current point 4 Num Current point being calculated
Total number of points 4 Num Total number of points that will be in
the complete matrix
Time remaining 8 Num Based on processing thus far, the
number of seconds remaining
Text unlimited Char Text explanation for current status
Status values
Value Meaning
0 No errors / initialising application
1 Checking parameters
2 Set-up
3 Loading map
4 Initialising Matrix
5 Loading points
6 Building matrix
7 Cancelling run
8 Terminating
100 Finished no errors
101 Finished build cancelled
102 Finished errors during build
2000 Unknown Error
2001 No path
2002 Invalid path
Route Optimiser Hidden Mode Page 23
2003 No map database specified / found
2004 Invalid map database
2005 Invalid matrix specification
2006 No vehicles
2007 Error selecting vehicle
2008 Vehicle not found
2009 Error loading map
2010 Disk full
2011 Error no points
2012 Error only one point
2013 No vehicle speeds defined
2014 Error building matrix
2015 Invalid existing matrix
Vehicle INI file format
The matrix builder needs a set of vehicle parameters, these can be read from an
existing matrix, the map database or specified as part of the command line.
The following structures are used to define a vehicle
[Vehicle]
Key Usage
Width In metres
Height In metres
Weight Metric tonnes
Type Vehicle type as a bit pattern
CAR 0x01 (=1)
BUS 0x02 (=2)
HGV 0x04 (=4)
CARPOOL 0x08 (=8)
PEDEST 0x10 (=16)
TRUCK 0x20 (=32)
THROUGH 0x40 (=64)
DELIVERY 0x80 (=128)
OR together for different combinations (e.g. HGV + TRUCK +
DELIVERY = 4+32+128 = 164)
The default ROUTE OPTIMISER vehicle is usually just TRUCK
(32)
Speeds
The same settings apply to [Day], [AMPeak], [PMPeak], [Night]. Speeds are specified
in 100thKm/h.
Currently only the Day section can be used
56km/h should be entered as 5600
Page 24 Route Optimiser Hidden Mode
Key Usage
Primary Indicates Primary section to be used in preference to other
speed sections
8 Motorway rural
7 Motorway urban
6 Dual-carriageway rural
5 Dual-carriageway urban
4 Primary roads rural
3 Primary roads urban
2 Other rural roads
1 Other urban roads
0 City Centre
PTV Vehicle INI
The full format for the MatVeh.ini option when using PTV profiles is as follows:
[VEHICLE]
TYPE=0 (default=0, optional, legacy use for DPS vehicle type)
NAME=van (PTV vehicle routing profile name)
WIDTH=2.000 (default=0.0, optional, 0.0 uses default PTV vehicle profile limits)
HEIGHT=2.540 (default=0.0, optional, 0.0 uses default PTV vehicle profile limits)
WEIGHT=0.0 (default=0.0, optional, 0.0 uses default PTV vehicle profile limits)
LENGTH=6.000 (default=0.0, optional, 0.0 uses default PTV vehicle profile limits)
[DAY] (historically set to Day, but just general settings for this matrix)
UNIT=K (default=K, optional, K-kph, M-mph)
PRIMARY=1 (default=1, optional, should not be changed, so best to ignore)
0=13500/7000 (max/min speed range, most important roads e.g. highways, optional)
1=12500/3500 (max/min speed range, optional)
2=8500/2500 (max/min speed range, optional)
3=6000/2500 (max/min speed range, optional)
4=5000/2000 (max/min speed range, optional)
5=4000/1800 (max/min speed range, optional)
6=1600/900 (max/min speed range, optional)
7=600/400 (max/min speed range, least important roads e.g. pedestrian paths,
optional)
8=25500 (maximum speed, optional)
Dimensions are in metre, and speeds are in 100th kph (135kph*100=13500).
It is possible to use MPH instead of KPH. Simply add/change the key UNIT=M.
The 8 (0 to 7) vehicle speeds are for PTV routing only and are general
maximum/minimum speed ‘ranges’ per road network class (as mentioned before, this
are PTV classifications and most likely not a fixed 135kph on motorways). Official
definition:
‘SpeedRangesByNetworkClass:
Defines the speed intervals for each network class. The road segments of a network
class are classified into sub-classes which are automatically assigned a speed value
from the interval. If speed information from a feature layer such as PTV_SpeedPatterns
or PTV_TrafficIncidents is available for a segment it overrides the speed defined here.’
The speed 8=25500 is a general maximum speed setting and this MUST be left at 25500
at the moment. Official definition:
Route Optimiser Hidden Mode Page 25
‘maximumSpeed:
The absolute maximum speed for all road segments. The speeds calculated from the
interval [minimumSpeed, maximumSpeed] for each network class, will be limited to this
speed value. Note: an interval [70,135] for network class 0 with a maximum speed of
120 km/h is not equal to the interval [70,120]. A maximum speed of 0 is ignored.’
This means that there could be 7 speed ranges within each network class, so the
speed is determined by the road segment proportional to the min/max setting which
is capped at the maximumSpeed setting.
RDS – example usage of upload record types
Introduction
For the purposes of this exercise we will use a fictitious distribution company RDS
(Royal Distribution Services). RDS have a number of “bases” although not all bases
are operational at any one time. The various crews can be based at any location, it
has been decided that for planning purposes if a base is not in use, then we do not
need to see it in the plan. Different bases have different operating times, work load
and costs associated with them.
RDS provide a range of services, each service can be converted to an amount. A
linear scale can then be used to convert the amount into time. Some services must
be completed by particular levels of crew, others can be completed by any crew.
When importing J and S records into Route Optimiser, you must use the combined
format
The attached zip file contains the base work area. To access
the work area simply drag the zip file from the document and
drop it in the required directory
The record and data types used within the following example are defined earlier in the
document.
The CSV files for the following examples are included within the ZIP file.
Page 26 Route Optimiser Hidden Mode
Order data
As detailed above there are many fields that can be included as part of the order data upload, however for this example a subset has been
included.
Depot import
To add our extra bases dynamically we use the Depot import as outlined above. An example file could include the following columns.
Depot costs must be switched on within parameters before importing costs.
If like the following example you are using multiple depots, please ensure that the setting is on within Parameters
Type Action Name Address Open1 Close1 Open2 Close2 Bandays ETCHour ETCKm SuppCost1 SuppCost2
D A St James SW1A 2BJ 0800 1200 1400 1800 P0021033 12 1 100 20
D A Sandringham Sandringham 0600 1100 1500 2330 P0000033 3.5 .8 100 20
D A Balmoral AB35 5TB 0500 2200 P0003000 5 .7 300 40
D A Windsor Windsor
Slough
0000 0000 0000 0000 P3333333 9 .9 100 20
Your uploaded data can be viewed using the Depot tab in Parameters.
Type Action OrderRef OrderType CallName ZipCode BanVeh Bandays Open1 Close1 Open2 Close2 PrefDep Prod1 Prod2 Prod3 Prod4 Prod5 Priority
A V1 D A School AB35 5ZS A P0333333 1000 1200 Balmoral 10 4 1
A V2 D An Office AB35 5TF P0333333 1400 1600 Balmoral 5 5 2
A V3 D A Dinner AB35 5YR AH P0333333 1800 2200 Balmoral 15 2
Route Optimiser Hidden Mode v1.0 Page 27
Fleet availability
To allocate resources to the above depots.
The depots must be created in advance of the fleet allocation.
If like the following example you are using multiple depots, please ensure that the setting is on within Parameters, otherwise the vehicle availability will
be limited to the first depot in the depot table
For unlimited quantities enter -1
Type Action Name DepFleet
V A St James 2}Rolls}2
V A Sandringham 3}Helicopter}3
V A Balmoral 5}Rolls}4}Helicopter}5
V A Windsor -
1}Rolls}4}Train}1}Helicopter}5
Your uploaded data can be viewed using the Vehicle list in AutoLogiX Scheduling parameters.
Auto header
The AutoLogiX scheduling engine can work in a number of modes, these can be controlled by supplying a record similar to the following.
Type Action DepFleet
H A 1}1}0}4}-1}-1}AUTO}3
If single files are to be used, always upload the Vehicle Availability before the Auto Header
Combined route and summary upload
To use the standard import engine both the summary and schedule data must be in the same file, for direct import by the auto scheduler the summary
and schedule data can be split.
Page 28 Route Optimiser Hidden Mode
The attached Zip file can be dragged from this Word document to your work area directory. You can then go through the following examples to see
how the different import files work.
In this example each import record type, is in its own file. This has been done, so that the data is clearly identifiable, in reality, we would expect that all
data would be in a single file.
Import the Depot.csv file. This includes an example where the address needs correcting
Import Orders.csv
Import Route_upload_combined.csv
At this point if you exit import, you will see that you have your
o 5 Depots (1 existing depot plus 4 imported)
o 3 Orders
o 1 Route
If you delete the example route you’ve uploaded
Then return to import and
Typ
e
Ro
ute
Na
me
De
scrip
tion
Sta
rtDe
po
tNa
me
Turn
De
po
tNa
me
Fin
ishD
ep
otN
am
e
Sh
iftNa
me
Ve
hic
leN
am
e
Use
rDa
y
Sta
rtSe
cs
Sta
tus
Se
qu
en
ce
Ca
llTyp
e
Log
iX
Ord
erR
ef
De
pN
am
e
Arriv
eD
ay
De
pa
rtDa
y
Trav
elK
ms
Un
it1
Un
it2
Arriv
eTim
eSe
cs
De
pa
rtTime
Se
cs
Du
rSe
cs
Trav
elS
ec
s
J UPDT0001 Updated
after first call
Balmor
al
Balmor
al
Balmor
al
Main Rolls 1 80000 1
S UPDT0001 2 1 4 FALSE Balmor
al
1 1 0 0 0 112404 112734 210 0
S UPDT0001 2 2 2 FALSE V1 Balmor
al
1 1 13 0 0 115959 125959 3600 1945
S UPDT0001 2 3 7 FALSE 0 1 1 31 0 0 134753 140000 727 2874
S UPDT0001 2 4 2 FALSE V2 Balmor
al
1 1 0 0 0 140000 150000 3600 0
S UPDT0001 2 5 7 FALSE 0 1 1 31 0 0 154751 171500 5229 2871
S UPDT0001 2 6 5 FALSE 0 1 1 0 0 0 171500 180000 2700 0
S UPDT0001 2 7 2 FALSE V3 Balmor
al
1 1 0 0 0 180000 190000 3600 0
S UPDT0001 2 8 4 FALSE Balmor
al
1 1 13 0 0 193220 193220 0 1940
Page 29
o Import the Fleet.CSV
o Import Header.csv
If you then exit import and go to Auto Schedule, and view the “Parameter definition”, you will see scheduling options and fleet availability , that you’ve
uploaded.
You may now schedule the orders.