Evaluating memory requirements for PROC OPTMODEL can be complex. Frequently PROC OPTMODEL storage requirements will be dominated by VAR, CON, and parameter array storage, with a single problem instance and no special suffixes. In this case, the expected memory requirements are summarized in the following table, assuming an LP or MILP solver. This table shows requirements on 32 and 64 bit platforms in bytes per element included in the problem.
For example, an element of a VAR array with two indices, say x[1,2] will take approximately 202 (186+8*2) bytes on a 32-bit platform. This value includes memory that is used to hold the element indices as well as many suffix values (such as x[1,2].ub), the suffixes stored with the PROBLEM instance, as well as data structures used during problem generation.
Storage Locations
User visible model data is stored in a variety of locations, depending on the processing requirements for the value. The most important locations used are the array element storage and the problem instance storage. Other less common suffixes are stored in a per element attribute list, as described in the table below. These element attributes are created only when needed, generally when the corresponding suffix for an array element is assigned a non-default value. An element attribute takes 24 bytes on 32-bit platforms and 32 bytes on 64-bit platforms.
Arrays, problem instances, and sets, as discussed in the sections below, use dynamically re-sized hash tables which have an overhead that depends on how full they are. Therefore, memory requirements can vary from the values given below. The memory requirements below include an overhead per element which corresponds to the expected hash table overhead.
User Declared Arrays
This table shows the approximate memory requirements in bytes for user declared array elements on 32-bit and 64-bit platforms. This does not include per symbol overhead.
As a special case, a NUM array element initialized to a floating point or missing value constant will not normally take any space unless it is specifically assigned a value. For example, in the following code array elements for 'c' will be created only when nonmissing values are read from the 'coeffs' data set.
As another special case, NUM, STR, and SET array elements with a single, simple numeric index (declared as either a set name or a range expression) can be stored with a compact vector form that takes 9 bytes per element. This form is used only for elements with integer indices >=1, and only if the elements are initialized in something close to sequential order.
Problem Instance Elements
The following table describes approximate storage requirements in bytes per problem element included in a PROBLEM instance. Each instance that includes a problem element requires separate storage for instance data.
For example, a problem with 10,000 variables and 8,000 constraints would require (10000*48+8000*40)=800,000 bytes on a 32-bit platform.
The .BLOCK suffix values take 9 bytes. Values declared with SUFFIXES= clause also take 9 bytes. The total requirement for these suffix values for each element is rounded up to a multiple of 8 or 16 bytes (on 32-bit or 64-bit platforms respectively), so the minimum requirement is 16 bytes. The var.SOL[n] data take 8 bytes per stored solution, for each VAR element included in the solution.
Sets
Copying a set value does not create a new set, therefore set memory requirements depend on how much sharing of values occurs.
Note: A set representing a range expression (such as 1..1000) does NOT require storage for each member, only for the equivalent of 2 to 4 members (representing the start, limit, optional increment, and optional multiplier values). If a set is created by adding elements in an arithmetic regression, then a range set can be created automatically.
Note: Sets allocated during threaded problem generation use a private pool which starts with an initial allocation of around 1k bytes. Therefore small sets created during threading could have higher memory overhead than described below.
Strings
Strings stored in an array or used as an index are saved in a string table so only one copy is shared by all uses. String text is stored as bytes in the MVA session encoding. On a 32-bit platform a string requires approximately 32 bytes plus the space for text storage, rounded up to a multiple of 8. On a 64-bit platform this becomes approximately 52 bytes plus the space for text storage, rounded up to a multiple of 16.
Problem Generation
PROC OPTMODEL generates an initial problem description which is processed further, possibly presolved, before being passed to the solver. PROC OPTMODEL keeps one problem description in memory, except that an existing problem description is deleted at the end of initial problem generation to allow reuse of data. The problem generation overheads are shown in the following table. Requirements for nonlinear equations depend on the expanded form and other complex factors, so the sizes below are minimums.
The LP and MILP solvers require an additional 12 bytes per nonzero value to generate a column-wise copy of the constraint matrix. If the PROC OPTMODEL presolver is active then additional memory is needed for the presolved version of the problem.
The solver can request row and column labels. This requires additional memory during the SOLVE statement, up to MAXLABLEN+1 bytes plus a pointer size, for each row or column.
Product Family | Product | System | SAS Release | |
Reported | Fixed* | |||
SAS System | SAS/OR | z/OS | ||
OpenVMS VAX | ||||
Microsoft® Windows® for 64-Bit Itanium-based Systems | ||||
Microsoft Windows Server 2003 Datacenter 64-bit Edition | ||||
Microsoft Windows Server 2003 Enterprise 64-bit Edition | ||||
Microsoft Windows XP 64-bit Edition | ||||
Microsoft® Windows® for x64 | ||||
OS/2 | ||||
Microsoft Windows 8 Enterprise 32-bit | ||||
Microsoft Windows 8 Enterprise x64 | ||||
Microsoft Windows 8 Pro 32-bit | ||||
Microsoft Windows 8 Pro x64 | ||||
Microsoft Windows 8.1 Enterprise 32-bit | ||||
Microsoft Windows 8.1 Enterprise x64 | ||||
Microsoft Windows 8.1 Pro 32-bit | ||||
Microsoft Windows 8.1 Pro x64 | ||||
Microsoft Windows 10 | ||||
Microsoft Windows 95/98 | ||||
Microsoft Windows 2000 Advanced Server | ||||
Microsoft Windows 2000 Datacenter Server | ||||
Microsoft Windows 2000 Server | ||||
Microsoft Windows 2000 Professional | ||||
Microsoft Windows NT Workstation | ||||
Microsoft Windows Server 2003 Datacenter Edition | ||||
Microsoft Windows Server 2003 Enterprise Edition | ||||
Microsoft Windows Server 2003 Standard Edition | ||||
Microsoft Windows Server 2003 for x64 | ||||
Microsoft Windows Server 2008 | ||||
Microsoft Windows Server 2008 R2 | ||||
Microsoft Windows Server 2008 for x64 | ||||
Microsoft Windows Server 2012 Datacenter | ||||
Microsoft Windows Server 2012 R2 Datacenter | ||||
Microsoft Windows Server 2012 R2 Std | ||||
Microsoft Windows Server 2012 Std | ||||
Microsoft Windows Server 2016 | ||||
Microsoft Windows XP Professional | ||||
Windows 7 Enterprise 32 bit | ||||
Windows 7 Enterprise x64 | ||||
Windows 7 Home Premium 32 bit | ||||
Windows 7 Home Premium x64 | ||||
Windows 7 Professional 32 bit | ||||
Windows 7 Professional x64 | ||||
Windows 7 Ultimate 32 bit | ||||
Windows 7 Ultimate x64 | ||||
Windows Millennium Edition (Me) | ||||
Windows Vista | ||||
Windows Vista for x64 | ||||
64-bit Enabled AIX | ||||
64-bit Enabled HP-UX | ||||
64-bit Enabled Solaris | ||||
ABI+ for Intel Architecture | ||||
AIX | ||||
HP-UX | ||||
HP-UX IPF | ||||
IRIX | ||||
Linux | ||||
Linux for x64 | ||||
Linux on Itanium | ||||
OpenVMS Alpha | ||||
OpenVMS on HP Integrity | ||||
Solaris | ||||
Solaris for x64 | ||||
Tru64 UNIX |
Type: | Usage Note |
Priority: | |
Topic: | SAS Reference ==> Procedures ==> OPTMODEL Analytics ==> Mathematical Optimization |
Date Modified: | 2018-09-24 14:22:06 |
Date Created: | 2018-09-07 15:00:08 |