You are on page 1of 15

Lanner Group WITNESS Hints & Tips Service summary

WITNESS Hints & Tips


Version 5.5
24/07/2002


Page 1 of 15

Author: Lanner Group Customer Support Centre
Lanner Group WITNESS Hints & Tips Service summary
Overview
How to use this document:

This document will be sent by e-mail to all maintained WITNESS customers who
wish to receive it. The mail will be sent out periodically with a selection of hints &
tips to help you use your WITNESS system more effectively. Each issue more tips
will be added and the contents list will be updated. To remove yourself from the
list of people who receive this mail please reply to this e-mail with the text
REMOVE in the subject field.

To search for a tip relating to a particular area then you can use the Find option
from the Tools menu.

The Whats New section in this document will contain a brief summary of new
tips in this issue.

In the body of detail for each tips there will be a reference to the Tip number on
our Web site www.lanner.com if the tip is included there in the Support page.
Where there is an example model for the tip you can download this from the
Web. You may need to Register for on-line support which can be done from the
support page. We will mail you back with the User name and Password. The
address direct to the relevant tip is given. Clicking on this will take you directly to
the tip on the Web.





Whats New
New tips this issue:

Tip 5.021: How to protect your model detail from others.

Tip 5.022: How to run actions when you rewind a model.

Tip 5.023: How to setup your PC to so that when you double click on a WITNESS
MOD file in explorer it will load in WITNESS.

Tip 5.024: Managing License Codes in WITNESS 2002.

Tip 5.025: Increased run speed using local variables.

There is also a direct reference to the tip on the Web where relevant. See above
for details.




Page 2 of 15

Author: Lanner Group Customer Support Centre
Lanner Group WITNESS Hints & Tips Service summary

Overview................................................................................................................................................2
Whats New.......................................................................................................................................2
Modelling tips.......................................................................................................................................4
Tip 5.001: How to refer to elements at the top level when you are using
modules. ............................................................................................................................................4
Tip 5.002: How to write to the next row in Excel. ............................................................4
Tip 5.003: How to justify the display of values in an array. .........................................4
Tip 5.004: How to ensure that the same labor / resource returns to a job when
it comes back on shift..................................................................................................................4
Tip 5.005: Assigning a Labour Resource to a Vehicle. ....................................................5
Tip 5.006: How to pull from a buffer / queue at a random position. ........................6
Tip 5.007: How to model jobs with many stages where a job may be rejected
before the final stage. ..................................................................................................................6
Tip 5.008: How to read a job schedule from file...............................................................7
Tip 5.009: The use of customisable toolbars in your WITNESS model.....................7
Tip 5.010: How to stop a model run when it is stuck in a loop...................................7
Tip 5.011: Using designer element files. ..............................................................................7
Tip 5.012: Pushing and Pulling from Conveyors................................................................8
Tip 5.013: How to force output from a multi-cycle machine / multiple task
activity in a specified order........................................................................................................8
Tip 5.014: How to ensure that breakdowns / stoppages are not worked
simultaneously................................................................................................................................8
Tip 5.015: Window control. How to zoom your window to a selected area............9
Tip 5.016: Recording to AVI. ...................................................................................................9
Tip 5.017: Tying a Labor / Resource to a Part / Entity.................................................10
Tip 5.018: Use of a variable path update interval. .........................................................12
Tip 5.019: Defining a Part or entitys Style via Actions on Create to avoid using
the Display Tool Bar. ..................................................................................................................12
Tip 5.020: Saving a Module as a Designer Element. .....................................................13
Tip 5.021: How to protect your model detail from others...........................................13
Tip 5.022: How to run actions when you rewind a model. ..........................................13
Tip 5.023: How to setup your PC to so that when you double click on a
WITNESS MOD file in explorer it will load in WITNESS.................................................14
Tip 5.024: Managing License Codes in WITNESS 2002. ...............................................14
Tip 5.025: Increased run speed using local variables...................................................14
Page 3 of 15

Author: Lanner Group Customer Support Centre
Lanner Group WITNESS Hints & Tips Service summary
Modelling tips
Tip 5.001: How to refer to elements at the top level when you are using
modules.

This is Hint #112 on our Web site.
http://www.lanner.com/Secure/Tips/hint112.html

When building large models it is common practice to use modules. This allows
parts of your model to be easily copied within the same model or to a new model.
Within the structure of such a model you may use the same name for elements
within different modules. These can be referenced by the syntax
'modulename.elementname'. If you use this syntax within modulename then the
reference to the module is unnecessary and will be dropped so that you have
'elementname'. If you have an element 'elementname' at the top level within
your model this can be referenced by the syntax 'w.elementname'. The 'w' forces
WITNESS to look at the top modular level within the model.
Tip 5.002: How to write to the next row in Excel.

This is Hint #113 on our Web site.
http://www.lanner.com/Secure/Tips/hint113.html An example model can be
downloaded from the Web.

From your model you may like to write a line of information at regular intervals to
record, for example, the current status of the model. When writing to Excel you
must specify the row number to write to. In the model each Job which leaves
Process has its departure time, TYPE and time in the system written to the next
row in Excel. To achieve this an integer variable is updated to store the next row
number to be written to. This is used in the Excel write statements to create the
string expression for the cell to write to. As an alternative you may prefer to
update a cell in the workbook which holds the next row to write to.

Tip 5.003: How to justify the display of values in an array.

This is Hint #114 on our Web site.
http://www.lanner.com/Secure/Tips/hint114.html An example model can be
downloaded from the Web.

If you have an array of values displayed in your model you may find that they are
not neatly justified when they have values of different length. In the model the
integer array takes values when you run the model. As you will see the Arial font
used in the top display does not justify the values. The use of the Courier font in
the lower display does justify the array much more neatly. You will also find that
the WITNESS fonts behave in a similar way to Courier.

Tip 5.004: How to ensure that the same labor / resource returns to a job
when it comes back on shift.

This is Hint #115 on our Web site.
http://www.lanner.com/Secure/Tips/hint115.html An example model can be
downloaded from the Web.

Page 4 of 15

Author: Lanner Group Customer Support Centre
Lanner Group WITNESS Hints & Tips Service summary
Two variables are used to control this. The name variable PersonAtWork holds the
name of the labor / resource working on that machine / activity. Its value is set
in actions on start for each machine / activity and is reset to NONE in action on
finish. The labor / resource rule for each machine / activity requires Person if
PersonAtWork has value NONE or the value of PersonAtWork if that variable holds
a value. This relies on the fact that specifying the group name in a labor /
resource rule will find any free member of that group. The value of
PersonAtWork, when set will include the index of the labor / resource thus
ensuring that the same Person completes the job. To ensure that a Person is not
obtainend by another Work area the variable Priority is set to 1 in actions on start
and reset to the default value of 10 in actions on finish. Labor / Resource is
allocated before actions on start so the priority will only be used if labor /
resource is taken away due to the end of a shift working period. When shift
restarts the job allocated will have priority one and hence the labor / resource will
return to the same job. Work002 is a multi-cycle machine / activity and its
Priority variable setting ensures that the same labor / resource will work on all
three cycles.

Tip 5.005: Assigning a Labour Resource to a Vehicle.

This is Hint #116 on our Web site.
http://www.lanner.com/Secure/Tips/hint116.html An example model can be
downloaded from the Web.

Although it is not directly possible to assign labour resources to vehicles, this can
still be effected through use of a dummy machine to simulate the driving activity
whilst the vehicle moves. This model shows how to do this.
As parts arrive at buffer/queue B1 the buffer's Actions on Input place a call in the
vehicle's (Fork_Lift) demand list with the code....
CALL Fork_Lift,T1,T3,0
The same actions then go on to check to see if the driver is currently idle using
the NAVAIL function, and if so assign the demand to an idle truck in the
Truck_Park track with VSEARCH....
IF NAVAIL (Driver) > 0
VSEARCH Truck_Park
ELSE
VSEARCH T1,T4,T3,T2
ENDIF
When required the driver will be occupied by the dummy machine called Driving.
Driving cycles just one part for a very long cycle time (longer than the model
run). Driving is disabled whenever a vehicle enters the Truck_Park track with
BREAKDWN(Driving), which effectively releases any labour attending it. Driving is
repaired with REPAIR(Driving) via the get_driver() function which is called from
the Output Rule for Truck_Park when it wants to PUSH a vehicle.
The Output Rule for Truck_Park is where most of the functionality takes place,
and although it appears fairly complex each stage is actually quite simple....
IF DESTOF1 (Fork_Lift(I)) = NONE ! Has the vehicle got a destination set?
IF NAVAIL (Driver) > 0 ! Is the driver free to come and drive?
IF Search_Park () = 1 ! Calls VSEARCH to assign a call and destination to the
vehicle
IF DESTOF1 (Fork_Lift(I)) <> NONE ! Did VSEARCH assign a call and destination
to the vehicle?
IF REPAIR (Driving(I)) < 2 ! Repairs the Driving machine and so takes the driver
IF LABORAT (Driving(I),1,1) <> NONE ! Checks that the driver is now
successfully assigned to drive
PUSH to T1
Page 5 of 15

Author: Lanner Group Customer Support Centre
Lanner Group WITNESS Hints & Tips Service summary
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ELSEIF REPAIR (Driving(I)) < 2 ! Repairs the Driving machine and so takes the
driver
IF LABORAT (Driving(I),1,1) <> NONE ! Checks that the driver is now
successfully assigned to drive
PUSH to T1
ENDIF
ELSE
Wait
ENDIF
The Search_Park() function is used to facilitate the VSEARCH command as
WITNESS will not allow any commands to be run directly within an Output Rule
(other than Output Rules e.g. PUSH, PERCENT, SEQUENCE etc.)
It is quite possible to model more sophisticated scenarios than this model shows
including a number of vehicles and drivers, and circumstances where a driver
might get off a vehicle to complete a task and then go back to the same vehicle
to continue driving. If you have more advanced requirements for modelling labour
on vehicles please contact Lanner to discuss the ways in which we might be able
to assist.

Tip 5.006: How to pull from a buffer / queue at a random position.

This is Hint #117 on our Web site.
http://www.lanner.com/Secure/Tips/hint117.html An example model can be
downloaded from the Web.

By default, WITNESS buffers / queues have the Output Option set to 'First' which
means that the part / entity at the front of the buffer / queue will be pulled. Hint
62 details how to pull a part from a specified position in a buffer / queue. In your
modelling you may wish to pull from a random position in the buffer / queue. This
can be achieved in a similar way. In the model the function PULLrandom samples
a position in the buffer / queue specified in the parameter 'source'. The attribute
'chosen' is set and is used as the output condition of Store001.

Tip 5.007: How to model jobs with many stages where a job may be
rejected before the final stage.

This is Hint #118 on our Web site.
http://www.lanner.com/Secure/Tips/hint118.html An example model can be
downloaded from the Web.

In your modelling, you may need to model a situation where jobs may go through
many stages, but those jobs may be rerouted at any stage. This can be modelled
by the use of a multi-cycle machine. In the model Multi_cycle_solution processes
jobs and has a failure rate determined by the variable PercentFail. A sample is
taken in actions on finish of cycle 1. If a failure is detected the attribute
Failed_Test has its value set to 1. The output quantity of the cycle uses that
variable. As a resultt the rejected part is pushed out and since the output
quantity is equal to the finish quantity the machine reverts to cycle 1 and pulls
the next job in. This model makes use of the fact that if a multi-cycle machine
has a cycle for which the finish quantity is equal to the output quantity then it will
Page 6 of 15

Author: Lanner Group Customer Support Centre
Lanner Group WITNESS Hints & Tips Service summary
revert to cycle one when the parts have been pushed out.

Tip 5.008: How to read a job schedule from file.

This is Hint #119 on our Web site.
http://www.lanner.com/Secure/Tips/hint119.html An example model can be
downloaded from the Web.

This model shows how a sequence of jobs can be read from file. The file contains
a list of batches and for each batch an id attribute, batch quantity and the
process time for that batch. The first line is read in model initialise actions. A new
line is then read in actions on start of Process001 when a new batch is started.
Here a variable Done is updated to count the jobs processed for that batch. When
the required number have been pulled in the next line is read from the file. Note
that the batch process time is held in an attribute. This is necessary since more
than one batch may be in progress at any time.

Tip 5.009: The use of customisable toolbars in your WITNESS model.

This is Hint #120 on our Web site.
http://www.lanner.com/Secure/Tips/hint120.html An example model can be
downloaded from the Web.

In your modelling you may need to customise the interface with model specific
commands and prompts. This can be achieved by the use of model toolbars and
model buttons. A 'standard' button can be used to execute actions which you
specify. In the model two 'toggle' buttons are used. These toggle the value of the
variables x and y. Based on the new values of x or y window 1 or 2 is opened /
closed. This is detailed in the actions for the buttons. To see this you should
select from the menus 'View / Toolbars / customise' or 'Model / User Commands'.
In the model the buttons have Help Text. This is what you see when you press
SHIFT F1 and then click the button. You should be careful to check the 'Model
Only Commands Toolbar' option when creating a new toolbar since model
commands are not allowed on WITNESS toolbars.

Tip 5.010: How to stop a model run when it is stuck in a loop.

This is Hint #121 on our Web site.
http://www.lanner.com/Secure/Tips/hint121.html

When running your model you may get to the point where your model "hangs".
An example of why this may occur is due to a loop in some actions which the
code cannot escape from; an "infinite loop". You can break into this by pressing
<CTRL> Q from the keyboard. You will have the options to 'Stop simulation',
'Cancel' or 'Exit Program'. Depending on the state of the run 'Stop simulation'
option may or may not interrupt the run to allow you to save the model.

Tip 5.011: Using designer element files.

This is Hint #126 on our Web site.
http://www.lanner.com/Secure/Tips/hint126.html

Page 7 of 15

Author: Lanner Group Customer Support Centre
Lanner Group WITNESS Hints & Tips Service summary
In your modelling you may find that when you start a new model you rebuild
common characteristics into your elements. This is where designer elements can
be used effectively. By default, WITNESS will open startup.mod which contains a
standard set of elements, one of each type. In your modelling environment you
may have certain characteristics for each type of element which you would like to
use when you start a new model. These basic elements can be added to our own
designer element set which you can then use whenever you start a new model.
To save the designer elements from a model you can create a designer elements
(.DES) file. You can save a set of designer elements to file by selecting from the
menus Files / Save As and choosing Files of Type 'Designer Element Files
(*.des)'. This file can then be imported to a new model to append to or replace
the existing designer element set.

Tip 5.012: Pushing and Pulling from Conveyors.

This is Hint #125 on our Web site.
http://www.lanner.com/Secure/Tips/hint125.html

The exact rules used for routing parts to and from conveyors matter very much in
obtaining the desired modelling result. WITNESS conveyors are a discrete entity
which model a continuous entity. The exact moment that one conveyor passes a
part to the next conveyor, actually is not an instant. In reality there is a time
when a part is overlapping both conveyors. In order to provide fast, effective
modelling WITNESS approximates the transfer in a simple way and the different
rules that can be applied provide different options as to how the model runs.
Details on how WITNESS operates in this area can be found in the Help Search
for Conveyors in the index and then select the topic "Routing" from the list below.
The topic "Routing to and from conveyors" will then explain how movement of
parts to and from conveyors works. It does matter whether you pull or you push.

Tip 5.013: How to force output from a multi-cycle machine / multiple
task activity in a specified order.

This is Hint #124 on our Web site.
http://www.lanner.com/Secure/Tips/hint124.html An example model can be
downloaded from the Web.

By default parts / entities output from machines / activities are pushed out from
the front position first. In your model you may need to push your parts / entities
out in a specific order. In the model this has been achieved on cycle 4 'output b
then a' by setting the 'Output from' option on that cycle to be Any. The output
quantity for that cycle is 2. The output rule is a SEQUENCE rule which forces the
parts to be pushed in the specified order; b first and then a.

Tip 5.014: How to ensure that breakdowns / stoppages are not worked
simultaneously.

This is Hint #123 on our Web site.
http://www.lanner.com/Secure/Tips/hint123.html

In your model you may have machines / activities with multiple breakdowns /
stoppages. By default, if these occur simultaneously then repair work for each
Page 8 of 15

Author: Lanner Group Customer Support Centre
Lanner Group WITNESS Hints & Tips Service summary
stoppage are assumed to be done simultaneously. You may need to prevent this
occurring in your model. You can do this by use of a dummy labor / resource item
which is required on those breakdowns / stoppages which are not allowed to be
worked on simultaneously. The same principle can be applied to managing the
work done on simultaneous setups.

Tip 5.015: Window control. How to zoom your window to a selected area.

This is Hint #122 on our Web site.
http://www.lanner.com/Secure/Tips/hint122.html

In your modelling or when demonstrating to clients it can be useful to zoom to a
portion of your model to see more easily what is happening. This can be achieved
easily. To do this you need to choose a window to use, perhaps one which is not
currently focused on a particular area of the model. You then need to select the
area that you want to zoom to. This can be done by clicking top left of it and then
dragging to create a net around the selection. Multiple selections can created by
pressing the Shift key while selecting another element or elements. The window
can then be zoomed to the selection by clicking on the 'Pan to selection' button
on the 'Views' toolbar whilst pressing th CTRL key on your keyboard.
Tip 5.016: Recording to AVI.

This is Hint #127 on our Web site.
http://www.lanner.com/Secure/Tips/hint127.html

This is a summary of the presentation given at the UK User Group on 14th May
2002.

Video Production is a method to produce a closely controlled demonstration of a
model that can be used for presentation purposes. It can be used as part of a
presentation or indeed can form a complete presentation in its own right - a more
fully formed film.

The basics of recording video in WITNESS
Video Codecs
Video Files on computers use Codecs.
Codecs are Compression/Decompression algorithms. Without them
video files are enormous. There are thousands available - however if
you use one then it must also be available on the machine where the
video file will be played back.
Therefore use common codecs
A number of years ago codecs designed for playback on hard disk or
CD - now many developed for streaming purposes
For simulation models high quality is needed as colour distortion can
make a model look very poor - this is less problematical for normal
video where there are less sharp edges
On the positive side simulation models can have large blocks of colour
which compress well at the high quality settings
Lanner recommend using the standard older style codecs such as Microsoft Video
1 which will be present on most systems as standard.

Recording AVIs in WITNESS
The File menu offers a record to AVI option. Other external programs
can be used but this is convenient
Page 9 of 15

Author: Lanner Group Customer Support Centre
Lanner Group WITNESS Hints & Tips Service summary
This records any area of the screen - not just the WITNESS windows -
the area is user selectable.
The recording dialog offers a choice of file name, codec, region or
window to capture, etc.
Recording is done either on a frames per second rate or on a simulation events
basis. Frames per second refers to real clock timings. Machine Performance is key
both to record and to playback speeds - each machine is different.

Key Tips to Improve Video Performance
Minimise screen size to show what is needed
Reduce Record frames per second to a very low figure (dont forget
the computer is also running a simulation model!!) or just use
simulation events
Reduce simulation events!! - time update/walk speed/path and power
and free update/plugin interval
Reduce Playback frames per second
Reduce colours on the display (dependent on graphics used)

Video Editing Tools and Techniques
There are many tools available on the market to edit videos.
Lanner commonly use two different tools:
MGI VideoWave (under 100)
Adobe Premier (around 300)
Both allow :
Putting two or more video clips together to form a single new video
file
Adding effects and text
Adding sound
Speed manipulation
The basic video players on the market included with Windows do not
allow playback manipulation of speed and therefore this is important.
Important to remember when recording / editing
For best display all clips should be same size
Reducing and increasing size generally works poorly for the crisp
simulation displays
Frames per second (fps) / speed alterations should be in multiples
Twice the speed will work well keeping fps the same but 170% may
not. Reducing speed from 30fps to 25 fps may also not work well.
Transitions and effects add significantly to the video size.

Lanner Tip
Recompressing final result in WITNESS can help reduce the size of the final video
dramatically.

Tip 5.017: Tying a Labor / Resource to a Part / Entity.

This is Hint #128 on our Web site.
http://www.lanner.com/Secure/Tips/hint128.html An example model can be
downloaded from the Web.

This tip was presented at the UK User Group on 14th May 2002.

In your model you may need the same labor / Resource to work on a job at all
machines / activities. This can be done
through the use of a name attribute which ties the labor / resource to its job.

Page 10 of 15

Author: Lanner Group Customer Support Centre
Lanner Group WITNESS Hints & Tips Service summary
1) Matching Attributes on Parts and Labor

Create an attribute - e.g. jobnum
(in group 0 so available to parts AND labor)

Set individual values in each Parts Actions on Create
Actions on Create :- jobnum=NCREATE(ELEMENT)

At the first machine / activity in the line call an idle Labor resource to work on the
part
Labor Rule :- MATCH/CONDITION jobnum=0 operator

Tie the Labor to the part when first worked on
Actions on Start :- LABORAT(ELEMENT,1,1):jobnum = jobnum

Calling the right Labor at subsequent stages / maachines / activities
Labor Rule :- MATCH/CONDITION jobnum=element:jobnum operator

Releasing the Labor after the final stage / machine / activity
Actions on Finish :- LABORAT(ELEMENT,1,1):jobnum = 0

2) Displaying each part / entitys attribute value

Change the Part / Entitys Style from Icon to Description

Display> Update> Style> Description

Set the Description to be the value of the parts attribute

Actions on Create :- DESC = @jobnum

3) Displaying the current part / entity each Operator is tied to

Draw text for each operator in turn
Display> Draw> Text> text identifier
e.g. Operator(1)
Operator(2)

Draw expressions for each operator in turn
Display> Draw> Expression> numeric expression
operator(1):jobnum
operator(2):jobnum

4) Using the right Operator to carry a part / entity along a path

Modify Input Rule to Match Part and Operators Attribute
From Rule
MATCH/ATTRIBUTE jobnum OP20 using path AND operator using path

Labor Rule
Check the 'Use Labor defined by Part Rule' option.

Create an additional cycle on the machine / activity being pulled from
Define a new phantom part - Type Passive called for example Fresh_Air
Change machine pulled from to Multicycle Machine and Add a 2nd cycle

#2 cycle cycle time : 0
Page 11 of 15

Author: Lanner Group Customer Support Centre
Lanner Group WITNESS Hints & Tips Service summary

#2 cycle From Rule : IF ISTATE (OP30) = 1
PULL from Fresh_Air out of WORLD
ELSE
Wait
ENDIF

When running the model, you will be able to follow what is happening more easily
by enabling walk mode.
Tip 5.018: Use of a variable path update interval.

This is Hint #129 on our Web site.
http://www.lanner.com/Secure/Tips/hint129.html

This tip was presented at the UK User Group on 14th May 2002.

When using paths in your model the path update interval is important in
determining how the model will look in run mode. If you have a path traverse
time of 1.0 time units and a path update interval of 1.0 time units then you will
not see the part / entity moving along the path. You need to set the update
interval to a smaller value than the traverse time so that WITNESS will update
the display as the part / entity moves along the path.

Define a REAL variable

Name : interval

ACTIONS ON INITIALIZE (for interval variable)

interval = 0.01

Expression for Path Update Interval in each path:-

interval

N.B. set interval to a larger number for a faster display of movement along each
path or to a smaller number for a slower display of the movement.
Tip 5.019: Defining a Part or entitys Style via Actions on Create to avoid
using the Display Tool Bar.

This is Hint #131 on our Web site.
http://www.lanner.com/Secure/Tips/hint131.html

This tip was presented at the UK User Group on 14th May 2002.

A Part or entitys Style can be set via Actions on Create to avoid using the Display
Tool Bar. For example:

ACTIONS ON CREATE (in Part / Entitys Detail dialogue)

ICON = 49
PEN = 5

Each part / entity in your model may have a different display assigned as this is
stored as an attribute, unique to each part / entity in the model. As an alternative
Page 12 of 15

Author: Lanner Group Customer Support Centre
Lanner Group WITNESS Hints & Tips Service summary
to using an icon style you may assign a character display of up to 4 characters by
an action such as DESC = "job1". Whenever you assign a display to a part using
a 'DESC =' or 'ICON =' action this will override the existing display for that part /
entity.
Tip 5.020: Saving a Module as a Designer Element.

This is Hint #132 on our Web site.
http://www.lanner.com/Secure/Tips/hint132.html

This tip was presented at the UK User Group on 14th May 2002.

In your model you may wish to take some part of the at model to reuse in other
models. This can be done by
creating a designer module in your startup model which incudes that group of
elements.

Define a Module

Move Elements into the new module in the model elements list.

Select your New Module

Click on the Create Designer Element Button (the scroll icon in the Elements
Toolbar)

This will create a module (mdl) file and add a designer element to your model
which uses that file.
Tip 5.021: How to protect your model detail from others.

This is Hint #134 on our Web site.
http://www.lanner.com/Secure/Tips/hint134.html

In your modelling project, you may wish to hide the model detail from the end
user. This may be because the detail is confidential or you may wish to prevent
others changing the model. This can be achieved by putting all elements in a
module and then password protecting that module.

To do this, you should first define a simulation module in your model. You then
need to move all other simulation elements to be within that module. This can be
achieved by selecting groups of elements in the element list in the same way as
you would in file manager. These should then be dragged and dropped onto the
module in the element list. You can then password protect the module by clicking
on the password button on its general tab and entering the password. When a
module is password protected you will not be able to view element reports, so
you may wish to display some key statistics on a window.
Tip 5.022: How to run actions when you rewind a model.

This is Hint #135 on our Web site.
http://www.lanner.com/Secure/Tips/hint135.html

In your model you may read data in from external files or prompt the user to
configure the model. This may change the display of some elements. When the
model is then rewound to time zero, you may prefer the display to revert to its
Page 13 of 15

Author: Lanner Group Customer Support Centre
Lanner Group WITNESS Hints & Tips Service summary
default settings. There are no 'Actions on Begin' within WITNESS. You can
achieve the required behaviour by creating a dummy write file. In that file's detail
form the actions on close file will be run when the model is rewound to time zero.
Note that the file will not be created as nothing need be written to it.
Tip 5.023: How to setup your PC to so that when you double click on a
WITNESS MOD file in explorer it will load in WITNESS.

This is Hint #136 on our Web site.
http://www.lanner.com/Secure/Tips/hint136.html

This is an update to hint #54. When you install WITNESS 2002, the installation
will setup file association for .MOD and .SIM files. When you double click on files
with these extensions they will be opened into WITNESS 2002. If you wish to
associate a different application with any of these file types then you can do so
using the method described in hint #54.

Tip 5.024: Managing License Codes in WITNESS 2002.

This is Hint #137 on our Web site.
http://www.lanner.com/Secure/Tips/hint137.html

With the release of WITNESS 2002, a new licensing feature has been added. This
requires you to apply for a License Code to continue using WITNESS 2002 after
July 16th 2002. When you first install and run WITNESS 2002 you will be
prompted to apply for a license code. You can re-enter that dialog at any time by
selecting Help / About WITNESS, from the menus and clicking on the 'License
Administration' button. On that form you can click on the 'License Request Form'
button, enter your details and send the request by e-mail or print it for faxing.
Please note that a license code is not required for a run only or network license.

Once you receive your license code and this has been entered via the License
Administration form, then WITNESS creates a file witness.lic in the WITNESS
installation folder. This is a text file and contains a list of all dongles which are
licensed to run on that PC. If you have several dongles in the office which may be
used on different PC's, then the easiest way to manage that is to enter the codes
for all licenses on one PC. That will create a file witness.lic containing the codes
for all of your dongles. That file may then be copied to each PC in the office
where the dongles may be used.

Tip 5.025: Increased run speed using local variables.

This is Hint #138 on our Web site.
http://www.lanner.com/Secure/Tips/hint138.html An example model can be
downloaded from the Web.


With WITNESS 2002, the introduction of local variables gives potential for
improvements in run speed of your models. In the model, the variable 'toggle'
can be set 0 / 1 to use Global / Local variables in the actions on start for
Machine001. The loop executes some simple addition 10,000 times in either case.
You can record how long the model takes to run in each case by opening the
model and then opening the file runtime.wcl. This will record the how long the
model takes to run to time 10,000. You will see that when using local variables,
Page 14 of 15

Author: Lanner Group Customer Support Centre
Lanner Group WITNESS Hints & Tips Service summary
the model takes just over half the time to run compared to when it uses globally
defined variables. Local variables were introduced with the intention of giving run
speed improvements. Since they are temporary, WITNESS does not spend time
maintaining display and other information which it must do for global model
variables.
Page 15 of 15

Author: Lanner Group Customer Support Centre