Processes Databank

As you work with SuperPro Designer for a long time, you will accumulate several completed projects (.spf files). Before you start a new project, you may benefit from reviewing a previously completed simulation as it possible that it could share some feature(s) common to a past successful process model, that was tested and validated. Therefore, it is important to have the means to search across all of your completed project files (and for some users it could hundreds of files) in search of finding the one(s) that may be of interest. Since the ‘.spf’ files created by SuperPro Designer to save the contents of a project are binary, they are not subject to a search by typical search tools. SuperPro Designer offers you a more efficient solution: the ‘Process Library’ or ‘Process Databank’.

The concept of the Process Databank for SuperPro files is similar to that of a Media Player for MP3 files. The user essentially hands off or exports onto your Process Library manager all the files whose content you like and wish to be subject for searching in the future. When you export an MP3 file to your Media Player, the media library manager there creates an entry in its catalog for each file that contains the song’s title, artist, release date, etc. and of course, ‘remembers’ the location in your media folder where the actual MP3 file resides should you decide to play it. In a completely analogous manner, the Process Library manager, when you export a process model (.spf file) into the Process Library, it creates the following two items:

1.   A new record in the process database file (.mdb file) and an entry in the main catalog with basic information about the file:
- date saved, author’s name, document’s version number, etc., and
- location information: a file name and a folder name (always under the library’s main folder) where the actual ‘.spf’ file resides.
The main catalog keeps an entry for each member (.spf file) of your process library.

2.   A copy of the process model’s file (.spf file) saved at some user-designated location (folder) under the area set aside to be managed by the process library. This folder can be anywhere on your local (or network) drive, and it’s called the “Process Library Root Folder” or PLRF for short. The PLRF is defined at the same time when you select the MS-Access (.mdb file) that will be used to retain the process records for your library.

ProcessDBOverview.png

Process Library’s DB Records (in the MS-Access File) and Process Files under the PLRF.

The Process Library Root Folder (PLRF)

While all the information contained in the ‘System’ or ‘User’ database is completely captured within the corresponding database ‘.mdb’ file (named “PDSystem.v<majorVerNo>.mdb and “PDUser.v<majorVerNo>.mdb for the User DB), the information maintained and managed by the Process library is distributed between two assets:

a) The Process Database MS-Access file (“PDProcess.v<majorVerNo>.mdb), and
b) All the “.spf” files residing under the Process Library Root Folder (PLRF)

The “.mdb” file and the PLRF are set when you enable access to the Process Library on the dialog that appears under the Databanks } Availability, Passwords & Locations... from the main menu (Databases: Availability Password & Locations Dialog).

There’s one more setting related to the Process Library that can be set from the above dialog: “Auto-Deposit Files Saved Under the PLRF?”. If the option is checked as “Yes”, then as soon as you Save or Save As... a SuperPro file in a location (folder) under the PLRF, the application will automatically proceed to deposit (or update) the file in the library. If the file was never committed to the library before, then the sequence described in Adding a Process Record (or Exporting a Process Model) to the Databank is automatically initiated. If the file was previously committed in the databank (with a given process record name), the information kept in the database will be updated based on the new contents of the file as it is now saved.

IconInfo00108.bmp 

In order for the program to identify that a previous record existed for an “.spf” file in the library all the following criteria must be met:
a) The filename AND the file location (folder) under the PLRF must match.
b) The record name (as specified either when the process file is first exported or as part of the file properties itself as showing in the Process Description Dialog) must also match.

It is NOT possible to have two different .spf files with entries in the process database under the same record name just as it is NOT possible to have two distinct record names pointing to the same file (name and location). If you attempt to “Save” a file with a previous (existing) record in the database, but with a new record name, the program will not allow it. You must either :
a) Change the name/location of the file, or
b) Change the record name to be referenced by in the Process Catalog.

You can populate the contents of your Process Library two ways:

1.   Add “.spf” files one-at-a-time (Adding a Process Record (or Exporting a Process Model) to the Databank), or

2.   Copy (using Windows’ File Manager), “.spf” files under the PLRF and then initiate a process library sync (Syncing the Process Library with the PLRF)

Adding a Process Record (or Exporting a Process Model) to the Databank

Before you initiate the commitment of a process file into the process library, you must have saved the file (at least once) in either your own private file area or the area under the PLRF. In the latter case, the application may automatically initiate the exporting of the file in the Process Library (if the pertinent setting shown on the Databases: Availability Password & Locations Dialog is set). When you have decided that you want to keep a copy of a process model in your library, you can do it by selecting Databanks } Processes } Export Current Process... (Ctrl+F4) from the main menu (or simply click on ExportToDBBtn.jpg button of the Process Library Toolbar). This will bring up the Export to the Process Databank Dialog. From this dialog you can set a record name to be used as the reference name for this entry in the main table of contents or registry of all processes deposited in the database. The record name must be unique as it will be used as an index in the database. You should also provide a brief textual description of the process and several keywords that may help you identify the process record later when you search from the Process Library Interface: Search Tab. Most of the properties specified in this dialog, are also available for editing before you initiate the exporting of the process model to the process databank by visiting the Process Description Dialog (Process Description... from the flowsheet’s context menu). The option of setting all such properties ahead of exporting the file to the process library maybe the preferred way to do it if you were to export many files at once and without pausing to specify each file’s individual attributes (such as keywords, etc.). This is exactly what happens when you use the second method to populate the process library and explained next.

Syncing the Process Library with the PLRF

This is by far the easiest way to populate your Process Library. Simply copy all the files you want to place in your Process Library under the Process Library Root Folder (PLRF), organized in sub-folders if you wish (preferred) and then select Databanks } Processes } Sync Process DB... (Shift+Ctrl+F4) from the main menu. Alternatively, you can click on SyncDBBtn.jpg button of the Process Library Toolbar. If you wish to have keywords and a textual description associated with each file, you should visit each file’s Process Description Dialog (Process Description... from the flowsheet’s context menu) before you initiate the syncing procedure.

The process library’s syncing may take a long time, depending on how many ‘.spf’ files reside under the PLRF. However, SuperPro Designer carries out this potentially time consuming task in a separate computational thread, so that you can continue to interact and work with the application on other files. When you learn what is happening when you initiate a process library syncing you will understand why the syncing task could be very lengthy. When you initiate a process library syncing, SuperPro will:

1.   Go through its main catalog of process records (as kept in the MS-Access file) and for each record name found, it will attempt to locate the file referenced. If it can’t find the file, then it will remove the process record from the table of contents (main catalog) of the library since this is a dead-record. The analogy to the media manager, is to have an entry in your media catalog referring to a song that you no longer have the ‘.mp3’ file and therefore can’t play it anymore. Since that record is of no practical use, it should be deleted from the catalog. Similarly, the process library manger, f it can locate the ‘.spf’ file behind a record in its main registry, it will delete it. If the file is indeed there, it will open the file and if its ‘last saved’ date/time is more recent that last time the file was committed to the library, the manager will re-commit its contents so that all the information kept in the process database file (related to this file) is up-to-date.

2.   Go through all the files, located in all folders and sub-folders under the PLRF and for each ‘.spf’ file it will search to see if there’s already a record that points to that file. If there is, then it will update all the information related to this file and kept in the MS-Access file (if necessary as dictated by the file and database dates). If there isn’t a record name for it, then it will create a new entry (record) in the ‘Table-of-Contents’ or ‘Main Registry’ of the Process Library that references the contents of that file. In order to choose a record name the program proceeds as follows:
a) First, it will try to use the relevant process property as kept by the file itself. This property may have been set either during a previous deposit in the process library or from the user visiting the Process Description Dialog and setting it him/herself prior to syncing.
b) If a record name wasn’t found, then it will attempt to use the ‘fileName’ as record name and if it that leads to a conflict (same record name already exists), it will append 01, 02, .. until a unique record name is found..

IconInfo00109.bmp 

When syncing the process library please remember the following rules:
1) There can’t be two entries in the process catalog (TOC) with the same record name, so each record name must be unique
2) There can’t be two record names pointing (referencing) the same process model (.spf) under the PLRF

3) By the end of the syncing process, there must be a one-to-one mapping between the number of record names in the process library’s main catalog and the number of files residing under the PLRF.

If, for whatever reason, you decide that you don’t want to wait till the syncing process ends, but wish to abort it, you can either select Databanks } Processes } Abort Syncing (Shift+Ctrl+F4) from the main menu or simply click on AbortSyncBtn.jpg button of the Process Library Toolbar

IconInfo00110.bmp 

As SuperPro attempts to quietly and behind the scenes open each of the files located under the PLRF in order to read its contents, it is possible that once in a while it may encounter an issue that prevents this procedure from fully executing: perhaps it is a file created with a later release of the software, or perhaps the file is corrupted in some way and generates an error. Since SuperPro can’t afford to pause and put up a message related to the problem it encountered during the syncing, it will instead, insert an entry in an error report that you can view when the syncing process is finished. If errors where reported during syncing, the

DBSyncErrorsBtn.jpg

button will stay active and clicking on this button, will show a two-column report about:
- Which file presented ran into an issue while being processed, and.
- What the nature of the problem was.

DBSyncErrorsDlg.jpg

 

Process Library’s DB Records (in the MS-Access File) and Process Files under the PLRF.

 

Viewing the Process Records in the Processes Databank

To view all the contents of the processes databank, select Databanks } Processes } Table of Contents... from the main menu (or hit F4 as a shortcut, or click on ProcessDBViewBtn.jpg button of the Process Library Toolbar). Alternatively, you can make the Process Library interface visible by clicking on the ShowHideProcessDB.jpg button of the main toolbar and then select the “View” tab. The following interface appears:

ProcessLib_ViewTab.jpg

Process Library Interface: View Tab.

The ‘View’ tab shows at its very first line, the location (folder) in your storage area used as the top-level folder for all the process files deposited in the library. This folder, known as the Process Library Root Folder or PLRF for short, contains in it, possibly in several sub-folders keeping contents properly organized, all the process models (‘.spf’ files) deposited by the user in the library. For each ‘.spf’ file committed to the library, the library manager will keep a single entry in the ‘Table of Contents’ of the library. This table of contents as shown in Process Library Interface: View Tab. contains a listing of all database records, one for each process file deposited in the process library. Each line in the table represents an ‘.spf’ kept somewhere under the PLRF. The file name and file location of the file behind the record is shown next to the record name in each line. Selecting a line in that table of contents, will display on the fields below the table the rest of the main attributes of that record:

1.   The file version of the associated ‘.spf’ file

2.   The author’s name

3.   The date the file contents were last saved

4.   The main product name (if specified)

5.   The production size (if a main product rate is defined)

6.   The operating mode of the process (batch vs continuous)

7.   Any comments / notes associate with the process file as a whole

8.   A list of keywords that can help identify/locate the file

As you can see in Searching in the Processes Databank topic below, users can put together search criteria based on the above properties (and more) in an attempt to locate any database records that fit their needs.

Using the buttons displayed above the Table of Library Contents, uses can also delete Delete00111.jpgselected records from the database or all records ( DeleteAllBtn.jpg ) if desired.

Notice that next to each record’s name, the library manager presents a small status bitmap that conveys to the user the status of the file associated with that record. There can be one of four possible icons:
DBFileStatus_OK.jpg file is there and available to be edited / viewed.
DBFileStatus_Missing.jpg file is missing or not accessible.
Chapter1500112.jpg file is there and currently open by SuperPro for viewing/editing.
DBFileStatus_Locked.jpg file is there but it’s locked as the user has installed some form of protection scheme (L1 or L2, see .“Protected and Password Process Files”) that prevents it from being modified.

The RefreshContentsBtn.jpg button will refresh the table by consulting with the database and the file system in case anything has changed since last time the table was populated.

9.   While a given record is selected, you can edit the list of keywords and/or the comments/notes associated with it by clicking on the Rename.jpgbutton first. When you are done editing the keywords and/or the comments kept with the library file, you can click on theChapter1500113.jpgto keep the changes or Delete00114.jpg to forget any changes made. .

IconInfo00115.bmp 

You will notice that for some library records, when selected, the button that allows you to edit its associated keywords and/or notes (

Rename00116.jpg

) is not active. There can be several reasons for that:

a) The file may be unavailable at the time or missing (the

DBFileStatus_Missing00117.jpg

 status should be showing)

a) The file may be open this time for editing (the

Chapter1500118.jpg

 status should be showing)

a) The file may be locked/protected (the

DBFileStatus_Locked00119.jpg

 status should be showing)

Searching in the Processes Databank

When you need to search through your collection of all process models (those deposited in your process database), select Databanks } Processes } Search... (Shift+F4) (or click on ProcessDBSearchBtn.jpg button of the Process Library Toolbar). If the process library interface is shown, simply select the “Search” tab. The “Process Library Interface: Search Tab” that will appear. From this interface you can search your database of process models deposited in your library in order to find one (or more) that meet your criteria. As you will see, even though every time you search, you only search against one criterion at a time, it is possible to find process models that fit a set of criteria “AND”-ed or “OR”-ed together. The key lies in the pool of records that each criterion is applied.

To reiterate: The steps needed to perform a search are:

a)  Compose a search criterion.

b)  Search over a pool of candidate records that can be either the entire set included in the database or the set found in a previous search.

ProcessLib_SearchTab.jpg

Process Library Interface: Search Tab.

Compositing a Search Criterion

A search criterion is essentially a statement about a property of some entity in a process model and a comparison mode used to either include or exclude models in the matching set. Here is some typical criteria statements:

      A process (flowsheet) that includes loops.

      A heat transfer agent with the name “CX2060”.

      A pure component with company name “RU-3443”

      A process with batch size greater than 100 kg / batch

The compose a search criterion you must choose three parts:

10.  The entity that is targeted; it could be a Pure Component, or a Heat Transfer Agent, or an Equipment, etc.; you select that in the first list box.

11.  The property of the Entity that the statement is about; it could be “The Company Name” of a Pure Component; or the “The Type” of Equipment; or the Batch Size of a Process (Flowsheet). Clearly, the property type depends on the chosen entity that the criterion statement is about. That’s way, first you pick the entity in the first list; then from the second listbox, you select the name of the property.

12.  The value of the property and the matching mode. Again, the options depend on the property type. If the property is a “True/False” statement (like ‘has recycle loops’), a binary choice is shown; if the property has a string value (e.g. the type of equipment), then a listbox with the available choices is presented; if the property can have a numeric value (e.g. the batch size of a process), then a numeric field is shown, preceded by an operation for larger, larger or equal, equal, smaller and smaller or equal.

If and when a criterion is properly formulated (as shown in the text box), the button labeled “Search” becomes active. The other two buttons (“Refine Search” and “Expand Search” may or may not become active; more on that later). Now you are ready to execute your search against the composed criterion:

Searching for Matches

When you click on ‘Search’ the search engine will scan through all the records in the database and present a listing of all records that match the composed criterion. The listing of all matches will be called the ‘currently matching set of records’ and it is shown in the table below.

Once you have a currently matching set of records, you can now compose another criterion and then click on ‘Refine Search’. This time, the searching engine will search for a new ‘matching set of records’ to your new criterion, but the search pool or records will be the previously established set of matches (not the entire pool as contained in the database). Therefore, any results that are now presented, are essentially those that match both criteria (the first AND the second). In essence, this is the result of matching two criteria AND-ed together.

Once you have a currently matching set of records, if you compose another criterion and this time click on ‘Expand Search’, the searching engine will search in all the records in the database and whatever records it finds that match your new criterion will be added to the previous set of matching records, in essence, executing an “OR” between the two criteria. Therefore, the new listing shown in the table, will be the result of searching in the entire pool or records the two criteria “OR”-ed together.

When you select a line in the table of resulting matches, you can click on OpenProcessDBFileBtn.jpg to open the ‘.spf’ file behind the record for editing / viewing in SuperPro. .If you click on the Delete00120.jpg button (with a record selected), the selected record will be deleted from the process database.

IconInfo00121.bmp 

After clicking on the ‘Delete’ button, the selected record(s) will be deleted from the database itself and that action is not reversible. The related ‘.spf ‘files though, will still remain in your PLRF, so if you later change your mind, you can redeposit them in the process database. If you don’t delete the ‘.spf’ file(s) and later ‘Synch’ your Process Library, the files will be re-registered in the process database.

If you click on the DBHelpBtn.jpg button a help screen with useful information about how to use the ‘Search Tab’ will appear (this content).