Initializing help system before first use

finalize

finalize


Purpose
Finalize the definition of a set or list.
Synopsis
procedure finalize(s:set)
procedure finalize(l:list)
Arguments
Dynamic set
Dynamic list
Example
In the following, an indexing set is defined, on which depends a dynamic array of decision variables. The set is subsequently defined to have three elements and is finalized. A static array is then defined:
declarations
 Set1: set of string
 x: array(Set1) of mpvar  ! Declare a dynamic array of variables
                          ! (entries need to be created
                          !  subsequently)
end-declarations
Set1:= {"first", "second", "fifth"}
finalize(Set1)            ! Finalize the set definition

declarations
 y: array(Set1) of mpvar  ! Declare a static array of variables
                          ! (entries are created immediately)
end-declarations
Further information
1. This procedure finalizes the definition of a set (or list), that is, it turns a dynamic set into a constant set consisting of the elements that are currently in the set. All subsequently declared arrays that are indexed by this set will be created as static (= fixed size). Any arrays indexed by this set that have been declared prior to finalizing the set retain the status dynamic but their set of elements cannot be modified any more.
2. Using this routine on sets declared dynamic has no effect.

© 2001-2020 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.