PIAS Manual  2021 Program for the Integral Approach of Shipdesign
Installation details
In this chapter additional functions and properties of PIAS are described. A common user can safely skip this chapter, however, in quest of installation details or specific functions one could benefit from reading this material.

# Additional installation and update details from the Codemeter software protection

In Codemeter (from 2017) an introduction is given to the Codemeter software protection. This chapter discusses its installation and update procedure.

## Codemeter installation

PIAS is protected by means of a licensing mechanism using Codemeter dongles from Wibu-systems (=hardware lock). The dongle can be used directly in a local PC, or in a PC in the network/LAN (server) and the licenses are available to all computers which are part of this LAN (clients). A driver is required, to enable communication between (the installed) PIAS software and the dongle. The installation of this driver is described below:

• Select CodeMeter User Runtime for Windows.
• Install the downloaded software on [a] the network PC acting as license server and [b] the client computers running PIAS. Please note that [a] and [b] can be physically the same PC.
• If [a] and [b] are different computers then proceed as follows:
• After installation, insert the dongle and open the Codemeter Control Center on [a] on the right lower side of the window click Webadmin.
• In the WebAdmin click Configuration Server.
• Under section Network Server select Enable.
• Click Apply. Note the IP adress or Hostname of the Server. Now open the Codemeter Control Center on [b]. Again, on the right lower side of the window click Webadmin. In the WebAdmin click Configuration, Basic. Under section Server Search List click Add.
• Type the server IP address or hostname (obtained in the previous step) and click Apply. . If this installation is not done, the Codemeter system itself might still be functioning, although every time communication with the lock is needed the entire network is searched for it, which can make the program operation rather slow. It is therefore advisable to go through these steps carefully.
• If [a] and [b] are physically the same computer then take these steps:
• After installation of the codemeter runtime system, insert the dongle and open the Codemeter Control Center on the PC.
• On the right lower side of the window click Webadmin.
• In the WebAdmin click Configuration, Basic.
• Under section Server Search List click Add. Type 127.0.0.1 (or “localhost”) and click Apply. On client request the licensing system might be equipped with a (server-specific) licensing file, instead of a dongle. This does not change the installation procedure (apart from the fact that the dongle is lacking).

Licences can be remotely switched on, off or added by SARC (temporarily). This mechanism works as follows: A PIAS user first creates a license requests file. The user then sends this file (by email) to SARC. SARC uses this request file to create a license update file and returns it (by email) to the PIAS user. This file allows the user to update the licenses. The exact procedure is described below:

• Open CodeMeter Control Center (CCC) on the computer with the license (stick or CMact) installed.
• Select the stick or CMact to update. Now click “Update License" button. - Click “Next".
• Click “Next”.
• Choose Vendor “SARC”.
• Click “Next”.
• Note/modify the file location the license request file will be stored (extension .wibuCmRaC).
• Click “Commit”.
• Send the request file to SARC.
• Based on this file SARC can create and return an update file (extension .wibuCRAU) and returns the file to the PIAS user.
• Drag this file in the CodeMeterControl Center and the license will automatically update. After the update a dialog confirms if update of the license was successful.

# Additional installation details from the Sentinel hardware key

In Sentinel (until 2017) an introduction to the Sentinel key has been given. This chapter contains additional technical installation details.

## Required DLL

To enable communication between PIAS programs and the Sentinel, the file sx32w.DLL is required. When installing PIAS this DLL is automatically installed at the location of the PIAS program. The DLL must remain available at the location of the PIAS program.

## Network Sentinel SuperPro

The Network Sentinel Superpro is a hardware lock which can be used in a network The Sentinel is plugged into one of the computers on the network, other computers on the network can retrieve licenses from this sentinel. In this way PIAS is available throughout the network, without the need to exchange a hardware lock between computers, as is the case with a regular Sentinel SuperPro. The program ‘Sentinel server protection’ must be installed on the computer where the Network Sentinel SuperPro is plugged in. This program provides the connection between the Sentinel and the network and can be downloaded from the Safenet download site or via a direct link on the SARC website, www.sarc.nl/download. The server allows a maximum number of PIAS modules to be used simultaneously which corresponds to the maximum number of available licenses. All PIAS modules are taken into account, whether they operate on the same computer or on different computers.

## Manual and utilities

From www.safenet-inc.com manuals and utilities for the (Network-) Sentinel SuperPro are available for download.

The manual is available through SafeNet User Guide.pdf. A useful utility is ‘Safenet Sentinel Advanced Medic’, with this program it is possible to check whether the required driver and server are installed correctly. Another handy tool is ‘Monitor’, which can be used to see how many licenses are in use.

## Possible Sentinel malfunctioning

A PIAS module asks the Sentinel if a license is available and uses a license if possible. When the program is stopped that license is released. If a PIAS program is closed (even if it is removed from the task list via <Ctrl-Alt-Del>), the sentinel always receives a signal from the operating system that the program is terminated, so the license can be properly released. If a program is terminated using the reset button, or by turning off the computer, the license will not be released and is ‘pending’. However, the system includes a timer which releases the pending license after about 1½ minutes.
If the sentinel is not found, the program displays an error message. Here are some possible causes of this problem:
• Windows firewall or anti-virus software may prevent communication between PIAS programs and the sentinel. In this case the anti-virus software must be configured to allow the PIAS programs to communicate.
• In a network environment, you may find that it takes a long time to contact the sentinel or the sentinel is not found at all. With a external variable (see External variables) SENTINEL_SERVER = IP ADDRESS you can specify the IP address of the system on which the sentinel is plugged in. When the external variable is used, the sentinel software connects directly to the indicated computer instead of searching the entire network.

# PIAS distribution

## Distribution channel

Updates from PIAS can be obtained in two ways:

• Order on memorystick at SARC, against cost price.

Further distribution over your own computer network should be done by yourself. That will be standard procedure, however, if PIAS must be installed on many workstations that's always a chore. PIAS is able to do that automatically. At SARC a document can be obtained in which the modus operandi is discussed.

## Version number and production date

PIAS' help menu (see Help) includes two functions to request software creation date (compilation date) and version number (revision number). This can be used to determine whether it is time to download and install an update. For each user, a new version of PIAS is regularly created and set ready for download. So, this has a recent date and a version number, to which the following should be added:

• The revision is a number which is incremented by 1 upon each source code change. In this respect, not every change in source code is structural, for example, there are adjustments to the manual, correction of spelling errors, addition of new PIAS and LOCOPIAS customers, experiments and functionality in development that does not affect your specific PIAS version. E.g. 50 revision numbers may pass without anything essential having been changed in your version.
• The same applies to the date of creation: almost every day (often also in weekends and holidays), an up-to-date PIAS is automatically created for every user, even without any changes to your version.

When it is useful to actually install an update:

• In any case on a regular basis. PIAS is constantly being improved and expanded, and even a collection of corrected typographical errors or a new auxiliary function is nice to have. For example, once every six months.
• After significant extensions or modifications have been completed. Depending on your package size, they may come in bits and pieces for a few weeks or months, and then in a pace of two per week. You will be kept informed of such changes through the sources of information as discussed in Manuals, exercises and information sources.

# Digitizer function keys

It stimulates a smooth operation of a digitizer if it would be equipped with function keys (or a similar feature), however, that is only seldom the case. So, they can be emulated by sticking a function key sticker on the digitizer, as depicted in the image below. You can print this sticker, stick it in the top right corner of the digitizer, and use it for digitizing commands. Please make sure to print teh sticker at the designated width of 27.5 mm. This can be achieved by using the sticker from the pdf manual, instead as those from the HTML or help reader versions. Alternatively, the sticker can be placed in the bottom left corner, in that case an additional setting is required, for which reference is made to Functions_digitizer_low in External variables.

Digitizersticker to print from pdf-manual

# Computer clock

In order to increase computation speed, in quite some occasions PIAS only will perform a computation if the data have been changed since the last one. E.g. a tank table in Layout is recalculated only when the tank (or hull) has really been changed. In order to assess whteher a recalculation is actually required, the definition time as well as the calculation time are stored, and compared if a new calculation is requested. To this end, it is of the utmost importance that your computer clock is functioning well and indicates the correct time, because data changes may otherwise remain unresolved.

# Temporary files

Just like much other contemporary software, in the background PIAS makes use of temporary files. The use of these files will be unknown to the user unless there is a problem while creating or writing to these files. For example, if PIAS tries to create a such a file in a directory where the user is not allowed to create or write files. The directory location for temporary files is handled by the operating system, where Windows applies these rules:

• The path specified by the TMP environment variable.
• The path specified by the TEMP environment variable, if TMP is not defined.
• The Windows directory, if neither TMP nor TEMP are defined.

# ASCII text file

When the manual mentions ASCII text files, it means a plain text file without control codes. A text file generated with a ‘normal’ word processor (such as MS-Word) frequently contains control codes for the purpose of formatting. To create a plain text file the word processor must be configured such that control codes are not added. An alternative option is editing ASCII files with a simple editor, such as Notepad or Notepad++ (for free).

# Unicode text file

An ASCII file can more or less only contain Anglo-saxon characters. In order to accommodate also characters from other scripts, internationally, the Unicode standard was developed. Unicode is also supported by PIAS in the static output, which is the output text as included in the program as such. A Unicode file, can be edited with Unicode text editors. A plethora of Unicode editors is available, at SARC we use the free Babelpad. Using Unicode in input data of PIAS, such as names of tanks or loading conditions, is a subject of future development.

# Export to and import from XML

XML is an international data exchange standard. Not primarily from drawing or product information, but in general for structured data collections (“data bases”). In a sense XML is an empty shell, which can be filled for a particular application. Such content has a meaning for the reader and writer of such a file, where the meaning is given by terms, which are called markup in XML parlance. These terms are free to choose, and must be defined somewhere, in a dictionary, preferably including meaning and units. A nicety of XML is that in general quite expressive terms can be chosen, e.g. longitudinal_centre_of_flotation_from_aft_perpendicular, which does not really require a dictionary to grasp its meaning.

For data exchange, XML is the preferred standard within PIAS, so that it will gradually be implemented in ever more places. There is already a large list of keywords for this which typically relate to ship design. These are summarised in the document “SARC XML dictionary on ship design data and commands” which is available on request from SARC (including a number of sample XML files).

It should be borne in mind that not every input or output parameter of PIAS has an XML counterpart. It would be a serious task to implement that, and who is going to use it all? That's why PIAS is currently equipped with XML support that was most in demand, such as XML output from Loading and Hydrotables, and two-way traffic (input and output) in Layout and Hulldef. Furthermore, XML support is added on demand, i.e. that specific XML functionality can be included in PIAS at the specific request of a user, against payment of the development costs, or sometimes a part thereof.

At the moment, a PIAS basic rule for reading an XML file is that it will replace any existing data of that ship or project in its entirety. Reading such a file is really focused on the once-only import of all ship data, and not on incremental or interactive import. For such applications, something could be suggested or conceptualized, but there will first have to be context and scenarios before this could be put into practice in a generally usable way. At the time of writing (2018), however, a project is under development which focuses on interactive cooperation between various computer programs, notably between CADMATIC and PIAS. This system also works on the basis of XML, but that is communicated directly over the network, so that there is no question of an XML file. Anyway, this is beyond the XML file functionality available for the standard version of PIAS.

# Output in different languages

The output PIAS can be done in different languages. All these output texts are included in separate text files, often named programname.txt (eg. Hydrotables.txt with the Hydrotables module). Such a file is a Unicode text file, please refer to the Unicode discussion just above. Each such a language file contains many text blocks, with in each block one line of PIAS output in multiple languages. At the file start a counter is included which represents the number of supported languages for that file. Subsequently, a block with language coding, e.g. nl for Dutch and en for English, according the ISO-639 standard.

In cooperation with SARC, each PIAS user is in principle free to add languages using these files, according to this procedure:

• Contact SARC, because the software itself will also require a small extension to accommodate the new language.
• Ensure to use indeed the most recent language files of PIAS.
• Create a complete translation per language file (which in general corresponds with a single PIAS module or function). So that the lines which remain unused at a project or some output will not remain untranslated.
• Please notify SARC which language files are to be extended. Then SARC is aware not to include new texts in those language files.
• Use a limited amount of time per language file, and forward each finalized language file directly to SARC.
• Accept that the extended language files will be distributed to all PIAS users. it is not possible to manage language file for individual users.
• In the future from time to time verify whether new phrases have been added to the language files, add a suitable translation for those lines, and forward it to SARC so that the whole system remains up-to-date. New texts can be recognized by a series of question marks.
Attention
Standard PIAS supports output in Dutch and English, which languages are maintained by SARC. For many modules also other languages are available, such as German, Chinese or Russian. These languages are not actively supported by SARC. If you encounter a “????????” in the PIAS output, it means that the output text for the selected language is not available. If a consistent output in the chosen language is of interest to you, then the corresponding language files can be modified using the procedure above.

# External variables

With external variables PIAS can be configured. Either for a particular option, or for an exotic switch that found to place in a regular menu. It must be considered that the application of external variables is an exception, only intended for specific options or limited to a small number of users. A regular user should not specifically need to apply them. An external variable consists of an argument (= the variable name) and a value. There are four alternative ways to specify an external variable:

• As an environment variable of the operating system, in the form variable=value, e.g. PIASmailserver=xyz. Under Windows an environment variable can be defined with a set command in a CMD-window (a.k.a. “DOS-box”) or in the System Properties Panel. For more details please consult the Windows documentation.
• In an ASCII text file named PIAS.CFG, which must be located in the directory which also contains the PIAS programs themselves. This file contains a number of lines, with on each line one variable and the corresponding value (without the “=” symbol).
• As an additional argument (command line parameter) when invoking Piasmenu. E.g. Piasmenu PIASmailserver=xyz.

## List of external variables

piasname=XXX
To specify a fixed file name.
pias_page_height=XXX
Applicable to the output to preview/clipboard, where it can be used to specify the target paper height (in mm).
pias_preview_character_hb_ratio=XXX
In order to specify, at the output to preview/clipboard, that PIAS should apply a character height/breadth ratio of XXX, when composing the lay-out of a page. When the variable is set as follows: pias_preview_character_hb_ratio=standard, PIAS sets the ratio to 1.80.
Functions_digitizer_low=1
Functions_digitizer_low=1 to specify that on the digitizing tablet the sticker with function keys is placed on the lower-left corner (instead of the default upper-right corner).
Australian_livestock=yes
Specifies that in the calculation of intact stability, instead of the default heeling grain moments, the heeling moments according to the Australian (AMSA) requirements for livestock transport will be used. For a complete output according to AMSA intact stability criteria for the carriage of cattle this variable must be set; only applying the AMSA stability criteria is not sufficient.
Frame_interpolate=1
Offers at the module for hull form definition (see Frames (frame positions and frame shapes)) the option to interpolate intermediate frames. Here the same question could be raised as with the previous setting, and the answer would be similar: this interpolation option is rather limited, in the first place there is the requirement that the frames at both sides of the new frames to be created have the same number of points. And then all corresponding points are connected and new points are linearly interpolated. It could not be simpler, if a more advanced method of interpolation is required, Fairway is recommended, this module has been designed for these kinds of operations. And also, by using this setting here you agree to accept this simple method.
PIASmailserver=xxx
Specifies the address of the e-mailserver to be used by PIAS. This server should be configured in such a way that the workstation on which PIAS runs is allowed to send e-mails with the SMTP-protocol. Moreover, these email settings can be specified per project as well, See also: E-mail settings
PIASemailsender=xxx
The e-mail address of the sender.
PIASemailrecipient=xxx
The e-mail address of the recipient.
PIAS_TIME_RECORD_FILE=XXX\ YYY
A file YYY will be written/updated in the directory XXX. A record of time of usage of PIAS software is kept in this file. Every PIAS module writes the following information per session: Elapsed seconds between start time and end time [sec], start time [dd/mm/yy hh:mm], end time [dd/mm/yy hh:mm], username, program name, project directory+filename. It is also possible to define a project description with the external variabele PIAS_PROJECT_NAME, that one will also be included in this file. Convenient for automated hour registration!
The IP-address of the PC in the network where the superpro netsentinel is plugged in. If this external variable is set, the application will only look for the sentinel on this address.
ANSIcharset=1
By mid-2011 PIAS switched to the use of the Unicode character set for the representation of international characters. With Unicode much more characters are available, which benefits non-western languages in particular. Some PIAS users applied non-standard characters for e.g. the names of tanks or loading conditions. These characters were coded (by Windows) in ANSI or OEM, which is unfortunately incompatible with Unicode. In order to avoid too much inconvenience, PIAS can be instructed with this external variable to treat special characters in the same fashion as before (although 100% correctness can not be guaranteed). However, please be advised that the ANSI/OEM standard is basically incompatible with Unicode, so that it is better to avoid this method from now on. In due time an integrated facility will be created in PIAS to use special characters according to the Unicode standard.
To switch off PIAS' multithreading facility (which is active by default, if purchased).

# Speed enhancing mechanisms in PIAS: PIAS/ES

A characteristic of our naval architectural profession is that we often encounter intensive calculation tasks. Although the computer serves us well in this area for decades already, the processing time may still be a bottleneck, also because man has adapted himself to the increased processing power, and demands more extended calculations than without the computer would have been the case. This mechanism also manifests itself with PIAS, so it is worthwhile to strive for an optimized calculation process. Processors of modern PC’s offer more and more cores. In order to squeeze as much power as possible out of the computer, PIAS and LOCOPIAS are increasingly distributing their tasks into multiple threads. For that purpose, PIAS has been equipped with three speed-enhancing packages, named PIAS /ES, where ES is an acronym of Enhanced Speed, Dualthreading, Octothreading and Viginitythreading.

This option, which was implemented in PIAS around 2005, uses the processor technology that became generally available in that period. For a long time past a PC generally had one processor, while this processor contains one core. That implies that the computer can process one task at a time (although the operating system may fool you, and give the impression that multiple tasks are processed simultaneously). However, there is a tendency where a computer is equipped with multiple real or virtual processors (which are multi-processor and multi-core machines respectively). So, this technology enables a program to execute tasks parallel, but the software will have to be adapted for that facility, where tasks which are suitable for simultaneous processing are explicitly offered to the processor for parallel processing. That implies that for every function of a software package it must be considered whether or not it is suitable for parallel processing, and it must be adapted accordingly, if appropriate. Limiting ourselves to PIAS, many tasks can be recognized which can be processed parallel, such as calculating damage stability for multiple angles of inclination, or drawing hull lines with Fairway. On the other hand, there are also jobs which are not suitable, such as the calculation of intermediate stages of flooding, where at first the final stage must be determined, whereupon the water level which corresponds to the filling percentage can be calculated. The following subjects have been implemented:

• At all intact and damage stability calculations: the computation of stability, simultaneously for all angles of inclination (except for the first angle).
• At probabilistic damage stability: the computation of the probability of damage by means of numerical integration (by applying multiple integration threads simultaneously).
• At Layout the computation of the several intersections between bulkheads and/or compartment boundaries.

Octothreading is applied in a number of core algorithms in PIAS, which will be increased in the course of time. Incidentally, multithreading can only be applied in algorithms that are inherently capable to be parallelized, from which PIAS contains quite a number. However, some tasks are sequential in nature and thus cannot be multithreaded. This means that the implementation in PIAS must be considered case by case, there is no magic stick which will distribute the tasks of a program such as PIAS over all processors.

As described in the previous paragraph, PIAS was adapted around 2015 so that more than two calculation cores can be used in parallel. In view of the overhead time involved in starting up a separate calculation task, a maximum of 8 simultaneous calculation tasks was chosen at the time. Meanwhile, multithreading has been implemented in even more places within the PIAS for lengthy and compute-intensive tasks such as:

• At probabilistic damage stability: the optimization of the damage boundaries.
• At probabilistic damage stability: the generation of damage cases.

The last few years multi-core computers have become widely available and there are now PC‘s available for the common user which have ten or more cores, where hyperthreading allows twenty or more threads to run simultaneously. Especially with time consuming calculation tasks, such as the ones mentioned above, the overhead time hardly plays a role and one can gain a considerable amount of time by calculating with more than 8 threads. Therefore, the maximum number of parallel processes within PIAS has been increased from eight (octothreading) to twenty. We have called this vigintithreading.

## PIAS ES 2 / PIAS ES 3: AVX

While developing octothreading, every option was used to maximize the computing speed of PIAS. Contemporary processors have facilities for simultaneously running multiple floating point operations — which are relatively time-consuming, so where it would be advantageous to do a number of them at the same time if the computation algorithm allows. Intel baptized these facilities AVX2. Both the octothreading and vigintithreading version of PIAS utilizes deep in her computation core AVX2 as much as possible.

## Limit number of processors to be used

Finally, there is an additional feature for when you just do not want all processors to be taken into use by PIAS, for example, if one wants to use the computer simultaneously for other processor-intensive tasks. This can be set with ‘Maximum number of PIAS processors’ as discussed in Program setup.