Powersim Studio 2003

User’s Guide

Powersim Studio 2003
User's Guide

by Powersim Software AS
The Business Simulation Company

Sandbrugt. 5-7 ● PO Box 3961, Dreggen ● N-5835 Bergen ● Norway

-3-

Copyright © 1997 – 2003 by Powersim Software AS. All rights reserved.

No portion of the contents of this publication may be reproduced or transmitted in any form or by
any means without the express written permission of Powersim Software AS.

Trademark, service mark, and copyright acknowledgements appear in the Powersim Studio 2003
Reference Manual.

The Software License Agreement and Limited Warranty also appears in the Appendix of the
Reference Manual.

We have done our best to ensure that the material found in this publication is both useful and
accurate. However, please be aware that errors may exist in this publication, and that neither the
authors nor Powersim Software AS make any guarantees concerning the accuracy of the
information found here or in the use to which it may be put.

Mention of third-party products is for informational purposes only and constitutes neither an
endorsement nor a recommendation. Powersim Software AS assumes no responsibility of models
created using software marketed by Powersim Software AS.

-4-

Foreword
Making business decisions
Today, business simulations are used in making business decisions. Faced with a decision on where
to build natural gas storage containers, and how big to build these containers, one oil company used
Powersim to build a simulation of the wells, the pipelines, and the markets. Once the simulation
was built, decision-makers at the oil company could try different storage container scenarios. The
consequences of the different scenarios could be understood in a risk-free environment before any
investments in construction of storage containers were made.
Business simulations are also used in explaining business decisions to others in the organizations.
For example, a major telecommunications company saw many of their competitors making risky
forays into interactive television, adventures that were garnering much publicity. It was not enough
to just focus on their core business; they also had to explain to the employees why investing in
interactive TV and similar ventures were bad business decisions. This telecommunications
company built an interactive simulation of how they perceived their business. Over 1200
employees used this simulation in a series of management training workshops, where employees
had an opportunity to run the simulated business and make investment decisions. The employees
gained new appreciation for the corporate strategy, and a better understanding of how the thought
leaders in their organization saw the dynamics of the next few years unfolding.
Both of these simulation success stories were achieved using Powersim software. In each case a
team of modelers and thought leaders from the business collaborated to build a custom model of
the business problem. The models contained enough of the important details and complexities of
the real world situation to be useful and believable.

Business simulations more common
The use of simulation in business is not yet an everyday occurrence, but it is spreading. In 1990,
both of these examples would have been quite unusual. Although simulation technology was well
understood by 1990, and the cost of the necessary software tools had become modest, very few
business decisions were supported by simulating the consequences before taking action. It simply
was not part of standard business practice. Now things are changing, and the use of business
simulation is becoming more common.
At Powersim Software AS, we are committed to supporting the emerging practice of business
simulation. We appreciate that the process of business decision-making is different from that of
decision-making in public policy. Our tools are focused on modeling business problems, not on
public policy or academic issues.

-5-

From models to simulators
Why this sudden change in business practices? Business models are not substantially easier to build
now than they were at the before. Nor has there been a watershed event that has made the business
community suddenly more receptive to simulation. From the viewpoint of us in the business
modeling community, building simulation models for years, the change is welcome, but a little
mysterious. However, from the viewpoint of our business customers, there has been a technology
revolution of sorts. Once a model is built, it is easy to build a high-quality user interface around it,
and turn it into a business simulator. Anyone can run the business simulator, trying different
decision scenarios and understanding the resultant behaviors.

The joy of simulators
Who has the time and interest to play with a business simulator? Everyone seems to make time.
Some commercial simulators – like SimCity and The Sims – are so much fun to play that they are
sold as entertainment. While few business executives might admit to playing games, they will
gladly play with a custom business simulator, crafted to model an aspect of their current
environment. One very serious senior executive remarked that playing a custom simulator of his
telecommunications company was "a joyful experience." Another senior executive at the same
organization spent 10 hours over two evenings playing the simulation.
Crafting a joyful experience can mean the difference between 4 people understanding your model
and its implications--and 1000 people understanding it. And joy is impossible if casual users must
struggle with arcane controls, obscure commands, or cryptic numerical displays.

The value of simulators
Joy alone is not enough in a business context: there must also be value. What is the value of
business managers playing a business simulator? Do the people playing the simulation make better
decisions? Do they learn more about the world in which they must succeed?
For many years, we in the business modeling community have approached the problem of creating
value by teaching business people a new way of thinking. We have taught them the basics of
building models, and when that was too difficult, we taught "systems thinking," how to see their
world the way a modeler might see it. Systems thinking is undoubtedly valuable for anyone who
chooses to undergo the education--but it has certain shortcomings as a discipline that can be put to
use within a business. Some people will never learn how to think systemically; and in fact, business
people expect something less abstract and more tangible for their investments in time and money.
Provide them a simulated experience – with their new situation, in their industry, in their context,
with their assets and constraints – and you’ve empowered them to solve existing problems, and
avoid potential ones.
Our goal at Powersim Software AS is to support you in "publishing" custom models of your
business, making them available to everyone who might need to know or care. And there are a lot
of people who might care: existing employees, new recruits, suppliers, distributors, customers, and
investors.

Learning from simulators
By playing a simulator, by trying different combinations of decisions, a business manager can
understand a simulation in a kind of kinesthetic way. Just as you don’t need to understand the
physics of skiing to learn how to ski, in the same way it is possible to play a simulation model and
learn the dynamics of a business situation – without understanding the details of the underlying

-6-

mechanics. Through simulation, a businessperson can thus acquire experience not only without
"field" work, but also without necessarily understanding details of the model behind it.
Powersim Studio supports two approaches to building business simulators: building a simulator
within Powersim itself, and building a simulator in a general-purpose, interface-building language
and using Powersim as a simulation engine through the available Powersim Studio Software
Development Kit (SDK).
Within Powersim Studio, a modeler can use a host of interface objects. You can present the state of
the simulation by a gauge, by a graph of an array, and by many other means. You may also
program events that will occur when certain situations occur in your simulation.
As more and more organizations build business simulators to understand their world, and
communicate it to others within their organization and outside, your job will become more exciting
and more important. We at Powersim are committed to supporting you in your efforts to build
business simulators.
Good luck with your purchase of Powersim Studio 2003!
The Powersim Software Development Team

-7-

Table of Contents
Foreword............................................................................................................................ 5

Table of Contents .............................................................................................................. 9

Getting Started ................................................................................................................ 25

What’s new in Powersim Studio 2003? ......................................................................... 28

Introduction to System Dynamics.................................................................................. 32
The tools and rules of System Dynamics ............................................................ 35
Building the models ............................................................................................ 41
Building blocks in Powersim Studio................................................................... 44
Creating a model ................................................................................................. 47
Importing models from Powersim Constructor 2.51 ................................................... 48
About variable conversion .................................................................................. 48
About diagram conversion .................................................................................. 51
About simulation conversion .............................................................................. 52
Convert the ASSIGN function ............................................................................ 53
Convert constrained expressions......................................................................... 56
Convert the SHIFT functions .............................................................................. 57
Convert the LIMIT functions .............................................................................. 61
Working with help in Powersim Studio ........................................................................ 63
Topic layout ........................................................................................................ 63
The help window................................................................................................. 64
-9-

.... 67 Get help in a dialog box ........................................................................................ 75 View project statistics ........................................................................................................................................................................... 77 Change level of protection ............................................... 74 View project documentation ....10 - .............. 75 Show recently opened projects............................................................. 65 Hide or show the navigation pane................. 77 Work with windows and diagrams. 79 View equations................ 80 Move sheets...... 77 Undo an operation..... 74 Restore a backup project ......................................... 77 Unprotect the simulation project................................................................................................................................................................................................. 66 Use the Powersim Learning Lab ................................. 67 Print the current help topic................... 66 Copy a help topic ..................................................................... 72 Open an existing project ................................................................. 81 Exclude a sheet........................... 81 Delete a sheet .......................... 67 Use the favorites tab................................... 76 Protect the simulation project......................................................................................................................................................................................................................................................................................... 77 Redo an operation .............................................................................. 81 Include a sheet..........................................................................................................................................................................Customize the help window .......... 68 Highlight words in searched topics ......... 74 Compact a simulation project....................................................................................... 69 Components and simulations ........................................................................................................................ 76 Levels of protection ................................................................................................................................................... 82 Adjust columns in treeviews ................................................................................................................................................................... 67 Find information with full-text search ....................................................... 73 Save a simulation project .................. 73 Create a backup project............................................................... 80 Select sheets ................................................................................................................................ 70 Work with a simulation project ............................... 82 ................................................................................................................................................................................................................................................................. 72 Create a simulation project.......................................................................................................................................................................................................... 75 Show and edit project information............................................................................................................................................................................................................................................................................................................................................................................ 81 Rename a sheet................................................................................................... 72 Create project documentation ............ 68 Work with Powersim Studio ......................................................................................................................... 66 Find a help topic................................................................................................... 80 Create a new diagram sheet............................................ 76 Work with levels of protection.

........................................................................................... 87 Show or hide a toolbar ............................................................ 86 Working with toolbars and keyboard shortcuts................................................................. 116 The building blocks of a Constructor diagram................................................................................ 86 Show or hide the Project Window .... 109 Add a simulation to the component ............................. 84 Close all windows ..................................................... 114 Work with Constructor diagrams ........................................... 88 Format commands........................................................................................................................... 85 The Project Window ................................................................................... 87 Diagram commands .................. 83 Open a new window for the active component . 98 Presentation commands................................................. 109 Rename a component ....11 - .. 84 Close the active window ............................................................................................................................................................................................... 118 .......................................................... 85 Dock the Project Window ....................................................................................... 109 Open a simulation’s diagram window................................................................................. 93 Simulation commands. 82 Organize windows.................................... 108 About private and shared diagrams.............................. 110 Delete a component......................................................................................... 110 Create a submodel from a component........................... 113 Constructor and Interaction Diagrams................................................................................................................... 82 Switch between hierarchical and flat view in treeviews ....................................................................................................................................................................... 87 Move or dock a toolbar ............................................................................................................. 108 Create a new component ................................. 103 Studio keyboard shortcuts ...................................................................... 83 Save window position .................................................................................................. 85 The Status Bar............. 94 Standard commands ............................................ 101 Constructor keyboard shortcuts and modifiers ........................................................................................................................................................................................................................Select entries in treeviews................................................................................................................................................................................. 86 Select a persistent tool........................................................................................................................................................................................................... 117 Constructor diagram symbols ............................................................................ 99 View commands....................................................................................................................................................................................................................................................................................... 105 Working with components ..... 91 Layout commands ...................................................................................................................... 96 Symbol commands............................. 116 Diagrams and models....................................... 107 About simulations ............................. 86 Create a folder in the Project Window..........................................................................

.......................................................................................................................................................................................................................................................... 140 About submodel diagrams ......................... 133 Create a delayed link. 131 Change the shape of a link ..................................... 122 Toggle between Design and User mode........................................................................................ 132 Create a link .................................................................................................... 133 Delete a link .......................................... 134 Change the shape of a flow ........................................ 131 Keyboard modifiers when working with links and flows ... 139 About submodels.............................................................................................................................................Diagram errors and inconsistencies ... 128 Create a reservoir ............................................ 130 Work with links and flows........ 136 Reconnect a flow to a different level ................. and constants................. 123 Change stacking order of objects .............................. 134 Create a flow ............................. 127 Create a snapshot ................................................................................................................................................................................................................................................................................. 125 Create an auxiliary ..................... 128 Make original from a snapshot........................................................................................................................................................................ levels..................................................... 120 Adding controls and auto reports to a diagram .......................................................... 126 Create a flow rate variable ............................................................................................................ 127 Go to original from a snapshot........................................................................................................................................... 138 Build hierarchical models.................................... 138 Delete a flow ............................................................................................................12 - ................................................................................................................................................................................................................................................. 137 Delete a rate variable.................................. 124 About snapshots ............ 133 Create an initialization link ................................................ 135 Create a flow without a rate variable ........... 143 .............................................................................................. 136 Detach a flow rate variable ............ 121 The stacking order of diagram objects ........................ 136 Move the valve of a flow ................................... 136 Attach a flow rate variable ................................................... 142 About public variables ........................ 135 Disconnect the head or tail of a flow ....................................... 129 Resize a basic variable symbol .......................................................................................................... 128 Name and rename a variable ......................................................................................... 123 Working with variables in Constructor diagrams ................................... 142 About child variables in auxiliaries............................................................................................. 126 Create a constant ................................................. 125 Create a level....................................................................................................................................................... 130 Scale a basic variable symbol . 137 Change the rate variable of a flow ...........................................................................................................................................................................................................................................

................................ 163 Change the type of all segments of a line ................................................................................................. 154 Delete a variable.......................................................................................................................................... segments and lines... 161 Add a node ........................ 151 Work with diagram editing ......................................................................................................................................................................... 163 Change a line into a single curved segment ............................................................... 152 Drag and drop operations ........ 144 Create a submodel ..................................... 164 Work with the Details Window....................................... 156 Paste from Windows Clipboard ........................................................................................ 156 Copy an area as a picture ......................................... 162 Change the type of a node...............13 - ........................................................................................................................................................................................................... 168 ............................................................................. 154 Exclude a model variable from a diagram ........... 148 Create flows to or from a submodel.................................. 161 Types of segments..................................................................................................... 162 Change the type of all nodes of a line ............................. 166 Show and hide the Details Window ................................................................................................................... 155 Copy and paste an object ........................................................................................... 159 Delete diagram objects.................Consistency rules for submodel diagrams..... 159 Work with nodes........... 154 Link variables to Powersim Controls................................. 163 Make an elbowed line ................................................................................................................................................................................................................................................................................................. 153 Include a model variable in a diagram ............................................................ 158 Position an object by coordinates................................................................................................ 146 Create a submodel from a component...................... 157 Select objects...................................... 147 Open a diagram for a variable............................................................... 162 Delete a node........................................................................................... 160 Types of nodes ........................................ 156 Cut and paste an object ......................................................................................................... 158 Select dominant object ............................................................................................................................................................... 148 Create links to or from a submodel ..... 149 Create an anonymous flow.................................................................................................................................................................................................. 157 Select multiple objects ...................................................................................................................................... 163 Drag a line into a new shape ............................................ 167 Auto-synchronize Details with diagram..................................................... 167 Display the Detail Window at top................................................................. 162 Change the type of a segment ........... 158 Move an object......................................................................................................................... 164 Change a line into a single straight segment ...................................................... 146 Include child variables in parent diagrams.............................

..................................................... 184 Work with freeforms.................. 172 Move and position an auto report................ 175 Turn snap to regular grid on/off ......... 172 Change type of auto report............................................. 189 ....................................................................................... 188 Add text to a frame............................................ 184 Change object color and shape................................................................................................................... 170 Show a time graph auto report .. 181 Space diagram objects..... frames........................................................................ hyperlinks and bookmarks .......... 174 Turn the display of guides on/off .................... 187 Add a frame.............................................................. 171 Hide an auto report..................................................................................................................................................................................................... 173 Size an auto report..... 175 Turn snap to the radial grid on/off .............. 182 Position objects .............................................................................................................. 180 Format the diagram background ............................. 177 Move guides............................. 174 Turn the display of grid on/off ............................................... 175 Turn snap to guides on/off .................................... 179 Format several objects in one operation................................ 175 Change grid settings...............................14 - ................................................................................................................................................................................................. 188 Add a picture to a frame..................................................................................................Work with auto reports .......................................................... 186 About hyperlinks........................... 180 Use picture fills for objects ................................................................................................. 180 Align diagram objects ............................................. 171 Unhide an auto report.......................................................................................................................................................................................................................................................................................................................................................................... 170 Show a number auto report ............. 176 Change guide settings ......................... 173 Working with grids and guides............................................................................................................................................................... 178 Work with object properties .... 173 Show or hide rulers ..................... 179 Format text ............................................................ 182 Make diagram objects the same size .......................................... 183 Change line style and color .............................................................................................................................. 176 Insert guides ......................................................................................................................................................................................................................................................................................................... 183 Resize an object ........ 172 Delete an auto report .......................................................................................................................................................... 181 Rotate diagram objects............................................................................................................................................................................................... 177 Delete guides............................................. 186 About bookmarks................... 183 Resize a multiple selection..........................................................................................................................................................................................................................................................................................................................

............................ 207 About integration .................... 196 Zoom a diagram ........................ 201 Set simulation times ............................................... 208 Integration methods: Known quirks........................................................ 189 Add a hyperlink.................. 209 The Runge-Kutta integration methods ...................................................................................................................................................... 204 Set the time step . 205 Set the run count ........................................................................ 202 Change the calendar .............. 203 Set start time and stop time .................................................................................................................................................................................................................. 190 Create hyperlinks without text ..... 194 Change the order of freeforms .............................................................................................................................................................................................................................. 200 Set preferred time units .......................................................................................................................................... 212 .............................................................................. 194 Delete a hyperlink ............................................................ 204 Autoscale variables when simulation is paused ............................................................................................................................................................................................................................................................................................................... 194 Delete a bookmark195 Work with zoom .................................................................................................... 199 The calendars ................................................................................... 197 Work with simulations........................................................................................................... 205 Keep history for all variables .... 211 Start and stop a simulation ...................................... 198 About simulation state and history..................................................................................................................... 191 Use a frame as background ................................................. 211 Reset a simulation ...................................................................................................................................... 199 Simulations without time units .............................................. 196 Zoom a selection ........................................................................................................................................................................................................................................................ 196 Zoom to fit diagram in view.....Add a bookmark........................................... 192 Reshape a freeform .............. 193 Change arrowheads and –tails on freeform lines ........................................................................................................................................................................ 209 The Euler integration method................................ 206 Turn o/off time units for simulation time........................................ 193 Create image maps .................................................... 191 Open a hyperlink............................................................................................................................................................................................................................................... 192 Select a transparent frame .......................................... 206 Integration methods............. 203 Select available calendars .............................................................. 192 Draw a freeform line ............................................................ 210 Set integration order... 205 Save simulation state with project.................................................. 204 Set the simulation speed......................................................................................15 - ................................................................................................................................................................................................. 191 Resize a frame to fit a picture ..... 211 Play a simulation stepwise ....

......................................................................................................................................................................................................... 237 Variable properties and options ............ 234 Create unitless variable expressions.................................................................................................................... 221 Properties........................... 215 Exporting a simulation run.......................................................................... 238 About permanent variables .......... 212 Go to a cue point in the simulation run ........................................................................................................................................................................................................................................................................................................................................................ 243 About continuous flows ................................................................................................................................................................................. 217 About the report window and intervals................................. 216 Enter documentation for a simulation run...................... 227 Available time units in the project ............. 212 Manually autoscale all variables ...................... 218 Set up report window ...... 233 Explicitly select unit for an expression ................................ 214 Activating a saved run.............................. 215 Importing a simulation run............................................................................ 233 Include units in variable expressions ....................................................... 228 Add a local unit ...................................... 230 Define a derived normal unit........................... 231 Specify a unit for a level ............................................................................................................................................................................... 217 Delete a simulation run ..... 236 Working with variable definitions................................................. 232 Specify a unit for a constant................................. 227 Add a global unit......................16 - .......................... 215 Rename a simulation run............................................................................................... 241 Variable definition examples ... and pre-defined units .......................................... 222 Create a model without units.............................................Add cue points to the simulation run ................................................................................................................................................................ 230 Define a derived point unit.................................. 220 About unit operations......................................................................... 219 Working with Units of Measurement ..................................................................................................................................................................................................................................................................................................... Identifiers............................ 216 Make a simulation run visible in Presentation Mode......................................................................................................................................................................................... 229 Add standard units ............................................ 241 About reservoirs......................................... 235 Delete a global unit ............................................................................................. 213 Saving a simulation run................................ 228 Add currency units .................................................................................................................. 230 Define an atomic unit . 248 ....... 218 Set up major and minor time intervals ........ 213 About runs and reference data...................... 232 Specify a unit for an auxiliary............................................................................................................................................................................................................................................... 217 Select reference data ............ 235 Delete a local unit ............ 213 Restore permanent variables ......................................................................................................................

.............................................. 281 Create a link in the Equations View................................................................ 261 About value formatting ....................... 282 Reverse a flow in the Equations View ..................................................... 271 Hierarchical syntax .......... 266 Set array dimensions from the Definition property page ................................................................. 252 About circular definitions ....................................................................................................................... 269 About hierarchical models .................................................................. 264 Define flow equations for a level ....................................................................................................................................... 266 Insert unit name................................................................................................................... 269 Write documentation for a variable............... 262 Adding comments to definitions ................................................................................. 268 Insert a function expression with the Function Wizard....................... 269 Customize the appearance of definitions ........................................................................................ 264 Formatting variable definitions ......................................... 282 Create a flow in the Equations View...................................................................................................................................................................................................................................................................................................................................................................... 263 Define a variable in the name box............................................................... 263 Define variable in the Equations View ...................................................................................................................................................................................................... 266 Insert variable name in a definition...................................... 283 Working with Range and Index Variables .................................................................................................. 270 Private and public variables ............About discrete flows .......................................................................................... 265 Insert a function in a definition ...................................................... 276 Working with the Equations View................................. 288 ................................................................ 267 Set data type for a variable....... 265 Insert range name for a dimension ................................................................ 283 Change variable type in the Equations View ............................................................................. 249 About logical flows.......................................................................... 285 Types of ranges ......................... 262 Define a variable on the property pages...................................................... 264 Change variable type............................................................... 288 Create an index variable....... 288 Add a local range .............................................................................. 251 Flow function examples ................................................................................................................................... 275 Hierarchical models: Examples.................................................................................................................. 267 Set unit of measurement......................................................................................................... 273 Monitor the flows of a level ............. 286 Add a global range .................... 282 Define a variable ................................... 283 Delete an object...................... 268 View the current value of a variable ....................................................17 - ................................................................................ 260 About the function wizard................................................................................................................ 285 About index variables ............................................................................... 281 Create a variable in the Equations View ..................................................................

.......................................................................................................................................................................................... 308 About Powersim Controls .................................. 299 Array syntax.................................................................................................................................................................................. 289 Define an enumerated subrange .. 311 Use index variables in controls .............................................. 288 Rename range elements .....................Define an enumerated range........................................................................... 305 Index arrays.............. 311 Delete a control ......................................................................................................................................................................................... 303 Build arrays using the FOR function ....................................................................... 316 Add simulation control parameters to a control ....... 317 Add parameters with summary types............................................................................................................................................................................................................................................................................................... 315 Add reference run parameters to a control ..................................................................................................... 294 Working with arrays......................................................................................... 318 .............................................................................. 307 Index arrays using ranges and subranges .......................................................................... 306 Use basic variables as index variables . 293 Summary types and discrete variables .......................................................................................................................................................... 290 Specify a global range for a variable............................................................. 301 Create arrays using ranges and subranges......................................................................................... 310 Insert a control in your diagram ..................................................................................... 315 Add active run parameters to a control ............. 291 Delete a local range or index variable................................................................................... 291 Delete a global range or index variable............ 297 Why use arrays? ........................................... 316 Add index variable parameters to a control .......................................................18 - ................................................... 317 Adjust the scale of a parameter ........ 303 Build arrays using the CONCAT function.......... 291 Explicitly select a range for a variable ...................... 297 Create layered models using arrays................................................................. 311 Move a control .................... 313 Work with parameters..................................................... 305 Index arrays using the INDEX function......................................... 302 Build arrays element by element.. 292 Work with summary types ................... 290 Specify a local range for a variable......................................... 299 Create queues using arrays....................................................................................................................................................................................................................................................................................................... 318 Remove parameters from a control ............................................................................................. 289 Define a numerical subrange.......................................................... 300 Create arrays ............................................................ 313 Toggle between Design and User Mode .................................................................... 307 Redimension arrays...............

................................................................................................................................................................................... 324 Show label for an axis ....................... 339 Gauge dial properties ................................................. 325 Customize the appearance of a control ................ 341 Gauge needle properties................................................................................................................ 323 Change position of an axis . 321 The value axis and parameters with different units.................................................................................................................................. 322 Resize a control. 339 Examples of gauge formatting .............................................................................................. 348 ........................................................... 336 Presenting a set of scalar variables in a Chart Control....... 334 Change the order of parameters .......................................................................... 326 Show and format the title ................................................................................................................................................... 336 Toggle on/off the legend for the chart..................................................................................................Hide or show parameters in User Mode......................................................... 336 Show gridlines............................................................................................... 321 Axis formatting .. 347 Create a gauge with sectors........ 319 Formatting controls .......................................................................................................................................................................................................................................... 331 Work with the Chart Control ....... 335 Show hidden parameters in the chart ....................... 343 Format the gauge dial....................................................................................... 346 Rotate the Gauge Control................................................................................................................................................................................................................................................ 346 Show or hide the gauge hub ............................................................................. 326 About field codes ............................................................................................................................................................................................................................................... 333 Format the graphs........... 323 Format an axis......................................................................................................................... 327 Field codes and languages.................. 325 Change the scaling of the value axis ................................................................................................................................................................................................ 337 Work with the Gauge Control ............. 329 Legends and parameter titles when using field codes ............................19 - ............... 344 Format the gauge needle ............................................................. 335 Hide parameters from the chart............. 330 Define a field code .............................................................................................. 337 Use the Chart Control as an input object ......................................... 347 Use the Gauge Control as an input control .................................................................................... 319 Change the input mode of a control ............................... 324 Change the orientation of text in controls .................. 325 Change position of the unit label ............................................. 334 Change the graph type of a parameter........... 345 Format the gauge hub............................................. 335 Format the chart area..........................................................................................................................................................................

........... 349 Work with the Switch Control ...................... 360 Delete a Row in the Table Control........................................ 362 Format the time axis in the Time Graph Control ..... 360 Work with the Time Graph Control ..... 368 Work with the Time Table Control......................... 367 Show gridlines............................................................................................. 359 Display a variable’s value in a cell .................................................. 358 Display a variable’s name in a cell ............................................. 354 Create a static text object ................................................................................................................................................ 366 Show hidden parameters in the Time Graph................... 358 Add or insert a row in the Table Control ......................................................................................................................................... 360 Delete a column in the Table Control .............. 362 Format the graphs.............................................................................................................................. 355 Work with the Table Control................................................................................. 359 Change the height of rows and width of columns........................... 366 Hide parameters from the Time Graph .. 357 Add or insert a column in the Table Control....................................................................................................................... 358 Display text in a cell. 370 Change the order of parameters ....................................................................................................................................................................................................................................................................................................................................................................................... 352 Create a list box................................... 372 .................................................... 363 Use parameters with summary types in the Time Graph Control ....................20 - .................................................................... 367 Format the graph area ................................................................................................................................................................................................................................ 351 Create radio buttons ......................................................................................... 350 Create a button ............................... 367 Show and export the history of a parameter.................................................................................................................................................. 371 Change the reporting interval in the Time Table Control ....................... 360 Use the Table Control as an input object ........................................................ 349 Change the orientation of the slider bar .................................................................................... 371 Change the orientation of the Time Table..........Work with the Slider Bar Control.......................................................................... 368 Toggle on/off the legend for the Time Graph ................................................ 357 Add an Array to the Table Control ...................................................................................................... 365 Change the order of parameters ...................................... 370 Format the time display in the Time Table Control .................................................................... 372 Hide parameters from the Time Table Control ........................................... 354 Use the Switch Control to select strategy ............................. 351 Create a check button ........ 365 Change the graph type of a parameter...................................................... 368 Create a scrolling Time Graph ....................... 353 Create a combo box..................................................................

............ 375 The Monte Carlo sampling method.................. 385 Create a histogram ....................................................................................................................................................................................................................................................... 378 Select variables for Risk Assessment............................................................................................... 376 The Latin Hypercube sampling method ............................................................... 380 Specify an effect variable............................................................................................................................................................................. 395 Set the transfer directions for model and dataset variables .................... 390 About history in datasets.................................................................................. 379 Define an assumption with a fixed value .......................................... 399 Rename a variable in the dataset.................................................................. 398 Disconnect dataset and model variables ................................................................................................................................................. 393 Create dataset variables by drag and drop............. 399 Rename a dataset.......................................... 392 Connect a dataset to a component............................................................ 391 About transfers in datasets ......................................... 384 Create a high-low table ............................................. 376 Select and define a sampling method........................... 396 Set all the dataset variables to the same dimensions................................................................. 381 Presenting Risk Assessment results ..................................................................... 386 Datasets in Powersim Studio ................................................................................ 377 Probability distributions....Work with Risk Assessment......................................................... 381 Create a high-low chart ... 394 Connect model and dataset variables .................................................................... 400 Save a dataset ................................................. 400 Delete a dataset ....................................... 388 Dataset overview......... 400 Load history from a dataset..................... 379 Define an assumption with a probability distribution ...................................................................................................................................................... 375 How to assess risk .................................21 - ...................................................................... 397 Set the summary type for a dataset variable..................................................................................................................... 393 Create dataset variables manually...................................................................................................... 388 About datasets ........................................................ 391 Create a datasets............................................................................................................................................................... 399 Disconnect a dataset from a simulation ............................................... 373 About Risk Assessment ............................................................................................................................................................................................................................................................................ 377 Working with Risk Assessment variables........................................................................ 399 Rename a dataset in the Co-models View....... 389 About dataset variables ..... 374 The Risk Assessment process ........................................ 398 Set the dimension of a dataset variable .................. 400 Delete dataset variables... 390 About dataset variable dimensions................................................................................................................................... 401 ..................................................................................................... 381 Delete a Risk Assessment variable ..........................................................................................................................

.................. 418 Work with the SEM Dataset .. 427 Work offline with the SEM Dataset.......................................................... 411 Synchronize the component and the spreadsheet................................ 414 Use the dataset to transfer behavior over time ............... 426 Ranges and units in the SEM Dataset ................................................ 420 Connection details for the SEM Dataset .................................. 416 Transfer data at given times in the spreadsheet.......... 419 How the SEM Dataset works .............. 407 Control spreadsheet layout....................... 403 About the Studio Dataset ...................... 405 The inner workings of the SpreadsheetDataset .............................................. 434 Load and save date using the SEM Dataset ........................................................................................................... 416 Interpolate transferred data between data points.................................................... 409 Format a spreadsheet for transfer to a model variable ....................... 410 Format array dimensions................................................................................................................................................................................................................................................................... 412 Ensure valid data from spreadsheet...................................................................................................................................................................................................................................................................... 422 Mapping time characteristics in SEM to simulation time ...............Edit the history of a dataset variable .............. 404 Working with the spreadsheet datset ................................................ 413 Use names for cells............. 412 Use the dataset without saving the spreadsheet .. 415 Transfer behavior from a model variable to a spreadsheet ............................................................................. 434 .............. 410 Sort the order of variables in the spreadsheet ................................................................. 403 Set period information for the Studio Dataset.................22 - ....................................... 414 Create a bi-directional transfer for variables..................................................................................... sheets.............. or file that change with run number .............................................................................................................................................................................................................................. 401 Import the history of a dataset variable............................................. 429 Define a SEM Dataset................................................................................................. 415 Transfer behavior from a spreadsheet to a model variable ............................................ 417 Transfer all data at the end of the simulation .......................... 414 Use the dataset to transfer immediate behavior ......................... 433 Synchronize a SEM Dataset with SEM .......................... 428 How to prepare SEM-BPS for the SEM Dataset.......................................................................................... 407 Connect the dataset to a spreadsheet ................. 413 Use a spreadsheet template .................................................................................... 411 Update the spreadsheet with values only .................. 434 Using summary types for key figures .......................... 405 Set sampling times for the dataset.. 402 Export the history of a dataset variable................................. 408 Define starting cell of the spreadsheet ....................... 403 The Studio Dataset ............................................................................................................................................................................ 424 Time translations in the SEM Dataset............................................................

.................................... 441 Switch to Design Mode from Presentation Mode ............................................ 436 Allow the simulation user to specify package and version .......................................... 459 Change event order ... 449 Toggle language prefix on/off........................................................................................................................................................................................................................................ 442 Specify the Presentation of a project......................................................... 456 Types of event actions................................................ 459 Define an event .......................................................................................................................................... 447 The Neutral language .................................................................... 443 Protect your project in Presentation Mode...... 438 About the Presentation Mode...................................................................................................................................................................... 446 Automatic language selection ................................................................................................... 440 Create a simulator for Presentation Mode...............Set and lock packages in the SEM Dataset ................................................................ 449 Explicitly set language for a view........................................... 452 Find problematic variables................................................................................................... 452 About problematic variables ............................................................................................................................................................. 454 Find variables defined by the selected variable ......... 443 Use game files in Presentation Mode........................... 444 The Presentation Mode toolbar ................................ 450 Finding variables........................................................................... 437 Utilizing modes in Studio................................... 436 Disconnect Powersim Studio from SEM .................................................................................................................................................... 449 Set language for a project............................................................................................................................................................................................................................................................................. 442 Start Project in Presentation Mode... 441 Switch to Presentation Mode ...................................................... 456 Event properties ..................................................................................................................................................................... 448 The Common languages....... 435 Set and lock versions in the SEM Dataset .................................................................................. 455 Go to a variable ........................................................................................................................................................................ 444 Work with Languages......... 449 Translate a project................................................. 442 Add and view project documentation in Presentation Mode ............................... 442 Navigate in Presentation Mode .......................................................................................................... 453 Find undefined variables ......... 458 Add an event ...................................................... 460 .......................................................................... 454 Find variables by definition .................................. 455 Working with events .......................................................... 438 The difference between User and Presentation Mode...........23 - ............................................................................................ 440 Toggle between Design and User Mode ................................. 455 Go to next variable........................

......................................................................................... 463 Print equations......... 462 Print one or more diagrams .....................................................Add an action to an event.............................................................. 461 Printing a simulation project ...................................................................................................................................................................................... 465 Set paper size .... 460 Change action order .................................. 461 Delete an event................................................................................................ 462 Syntax for printed equations .............................................................................................................................................. 465 ............................................................................ 464 Set page orientation........................................................... 464 Set page margins ......................................24 - ........................................ 465 Set page scaling................................................................................................................... 461 Delete an action...............................................................................................

Create a new simulation project Powersim Studio is always opened with a new project (unless you started Studio by opening an existing simulation project. you will therefore have to create the units first. You can always go back and create more units as you find necessary! Tip! It is easiest to create and use global units. Although the list below gives a linear view of the modelling process. Tip! You can create as many diagrams you want per component.25 - . that is). Each component can contain many simulations. . 3. The project contains one component by default. the following steps will help you get started creating simulation models. where all variables will usually have a unit. please refer to the tutorials available in the Learning Lab. You can see all your variables in the Details Window or the Equations View. you will soon experience that it is rather an iterative process where you revisit previous stages many times before you have finished the model. Each component has one simulation by default. To be able to define the variables. which are available to all the components in the project. The diagrams offer a good visualization of your model. most quantities are expressed using units of measurement. and flows You create variables and link them together using links and flows in Constructor diagrams. All components and views are available in the Project Window that you can see on the left of the application. 2. All variables do not have to be part of each diagram. links. This is also the case in Studio. and you can add as many components that you need. with various simulation settings. and it is easy to see the feedback loops that make up the system. Create units of measurement In the real world.Getting Started in Powersim Studio If you are new to Powersim Studio. 1. If you want more detailed instructions on how to create models and simulations. The steps below are only meant as an overview of the steps required. Create variables.

If you need to further document your simulation. Tip! You will probably often create variables and define them at the same time. If you are studying the life cycle of a product. and add documentation to your model diagrams using freeforms and frames with text. You can use auto reports and controls to display the simulation results. tables. This is possible in Studio by using reference parameters and reference data. you must specify the simulation settings to be used by the component. Add navigation to your simulation by the use of hyperlinks and bookmarks.26 - . and they are added to the level according to the level's flow definition. it's time for the final touch. The variable definition expresses how the variable relates to other variables in the model. This is done in the Definitions property page. Define variables and flows Once you have created the variables. 7. with a resolution of a year or two. slider bars. it has to have a unit compatible with the level's unit divided by time. 8. The simulation setup is essential to make your simulation behave the way that you want to. however. In many cases you also need to provide input for your constants while the simulation runs. 6. Set up the simulation Before you can run your simulation. This is also achieved by the use of controls. available when you double-click the variable (or hit ALT+ENTER). 5. you can create your own help system in HTML that can be started from the project. with weeks or months as the time step. and gauges at your disposal for displaying simulation results. The time horizon of a simulation will vary with the system your are studying. Create data in. as an example. you are more likely to require a time horizon of a few years. You have time graphs. Create and save reference data It is often useful to be able to compare a simulation run to data from other simulation runs. . You can create buttons or sliders as tools for data input. charts. You can also save a simulation run and activate it again later. your time horizon will probably be about a century or two. performing this and the previous step simultaneously.and output objects It is not very useful to run a simulation unless you can view the results of your simulation while it runs. Note! You must always make sure that (continuous) flow rates have a "rate" unit. that is. it's time to define them. Flows are defined by the flow rate that controls them. Add navigation capabilities and documentation When your simulation behaves the way you want to. If you are studying a human population.4.

The Presentation Mode removes all the development-related tools and buttons.27 - . .9. and displays only the simulator itself. You can use the Presentation Mode as a "simulation browser. Set up the Presentation Mode Finally." which makes your simulation easily available for your end-users. you can use the Presentation Mode to present the simulator interface you have created to the user.

The Risk Assessment task let you analyze the sensitivty of your model. Factors that are external to your own organization. You can also read a brief listing of the new features and functionality. The most important features are described below. The result of such a simulation is the likelihood of achieving a certain result. Powersim Studio 2003 allows you to divide your simulation model into smaller submodels that hide away unnecessary implementation details. Through the Risk Assessment task in Studio. In addition. or other values that are difficult to determine.What's New in Powersim Studio 2003? Powersim Studio 2003 contains a range of new features and functionality that makes your simulations easier to create and more powerful to analyse. Risk Assessment Studio 2003 now includes the Risk Assessment task — one of the four tasks earlier available in Powersim Solver. . Hierarchical Models With the introduction of model hierarchy. modelling these submodels is just as easy as creating any other model.28 - . you can now investigate how changes in these assumptions affect your results. divide your model into subsections that are easier to maintain and model. such as the inflation rate. submodels can be created from components in any simulation project. and start reusing model structures from project to project. represent risk factors if they seriously affect the results from your simulation. You can also use Risk Assessment to find variables that are leverage points for improving performance. This makes the duplication of existing model structures extremely easy! Utilizing model hierarchy allows you to make more abstract models. As each submodel can contain its own diagram book.

and ranges.Hierarchical models allow implementation details to be hidden inside submodels. where you are now allowed to record summary information for periods. max. Improvements have also been done to time series. etc. you can create diagrams that are unique to the simulation you are working on. A change to the Shared Diagrams of the component will always be reflected in all simulations. and index variables. making your models easier to read and understand. You will also experience new user-friendliness when working with connectors (links and flows) in Constructor diagrams. You can display summaries in time graphs and time tables. Each simulation will maintain its own set of variable values. allows you to create your own custom functions by programming them in VBScript. however. but the model structure will be identical between each simulation.29 - . . including more flexible point editing and useful messages on the status bar while you work. Moving symbols between diagrams is also greatly improved. The improvements also include optimisations to simulation speed. Summary types enable you to present your simulation results summarized over a period. new and better views for equations. such as average. especially when implementing large variable definition expressions. co-models. min. the VBFUNCTION. By using Private Diagrams. You can select between several summary types. A new function. you can now add as many simulations as you wish. Improved simulation capabilities While you in earlier version of Studio could only have one simulation for each component in your simulation project. Variable expression validation will now be performed when you edit a variable’s expression directly in the diagram. units. New modelling features The property pages for variable definitions are greatly improved and simplified. accumulated.

And you can now even copy the history of a time graph to the Windows Clipboard! Hyperlinks can now be made relative. greatly simplifying the user interface of complex simulations. obviously. edit time series that are used in the simulation manually. An anonymous flow doesn’t have a flow rate. text search in tree views. such as the Equations and Units views. The introduction of index variables makes it possible for you to create controls that select between the dimensions of array variables without having to implement this by the use of model variables. and much more. The Studio Dataset allows you to store data for later use. You have greater control over your external connections in Studio 2003 than in earlier versions of Studio. Other improvements and new features include improved delete and undo functionality. and now allow you to drag-and-drop variables from models into the datasets.30 - . Combined with improvements in graphs and tables available in Studio. you can copy model structures directly into your documents as graphics. the ability to organize your components and datasets into your own folders. makes it easier than before to create interesting presentations of simulation results. and more. Studio 2003 introduces the new Studio Dataset. It is now easier to add parameters to your controls and you can even use controls to set simulation . and makes export and import of data from and to Microsoft® Excel a lot easier. but is a tidy way of showing how the flows run through your system. You can also create multiple instances of the dataset within Studio. You can in turn use the index variable to index the parameter of output controls. where you can record your time series to internal data storages inside your simulation project. The user interface for the Spreadsheet dataset is also redesigned. share simulation data between several components. allowing the same simulation interface to be used for all the simulations within a component.Anonymous flows allow you to gather all the flows from a submodel to another variable (level or submodel) in your diagram in one common flow. this constitutes a powerful means of conveying your message. Presentation of simulations The improvements to time series mentioned above. Index variables can be used as parameters by input controls. The new SAP® SEM dataset allows Powersim Studio 2003 to run stand-alone and still connect to the SAP systems. The user interfaces are now userfriendlier. Connectivity Datasets have gone through a complete overhaul since Studio 2001. When you have finished your simulation model and are working on documenting it. The internal workings of the datasets are also vastly improved.

Automatic detection of the states of the Switch control simplifies the creation of buttons that control index variables and logical variables. rotation of tick labels. the possibility to save and load external data (when using datasets) from Presentation Mode.details. Other new features include field codes. . and much more. bar and step graphs in the Time Graph control. such as the start and stop times.31 - .

to historical results. This approach helps us manage the incredible amount of data. System dynamics is a computerbased simulation modeling methodology developed at the Massachusetts Institute of Technology (MIT) in the 1950s as a tool for managers to analyze complex problems. and behavior usually changes over time. This is because system dynamics simulations are designed to correspond to what is. Using system dynamics simulations allows us to see not just events. System dynamics simulations are good at communicating not just what might happen.they continuously change over time. The word "dynamic" implies continuous change and that is what dynamic systems do . Its primary audience is still managers. More sophisticated approaches are usually required when . Sometimes the simulation looks backward. problems. some of which are intentional and some are not. Understanding patterns of behavior. Although this method is a good approach in some situations. the most common approach to new problems and situations is to take them apart and examine their pieces. At other times it looks forward into the future. and economics. physics. all but the simplest problems would appear overwhelming. The behavior of a system often arises out of the structure of the system itself.32 - . instead of focusing on day-to-day events. As humans. in the real world. but also patterns of behavior over time. is not the same today as it was yesterday and tomorrow it would have changed yet again. This structure is represented by a series of causally linked relationships. we can react to them in several possible ways. We are taught this method in our youth and it is reinforced almost daily. and chaos that bombards us every day. We do this in the hope that by understanding the pieces we will also be able to understand the entire problem or situation at hand. Their position. or state. Some of these consequences will be seen immediately while others might not be seen for several years. although it has spread widely in academia. stress. can offer a radical change in perspective. where professors and students use it to model systems from every conceivable discipline ranging from history and literature to biology.Introduction to System Dynamics Simulations in Powersim Studio are based on system dynamics. to predict possible future results. The approach we select is based on prior experience and our knowledge of the problem at hand. or might be happening. It shows how a system's own structure is the cause of its successes and failures. If we didn't have this ability. The implication is that decisions made within an organization have consequences. Solving Problems When confronted with problems or new situations. but also why. it can be inappropriate or even dangerous under different circumstances.

We use these models in all aspects of decision-making. A new field. when a rigid mental model stands in the way of a solution that might solve a problem. By studying interactions and connections between the pieces of a system. Our minds do not contain real economic or social systems. Systems thinking is powerful because it helps us see our own mental models and how these models color our perception of the world. it is difficult for us to alter our mental models. The reason for the problem might seem obvious. are examined. as well as the connections or interactions among these parts. A number of factors may be the cause of the problem. we can gain knowledge that can be useful when confronted with other problems. general systems theory. When we study the parts and the interactions between them. and so on. Gaining awareness about how the system is built up and how it works can also help us avoid solutions that only treat the symptoms of an underlying problem without curing the problem itself. Problems can occur. Systems Thinking and System Dynamics The ideas we have presented thus far are important in both systems thinking and system dynamics. There are always some beliefs or viewpoints that we are not willing to change. Systems theory expands further to include two major fields in management science: systems thinking and system dynamics. This will in turn make it harder for the salespeople to sell the product to customers who want an immediate delivery. they were put together using a set of rules common to all. This causes a certain resistance to new concepts. Perhaps the management information services department has not provided the salespeople with the computer support they need. long-term solution to a problem. developed around the notion that no matter how different the parts of individual systems were. The company must be losing market shares because the salespeople are not selling the product. which may come to light only when the interactions among all parts of the corporation. In systems thinking we look for interrelationships among system elements. Seeing the interrelationships can also help us find leverage points within a system (places where a slight change will have a tremendous effect on the system's behavior). Systems theory suggests that knowledge of one type of system can be applied to many other types. and not just the parts themselves. be it declining market shares or disagreements with the labor union.investigating corporate problems. The study of systems is not new. such as the accounting department. the way corporations function. The company might already be divided into "parts". they contain representations . no matter what evidence is presented against it. In such situations. we in fact study the entire system. What is often lost in the picture is the fact that the sales department depends on many other departments to do its job. It dates back to the 1920s when researchers from different disciplines began to see that many patterns were common to all fields.of reality. A corporation is an example of such a system. as when a loss in market shares causes executives to target the sales department for investigation or punishment. Connecting the Pieces We are viewing a system when we look at a group of individual parts. composed of many departments that in turn act as systems themselves. Instead. We all use mental models every day. If everyone's mental . and the human role in each. We do this to avoid placing blame in favor of finding the true. adherence to mental models can be dangerous to the health of the organization. Deficiencies may be in any or all of them. Problems affecting the entire company are often blamed on a department. resources are mobilized to deal with the problem. the sales department.models . Or maybe manufacturing has been suffering from poor scheduling of orders and a backlog has developed.33 - . If a company is experiencing a serious threat to its survival. Systems thinking involves changing paradigms about the way the world works. however. Being explicitly aware of our mental models can help us understand why we make the decisions we do and how we can improve our decision-making processes. In many cases.

It represents all the information we have on paper or stored electronically. Even if building a learning organization . As long as mental models remain hidden. the place to find the most complete information about a situation is in the mental database. Viewed in this way. For change to be successfully implemented. What we do with that information is another matter. system dynamics can translate the understanding gained by systems thinking into a computer simulation model. This is one of the reasons why computer simulation can be a useful addition to the method of systems thinking. The human mind is a brilliant storage device.34 - . By experimenting with this prototype of the system at hand. especially when they are not close in time. how. and generic structures to illustrate common behavior. The largest and most complete information available to us is our mental information. sets the stage for a successful system dynamics study. we must base it on existing information. representing all information that is stored as numbers and constituting another hundred. In such cases. and get them in a frame of mind that is open to new ideas. Obviously.isn't the goal. In sheer size. Next is the written database.models are brought to light in the context of an organization. . by helping people in an organization see what the problems are and how their mental models contribute to the problems. System dynamics is capable of creating a learning environment . they constitute an obstacle to building shared understanding. we can gain further knowledge about the system. we can use the computers to formalize our ideas and assumptions and then simulate them through time. everything we carry in our heads. It helps bring together the people necessary to the success of the system dynamics study. this information database is the largest and most complete available to us. but we do have trouble relating cause and effect. A systems thinking study usually produces causal-loop diagrams to map the feedback structure of a system. It constitutes a powerful tool for understanding complex problems. System dynamics was invented to give managers a tool to understand the complex systems that they were charged with controlling. Finally.or thousandfold loss in the amount and richness of the information. Instead of trying to relate pieces of information in our heads. and they must be in an environment of open and honest exchange. people must be motivated to learn and able to act on what they've learned. When we conduct a systems thinking or system dynamics study. The methodology uses computer simulation models to relate the structure of a system to its behavior over time. System dynamics is closely related to systems thinking. The information we can use exists on several levels. Systems thinking. This is the first step in building a shared understanding within an organization. systems thinking can be a very valuable tool at the outset of a system dynamics study. we cannot reliably predict the outcome of any but the simplest situations with the simplest inputs.a laboratory that acts like the system in miniature.an organization with a high degree of shared understanding and knowledge about how the organization works . we have a numerical database. That is the beauty and power of system dynamics models. and why the models diverge. The behavior generated by that particular structure is revealed when the model is simulated. which may be smaller by a factor of a hundred or even a thousand. and allow an evolution of mental models. System dynamics takes the information about a system's structure that normally remains hidden in mental models and formalizes it into a computer model. we can begin to see where.

feedback. when they are combined into long chains of cause and effect. Because of the misplacement of the microphone. However. where an increase in price leads to a decrease in sales. In such diagrams we use arrows to indicate the relationships. A microphone that isn't properly set up will pick up the sound coming from its own speaker. This is one reason for using simulations. and delay. Feedback Feedback is a concept that most people associate with microphones and speakers. If the microphone and the speaker were set up correctly. The relationship between births and population is of another character. but some simulations based on methodologies other than system dynamics don't use it. Some simple simulations will incorporate only one or two of these principles. More sophisticated simulations will use all three to produce the kind of behavior we encounter in the real world. Cause and Effect Cause and effect is a simple idea. or even thousands of interconnections and cause and effect relationships. the system would work linearly. so does the population. which in turn has a negative effect on unit costs. they can become complex. however. When births increase. This sound gets amplified further by the speaker and picked up by the microphone again. which in turn has a positive effect on price. they are usually very easy to understand. Advertising affects market awareness. and unit costs. This is a situation where a change leads to a "change in the same direction". Sometimes. The human mind is good at developing intuition around complex problems. We can create causal-loop diagrams. Figure 1: A simple causal-loop diagram illustrating connections between price. as are often used in systems thinking to illustrate cause and effect relationships. price has a negative effect on sales. but poor at keeping track of dozens. The relationship between price and sales is such a relationship. sales. which we will discuss closer in the next section.35 - . The loudness of the sound going into the microphone would only affect the loudness of the sound coming out of the speaker. information about the way in which the relationship works is also included in the diagram. If we examine these cause and effect relationships isolated. Births affect the size of a population. Price affects sales. hundreds.The Tools and Rules of System Dynamics System dynamics simulations are based on the principle of cause and effect. Adding an "s" to the arrow in the diagram indicates this. This process keeps going until the speaker is producing the loudest sound it can or the microphone cannot pick up any louder sound. The idea is that actions and decisions have consequences. the loudness of sound coming out of the speaker also affects the loudness of sound going into the microphone. . In this diagram. Figure 1 shows a simple causal-loop diagram. Cause and effect feed back on each other. An added "o" in the diagram implies a "change in the opposite direction".

A high price will reduce sales and increase unit costs. (Examples: Business cycles. the number of potential customers and new sales. then we could show that as sales increase. (Examples: the number of employees in a workforce and the number of new hires. the price can go down. the unit costs for the product goes down. the more contacts.) Goal-seeking behavior. (Examples: Product lifecycle dynamics.) Oscillations. Figure 2: Four common behaviors created by various feedback loops. the more buyers. This is obviously not the whole story. but susceptible. and can spread the virus to others. the more buyers. Competitors set their prices based on our price based on our competitors' prices.that some causal chains are linked together so that cause and effect feed back to each other. making it possible to further reduce price in the future. Epidemics are yet another example. The causal-loop diagram of figure XX shows that the price we charge today will affect what we charge in the future. Competitive pricing is one example of such feedback. Feedback relationships can produce a variety of behaviors in real systems and in simulations of real systems. the larger the infected population. Viruses spread when a member of an infected population comes into contact with someone. If we used a cost-based pricing strategy. This structure is only one part of a larger system and the level of price and sales are also subject to influences from other variables in the system. As the unit costs go down. Buyers on eBay are attracted to the large number of goods available for sale. This person then becomes part of the infected population. who is uninfected. (Examples: sales within a start-up. A low price will increase sales and reduce unit costs. a population of rabbits. inventory oscillations.36 - . the acceptance of a revolutionary scientific idea. But still. „ „ „ „ Exponential growth. This happens everywhere in real world in all kinds of systems. The larger the infected population. though people are often not aware of it. Figure 2 illustrates four common behaviors created by various feedback loops.This is the general principle of feedback . Thus. The simple causal-loop diagram presented above illustrates feedback as seen in a price and sales example. making it necessary to increase price in the future. the sales go up. Sellers on eBay are attracted to the large numbers of buyers. Infrastructure of network effects is another example.) . the more sellers and the more sellers. this isolated feedback loop is easy to understand.) S-shaped behavior. As the price goes down.

though often not immediately. price. In this view of the world. as long as nothing else changes. New investments can have limited "windows of opportunity" for making a return on investment. and revenue variables. This may be because they have imperfect information about alternatives. sales does not change. Introducing new products or services sometimes has first mover advantages. To illustrate this let us look at the price and sales example once again. The behavior of the variables can be seen in Figure 4. Delays occur everywhere in the real world. So increasing either price or sales will result in higher revenue. Many decisions have outcomes that cannot be known for years and may never be linked to early mistakes. or some infrastructure is temporarily forcing them to a . Customers may take time to adjust their consumption patterns even after a price change. demand is usually affected by price. A child touching a hot stove will immediately understand the consequences of that behavior and will likely never repeat the mistake.Delays Not all cause and effect relationships occur instantaneously. or even years after an event has taken place. However. In economic terms. A project may for example have cascading side effects when critical-path tasks are delayed. Revenue for a product line is determined by multiplying price by sales. Delays can produce interesting and complex behavior in systems even when those systems have no feedback and limited cause and effect complexity. Figure 3: A diagram illustrating the effect of sales and price on revenue. demand is perfectly inelastic with respect to price in this example (there is no relationship between price and sales).37 - . it makes sense to always increase price because revenue will always be higher. It is difficult to understand a system when the consequences cannot be seen in close proximity to the behavior. Sometimes the consequences of an action or decision are not apparent until several days. Figure 3 shows this relationship. Notice that even though price and revenue change during the simulation. months. Figure 4: The behavior of the sales. Often the relationship between cause and effect is obscured by separation in time.

sales will not decrease immediately. Such diagrams are useful when it comes to isolating the feedback structures. Car owners couldn't reduce their demand for gas instantly . Even though this system contains no feedback and only three cause and effect linkages. and delays provides a good foundation when beginning to uncover the intricacies of a system's nature . Eventually. Because of the delay involved.they owned an expensive asset (i. Moreover. when the price shock occurs. When creating a system . it causes an immediate increase in revenue. Because there is no delay between price and revenue. the first thing to happen is that revenue goes up. feedback loops. customers are able to adjust their consumption patterns and sales will go down. The behavior of the price shock and the subsequent changes in sales and revenue can be seen in Figure 6. Figure 5: The effect of changes in price on sales is illustrated by a delay. as shown in Figure 5.specific option. in the early 1970s.what elements are acting on other elements and whether the interaction is positive or negative. Whether the new revenue is lower or higher than it was before the price shock depends on how sensitive sales is to price. however. Through one additional delayed linkage in the system. the results are vastly different.38 - . It is hard to anticipate the behavior of a system from a causal-loop diagram representing the feedback structure of a system alone. their big car with high gas consumption per mile) that couldn't be immediately replaced. sales will drop. Also. for example work commute. feedback loops alone do not indicate what the entire system's behavior will be.. the behavior of the system is already becoming complicated. This is also a good example of how structure creates behavior. resulting in lower revenue. except that we have introduced a delay. However.e. Understanding the concepts of cause and effect. gas prices around the world increased quickly and substantially. This is due to the delay in the system. For example. Figure 6: When a sudden change in price occurs. After a certain time. a lot of travel that car owners do isn't optional. resulting in a decrease in revenue as well. This linkage between price and sales is now similar to the original link we saw in the causal-loop diagram. however. It took consumers years before they could adjust their consumption patterns. not many cars with low gas consumption per mile existed in the early 1970s.

500 units to be placed in our warehouse. However. the only real changes we can make to a system are changes to the structure. we represent the feedback structures by the use of levels and flows.dynamics simulation. we must allow some time for those additional 1. flows represent the system's activity and are dependent on the values of the levels. Even the system of a swinging pendulum can be described in terms of its "decisions" in the face of governing policies (the rules of physics). Without flows. Flows are action variables.500 units in anticipation of an increase in demand. creating dynamics when they accumulate in levels. If time suddenly stops. the distinction between the two is extremely important. of course. If our inventory is 6. Thus. when they receive it. Dynamic behavior can occur with absolutely no feedback. Levels and flows are the main building blocks of computer simulation models in Powersim Studio. but it takes time. As mentioned earlier. Many managers deal with the issue of inventory. They may have little or no control over what information they receive. levels would remain and be observable and measurable. one of the most important accumulations in many companies. Flows fill up or drain the levels. however. System dynamics refer to such accumulations as levels. Other changes to the system will soon be canceled out through the actions of negative feedback loops. They have memory. since too much detail or complexity might do more harm than good. what form it is in. we often do not realize that every decision we make is somehow governed by a policy. levels would never change. Because levels are increased or decreased only by their associated flows and flows depend on levels. flows are the "verbs". and therefore every element in a system. Decisions and Policies Many people intuitively understand the difference between decisions and policies. they are often blamed for misinterpreting the data. much as the flow of water into a bathtub fills it. Managers must often make decisions based on limited information and their own previous experience. Levels Things accumulate or pile up around us every day.39 - . the rules of the . no matter how small. Flows If levels are the nouns of a system. Levels give a snapshot view of reality. Within corporations. which means they do not change instantaneously. the actual problem is usually much deeper. A delay is involved in changing any level. Every element in feedback loops. Dynamics are not created by feedback loops. Unfortunately. Providing the managers with more and more information is not necessarily the correct solution. Their values tell us how the system is doing at any given point in time. because it is simply the result of flows accumulating in levels.000 units and we want to increase it to 7. be it inventory or the amount of water in a bathtub. or how much they receive. They do change. A level may seem to be changing instantaneously. Therefore. When their decisions turn out to be wrong. This way we can gain knowledge and insight about the policies of the company. Levels are accumulations and flows represent the changes to these levels. and there would be no dynamic behavior. but there is nonetheless a delay. an alternating level-flow structure must exist for all systems. they are somewhat static or inactive. and the drain at the other end (another flow) empties it. Levels have several distinct characteristics. is either a level or a flow. through the actions of flows. Sometimes the conclusion is that the manager simply didn't have enough information to make the correct choice. Levels can best be understood as the "nouns" of a system. It is often a better idea to examine the structure of the organization. This action of flows being accumulated in levels is the cause of all dynamic behaviors in the world. even though it may seem that feedback (transmission and return of information) is causing the changes to occur. the behavior of a system is a consequence of its structure.

Informal policies can be hazy. When there is discrepancy between actual and desired conditions. decisions control all processes of change". as flows are never instantaneously observable and therefore can never affect instantaneous decision-making. intuition. the decision on how much inventory to order must be based on the present value of the level of inventory. the way decisions control change is through policies. given the complex cause and effect relationships and feedback loops that exist in most systems we are in contact with. As Jay Forrester states it: "Only rates [flows] resulting from decisions change levels. Decisions are governed by policies. decisions could be how many orders to submit to the supplier to replace inventory. Levels can represent the actual state of the system at a given point in time (current inventory) or the desired state of the system (desired inventory). corrective actions are usually taken to move the actual state closer to the desired state. The first attempt to solve a complex problem rarely succeeds. The ultimate goal. This is not surprising. the decision of when and how much to order will always be the same in the sense that it fulfills the inventory policy. participants know exactly what policies are guiding their decisions and are able to anticipate the actions of others in a similar situation. Decisions are attempts to move the system toward our goals. decisions control the flows to and from levels. with a formal awareness of the reasons of action. A decision to replenish inventory should be based on the present level of inventory (a level) and not on the rate of sales (a flow). not just the decisions. we must make changes to the structure . it is the policy statement that attempts to move the system toward a goal. and these equations are statements of system policy. If the inventory pattern is essentially chaotic while the desired pattern is a flat line. Decision-making Process Decisions must always be based on observable variables. In a system dynamics model. and social pressures and power within the organization. In the context of a corporate model. is to find the optimal mix of policies that create the desired behavior (smooth growth of revenue. or when to replace capital equipment. effective policies can be developed to provide a proper guiding framework for the average manager. This can be described as a reaction-driven or "open-loop" approach. Levels should be the only inputs to decisions. Therefore.).000 units. a system dynamics model must represent the basic policy structure of that system.the policies . Actual conditions are continuously compared to the desired conditions and action is taken according to the discrepancy between them. how many workers to hire. In this way.organization. They are considered equally important in understanding the behavior of a complex system. Only levels control decisions and rates of flows.there is too much or too little inventory or the amount has fluctuated wildly in the past six months . etc. Specifically. When problems with inventory develop . and the flows determine the change in the levels.of the organization. and it takes four weeks to receive orders from suppliers. personal interest. In the example above. It provides the connection between information inputs and the resulting decisions stream. However. Usually. They can also be explicit. decisions regarding inventory can be made accordingly. constant inventory.a common reaction is to look for the person who has been "ordering the wrong amount". if real change is sought. We can illustrate this idea easily with the concept of inventory. In the latter case. Policies may be informal. To truly capture the problematic behavior of a system. but the system dynamics model attempts to make them explicit. Flows are defined by equations. informal policies are treated with as much concern as explicit policies. that provides the setting for decisions. it is often more appropriate to examine the pattern of behavior and compare it to a desirable pattern. corrections change the system and lead to a total redefinition of the problem. This is an iterative process. If the policy is that inventory must not drop below 6.40 - . implicit or explicit. Companies that must keep inventory have specific rules for when more inventory is ordered. No matter who orders the inventory. no matter who is in the decision- . this means that decisions must be based entirely upon levels. In such a model. In other words. The model can then be used to try out various policies before implementing them in the real system. spoken or unspoken. Policies describe how and why decisions are made. such as a consequence of habit.

the easier it will be to resist the temptation to overdo the structure.the policies . The people who should be involved in corporate design are those who have the power to truly change the structure of the company . it is not enough to have a vague notion about the problem behavior. This is the art of modeling: it is subjective. According to Forrester. For many of us.of the corporation can eliminate problematic behavior of the corporation.making process. Although we will go through these in a certain order. Let us take a closer look at the stages of the modeling process. such as the effect of seasonal fluctuations in demand on the level of inventory. when creating a model. and the only people in a position to do so are the executives. The problem should therefore be defined as precisely as possible.41 - . We should always keep in mind that system dynamics models are not concerned with the behavior of individual variables. we should always keep in mind that creating simulation models is an iterative process. If the problem concerns the interactions of variables. They should create the necessary policies so their managers will be able to make good and informed decisions. it is necessary to map the relevant variables against each other. However. The problem definition is the keystone of the entire activity. frustrating at times. Changing the structure . we can formalize these concepts and views of the world into a computer simulation model. It is simply one representation of reality. corporate executives should be corporate designers. The narrower our focus. it is extremely useful to draw the shape of the behavior against time. Just as non-pilots in crisis situations have been able to land planes because of the design of the plane. Usually. The main focus is on how each variable interacts with the other variables to produce the system's behavior. with improved policies and structures. Corporations can be designed so that only highly skilled professionals will be able to navigate the company through the ups and downs of the business world without creating the symptoms of the corporation's problems. This doesn't mean that every manager should be thinking in terms of corporate design instead of corporate management. Although it might sound like the easiest part. This definition is the basis of all our future efforts and our guide in decisions concerning boundaries and validity of our model. . You may find that you learn more in the process of creating the model than in manipulating it after it is finished. Problem Definition The modeling process begins with defining a problem. Instead.the executives. then take three steps back and reevaluate everything we've already done. This way we can build an understanding of how each of the various variables affects each other. If we can use numbers to define the problems. we will advance one step. so can managers more easily "pilot" a well-designed company. By using Powersim Studio. Numbers are a useful tool in this stage of the process. built to explain a particular problem. Defining the problem is essentially defining the purpose of the model. If no real data are available. such as real inventory data to illustrate the problem of inventory fluctuations. using these concepts represents a new way of viewing the world around us. Building the Models In the previous pages we have introduced the concepts and principles of system dynamics. we will not create it in a linear fashion. and in the end we can never say that the model is "correct" or even finished. managers will have the tendency to make correct decisions because the structure has been built with an autopilot in mind (goal-seeking feedback loops. for example). we will be better equipped to define the problem.

The model should only contain the structure that is required to generate the problem behavior. Exogenous variables are usually parameters to the model. When we simulate our model and discover that it isn't working the way we anticipated. No matter how we collect the data. One quick solution is to quickly sketch the behavior of the variables based on your own experience or anticipation. if the behavior of the model changes wildly when parameters are changed. the model is not generating the behavior internally. Likewise. and whether these variables will be endogenous or exogenous. Reference modes graph the behavior of variables over time. Another more time consuming and costly way is to base the reference modes on real data. but often we will have to gather the system data ourselves. this can be a desirable way of working. A boundary diagram is shown in Figure 7. Exogenous variables are essentially parameters to the model. and they can usually be considered constant. This may sound tedious. The process of data collection will of course vary from system to system. Endogenous variables are those whose behavior is generated within the model.Model Boundaries Given the problem definition. or creating small models to illustrate decisions or facts. but there is a good reason for including them. we can compare the behavior of the variables to the reference modes to identify missing or incorrect structures in the model. Creating boundary diagrams can be useful at this stage of the process. Variables and Reference Modes The next stage in the process is to make reference modes for all relevant variables. It is simply too dependent on outside influences.42 - . we do need reference modes for all other variables as well. Such diagrams will help us identify the variables to include in the model. However. we can start to set the boundaries of the model. Sometimes these data are readily available in the organization. If you are experimenting with Constructor. while the behavior of endogenous variables are generated within the model. We should always attempt to eliminate structures that don't contribute a significant difference to this behavior. We can create reference modes in various ways. It is essential that we have a reference mode of the problem variable itself. In such cases the model boundaries should be extended to make room for these exogenous variables to become endogenous. the purpose is to understand the structure and behavior of the . Their values come from outside the model. Figure 7: The boundary diagram illustrates the scope of the model.

and to start generating names and units of measurement for variables. to make it easier to evaluate the outcome of the model. We should always keep the real system in mind when we choose constants. however. The latter ones might become helpful later. Although Powersim Studio takes care of the calculus. using the primary system variables. this stage also involves choosing parameter values. In the beginning. Sometimes we find it difficult to relate variables directly using strict. flows. This is the stage at which we will make causal-loop diagrams and diagrams using levels and flows. we must identify the key concepts and components to include in the model. as shown below. we would probably have a 'Production Rate' (a flow) filling an 'Inventory' (a level). have a clear view of the domain of the problem. and use graph functions available in Powersim Studio to define them.'Inventory')/'Inventory Adjustment Time' In addition to specifying the equations. From this list. we can start creating the Constructor diagrams and defining the equations of the model. Which comes first is a matter of personal preference. The equation defining 'Production Rate' (the flow rate) must combine the variables it depends on in a form that yields a rate equation with the unit 'widgets/week'. At this stage we are simply trying to formulate the problem. These graphs are also specified in this stage. If we look at a simple inventory model. The units of measurement of such a system could be 'widgets' for 'Desired Inventory' and 'Inventory'. Graph functions are most useful when representing nonlinear relationships between variables. it might be a good idea to stick to round numbers. or constants. We can begin to determine which variables influence each other and how they can be connected by physical connections (flows to levels and levels to flows) or information links (all other connections). Model Formalization With the conceptual design in place. ('Desired Inventory' . In addition. We can throw out the variables that are irrelevant to the purpose of the model and set aside the variables that we are not sure of. It is important to refer back to the problem definition for the model. when we arrive at the stage of model design. the flow would also be dependent on two constants. It is usually a good idea to go down the list of variables first and identify levels. When we are comfortable with the collected data. This helps us structure our information. and have generated a list of primary system variables. in terms of feedback loops or levels and flows. namely the desired level of inventory ('Desired Inventory') and the time delay in adjusting the production rate ('Inventory Adjustment Time'). The flow rate would be dependent on the inventory level.problem. or we might have to estimate reasonable values. The key is to be consistent. we should identify primary system variables. we can use the problem definition and boundaries of the model to identify these primary system variables. The units of measurement for each variable will now provide an instant check for you. since production will depend on how much inventory is available. Initial values of levels should also be realistic for the particular system. Conceptual Model Design Now that we have reference modes that we have confidence in. We might already know the values from the system data we collected at the beginning of the study. The list of variables usually becomes very long. In these cases it is often better to create a graph that expresses the relationship between the variables. . since Powersim Studio requires the units of measurement to be consistently defined throughout your model.43 - . and 'weeks' for 'Inventory Adjustment Time'. we are ready to create a conceptual model design. mathematical equations. Again. and it might be useful to experiment with both to find the most comfortable. The units of measurement can provide a good check in this stage. we need to relate the variables in much the same way as we would create cell expressions in a spreadsheet.

This is illustrated in Figure 8. When we have put our conceptual model into the computer using Powersim Studio. we will be able to simulate our model under different conditions and observe the results. In integrating a function. Once we have determined the time horizon and time step of the simulation. flows. and delays . we are simply measuring the area underneath the function by dividing it into equal-width partitions and then summing up the area of all the partitions. no matter how complex. and all the variables and equations are well defined. we can simulate the model and view its behavior over time. can be represented in Studio by the use of these variable types and connections.with all their cause and effect relationships. To truly understand the model. The shorter the time step. Building Blocks in Powersim Studio Powersim Studio is a modeling environment based on the science of system dynamics. feedback loops. and we will usually select it so it matches the time frame of the problem behavior. If we cannot get the behavior we want we must go back and reexamine the structure of the model and try to determine why it is creating the unwanted behavior. A level is the accumulation (or integration) of the flows that causes the level to change. When the model adequately represents the real problem. The time horizon represents the period of time we want our model to simulate.44 - . We should try to imagine what the model should do when it is simulated. It is often useful to try a few "mental simulation" exercises before simulating the model. When the model is simulated. Levels and Flows In a system dynamics model.and thereby have a starting point in figuring out why. It could be that we forgot to take certain variables into account and that our expectations of the behavior were wrong. we can use it for policy analysis and experimentation. we will see whether the actual behavior differs from our expectations .it most probably will . The time step represents the time interval that the simulation progresses for each calculation. When we understand why the model generates a certain behavior. and "helper" variables (so called auxiliaries) are used to create graphical representations of the system in Constructor diagrams. Studio allows us to model systems . The causal-loop diagram is often useful in this regard. The entire structure of a system.Simulation We are now ready for the simulation stage of the system dynamics modeling. the structure of the system is represented mathematically. Symbols representing levels.in an intuitive graphical manner. and the slower the model will run. When we simulate the computer model. It is specified by a start and stop time given relative to the selected calendar. The time horizon will vary from model to model. we must relate the structure we have created to the behavior that results from simulating the model. we must set up appropriate simulation settings for the model. Flows and information links represent relationships and interconnections. the more calculations Studio will perform. . It could be that the structure of the model is in error. we can experiment with changes in the structure to generate the actual problem behavior as we described it in the early stages of the model creation. The two most important are the time horizon and the time step. We now have a mini-laboratory in which to simulate the effects of various policy changes before implementing them in the real system.

and the flow is controlled by a flow rate. . This is done by dividing it into equal-width partitions and summing up the area of all the partitions. If we were interested in including this information. The clouds tell us that in this model we are not concerned with where the hired people come from or where the fired people go. These are the source and sink of the structure. Double arrows represent the flows. boxes represent levels. a circle represents auxiliaries. respectively. The flow rate is defined in the same way as auxiliaries (see below). Figure 9 shows a simple model when created graphically in Studio.45 - . and the firing rate adding to a level of former employees. To achieve a certain level of detail or to aid in the formulation of flow rate equations.Figure 8: When integrating a function. where we have the hiring rate draining a level of applicants. as shown in Figure 11. which is increased by the 'Hiring Rate' (flow) and decreased by the 'Firing Rate' (flow). in the same way as cells in a spreadsheet are defined. we could add another level to the left of the hiring rate and one to the right of the firing rate extending the model boundary. the area underneath the function is measured. In Studio. Studio has a few more tools to help us capture real-world phenomena in a model. measured in people. the level is the 'Workforce'. it is sometimes necessary to model a variable as an auxiliary. Figure 9: A simple model created in the graphical modeling language of Powersim Studio. The cloud symbol indicates infinity and marks the boundary of the model. Notice the cloud-like symbol to the left of the first flow and to the right of the second flow. This is shown in Figure 10. Figure 10: The model of Figure 9 with extended model boundaries Auxiliaries While it is possible to create an entire model with only levels and flows. That information is beyond the model boundaries. Every variable in the model is defined by an equation. in the simple structure illustrated in the figure. For instance. connecting the variable symbols generates the integral (flow) equations. When creating a simulation model graphically in Studio. In Studio.

Sometimes we find ourselves confused about whether an element of the system should be included as a constant auxiliary or as a level. Without a clearly defined problem to model. Once again we return to the important issues of problem definition and model boundaries. flow rates. so they change with no delay. Note that flow rates and auxiliaries are defined in exactly the same manner. as shown in Figure 13. Information links show how the individual elements of the system are put together. as shown in Figure 12. however. we will be unable to set the proper boundaries. A diamond represents these constants. it is an algebraic computation of any combination of levels. indicating a . Levels. We will then be in a better position to decide what elements should be constants and what elements should be allowed to vary during the simulation. unless the user changes the value manually (by using a slider bar. We have already seen how flows change the levels by filling them or draining them. however. because flows are the only variables that change their associated levels.46 - . They can be inputs to flows. instantaneously. and thereby controls the flow directly. Information links can transfer the value of the level back to the flow. workforce would most likely become a level and be allowed to vary over time. Figure 13: Information links connects various variables. and maintains this value throughout the simulation. It has no standard form. can be inputs to auxiliaries. Information Links Connections are made among constants. auxiliaries. Although auxiliary variables may appear to be accumulations. or other auxiliaries. In a sense they close the feedback loops. Constants Constants are. If the simulation were to expand to 20 years. not the physical flow of goods. constant over the time period of the simulation. The difference is that the flow rate is connected to the flow valve. In these situations we should try to rethink the problem. These links appear as thin connectors in the Constructor diagram. they have no memory. Auxiliaries are used to model information. We should think of the time period of the problematic behavior and whether or not it is reasonable to expect the element to change over that period. but never directly to levels. unlike levels. unlike ordinary auxiliaries. for example). a company may have an essentially fixed workforce that can be represented as a constant auxiliary. in a one-year simulation. and levels by means of information links. For instance.Figure 11: Auxiliary An auxiliary is used to combine or reformulate information. Figure 12: Constant A constant is defined by an initial value.

the definition of Interest is simply 'Interest Rate' * 'Account' Creating a Model The previous chapters have introduced you to the field of system dynamics and the principles behind building computer simulation models. To help you create your first simulation models we have created a Learning Lab that will guide you through the steps of modeling and simulating a model. the definition of Interest must include Account and Interest Rate.dependence of the flow on the level.47 - . . In the simple model structure in Figure 14. this means that for the model to be consistently defined. as well as the obvious dependence of the level on the flow. The Learning Lab also contains finished models that you can study. For a Constructor diagram to be consistent. In this example. the equation that defines a variable must contain all the variables that are linked to the variable itself. as seen in Figure 14. Figure 14: A closed feedback loop representing the interest earned from an account in a bank.

However. Select the model you want to import and click Open. there are some differences between the current version and earlier version when it comes to functions and syntax. Simulation settings. are partly converted. this means that you should be able to run your simulation immediately after converting the model. 2. You will be warned at the end of the model conversion if your model contained one or more of these functions. ranges and so on.sim). There are big differences between Powersim Studio and earlier versions of Powersim Constructor. as they no longer exist in Studio. etc. model variables and their definitions are converted. ranges. select Powersim Simulation Models (*. are not converted.48 - . 3. You must in these cases use the new controls to create a new user interface for your simulations. „ If any conversion function contains the % (percentage) operator. In most cases. However. The list below summarizes these conversion issues. Diagrams All modeling objects. such as variables. Simulation settings. Variables and definitions Variables and their definitions are converted. units. Click Open on the toolbar. some objects.51: 1. units.Import Models From Constructor 2.51 To import a model from Constructor 2. the requirement of the new . links and flows are converted and displayed. Some parts of the models will therefore not be converted correctly. Import Models: About Variable Conversion With few exceptions. such as the Command Button. In the Files of Type field. Functions The function groups listed below are not converted.

please check your variable definitions before running the simulation.51 you could emulate complex numbers by using arrays containing the real part in the first element. However. the following syntax is used aux A = Array[1.6} When indexing arrays. Because Constructor 2. (The syntax for creating complex numbers is: (<real>. The complex functions from Constructor 2.51 are therefore obsolete in Studio. If you run into trouble after converting models containing this kind of dimension. please check your dimension definitions. Functions connected to the Network Gaming Object. The new expressions are built up using nested IF functions combined with the FOR function. You must manually specify the resolution parameter to define the variable properly.49 - . STRATEGICMODE(). The table below shows a few example of range errors in Constructor 2. you should go through it after converting it and use complex numbers instead. also when using named ranges. as mentioned above. ROUND (A*5%)). This has changed. etc. BUT. Arrays Some of the array functionality that was present in Constructor 2. Functions working on complex numbers. In Studio.) are not supported in Studio. etc.51. The syntax for defining and indexing arrays has also changed a bit. In Constructor 2. . complex numbers are a unique data type. the FOR and IF functions can be used to replace these expressions. are not supported. When creating arrays.51. you might experience problems when this is the case. The most significant difference is that constrained expressions. such as SELECTDECISION(). Studio inserts a FOR function in these cases. SHIFTLIF. However.) Functions that were obsolete in Constructor 2. converted to expressions that will work in Studio. you can still use the SCAN* and LOOKUP functions.4. The expressions are. and functions will handle complex numbers in a much more advanced way. and the complex part in the second element. If your model used complex numbers (modeled as arrays). etc. the variable will become undefined in Studio. Functions with side-effects (such as ASSIGN.g. so if your model uses unsubscripted arrays.2.). however. You were not always required to include array subscripts when using arrays as input parameters to functions in Constructor 2.51 in some cases didn't calculate ranges correctly. you should now use the following syntax: aux A = {1.5.3. is not available in Studio.51. and when converted. Any variable containing a conversion function where the % operator is used in the parameter (e.51 (having names with the extension '__OLD').„ „ „ „ conversion functions are not satisfied unless additional parameters are given. <imaginary>). Constrained Expressions Constrained expressions (expressions containing the keywords WHEN. you might experience problems for some range definitions.3] To find elements in arrays. Dimensions The dimensions defined for a variable. will be converted to the new Studio model. OTHERWISE.

<imaginary>).4 2.51 are therefore not imported. . The contents of the unit field is moved to the variable's note field.51. notifying you about the problems. Studio tries to adapt the data type of the variable to the variable definition..3 2.. For information on whether a function accepts complex numbers as input parameters. thus restricting some of the flexibility found in Constructor 2.. Data Types Studio supports four data types: INTEGER. In Studio complex numbers are a data type. Most notably is the IF function. Constructor 2. When converting the model. In Studio.3 Index(2).51.51 emulated complex numbers as (real) arrays with two elements. and LOGICAL. To avoid causing unit inconsistencies in the new model. In Studio the flow has to be dependent on the rate itself. Constructor 2. If you choose to turn off the automatic type conversion. Studio will automatically detect the unit based on the variable definition. REAL. Custom Flow Definitions When creating custom flow definitions in Constructor 2.51.. None of these were present in Constructor 2. Instead. Rather. it will add a note in the note field of the variable. Complex numbers are now created using the syntax (<real>.6 (-3+2). Expression Constructor 2. COMPLEX. Notes If the model conversion runs into problems when converting a variable expression into the new format. you could (to a certain extent) create flows that wasn't dependent on the flow rate itself.6 3. that requires the first parameter (the condition) to be a LOGICAL variable. units are an integral part of the variable expression and are computed at run time. and you should revise your model to implement complex numbers correctly.. you will manually have to go through your model to change the data types of the various variables..51.4 Invalid Units In Constructor 2. the unit field was merely a text field that had no impact at all on the variable expressions. When you convert a model from Constructor 2. it was dependent on a value that in turn was dependent on the flow rate. please refer to the function's reference sheet. you will have the option of turning data type conversion off.51 to Studio.51 models that performed calculations on complex numbers must be revised manually.50 - .Interpretation Dim.. Custom flows and flows that are not expressible through a flow expression in Powersim Studio will therefore by converted by disconnecting the rate variable and adding a new rate variable that implements the custom flow. units from Constructor 2.51 Studio (-3).3 -1.6 -3. Note! Some functions might require that the input parameters have certain data types in order to work..

yet unsupported in Studio. In some cases. Some of the functionality will therefore be lost in the conversion process. While the Keep Value property for a parameter belonged to each control in Constructor 2.51 featured sectors.51. Time tables are converted using time Table Controls. Switch The Gauge Report in Constructor 2. .51 could contain field codes. These field codes were substituted by the text information they represented in the diagram.51. edit the text manually and remove the field codes. The new Chart Control in Studio only accepts arrays (vectors) as input parameters. frames.Import Models: About Diagram Conversion All variable symbols.are converted to the simulation project. you might want to go through the simulation project and use the new diagramming features in Studio. Model Object Symbols All model object symbols . sizes. Report objects in Constructor 2. flows. Number objects are converted using Table Controls. However. Data Input and Output Objects The following objects are converted: „ „ „ „ „ „ „ Lines.51 had a lot of features not supported by the new Control in Studio. and more freely format colors. Time graphs are converted using time Time Graph Controls.51 to Studio. and constants . in contrast to the Array graph in Constructor 2. etc. Note! While you could specify the Keep Value property for a single array element in Constructor 2. Gauges are converted using Gauge Controls. and texts are converted using freeform lines and frames (with text).links. If necessary. you will be required to go through the model and create new input or output objects. In the converted diagram this will appear as a code enclosed in curly brackets. Powersim Studio doesn't support field codes. These allow you to separate your model into several diagrams. the entire array will therefore become permanent. All parameters with the Keep Value property set in Constructor are therefore converted into permanent variables in Studio. and most other diagram objects are converted from Constructor 2. Array graphs are converted using Chart Controls.51. The Button Report in Constructor 2.51 will be displayed as if it were normal text. In these cases. the converter will collect the variable elements from the Array graph's parameter list into a vector variable and add this to the Chart Control's parameter list.51 - . When the model is converted. however. the same functionality is now achieved by using Permanent Variables in Studio. and field codes from Constructor 2. Button Reports are converted using Switch Controls. levels. like '{Par:Global}'. Studio requires the entire array (the variable itself and not the element) to be permanent. auxiliaries. links.

In some special cases. The windows could be customized to avoid resizing and scrolling.52 - . This will. but they will remain undefined until you define them properly. The data type defines the value characteristics of the variable. so this should not pose a big problem. The only error would be that the variable(s) defined by the range expression will be undefined in the converted model. Moreover. In Studio. When converting models. Because of the difference in the capabilities and uses of the two versions. Tip! You can use the new Presentation Mode to create simulator interfaces in Studio! Model Information The model title. etc. however. INTEGER. units were not taken into account when calculating the simulation results. REAL and COMPLEX. to an extent. the command button is no longer present in Studio.Simulator Layout A typical simulator layout in Constructor 2. You should go through your model and utilize the new features in Studio to redo the simulator layout as you please. Information about document dates for creation and last saving are not transferred to the new component. eliminate the need of having several windows for the same diagram. a lot of information concerning simulation times. Although you can still open several windows for the same diagram book in Studio. author and summary are transferred to Project Information for the new simulation project. also needs to be converted. Units In Constructor 2.51 utilized control buttons. The data types are: LOGICAL. ranges and unit settings and so on. the window and simulator layout is not converted with the model.51.51 will be included in the Global Units list in Studio. among other properties. a numerical value that is used as the condition parameter in the IF function will be converted into a logical value by comparing . Ranges All ranges are converted into global ranges in Studio. Import Models: About Simulation Conversion When converting models. several windows that displayed various parts of the diagrams. Data Types Studio introduces data types for variables. and restricts what operations are valid for them. Studio attempts to adapt the types of sub expressions according to the way they are used in variable expressions. The unit names that were defined for a model in Constructor 2. For example. the units are used in the calculations. Models containing such range expressions are rare. you can now create several diagrams for each model. range definitions can fail to convert correctly.

which should be set equal to the "time unit" of your Constructor 2. However. Also. Further. Information about co-models.51 and Studio. you should review any definitions containing expressions related to time. You should consider changing these definitions to implement the DATE function. if you change the project or simulation settings after the conversion is finished. The declared time unit were assumed to be the unit of these values. Time and Time Settings In Constructor 2. Convert the ASSIGN function The ASSIGN function of Constructor 2.). you are asked to enter a time interpretation interval.51 did. Both the simulation time horizon and the step length for the numerical integration method was given as pure numbers. Therefore. which will always give an unambiguous result: the exact point in time to include in your definitions. This is very important if the value of the current time step is used directly as a part of your expressions. Definitions using complex numbers in Constructor 2. In Studio. The main reason why the ASSIGN function is removed.5 model.53 - . the introduction of time units for simulation time. The illustration below shows how the ASSIGN function could be used in a model. a unitless time scheme has been created in Studio. etc. you will be prompted for passwords when you start the model import. and the comodels themselves are therefore not converted.its magnitude to the value of 0. At the start of the model conversion. rather than per period (for example 10 cars/day. .51 Maybe the most significant change in functions between Constructor 2.5. Co-models Studio does not support co-models as Constructor 2. Tip! Datasets are connected to components in the Co-models view. is that it caused an influence in the opposite direction than was indicated in the flow diagram. This makes it possible to create flow rates that are given with respect to any time unit. is the removal of the ASSIGN function. 5m/s. Passwords View and Edit passwords are transferred to the converted project.51 (or rather arrays interpreted as complex numbers) should be reviewed after converting the model.51. is most likely to cause trouble when converting older models. You should review the project and simulation settings after the conversion is finished. the time value of the simulation was not directly connected to physical time. both the simulation time horizon and the step length are values given with associated time units.

aux B = .. the auxiliary C is defined with the Zero Order or Zero Order Immediate integration setting (available on the Integration property page in the Properties dialog box). The first parameter would be assigned the value of the second. . we would expect the value of C to be dependent on A and B. this is not the behavior we would expect. Studying the diagram. The assignment was made effective from the start of the next time step in the simulation. const B = . The only difference is that the assigned variable must in Studio always be a level (it can never be a constant). With the introduction of discrete flows. A Model Equivalent of the ASSIGN Function Although there is no function in itself that covers the functionality of the ASSIGN function.. the ASSIGN function could be used to assign a new value to both constants and levels. In Constructor 2. not the value of A to be dependent of C and B. or chart controls).. aux C = (B-A) // zero order integration method selected In addition.The ASSIGN function took two input parameters.. Note also that using zero order integration makes the value of C independent of the selected time step. the new value of A was not dependent on the integration method. This shouldn't really matter.. aux C = ASSIGN(A. This structure behaves correctly regardless of what integration method is selected for the component. though.51. it is actually not at all difficult to create a model equivalent that performs the same operation. Rather. It is also worth noticing that the ASSIGN function didn't take effect immediately. when the assignment had been performed. Both have initial values. slider. Also.51. creating a model structure that behaves like the ASSIGN function is very easy. since you can use the level in any situation where you would normally use a constant. The definition of the model above would be: aux A = .54 - ... The definitions are as follows: level A = .. B) The result of the simple model above was that the variable A was assigned the value of the variable B. and both can be used as target for user input through controls (switch. The model equivalent of the ASSIGN function available in Constructor 2.

If you select Zero Order Immediate.10 | IF(cond(i)... (defined as an array with 10 elements) aux B = .A[i]). IF(cond(i). A commonly used model structure is shown below: The definitions are shown below (the example assumes the arrays have 10 elements): aux A = . the level A will be changed at the start of the next time step (similar to the effect caused by the old ASSIGN function).51 could also be used to assign a given value to a single element within an array. The definitions for this structure are: aux A = . we want the assignment to occur 10 days after the start of the simulation. (defined as an array with 10 elements) aux B = . This is also possible with the model structure presented above.. it is a condition deciding when the individual elements of the array A should be assigned the value of B. If there are other flows connected to the level A. the ASSIGN function in Constructor 2. the level will be changed at the start of the current time step..0) A Model Equivalent for Array Operations In certain cases..51 was often used in combination with the IF function. The expression cond(i) denotes a condition for each array element of the array A. then these should be made dependent on C.10.(B-A). This structure can also be modeled in Studio. while the second setting will cause the level to be changed the same time step that the condition becomes TRUE. Thus.55 - .Note! If you select Zero Order integration. aux C = SUM(i=1.. C would be defined as: aux C = IF(TIME =STARTTIME+10<<da>>.. if you are creating an "assign" structure that reacts to a condition. 0)) . The model structure is shown below. ASSIGN(A(i). aux C = FOR(i=1... 0)) The SUM function was often used to "simulate" the FOR function that is now available in Studio. Or to put it in a different way. say. so that they become zero when the "assign" occurs. The ASSIGN function in Constructor 2. (B .. If. the first setting will cause the level to be changed the time step after the condition becomes TRUE. B).

In some cases. The example below shows how to feed scalar variables into an array variable. we want to use arrays for the different divisions. OTHERWISE. . you could treat the various elements of an array differently. you would maybe use the value of C in the Constructor 2. and the variables A and B to be defined.51 model in another equation.3 | A/B)) Example 2 If you have a model that contains both array structures and scalar variables. This produces variable expressions that are easier to read. etc. A*B WHEN i<= 1 BUT A/B OTHERWISE Using the FOR and IF functions.56 - . Using constrained expressions. A/B)) Alternatively. To solve this. this can be achieved by the following expression in Studio. rather than the constraint operators of Constructor 2. you might need to have them interconnect.51 (WHEN. In Powersim Constructor 2. and LOOKUP functions.. it is now included in the FOR function instead. FOR(i=2. The divisions work in such different ways. as shown below: CONCAT(FOR(i=1. FOR.3'. based on the index of the element. to your Studio model..51 model above can be expressed in the Studio model as aux D = ARRSUM(C) Convert Constrained Expressions When creating models. the result of the SUM function in the 2. Since the return value of the ASSIGN function was B.51. but you still have the capability of treating each array element differently. A*B. The definition required the dimension of the variable to be defined as 'i=1. the CONCAT function can be used. but also influences elements with other index values. FOR(i=1.1 | A*B).Only one minor problem is left to resolve. you would have to add a variable.). say D. and are tidier to work with. The model is shown below. we often face the fact that an array structure not only influences a variable at its own layer (having the same index).3 | IF(i<=1.51.. that the model does not use arrays to represent sales. Say you have a model where different divisions work towards selling software products. and add a link to it from C. In Studio this is achieved using the CONCAT. Rather than including the index variable i in the dimension definition of the variable. Example 1 A typical constrained expression in Constructor 2. BUT. constrained expressions made it possible to create rules for how this connection between different dimensions behaved. Constrained expressions are no longer part of Studio.. But when it comes to presenting for example sales as economical figures. by the use of indexed variables and guards in Constructor 2.51 is shown below. IF. INDEX. Four scalar variables will feed their values to every element of the array variable.

51. while SHIFTLIF performed a linear shift. the shift would be performed in the opposite direction. most of the functionality gained when using them. and the dimension of the variable had to be set to S=Sales.51. the count could even be a real number. 'Direct Sales'. Consultants'. aux Sales_per_Division = Sales_by_Resellers WHEN S=Resellers BUT Direct_Sales WHEN S=Direct BUT Sales_by_Salesmen WHEN S=Salesmen BUT Sales_by_Consultants WHEN S=Consultants Alternatively. in which case the resulting elements were found by internal interpolation between the existing elements. If the count was negative. SHIFTLCNT. The difference was that SHIFTCIF performed a circular shift. Just remember to enclose variable names containing spaces within '. Salesmen. as was the case with SHIFT . Although the structures require the use of more variables than was needed in Constructor 2. Convert the SHIFT functions The SHIFT functions of Constructor 2. you could exchange WHEN with '|'and BUT with '. However. SHIFTCIF and SHIFTLIF both performed a conditional shift of the array elements in the target variable. can be implemented using ordinary model structures. you can simply enter the equation aux 'Sales per Division' = {'Sales by Resellers'. SHIFTCIF. 'Sales by Consultants'} Note! You can create long names in Studio including spaces. Thus. since an array can contain both literals as well as function expressions and variables. In Studio there is no longer a need to use these constrained expressions. 'Sales by Salesmen'. The three sections below explains how to do this.57 - . They don't allow influences to go in the opposite direction of the links and flows that connect the variables. The SHIFT functions are no longer present in Studio. they do preserve the diagram consistency better. Direct.'. In Constructor 2. and SHIFTLIF. In addition.51. In Constructor 2.Connecting scalar and array variables The equation for Sales_per_Division is shown below. the range 'Sales' must be defined as 'Resellers. The count parameter of the function specified the number of elements to shift at a time. you needed a constrained expression to create the array.51 There were three SHIFT functions in Constructor 2.51. SHIFTLCNT allowed you to perform a linear shift a given number of elements.

Array) The model structure below.(PREFIXZERO({Cycle}) + (SUFFIXZERO({Cycle}) In addition. circular shift as the SHIFTCIF function shown above. const Array = . A Model Equivalent of the SHIFTCIF Function The SHIFTCIF function caused the array to be shifted circularly (the last element was added at the beginning of the array). performs the same conditional.. the two variables Shift and Cycle are defined with the Zero Order or Zero Order Immediate integration setting (available on the Advanced property page in the Properties dialog box).58 - . The defining equations are also shown.. (The array to shift) aux Condition = .9 | Array[i]). Note! If you select Zero Order integration..51. but you are of course free to create as many elements you wish. the shift will occur at the start of the time step after Condition becomes TRUE.Array[10].. created in Studio. This structure behaves correctly no matter what integration method is selected for the component.functions in Constructor 2. .. The definitions works on an array with ten elements... (The condition for when to perform the shift) IF(Condition..0) + (PREFIXZERO(Shift)) // Automatic . the shift will occur at the start of the same time step that Condition becomes TRUE. FOR(i=1. If you select Zero Order Immediate. const Array aux Condition aux 'Shift' aux 'Cycle' flow Array = = = = = .. (The condition for when to perform the shift) aux Shift = SHIFTCIF(Condition.51. (The array to shift) .(SUFFIXZERO(Shift)) // Automatic . The illustration below shows how the SHIFTCIF function could be used in Constructor 2. 0) IF(Condition. Note also that using zero order integration makes the value of C independent of the selected time step.

Array[10]... const Array = . (The array to shift) . the shift will occur at the start of the time step after Condition becomes TRUE..51. const Array = aux Condition = aux 'Shift' = aux 'Shift Out' flow Array = .(PREFIXZERO({'Shift Out'}) In addition. The structure works on an array with ten elements. FOR(i=1. Note also that using zero order integration makes the value of C independent of the selected time step.. 0) = IF(Condition. While the SHIFTCIF performed a circular shift (the last element was inserted at the start again). This structure behaves correctly no matter what integration method is selected for the component.. Array) The model structure below performs the same conditional. and edit the flow definition in Array to + SUFFIXZERO({'Shift In'}).0) + (PREFIXZERO(Shift)) // Automatic .. linear shift as the SHIFTCIF function shown above. in the first element.A Model Equivalent of the SHIFTLIF Function The illustration below shows how the SHIFTLIF function could be used in Constructor 2. If you select Zero Order Immediate. but can of course be expanded if necessary. Simply add a discrete inflow named 'Shift In' containing the new value. the SHIFTLIF function inserted zero at the beginning of the array. (The array to shift) aux Condition = . the two variables Shift and Cycle are defined with the Zero Order or Zero Order Immediate integration setting (available on the Advanced property page in the Properties dialog box).59 - .(SUFFIXZERO(Shift)) // Automatic . the shift will occur at the start of the same time step that Condition becomes TRUE.9 | Array[i]). Tip! It is also easy to add a new value at the beginning of the array. Note! If you select Zero Order integration. . (The condition for when to perform the shift) aux Shift = SHIFTLIF(Condition. (The condition for when to perform the shift) IF(Condition....

Input) The value of Cnt decides the number of places to shift the array elements (a negative number indicates a left shift). Array is the array to shift. Array[INDEX(NUMERICAL(i)-Cnt)] ) // IF .. IF(ISNAN(Array[INDEX(NUMERICAL(i)-Cnt)]). This was achieved by performing interpolation between the elements and finding their new value based on this interpolation.. the rest of the functionality found in the SHIFTLCNT function is covered by the model structure below..51 was a bit more complicated than the SHIFTCIF and SHIFTLIF functions.. First. A SHIFTLCNT structure from Constructor 2. it allowed you to shift the elements by a real number.. Second. The model structure below performs identically to the SHIFTLCNT function (with the exception that Cnt must be an integer).10 | IF(i <= Cnt.. However. // The number of places to shift the elements of the array aux 'Shift In' = FOR(i=1. and third. Creating a model equivalent that allows you to shift array elements a decimal number of places is a difficult task. (The array to shift) = .. and one that we will not cover in this topic.. and not only an integer number or places in the array. Input.60 - . (The number of places to shift the elements of the array) aux Shift = SHIFTLCNT(Cnt. // The value to shift into the array when performing the shift aux Cnt = .51 is shown below. Array.. Input. (The array to shift) aux Input = . const Array aux Input = . const Array = .A Model Equivalent of the SHIFTLCNT Function The SHIFTLCNT function in Constructor 2.... The equations are shown below. while Input specifies the value of the new elements that are shifted into the array. it allowed you to shift the array in both directions.. (The value to shift into the array when performing the shift) aux Cnt = . it allowed you to specify the element that was shifted into the array.

aux level const const aux Input Target MinVal MaxVal Control = = = = = . // The . It uses a FOR function to create the new array. MaxVal) . Tip! By changing the Cnt variable into a constant. // The . if Cnt is negative.51 allowed you to restrict the value domain of a variable (usually a level) from another variable. the elements will return NAN. The equations are also presented. the first check will always be TRUE. If Cnt is positive.. inflow of the Target level target variable to control minimum value for the LIMIT function maximum value for the LIMIT function MinVal. The important part of the model structure is the Shift In variable. you can manually change the value using a input control. // The LIMIT(Target.. when the array is indexed with values that are outside the dimension of the array.. the last elements can be replaced by the value of Input. This happens for the Cnt last elements in the array. However..) //IF ) // FOR aux 'Shift Out' = Array The two variables Shift and Cycle are defined with the Zero Order or Zero Order Immediate integration setting (available on the Advanced property page in the Properties dialog box). the first check (if i <= Cnt) is TRUE. which allows you to exclude variables from the diagram without deleting them.51 The LIMIT function in Constructor 2.. Thus. The model structure below illustrates how the LIMIT function could be used to prevent a level from dropping below a given minimum value or rising above a given maximum value...61 - . Tip! If you feel that the new diagram becomes cluttered by the introduction of the new model structure. Convert the LIMIT function The LIMIT function of Constructor 2. and shifts the elements accordingly. and the according elements are given the value of Input.. The definitions above are independent of the time step. It uses twodifferent structures to determine the values of the new cells. you can simply remove it from the diagram by using the Exclude capability of Studio. // The . by checking whether the indexed elements are NAN or not using the ISNAN function. However.

but it involves one extra variable. we see that the variable that controls the level is used as a flow rate for a outflow of the target level. 0/TIMESTEP ) ) = Control * TIMESTEP aux Return aux level const const aux As we see from the equation above.. // The minimum value for the LIMIT function MaxVal = .. Tip! If the Target level contains more in.) .The function causes the controlled variable.Target) Creating a Model Equivalent of the LIMIT Function Creating a model equivalent of the LIMIT function is not difficult.... // The inflow of the Target level Target = ...Target) or (MaxVal .(Target + Input*TimeStep))/TimeStep. The model structure is shown below.MaxVal)/TIMESTEP. the return value from the function.. when Target is below MinVal. We also see that the variable definition of Control is somewhat complicated in Studio. -(MinVal . ((Target + Input*TIMESTEP) . then these must be included in the Control variable as well.62 - .. (Target + Input*TIMESTEP + Flow2*TIMESTEP + . IF( (Target + Input*TIMESTEP) > MaxVal. to never exceed the value interval given by the two variables MinVal and MinVal. // The target variable to control MinVal = . which means that the direction of the flow is reversed. This is simply to make unit of the return value equal to the unit of the limited level. Also. in this case Target. The return value of the function was the correction that the function would have to perform on Target. the value of the flow rate Control must be multiplied with TIMESTEP for the variable Return to return the same value as the LIMIT function did.. Input = . in the same manner as the Input flow rate is. This is compensated for by the fact that the real influences are shown correctly in the diagram. // The maximum value for the LIMIT function Control = IF( (Target + Input*TimeStep) < MinVal. However. then the value of the flow rate becomes negative.or outflows. shown below: result Control = -(MinVal . together with the equations that define it.

and Full-text Search.Working with Help in Powersim Studio There are several ways of finding assistance while you are working in Powersim Studio. hover the mouse cursor over a variable name to view the variable's value. There are several ways of finding the help topics you want.63 - . When you are working with variable definitions. you can hover the mouse cursor over a function name in the definition to view the syntax of the function. If you are creating links and flows. after a short delay. Click this to get assistance about the dialog box. you will get helpful information in the status bar as you are working. we have consistently used symbols to categorize the information available. Similarly. There is a Help button inside the dialog boxes. including a Table of Contents. These are: „ „ „ „ „ Point to a toolbar button and. Topic Layout To help you navigate through the help system. The symbols and icons presented below are not present in the printed manual. hover the mouse pointer over an object to read error messages or view the value of a variable. an Index. which indicates to what part of the software the topic applies. We recommend you try the index or the table of contents first. Note! The formatting referred to below applies to the online help system. Use the online help system to get assistance. a description of the button appears. . You will also see descriptions of the commands on the status bar. In addition. When you are working in Constructor diagrams. each topic contains an icon in the upper right corner.

Icons Below is a short explanation of each icon used in the help system. Indicates a tip associated with the topic text. The help topic applies to Powersim Engine. contains buttons that are useful to you when you browse the help system. which is located below the help window title bar. etc. The link leads to an 'how-to'-topic containing task descriptions. The Help Window The Help System appears in a window with three panes: „ „ „ On the left side of the window is the Navigation pane. The link leads to a task related to the concept. Back opens the previous help topic in the browse history Forward opens the next help topic in the browse history. It displays the selected help topic.64 - . or the default help topic. „ „ „ „ Hide and Show expands or collapses the left pane. and contains reference information about functions. It contains four navigational tabs: Contents. The link opens a menu with related topics that you can choose from. Indicates a note associated with the topic text. etc. Index. . and Favorites On the right side of the window is the Topic pane. The third pane is the toolbar. Collapse it by clicking the heading. The link leads to an overview topic containing more textual explanations. and contains reference information about functions. The help topic applies to Powersim Engine. Expand it by clicking the heading. in most cases on Powersim's web site. Icon Explanation The help topic applies to Powersim Studio. Indicates that the heading contains a section that is shown. The help topic applies to Constructor Diagrams. Indicates that the heading contains a section that is hidden. The Toolbar of the Help Window. The link leads to a web page. Search. Locate locates the current topic in the table of contents.

Note! The font size you have selected in the help system will affect the font size of Internet Explorer (and vice versa). Font changes the font size that the topic is displayed with. point to any corner of the Help Viewer. You will see the changes immediately in the Preview window. To shrink or enlarge the entire help window. Arial. When the pointer changes to a double-headed arrow. Times New Roman. Yello. point to the top. so click again until you find a font size that suits you. Vertical Bar. as well as control the appearance of hidden sections (does not affect help in dialog boxes inside Studio). select the if you wish that sections that are hidden by default should be displayed or not. point to the divider between the two panes. Options opens a menu containing various options you can select for the help system. hold down the mouse button and drag the corner. Change the font size of the help system 1. Customize the Help Viewer You can use the Help Control Panel to customize the appearance of the help system. Note! The help system shares the same font settings as Internet Explorer on your computer. When the pointer changes to a double-headed arrow. You have seven options: Powersim (default). 2. Default option is hidden. Under Font Scheme. 2. and Georgia. To change the height or width of the Help Viewer. Note! The changes are saved immediately. hold down the mouse button and drag the divider right or left. hold down the mouse button . select the font that you prefer to view. The font size will cycle through the font size list. You must revert the selection manually if you don't like the new settings. When the pointer changes to a double-headed arrow. Click the Font button to change the font size used. 3.65 - . The button will loop through the font size list. Ocean. Horizontal Bar. select the font that you prefer to view. left or right edge of the Help Viewer.„ „ Home opens the Home page of the help system. To change the appearance of the help system 1. 4. A change to the font size in the Powersim help system will therefore affect the font setting for the browser and vice versa. bottom. Under Hidden Sections. Customizing the Help Window „ „ „ To resize the Navigation or Topic pane. You have four options: Verdana (default). „ „ Print opens the Print dialog box. Powersim Classic. and Spring. Under Color Scheme. You can change the font and color schemes. Visit the Help Control Panel available in the Table of Contents.

and Index tabs. Hide or Show the Navigation Pane „ On the toolbar. To locate every occurrence of a word or phrase in the help system. The table of contents is an expandable list of important topics. click the Index tab. Favorites. Use Powersim Learning Lab The Powersim Learning Lab contains tutorials and sample models meant to demonstrate some of the features available in Powersim Studio. These are available in the Navigation pane. If the Navigation pane of the help window is closed. Note! The next time you open the Powersim Studio help system.„ and drag the side. The Help Viewer uses Internet Explorer's HTML engine. and then type the word. search results entry or favorite entry to display the corresponding topic. click Hide or Show to close or display the Navigation pane. Search. Note! Click the contents entry. it will remain hidden the next time you display the Help Viewer. The Favorites tab allows you to make shortcuts to the help topics that you often revisit. and therefore also the same set of preferences as Internet Explorer. click Show on the toolbar to display it. located almost at the top of the Table of Contents. To reposition the Help Viewer on your screen. Click one of the following tabs: „ „ „ „ To browse through a table of contents. click the title bar and drag the Viewer to a new position. The Learning Lab is available in two ways: „ „ Click Learning Lab on the Help menu. its window will use the last size and position settings you selected. . please check your Internet Explorer settings. This will bring the Learning Lab up in a stand-alone window that is easy to position while you work. Note! If you close the Help Viewer with the Navigation pane hidden.66 - . To search using the index. The Navigation pane contains the Contents. The index contains keywords for each help topic in the help system. click the Contents tab. index entry. If the page appears difficult to read. click the Search tab. In the normal help system. Find a Help Topic You can utilize several navigation tools in the Help System. It offers a good starting point if you are familiarizing yourself with our software.

Navigate to the topic you want to add. 2. 1. right-click and then click Copy. click Show on the toolbar to display it. Find Information with Full-text Search If the Navigation pane of the help window is closed. On the Edit menu. This copies the topic to the Clipboard. select the portion you want to copy. and NOT. Select the Favorites tab. select the topic you want. click Show to display it. Click List Topics. If the Navigation tab is hidden. click Paste. OR. and then click Select All. NEAR. and then click Display. These are available by clicking the arrow to the right of the entry field. 3. select the entry.Copy a Help Topic 1. Right-click inside the topic you want to copy. Print the Current Help Topic There are several ways of printing help topics: „ „ „ „ Click the Print button on the toolbar. Position your cursor where you want the information to appear. 3. Note! If you want to copy only parts of a topic.67 - . In the Contents tab. Right-click again. Tip! To remove a favorite entry. right-click a heading and select Print on the shortcut menu to print all the topics under that heading. Note! The appearance of the printed page can differ somewhat from the online view. and then type the word or phrase you want to find. These operators will . right-click the topic you want to print. 2. 1. 5. and then click Copy. Open the target document. You can also create more advanced searches by adding the logical operators AND. and click Remove. Use the Favorites Tab You can use the Favorites tab in the Navigation pane to create and maintain links to the help topics you often use. Right-click inside the topic and select Print on the shortcut menu. 2. Click Add to add the topic to the list of favorite entries. Click the Search tab. In the Contents tab. 4. and select Print on the shortcut menu.

NOT: Search for topics that contain the first but not the second words. click Highlight On. Make the dialog box bigger by dragging the edge of the dialog box. 2. OR: Search for topics that contain one (or both) of the words NEAR: Search for topics where the words in the search string are close to each other. . Highlight Words in Searched Topics When you search for words in help topics using full-text search. Click Help in the lower right corner of the dialog box. Such sections have a small button ([»]) at the end. you can set HTML Help to highlight each occurrence of the word or phrase found. and then click Search Options. Some pages contain information that is not open by default. A page describing the various parts of the dialog box will appear. click Options.make your search more accurate. Tip! Most of the dialog boxes in Studio are resizable. Note! To turn off this option. and make the help window bigger by dragging the bar separating the dialog box and the help window. and then click Search Highlight Off. Click it again to close the section. you can click Help in the dialog box. To view this information. simply click the button to open the section. Get Help in a Dialog Box If you need help while working with specific features in dialog boxes.68 - . „ To highlight all instances of a search word or phrase. The operators work like this: „ „ „ „ „ No operator: Search for topics that contains one or more word from the search string. 1. indicating that there is more information available. AND: Search for topics that contain both words.

you will find a host of commands available in ordinary menus. the toolbars will be located in the same place as you left them the last time you used Studio. by default located on the bottom of the screen (you are free to relocate it. or commands. which is marked with bold typeface in the Project Window. Private Diagrams. Each item on the screen has a set of actions. and will always work on the active component. there are Component Windows. Working with Dialogs and Toolbars You can format objects by right-clicking them and selecting Properties on the shortcut menu. These include the Global Units and Global Ranges windows. located on the top of the screen. that you can perform on them. and in the toolbars. . The next time you open Studio. and Co-models. and Global Units have their own windows. You can turn on and off toolbars as you like. In the Properties dialog box you can select the properties you wish from various categories. each containing similar properties. Equations. Third. Runs. The categories are separated into tabs. Second. if you wish to). These are of course available in the shortcut menu by right-clicking the items. Global Ranges. These include Shared Diagrams. and view or edit them. simply double-click the item. and Local Ranges. These are windows that are specific to the tasks that are currently available. Some of the items. The easiest way of accessing these commands. These windows cover each component individually. It allows you to directly access the various parts of your simulation project. The view will then open in the document area to the right. In addition. Most of the items in the Project Window have a set of commands that you can apply to them.Work with Powersim Studio Powersim Studio has several features to help you work quickly and efficiently while creating your simulation models. is through the shortcut menu. Private Diagrams. such as Diagrams. and also relocate them. there are Catalog Windows. also referred to as the Catalog.69 - . there are Simulation Windows. These include the Local Units. The Project Window The Project Window is another useful feature in Powersim Studio. available by right-clicking the item. A lot of these properties are also available on the Format toolbar. These windows cover the entire simulation project. To open them. Windows in Studio There are three different types of windows in Powersim Studio. First.

they are shared between all the simulations of the given component. you can right-click the entry and select View on the shortcut menu. Shared diagrams are Constructor Diagrams.Language Support Powersim Studio also allows you to set the language of your simulation project. If the component contains submodels with diagrams. hyperlinks. Design and User Mode When creating simulations in Studio you have different needs than when you run and experiment with your simulations. you are only allowed to run and interact with the model. However. This makes it easier to share your models with users that normally use other languages than your own. you can create several simulations for each component. and Shared Diagrams. Powersim Studio will start in the language that is selected in Regional Settings on your computer. however. Shared Diagrams You will find the component's diagram book under the Shared Diagrams entry under each Simulation entry. The Equations View offers complete access to all variables and variable definitions in the component. These diagrams allow you to create model structures using all the various model variables. if you perform a change in a shared diagram. Run Controllers. you are free to perform any changes you wish to the diagrams and simulation model. In fact. you can save variable names and texts in as many languages as you wish to. When Studio is in Design mode. Runs.70 - . the component's diagrams will open in Studio. each simulation contains their own Events. Equations. They are located below the simulation simply because the values displayed for the variable's belong to that simulation. Alternatively. This is available in the Control Panel of your computer. Most of the information contained in a component is shared between the various simulations. Co-models. You open the Equations View by double-clicking the entry. By double-clicking the entry. Studio therefore offers an option of switching between Design and User mode. Note! Although Shared Diagrams and Equations appear under a simulation in the Project Window. . and flows. and Private Diagrams. the change will be reflected in all simulations instantly. They can also contain presentation objects like controls. etc. these diagram books will appear as child nodes to the Shared Diagrams node. not change it. In addition. However. links. Components and Simulations Powersim Studio allows you to create several components in each simulation project. Local Ranges. such as Local Units. When Studio is in User mode. Equations A component's equations contain the actual implementation of the simulation model. frames. or by right-clicking it and selecting View on the shortcut menu.

When a dataset connection is created in the Co-models view. Events Events enables you to specify actions to be performed when certain conditions in your simulation are TRUE.By expanding the tree view in the Equations View. In this tasks. When working with Solver Tasks. the Details Window will only display the child variables of the variable that owns the diagram. but you are not allowed to create or include variable symbols. Tip! By selecting the Auto-synchronize Details with Diagram option in the shortcut menu for the Details Window. and you can run the simulation. and so on. . Interaction diagrams allow you to create user interfaces using presentation and input objects. Note! When running the simulation while the Equations View and/or Details Window of the diagram book is open. you can inspect the variable's definitions.71 - . you have to use private diagrams to be able to present the data to the user. you can use datasets that are connect to your simulation as co-models. This is due to the fact that all values are updated throughout the view. close the Details Window and close (or minimize) the Equations View. To speed up the simulation. You can also edit the model directly in the view. and values. Private Diagrams Each simulation can contain its own diagram book. dimensions. While the Equations View display the entire structure of the model. based on the definition of the dataset. The dataset variables can be connected to the simulation's interface variables (variables with a defined transfer direction in the component) in a simple and intuitive manner. the task will contain Solver variables that are not available outside the given task at all. Note! Since events are defined for each simulation. get user input interactively using input boxes. they will only work when run inside Studio (not if you use the Studio SDK to embed your simulation in a stand-alone application). set the value of parameters. By using events you can notify the user through message boxes. you can make the window automatically scroll the variable you have selected in the diagram into view. a connection to an external (or internal) data store is established. Co-models If you need to exchange data with external data stores. and they are located under Private Diagrams. The events system available in Studio is a great means of giving your simulator an interactive user interface. These diagrams are Interaction Diagrams. the simulation might run a little slower than running it while viewing a diagram. Working with the Equations View and using the Details Window will allow you to study the variables of the model directly.

The units and ranges that are defined for the project. Save your HTML pages in the same folder where you saved your simulation project. Rename the main page of your HTML document set to the same name as your simulation project. Document your simulation project in any application that allows you to save HTML pages (for example Microsoft Word. Click New on the Standard toolbar. Just follow these simple steps: 1. each contained within its own component. 2.). and click OK. then you should .Work with a Simulation Project The simulation project contains everything associated with the model or models you choose to group together in one project folder. Datasets that hold the results of simulations or are imported from external sources.72 - . If any other simulation project is currently open. Microsoft FrontPage Express. this will automatically be closed before the new one is opened and you will be asked to save or discard any changes. Create a Simulation Project To create a new project using your standard system language: 1. Click New… on the File menu. Select the language of the new simulation project in the dialog box that appears. you might sometimes have the need to include more documentation with your simulation projects. Netscape Composer. 3. To create a new project and specifically select the language of the project yourself: 1. Create Project Documentation Although you can create text frames easily inside diagrams. 2. The diagrams and windows associated with the various components. The simulation file stores all the information needed to run and work with the project in Powersim Studio: „ „ „ „ The simulation models. If your simulation project is saved as C:\My Documents\Models\MySimulation. You manage the project in the Project Window. etc.sip. Studio therefore features a way of linking your HTML pages directly from within Studio itself.

select Save Copy As… 2. Click Open. On the File menu. if any. the project documentation will be automatically opened when you hit F1. Tip! You can also use a hyperlink object pointing to a web page or file to open the project documentation from inside a diagram. Select the folder where you want to save your simulation project. or select Open… on the File menu. and click the name of the project in the files list. Select the folder where you want to save your simulation project. you will be asked to enter the path and name of the new project: 1.sip) or All Files (*. Click Save. and type a name for the new project under File name. 4. If you are viewing the simulation in Presentation Mode.*).sip) or All Files (*. is chosen for Files of type. 3. If you want to save a copy of the project under a different name: 1. and type a name for the new project under File name. Click Save. Before the project is opened. you will be asked to save or discard changes you have made in the currently open project. If you want to save the project under a different name: 1. 2. On the File menu. Click Open on the toolbar.73 - . Click Save. or when you click Help on the toolbar. 3. and rename the first page of you document set to MySimulation. Make sure that Simulation Projects (*.save your HTML documents to C:\My Documents\Models. Open an Existing Project 1.*). . you must run two instances of Powersim Studio. 3.htm To open the project documentation: 1. Note! Only one project can be open at a time.sip) or All Files (*. If you want to work on two projects simultaneously.*) is chosen for Files of type. Under Look in. Save a Simulation Project To save changes under the current name: 1. This project will then be closed before the new one is opened. Select the folder where you want to save the copy of your simulation project. 2. is chosen for Files of type. Select Project Documentation on the Help menu. 2. select Save as… 2. Make sure that Simulation Projects (*. Make sure that Simulation Projects (*. 4. or select Save on the File menu. select the folder where the project is located. If this is the first time you save the project.

~si file to . 3. To create a back up project: 1. and type a name for the new project under File name. Note! Studio will not be able to open a . while the *. Create a Backup Project Every time you save your simulation project.~si file contains the previously saved version.~si rather than .~si. Click Save.sip. it is easy to perform this task manually.sip).3. and browse to the folder where you saved your simulation project. The backup file has the same file name. you will have two files in your folder: MyProject.~si file directly. 5. is chosen for Files of type. but with the file extension *. Open Windows Explorer.~si. when you have saved your project twice. but with the extension *. To restore a backup project: 1.sip) or All Files (*. is that when you save a copy. This might be useful if you need to revert to an earlier stage of your development process. or delete it if it is invalid. you will continue working on the project with the new name.sip extension first.*). or give the file a new name (such as MyFile. The *. Studio will back up your simulation project.sip. Simply save the simulation project to a new file name using Save As… on the File . 2. Locate the *. Note! The difference between Save As and Save Copy As. Therefore. or if you for any other reason should want to revert to the previously saved version of the simulation project. Open the file as usual in Powersim Studio. This feature is convenient if your simulation project for any reason should become invalid and will not open in Studio.74 - . Restore a Backup Project When you save a simulation project by clicking Save.sip file contains the last saved version. 4. It must be renamed to a . Make sure that Simulation Projects (*. Click Save. or select Save on the File menu. 6.~si. Locate the file with the same file name. Rename the extension of the *. For Save As. you will continue working on the "old" project. Note! You are advised to manually back up your work every now and then. a backup project is created in the same folder and with the same file name.sip and MyProject. but with a different extension: *. 4. Rename the *. Compact a Simulation Project Although Studio doesn't contain a direct way to compact a simulation project.sip file if you wish to keep the simulation project.sip file containing the project you wish to restore.

menu. the menu entry will be disabled.75 - . author and company information. Show Recently Opened Projects A list of the most recently used simulation projects is available on the File menu. . can be changed under the file's Properties in Windows. To open one of these files: 1. Hidden. It is divided into two sections: General Under this tab you will find automatically generated information about the simulation file. In most cases this shouldn't be necessary. The file status. Summary Under this tab there is room for a description of the project. Select the name of the file on the File menu. Note! The project documentation must be saved in the same folder as the simulation project itself. you can access the project documentation by hitting F1 or clicking Help on the toolbar.sip). Tip! When you are viewing the simulation project in Presentation Mode. You can also enter keywords and project category. The project documentation will be opened in the standard HTML browser of your computer. the size of the project might be larger than what is actually required by the current content of the file. If there is no documentation available for the project. The first page of the documentation must have the same name as the simulation project itself (with a . including title. or System. if you have been changing picture fills a lot (adding and removing pictures several times. Show and Edit Project Information 1. View Project Documentation To view the project documentation for the current simulation project: 1. A Project Information dialog box appears that shows you information about the project. subject. Select Project Information on the File menu. for example). Archive.htm-extension rather than . However. either Read only. Select Project Documentation on the Help menu.

The model can. global units. However. However. However. and Full Access.76 - . including units and ranges. Work with Levels of Protection Note! The ability to password protect simulation projects is only available to Enterprise licensees. Click OK to close the dialog box. Access to all views are Run and available. but prevent them from making changes to it. for example. and variables). 2. but not edited. he cannot view the model diagrams.View Project Statistics To view the project statistics for the current simulation project: 1. be accessed using Powersim Studio SDK. All licensees can open password protected projects. To unlock a higher protection level. Level Description Run Access The simulation project can only be run. Select Project Information on the File menu. The simulation project can be viewed. Full Access The simulation project can be viewed and edited freely. you can control the way your users can use your simulation project. Each access level can be locked by an individual password. No model diagrams or equations will be available. Run and View Access: Allows the user to run the simulation and view the model diagrams and variable equations. When you have created a model and want to distribute it to others. 3. Run and View Access. Levels of Protection There are three levels of protection available in Powersim Studio: Run Access. . By setting passwords for the various levels. however. simply enter the password for that level. you can protect it against undesired editing. Thus you allow other users to run your simulations. no definitions can be changed View Access (including units. variable elements. The statistics page contains information about the number of components. There are three levels of protection available: „ „ „ Run Access: Allows the user to run the simulation. ranges. variables. Full Access: Allows the user full access to the simulation project. Click the Statistics tab. he cannot perform changes to the model. The list below summarizes the permissions given on each level. and global ranges in your simulation project.

Repeat the password. 2. Select Protect on the Project menu. 2. Redo an Operation To reverse the effect of the Undo command: 1. Click the arrow next to the Redo icon. and click OK again. Click OK. Change Level of Protection To change the level of protection of the current simulation project: 1. Select the desired protection levels by checking the boxes next to them.Protect the Simulation Project To protect the simulation project: 1. 4. 3. The passwords will be activated the next time you save the project. Click the earliest command you want to cancel. The last undo operation is negated. Enter the desired passwords for the selected protection levels. you will be asked to confirm it. 2. 2. Redo command until you reach the point you For a list of the most recent commands that were undone: 1. Enter the password of the protection level you wish to unlock. Repeat the wanted to restore your work to. Click Undo on the toolbar. If it is the first time you enter the password. Uncheck the unwanted protection levels by deselecting the boxes next to them. Unprotect the Simulation Project To unprotect the simulation project: 1. Select Protect on the Project menu. Click Redo on the toolbar. 3. Click OK. Select Enter Password… on the Project menu. 5.77 - . . Undo an Operation If you regret an operation: 1. You are brought back to the stage before that.

datasets. such as deleting components. . Note! Switching between components and submodel diagrams will usually clear the undo stack. 1. you will be warned. Note! Not all operations are possible to undo in Powersim Studio. Repeat the go back to. making it impossible to undo previous actions in the diagrams of other components or submodels. Click the earliest command you want to cancel. Undo command until you reach the point you wanted to For a list of the most recently performed commands. You are brought back to the stage before that. 2. and diagrams. If an operation cannot be undone.The last operation is negated. Select the arrow next to the Undo icon.78 - .

The exclusion (or inclusion) status is kept for each simulation individually. column sorting. working with the Details Window is similar to working with the Equations View. With Interaction diagrams. These windows are used to view various parts of the simulation project. you can both design and edit the model. Diagram Windows with Constructor and Interaction Diagrams With Constructor diagrams. Constructor diagrams are shared by all simulations in a component. as well. You can use the diagram tabs at the bottom of the diagram window to navigate between the diagrams. and select Open Diagram Book on the shortcut menu. Except from its location. The Equations View and the Details Window gives you a compact. and datasets. but still supports easy model design through the use of shortcut menus and multi-columns. making it easy to include variables or make them parameters in controls. Multi-column Treeview Windows There are several multi-column treeview windows in Studio. at-a-glance access to the model structure. such as equations. and more. easy editing by using the Arrow Down key. ranges. or by right-clicking the submodel or model variable. Details Window and Equations View others.79 - . and can be accessed by opening the simulation's Shared Diagrams. The Details Window is available in the diagram window. . you can design user environments that are specific to the simulation where they are created. allowing you to hide shared diagrams for a particular simulation. they will appear as children of the Shared Diagrams node of the simulations. You access them by double-clicking them. as well as create a user friendly environment for experimenting with it. They can be accessed by opening the simulation's Private Diagrams.Work with Windows and Diagrams There are several types of windows in Studio. units. both for Shared and Private diagrams. If submodel diagram books exists. for example. diagrams. Tip! You can exclude (and include) diagrams from the diagram book. including the views for ranges and units. if you wish to. column width adjustment by dragging the column header dividers. All the various multi-column treeview windows feature grouping. Submodels and other model variables can have their own diagram book.

80 - . The Equations View 1. Create a New Diagram Sheet Each component in a simulation project has its own diagram workbook. You can also dock the Details Window on the top of the diagram window by right-clicking inside the Details Window pane. Select Equations under Simulation Windows on the View menu. Tip! The Details Window is also available when you right-click the diagram tabs at the bottom of the diagram book. Click Details Window. Double-click Window). To create a new diagram sheet: 1. Tip! You can rearrange the order of the diagram sheets by dragging their tabs to new positions. A tree view of the model variables is displayed in the left section of the active diagram window. click the tab of the sheet you would like to see or do something with. selecting Details at Left. Equations (located under the Simulation of the component in the Project or 1. you can select More Diagrams on the shortcut menu. delete variables and add new ones. Right-click the arrows next to the diagram tabs. and select the diagram to view on the shortcut menu. edit and create variables in the Equations View. Working in the Equations View and in the Details Window are similar process. You can choose to show definitions of some or all variables of the underlying model.View Equations The Details Window 1. containing as many diagrams that you need. You can view. . If there are more than 15 sheets in the project. and select the diagram to view in the dialog box that appears. Select Sheets There are two ways of switching between diagram sheets: „ „ In the diagram window. From this view you may open property dialog boxes of any variable in the model. and then select Top on the submenu. Right-click a sheet tab and select Insert Constructor Diagram on the shortcut menu.

This feature can be used to contol which diagrams are available in a simulation. Exclude a Sheet You can exclude a sheet from a diagram book: 1. Right-click the diagram tab at the bottom of the window. You select multiple files by holding down SHIFT while selecting more sheets. The include/exclude status of diagrams are saved for each simulation individually. Include a Sheet You can include a sheet that has previously been excluded in a diagram book: 1. Drag the sheet(s) to its new position among the existing diagram tabs. 2. Type the new name and hit Enter. Select the sheet(s). you can select Diagrams….81 - . Rename a Sheet 1. Tip! If you wish. Tip! A number of useful commands are found on the sheets' shortcut menu. Select Rename on the shortcut menu. Select the diagram you wish to include on the submenu. .. This feature can be used to contol which diagrams are available in a simulation. 2. 2. 3. Simply right-click a sheet tab to activate the shortcut menu.To select multiple sheets: „ Select the sheets while holding down Shift. and select the diagram in the dialog box that appears. 2. If it doesn't appear there. The include/exclude status of diagrams are saved for each simulation individually. Right-click the tab of the sheet that you want to rename. Right-click the diagram tab of the diagram you wish to exclude at the bottom of the window. Select Include Diagram on the shortcut menu. Select Exclude Diagram on the shortcut menu. Move Sheets You may move sheets within the component: 1. 3. you can move several diagrams at once by selecting multiple sheets at a time.

Select Entries in Treeviews You can select one or more entries in all multi-column treeviews: „ „ „ „ Select entries while holding down the Ctrl key to expand the selection entry by entry. A tiny arrow on the column header indicates the sorted column and the sorting order. Switch between Hierarchical and Flat View The Equations View offers two ways of viewing your model. hierarchical (default) or flat. child variables are listed as nodes in a tree below their parent variables. . Page Up. A child variable is listed by its entire name. You can group the treeview by several properties by dragging several column headers to the grouping area. The figures below shows the difference between flat and hierarchical view.82 - .Delete a Sheet Note! This operation cannot be undone! 1. Select an entry. and drag the column to a new position in the view while holding the mouse button. each variable is listed by its unique name in the model. and select Delete on the shortcut menu. Resize: Click the dividers between the column headers and drag the column width to the appropriate width while holding the mouse button. including its parents name. In the flat view. Hide/Display: You can hide or display any of the columns in the Equations View by rightclicking the header row and selecting the column you wish to hide or display. Reorder: Click the column header. Arrow Down. Click again to sort in ascending order. however. Select an entry. Adjust Columns in Treeviews The columns in of multi-column treeviews can be adjusted in several ways: „ „ „ „ Sort: Click the column header to sort the column in descending order. and then select one more while holding down the Shirt key to select all intermediate entries. and hold down Shift while using the navigation keys to expand the selection (Arrow Up. Release the mouse button when you have found a new position for the column. or by selecting Select All on the shortcut menu. The columns marked with a checkmark are currently displayed. In the hierarchical view. and Page Down Select all entries by hitting Ctrl-A. Right-click the diagram sheet you wish to delete.

The checkmark next to the command will disappear. Close All closes all open windows. the windows that were open when you closed it will open . Note! The parent variable is always included for a child variable. or in the variable's name.83 - . Use Next and Previous to maneuver between windows. Save Window Position When you close your simulation project. To switch to hierarchical view 1. as you can clearly identify the variable in question. The next time you open the project. Use Tile. 2. Select Flat on the shortcut menu. Select Flat once again on the shortcut menu. Right-click on the column header row. either as the parent node in the tree. Organize Windows A number of commands are available on the Window menu: „ „ „ „ „ „ New Window opens a new variable window (a duplicate of the currently active window). and Cascade to organize the position of all open windows. This is especially useful if you need to sort the Equations View based on one of the other fields. Select which window to activate from the list at the bottom.The Equations View displaying a model in hierarchical view (left) and flat view. the windows and their position will be saved with the project. Right-click on the column header row. Close closes the active window. A checkmark will appear next to the command. Arrange Horizontal and Arrange Vertical. To switch to flat view 1. 2.

automatically. Note! If you only change the appearance of windows after opening a project. If this is your only change to the project. The currently active window is closed. if you include a variable in a diagram sheet. Hit Ctrl-F4 on your keyboard. For instance. select Next or Previous to switch between windows. Click Minimize in the upper right corner of the window to minimize it. There are also keyboard shortcuts available for these operations: „ Ctrl-Tab: Go to the next window.84 - . Select an already open window. for example to view different diagram sheets in separate windows. „ Click „ Close in the upper right corner of the window. On the Window menu. it will also be included in the same sheet in the other windows. „ Ctrl-Shift-Tab: Go to the previous window. Go to Next or Previous Window 1. Note! All actions performed in one window of a component are carried out in all open windows for that component. select New Window. you will not be prompted to save your model before exit. . select Close. Close the Active Window There are several ways of closing the active window: „ On the Window menu. 1. Maximize or Minimize Window Maximizing and minimizing windows in Studio is done in the same way as in any other Windows program: „ „ Click Maximize in the upper right corner of the window to maximize it. please click Save before quitting Studio! Open a New Window for the Active Component It is possible to open more than one window for a component. A new window is created that displays the diagrams of the same component. On the Window menu. 2.

The Project Window The Project Window. All open windows are closed. To open the shortcut menu. and datasets. diagrams. if switched on. ranges and datasets. units. and events. a description is shown in . Add folders and structure your project.Close All Windows 1. select Close All. Tip! The actions you can perform on the various items in the Project Window are available on the items' shortcut menus.85 - . The status bar shows information about menus and toolbars. is shown on the left hand side of the window (by default). and the simulation. the project. Open windows for the various simulations. Open views where you can define ranges. It displays all contents of the open project as a tree structure. runs. It gives you immediate and intuitive control over the model components. „ When the mouse pointer hovers over a menu command or toolbar button. comodels. where you can view and edit the model. units. The Project Window is for organizing the simulation project. right-click the relevant item. The Project Window allows you to organize your project. The Status Bar The Status Bar is located at the bottom of the application window. You can use the Project Window to: „ „ „ „ Expand and collapse the branches of the project tree by clicking Expand and Collapse. On the Window menu.

The components and dataset can be dropped in the different folders. Show or Hide the Project Window The Project Window is displayed by default when you create a new simulation project. The command is then active until you select another command.„ „ the status bar. Work with Toolbars and Keyboard Shortcuts The toolbars offer quick access to commands that are useful when you work with your simulation project. and position it somewhere inside the application area (but not too close to the edges. Drag the Project Window by using the toolbar handle. as well as the current simulation time. the toolbars will reappear in the same positions as they had the last time you used Studio. Drag the Project Window by using the toolbar handle. and select New Folder on the shortcut menu. When you click a command on a toolbar. drag the window by its title bar. Dock the Project Window The Project Window can be docked on either of the four edges of the application window. you will receive messages and tips in the Status Bar while you are working. . To undock the Project Window: 1. To switch it on or off: 1. Note! You can not move the active component! 1. If the window is undocked. The simulation progress bar shows how far the simulation has advanced relative to the total simulation time. When you are creating your model using Constructor Diagrams. Powersim Studio remembers the position and display state of all the toolbars. create and edit Constructor diagrams. Therefore. you select it for one operation. and so on.86 - . To lock a command. where it will automatically dock). Create a Folder in the Project Window You can create folders for your components and datasets in the Project Window. or it can float as a separate window. Right-click a folder or the Project node. doubleclick it on the toolbar. Click Toggle Project Window on the toolbar. To dock the Project Window: 1. and position it along one of the edges of the application.

right-click in the toolbar area of Powersim Studio and select it on the shortcut menu. This is achieved by double-clicking the object on the toolbar. Right-click in the toolbar area. 2. Select a Persistent Tool Tools used to create diagrams (such as Level. 2. If you hide a toolbar. .87 - . click Pointer. Double-click the tool you wish to select as persistent.) can be selected persistently. Show or Hide a Toolbar 1. or hit Esc. You may also dock them to the edge of the program window. Tip! To reactivate a toolbar that you have hidden. Select the toolbar that you want to show or hide. that toolbar will not appear again in any projects until you turn it back on. many commands have also keyboard shortcuts (such as Ctrl+C to copy and Ctrl+V to paste the selected objects) that enable you to use the keyboard instead of the mouse to navigate and operate Studio. which enables you to insert more than one instance of the selected object without a need to click the specific button again. 2. Select the toolbar that you want to show or hide from the shortcut menu. When you are finished. 1. Select Toolbars on the View menu. 3.There are also a number of keyboard shortcuts available in Studio. There are also a few modifier keys that you can use to alter the mouse actions (such as holding down Ctrl while dragging an object in a diagram changes the move operation to a copy operation). etc. Move or Dock a Toolbar All toolbars can be moved and placed elsewhere on the screen. which means that its outline snaps to the program window. Auxiliary. In addition to the ordinary Windows shortcuts (Alt to access menus and Alt + underlined characters in dialog boxes as accelerators). If you drag it to the edge of the program window. or 1. it becomes docked. 1. 2. Insert the object(s) you wish to insert in the diagram. Grab the title line (on a floating toolbar) or the move handle (on a docked toolbar) and drag it to the desired position. Time Graph Control.

Link Tool Create a link between two variables. Level Tool Create a level variable. If you click the button and then click inside the diagram.88 - . Copy Area as Picture Tool The area tool allows you to select an area and copy it to the clipboard as a picture file (in Windows Meta File format). a dialog box appears containing the variables that can be made snapshots of. Alternatively. Constant Tool Create a constant variable. Flow Tool Create a flow (without a rate) in the active diagram. Auxiliary Tool Create an auxiliary variable. Flow with Rate Tool Create a flow with a rate attached in the active diagram. you can click the small arrow next to the button and select the variable to snapshot in the drop-down list. Submodel Tool Create a submodel variable. . Snapshot Tool Create a snapshot of a variable. Pointer Tool The default tool. used for selection.Diagram Commands Diagram Commands include the tools that you use to create and modify a Constructor Diagram.

you can click the small arrow next to the button and select the variable to include in the drop-down list. a dialog box appears allowing you to select the simulation project containing the component you wish to copy.89 - . If you click the button and then click inside the diagram.Include Variable Tool Include an existing variable in the active diagram. Once you select a simulation project. Chart Control Tool Create a Chart Control in the active diagram. The freeform will be created as an arrow as default. Hyperlink Tool Create a hyperlink in the diagram. Time Series Control Tool Create a Time Series Control in the active diagram. . recently used simulation projects to copy from. a dialog box appears containing the variables that can be made included. and select a shape from the drop-down list. as well as the components available in the current simulation project. Freeform Tool Create a freeform in the diagram. Frame Tool Create a frame in the diagram. Alternatively. Alternatively. Select a different shape by clicking the small arrow next to the button. you can click the small arrow next to the button and select a component from the drop-down list. Bookmark Tool Create a bookmark in the diagram. but you can turn off the arrowheads if you wish to. Time Table Control Tool Create a Time Table Control in the active diagram. If you click the button and then click inside the diagram. a new dialog box containing the components that are available for copying. The list contains recently copied components. Copy Component as Submodel Copy a component as a submodel in the active diagram.

and diagram background fill. Tip! You can make a tool persistent by double-clicking the toolbar button. When the button is depressed. Gauge Control Tool Create a Gauge Control in the active diagram. This is useful if you need to insert several objects in your diagram. the diagram is in Design Mode. Diagram Properties Open the Diagram Properties dialog box containing settings for grids.90 - . Slider Control Tool Create a Slider Control in the active diagram. Hit ESC to turn off the persistent tool when you're finished. and you are allowed to perform changes to the diagram. Design Mode Switch between Design and User Mode. . guides.Table Control Tool Create a Table Control in the active diagram. Switch Control Tool Create a Slider Control in the active diagram.

Format Commands The Format Toolbar contains items that let you choose the visual characteristics of text. Line Style Changes the line style of the selected objects. Underline Change the appearance of the selected text. left align. Font Color Change the text color of selected objects. Dash Style Changes the line dash style of the selected objects.91 - . Shape Type . You can right align. Italic. symbols. Fill Color Change the fill color of the selected objects. Text Alignment Alter the text alignment of the selected objects. Line Color Changes the line color of the selected objects. Font Name Select a font name in the drop-down box to change the font of the selected text. center or justify the text. or the text of selected objects. Font Size Select a font size in the drop-down box to change the font size of the selected text. A second click on the button removes the formatting. and other objects in your diagram. Bold.

92 - .Change the line shape type of the selected objects. .

Width. snapping is turned on. When the button is depressed. . or size as the dominant symbol. Send Backward. When the button is depressed. Align Top. Right. Align Left. Bring Forward Bring the selected object to front of overlapping symbols. Bring To Front. Make Same Height. width. Down Space the selected symbols evenly either across or vertically. Size Resize the selected symbols to the same height. Space Evenly Across. snapping is turned on.93 - . Center Align the left or right edges or the center of the selected symbols with the dominant symbol. or one step closer to the top layer. Send to Back Send the selected symbol one step closer to the back of the stack. Middle Align the top or bottom edges or middle of the selected symbols with the dominant symbol.Layout Commands The commands on the Layout Toolbar can be used to arrange the objects in your diagram. Bottom. Snap to Grid Switch grid snapping on or off. Snap to Guides Switch guide snapping on or off. or send it to the very back (lowest layer).

Add Cue Point Add a cue point at the current simulation time. A cue point allows you to "rewind" the simulation to that point. Runs are available Runs view. Restore Permanent Variables Restore the initial values of all permanent variables according to their definitions. Go to Cue Point Go to the latest cue point in the list. Use this command to automatically scale the value axis of all controls whenever you need to. the simulation is running. and select the desired cue point from the drop-down list. click the small arrow next to the button. Use this command to force all permanent variables to be reset to their original definitions. or they can be used as reference data for the current run. Autoscale Now Update the autoscaling of all variables in the project.94 - . All variables will also be automatically scaled at the end of the simulation. and replay it from that point forward. When the button is depressed. Add to Runs Add the current simulation run to the saved runs. To select a different cue point (if the project contains more than one). Saved runs can be loaded into the simulation again (and thereby replace the current run). Advance Simulation one Step Advance the simulation one step. Reset Simulation Reset the simulation. under Simulation in the Project Window. .Simulation Commands The simulation commands include commands for controlling the simulation of a model. Permanent variables will retain the value they are assigned between simulation runs. Stop the simulation by clicking once again. Play Start the simulation. The most commonly used simulation controls are also available on the Simulation MiniBar.

. save. External Data Load.Reference Data Select a saved run as reference data for the current run. Load External Data Load data to dataset connection from external data stores. External Data Details View details for dataset connections and external data stores. The reference data must be previously saved (obviously) in order to appear under Reference Data. Save External Data Save data from dataset connection to external data stores.95 - . or view details for dataset connections and external data stores.

Open Project Open an existing project. Print Project Print the current project. you can redo the last operations (chronologically).Standard Commands The standard commands include commands for handling project documents. . Redo Redo the last operation that was undone. Copy Copy the currently selected object(s) in the active view to the clipboard. If you already have a project open. New Project Create an empty project.96 - . you can undo the last operations (chronologically). you will be asked to save the changes. Cut Cut the currently selected object from the active view to the clipboard. Show or Hide Project Window Toggle the Project Window on/off. Paste Paste the content of the clipboard into the currently active view. Save Project Save the current project. If you click the arrow. If you click the arrow. The Redo button will remain unavailable until at least one operation has been undone. Undo Undo the last operation.

Contents Open the help system.97 - . .

Delete Auto Report Delete the auto report(s) for the selected variable(s). the elbow style is enabled for the selected object(s).Symbol Commands The Symbol Toolbar contains useful tools for adding auto report and changing the appearance of flows and their associated flow rates. click the small arrow next to the button. or link to a single straight segment. . Toggle Elbow Style Toggle Elbow Style for the selected line(s). To change the auto report type. or link to a single curved segment. Show Auto Report Turn on auto report(s) for the selected object(s). flow. Unhide Auto Report Unhide previously hidden auto report(s) for the selected variable(s). Make Single Straight Segment Convert the segments of the selected line.98 - . and select the type from the drop-down menu. and you can later display it again without loosing any formatting. Hiding an auto report doesn't delete it. and/or flow(s). Make Single Curved Segment Convert the segments of the selected line. Move Flow Valve to Next or Previous Segment Moves the flow valve of the selected flow to the next or previous segment of the flow. The auto report type used last time will be selected when you click the button. The command is disabled if (none of) the selected variable(s) has hidden auto report(s). link(s). flow. Anonymous Rate Make the selected flow rate anonymous. Hide Auto Report Hide auto report(s) for the selected variable(s). When the button is depressed.

containing a link to the active project. and also allows you to switch back to Design Mode. The button is only available when Studio is started in Presentation mode (by double-clicking either a simulation project or a simulation game file). If the project is protected. you must enter the correct password to unlock the project. Back and Forward The Back and Forward buttons let you navigate through your browsing history in the same way as similar buttons in a web browser.sig). play and stop it. a list of the most recently visited windows will be displayed. Reference Data Allows you to select reference data to be presented in controls. Reset. Home Brings you back to the default window of the simulator (as specified in the Presentation Mode Setup property page). The simulation game is saved in a simulation game file (*. Presentation Mode Switch off Presentation Mode and return to Design Mode of the simulation project.99 - . Zoom . Open Simulation Project or Simulation Game Save Simulation Game File allows you to save the decisions and the simulation you have done in the current project. these commands let you reset the simulation. Play. You can load the game file later by double-clicking it in Windows Explorer. Open Simulation Project or Simulation Game Open Simulation Project or Simulation Game File allows you to open another simulation project or a simulation game file into Presentation mode. Play Stepwise Identical to the buttons on the Simulation toolbar. and play stepwise. By clicking the small arrow next to Back. or by opening it directly in Presentation Mode.The Presentation Toolbar Note! This toolbar is only available in Presentation Mode! The Presentation Toolbar allows you to navigate through your simulator interface.

Otherwise. Advanced Commands The button opens a submenu where you can work with cue points. and work with external data.Allows you to zoom the current view in or out. a generic help for Presentation Mode will be launched. if one exists. . Help Launches the project documentation. restore permanent variables. autoscale.100 - .

101 - . Zoom Tool Magnify a section of the active diagram.View Commands The view commands include commands for controlling the current view (or project). Presentation Mode . Zoom to Fit Fit the content of the current view to the window. To change language for the active view only. variables defined by given variables. Language Select project language. Go to Next Variable Go to the next variable that matches the given search criteria. Zoom Select or enter the magnification in percent for the active view. or for problematic variables. Go to a Variable Go to a variable in the project. You can search for variables themselves. The Go to variable… dialog box contains several options where you can specify search criteria for finding the variable you are looking for. select a language under Language on the View menu. Details Window Toggle the Details Window on or off (this command is only available for diagrams). Properties Edit the properties of the selected object(s) in the active view. Click the button. and then select the area of the diagram that you wish to magnify. Go to Previous Variable Go to the previous variable that matches the given search criteria.

. The project's presentation mode settings will be used.102 - .Switch to Presentation Mode.

you can temporarily turn it on by holding down the Shift key while creating the straight segment. if you wish to. Resize objects Holding down Ctrl while resizing diagram objects will cause the resize to be symmetrical around the center point of the object rather than extending only the edges dragged by the mouse. This also applies when inserting guides. Shift The Shift key has several functions. links and flows. Alt The Alt key has several functions. link. depending on the drag-and-drop operation you are performing: Create or reshape segments Holding down Ctrl while creating line segments (in links or lines) will make the segments straight. you can temporarily turn it off while dragging an object by holding down the Alt key while you drag the object to its new position. depending on the drag-and-drop operation you are performing: Temporarily reverse snap to grid and guides If snapping is turned on the Layout menu. depending on the drag-and-drop operation you are performing: Create or reshape segments Temporarily reverse snapping to the angular grid for straight segments of lines. Create flows Hitting Ctrl once while creating a flow will turn off the elbow style of that flow. will delete the selected node.103 - . Data input in chart control In the Chart control you can drag any graph that allows input to a new shape by pointing to it and sweep along the value and element axis. Ctrl The Ctrl key has several functions. you can restrict the input to the selected element (data point) only. You can use several modifiers at the same time. If you hold down ALT while dragging. . Thus. Selecting nodes in segments Holding down Ctrl while selecting nodes in line. Holding down Ctrl while creating flow segments will make the segment curved. if snap to angular grid is turned off in the Grid Settings property page. Adjusting connected nodes Holding down Ctrl while moving a connected node or while moving the vertex of a connected node.Constructor Keyboard Shortcuts and Modifiers Drag-and-Drop Modifiers Notes These modifiers can be used when you perform drag-and-drop operations to change the operation that is performed. or flow segments. will force the control handle to always be perpendicular to the edge of the symbol. Drag objects Holding down Ctrl while dragging diagram objects will copy them rather than moving them (a small '+' appears on the mouse pointer to indicate that a copy operation is performed). Note! Creating a straight line or link requires holding down the Ctrl key (see above).

except in one case: Adjusting the vertex of a connected node Holding down Ctrl-Alt while adjusting the vertex of a control handle to a connected node.104 - . Ins Insert a new node when you are creating segments (for flows. links. CtrlAlt The Ctrl-Alt key combination will usually work as a combination of the two individual key functions. Del Delete the last inserted node when you are creating segments (for flows. will lock the connection point of the node itself. . links.Resize objects Holding down Shift while resizing diagram objects will lock the aspect ratio and ensure that the shape of the object is maintained. or lines). or lines).

the Details Window.105 - .Studio Keyboard Shortcuts Application Commands Alt+F4 Exit Powersim Studio F1 Open Help for Powersim Studio Simulation Commands Ctrl+Space Play the simulation Ctrl+Shift+Space Play the simulation stepwise Ctrl+R Reset the simulation Edit Commands Ctrl+X Cut Ctrl+C Copy Ctrl+V Paste Del Delete Ctrl+A Select All Ctrl+Z Undo Ctrl+Y Redo Alt+Enter Properties (of the selected object) Go To Commands Ctrl+G Go to variable (Open Go To… dialog box) F3 Go to next variable Shift+F3 Go to previous variable Ctrl+F3 Go to next variable defined by the selected variable (variable can be selected in the Equations View. or in a diagram) Project Commands Ctrl+N New project Ctrl+O Open (existing) project Ctrl+S Save project Ctrl+P Print project Window Commands Ctrl+F4 Close active window Ctrl+Tab Next window Ctrl+Shift+Tab Previous window Alt+0 Project Window Alt+1 Details Window .

106 - .F5 Presentation Mode .

These private diagrams allow you to create customized user interfaces for each simulation. A change in any of these objects will be immediately reflected in all other simulations and tasks. A component also has a set of Shared Diagrams that are common to all simulations and tasks. Each component can contain several simulations and tasks. time measurements. and other project settings available in the Project Settings dialog box. As the name indicates. you can create a new submodel based on the component you select. Tip! Since all simulations and tasks share the same model variables and definitions. The values of the variable that appear in the view. simulations and tasks. each simulation and task may contain their own Private Diagrams. called Shared Diagrams. etc. such as time graphs. Co-models and events are also set up for each simulation individually. individual simulation settings. The Project Window allows you easy access to all the views and settings of the component and its simulations and tasks. these diagrams are private to the selected simulation. In addition to the Shared Diagrams. or from a previously saved on. and it allows you to create your own "component libraries" that you can . are used for all components within the simulation project. As the name implies. global ranges. The global settings for the entire simulation project. the local ranges and units. Each simulation and task holds it own. This makes it easy to reuse components. may differ from simulation to simulation. All the simulations and tasks of a given component share the model structure and definitions.Working with Components Components in Studio represent self-contained models that can be run independently from eachother. frames. and will not appear in any other simulations. allowing the model to be used for different purposes without having to change the project at all. however. and edit their settings. a change in one of these diagrams will also be reflected in all of the component's simulations and tasks. You can easily create new components.107 - . and the saved runs of the component. By using the Copy Component as Submodel feature. Copying Components as Submodels You can also copy components as submodels in other models. Tip! Although the Equations node appears for each simulation and task in the Project Window. private diagrams doesn't support model variable symbols. This component can come from the current simulation project. tables. This allows you to alter the time horizon and timestep of the simulation independently from the other simulations. the equations themselves are shared by all simulations. including global units. They can only contain presentation objects. if you wish. rename or delete them.

The list below shows which parts of the settings and controls belong to the global project. each with their own simulation settings. time unit Presentation Mode setup Component „ „ „ „ „ Local Ranges Local Units Runs All variables and definitions Shared (Constructor) diagrams Simulation „ „ „ „ Co-model connections Events Private (Interaction) Diagrams Simulation Settings. the Equations and Shared Diagrams nodes appear below the Simulation in the Project Window. the values and time series of the variables will differ with the current simulation time and the selected simulation settings. even though the shared diagrams are identical in all simulations. The reason for this is that the values that will be displayed for each variable belong to the current simulation. Shared diagrams are common to all simulations and tasks for a component.use to quickly duplicate model structures that you often use. reporting windows and intervals. and contains the model . all of which can use their own individual simulation settings. time step. About Private and Shared Diagrams Components in Studio can contain several simulations and tasks. all these variables will automatically be made public. and Private Diagrams are also unique to each individual simulation. start and stop times. which enables them to be defined by variables or used in definitions outside the submodel itself. When the component is copied as a submodel later. Hence. Events.108 - . Project „ „ „ „ Global Ranges Global Units Project settings for calendar. Note! Although the variables and their definitions all belong to the component. A simulation contains two types of diagrams: Private Diagrams and Shared Diagrams. When you create components that you intend to use as submodels later. Co-models. component and simulation. you should define a transfer direction for your interface variables. About Simulations A component can contain several simulations. including integration method.

select the component you wish to rename. and hit Enter. When working with Solver Tasks. the volatile information presented is unique for each simulation. while the model structures and objects themselves are shared among all simulations. 3. you have to use private diagrams to be able to present the data to the user.109 - . and flows. Create a New Component 1. Shared Diagrams . and you can rename it directly in the project window. Rename a Component 1. Since these diagrams are shared by all the simulations and tasks. Hence. a change to the structure in one of them will be immediately reflected in all other simulations and tasks as well. each with their own individual name and simulation settings. To add a simulation to a component: . Hit F2 on the keyboard. They can also contain presentation objects like controls. In this tasks.). Right-click Project Window. Subsequent new components are numbered accordingly (Component 2. etc. and you are limited to using only presentation and input objects (hence the name). Add a Simulation to the Component A component can contain several simulation. These diagrams allow you to create user interfaces. the task will contain Solver variables that are not available outside the given task at all. hyperlinks.structures of the component. These diagrams allow you to create model structures using all the various model variables. hyperlinks. Edit the new name for the component.Constructor Diagrams Shared Diagrams are Constructor Diagrams.Interaction Diagrams Private Diagrams are Interaction Diagrams. etc. Private diagrams belongs only to the simulation in question.). 2. etc. By default it receives the name Component 1. The reason that the Shared Diagrams node is present for each simulation. and select Add Component on the shortcut Project in the menu. is that all the user input and variable values will be different in each simulation that uses the diagrams. links. if you have added one to your project. and are shared by all the simulations and tasks belonging to the component. and can only contain presentation objects (like controls. In the Project Window. Private Diagrams . and are unique for the simulation in which they are defined. The component is inserted in the project structure. You can also right-click a category folder. Component 3. frames. frames.

In the Project Window. and then select Shared Diagrams Note! The simulation's name will be shown in the title bar of the diagram window. expand the component and simulation.. Double-click the Private Diagrams node. The shared diagrams are Constructor Diagrams that are shared by all the simulations of a component. Select Simulation Windows on the View menu. To open the Shared Diagrams of a simulation 1. 2. Right-click the component in the Project Window. and select Simulation Settings. are Interaction Diagrams that are unique to the current simulation. should you have several similar windows open at the same time. or 1. Open a Simulation's Diagrams A simulation have two types of diagrams: Shared and Private Diagrams. expand the component and simulation. 3. This makes it easy to identify which simulation the window belongs to. the variable definition will not be copied when you create the submodel. Right-click the new simulation. Select the name of the new simulation.110 - . Double-click the Shared Diagrams node. Select Simulation Windows on the View menu. until the Private Diagrams node is visible. or right-click it and select View on the shortcut menu. These can only be used to create user interfaces. 2. 2. or 1.will automatically be made public in the resulting submodel. which makes it easy to connect them to the surrounding model variables. and hit F2 to enter a new name. Enter appropriate values for each of the properties. on the shortcut menu. This will make the resulting public child . or right-click it and select View on the shortcut menu. These can be used to create the model itself. Type the new name and hit Enter when you're finished. If you deselect the Keep definition in component copy option for the interface variables. and then select Private Diagrams Create a Submodel from a Component You can copy a component as a submodel inside other models at any time.1. To open the Private Diagrams of a simulation 1. Private diagrams. until the Shared Diagrams node is visible. on the other hand. In the Project Window. as well as creating user interfaces. and select Add Simulation on the shortcut menu. Interface variables variables within your component that has a defined transfer direction . and click OK when you're finished..

3. Example The illustration below shows a simple model structure modelling the behavior of an account. You should therefore remove all empty diagrams from your diagram book prior to using the component as a submodel.111 - . keep in mind that if components that get dimensions and units via the interface variables are easier to reuse. The name of the component will be used as the name of the submodel as well. and Rate all have a transfer direction of in. Note! Although the transfer direction indicates that the variables are interface variables. 5. You can control the size of the resulting submodel symbol by dragging the size of the symbol before releasing the mouse button. You should also take care that the diagrams are not larger than necessary. the diagrams of the component are copied to the submodel as well. so it's easy to find the component you need later. you can select the component to copy from a list containing the recently used copied components as well as the components of the current simulation project. Select the component to copy in the Copy Component dialog box that appears.sip) containing the component you wish to copy in the Copy Component from File dialog box that appears. By clicking the tiny arrow next to the Copy Component as Submodel button. Click OK to copy the component as a submodel. The Balance level has a transfer direction of out. For all of them. If the component requires special ranges and units. Click Copy Component as Submodel on the Diagram toolbar 2. they will all become public in the resulting submodel. You should therefore name each component in an intuitive way. . hitting F2. the Keep definition in component copy can only be deselected for interface variables with the transfer direction set to in. and then hit Enter. the Keep definition in component copy have been turned off. Click once in the diagram where you want to insert the submodel. However. To Copy a Component as a Submodel 1. indicating that they are supposed to be used as input variables for the resulting submodel. 4. The component is named Account and has four interface variables. making it obvious which public child variables should be used for input to the submodel. However. Select the simulation project (.variables undefined as well. The dialog box contains all the components of the simulation project you selected. allowing it to be used as an output variable in the resulting submodel. typing the name. When you create a submodel from a component. these will also be create in the simulation project where you copy your component. You can rename the component in the Project Window by selecting the name. The Opening Balance. Period.

When the component is copied as a submodel. When the component is copied as a submodel into a new model (or submodel). When you define them properly. and the input variables are undefined (resulting in all variables becoming undefined as well).The Account component ready for duplication as a submodel. they can be easily defined (b). The entire submodel will become well-defined as soon as the three input variables have been properly defined. and Opening Balance = 1000<<USD>> (remember to define the unit USD in Global Units). and the variables marked for input will become undefined. Suggested values are Rate = 12<<%/yr>>. a) b) When the public child variables have been included in the parent's model (a). .112 - . Period = 1<<mo>>. which makes them easily available for definition. the interface variables will become public child variables. the entire submodel will soon become valid. The public child variables can now be included in the variable next to the submodel symbol itself. the interface variables become public child variables. Tip! The full submodel with definitions and explanations is here. as shown below.

Delete a Component 1. Right-click the component you wish to delete in the 2.Since the submodel contains one public level. flows can be connected to the level by drawing the flow directly to and from the submodel. and the implementation of the component Account as a submodel is finished. Flows have been connected to the submodel (and thereby directly to the public level Balance). Any number of flows can be connected to the level. but for now one inflow and one outflow will do. Select Delete on the shortcut menu. .113 - Project Window. .

for instance. A simple model implementing the functionality of a conveyor. are used to create user interfaces and data presentations only.114 - .which are full-fledged models built within a variable and connected to the surrounding model by public variables.Constructor and Interaction Diagrams Powersim Studio contains two different types of diagrams: Constructor and Interaction diagrams. Furthermore. or links. where it is shared between all the available simulations. and belong to a component. It is quite simple to get started. and though it will take time and practice to master all facets of it. By implementing user input controls. The diagramming environment supports the design of the Accumulator Flow diagrams used in System Dynamics. Interaction diagrams. you can even turn the simulation process into a test laboratory where the user can change the value of key variables before and during the simulation to . make sure to use all the possibilities that Powersim Studio offers in terms of monitoring the development of crucial variables and bringing the simulation process to life for the audience of your model. For auxiliaries. used a causal loop diagram to single out the key variables of your system and their patterns of influence. You work in the diagram with graphical representations of the building blocks used in System Dynamics: Levels (or accumulators) and flows. Interaction diagrams have the same features as Constructor diagrams. whereas Powersim Studio takes care of the calculus involved in computing the values of the levels after you have given them an initial value. You include the variables of a system that has the potential to change over time and connect them in the way that best represents the relationships between them. flows. auxiliary and constant variables. Each simulation on a component can contain its own book of Interaction diagrams. you are ready to create the model in a Constructor diagram. The model contains a submodel Conveyor . on the other hand. Constructor diagrams are used to create models and user interfaces. you will soon have the capacity to start simulating the behavior of real world systems. except you cannot create variables. you must supply the equations that define them. and information links. Constructor Diagrams After having.

lines. as an example. Constructor diagrams support Powersim controls.115 - . . lines. and more.see how the system as a whole is affected. hyperlinks and bookmarks. Interaction diagrams support Powersim controls. hyperlinks and bookmarks. In addition to the standard variable symbols. and flows. be used to create data presentations for the Risk Assessment task that is available in Studio. links. Working with these objects are identical in both Interaction and Constructor diagrams. Interaction Diagrams Interaction diagrams allow you to create user interfaces that are unique for each simulation for your component. and more. frames. frames. Interaction diagrams can.

however. you can create as many diagrams as you wish in order to illustrate your model. You may choose. At the bottom of the diagram window you will find a row of tabs that let you switch between the sheets. The radial grid runs at angles to help you give your links and flows a uniform appearance. are collected diagram books. Of course. When creating simulations in Studio you have different needs than when you run and experiment with your simulations. Diagrams and Models The diagram is a graphical representation of the model. with the exception that you cannot access child variables in this view. you are only allowed to run and interact with the model. A diagram may also be zoomed in and out. Independent of how you design and edit the diagrams. You can create as many diagram sheets as you wish. You can also use the Details Window for this purpose.116 - . When you design the model in the diagram window. As a result of the separation between the diagram and the actual model. all contained in sheets in the Diagram Book. When Studio is in Design mode. or from shortcut menus that appear when you right-click the object you want to modify. there are two kinds of grids. the entire model can still be viewed (and edited) in the Details Window or the Equations view. and include only a few variables of most interest in a diagram. you are free to perform any changes you wish to the diagrams and simulation model. The regular grid runs vertically and horizontally and you can choose to let variables and other objects be aligned along it. . When Studio is in User mode. To help you keep your diagram nice and tidy. however. to exclude some elements from the diagram while still keeping them in the model. A variable in Studio can itself contain a diagram book with child variables.Work with the Constructor Diagram One model can contain several diagrams. Use the Equation View to edit the model hierarchy directly. Studio therefore offers an option of switching between Design and User mode. The most commonly used commands and features can also be reached from the toolbars. All diagrams belonging to the same variable or component (which can be considered a "root variable"). All commands and editing functions are accessible through the menu bar. the relationships that define the structure of the model are automatically created and the diagram is a complete representation of the model. The different diagrams can focus on different parts or aspects of your simulation model. In that case. you can always view the entire model in the Equations View. you may also choose to create the entire model in the Equations View or Details Window. not change it. Each diagram can contain variable symbols representing the child variables of the variable owning the diagram book.

In these cases they are referred to as flow rates. very much like a bathtub. Auxiliaries can also be used to control the flow between levels. Child variables within levels. They cannot be included in diagrams outside their parent's own diagram book. either. and they can be included in the diagram in which their parent variable exists. The relationships between the model variables are shown by means of connector symbols. Auxiliaries compute and pass on information. constant during the course of the simulation and can only be changes by user input. Since they only act as child variable containers. and submodels. but cannot themselves be referred to by variables outside their parent. Flows represent relationships between levels. Variables There are four types of variables: levels. data type. The Building Blocks of a Constructor Diagram A Constructor Diagram is used to graphically represent the simulation model. Connectors There are two types of connectors: Flows and Links. as the name implies. they can themselves be referred to by variables outside the parent. In addition.Diagram and Details Window. or unit.117 - . Submodels are specialized containers for child variables. and constants can access any variable outside their parent variable. and you can create full models within them. Through the use of public variables you can allow input and output from your submodels. Any variable in Studio can contain child variables. The level can be filled or depleted. while links can represent relationships between both auxiliaries and levels. The flow that fills or depletes it corresponds to either the faucet or the drain. Constants are. value output and input is provided through auto reports and controls. . constants. auxiliaries. You can also create submodels as copies of existing components. they don't have a definition. auxiliaries. The various model variables are presented by variable symbols. These public variables can refer to any variable above them in the hierarchy.

Technically speaking. Array variables A variable symbol with double frames indicates that the variable it represents is an array. You can. the diagram is not the model itself but rather a representation of it. Auxiliaries compute necessary information and make it available to other variables. data type. Reservoir A level symbol with a double line at the bottom represents a reservoir.118 - .Variable and connector symbols as they appear in a Constructor diagram in Studio. which is a special type of levels that cannot be depleted below zero. however. Constant A variable that contains a fixed (initial) value. you must also eventually determine their relationships in quantitative terms. Constructor Diagram Symbols The table below summarizes the various symbols that can appear in a Constructor diagram. When you create variables and connections between the variables in the diagram. A submodel variable has no definition (value). . Submodel A variable that contains child variables. Studio takes care of the calculus involved in computing the value of the levels. Symbol Name Description Level A variable that accumulates changes. These mathematical expressions combine to form the model. Valves control the flows and can in turn be controlled by auxiliaries used as rate variables. or unit. build and modify your model just working with the diagram. Auxiliary A variable that contains calculations based on other variables. Influenced by flows. The Model The model is built up of the basic building blocks mentioned above. The level can be filled or depleted by flows. The information links between them represent the channels of information in your system. You have to define equations for the rates and auxiliaries. and you are free to choose which parts of the model to include in the diagram.

This implies that values from the variable is exported from the model via co-models (such as datasets). Public variable A public variable inside a submodel is indicated by a cross in the upper right corner. Delayed link A connector that provides delayed information to auxiliaries about the value of other variables at an earlier stage in the simulation. A flow is controlled by an auxiliary connected by an information link (or attached directly) to the valve. Permanent variables keeps their value when the simulation is reset. Continuous flow A connector that influences levels. A public variable can be included in the diagram of the parent variable. Variable with A variable symbol with an arrow in the upper right corner transfer direction pointing outwards. and itself refer to variables outside the submodel. This implies that an initial value is imported to the variable at the start of the simulation (the hollow arrow indicates an initial import). Snapshot A variable symbol with an extra set of corners represents an alias for another variable on the same diagram. Flow with anonymous rate A flow where the rate is made anonymous. This implies that values are imported to the set to in variable via co-models (such as datasets). The permanent symbol can appear on constants and levels. values are exported from the variable via co-models (such as datasets). This flow can represent several flows in the underlying model.Variable with diagrams A document indicator indicates that the variable has diagrams. Any variable can have its own diagrams and child variables. Variable with A variable symbol with an arrow in the upper right corner transfer direction pointing both ways. indicates that the variable has its transfer direction set to in. A flow is controlled by a variable connected by an information link (or attached directly) to the valve. A variable symbol with an arrow in the upper right corner Variable with transfer direction pointing inwards. while for the rest of the simulation. Discrete flow A connector that influences levels. Initialization link A connector that provides start-up (initial) information to variables (both auxiliaries and levels) about the value of other . indicates that the variable has its transfer set to in-out direction set to in-out.119 - . Permanent variables A variable symbol with a pin in the upper left corner indicates that the variable is a permanent variable. can be referred to by variables outside the submodel. Information link A connector that provides information to auxiliaries about the value of other variables. Snapshots are useful for linking variables located in different parts of a model. indicates that the variable has its transfer set to out direction set to out.

Error indicators on flows into or out of levels indicate that the flow rate or level is not correctly defined.variables. They are however not shown above. The inconsistency symbol can appear on variables.g. also referred to as the source or sink or a flow. A public flow can be connected to a level outside the submodel. Display Description Tip! Error indicators on model variable symbols indicate that their variable definitions are invalid. Check for unit inconsistencies or use the Function Wizard to debug your function expressions.. Cloud for public flow A symbol illustrating an undefined source or outlet for a public flow to or from a level inside a submodel. The list is not exhaustive but displays the most common errors and inconsistencies. are also symbols in the diagram.g. and levels using a compatible accumulated unit (e. Read a tool tip describing the error or inconsistency when hovering the mouse pointer over the error or inconsistency indicator. The undefined symbol can appear on variables and flows. Common mistakes are that flow rates are not defined with rate units (e. Error symbol A symbol with a '?' (question mark) indicator indicates that the symbol is not properly defined. The error indicator shows on which side of the flow the error occurs. and flows. as illustrated below. You can read a message explaining the error or inconsistency by hovering the mouse pointer over the indicator. Inspect the flow rate's and level's definitions on the Definition property page. Diagram Errors and Inconsistencies Diagram errors and inconsistencies are shown by error ( ) and inconsistency ( ) indicators respectively. since their appearance and presence in the diagram is immediately obvious. Inspect the definition on the Definition property page. Cloud A symbol illustrating an undefined source or outlet for a flow to or from a level. 'people/day'). The table below shows how these symbols are shown and what they can mean. indicates the model's outer limits. The cloud symbol. Inconsistency indicators on Reconnect the correct flow rate to . etc. links. Controls. Inconsistency in diagram A symbol with a '#' (hash mark) indicator indicates that there exists inconsistencies between the diagram and model definitions. 'people').120 - . These indicators appear where the appearance of the diagram does not match the variable definitions. auto reports. freeforms.

or simply delete the flow doesn't represent a flow in the and create a new.flows indicate that the flow the valve.121 - . or create a link from it to the variable containing the inconsistency indicator. Note! If you display your model diagram in User or Presentation Mode. and make sure that the level at both ends use the flow rate as an in. or by introducing a flow and a level somewhere in the structure. used in the variable definition of the target variable. Inconsistency indicators on model variables indicate that a variable that is present in the diagram is used in the variable definition. and allow you to define them more freely. Make sure that the circular definition is broken. Controls are more advanced. and also allow user input to the simulation. correct flow underlying model. Whereas auto reports can only present data. Open the submodel's diagram (alternatively the Equations View) and correct the erroneous child variable definitions. Include the flow rate again. Inconsistency indicators on Either remove the link. controls can also be used for data input. . or redefine links indicate that the source the target variable so that it uses the variable of the link is not linked variable in its definition. You can also choose to present the values from several variables in each control. Auto reports are simple presentation tools that show the values of single variables. )and Adding Controls and Auto Reports to a Diagram Controls and auto reports are used to present simulation results. Error indicators on variables and links connecting them indicates that there is a circular definition present in the diagram. Either remove the variable from the definition. Inconsistency indicators on anonymous flows indicate that the flow doesn't represent a flow in the underlying model. Tip! The missing link will be described in the tool tip of the model variable when you hover the mouse pointer over it. by including a delayed parameter (using a delay function). This can be done by remodeling. the error ( inconsistency ( )indicators will be hidden. instead. Error indicators on a submodel indicates that one or more of the child variables are not properly defined.and outflow.

symbols. when overlapping. The user can enter data into the simulation in one control. you can make your diagram a visually pleasing sight. and inspect the results of the simulation in another. the controls and auto reports let you create an interactive user interface for your simulation. say a time graph.122 - . The illustration below shows how pictures can be used. and other symbols. placed on top of each other in a particular order. This is the normal stacking order of symbols and objects. and frames that support fills. You are allowed to use picture fills for all controls. The Stacking Order of Diagram Objects The objects of a diagram are. from top to bottom: Stacking order 1 Auto Reports 2 Names 3 Links 4 Flows and Valves 5 Variables 6 Powersim Controls . Together. for instance a slider. By using picture fills inside controls. frames.A number auto report (for 'Income') and a time graph auto report allow you to inspect the behavior of the variables as the simulation advances. You can also use pictures to enhance your diagrams. The final report is done using a time graph control.

: If the button is not depressed. As an example. you cannot move a level symbol behind a frame symbol (to read more. You can only play the simulation and provide input to the simulation through controls. to the front. Note! When Studio is in Run mode. or be moved step-wise through the stack in both directions. Send Backward on the Layout toolbar. Change Stacking Order of Objects You can change the order of the objects on the diagram by using the Layout toolbar. Bring to Front on the Layout toolbar.Toggle between Design and User Mode The Design mode allows you to make changes to your model.123 - . To toggle between Design and User mode: 1. Studio is in Run mode. you are not allowed to make changes to the structure of the simulation model. Send to Back on the Layout toolbar. ! ! ! ! Click Click Click Click Bring Forward on the Layout toolbar. Note! There are certain restrictions to how you can order the objects and symbols on a page. The state of the button shows the mode of Studio: ! ! : If the button is depressed. . An object can be sent to the back of the stack. click the The Stacking Order of Diagram Objects link below). Studio is in Design mode. Click Toggle Design Mode.

Any variable that has a value can be used as a flow rate.124 - . In Powersim Studio. and will retain their given value (user-assigned) between simulations. There are several types of variables in Powersim Studio: ! ! ! ! ! Levels represent accumulations in the system that is being modeled. The latter can never be depleted below zero. Although any variable in Studio can contain child variables. The model is created graphically. From that time on. variables can contain child variables. so if you wonder whether you can perform an action or not. such as tables. receive input from input controls. they are constant. allowing you to create a hierarchical model structure. switches. Constants are computed only at the initial time step of the simulation.Work with Variables in Constructor Diagram A model consists of variables that are linked together and interact with each other. and defining them and the way they interact. They can. Various variables in Constructor Diagrams. Submodels are hierarchical. Flow rates control flows to and from levels. the submodel variable type is specifically designed for containing models. Constants that are marked as Permanent will never be recalculated. They can be regular levels or reservoirs. Tip! You will get tips in the status bar when you work with links and flows. however. Building a model in Powersim Studio is done by creating variables. and only as containers for their child variables. Submodels doesn't have values. Auxiliaries receive. The tip follows the movement of the cursor. Regular auxiliaries change their value over time. etc. simply hover over the target symbol and read the message in the status bar! . compute and pass on information. and you can easily see how the variables interact through the way they are connected to each other.

1. You can therefore only use snapshots to provide input to other variables. you should keep in mind that definitions and documentation refer to the original variable. When working with a snapshot. In this case. It is the level that makes a model dynamic. A snapshot will always have the same value as the original symbol. It accumulates flows going into it and subtracts flows going out of it. Note! Links are only allowed from. you can only create links from it.125 - . not to it. you will sometimes experience a need to change a snapshot into the original symbol. one of the remaining snapshots will become the original symbol instead. the menu item will be disabled. A snapshot is indicated by an extra set of corners around the variable symbol. . You can have as many snapshots of each variable as you like in the diagram. This is possible by right-clicking the snapshot and selecting Make Original on the shortcut menu.About Snapshots When a model diagram becomes large or complex. Tip! You can go to the original symbol by right-clicking the snapshot and select Go to Original on the shortcut menu. Click in the active diagram where you want to insert a level of the default size. you must exclude all snapshots as well. you can make snapshots of variables to avoid awkward links. You can only create snapshots of variables that are already present in your diagram. Flows are not allowed at all! Create a Level A level is a variable with a memory. Double-click the level to define it. Note! You cannot make a snapshot into an original if the original symbol has input links. 3. The original symbol will immediately become a snapshot. Although the snapshot will adopt the formatting of the original variable symbol. It accumulates value very much like a bathtub collects the water running from the faucet. However. and you can create links from it to make it available to other variables' definitions. To include a variable that is not present in your diagram. you are free to format each snapshot independently. Thus. Apart from that they are identical to the variables they refer to. 2. Illustration of original and snapshot in a model. Click Level on the toolbar. to completely exclude all instances of a variable in your diagram. Since a snapshot cannot accept incoming links (only outgoing). and not to the variable it represents. not to snapshots. while symbol formatting refers to the snapshot itself. If you have several snapshots of a variable in a diagram. use the Include Variable command. and then exclude the original symbol. or click and drag to create a level of a different size.

Thus. Click Auxiliary on the Diagram toolbar. and then pass on information within one time step. or you can resize it after it has been created. Tip! You can drag the auxiliary to the desired size when creating it. When you are finished. or click and drag to create an auxiliary of a different size. so that you can insert multiple levels without having to click the tool each time. so that you can insert multiple constant auxiliaries without having to click the tool each time. Create an Auxiliary An auxiliary receive. or you can resize it after it has been created. Click in the active diagram where you want to place the constant. Tip! You can drag the constant to the desired size when creating it. click Pointer or hit Esc. the tool becomes persistent. click Pointer or hit Esc. When you are finished. so that you can insert multiple auxiliaries without having to click the tool each time. even if it is defined by an expression that would normally vary as the simulation advances. or you can resize it after it has been created. compute.Levels must have an initial value. Double-click the constant to define it. 3. 1. Create a Constant 1. the tool becomes persistent. 3. Click in the active diagram where you want to place the auxiliary.126 - . This initial value can be a number. Tip! If you double-click Constant. 2. A constant will not change over time. the tool becomes persistent. . 2. Double-click the auxiliary to define it. it will retain the initial value of the expression at the start of the simulation. Tip! You can drag the level to the desired size when creating it. or click and drag to create a constant of a different size. When you are finished. but it can also be the value of another variable. Tip! If you double-click Auxiliary. Tip! If you double-click Level. Click Constant on the Diagram toolbar. An auxiliary change its value over time. click Pointer or hit Esc.

avoiding the long links required to connect the variable to other variables in different places of your model. select the variable and drag it away from the valve. If. You can now delete the link itself.Create a Flow Rate Variable When you create a flow using the Flow tool. 'm/da'. drag it close to the valve. it will automatically connect to the flow valve. or similar. When you release the . Tip! You can also right-click the valve itself and use the Detach Rate from Valve and Attach Rate to Valve commands to detach or attach the connected flow rate automatically. but you cannot create links to them. A flow rate variable is connected to the valve using an information link. Otherwise the connected flow will not be correctly defined. either the link or the variable itself must be deleted. the level is defined as 'm'. By using a snapshot. 3. To delete the link. Note! A flow rate must always be defined with a unit relative to time and the flow it controls. 2. to the flow valve.127 - . The snapshot represents the variable symbol and is a convenient way of creating tidy model diagrams for large models. Use the Link tool to connect the new flow rate variable to the flow valve. You can use any variable (including levels) as the flow rate for a flow by connecting it to the flow valve. To attach the variable to the flow. When it is close enough. Create a Snapshot A snapshot is a "shortcut" to another variable in your diagram. as shown below. for example. then the flow rate must be defined as 'm/s'. an auxiliary flow rate is created automatically. To create a snapshot of a variable (or a group of variables): 1. 1. Only the original variable symbol can have links going into it. If there is another variable connected to the flow valve. If you use the Flow with Rate tool. Select the variable(s) you wish to create snapshot(s) for. you can represent a variable many times in the same diagram. You are allowed to create links from a snapshot. It can also be attached to the flow valve by dragging it close enough. 2. Only one variable can be connected to a valve. Drag the selected variable(s) to the target area using the right mouse button. you must manually connect the flow rate that is going to control the flow.

Go to Original from Snapshot You can easily find the original symbol that a snapshot represents: 1. if you wish to. and click OK. you will move them in the diagram! You can also use the Snapshot command to create snapshots: 1. and select shortcut menu. you can turn a snapshot into the original symbol: 1. 3. If you perform this operation. Click in the diagram where you want to place the snapshot. A snapshot can only have links from itself.128 - . 3. Click Snapshot. Click the arrow of the Snapshot button on the Diagram toolbar and select the variable you want to make a snapshot of from the drop-down list. Create a Reservoir A reservoir is a level that cannot be depleted below zero. The command Make Original is available on the snapshot's shortcut menu. the value of the reservoir becomes undefined (NAN). 2. and no links to itself. When the simulation engine depletes a reservoir. Click in the diagram where you want to place the snapshot. and remove the input links from the old original symbol. Note! If you drag the variable(s) using the left mouse button. or 1. Right-click the snapshot and select Go to Original on the shortcut menu. it will subdivide the time step into smaller parts to calculate the depletion exactly. Select the variable(s) (the dialog box allows multiple selection) you want to create snapshot(s) for in the dialog box. a shortcut menu will appear. 2. . Select Copy with Snapshot Creation Here on the shortcut menu to create snapshot(s) of the selected variable(s). Right-click the snapshot you wish to turn into the original. or drag to make a snapshot of a different size. Make Original from Snapshot If you wish. Make Original on the The symbol that was previously the original symbol will automatically be converted into a snapshot. you may therefore get quite a few inconsistencies in your diagram. If the below drops below zero. You must go through the model and connect all input links to the new original symbol. Tip! You can also convert a snapshot into the original symbol.mouse button. which is now a snapshot.

5. 2. except it has a double line at the bottom. You must make sure that the flows out of the reservoir stops once the reservoir is depleted. 4. To rename an object: 1. The F2 key toggles the edit mode for the active object! . which is unique. Press Enter or click outside the name box to assign name and exit naming mode. This initial value can be a number. You should therefore be aware that your model might produce slightly different results when using reservoirs than when using ordinary levels. The pointer becomes the shape of a caret. 2. and then select Reservoir on the submenu. or click and drag to create a level of a different size.129 - . and you cannot control the line breaks of variable names manually. Select the Reservoir option under Characteristics. since the reservoir's value will become NAN rather than negative. 3. A Reservoir Symbol is similar to a Level Symbol. When the variable has been selected and is active. Click inside the active diagram where you want to insert a level of the default size. Note! The simulation engine will recalculate the entire simulation model when the size of the timestep is altered for the reservoir. or click and drag to create a level of a different size. but it can also be the value of another variable or expression. As soon as you create a variable. it receives a default name. Click the Advanced tab. Click anywhere inside the name. 3. and select Advanced on the shortcut menu. Note! Long variable names will be broken into several lines when displayed in the diagram. Click Level. This is done automatically. 2. or 1. Type the new name. Just as for ordinary levels. or Apply to save the changes without exiting the dialog box.1. Double-click the level to define it. Click Level. Name and Rename a Variable Variables must have unique names. Click inside the active diagram where you want to insert a level of the default size. reservoirs must also be defined by an initial value. start typing the name. 3. The old name is automatically deleted. Click OK to save the changes. Right-click the level. 6.

you can reset the symbol to its default size. Note! The ration between the width and height of variable symbols are always locked. Move the pointer over a selection handle. 2. Select the symbol(s) you want to resize. Select the symbol(s) that you want to resize. 3. The latter method can also be used to change the position of the symbol(s) by using the Horizontal and Vertical boxes. Drag the handles to achieve the desired size. Enter the new width or height under Position & Size. 2. Select the Symbol tab.Resize a Basic Variable Symbol 1. Select the Symbol tab. 3. . and click Properties. 3. By using the Symbol tab in the Properties dialog box. Scale a Basic Variable You can scale a variable symbol freely in the diagram to make it bigger or smaller than other symbols. in the Width or Height box. Tip! Reverse the default Snap to Grid setting by holding down the Alt key while resizing with the mouse. or 1. 2. which control the position of the symbol in the diagram. Variable symbols have minimum and maximum sizes.130 - . and click Properties. Enter the scaling percentage under Scale and Width or Height. Select the symbol(s) you want to scale. 1. Hold down Ctrl to resize from the corner of the object.

A link is by default an information link. a link must always connect two variables. like a flow. are diagram objects that connect variables in a diagram. In fact.131 - . You get different effects by using different combinations of each. . The flow is controlled by a valve that may be linked to an auxiliary variable. the variable at the end is required to use the one at the start in its definition. If one end is unconnected. Flows connect levels and represent quantities transported between them. it cannot. often referred to as the flow rate. Alt. Likewise. a cloud symbol appears at the unconnected end. so if you wonder whether you can perform an action or not. You apply the modifiers by holding the keys down while working with the mouse the way you're used to. Tip! You will get tips in the status bar when you work with links and flows. to keep the diagram consistent. end in white space. such as that of an initialization link or a delayed link. and Shift. or connectors. you can use keyboard modifiers to alter the appearance of the link and flow. A flow has a source and a destination (sink) attached to it. A link provides a variable as a parameter to the variable at the end of the link.Work with Links and Flows Links and flows. There are three modifier keys: Ctrl. indicating that the source or the sink of the flow is beyond the scope of the model or the diagram. The tip follows the movement of the cursor. but can also fill other functions. Studio will automatically detect these situations based on the definition of the linked variables. The table below summarize how these keyboard modifiers work. simply hover over the target symbol and read the message in the status bar! A small model containing several variables connected by links and flows. Keyboard Modifiers when Working with Nodes in Links and Flows When creating and modifying links and flows. They convey information from one variable to another.

Using the Ctrl key have different effects when working with links and flows.Using the Alt key will reverse the Snap to Grid and Snap go Guides settings.132 - . you can force the control handle to always be perpendicular to the edge of the symbol. and vice versa. Pressing Ctrl-Alt when dragging the vertex of a a control handle. Pressing Ctrl while creating a flow. Use the Shift key to reverse Snap to Radial Grid setting. If the option is already selected. with nodes and control points The link segments are by default drawn as curves with symmetrical nodes and are affected by the normal grid settings. while Del will remove the previously inserted node. which appear when you select the node. This allows you to move the connection point of the link or flow without significantly changing its shape. the control handle of the node will always be drawn in a straight line from the center of the symbol and through the node itself. The Alt key temporarily reverses the Snap to Regular Grid setting. and vice versa. You can enable it again on the shortcut menu for the flow. When a link is selected. Thus. hitting Alt will temporarily disable them. so if you wonder whether you can perform an action or not. the node will be deleted. If you hold Ctrl while selecting a node. Using the Shift key will temporarily reverse the Snap to Radial Grid option. hitting Shift will temporarily disable it. Note! New flows are create with the Elbow style by default. Press the Ctrl key to make a straight link segment. pressing Ctrl while creating a link. simply hover over the target symbol and read the message in the status bar! . by using the Ctrl key. will lock the connection point of the node to the variable symbol. If these settings are enabled in the Layout. When moving a node that is connected to a symbol. The tip follows the movement of the cursor. You can also hit Del and Ins while creating links and flows. to change the shape of the link. will create a straight link segment. However. Curved segments of a link. You will get tips in the status bar when you work with links and flows. which is available in Diagram Settings dialog box. Use the control points of the nodes. The first time you press Ctrl will automatically disable the Elbow option. If you are creating links and flows. Change the Shape of a Link A link consists of one or more segments that can be either curved or straight. will create a curved flow segment. using the Ctrl key will toggle the segment type between Straight and Curved. nodes appear at the points where the segments meet. Hitting Ins will insert a new node.

for example with Powersim Solver. You can divide the link into several segments by clicking where you want one segment to end and a new one to start. Studio will automatically detect when the link is used as a delayed link and will change the link into a . Click inside the symbol you want the link to start from. so that you can insert multiple links without having to click the tool each time. The tip follows the movement of the cursor. link. simply hover over the target symbol and read the message in the status bar! Create a Delayed Link Use delayed links to let one variable influence another only after a certain amount of time has elapsed. Click Properties and click the Definition tab. Define the variable using a delay function. hold down CTRL while you drag the link. You have to delete the original link and create a new one. Using initialization links together with levels enhances the readability of the diagram and makes it easier to tune and optimize the model. will delete the last inserted node (except the start node). Click Link. click Pointer or hit Esc. The link will be drawn as a dotted line. you can create a link to it from another variable. 3. Click Link. Use the Link to create a link between the variables. so if you wonder whether you can perform an action or not. 2. Drag the link from a variable to the level or constant you want it to initialize. You will get tips in the status bar when you work with links and flows. Hitting Del while drawing a freeform. When you are finished. If you wish to create a straight link. the tool becomes persistent. If you double-click Link.Create a Link 1. You will get tips in the status bar when you work with links and flows. Drag the link to the destination symbol. or flow. A link cannot be detached from one symbol and reattached to another. The tip follows the movement of the cursor.133 - . 4. Click inside the destination variable to complete the link. The value carried by the link is then used to compute the initial step of the simulation.) 1. 1. 2. 4. 3. Select the target variable. so if you wonder whether you can perform an action or not. 2. (The alternative is to enter the initialization value directly in the level's definition. simply hover over the target symbol and read the message in the status bar! Create an Initialization Link To give a level or a constant an initial value. for example DELAYPPL.

You will get tips in the status bar when you work with links and flows. Press the ctrl key to make the flow curved. the diagram will become inconsistent when you delete a link. You will get tips in the status bar when you work with links and flows. 2. or hit Delete on the keyboard. so if you wonder whether you can perform an action or not. and will facilitate the drawing of accurate angles and give your diagrams a more uniform appearance. You will get tips in the status bar when you work with links and flows. Various segments of a flow. a hash (#) will appear to indicate the inconsistency. nodes appear at the points where the segments meet. simply hover over the target . to change the shape of the flow. The tip follows the movement of the cursor. The tip follows the movement of the cursor. When a flow is selected. If a variable is defined by another variable without being connected by a link. with nodes and control points A flow is drawn by default with straight segments and cusp nodes.delayed link.134 - . Select the link you wish to delete. Use the shift key to temporarily turn off Snap to Radial Grid. Select Delete on the Edit menu. A delayed link indicates that the input variable is used in a delay expression. so if you wonder whether you can perform an action or not. simply hover over the target symbol and read the message in the status bar! Delete a Link 1. simply hover over the target symbol and read the message in the status bar! Change the Shape of a Flow A flow consists of one or more segments that can be either curved or straight. simply create the link. The tip follows the movement of the cursor. so if you wonder whether you can perform an action or not. This link type is shown below. which appear when you select the node. If you remove a link that is required for the diagram to be consistent. Use the control points of the nodes. Snap to Radial Grid is automatically activated. The alt key reverses the Snap to Regular Grid setting. To remove the hash.

Press down the SHIFT key to temporarily turn off the grid. If you double-click Flow. The tip follows the movement of the cursor. Click inside the destination level to complete the flow. 3. the tool becomes persistent.symbol and read the message in the status bar! Create a Flow A flow can be created either between two levels in white space. The default flow type created by Studio is a continuous flow. Click in white space to start a new flow segment. simply hover over the target symbol and read the message in the status bar! . indicating that this end of the flow extends beyond the boundaries of the model. the tool becomes persistent.135 - . indicating that this end of the flow extends beyond the boundaries of the model. 1. Click Flow with Rate (or click Flow to create a flow without a flow rate). If you want the source or the sink of the flow to remain unspecified. so that you can insert multiple flows without having to click the tool each time. You will get tips in the status bar when you work with links and flows. If you want the source or the sink of the flow to remain unspecified. Click inside the source of the flow and move the pointer in the direction you want the flow to go. Click Flow. either start in white space or double-click in white space to end the flow. Click inside the source of the flow and move the pointer in the direction you want the flow to go. A cloud appears. The tip follows the movement of the cursor. or into or out of one level. If you double-click Flow with Rate. 2. click Pointer or hit Esc. To make a curved flow. When you are finished. To make a curved flow. You will get tips in the status bar when you work with links and flows. either start in white space or double-click in white space to end the flow. click Pointer or hit Esc. The flow snaps to the radial grid by default. 4. Press down the SHIFT key to temporarily turn off the grid. To change it into a discrete flow you must change the integration settings for the flow variable explicitly. When you are finished. 2. Click inside the destination level to complete the flow. so if you wonder whether you can perform an action or not. 3. The flow snaps to the radial grid by default. so if you wonder whether you can perform an action or not. press the Ctrl key. Click in white space to start a new flow segment. simply hover over the target symbol and read the message in the status bar! Create a Flow without a Rate Variable A flow can be created either between two levels in white space. so that you can insert multiple flows without having to click the tool each time. 4. press the Ctrl key. A cloud appears. 1. or into or out of one level.

you might want to move it away from the valve. Drop the rate wherever you want to. 2. The tip follows the movement of the cursor. Or: ! Right-click the flow valve. so if you wonder whether you can perform an action or not. ! Drag the rate variable away from the flow valve until a link appears. to indicate that the source or destination of the flow extends beyond the scope of the diagram or the model. the rate snaps to the valve. you may connect a flow to another level. 3. Hold the mouse button down while dragging the node away from the level. You can perform this action on flows already connected to another level. however. 1. The tip follows the movement of the cursor. You will get tips in the status bar when you work with links and flows. Select the flow you want to disconnect. and flows that start or end in a cloud symbol. When close enough. Point to the node you want to disconnect.Disconnect Head or Tail of a Flow 1. so if you wonder whether you can perform an action or not. so if you wonder whether you can perform an action or not.136 - . perform the reverse operation. You will get tips in the status bar when you work with links and flows. Click the end node of the flow you want to reconnect and drag it over the level you want to connect it to. You will get tips in the status bar when you work with links and flows. In some cases. or . simply hover over the target symbol and read the message in the status bar! Reconnect a Flow to a Different Level At any point. simply hover over the target symbol and read the message in the status bar! Attach a Flow Rate To Attach a flow rate to its valve: ! Drag the rate onto the linked flow valve. simply hover over the target symbol and read the message in the status bar! Detach a Flow Rate Variable The rate variable is by default attached to the flow valve. The tip follows the movement of the cursor. and select Detach Rate on the shortcut menu. To attach the rate to the flow valve again. A cloud symbol will appear at the unconnected end of the flow.

or drag the flow rate away from the flow valve. simply hover over the target symbol and read the message in the status bar! Move the Valve of a Flow When a flow is created. it will be moved together with the valve. 1. The flow rate must be attached to the valve by a link. or deleted. The tip follows the movement of the cursor. If it is detached and connected to the valve by a link. even levels and constants. so if you wonder whether you can perform an action or not. If the rate symbol is attached to the valve. Right-click the valve you want to move. simply hover over the target symbol and read the message in the status bar! Change the Rate Variable of a Flow Before changing the flow rate of a flow. it will not be moved.! Right-click the flow valve. You may later move the valve to any position along the flow. Alternatively. Any variable can be used as a flow rate.137 - . Connect the variable you want as the new flow rate to the valve by creating a link from the . and delete it by selecting Delete on the Edit menu. Select Move Valve to Next Flow Segment on the shortcut menu to move the flow valve to the next segment of the flow. You will get tips in the status bar when you work with links and flows. the rate and its valve are positioned in the middle of the flow. select the link that connects them. 2. the existing flow rate must either be detached from the flow valve. so if you wonder whether you can perform an action or not. 2. A flow rate can be attached to the valve once a link is established and the flow rate dragged close enough. and select Attach Rate on the shortcut menu. Delete the flow rate by selecting Delete on the Edit menu. 1. The tip follows the movement of the cursor. You will get tips in the status bar when you work with links and flows. select Move Valve to Previous Flow Segment to move the valve to the previous segment.

You will get tips in the status bar when you work with links and flows. Select the flow rate variable you want to delete in the diagram. so if you wonder whether you can perform an action or not. Hit Delete on the keyboard. simply hover over the target symbol and read the message in the status bar! Delete a Flow Rate Variable 1. The flow is not deleted though you delete the flow rate that controls it. The flow rate will not be deleted though you delete the flow it controls.138 - . simply hover over the target symbol and read the message in the status bar! . Select Delete on the Edit menu. Hit Delete on the keyboard. A flow rate that is linked to a valve by an information link. Select the flow rate you wish to delete. 2. Select the flow you want to delete in the diagram. can be attached to the valve by dragging it close enough to the valve in the diagram. 2. 2. The tip follows the movement of the cursor. so if you wonder whether you can perform an action or not.variable to the flow valve. The variable now acts as a flow rate and controls the flow. The tip follows the movement of the cursor. or 1. The tip follows the movement of the cursor. You will get tips in the status bar when you work with links and flows. You will get tips in the status bar when you work with links and flows. 2. Select Delete on the Edit menu. so if you wonder whether you can perform an action or not. or 1. simply hover over the target symbol and read the message in the status bar! Delete a Flow 1. Select the flow you wish to delete.

public variables that can be accessed from outside the submodel is only permitted within Submodels. which represents the content of the conveyor at any given time. In a hierarchical model all variables are allowed to contain child variables. Note! How to define variables in hierarchical models are explained in detail here. Using Submodel variables is the preferred way of making hierarchical models. while submodels within variables of other types can only be accessed from within the variable itself. a conveyor is implemented as a submodel that accepts any number of flows into the conveyor.139 - . These inputs are defined by the Time in Conveyor and Initial Amount in Conveyor variables in the parent diagram. The illustration below shows what an hierarchical model may look like. In this example. and one total output from it. each contained within its own submodel. The most striking advantage is that you can divide your simulation model into smaller sections. There are two input variables to the model: Initial defining the initial content of the conveyor.Build Hierarchical Models Studio introduces hierarchical structures to simulation models . The flows into the submodel are automatically connected to the public level Contents. . As an example.the ability to create submodels within your model. The implementation of the submodel is shown below. Submodels are different from other variables. and therefore don't have a value nor a data type. since they only act as containers for child variables. A model utilizing a submodel to implement a conveyor functionality. and offers more advanced functionality than submodels created within variables of other types. and Delay Time defining the time it takes each item to pass through the conveyor. Your main model will connect the various submodels and only contain the variables that are unique to the "top-layer" of the model.

A submodel is represented by an octagon in Constructor diagrams. When using submodels. Diagram book Each variable in a Constructor diagram can contain its own diagram book.The submodel structure used in the conveyor model above. and all its diagrams will be lost. The submodel is merely a container for child variables. unlike other variable symbols. A public variable can also be accessed by child variables of its own sibling variables. you can utilize the advanced features listed below. The submodel symbol as it appears in a Constructor diagram. Public variables In a submodel. the submodel doesn't have a definition. A small indicator in the upper right corner of the symbol indicates that a variable is public. levels. and as such it offers more functionality for its child variables than other variables does.140 - . That a submodel (or any other variable for that matter) has its own diagram book is indicated by a small document indicator in the lower left corner of the variable symbol. Note! If you delete a variable (submodel) that has diagrams. This diagram book is identical to any other diagram books in Studio. and allows you to create your submodel just as you would create any other model in your project. all its child variables. . Unlike auxiliaries. and consequently doesn't have a value during simulation either. When a submodel (or another variable) has a diagram book. a small document indicator is attached to the lower left corner of the variable symbol. You are allowed to alter the size and aspect ratio of the symbol. Note! The complete description and definitions of the Conveyor model are available here. only public variables can access or be accessed by sibling variables of the parent variable. and constants. you cannot undo the deletion! The deleted variable. About Submodels A submodel in Studio refers to the variable type submodel and how it is used inside a model.

However. This hides implementation details if desired. Include public variables in parent diagram You can include any public variable of a submodel in the parent diagram. Anonymous flows Anonymous flows allow you to merge several flows from a submodel to the same level into one flow without a flow rate. if other variables (siblings of the parent) use the included variable in their definitions. Two (or more) flows from the same submodel into the same level can be simplified into an anonymous flow. If you include a flow rate in a parent diagram. and indicates how flows run through your system. . an indicator appears on the upper right corner of the variable's symbol. they must use the correct syntax (Model_1.Auxiliary_1 in the picture above). the flow itself will also be included if it is open in one end. This means that you don't have to type "Parent~" for each variable you use in the included variable's definition. Note! When you edit the definition of an included variable. An included variable will be connected to the parent symbol with a satellite line.141 - .When a variable is made public. all variable references are relative to the parent rather than the child variable itself. If it is connected in both ends. A public variable can be included in the parent's diagram. A circle at the boundary of the parent symbol indicates which of the variables is the parent (useful if you have a submodel as a child). It will be connected to its parent with a satellite line and a small circle indicates the parent of the relationship. the flow will not be included.

all its child variables. no link will exist between them. as it allows you to easily connect these to variables in the parent diagram by dragging links from these variables to the submodel symbol itself. Note! After you have copied the component to a submodel. A public variable is indicated by a cross in the upper right corner in a Constructor diagram. By double-clicking the variable's diagram node in the Project Window. The variables you have set a transfer direction for. The diagram book can be opened in two ways: ! ! By right-clicking the variable and selecting Open Diagrams on the shortcut menu. A variable that has a diagram book has a diagram indicator in its lower left corner. or by a green dish in a tree view (see illustration). In a submodel. You can also select to not copy the definition for selected variables when the submodel is created. About Public Variables Child variables within a submodel (of the submodel variable type) can be defined as public. or by right-clicking it and select View on the shortcut menu. as shown below.Copy components as submodels You can copy any pre-made component from any simulation project as a submodel inside your model. will be automatically defined as public in the submodel.142 - . Changes you perform to the component will not be reflected in the submodel. and all its diagrams will be lost. About Submodel Diagrams Any variable in a Constructor diagram can have its own diagram book. This is useful for variables that provide input to the submodel. so you can use the same name for variables inside different submodels as well as in the main model. only public variables can refer to variables outside the parent variable. Any variable in Studio can have its own diagram book. This allows you to model common or similar structures only once in a component. . you cannot undo the deletion! The deleted variable. it receives a small diagram indicator in the lower left corner. and vice versa. The diagram book is created the first time you open the diagram book for the variable. Note! If you delete a variable that has diagrams. When a variable has a diagram book. and then reuse this component in later projects. or can themselves be referred to by variables outside the parent variable. Reuse variable names Each submodel contains its own name space.

Public variables can also be included in the parent diagram. About Child Variables in Auxiliaries. The submodel of the auxiliary Payroll Tax is shown below. When you drag a link to a submodel. The public variables of the submodel populate this dialog box. also auxiliaries. Other accessibility rules are valid for child variables within these variable types than for child variables of submodels. levels. // The total salary payment of the company = . The child variable Auxiliary_1 of Model_1 is included in the parent diagram. The model structure inside the auxiliary Payroll Tax. When you copy a component into a model diagram as a submodel. This makes it simple to create models within them. as shown below. all the variables that have a defined transfer direction will automatically be defined as public. and constants. so you can reuse variable names in various parent variables. and you can select to let one of these variables refer directly to the linked variable. They can themselves refer to any variable above them in the hierarchy.. Each variable contains its own name space.143 - . and constants cannot be made public.'Due Payment' aux 'Payroll Tax' // The variable is defined equal to . Levels. child variables of auxiliaries. The example below shows how a model inside an auxiliary can be used to calculate the payroll tax of a given salary (represented by a variable on the parent's level). Any variable in a Constructor diagram can have its own diagram book. In particular. though. a dialog box will appear. and can therefore not be included nor referred to by variables above them in the hierarchy.a) b) A public variable as it appears in a) Constructor diagrams and b) tree views. This is a convenient way of connecting a submodel to the surrounding system. and constants. aux 'Gross Salary Payment' = . levels. and Constants You can create child variables within auxiliaries.. and a small circle indicates the parent. The equations are shown below. levels. so they are highly useful as an alternative means of calculating the value of their parent variable. The included (public) variable will be connected to the parent symbol by a satellite line.

Some of these rules are described below. since this is a requirement for a child variable to refer to or be referred to by variables outside the submodel. To see the entire example. You can also include the level in the parent diagram. and attach the flow rate to the valve manually. please click here. and a dialog box appears asking to what level inside the submodel you'd like the flow to connect to. It is also a requirement for the child variable to be included in the parent's diagram. if the level is public (as shown in fig b). Public flows to and from submodels Public flows (flows controlled by a public auxiliary) can be included in a parent diagram.144 - . Consistency Rules for Submodel Diagrams There are various consistency rules that apply to submodels and how its child variables can be included in the parent diagram. .// its child variable 'Due Payment' // The variables below are children of 'Payroll Tax' const 'Payment Period' = 2 <> const Percentage = 14% level Due = 0 <> Amount = Parent~'Gross Salary Payment' aux 'Due Amount' = Amount * Percentage aux 'Due Payment' = IF(TIMECYCLE aux (STARTTIME. the auxiliary Payroll Tax can be used to control a flow deducting the payroll tax from the company account. the flow will automatically be created.0 <>) } // End of 'Payroll Tax's child variables { In the final model. The flow itself is connected directly to the submodel.'Payment Period'). External flows to and from levels inside submodels You can allow flows to run from the parent diagram and into a level inside the submodel (as shown in fig a). You may also create the flow manually. If you include a flow rate. Due. a) b) A flow can either be connected directly to a) a submodel or to b) a public level that is included in the parent diagram. Simply connect the flows directly to the submodel. Note! The child variables described below must all be public variables.

. A flow can either be connected directly to a) a submodel or to b) a public level that is included in the parent diagram. a link between the submodel and the referring variable is optional. you are not allowed to connect them in the parent diagram. If the child variable is included in the parent diagram. Links to and from submodels and child variables If a child variable within a submodel refers to a variable outside the submodel. This prevents implementation details from the submodel to be exposed in the parent diagram. Flows that are included when a flow rate is included If a public flow rate is included in the parent diagram. the link is required.as shown in the figure below. as illustrated below. a link is only required if the child variable is included in the parent diagram. Otherwise. The child variable Model_1.145 - . the flow will be automatically included if it is unconnected in one end. This is illustrated below. If a variable on the submodel's level refers to one of its children. a link can be made from that variable to the submodel itself (the link is optional). a) b) c) If a child variable refers to a variable outside the submodel. Otherwise the flow will not be included in the parent diagram. a link is optional as long as the child variable is not included in the parent diagram. as in c above.Auxiliary_2 refers to Auxiliary_1. When the child variable is included. a link must be made to the included child variable itself (the link is mandatory). Note Observe that even if both the level and the flow rate are public.

the link is required. however. If you need to perform changes to the . Note! If you delete a submodel that has diagrams. 2. as shown in c) above.a) b) c) If a variable refers to a child variable inside the submodel. The component is copied and new variables are created. A link from one submodel to an included child variable. Create a Submodel 1. all its child variables. a link is optional as long as the child variable is not included in the parent diagram. Click in the active diagram where you want to place the submodel. You can also define it in the Equations View. 3. will become inconsistent. When you are finished. the tool becomes persistent. The diagrams for the submodel are created when you open them the first time. a link is optional between the two submodels as long as none of the child variables are included. there will be no "link" between the two. include both child variables and draw the appropriate link between them.146 - . To make a consistent diagram. click Pointer or hit Esc. In this case. They are available on the submodel's shortcut menu and in the Project Window. or click and drag to create a submodel of a different size. Right-click the submodel and select Open Diagrams to create a submodel within it. Create a Submodel from a Component You can copy a component from any simulation project as a submodel in the current component. When the child variable is included in the parent diagram. Tip! You can create submodels from existing components in both the current project or in any other simulation project you have created. and all its diagrams will be lost. The same applies to child variables that refer to the child variables of other submodels. as shown in a) and b) above. When you have copied a component as a submodel. Click Create Submodel on the Diagram toolbar. If you double-click Create Submodel. Use the Copy Component into Submodel command to achieve this. or you can resize it after it has been created. so that you can insert multiple auxiliaries without having to click the tool each time. Tip! You can drag the submodel to the desired shape and size when creating it. you cannot undo the deletion! The deleted variable.

or browse for a file to copy a component for. If you select a simulation project. you can copy components from the same project or from external files. A dialog box will appear when the link is connected to the submodel. 5. This makes it easier to connect the interface variables of the submodel to the rest of the model. a link is created to the submodel. and you can select a variable inside the submodel. and replaced by links directly from the submodel to the variables referring to the output child variables. as this makes it a lot easier to connect the submodel to the surrounding model. Include a Child Variable in a Parent Diagram You can include a submodel's public child variables in the submodel's diagram. Click the small arrow next to Copy Component as Submodel on the toolbar. the definition of the selected variable will be replaced by a reference to the linked variable. A small menu appears. Also. To create a good submodel from a component ! ! ! Define a transfer direction for variables that provide input or output from the component (although not required. Drag links from the included output (child) variables to the variables in the system that will use their values. if you deselect the Keep Definition in Component Copy option on the Advanced property page. a dialog box containing the components from the selected project will appear. and the selected public child variable will automatically refer to the variable at the starting end of the link. Select the component you wish to copy (the list contains the recently copied components as well as the components in the current project). 2. Give the component an intuitive name so you can easily find it when you want to include it in your models. 3. In this case you should select the component and click OK.147 - . If you select a child variable in the list and click OK. Drag links from the variables that contains the input data to the submodel symbol. Note! Only public variables can be included! . the definition of the variable will not be copied. Click somewhere inside your Constructor diagram to insert the submodel symbol. The included child variables can now be excluded if you wish. Let the input variables contain only a single value. Include the output variables from the submodel in the submodel's diagram. containing several options. To copy a component as a submodel 1. all variables that have a defined transfer direction will be automatically converted to public variables. select a recent simulation project to copy a component from. When a component is copied as a submodel.implementation of the original component. Define the variables as required. 4. a dialog box containing the public child variables of the submodel will appear. these changes must also be done in the submodel manually. You can resize and reshape the submodel symbol by dragging it while holding the mouse button down. When you copy components as submodels. Deselecting the Keep Definition in Component Copy option for these variables will make it even easier to connect the submodel. defining input variables as in and output variables as out will make your component model easier to read). When you click OK. When you draw a link to a submodel.

When a variable has a diagram book. it receives a small diagram indicator in the lower left corner. If there is more than one public variable in your submodel that is not included. Browse to the variable you wish to view. a dialog box will appear. the diagram book is created. a new will be created. Select the variable you wish to include and click OK. you will find the diagram books of the various variables. Studio will display a dialog box if the submodel contains public child variables that can be defined by the source variable of the link. and then select the variables you wish to include in the appearing dialog box. or right-click it and select View on the shortcut menu. The included variable will be connected to the submodel by a satellite line. Click in the diagram where you want to include the child variable. If the variable doesn't already have a diagram book. The child variable Auxiliary_1 of Model_1 is included in the parent diagram. select an area where you want to create the symbols. the following only applies to public child variables! . Below the Shared Diagrams node. To open the diagram book (when it already exists): ! Browse the Project Window. Any variable in Studio can have its own diagram book. you can select Include Child Variable on the submodel's shortcut menu. The included variable symbols will be distributed inside the area that you selected. The diagrams are accessible in two ways. To open the diagram book: ! Right-click the variable symbol and select Open Diagrams.148 - . Tip! To include several public variables at once. Note! Since variables outside the symbol can only refer to or be referred to by public variables within the submodel. A circle on the submodel symbol indicates the owner symbol. through the shortcut menu on the submodel. When you open the diagram(s) the first time. Right-click the submodel symbol and select Include Variable on the shortcut menu. starting in the upper left corner. When creating links from a variable to a submodel. 2. double-click the diagram node. Create Links to or from a Submodel You can create links to and from your submodel and its included public child variables. Open a Diagram for a Variable Any variable in Studio can have its own diagram book. This makes it easy for you to connect the submodel to the variables surrounding it on the parent's level.1. and in Project Window.

Tip! You can sort the contents of the Define Child Variable dialog box by clicking the column headers. You can also create a link the opposite way. Alternatively. and define the public child variable using the Define Child Variable dialog box. if you want to create the link without changing any definitions. the link will disappear (as two links cannot exist between two objects in a diagram). Creating links to and from public variables that are included in the parent's diagram is identical to creating links to and from any other variable in the diagram. this property(-ies) will be shown in the Explicit Definition column. dimension. These three scenarios are shown in the figure below. However. A dialog box appears. or data type. If the list of the Define Child Variable dialog box contains public child variables that have one (or more) of these three properties explicitly defined. 2. a) b) . you only need one link from the variable to the submodel. These flows can be controlled by flow rates that are siblings to the submodel. they can also be connected directly to the child level. Simply draw the link from the source to the target variable. from a submodel and to a (sibling) variable. but the child variable will be correctly defined. provided that the child level is included in the parent's diagram. containing a list of the public variables of the submodel. or they can be controlled by flow rates that are children of the submodel. This dialog box allows you to automatically generate a definition for the public variable that contains a reference to the variable at the start of the link. In this case. no dialog box will appear. Select a public variable and click OK.149 - . If the flows are controlled by siblings to the submodel. so you must manually alter the variable's definition. Create a link from a variable to the submodel. Tip! Sometimes a public child variable will have an explicitly defined unit. When you click OK. Create Flows to or from a Submodel You can create flows that run in and out of levels in your submodel. select the Create Link Only option in the dialog box and click OK.To create a link to a submodel: 1. you can easily define the variables by creating a link from the variable to the submodel again. If you want to use a variable in the definition for more than one public child variable. This information is included for your convenience.

To connect a flow with internal flow rates to a submodel Note! Only flows controlled by public variables and that are unconnected in one end can be included in the parent diagram. and select the appropriate flow rate in the dialog box that appears (if you have more than one public variable in the submodel that hasn't been included yet). and select Include Variable on the shortcut menu. To connect a flow with external flow rates to a submodel To create a flow as illustrated in figure a) above: 1. To create a flow as illustrated in figure c) above: 1. right-click it and select Exclude Flow(s) on the shortcut menu. You use this dialog box to select which level you want to connect the flow to. When the flow is included.c) A flow controlled by variables can either be connected directly to a) a submodel or to b) a public level that is included in the parent diagram. Click OK to include the flow rate. Otherwise. you will not be allowed to attach the flow to the submodel symbol. If you click Cancel. 2. the operation is aborted (no flow is created). Right-click the submodel and select Include Variable on the shortcut menu. 3. If the submodel doesn't contain any public levels. The flow will be automatically included in the diagram provided it is unconnected in one end. A flow controlled by child variables that are included in the parent's diagram can be connected directly to the submodel. 2. Click where you want to place the included flow rate. When you attach a flow to a submodel symbol. if there is only one public level in the submodel. Click OK to include the variable. if the submodel contains more than one public level. you follow the procedure above. Create a flow and connect it to the submodel. Finally. Select the level you wish to connect the flow to in the dialog box that appears. Right-click the submodel. and click OK to exit the dialog box and create the flow.150 - . even if it is included in the diagram. a dialog box appears. To create a flow as illustrated in figure b) above: 1. and select the appropriate level in the dialog box that appears (if you have more than one public variable in the submodel that hasn't been included yet). . Note! If you wish to include only the flow rate and not the flow itself. These flows cannot be connected to the child level. 2. the flow is automatically connected to this level. Create a flow and connect it to the included level. Click where you want to place the included level. a dialog box containing all the public levels of the submodel appears.

Repeat step 1 for the flow rates of all the flows you wish to convert. a) b) You can greatly simplify the flow structure of your model by using anonymous flows. 1. The procedure requires that the levels. To make the flow valid. 2. . Flows can only be made anonymous when they are connected to a level or a submodel in both ends of the flow. deleting a flow will not destroy the structure of your model. The models in a) and b) show the same model structure. and connect it to the valve of the flow. Follow the procedure below to create an anonymous flow. The illustration below illustrates how anonymous flows can be utilized to create a simpler model that is easier to understand.Create an Anonymous Flow Anonymous flows allow you to indicate the direction in which the information or material in your system flows. you must also include the flow rate controlling the flow. The valve will return on the flow if you right-click it and deselect the Anonymous Rate option. Delete all but one of the flows. but a) uses ordinary flows. without showing the flow rate. while b) utilizes anonymous flows. otherwise the flow will be inconsistent. and select Exclude Variable on the shortcut menu. and flow rates are already present in the diagram. 3. The flow will automatically become anonymous. As long as the flow rate is excluded.151 - . Right-click the flow rate controlling the flow you wish to make anonymous. flows.

or by using toolbar buttons. for example give a time graph parameters to display. and alter the coordinates of the position. The diagram will scroll automatically if the target area is beyond the visible area of the diagram. Cut and copy operations can be achieved by right-clicking an item or a selection of items. or to the Clipboard. and by using various keyboard accelerators while dragging (holding down CTRL will create a copy. The Equations View always shows all the variables in the model. while no accelerators will perform a move operation). allowing you to select the operation to perform. In addition. Deleting Variable Symbols in Constructor Diagrams When you are working with copying and deleting variable symbols in Constructor diagram. Transfer operations can be achieved in several ways. Copy objects from one diagram to another. If you wish to cancel the drag-and-drop operation. Delete objects in the diagram.152 - . This is achieved by using ordinary dragand-drop (holding the left mouse button while dragging). Copy objects from one location in the diagram to another. or by accessing the property page for the symbol. a model variable can be present in the model itself without being presented by any variable symbols in Constructor diagrams at all. by keyboard shortcuts. while a Constructor Diagram only shows a selection of the variables in the model. move. Paste objects from the Clipboard to the diagram. or between views. by drag and drop. select and format objects in the diagram using the mouse. Likewise. if you drag-and-drop by using the right mouse button rather than the left. a menu will appear where you drop the object. Linking operations can be performed by accessing the controls property page. Cut objects and move them to the Clipboard. hit Esc during the operation. or by drag and drop. resize. by accessing the Edit menu. you should be aware that a model variable can be represented by several variable symbols in different Constructor diagrams.Work with Diagram Editing In Powersim Studio you have a lot of editing capabilities by drag and drop. These allow you to: ! ! ! ! ! ! ! ! Move objects from one location in the diagram to another. Move operations can be performed by drag and drop. When working with variables in the Equations View. You use the mouse to control a lot of the operations in Powersim Studio. Copy an Area as a Picture to easily copy a section of a diagram to the Clipboard and paste them in another application as a picture (Enhanced Metafile). Link objects in the diagram to variables in the model. the only operations that are required are the . You can copy.

Include Variable will include a variable symbol for a model variable that is already present in the model but not in the diagram. Copy. and the model variable itself will be deleted from the model. Dragging with the Ctrl key pressed results in a copy operation. ! Dragging a variable into a Powersim control causes the control to show that variable's value during the simulation. Cut. however. the diagram will scroll automatically. ! If the target area is beyond the visible area of the diagram. And finally. Dragging a variable from the Equations View (alternatively the Details Window) onto a diagram. As a safety precaution. includes the variable in the diagram. three commands more are required to achieve all possible actions. Dragging an object from a diagram of one component to a diagram of another component. and delete the model variable itself from the model. The two commands Exclude Variable and Delete Variable are both available on the shortcut menu for a variable symbol.various Add operations.) 2. If the variable symbol is only present in the current diagram. the Delete command in a Constructor diagram works as a combination of Exclude Variable and Delete Variable. Dragging with the Ctrl key pressed includes (if the object is a variable) or copies (for all other objects) the object in the target diagram. but is also represented by a snapshot in the diagram as well. ! ! ! Between diagrams or views ! ! ! ! Dragging into another diagram moves the object from the source diagram to the target diagram. the variable symbol will be excluded from the current diagram only. Delete Variable will delete all variable symbols in all Constructor diagrams. If the variable symbol is the only symbol representing the model variable in any diagram. moves . (Equivalent command: Exclude Variable. and Delete. Dragging with the Shift key makes it possible to position variables over objects (rather than dropping them on the objects).153 - . The functionality of the Constructor diagrams: Delete command in 1. If the variable symbol you are trying to delete are present in other diagrams as well. (Equivalent command: Delete Variable. the variable symbol will be excluded and the snapshot be converted to an original symbol instead. the variable symbol will be excluded from the diagram.) 3. (Equivalent command: Exclude Variable. Hitting Esc cancels a drag-and-drop operation. In a Constructor diagram. The functionality of the Delete are shown below.) Drag-and-Drop Operations Powersim Studio supports a wide range of drag-and-drop operations: Within a diagram ! ! An unmodified drag-and-drop operation usually moves the object(s). Dragging with the right mouse button produces a shortcut menu which lets you select the resulting operation. Exclude Variable will remove a variable symbol from the diagram without deleting the variable itself from the model.

When a model variable should still be present in the project but not in the current diagram. If you want to show the same variable in more than one place in a diagram. Click Details Window to open the Details Window. this command will be disabled. Click OK. Tip! When dragging between diagrams in the same view. Select the variable(s) you want to include from the dialog box. and select the shortcut menu. or 1. you can change diagram by hovering over the sheet tab. 3. Note! If all variables are already shown in the diagram. you can use the exclude capability. Select the variable to include in the tree. all its child variables. Click Include Variable (main button) on the toolbar. . 2. Dragging with the Ctrl key pressed results in a copy operation between the two components. or 1. 2. you cannot undo the deletion! The deleted variable. Exclude Variable on Delete a Variable Symbol Note! If you delete a variable (submodel) that has diagrams. Click in the diagram where you want to place the variable. create a Snapshot instead. and all its diagrams will be lost. and drop it where you want to place it. Click in the diagram. Right-click the variable you wish to exclude from the diagram.154 - . Include a Model Variable in a Diagram To include in the diagram a variable that is defined in the model: 1. 3. Exclude a Model Variable from a Diagram Excluding a variable symbol from a diagram doesn't delete the variable from the model.! the object to the target component. Click the arrow next to Include Variable on the Diagram toolbar and select the variable you want to include from the appearing list. To exclude a variable from the diagram without deleting it from the model itself: 1. Drag it onto the diagram. 2.

To remove the last variable symbol from your diagrams but still keep the variable in the model. 2. Select Delete on the Edit menu. Select the variable(s) that you want to exclude from the diagram. 1. Add parameters to the control by selecting them from the list. Note that other variables that received information from the deleted variable through a link will now have illegal definitions. the model variable itself will also be deleted from the model. Select the variable(s) that you want to delete from the model and diagram. 2. If you deleted a level that was connected to a flow. Right-click the variable (or one of the variables). Double-click the object. 1. All variable symbols representing the model will automatically be removed from all diagrams. 3. Select the Parameters tab. or Apply to save the changes without exiting the dialog box. or right-click it and select Properties on the shortcut menu.Using Delete Deleting a variable symbol using Delete causes the symbol to be removed from the diagram. and select Exclude Variable on the shortcut menu. If the symbol is the last symbol representing the model variable in ANY Constructor Diagram. Click OK to save the changes. Drag the variable onto the control. 4.155 - . Either: 1. 2. This operation must not be confused with the Link tool that is used to connect two variables. 1. table. or. a cloud will replace the level in the diagram. . 1. or hit Delete on the keyboard. right-click it and select Exclude Variable on the shortcut menu. or a button. Using Exclude Variable Excluding a variable symbol using Exclude Variable causes the symbol to be removed from the diagram. Using Delete Variable Deleting a variable using Delete Variable deletes the model variable itself in the model. Right-click the variable (or one of the variables). such as an auxiliary and a level. Link Variables to Powersim Controls There are two ways to link a variable to a dynamic control such as a graph. Select the variable(s) that you want to delete from the diagram. and select Exclude Variable on the shortcut menu. The model variable will not be deleted from the model. 2.

Select the object(s) you want to copy. Select the object(s) you want to copy. Click Copy.156 - Paste tool). The default name of a copy is Copy of <Original Name>. Select the object(s) you wish to copy by selecting them using the Shift will allow you to extend the selection). A copy of the object(s) will appear when you release the mouse button. hover over the sheet tab of the target diagram to change active diagram.Copy and Paste an Object To copy an object within or between diagrams: 1. To copy a selection of objects: 1. 3. This drag-and-drop operation is allowed between diagrams. A copy of the object(s) will appear. Pointer tool (holding down 2. Select the object(s) you want to cut from the diagram. Drag the object(s) to the desired position. Edit it as you like. select the target diagram now. Tip! You can achieve the same operation by dragging the object from one position to another. Drag the pasted objects to their correct positions. 4. . 2. Edit it as you like. 5. 2. and paste it there (usually using a . Copy an Area as a Picture You can easily copy an area in a diagram as a picture by either using Copy to copy a single object or a selection of objects. 2. 4. or use the shortcut Ctrl-C. 3. 5. both in the same component and in different components. Go to the file where you want to use the picture. Click Copy in the toolbar or on the Edit menu. The pasted objects will appear in the diagram. 6. If you want to paste the selection onto another diagram. The default name of a copy is 'Copy of <Original Name>'. 3. Cut and Paste an Object 1. Click Cut. Click Paste. If you want to paste the selection onto another diagram. or 1. select the new diagram. Click Paste. or by using Copy Area as Picture to copy an area of the diagram. Tip! When copying between diagrams. Drag the object(s) to their target position (either within or between diagrams or components) while pressing the Ctrl key.

Paste from Windows Clipboard Studio allows you to paste text and pictures directly from the Windows Clipboard and onto a Constructor Diagram. Select Select Special on the Edit menu. 5. rather than a picture. If you experience problems pasting these pictures using the ordinary paste command in the target application. Select Select All on the Edit menu. Excel. When you do this. a connector. Tip! If you use this method to copy and paste an object in Studio. Note! Pictures are copied from Studio in the Windows Enhanced Metafiles format (*. To select all objects in a diagram: 1.). Select Copy Area as Picture on the Diagram toolbar or menu. Select Objects in the Diagram 1. for example a variable. When it is selected. To copy an area of the diagram: 1. Switch to the application from which you want to copy an object (can be any application such as Notepad. and then specify the file format as Enhanced Metafile. Copy the object to insert. Go to the file where you want to use the picture. To select an object. The object will be pasted as a picture in the target application. or hit CTRL+A on the keyboard. Click the objects you wish to select while holding down the Shift key. To select all objects of a certain type in a diagram: 1. 4. 2. you will make a copy of it. etc. Word.The object will be pasted as a picture in the target application. . 3. Paintbrush. The area is copied as a picture as soon as you release the mouse button. To make a multiple selection: 1. or a Powersim control in order to modify or edit it in any way.157 - . you should try to select paste special. Switch to Powersim Studio again. Tip! Studio supports bitmaps and metafiles when pasting pictures and objects from the Windows Clipboard. Select the diagram in which you want to paste the object. 3. Powerpoint. 2. 1. the picture or text will be inserted in a new frame object using the default frame settings. You have to select an object. it will become highlighted. simply click it.emf). Click Paste (or hit Ctrl-V) to paste the object into the diagram. You can then format the frame in any way you wish. Drag out the area you wish to copy as a picture in the diagram. and paste it there (usually using a Paste tool).

2. Links and other connectors will be automatically updated. Click OK to select the specified objects. Use the Pointer tool to drag a rectangle around the objects you want to select. Note! On the property pages. Tip! To deselect an already selected object. To move an object within or between diagrams. Select Multiple Objects To perform the same operation on several objects. click it while holding down the Shift key. simply drag it to the desired position. 3. All objects completely encompassed by the rectangle are selected. only properties common to all the selected objects may be modified. Alignment and resizing operations are now dependent upon this object. Select Select All on the Edit menu to select all objects in a diagram. and None to uncheck all options. as illustrated below. Select Select Special on the Edit menu to select all objects of a certain type (or types) that you specify in the Select Special dialog box. or Cancel to exit the dialog box without selecting any objects. Click All to check all options in the dialog box. There are several ways of achieving this: ! ! ! ! Click each and every object while holding down shift. The object with solid handles is the dominant one. Move an Object 1. Select Dominant Object For resizing and alignment purposes you sometimes need to select one object as dominant within a multiple selection. 2.158 - . you first need to select all of them. Make a multiple selection. One object is automatically made dominant. All editing operations are now performed on the entire selection. 1. . just click it. If you want to make another object dominant. for instance formatting or moving. Select the type of objects you want to select in the Select Special dialog box.

Note! Deleting a variable symbol in a diagram causes the symbol AND the underlying variable to be removed from the model.0] designate the upper left corner of the diagram. Select the object(s) you wish to delete. Position an Object by Coordinates For accurate positioning of a diagram object: 1. Click the Symbol tab. Delete Diagram Objects 1. Tip! If you prefer another unit of measure. Hit Del on the keyboard. To reverse default Snap to Grid setting. 2. 2. hold down the Alt key.159 - . Select the variable and click Properties. Note! Coordinates [0. or right-click the object(s) and select Delete on the shortcut menu. In order to remove only the symbol from your diagram but keep the variable in the model. . change it from points (pt) to centimeters (cm) or inches (in). Enter the coordinates or click the arrows to adjust them. 3.The operation will also work between components. right-click the symbol and select Exclude on the shortcut menu.

There is also a set of accelerator keys (Ctrl. When a line is elbowed.and Shift) available. you can change the properties for individual nodes and segments. A segment can be either straight or curved. The choices are: Automatic. allowing you to modify the nodes and segments directly without right-clicking them. You can also change the appearance for the entire line by using the line operations available on the shortcut menu when you right-click a line. To reshape the line.Work with Nodes. As shown in the figure below. as shown below. it will override the settings of the adjacent node handles. If a segment is straight. Each segment of a line can also be individually adjusted. Smooth and Cusp. a line can be elbowed. flows and freeforms are represented by lines in the diagram. Each line can be divided by nodes into segments. Finally. in which case all segments are straight. A node has adjustment handles that can be used to alter the shape of the connector on both sides of it. it will override the adjustment handles of the adjacent nodes. Alt. You can also change the line into one straight or curved segment if you wish to. and all nodes are straight angles. flow or freeform. Symmetrical. You have two choices: Straight and Curved. If a segment is set to straight. all segments are straight. or you can freely arrange them yourself. The handles can be adjusted automatically. This is shown in the figure below. These line operations allow you to alter all nodes or segments of a line at the same time. A line (the entire line) can have elbow shape. Segments and Lines Links.160 - . These handles allow you to change the shape of the connector at both sides of the node. be it a link. and . each node has adjustment handles.

They will always be parallel. all the segments of the line will all be straight. When a node is moved. Smooth The control handles are changeable. If the segment is straight. . Types of Nodes Nodes are used to shape lines in the diagram. allowing you to control the appearance of the line's segments freely. (If you change the control handles. they can both have different directions and lengths. The table below summarizes the differences between the types. The difference lies in the degree of freedom you have when altering the control handles of the node. and both handles will have the same length. You can however change the type of the node by right-clicking it and selecting a new type on the shortcut menu. the node is automatically changed into a Symmetrical node. Cusp The control handles are changeable and totally independent of one another. The node ensures that the adjacent segments are smooth but not symmetrical at the node. making sure that the segment is always horizontal (or vertical).the nodes have no adjustment handles. the segments next to it are also moved correspondingly. the segment will be drawn as a straight line between the nodes. however. it will always be an Automatic node. The node allows you to create sharp bends between the adjacent segments. but they can have different lengths. Node Illustration Description Automatic Studio takes care of the layout of the curve automatically. In addition. controlled automatically by Studio. The node ensures that the adjacent segments are always symmetrical at the node. Symmetrical. They will always form a straight line. It will also affect the starting (or ending) point of the segment. Note! Only freeforms and flows can use the elbow style. There are two types of segments: Straight and Curved. the nodes will not only affect the position of the end (or start) of the segment. This is illustrated below. When you add a new node to a line. the control handles of the nodes can be used to shape the segment. If the segment is curved. Smooth and Cusp.161 - . There are four types of nodes: Automatic. Types of Segments Segments are the portion of a line that lies between two nodes. A node affects the shape of the segments next to it.) Symmetrical The control handles are changeable. If you have made an elbowed line.

Delete a Node 1. Segments can only be straight. Smooth. link. moving a node will automatically adjust the starting and ending nodes of a segment to ensure that the neighboring segments are always horizontal or vertical. Right-click the node.When a line is elbowed. ! ! ! ! Automatic nodes: You cannot control the control handles at all. Right-click the line (or one of the nodes) that you wish to change. Note! When the Elbow option is selected for a line. the functionality for segments and nodes are reduced. or freeform): 1. right-click it and select a new type on the shortcut menu. Symmetrical nodes: The control handles are always equally long and parallel. it will be an automatic node. Symmetrical. and select Line Operations on the shortcut menu. and alter its control points to shape the line the way you want.162 - . When a new To change the type of the node: 1. Change the Type of a Node There are four types of nodes: Automatic. it will always be an Automatic node. . Add Node on the Select the node. Add a Node To add a new node to a line segment (of a flow. The difference between the four different node types is mainly the amount of freedom you have when controlling the position of the control handles. Cusp nodes: The control handles can be adjusted completely independently from each other. Smooth nodes: The control handles must be parallel. If you wish to change the type of the node. Right-click the node you wish to change and select the new type on the shortcut menu. Note! When you add a new node. and select shortcut menu. and nodes must always have straight angles. node is added to a line. Change the Type of All Nodes of a Line To change the type of all nodes of a line: 1. and select Delete Node on the shortcut menu. but they may have different length. Right-click the segment where you want to create a new node. then select either All Nodes Automatic or All Nodes Cusp on the submenu. and Cusp.

Control handles appear for the two segments joined by the node. Right-click the segment you wish to change. Repeat the steps above for each node until the line has the desired shape. Change the Type of All Segments of a Line To change the type of all the segments of a line: 1. the entire segments joined . Select All Segments Straight or All Segments Curved on the submenu. Move the cursor over a node until it becomes the following shape: . all angles will be straight. You can also reshape the line by altering the control handles of the nodes rather than the position of the nodes: 1. 2.If the deleted node connected a straight and a curved segment. 2. To change the type of a segment: 1. making it easier to identify the segments of the line. Right-click the line you wish to alter. link. Select the line you wish to reshape. By changing the node type you can get more flexible segment joints. The nodes will appear on the line. and select Line Operations on the shortcut menu. Tip! Hitting Del while drawing a freeform. 3. The nodes will appear on the line. Select the line containing the segment you wish to alter. the resulting segment will become a curved segment. The nodes of the line will appear. To change the node type. will delete the last inserted node (except the start node). Drag a Line into a New Shape You can drag a line into a new shape by its nodes. and select the new type on the shortcut menu.163 - . Click and drag the control handles until the segment joint has the desired shape. 3. rightclick the node and select the new node type on the shortcut menu. 1. 2. or flow. Select a node on the line. and all segments will be straight as well. Make an Elbowed Line You can apply an elbow style to lines in your diagram. Change the Type of a Segment There are two types of segments: Straight and Curved. When a line is elbowed. When a node is moved. Click and drag the node to a new position. 4. Select the line you wish to reshape.

Instead of manually removing each node and finally reshaping the resulting segment to the desired shape. Change a Line into a Single Straight Segment Sometimes you might experience the need to convert a line with several nodes and segments into a straight line. Change a Line into a Single Curved Segment Sometimes you might experience the need to convert a line with several nodes and segments into a line with only one curved segment.164 - . To apply elbow style to a line: 1. You can have Studio automatically convert lines with several nodes and segments into a single curved segment. 1. Instead of manually editing the line. moving a node will automatically adjust the starting and ending nodes of a segment to ensure that the neighboring segments are always horizontal or vertical. Right-click the line you wish to convert. When a line is elbowed. the functionality for segments and nodes are reduced. Note! When the Elbow option is selected for a line. 1. Right-click the line you wish to make elbowed. and select Line Operations on the shortcut menu. you can let Studio take care of the conversion automatically. and select Line Operations on the shortcut menu. Select . Right-click the line you wish to convert. Select Single Curved Segment on the submenu. Note! Only freeforms and flows can use the elbow style. you can let Studio take care of the conversion automatically. and select Elbow on the shortcut menu. Segments can only be straight. and nodes must always have straight angles.by the node will be changed to retain straight angles and segments.

.165 - . You can have Studio automatically convert lines with several nodes and segments into a straight line.Single Straight Segment on the submenu.

all its child variables. The Details Window will display the variables that are child variables to the owner of the diagram. allowing more columns to be visible at the same time. the variable you select in the diagram will automatically be selected in the Details Window as well. The default position of the Details window is along the left side of the diagram window. only the child variables of the submodel will be shown. and will display a list containing all the variables of the current level of the model. The Details Window can be docked on the left side of the diagram window. Working with variables and definitions in the Details Window is identical to working with variables and definition in the Equations View. you cannot undo the deletion! The deleted variable. and define variables. You can also create. This makes the window extremely useful as a construction or debug facility. . If you're in a submodel.Work with the Details Window You can use the Details Window to inspect all the variables on the current level of your model. When the auto-synchronization option is enabled. If you are in the main diagram. and all its diagrams will be lost. Note! If you delete a variable (submodel) that has diagrams. the variables of the first level (child variables of the "root variable") will be shown.166 - . you can also dock the window at the top of the diagram window. The content of the Details Window can be auto-synchronized with the selection of the diagram. delete. If you wish. including their definitions and values.

but you can also place it at the top of the window. as illustrated below. Right-click the row of diagram tabs at the bottom of the diagram window. and select Details at… on the shortcut menu. and select Details at Top on the shortcut menu.167 - . Details The Details Window is shown (or hidden) in a column on the left-hand side of the variable window. 1. You can also dock it on the top of the window by right-clicking inside the view. and select Window on the shortcut menu. You can drag it to any desired width. makes the Details Window extremely useful for constructing and debugging models. Display the Details Window at Top The Details Window can be displayed at the left or at the top of the diagram window. Right-click inside the view. if you like. Select either Left or Top in the submenu.Show and Hide the Details Window 1. Click Toggle Details Window on the toolbar or on the View menu. . The Details Window appears on the left side of the Diagram Window by default. 2. Displaying the Details Window on the top of the diagram window and using the Auto-synchronize feature. or 1. Click Toggle Details Window on the toolbar or on the View menu to display the Details Window (if it is not already visible).

Displaying the Details Window on the top of the diagram window and using the Auto-synchronize feature. Details Window 1. you have a terrific design and debugging environment for your models! Auto-synchronize Details with Diagrams The Auto-synchronize Details with Diagrams option will automatically scroll the to the variable you selected in the diagram. Click Toggle Details Window on the toolbar or on the View menu to display the Details Window (if it is not already visible). When you select a variable in the diagram. 2. Tip! Hitting Alt-1 will automatically move focus to the Details Window. and select Auto-synchronize Details with Diagrams on the shortcut menu.168 - . Right-click inside the view. .When displaying the Details Window at the top of the diagram window and enabling the Autosynchronization feature. the same variable will be automatically selected in the Details Window. makes the Details Window extremely useful for constructing and debugging models. as illustrated below.

you have a terrific design and debugging environment for your models! .When displaying the Details Window at the top of the diagram window and enabling the Autosynchronization feature.169 - .

if you wish to. 2. which displays the current value of the variable. Auto reports can display either the current numeric value. it gets a default position close to the variable. 2. Select the arrow on dropdown list. and select Number Auto Report from the dropdown list. Each variable can only have one auto report associated with it. For arrays. or a time graph displaying the development of the variable over time. Select the arrow on Show Auto Report. position information and formatting is deleted with it. You can drag it to another position. and select Number Auto Report from the or 1. When the auto report is switched on the first time. Time graph auto report. the auto report is displayed as a table. Right-click the variable(s) that you want to show a number auto report for. 1. which displays the development of the variable's value over time as a graph. a table will be displayed. Select the variable(s) that you want to show a number auto report for. . You are also free to format it in any way you please. opposite from the variable name. Show a Number Auto Report A number auto report shows the current value of a variable as a number. A number auto report will be displayed opposite the name symbol of the selected variable(s). When the auto report is deleted. There are two types of auto reports: ! ! Number auto report. Show Auto Report.170 - .Work with Auto Reports An auto report displays the value of the variable it belongs to. Auto reports offer a flexible way of presenting simulation results. If the variable is an array.

In this case. and select Time Graph Auto Report from the drop-down list. . Select the arrow on Show Auto Report. all the formatting that you have applied to the auto report will also be deleted. A time graph auto report will be displayed opposite the name symbol of the selected variable(s). or 1. all formatting will still be preserved in your diagram. an auto report of the same type as the last inserted auto report is inserted automatically. you may want to temporarily hide an auto report from the diagram. For arrays. To delete the auto report permanently. 2. Select the arrow on Show Auto Report. and click Hide Auto Report on the toolbar Tip! To unhide the auto report. Tip! When you click Show Auto Report. and select Time Graph Auto Report from the drop-down list. click Delete Auto Report. an auto report of the same type as the last inserted auto report is inserted automatically. the auto report will be displayed as a collection of graphs. with one graph for each array dimension. You therefore have the option to hide and unhide auto reports. click Unhide Auto Report. Hide an Auto Report In some cases. Show a Time Graph Auto Report A time graph auto report shows the time series for a variable as a time graph.171 - . 1. A time graph auto report shows the value development of the variable over time. ! ! Right-click the belonging variable symbol. 2. Select the variable(s) that you want to show a number auto report for. Select the variable symbol in the diagram. and select Hide Auto Report on the shortcut menu. Right-click the variable(s) that you want to show a number auto report for. Tip! When you click Show Auto Report. If you delete the auto report entirely.The number auto report displays the current value of the variable.

and select the auto report type from the drop-down list. or 1. or 1. Right-click the variable symbol. Show Auto Report. and clicking Report. Powersim Studio will remember the position of an auto report if you hide it. Select the new auto report type from the drop-down list. and select Unhide Auto Report on the shortcut menu. Select the variable symbol in the diagram.172 - . and click Unhide Auto Report on the toolbar. it will reappear in the same relative position to the variable it belongs to as it had the last time it was displayed. you can unhide it. Its formatting and position will be preserved. Delete Auto Change Type of Auto Report To change the type of the auto report: 1. Right-click the auto report that you want to change. It will snap to the radial grid. and select the new auto report type from the shortcut menu. Simply drag the auto report object to the desired position. Tip! You can delete a hidden auto report by selecting the variable. and click the arrow next to shortcut menu. Tip! Turn off Snap to Radial Grid by holding down the Shift key. .Unhide an Auto Report If a variable symbol already has a hidden auto report associated with it. 1. The next time you turn it on. Select the variable symbol that you want to change the auto report type for. 2. on the Move and Position an Auto Report You can move an auto report around the symbol it belongs to. 2. Click the arrow on Show Auto Report. ! ! Right-click the belonging variable symbol.

and controls. and select Delete Auto Report on the shortcut menu. . frames. and rulers. Normal and Radial Grids The normal grid points are placed at regular intervals in the diagram. When the Snap to Grid option is switched on. Tip! Holding down the Alt key while working in the diagram reverses the current Snap to Grid setting. flows or freeforms. guides. it will appear with the same size and formatting as it had before it was hidden. such as links. Powersim Studio will remember the size of an auto report if you hide it. Note.Delete an Auto Report Note! When an auto report is deleted. all formatting is lost. you can fully control the alignment of objects on the diagram. Right-click the belonging variable symbol. When you unhide it. hold down Ctrl-Shift while drawing. The radial grid allows you to draw straight lines at regular angles. The regular grid is used to position diagram objects such as variable symbols. that the radial grid will not have any effect when drawing curved lines (obviously). If you wish. and click Delete Auto Report on the toolbar Size an Auto Report 1. you can both view the grid and define the vertical and horizontal distance between the grid points. Work with Grids and Guides Studio contains several features that makes it easy for you to lay out your model. and select Delete on the shortcut menu. To draw straight lines hold down the Ctrl key while drawing. new objects will snap to the grid points. Select the auto report that you want to size. If you wish to temporarily remove an auto report but keep its formatting.173 - . however. To draw straight lines at regular angles. Tip! Holding down the Shift key while working in the diagram reverses the current Snap to Radial Grid setting. you should use Hide Auto Report instead. Handles appear at the borders and corners of the auto report. By dragging the handles. There are several ways of deleting an auto report: ! ! ! Right-click the auto report. you can resize the auto report to any size you wish. In addition you can also use the built-in commands for alignment and spacing. By using grids. Select the belonging variable symbol in the diagram. 2.

and they also make it easier to add guides to your diagram. Show or Hide Rulers The rulers will appear on the left and on the top of your diagram. a guide will have precedence. Turn the Display of Grid On and Off You can show or hide the normal grid in the diagram: ! ! Select Grid on the View menu. Right-click the diagram. supporting you when you are designing your diagram. Tip! When the rulers are visible. To show (or hide) the rulers: ! ! Select Rulers on the View menu. Right-click the diagram (outside symbols or objects). and inside the vertical ruler for a vertical guide). Guides Guides are straight lines that you can use to align objects on the diagram. You use the Alt key to reverse the setting of the Snap to Guide setting. making the object snap to the guide rather than the grid. When used in combination with the regular grid. The setting will be saved for each diagram individually. Rulers make it easier to align objects properly with each other. and select Grid on the shortcut menu.174 - . and select Rulers on the shortcut menu. You can remove a guide from the diagram by dragging it back onto the corresponding ruler again. but this works in conjunction with the Snap to Grid setting in the following way: With Alt key Setting Snap to Grid Snap to Guides Snap to Grid Snap to Guides On Off Off Off On On Off Off Off On On Off Off Off On On Tip! When the rulers are visible you can easily add guides by clicking inside the corresponding ruler and drag a new guide onto the diagram area (click inside the horizontal ruler for a horizontal guide. and drag a new guide onto the diagram. You can insert both vertical and horizontal guides.Rulers You can turn on (and off) rulers for each diagram. . The position of the mouse pointer will be shown on the rulers. you can easily insert guides by clicking inside the ruler.

the permanent setting will be restored. When the button is pressed. The permanent setting will be restored when you release the Alt key. the state of the Snap to Guides button shows whether snapping is turned of or not. You can temporarily reverse the setting of the Snap to normal grid option by holding down the Alt key while working. Right-click the diagram. You can temporarily reverse the snap to radial grid by holding down the Shift key while working. Select (or deselect) the Snap to normal grid option on the Grid Settings property page to turn snapping on (or off). The property page is available by right-clicking the diagram and selecting Diagram Settings on the shortcut menu. Right-click the diagram (outside objects or symbols) and select Snap to Normal Grid on the shortcut menu. 2. To permanently turn the radial grid on (or off): 1. Turn Snap to Radial Grid On or Off The radial grid allows you to draw straight lines at a given angle.Turn the Display of Guides On or Off You can show or hide guides in the diagram: ! ! Select Guides on the View menu. Note! The Alt key will also temporarily affect the Snap to guide setting. You can of course snap to guides even though they are not visible in the diagram. To turn on (or off) snapping to the normal grid: ! ! ! Click Snap to Normal Grid on the Layout toolbar or menu. Turn Snap to Guides On or Off There are several ways to permanently turn snapping to guides on or off. Right-click the diagram (outside symbols or objects). Turn Snap to Normal Grid On and Off There are several ways to permanently turn snapping to the normal grid on or off. and select Diagram Settings on the shortcut menu. as specified in the radial grid settings. 3. When the button is . snapping is turned on. the state of the Snap to Normal Grid button shows whether snapping is turned off or not. Select Snap to radial grid to turn the radial grid on (or deselect it to turn the radial grid off). On toolbars and menus. Click Grid Settings. On toolbars and menus. and select Guides on the shortcut menu. When you release the Shift key. The effect will vary according to the permanent setting of the two options.175 - .

sorted by orientation. Likewise.176 - . ! Lock a guide by clicking ! Delete the selected guide by clicking Delete. Right-click the diagram (outside objects or symbols) and select Snap to Guides on the shortcut menu. You can temporarily reverse the setting of the Snap to Guides option by holding down the Alt key while working. or deselect it to turn snapping off. To turn on (or off) snapping to guides: ! ! ! Click Snap to Guides on the Layout toolbar or menu. Points (pt). 4. Set the spacing of the horizontal and vertical grid lines. 2. Click OK to save the changes. Click the Grid Settings tab. Click the Guide Settings tab. 5. 3. The effect will vary according to the permanent setting of the two options.0cm) designate the top lefthand corner of the diagram window). or Apply to save the changes without closing the dialog box. Select Diagram Settings on the Diagram menu. Note! The Alt key will also temporarily affect the Snap to Grid setting. Select the Snap to radial grid option to turn snapping to the radial grid on. 2. holding down Shift will reverse the Snap to radial grid setting. Select the Snap to normal grid option to turn snapping to the normal grid on. Tip! You can temporarily reverse the Snap to normal grid setting by holding down Alt while working. . ! Delete all the guides in a list box by clicking Delete All. and inches (in) are allowed units. Set the step angle for the radial grid using the Angle box. 3. You can: ! Add new guides by clicking New. Lock. or deselect it to turn snapping off. Set the offset angle (the offset from a horizontal line) of the radial grid using the Offset angle box. Alter the settings of the normal grid: 1. centimeters (cm). The property page is available by right-clicking the diagram and selecting Diagram Settings on the shortcut menu. 3. Set the coordinates of the grid's starting point (the coordinates (0cm. Select Diagram Settings on the Diagram menu. The permanent setting will be restored when you release the Alt key. Alter the settings of the radial grid: 1. Select (or deselect) the Snap to guides option on the Guide Settings property page to turn snapping on (or off). 2. Change Guide Settings 1. 3.pressed. Change Grid Settings 1. snapping is turned on. The guides are listed in two dialog boxes. 2.

177 - . Centimeter (cm). To insert a vertical guide. Click Guide Settings. and select Diagram Settings on the shortcut menu. The effect is. The table below summarizes the behavior of holding down the Alt key for the various combination of the two options. 3. Repeat steps 3 to 5 to create as many guides as you need. To insert a horizontal guide. If you wish to lock the guide in position. 4. Valid units are Point (pt). 5. Right-click the diagram (outside symbols or objects). ! You can temporarily reverse the Snap to guides setting by holding down Alt while working. 2. When a guide is locked. or by right-clicking in the diagram and selecting Rulers on the shortcut menu. you can move it by drag and drop: . Move Guides If the guide is not locked on the property page. Inserting a vertical guide is achieved by clicking inside the vertical ruler and dragging a new guide to the desired position in the diagram. then display them by selecting Rulers on the View menu. You may insert guides on the Guide Settings property page as well: 1. If rulers are not displayed. and Inches (in). click Lock. 7. 3. or click Apply to save the changes without closing the dialog box. 6.Hit F2 to enter a new position for the selected guide. Enter the position of the guide. 2. Click OK to save the changes. Select (or deselect) the Snap to guides option to turn snapping to guides on (or off). you cannot move it by drag and drop in the diagram. Insert guides by clicking New in the appropriate list box (Vertical for vertical guides and Horizontal for horizontal guides). however. or click Apply to save the changes without closing the dialog box. 4. With Alt key Setting Snap to Grid Snap to Guides Snap to Grid Snap to Guides On Off Off Off On On Off Off Off On On Off Off Off On On Insert Guides You may insert horizontal and vertical guides in the diagram window by drag and drop: 1. click inside the vertical ruler and drag a new guide onto the diagram area. 5. click inside the horizontal ruler and drag a new guide onto the diagram area. Click OK to save the changes. dependent on the setting of the Snap to normal grid option.

drag it beyond the top edge of the diagram and drop it. 2. select it in the Vertical list. and drag it to its new position. 3. Move the mouse pointer over the guide you wish to delete. Click Guide Settings. Right-click the diagram (outside any symbols or objects). Hit F2 and enter the new position of the guide. 2. . and select Diagram Settings on the shortcut menu. Click the guide. You can also move the guide on the Grid Settings property page: 1. To remove a vertical guide. and click Delete. 4. select it in the Horizontal list. drag it beyond the left edge of the diagram and drop it. Point to the guide. 3. or click Apply to save changes without closing the dialog box. and click Delete. 4. Click the Guide Settings tab. Drag the guide out of the diagram by drag and drop: ! If the guide is horizontal. Click Delete All to delete all the guides in the list. . depending on the orientation of the guide. Select the guide you wish to move. Right-click the diagram (outside symbols or objects). ! If the guide is vertical. Delete Guides To delete a guide from the diagram: 1. To remove a horizontal guide.1. The cursor will change into one of these cursors: . Click OK to save the changes. 5. 2. The mouse cursor changes to 2. Click Delete All to delete all the guides in the list. 6.178 - . You can also delete guides on the Guide Setting property page: 1. and select Diagram Settings on the shortcut menu. Tip! You can turn off the display of guides and turn guide snapping off if you wish to disable guides without deleting them from the project. Repeat steps 3 and 4 for all guides you wish to reposition.

or right-click the object and select shortcut menu. 2. Format Several Objects in One Operation You can apply the same format to many objects in one operation. 1. To access these: 1. like a name box) explicitly to gain access to the characteristic you want to change. Tip! Many of an objects' properties can also be set on the shortcut menu or by using toolbar buttons.or part of the object . You will see all accessible property pages in the dialog box. Select all diagram objects whose attributes you want to edit. only the property pages that all the objects have in common will be accessible. not all can necessarily be edited. or 1. Select all diagram objects whose attributes you want to edit. Note! When you define properties for many objects simultaneously. Select the object you wish to edit. 2. for example change the color or border width. Double-click the object you wish to modify. 2. Although all attributes of an object are shown. Select Properties on the toolbar.179 - . Right-click the object . Click Properties in the toolbar. or 1. Use the formatting options available on shortcut menus and toolbars to format the objects. . Properties on the or 1. Sometimes you have to select an object (or an object's sub-object. and hit Alt-Enter on your keyboard.Work with Object Properties The properties of an object are accessible on the object's Property Pages. Select the diagram object(s) whose properties you want to edit.to see what is available on the shortcut menu.

and select a new color. Format the Diagram Background You can format the diagram background of each diagram in your workbook individually. Solid Color. click the arrow in Font Color. To select the color previously selected. To use a picture fill: 1. To underline text. and select .180 - Properties on the shortcut menu. To make italics. variable symbols. click Font Color. or Pattern. You can select between No Fill. To right align text. bold. frames. Tip! You can remove underline. To justify text. Alternatively. Use Picture Fills for Objects You are allowed to use picture fills for all objects that has the Fill Property Page. click Underline. . Most of the text formatting options are available on the Format toolbar. Select the fill type and colors on the Fill property page. or Apply to save the changes without exiting the dialog box. or italic formatting by clicking the button once again. select the font you want in the Font box. To center text. click Italic. ! ! ! ! ! ! ! ! ! ! ! To change font. To change font size. Note! The background color of the diagram is ignored when you print your diagram. Click the Fill tab. click Align Left. To make the text bold. click Align Right. To left align the text. use the Font Size drop-down box. You must first select the object(s) you wish to format. click Justify. To select a color. presentation controls. To format the diagram background: ! ! ! ! Click Diagram Settings on the toolbar or on the Diagram menu. etc. click Center. Click OK to save the changes.Format Text You can format the text of several objects or sub-objects in Studio. Right-click the object you wish to format. click Bold. you can use the Font property page in the Properties dialog box.

click the object while pressing the Ctrl key. To make a selection with a dominant symbol. There are several ways of selecting a picture: ! Select a previously used picture in the Resource list. including the object you want to be dominant. 8. Click the Fill tab. and Enhanced Metafile (*. or click Apply to save the changes without closing the dialog box. Click Align Bottom Edges to align to the bottom edge. or you can customize the rotation freely on the Symbol property page. 2. you can rename it in the Resource list. 4. means placing them relative to one object with which you want to align the rest. Select Picture under Type. 6. Click Align Right Edges to align to the right edge. Click Align Vertical Centers to align objects centered vertically. Click Select Picture… You select the picture to use in the Select Picture dialog box. 3. Click Align Left Edges to align to the left edge. 5.emf). If the desired object is not dominant (e.wmf). in most cases. another symbol has filled handles).bmp). Rotate Diagram Objects You can rotate objects in your diagram. ! Click Paste to paste an image from the Windows Clipboard. This object is called the dominant object. Click OK to return to the Fill Property Page. ! ! ! ! ! ! Click Align Top Edges to align the top edges of the selected objects to the top edge of the dominant one. If you insert the picture from a file or from the Clipboard. and will have filled (not hollow) selection handles. Click Align Horizontal Centers to align the objects centered horizontally. Selection with dominant object All alignment commands are found on the Layout toolbar and menu.g. . 1. You can use one of four preset rotations. Click OK to save the changes.181 - . Align Diagram Objects Aligning objects. Studio currently supports three picture formats: Windows Bitmap (*. ! Click Browse to open an image file from a file location. Windows Metafile (*. Select all the objects to be aligned.2. 7.

Space Evenly The objects will be spaced evenly across the boundaries of the selection. 4. Click the Symbol tab. Selection with dominant object All alignment commands are found on the Layout toolbar and menu. 2. Click Rotate Right to rotate the object(s) 90° to the right. 1. This object is called the dominant object. Click OK to save the changes. Click Space Evenly Across to space evenly along the horizontal axis or Down to space vertically. Click Flip Vertical to flip the object(s) vertically. Select the objects to be evenly spaced in the diagram. 2.182 - . . You find the four rotation commands on the Symbol toolbar. The number must be an integer between -359 and 359. or right-click the frame and select Properties on the shortcut menu. To make a selection with a dominant symbol. click the object while pressing the Ctrl key. 2. Space Diagram Objects 1. including the object you want to be dominant. To rotate the object(s) using the Symbol property page: 1. Tip! The commands are available on both the Layout menu and toolbar.Note! It is currently only frames that support rotation in Constructor diagrams. Click Flip Horizontal to flip the object(s) horizontally (mirror them). 5. another symbol has filled handles). Click Properties on the toolbar. or click Apply to save the changes without exiting the dialog box. 3. Select all the objects to resize. Select the frame(s) you wish to rotate. Enter the new rotation angle in the Rotation box on the property page. To use them: ! ! ! ! ! Select the object(s) you wish to rotate. Click Rotate Left to rotate the object(s) 90° to the left. and will have filled (not hollow) selection handles.g. Make Diagram Objects Same Size You can resize a selection of objects to the same size as an object of your choice. If the desired object is not dominant (e.

183 - . Note! Coordinates [0. Enter the exact position of the symbol under the Symbol tab of the Property pages. Move the pointer over one of the handles that appear on the edges of the object. Position Objects Objects and symbols can be positioned in different ways. Or: 1. Resize a Multiple Selection To make all selected objects the same size: 1. Or: 1. 1. Tip! To determine the size in centimeters or inches. specify a new width and height under Width and Height respectively. Select the object and drag it to its new position in the diagram. 2. Select the object you want to resize. Select the objects and click Properties on the toolbar. Resize an Object 1. 2. On the Symbol tab. 2. Use the handles of the dominant object to resize the selection. Select the object(s) and click Properties on the toolbar. Drag the handle to achieve the desired size. specify a new width and height under Width and Height respectively. Tip! Reverse the default Snap to Grid setting by holding down the Alt key while resizing. Make Same Height to make the objects the same height as the dominant object. 2. Press Ctrl to change the point from where the object is resized .! ! ! Click Click Click Make Same Width to make the objects the same width as the dominant object. See also the various specialized commands for aligning. Select one or more objects and click Properties. . spacing and moving objects. Make Same Size to make the objects the same size as the dominant object.from the center or from the corner. 2. replace 'pt' (points) with 'cm' or 'in'. To change the size of several objects without disturbing the relative size difference: 1.0] designate the upper left corner of the diagram. Select the objects to be resized. On the Symbol tab.

Select the object and click Properties. Change Object Color and Shape To change the fill color of an object: You can use the Format toolbar to change the fill color of the objects you have select. ! ! ! Click the arrow in Fill Color and select the fill color you wish. Thus. Set line style. Click the arrow in Line Style and select the line style you wish. Tip! To give several objects the same line or border color.184 - . Click Line Color to apply the same line color as was used the last time (the color is indicated on the button). click the Line tab. Click the arrow in Shape Type and select the shape you wish. It will be applied to the selected . Change Line Style and Color You can use the Format toolbar to change the line style and color of the objects you have selected.Resizing a multiple selection The objects will now be resized relative to the dominant one. Click Fill Color to apply the same fill color as was used the last time (the color is indicated on the button). select them all before going to the property pages. It will be applied to the selected object(s). It will be applied to the selected object(s). Click the arrow in Dash Style and select the dash style you wish. ! ! ! ! ! ! Click the arrow in Line Color and select the line color you wish. dash style. Click Line Style to apply the same line style as was used the last time. Click Dash Style to apply the same line style as was used the last time. It will be applied to the selected object(s). color and width to be applied to the selected object(s) and click Apply or OK. you can use the Properties dialog box: 1. On the property pages. if the width of the dominant object is increased by 60%. so will the width of the other objects. 2. Alternatively. It will be applied to the selected object(s). Note that all objects have minimum and maximum sizes. 3.

185 - . click the Fill tab. Select the object and click Properties. Select a color and click OK. Tip! To format several objects at the same time. 3. 1. Click Shape Type to apply the same shape as was used the last time.! object(s). . select them all before assigning the formatting. On the Property pages. 2. You can also use the Properties dialog box to change the fill color.

or be transparent. and you can also use them to create causal-loop diagrams. These can be used in combination with frames and lines to create visually stunning simulator interfaces.186 - . The Constructor diagram lets you fully control the order in which the objects appear in the diagram. You can fully customize the appearance of freeforms and frames. A frame can thereby form the background for other frames or forms. Hyperlinks and Bookmarks Freeforms and frames allow you to include notes. You can create visual user interfaces using them. Hyperlinks and bookmarks allow you to create hyperlink jumps inside your simulation project.Work with Freeforms. This name is used when you jump to it from a hyperlink. you must assign a unique name for it within the component. When you define a bookmark. you can choose whether it should have extent or not (see illustration below). A bookmark with extent (left) and without extent (right). patterns. You can also specify whether the bookmark should be . images. Frames. or they can simply be used to separate your model into different sections. Lines can have arrows at one or both ends. and you can fully customize the appearance of these arrowheads and -tails. About Bookmarks Bookmarks are used to defined target locations for hyperlinks. When you insert a bookmark in your diagram. You can format the objects to suit your needs. and illustrations based upon these in your diagrams. Frames can be filled with a solid color. arrows.

When used in combination with hyperlinks. Simply enter the web address to be used. are always unambiguous. and can be defined with relative addresses. When the hyperlink is clicked. Relative hyperlinks can only point to information that is unambiguously identified relative to the location of the hyperlink itself. you cannot create relative hyperlinks that lead from a shared diagram to a private diagram.they are more effective for the latter two. To gain full advantage of the hyperlink.187 - . Thus. If you need to create a . a new e-mail message is created using the computer's default mail setup. such as 'www. you are ensured that the link will always lead to a target within the current simulation only. Relative Versus Absolute Addresses When you specify a hyperlink target. the hyperlink target would not exist. Any bookmark in any diagram. because the private diagrams are dependent on the simulation they exist in. However. you can also allow Studio to automatically zoom the area within the bookmark when it is visited. Using hyperlinks. you can jump to: ! ! ! ! ! Runs and diagrams in Studio. As an example. the file will be launched using the default program. A file. If the bookmark has extent. This ensures that all jumps made using these hyperlinks will always be within the current simulation. when the shared diagram is opened in another simulation. The component contains a diagram book that is shared by all the simulations belonging to the component. if you select an html-file. you will not be able to use the hyperlink by clicking it. bookmarks offer an excellent way of navigating in simulation projects. while each simulation itself may contain one or more exclusive private diagrams. User. and Presentation . You should be aware that when Studio is in Design Mode. About Hyperlinks Hyperlinks constitute a way of jumping between various locations in your simulation project.Design. It is only your own imagination that limits the potential of such simulator interfaces. it accepts a lot of other locations as well. you can create image maps as simulator interfaces. as this will only select the hyperlink (and/or the text inside it). When combined with bookmarks and frames with picture fills. you should switch to User or Presentation Mode. or from a private diagram to a shared diagram. it will be opened in the default web browser. When you use relative addresses. from one private diagram to another.powersim. All hyperlinks leading from one shared diagram to another. Although hyperlinks can be used in all view modes . A web page on the Internet. you must right-click the hyperlink object and select Open on the shortcut menu. When the hyperlink is clicked. To open the hyperlink in Design Mode. An e-mail address.com'. Available Targets Although bookmarks will in many cases be the target location for a hyperlink. you can select whether the address should be relative or absolute. There are two types of diagrams in a simulation.centered on the page when visited.

Click Frame. 2. Creating absolute hyperlinks from a shared diagram to a private diagram within a simulation is not recommended. Hence. to any other diagram within the simulation project. Tip! When you have created a frame. Add a Frame To create a frame with the previously selected (or default) shape: 1. you must use absolute hyperlinks. Click the arrow in next to Frame. Drag the frame to the desired size and position in your diagram. Hit Ctrl-Enter to create a line shift. In this case. Drag the frame to the desired size and position in your diagram.188 - . The pasted text will be inserted in a new frame in the diagram using the default frame properties. The frame snaps to the grid if it is turned on. 2. press Alt while dragging. you can change its shape by clicking the Format toolbar. you must use absolute links. we recommend that you create a separate component for this homepage. Hit F2 to edit the text of a frame. and select the new shape from the drop-down list. To create a frame with a different shape: 1. To temporarily reverse the grid setting. you can jump from any diagram within any component and simulation. by using absolute hyperlink targets. Start typing the text. Shape Type on Tip! You can also paste text directly from the Clipboard and onto your diagram. to avoid cross-linking between various simulations within the same component. If you are creating a "global homepage" for a simulator that allows your simulation users to select a given simulation or component. 3. To add text to a frame: 1. The text can be formatted on the Format toolbar.hyperlink from a shared diagram to a private diagram. and select the new shape from the drop-down list. and select the shape you want. you can change its shape by clicking the Format toolbar. Shape Type on Add Text to a Frame A frame in Studio can contain text. Absolute hyperlink targets make reference to a unique identifier within the simulation project itself. but the would inevitably lead to one particular private diagram in one of these simulations. Select the frame you want to add text to. the link would appear in all simulations. Hit Enter to stop typing. . If you later add more simulations. 2. Tip! When you have created a frame.

and select Properties on the shortcut menu to define the . you can rename it in the Resource list. Drag the bookmark to the desired size and position in your diagram.emf). There are three ways of selecting a picture in the Select Resource dialog box: ! If the picture has been used previously in the project. is to simply paste it into Studio. 2. 3. Studio will then automatically create a new frame. Click OK to return to the Fill Property Page. or Apply to save the changes without closing the dialog box. 6. Studio currently supports three picture formats: Windows Bitmap (*. you can manually create a frame and add the picture fill by following the steps below. Right-click the frame you want to add a picture to. Click Bookmark.wmf). ! Click Paste to paste an image from the Windows Clipboard. To create a bookmark with extent: 1. 2. you make it easier to identify it when you are creating hyperlinks to it. Click OK to save the changes. and select Properties on the shortcut menu. and add the picture as the fill of the frame. you can turn it off in the Properties dialog box. To create a bookmark without extent 1. and Enhanced Metafile (*. Windows Metafile (*.bmp). Click Select Picture…. Right-click the new bookmark. Right-click the new bookmark. Click once where you would like to place the bookmark. you can select it in the Resource list in the dialog box. 5.189 - . Select Picture under Type.Add a Picture to a Frame A frame in Studio can contain a picture fill. Note! If the bookmark has extent after you have created it. 8. 7. 1. 3. 2. 3. Tip! By giving the bookmark an intuitive name. If you insert the picture from a file or from the Clipboard. 4. Alternatively. and select Properties on the shortcut menu to define the bookmark. Click Bookmark. The easiest way of adding a picture to a frame. Select the Fill tab. ! Click Browse to open an image file from a file location. Add a Bookmark Bookmarks can be used as hyperlink targets when you create user interfaces for your simulation model.

bookmark.
The bookmark snaps to the grid if it is turned on. To temporarily reverse the grid setting, press Alt
while dragging.
If the bookmark has extent, it will be drawn using a dotted line to show its area. This line will
disappear when the diagram is switched to User or Presentation Mode.
Zooming and centering a bookmark when it is visited
You can have Studio automatically center the bookmark when it is visited. If the bookmark has
extent, you can also make Studio automatically zoom the diagram to fit the bookmark within the
visible area of your screen when it is opened.
1. Double-click the bookmark you wish to alter, or right-click it and select
Properties on the
shortcut menu.
2. Select Center bookmark when visited to automatically center the bookmark.
3. Select Zoom bookmark when visited to automatically zoom the bookmark.
4. Click OK to save the changes, or click Apply to save the changes without closing the dialog box.

Add a Hyperlink
Hyperlinks are used to create user interfaces for your simulations. You can use hyperlinks in
combination with bookmarks and frames to create user interfaces that are intuitive and straightforward to use.
1.
2.
3.
4.
5.

Click
Hyperlink.
Drag the hyperlink object to the desired size and position in your diagram.
Type the text that should appear on the hyperlink (you can start typing immediately).
Right-click the hyperlink, and select Edit Hyperlink on the shortcut menu.
Select the link you wish to make under Link to. Options are Target this project, Web page, File,
and E-mail address.
6. Select the target of the hyperlink under Address. If you wish to make an absolute link to a target
in the current simulation project, deselect the Relative option, and select the target in the treeview
below.
7. Click OK to save your selections.

When you have inserted the hyperlink, it appears transparent and with no line. You can format it
visually in the same way as you can format a frame, except that you cannot change the shape of it.
You can select it by clicking the text or dragging out an area around it.
Note! Be careful when you are using absolute hyperlinks, so that you avoid cross-simulation
links. When creating user interfaces for simulations, it is recommended that you use only
relative links, since relative links will always provide jumps within the same simulation only.
The exception is when you are creating global homepages where the user is intended to select
between several available simulations (in which case it is a good idea to create these
homepages in separate components).

- 190 -

Create Hyperlinks without Text
To create a hyperlink without text:
1.
2.
3.
4.
5.

Click
Hyperlink.
Drag the hyperlink object to the desired size and position in your diagram.
Select the text and delete it.
Right-click the hyperlink, and select Edit Hyperlink on the shortcut menu.
Select the link you wish to make under Link to. Options are Target in this project, Web page, File,
and E-mail address.
6. Select the target of the hyperlink under Address. If you wish to make a absolute link to a target in
the current simulation project, deselect the Relative option, and select the target in the treeview
below.
7. Click OK to save your selections.

When you have deleted the text from the hyperlink, the surrounding area of the hyperlink will be
drawn using a dotted line instead of a transparent line. This is to make it easier for you to see where
the hyperlink is and the area it covers. When you switch the diagram to either User or Presentation
Mode, the dotted line will automatically disappear.
Note! Be careful when you are using absolute hyperlinks, so that you avoid cross-simulation
links. When creating user interfaces for simulations, it is recommended that you use only
relative links, since relative links will always provide jumps within the same simulation only.
The exception is when you are creating global homepages where the user is intended to select
between several available simulations (in which case it is a good idea to create these
homepages in separate components).

Open a Hyperlink
How to open (sometimes called visit or jump to) a hyperlink depends on the mode you are working in.
To open a hyperlink in Design Mode:
1. Right-click the link that you wish to open.
2. Select Open on the shortcut menu if you want to open the hyperlink in the current window, or
select Open in New Window if you want to open the hyperlink in the current window.
To open a hyperlink in User or Presentation Mode:
1. Simply click the hyperlink that you wish to open.

Resize a Frame to Fit a Picture
A frame in Studio can contain a picture. However, if the frame is larger or smaller than the picture
shown inside it, the picture will be stretched to fit the frame. You can resize the frame to fit the
picture:
1. Right-click the frame you want to resize, and select

- 191 -

Fit to Picture.

Tip! You can paste a picture directly from the Windows Clipboard and onto your diagram. A
new frame with the picture as picture fill will be automatically created.

Use a Frame as Background
When creating model diagrams, you will often have the need to use a frame as a background for other
symbols and controls. However, when a frame is positioned in the background of other objects, it is
difficult to perform a multiple selection inside the frame. To solve this, you can specify that the
selected frame is used as a background:
1. Right-click the frame you wish to use as a background, and select Use as Background on the
shortcut menu.
Note! When a frame is used as background, you can only select it by clicking its border.
When the Use as Background option is selected for a frame, it behaves in the same way as if its
interior fill is specified as No Fill.

Select a Transparent Frame
If a frame is transparent (the No Fill option is selected on the Fill Property Page), the frame can only
be selected by clicking its frame. You must click the frame itself (or within a distance of a few pixels
to either side) in order to change the properties of the frame. This allows a frame to act as a
background for other objects (such as variables and controls) in your diagram.

When selecting a transparent frame, you must click the border directly (or within a few pixels
distance to each side).
Note! If you select the Use as Background option on the shortcut menu of a frame, you can
force a filled frame to behave in the same way as a transparent frame.

Draw a Freeform Line
1. Click Open Freeform.
2. Click where you want the line to start.
3. While you drag the line towards its end position, you can click to add nodes and divide the line
into segments.
4. Drag the line to the end position and click to complete the line.
The line snaps to the normal grid setting if it is turned on. You can reverse the setting by pressing
Alt.

- 192 -

Tip! You can add arrowheads or -tails to the freeform. Double-click the freeform, and specify
the arrows you like on the Arrowheads property page in the Properties dialog box.

Reshape a Freeform
Reshaping a freeform line is identical to reshaping a link. When you select the line, the nodes appear.
Use the nodes and their adjustment handles to reshape the freeform line.

The various segments that make up a freeform line are divided by nodes. Each node can be formatted.
Tip! You can change the line style, dash style, and line color of the freeform line.

Create Image Maps
Many pages on the internet uses image maps to create visually stunning user interfaces. Now you can
also create image maps inside your simulation project, should you wish to. The procedure below
explains how to create an image map using frames with picture fill, hyperlinks with no text and target
bookmarks. The procedure assumes that you have an image located on your disk that you want to use
as an image map background.
1. Insert one bookmark for each of the target locations you want your image map to point to. Name
them in an intuitive manner to make it easy to identify the targets when creating hyperlinks.
2. Select the diagram in which you want to create an image map. If necessary, inset a new diagram
by right-clicking the diagram tabs at the bottom of the diagram book, and select
Insert
Constructor Diagram.
3. Insert a frame in your diagram by clicking Frame and dragging the frame to about the correct
size.
4. Right-click the new frame, and select the
Properties on the shortcut menu.
5. Click the Fill tab, and select Picture under Type. Click Select Picture to select a picture to use as
picture fill. The Select Resource dialog box allows you to either browse for the image or to paste
it from the Windows Clipboard. When you're finished, click OK to save the changes.
6. If the size of the frame is not properly adjusted to fit the picture, right-click the frame, and select
Fit to Picture on the shortcut menu. This will resize the frame to fit the exact size of the
picture.
7. Right-click the frame again, and select Use as Background on the shortcut menu. When this
option is selected, the frame can only be selected by clicking the frame border. This makes it
easier to place other objects on top of it and prevents you from accidentally selecting the frame.
8. Click
Hyperlink and create a new hyperlink inside the picture frame. Adjust the position and
size of the hyperlink until it covers the area for which you wish to create a hyperlink jump.
9. Select the text of the hyperlink and delete it.
10. Define the destination of the hyperlink by right-clicking it and selecting
Properties on the
shortcut menu, and selecting the appropriate destination in the Location box.

- 193 -

11. Repeat steps 8 to 10 until you have defined all the necessary hyperlink spots on the image map.
12. Switch to User or Presentation Mode to test the image map.
Tip! You can also test the image map by right-clicking the hyperlinks and selecting Open on
the shortcut menu.

Change Arrowheads or -tails on Freeform Lines
When you draw a freeform line, it is always drawn with a default arrowhead. To change the
arrowhead or -tail:
1. Double-click the freeform you wish to alter, or right-click it and select
Properties on the
shortcut menu.
2. Select the Arrowheads tab.
3. Specify the styles and size of the arrow on the property page.
4. Click OK to save the changes, or Apply to save the changes without exiting the dialog box.
Tip! You can also change the line style, dash style, and line color of the freeform line.

Change the Order of Freeforms
You can change the order of the objects on the diagram by using the Layout toolbar. An object can be
sent to the back of the stack, to the front, or be moved step-wise through the stack in both directions.
!
!
!
!

Click
Click
Click
Click

Bring Forward on the Layout toolbar.
Send Backward on the Layout toolbar.
Bring to Front on the Layout toolbar.
Send to Back on the Layout toolbar.

Delete a Hyperlink
To delete a hyperlink:
1. Right-click the hyperlink you wish to delete, and select

Delete on the shortcut menu.

Tip! If the hyperlink is transparent and doesn't have a borderline, it might be difficult to select
it. If the hyperlink is not previously selected, right-clicking the text should select the hyperlink
and bring up the correct shortcut menu. If the hyperlink is already selected, it is better to rightclick the surrounding border instead.

- 194 -

Delete a Bookmark
To delete a bookmark:
1. Right-click the bookmark and select

Delete on the shortcut menu.

or
1. Select the bookmark you wish to delete.
2. Hit Del on your keyboard to delete the bookmark.
Note! You should carefully check your project for broken hyperlinks when deleting bookmarks.

- 195 -

Work with Zooming
Studio allows you to zoom a diagram in and out as you like. All the various zoom options are
available on the View menu and in the Zoom dialog box on the View menu. You can zoom by using a
selection, specifying a zoom percentage, or fit the full diagram in the current view.
Note! When zooming a diagram, all objects will become larger. To individually resize objects,
resize the object in question instead of zooming the diagram.

Zoom a Diagram
For a closer or more remote view of the diagram, zoom in on or out of it.
1. On the Layout toolbar, click

Zoom

2. Select zoom ratio from the drop-down list, or type in any zoom ratio between 7% and 400%.
Note! If you magnified the diagram, you may have to use the scroll bars in order to find the
part that you wanted to have a closer look at.

Zoom a Selection
For a closer or more remote view of a selected part of the diagram:
1. Click Zoom.
2. Drag an outline around the area you wish to zoom.
When you release the mouse button, the area you selected will be magnified to fit the view.

- 196 -

Zoom to Fit Diagram in View
You can fit the entire diagram into the current view:
1. Click

Zoom to Fit.

The entire diagram will be fitted within the current view, provided it is room for it there with at least a
magnification of 7%.

- 197 -

Work with Simulations
You define the simulation settings in two places. Project Settings apply to all the components in a
project, while Simulation Settings apply to one component only.
Project Settings
Under Project Settings you control which calendars should be available in the project, and the time
unit that will be used by default (also referred to as the preferred time unit). The available calendars
will influence on what time units are available in the project (as the definition for month, quarter, and
year differ between the three calendars). Only the Bank calendar is available by default.
The preferred time unit will always be used when presenting time intervals (points in time such as
dates) in Studio. A good example of this is the time step, which you find in the Simulation Settings
dialog box. The time step is always formatted using the preferred time unit, and if you enter only a
number (without a unit), it will be interpreted using that time unit. Thus, if you enter '5' and the
preferred time unit is 'day', then it will be interpreted as '5 days'. Thus, you should specify a time unit
that matches the time horizon of your simulation (and the time step), or you might get time values that
are pretty difficult to read.
You can also define whether the simulation time should have unit or not. While it is possible to turn
off units for time (and thus become compatible with models created in Constructor 2.51), we strongly
recommend that you keep the Time has units enabled. This will also ensure that the unit consistency is
kept and validated while you work.
Simulation Settings
Each component can contain several simulations, that also allows you to build your model. You can
define the simulation settings for each simulation in the Simulation Settings dialog box. A number of
default settings apply as long as you have not defined any other values. Sensible simulation time
settings are essential to gaining as much insight from the simulation as possible, both regarding the
accuracy of the results themselves and their readability.
You have full control over the time horizon of the simulation, and you can define the start time and
stop time, as well as the timestep of the simulation. Start and stop times are defined relative to a
calendar. The time step is defined using the preferred time unit of the project.
Note! To enter hours, minutes, and seconds, use the format HH:MM:SS.SS. Otherwise, use the
available time units in the project (such as '1da', '1mo', 1'yr', etc.).
In order to study the progress of the simulation even for small models that run very fast, you can set

- 198 -

These are ! ! The Gregorian Calendar The Fiscal Calendar . you will only see the simulation history from that point on in the simulation. About Simulation State and History Powersim Studio allows you to save the simulation state and history of the model with the simulation project. The value of all variables are restored to reflect the situation at that time step. When you add a cue point to your simulation run. Fiscal. The next time you run the simulation. You should therefore be aware that simulation state and history represents two different aspects of the simulation run. Keeping the history for all variables requires Studio to store one value per time step per variable. If this option is turned off. it will behave identically to all other variables with auto reports or in controls. this might result in a large dataset to store. If your simulation component contains a high number of variables. the simulation state represents a "snapshot" of the simulation at that specific time step. and you can continue your simulation using new strategies. though. Later in the simulation run. the selected history option will be used when saving a simulation run. "rewinding" the simulation to an earlier time step. including all values for all variables over the entire simulation run. should you wish to. The various integration methods available have different characteristics and accuracy. you can recall the state at that time. You are also allowed to save simulation runs and even export them to share them with others. You can also pause the simulation by using the toolbar buttons. if you have selected to save the simulation state with the project (select the Save State option in Simulation Settings). you save all the data in Studio. and Gregorian. Likewise. Thus. and how the year is divided into weeks and months. The Calendars There are three different calendars available in Studio. The main difference between them is the number of days per year. since the start and stop times are defined related to the selected calendar. both the final state and the history is saved. the settings for the integration methods will also influence the speed and precision of the simulation. The simulation history is kept for all variables by default. When you save a simulation run. Thus. Simulation History on the other hand. you actually save the simulation state of the component in that time step. represents the history of the simulation.199 - . the history will only be saved for variables that are parameters to controls or that have auto reports. The consequence is that if you add an auto report to a variable (or add the variable to a control) during the simulation.the speed of the simulation in relation to the selected timestep. Thus. In addition to the simulation settings. ! ! Simulation State represents the current situation of the simulation. In some situations it might therefore be advisable to turn off the History for all Variables option in Simulation Settings. and includes all values for all variables in the component. to save RAM on your computer. calendar selection will affect the number of timesteps for the simulation. There are several calendars available: Bank.

Calendar # of days # of weeks Gregorian 365. The flow will therefore yield 1 per timestep (in this case 1 per day). such as month. simulation time is measured in seconds. and you can select which calendar to use for your simulation in Simulation Settings. The Fiscal Calendar is often used in the financial world. all your flows will be calculated relative to one week. quarter and year. it is measured in seconds from 1/1/1. However. If you select all calendars. Selecting an interpretation interval of '1 week' will result in a time value representing the current simulation time in the number of weeks since 1/1/1. Note! The selection of available calendars will also affect the definition of some time units that are dependent on the selected calendar. while the highest increment if you select only the Bank or Fiscal calendars is '1 year'. If you select an interval of one week. you must also select an interval for interpreting the new unitless time scale. The possible time increment intervals are dependent on the available calendars. This is done in the Project Settings dialog box (right-click Project in the Project Window. when simulation time has time units. selecting an interpretation interval of '1 year' will result in a time value representing the current simulation time in the number of years since 1/1/1. Similarly. In comparison. At the same time. the value of 2000@s represents the point in time 2000 seconds after 1/1/2000. a flow rate with value 7 will be interpreted as 7 per week. Thus. you can choose to use a simulation time that is not measured in seconds. The time interpretation interval affects the flows and the time values of your system. only the Bank calendar is available for your simulation project. Tip! Setting the timestep equal to the time interpretation interval will yield flows per timestep . Thus. You can control the available calendars in Project Settings. the time value will represent the date 1/1/2000. and select Project Settings on the shortcut menu).200 - . Simulations without Time Units By default. as returned by the TIME function. the highest available increment is '1 week'. each 4th year (leap year) has 366 52 and 1 (or 2) days Fiscal 364 days 52 weeks (exactly) Bank 360 51 weeks and 3 days The Gregorian Calendar is the common calendar over most parts of the world. which is 1/1/2000 00:33:20. In this case. By default. where each company makes up their status at the end of the fiscal year. with a timestep of one day.! The Bank Calendar These calendars are different in regards to the number of days and weeks in each year. or in a time unit derived from seconds. The Bank Calendar is also used in the financial world. since this will ensure valid units for all of your variables. The following table shows the various calendars. The time interpretation interval The time interpretation interval affects the time value of the system.. It is strongly recommended that you simulate your models in this mode.

the assumed time interpretation interval is most probably '1 year'. the expression will be valid. No matter what time interpretation interval. or right-click Project in the Project Window. If this is the case. Set Preferred Time Unit When the simulation engine calculates values for variable definitions. However. This preferred time unit will be used as the default time unit for the entire project. In this variable definition. Note that some options are only available when certain calendars have been selected. In this case. this variable expression will be differently interpreted if the time interpretation interval is set to '1 week'. 2000) Since the output from the DATE function is always compatible with simulation time. However. Expressions involving time values When running simulations without time units. As a result. You can do this by selecting a preferred time unit in the Project Settings dialog box. Select the preferred unit under Time Unit. the value of the variable will step up from 1000 to 2000 at 1/1/2001. 3. To set the preferred time unit: 1. Unit consistency Turning off the time unit for simulation time does not turn off the unit consistency checks performed by Studio. For your convenience. Select Project Settings… on the Project menu.that are equal to the size of the flow rate controlling them. The table below summarizes the time units you are allowed to select from the list. Note! This setting applies only when the Time has units option is selected. the increase will always occur on 1/1/2001. 2000). and select Project Settings… on the shortcut menu. unit selection. This can be illustrated in the following definition: aux A = IF(TIME=2001. you should therefore avoid running in this mode if possible. 1000. or click Apply to save the changes without closing the dialog box. using the DATE function is recommended when creating expressions like the one above. the step will occur at 2001 weeks after 1/1/1. it will at the same time evaluate the unit for the expression. 1000. the last . the expression will always yield an unambiguous result. or calendar you have selected. and can therefore be omitted from the unit calculation. Click OK to save the changes. 2.201 - . entering units in this mode can sometimes return strange units when time is involved in the equation. This is due to the fact that the simulation time unit is defined as unity. you are allowed to include time values (without units) directly in your variable expressions. and most probably occur beyond the time horizon of the model. aux A = IF(TIME=DATE(2001). it is often convenient to control the time unit that is yielded from such calculations. To preserve correct units throughout your model. Although the variable expression above is valid when simulation time has no unit. However.

Enter the timestep in the Timestep box. the higher the number of calculations per simulation.202 - . 3.column shows the resulting unit for the variable A defined as: aux A = 1<<m>>/TIMESTEP // Defined in Global Units unit m = __METER All calendars Time Unit Comment UnitA second m/s minute m/min hour m/hr day Default setting for new projects m/da week m/wk Bank Calendar only 30 days One bank month m/mo 90 days One bank quarter m/qtr 360 days One bank year m/yr Fiscal Calendar only 91 days One fiscal quarter m/qtr 364 days One fiscal year m/yr Set Simulation Times When setting up a simulation in Studio. the shorter the timestep. or right-click the component's Simulation in the Project Window. If you. which can cause more numerical round-off errors and reduce the simulation speed. The start and stop times of the simulation decide when the simulation should start or stop. you should enter the start and stop times corresponding to the calendar year you want to simulate.) You should carefully select the length of the timestep to allow for an interesting development. are showing a process over a year. (The example assumes that the Gregorian calendar is selected. 5. Enter the stop time (a date) in the Stop Time box. Selecting a timestep of 1 day will lead to 365 simulation steps. Select Simulation Settings… on the Simulation menu. and select Simulation Settings… on the shortcut menu. To set the start and stop times and the timestep for the simulation of a model: 1. On the other hand. however. while selecting 1 week will lead to 52 simulation steps. you should always specify a time horizon that refers to the time perspective of the real-world system. The size of the timestep will then decide the number of simulation steps the model will perform. for example. 4. while the timestep of the simulation defines the size of the length between saved results. 2. This number is entered using a special time format (for . This could be from 1/1/2000 until 1/1/2001. a long timestep will produce simulation results with a lower accuracy. the simulation time horizon is one entire year. Select the calendar to use in the Calendar box (the default is the Gregorian Calendar). In both cases. However. Enter the start time (a date) of the simulation in the Start Time box.

or right-click the component's Simulation in the Project Window. or click Apply to save the changes without closing the dialog box. or even make them undefined. The available calendars will decide which time units are available in the simulation project. and are used in different scenarios. and select Simulation Settings… on the shortcut menu. This will affect which time units are available in your simulation project. 'quarter'. and 'month' can be uniquely defined. or right-click Project in the Project Window. for example. To change the calendar for the simulation of a model: 1. Select Project Settings… on the Project menu. Note! Changing available calendars can sometimes change the definition of some time units. 6. To specify the available calendars for a simulation project: 1. including 'year'. 2.details. Select Simulation Settings… on the Simulation menu. 3. all the time units. Change the Calendar There are currently three calendars available in Powersim Studio. when the Gregorian calendar is available. Click OK to save the changes. As an example. since all time units are not compatible with all calendars. . 2. 3.203 - . You can therefore select which calendars that should be available in your simulation project. This is due to the difference in number of days and weeks every year. The different calendars have different number of days per calendar year. Click OK to save the changes. when only the Bank calendar is available. 1. and select Project Settings… on the shortcut menu. Click OK to save the changes. Click OK to save the changes. You must specify in the settings for the simulation project which calendars are available within the simulation project. 3. Select Available Calendars The available time units in Studio are dependent on the available calendars in the project. Select Project Settings… on the Project menu. Select the calendar among the available calendars you wish to use in the Calendar box. is often used in the financial world. or click Apply to apply the changes without closing the dialog box. The Fiscal Calendar. 2. or click Apply to apply the changes without closing the dialog box. Select the calendars you wish to be available in the project under Available Calendars in the Project Settings dialog box. Select the calendar(s) that you want to be available in the project (you must select at least one calendar). In contrast. the highest possible time unit available is 'week'. click here). or click Apply to save the changes without closing the dialog box.

you can use the available units (as you can in all other boxes in Studio).Set Start Time and Stop Time To set the start and stop times for the simulation of a model: 1. real time speed. Select Simulation Settings… on the Simulation menu. Thus. The custom time is entered as a number of milliseconds per timestep. Click OK to save the changes. or click Apply to apply the changes without closing the dialog box. and if you enter 100 for Stop Time. The timestep is entered using the syntax given below. and select Simulation Settings… on the shortcut menu. if the time unit is 'day'. the start time is set at 01/01/01 BC. Click OK to save the changes. or right-click the component's Simulation in the Project Window. Select or enter a value for the Time Step to indicate the time interval to separate the simulation results. 3. 2. select Maximum. the time is interpreted using the preferred time unit specified in Project Settings. Select or enter a value for Start Time to indicate the beginning of the time horizon. If you do this. To remedy this problem: 1. Select or enter a value for Stop Time to indicate the end of the time horizon. 4. Select Simulation Settings… on the Simulation menu. This is entered as a date referring to the selected calendar. Note! The time step is always displayed using the preferred time unit specified in Project Settings. . you get a time step of 1 day. Set the Time Step To set the time step for the simulation of a model: 1. The default setting for the preferred time unit is Day ('da'). or right-click the component's Simulation in the Project Window. 2. Real Time or Custom to run at the maximum possible speed. or click Apply to apply the changes without closing the dialog box. If you enter '1<<da>>'. or click Apply to apply the changes without closing the dialog box. then a time step of 1 week will be shown as 7 days. or a custom speed respectively. You can enter the times as numbers as well as dates. 2. or right-click the component's Simulation in the Project Window. Under Simulation Speed. Set Simulation Speed It can be difficult to visually follow the development of the process at maximum simulation speed. the time unit is assumed to be the preferred time unit as specified in Project Settings. If you enter only a number. This is entered as a date referring to the selected calendar. and select Simulation Settings… on the shortcut menu. 3. 3. Click OK to save the changes. and select Simulation Settings… on the shortcut menu.204 - . Select Simulation Settings… on the Simulation menu. When entering times. the stop time is set to 11/04/01 BC (100 days after 01/01/01 BC). If you enter 0 for Start Time.

If the option is disabled. or right-click the component's Simulation in the Project Window. If you save the simulation state. 3. depending on the History for all Variables setting for the simulation. On the Simulation tab. If the option is enabled. history will only be kept for variables that are parameters to controls or variables that have auto reports turned on. select the History for all Variables option. you might want to turn off this option in order to free computer memory. 2. or right-click the component's Simulation in the Project Window. Note! If your simulation project contains many variables. and select Simulation Settings… on the shortcut menu. if you prefer to. Select Simulation Settings… on the Simulation menu. Keep History for all Variables Studio can keep the history for all variables in your simulation project. To save the simulation state with the project: 1. while the maximum value will be the maximum value for all the array elements. . Select Simulation Settings… on the Simulation menu. or Apply to save the changes without exiting the dialog box. Note! For arrays. The simulation run history will also be restored. and select Simulation Settings… on the shortcut menu. or Apply to save the changes without exiting the dialog box. history for all variables will be restored. This scaling information is used by all auto reports and controls to scale the value axis properly. To keep history for all variables: 1. 2. otherwise. only the history for variables with auto reports or variables that are parameters to controls will be restored. Click OK to save the changes. regardless of whether the maximum (or minimum) element is shown in an output control or not. the minimum value will be the minimum value for all the array elements. Click OK to save the changes.205 - . Save Simulation State with Project You can have Studio save the simulation state of the current simulation run when you save the project. You can also have Studio perform this automatic scaling every time you pause the simulation. Click OK to save the changes. 1. the project will be opened at the same time step that you saved the project on. Select Simulation Settings… on the Simulation menu. 3. On the Simulation tab. select the Save State option. This scaling is performed by finding the minimum and maximum values of the variable over the entire simulation run. select the Autoscale When Paused option. and select Simulation Settings… on the shortcut menu. and the values of all variables at that time step will be preserved. or right-click the component's Simulation in the Project Window.Autoscale Variables when the Simulation is Paused Variables in Powersim Studio will be autoscaled every time the simulation reaches the specified stop time. On the Simulation tab. 3. or Apply to save the changes without exiting the dialog box. 2.

51.Set the Run Count The run count allows you to specify how many runs should be counted before the run index is reset again. Select Project Settings… on the Project menu. Deselect the Time has unit option. To turn off units for simulation time: 1. Note! To avoid resetting RUNINDEX. Select a time interpretation interval in the Time measured in intervals box. you can display the run index (number) or the active run. or right-click Project in the Project Window. Note! In Constructor 2. for example. 2. the run count allowed you to run a number of simulation runs continuously. The time interpretation interval indicates the scale of the (unitless) time axis. and select Simulation Settings… on the shortcut menu. or right-click Project in the Project Window. Click OK to save the changes. simply start the simulation again when it has reached the end of the simulation. Click OK to save the changes. 3. If . or click Apply to apply the changes without closing the dialog box. and select Project Settings on the shortcut menu. Select the Time has unit option. or click Apply to apply the changes without closing the dialog box. To set the run count: 1. 3. while RUNCOUNT will return the number of runs specified above. enter the number of runs. 3. 4. By using the RUNINDEX function. or right-click the component's Simulation in the Project Window. rather than resetting the simulation. and select Project Settings on the shortcut menu. Click OK to save the changes. 2. the value returned by the TIME function. In Studio you must manually start the simulation between each simulation run by clicking Start. This option allows you to specify what a time step should be interpreted as in your simulation. 2. Note! This is the default setting when creating a new simulation project. Turn on/off Time Units for Simulation Time To turn on units for simulation time: 1. Select Project Settings… on the Project menu. If you select '1 week'. it starts over again. When the RUNINDEX reaches the specified run count.206 - . The RUNINDEX is also reset every time you click Reset Simulation to reset the simulation. Under Run Count. The RUNINDEX function will return the current run number. Select Simulation Settings… on the Simulation menu. or click Apply to apply the changes without closing the dialog box. will denote the number of weeks from 1/1/1.

you should switch to a higher order integration method. if your component requires it. is that Euler can cause unwanted oscillations to occur in your model. First. Hence. Increasing the number of integration steps (reducing the size of the timestep) can lead to two different problems. do not hesitate to decrease the number of integration steps by at least a factor of four (by increasing the timestep by a factor of four).more accurate even than doubling the number of integration steps when using Euler's method . The second order Runge-Kutta method uses two flow calculations within the given integration step. The Euler integration method. The integration method affects the way the simulation results are calculated. you can specify a higher order integration method. Likewise. However. This happens because the higher order methods use the value of the flow during the time step to calculate. more calculations can cause more round off errors.207 - . the flow rate will be of a magnitude of 1 per day. the value returned will denote the number of days from 1/1/1. . while Euler's computes the next flow only once. be of a magnitude of 1 per week.start and stop times and timestep . This usually makes the simulation more accurate . Thus. to increase the number of integration steps performed during a simulation run.affects the time horizon and resolution of simulation results. which is the default integration method for a new component. The integration method will perform one integration step per timestep. As for the example above.you select '1 day'.is that the Runge-Kutta method uses a weighted average of the two calculations: the flow during the second part of the integration step is given more weight than the first. will perform one integration step per timestep. When you define the simulation settings for a model. it slows down the simulation process. It calculates the changes in the level variables once per timestep. each having a different integration order: ! ! ! ! First order Euler integration Second order Runge-Kutta integration Third order Runge-Kutta integration Fourth order Fixed Step Runge-Kutta integration Euler is the default method. Powersim Studio supports four different methods of integration. Worse. it needs a high number of integration steps to be accurate. when going from Euler to the fourth-order Runge-Kutta. a flow rate of 1 will. When you encounter the problems described above. As a general rule you can decrease the number of integration steps at least as much as you increase the order of integration. at the beginning of the time step.the only problem is that it tends to smooth out sudden changes. with '1 week' as the selected interpretation interval. The integration method gets its default settings from the Simulation Settings for your component. the time interpretation interval will also decide the magnitude of flows. you specify a time horizon and a timestep. since a flow is defined as the flow rate divided by the time step. The reason why this yields a more accurate result . If '1 day' is selected. This means that in complex simulations. The higher order Runge-Kutta methods use even more sophisticated calculation algorithms. and second. you must reduce the size of the timestep. however. Integration Methods The simulation settings . but you can further customize these to suit your needs. Tip! Setting the same value for both the interpretation value and the timestep will automatically yield a flow of X per timestep from a flow rate of X.

if Time To Adjust Workforce were equal to the time step. the simulation results would be far less accurate: Example of a simulation setup where the time step is too high to allow accurate integration This presentation of how Powersim calculates the value of a level is based on the Euler integration method. the level 'Workforce' has an inflow called Change In Workforce. the area defined by the flow function that is colored green in the illustration below. one way of enhancing simulation accuracy is to lower the time step. in a model of a company's hiring policy. As mentioned. is added to Workforce. Another way is to use one of the Runge-Kutta methods of integration. The graphs above came about with a time step of 1 month. For example. For example. For each time step. so the gap between desired and actual workforce is halved each month. .About Integration The change in a level's value is determined by integration of the flows going in and out of the level. Change In Workforce equals Desired Workforce minus Workforce divided by Time To Adjust Workforce (which is set to 2). while a greater time step would cause the opposite. A smaller time step would mean that the calculation of the flow would take place more often and thus increase the level of accuracy and detail. Each time step the colored area is added to the value of 'Workforce' The colored areas designate what is added to 'Workforce' each time step The time step you set for the simulation run can greatly influence the integration.208 - . The time unit is mo (month).

The Algorithm In the equations below. Calculate the value of Level at t=T+dt based on LevelT and Flow LevelT + dt = LevelT + dt*Flow . and you cannot relate this behavior to the structure of the model or the size of the time step. If decreasing the time step is accompanied by diverging oscillation or other unexpected effects. you may need to deploy a more sophisticated integration method. 3. The rule of thumb here is that you can increase the time step at least as much as you increase the order of integration. The Euler Integration Method Euler's method first calculates the initial values of the levels and flows. this may lead to quite slow simulation runs. T) 2. As the time step gets smaller. and not using the optimal method may in certain contexts give rise to some strange simulation results. Then it uses the flows to update the levels. and so on. In complex models. If you find your simulation results wanting in accuracy and detail. Powersim executes the following two steps to calculate the integral over an interval from T to T+dt: 1. and F(Lt. the new values of the levels to recalculate the flows. the reason being that these methods will try to smooth them out. t) represents the value of the flow F into (or out of) level L at time t. Note! When you lower the time step. change the integration method rather than decreasing the time step further. one of the Runge-Kutta methods. 2. you can usually amend this by decreasing the simulation time step. Hence. that is. the effects of round-off errors grow. Problems may arise when using higher order (Runge-Kutta) methods to calculate sudden changes in a level. 1. Euler's method assumes that a flow is constant over the interval of the time step. going from Euler to Runge-Kutta 4.209 - . do not hesitate to increase the time step by at least a factor of four. Calculate the derived flow when t=T Flow=F(LevelT. the increased number of calculations increases the amount of round-off error. Euler's method usually needs very small time steps to be accurate.Integration Methods: Known Quirks The different integration methods behave differently. Lt represents the value of the level L at time t. The flows are calculated more often and smaller changes are registered. If your model is oscillating wildly.

note that In the equations below. T) F2 = dt*F(LT + F1. As mentioned above. The reason why this yields a more accurate result . Calculate a second order estimate of LT+dt by using a weighted average of F1 and F2 LT+dt = LT + 1/3*F1 + 2/3*F2 Third Order Runge-Kutta Integration The Third Order Runge-Kutta integration method works like the Second Order method. Powersim executes the following two steps to calculate the integral over an interval from t to t+dt: 1. . The final calculation uses a weighted average of the four derivatives. Estimate the flow at two points in the interval T to T+dt F1 = dt*F(LT.more accurate even than by decreasing the time step when using Euler's method . These higher order methods use several flow calculations within the given time step. The integration algorithm is described below.is that the Runge-Kutta methods use a weighted average of the calculations. F2. Second Order Runge-Kutta Integration The Second Order Runge-Kutta method uses two flow calculations within the given time step. Likewise. Calculate a third order estimate of LT+dt by using a weighted average of F1.210 - . and this calculation is based on the Taylor series expansion for a function of two variables. but uses three rather than two flow calculations to compute an estimate of the flow over one time step. Estimate the flow at three points in the interval T to T+dt F1 = dt*F(LT. T) F2 = dt*F(LT + 1/2 * F1. The algorithm is outlined below. T + 3/4 * dt) 2. 1. For the discussion of the integration methods below. but uses four rather than two flow calculations to compute an estimate of the flow within a time step. Lt represents the value of level L at time t. the two calculations are weighted with the second given more weight than the first. F(Lt.Runge-Kutta Integration Methods The Runge-Kutta methods for integration are used to achieve a higher degree of accuracy. T + 1/2 * dt) F3 = dt*F(LT + 3/4 * F2. T + 3/4*dt) 2. and F3 LT+dt = LT + 2/9*F1 + 3/9*F2 + 4/9*F3 Fourth Order Runge-Kutta Integration The Fourth Order Runge-Kutta method works like the Second Order method. t) represents the value of flow F of level L at time t.

To play a simulation forward stepwise: 1. The status bar indicates at what simulation time the simulation was stopped. Runge-Kutta. 3rd order. T + 1/2 * Dt) Dt*F(LT + 1/2 * F2. T + 1/2 * Dt) Dt*F(LT + F3. Calculate a fourth order estimate of LT+Dt by using a weighted average of F1. and F4 LT+Dt = LT + 1/6*F1 + 2/6*F2 + 2/6*F3 + 1/6*F4 Set Integration Order The default integration method for a new component is the first-order Euler method. each with a different integration order.1. Select the integration order in the Order box. To stop a simulation: 1. Click OK to save the changes. Click Advance Simulation One Step on the Simulation toolbar.211 - . Runge-Kutta. and select Simulation Settings… on the shortcut menu. You can select between four different integration methods. Click Play on the Simulation toolbar. or click Apply to apply the changes without closing the dialog box. 2. 3. F3. Play a Simulation Stepwise To study the development of your system step by step. Options are 1st order. it is a good idea to play the simulation stepwise. T + Dt) 2. T) Dt*F(LT + 1/2 * F1. or right-click the component's Simulation in the Project Window. The adherent integration method is also shown in the list. 1. 4. . and you can read the results at the step at which the simulation stopped. Runge-Kutta. 2nd order. Click the Integration tab. Start and Stop a Simulation To start a simulation: 1. Click Play once again. Estimate the flow at four points in the interval T to T+Dt F1 F2 F3 F4 = = = = Dt*F(LT. and 4th order. Euler. F2. Select Simulation Settings… on the Simulation menu. The simulation stops immediately.

All variable history from the activated cue point and to the end of the simulation is also lost! It might therefore be a good idea to save the simulation run before "rewinding" to prevent loss of valuable information! To go to a last cue point in the simulation: 1. Cue points are saved with the simulation run. To select the cue point that you wish to go to: 1. cue points between the activated cue point and the simulation end will be lost. Click Reset Simulation on the Simulation toolbar. The values of all variables in the component will be saved when you add a cue point. all variable history and other cue points will be lost. the simulation history is cleared from that point up. Select Add Cue Point on the Simulation menu. Thus.212 - . To add cue points to your simulation run: 1. all variables are reset to the value they had at that point in the simulation. When you go to a cue point. You can add as many cue points to a simulation as you wish. . and select the cue point that you wish to go to in the drop-down list. Click the small arrow next to Go to Cue Point on the Simulation menu. Note! When you "rewind" a simulation by going to a previously inserted cue point. Cue points are saved with the simulation run.Reset a Simulation To reset the simulation: 1. Add Cue Points to the Simulation Run Cue points allow you to "rewind" the simulation to a given point in the simulation history. Select Go to Cue Point on the Simulation menu. and play the simulation over again from that point on. and replay the simulation from that point on. You can go to a previously inserted cue point by clicking menu. Go to Cue Point on the Simulation Tip! Cue points can be inserted both when the simulation is paused and when it is running. Go to a Cue Point Cue points allow you to "rewind" the simulation to a given point in the simulation run. Note! When you go to a previously inserted cue point. Tip! You can start the simulation again without resetting it by simply clicking Play.

sir-files). This is useful if you want to share the simulation run with peers who have the (exact) same simulation project on their computer.Manually Autoscale all Variables All the variables in your component are automatically scaled when the simulation reaches the end. You might sometimes need to manually autoscale your variables. You do this by: 1. if the History for All . You achieve this by: 1. Note! Permanent variables are ordinary constants or levels with the Permanent option set on the Definition property page. Save to disk: Simulation runs can be saved to disk (in *. located under Runs under the component in the Project Window. all variables are autoscaled when the simulation is paused. Permanent variables may also be used for levels that accumulate values not only over one simulation run.213 - . Select Autoscale Now on the Simulation menu. you might sometimes need to reset all variables to their original definitions. By using permanent variables. This interval is used to determine the value axis of auto reports and controls in your diagrams. but over several simulation runs. This is especially useful when constants are parameters of input controls and are used to let the user interact with the simulation. The following is stored when you save a simulation run: ! ! The simulation state (the value of all variables at the current time step). About Runs and Reference Data Store Simulation Runs for Later Use Sometimes when you experiment with your simulations. Tip! If you select the Autoscale When Paused option in Simulation Settings…. The history of variables used in controls and auto reports (or all variables. Click Restore Permanent Variables on the Simulation menu. you find simulation runs that are interesting and that you wish to store for later use. However. The variable's scale is set to the interval between the minimum and maximum values of the variable over the last simulation run. the user don't have to provide the same input before each simulation run. Restore Permanent Variables Permanent variables keep their values even when the simulation is reset. You can save simulation runs in two ways: ! ! Store in Runs: Simulation runs can be stored under the component's collection of simulation runs. for example in the middle of the simulation if variable values far exceed the current scaling of displayed value axes. Studio allows you to save as many simulation runs that you wish.

Reference data parameters are prefixed with an '*' (asterisk) in controls and elsewhere. The inventory of the current simulation run (Population) is compared to reference data from a previous simulation run (*Population). Cue points. When you have specified a simulation run to be used for reference data. You can activate previous simulation runs in the model. Select Add to Runs on the Simulation menu or on the Simulation toolbar. . Right-click somewhere in the white space. This allows you to visually compare the results of the current simulation run with a previous run. The state for all cue points inserted in the simulation run. Use Stored Simulation Runs as Reference Data You can use previously stored simulation runs as reference data in the active simulation run. 2. you can create two different types of parameters: Active Run Parameters and Reference Data Parameters. The run will be saved with a default name that you can change in the Runs view if you want to. Open the Runs collection. To save a simulation run: 1. and select Add Active Run on the shortcut menu. or 1.214 - . When you create parameters in controls. Variable history (as specified in Simulation Settings…).! Variables option is selected in Simulation Settings…). all information from the current active run will be replaced by the information from the previous run. Tip! You can save a run at any time in the simulation. When you save a simulation run. the following information is saved: ! ! ! Simulation State (at the time step when the simulation run was saved). reference data parameters will become visible in controls. displaying the values of the corresponding variable in the selected run. available under the component in the Project Window. Save a Simulation Run in the Project You can save the simulation run if you want to keep interesting simulation results. When you do this.

3. Tip! The name of the simulation run will appear in the Reference Data list box in the toolbar and on the Simulation menu. Select Load from File… to open a simulation run previously exported to file. 2. Variable history. the following information is restored from the run: ! ! ! The simulation state.215 - .sir) can be activated. all the information from the current simulation run will be lost! To activate a run: 1. Select the simulation run that you wish to rename. . Hit Enter when you have finished typing the new name.sir). Select Activate Previous Run on the Simulation menu. It also lets you save simulation runs outside the simulation project. When you activate a simulation run. or 1. available under the component in the Project Window. This enables you to share your simulation run with others with whom you share the same simulation model. Note! When you activate a previously saved run. New variables or variables that have changed will become NAN ('?'). Hit F2 and type the new name of the run. Double-click Runs under the component in the Project Window.Activate a Saved Run You can activate a previously saved run into the component. 2. Cue points Note! If your model has changed since you saved the simulation run. all the variables that have the same dimension and data type will be restored. Export a Simulation Run to File You can export a simulation run to file (*. Both runs stored in the project and in separate files (*. Rename a Simulation Run You can rename a simulation run in the Runs collection. and select the run you wish to activate on the submenu. Right-click the run you wish to activate. which can be useful if you develop a model that other people will run (to avoid keeping your own testing runs in the project). To rename a simulation run: 1. Open the Runs collection. and select Activate Run on the shortcut menu.

4. 1. Note! You can only import simulation runs into the same component that they were previously saved. and select a location where you want to save it. The file is saved as a *. Double-click the Runs view under the component in the Project Window. Note! Since the file is only loaded into the active run. 3. and select Load from File… on the submenu. Import a Simulation Run from File You can import simulation runs that are previously exported to file. and select Export Run… on the shortcut menu. The file is saved as a *. Right-click the run you wish to export. 3. Enter a new name for the simulation run file. Double-click the Runs view under the component in the Project Window. all the variables that have the same dimension and data type will be restored. . Select Activate Previous Run on the Simulation menu.sir-file. and select a location where you want to save it. 3. To avoid this. You can also export any of the previously saved runs in the Runs collection: 1. Locate the file on your hard disk. You can also import a simulation run into the Run collection. and select Import Run… on the shortcut menu. 4. but not include it in the Runs collection of the component: 1. and click Open to load the simulation run. 2. To import a simulation run. Enter a new name for the simulation run file. right-click it and select Activate Run. Click Save to save the simulation run. 2. Double-click the Runs view under the component in the Project Window.sir-file. as described below. Locate the file on your hard disk. and click Open to load the simulation run. and select Public on the shortcut menu. it has to be defined as Public in the Runs collection. Note! If your model has changed since you saved the simulation run. New variables or variables that have changed will become NAN ('?').216 - . 1. 2. import the run into the Runs collection. 2. Right-click the run you want to make public. If you want to activate the run. Click Save to save the simulation run. 2. Select Export… on the Simulation menu.To save the current simulation run to file: 1. Right-click in the empty area of the view. Make a Simulation Run Visible in Presentation Mode In order for a simulation run to be visible as Reference Data in Presentation Mode. the data will be lost when you reset the simulation.

. Select Reference Data on the Simulation menu. 3. To select reference data run: 1. Open the Runs collection. select the run. Double-click Runs under the component in the Project Window. All controls that have reference data parameters will. Right-click the run you wish to use as reference data. Note! You cannot delete a run that is used as reference data! 1.217 - . and select Use as Reference on the shortcut menu. 2. Right-click the run you wish to delete. 2. and hit Enter when you are finished.Enter Documentation for a Saved Run You can enter documentation for a saved run: 1. Select the Documentation field of the run that you wish to enter a documentation note for. Tip! Only simulation runs that are marked as Public in the Runs collection will be visible when the simulation project is viewed in Presentation Mode. Double-click the Runs view under the component in the Project Window. (The list box is also available on the Simulation toolbar. Reference data parameters are prefixed with an '*' (asterisk). Alternatively. To do so. Type the text. and select the simulation run to use from the drop-down list. and hit Del on the keyboard. as soon as a reference run is selected. the simulation run must be selected as Reference Data. Reference data makes it easy for you to compare your current simulation run to previously saved simulation runs. Delete a Simulation Run You can delete a run from the Runs collection. display these parameters along with the active run parameters. Select Reference Data When you have saved a simulation run you can use it as reference data for future runs.) or 1. and select Delete on the shortcut menu. available under the component in the Project Window. 2.

The animation illustrates how the report window can be used to present only a portion of the simulation at a time. deselect Auto to enter the minimum time interval of the simulation. the report window will slide one week further. these intervals are used by the Time Graph Control to identify the major and minor ticks on the time axis. the report will show data for the last quarter at a time. If. Under Reporting Window. while the slide specifies the interval by which the report window will scroll. the report length is one quarter. Click the Report tab. Studio uses the time intervals to major and minor tick marks on time axis. or Apply to save the changes without exiting the dialog box. it slides by an interval of one day. and when the end of the current quarter is reached. As an example. reference data is only available for variables that have not changed dimensions or data type since the reference data was saved. The entire simulation lasts for two months. Report Window The report window allows you to select a smaller portion of the total simulation to view. Under Intervals. Select Simulation Settings… on the Simulation menu. Click OK to save the changes. The length of the report window specifies the portion of the simulation to view at a time.218 - . About Report Window Studio allows you to specify a reporting window as well as major and minor intervals. the simulation runs for one year. The report window has a length of one month. 2. Minor and Major Intervals These intervals allow you to specify globally the major and minor time intervals that are being used in your component. 5. These concepts are explained below. The report window is defined by a length and slide. You can specify them manually. and to draw major and . and the slide interval is one week. or have Studio select them automatically based on the simulation settings. 4. say. Set up Major and Minor Time Intervals 1. deselect Auto to enter the major time interval of the simulation.Note! If your model has changed since you saved the simulation run. 3. and when the first month is completed.

Note! If you select Auto for Length or Slide.219 - . Under Reporting Window. or Apply to save the changes without exiting the dialog box. 2. Studio will automatically adjust the length to equal the length of the simulation. deselect Auto to enter the length of the reporting window. while the slide specifies the interval by which the report window will scroll. The report window allows you to select a smaller portion of the total simulation to view. 3. Set up Report Window Report Window 1. Click the Report tab. Under Reporting Window. 5. 4. . Click OK to save the changes.minor gridlines in controls. deselect Auto to enter the length of the slide interval. Select Simulation Settings on the Simulation menu. The animation illustrates how the Time Graph Control uses the report window to present portions of the simulation data.The length of the report window specifies the portion of the simulation to view at a time.

Work with Units of Measurement Units of measurements are an integral part of the variable definitions. They are marked by green icons in the unit views. Thermodynamic temperature and points in time are measured using point units.220 - . For variables that do not get their values from an expression. and you cannot alter them. Otherwise. a few time units. as in 100@C. In addition. The figure below illustrates this distinction. including the seven base units of the SI system. while normal units are used to identify an interval relative to a scale. Point and Normal Units There are two different types of units: Point Units and Normal Units. Point units are used to identify a specific point on a scale. the boiling point of water). the definition is not accepted as valid. An example of a unit that can act as both a point and normal unit. and angular units are pre-defined. and yr (year). These System Units are maintained by Studio. A point unit is defined by two elements. the unit will be evaluated automatically. On the left side. while temperature differences and time intervals are measured using normal units. you are allowed to set the unit explicitly in the Definition property page of the variable. qtr (quarter). On the right side. temperature scales. Note! The selected calendar of your simulation will affect the definition of the time units mo (month). There are some units that are built-in in Studio. . A normal unit is defined by a scale alone. Units are also taken into account when the simulation engine evaluates whether the model is consistent or not. the unit denotes a specific point on the temperature scale (such as 100@C. the unit represents an interval on the scale. the scale and the offset. This illustrates the difference between 80@C and 60@C of 20C. If a variable definition includes a unit operation that is not allowed. A point unit is referred to by a preceding '@'.

You can. The unit is calculated from the expression that defines the variable. however.Atomic Units A unit can be either derived from other units. be derived from global units . You define global units in the Global Units view. and the variable will still be regarded as undefined. you can explicitly specify that it should use the unit 'km' (=1000*m) instead. Both are available from the Project Window. or it is specified in the Unit box in the Properties dialog box.221 - . etc. This way. The difference between the two is the time interval between them. This is due to the different nature of point units as compared to normal units. 'people'. You can find the requirements for each function in their reference page. you must make sure that the definition expressions that you enter preserve the unit consistency of the model. This preferred time unit will be used as the default time unit for the entire project. 'products'. the unit is an atomic unit. Otherwise. About Unit Operations All variables in Studio have units associated with them even though they appear to be unitless. usually constant auxiliaries. However. In the latter case. The various functions that you can use in definition expressions follow rules for unit computation. in which case their actual unit is '1' (=unity). you can also define units that are local to the component only. if you have a variable that has the unit 'm' (=meter) as a result of its definition expression. units are created and defined globally in the simulation catalog. and the units will propagate throughout your model. As units are part of the computation. the variable definition will not be accepted. however.they cannot be atomic units. Global and Local Units In most cases. just to illustrate one commonly used unit of measurement. Such atomic units can be 'cars'. When creating models it is only necessary to include the units on the "border" variables that surround the model. In this case. which is easy . You are free to create your own atomic units as you please. To illustrate this. you enter the literal expression in the following pattern: Constant <<Unit Name>> Example: 50<<m>>/10<<s>> = 5<<m/s>> Not all operations and functions accept point units as input parameters. You can do this by selecting a preferred time unit in the Project Settings dialog box. change the unit of a variable to a compatible unit. or it can itself constitute the basis for other units to be derived from. and are available for all the model components. let us consider an example including two dates. You can include literal expressions including units inside other expressions without having to define them as constant auxiliaries first. and local units in the Local Units view. Preferred Time Unit It is often convenient to control the time unit part of a unit calculated automatically. you can control whether an automatically generated unit becomes km/s or km/hr. if you wish to. together with information on the unit returned from them. Local units must. As an example.

persons. kgm/s^2 (=N).222 - .@<offset>) ATOMIC __LOCALCURRENCY . the base units of the SI system. These identifiers are used to identify atomic units (that is. Enter the scale of the unit in the first part of the expression. Any text. 0. stock Short Name The short name is an abbreviation used by Studio if the space for presenting units are limited. Documentation A text field that you can use to document your unit. units that are not dependant on other units). There are therefore certain restrictions that apply when using point units in definition expressions. Some of these properties are used to define the unit uniquely. etc. not to mention the multiple of the two. Property Description Example Unit Name The name of the unit. Definition The definition of the unit. @(<scale>. Creates a local currency unit. Select the Atomic radio button in the Unit Definition property page. and Pre-defined Units The Properties of a Unit A unit in Studio has several properties. The table below summarizes these properties and how they are used. the sum of two dates is worse. Identifies an atomic unit. m.to understand. Identifiers. Available under Add Currency Unit on the shortcut menu inside the Global Units view. Properties. A text field that you can use to attach notes to your unit. psn. while other properties are used for presentation purposes by Studio. and the offset of the unit in the second (after the @-sign). The definition can contain expressions as well as literals and single units. Any text. However. Note Unit Identifiers The definition text of a unit can also contain several unique identifiers that enable Studio to recognize the unit's behavior. 1/s (=Hz). Identifier Description How to define it Identifies point units. local currency. m. stocks the quantity exceeds one.3048m (=ft). st Plural Name The plural name is used whenever Studio detects that m. The table below explains these identifiers. person.

s min hr da wk mo qtr Notes .3399) Some are available under Add Currency Unit on the shortcut menu inside the Global Units view. Available under Add Standard Unit on the shortcut menu inside the Global Units view. If you need other currencies. 0@da) (Bank calendar) Month. The unit is a System Time Unit that cannot be deleted or modified. you are allowed to define it as an optional definition parameter (this requires the currency used in the conversion to be defined). __CURRENCY ("BEF"=EUR/40. The unit is a System Time Unit that cannot be deleted or modified. It will be undefined if the calendar specified for the simulation is Gregorian or Fiscal. Based on the base unit for time from the SI system. The unit is a System Time Unit that cannot be deleted or modified.223 - . The currency symbol and currency formats for the specified currency is used. 0@min) Hour. @(30da. The unit is a System Time Unit that cannot be deleted or modified. and cannot be altered. Creates a pseudo-unit from the SI system. Available under Add Standard Unit on the shortcut menu inside the Global Units view. @(24hr. Example: __CURRENCY("USD"). 0@da) Week. System Units have a green unit icon in the views. 0@__SECOND) Second. To define a conversion rate towards another currency. there are several units already defined in Global Units. The unit is a System Time Unit that cannot be deleted or modified. simply define them manually.__CURRENCY ("<string>" [=<Conversion Expression>]) __SECOND __METER __KILOGRAM __CANDELA __AMPERE __KELVIN __MOLE __RADIAN __STERADIAN Creates a unit for the currency identified by the string. Creates a base unit from the SI system. __CURRENCY("EUR"). Unit Definition @(__SECOND. It will be undefined if the calendar specified is Gregorian. 0@s) Minute. 0@hr) Day. These units are listed in the table below. The unit is a System Time Unit that cannot be deleted or modified. 0@da) (Fiscal calendar) Quarter. @(60s. These System Units are maintained by Studio. 0@da) (Bank calendar) @(91da. @(90da. @(60min. Pre-defined Units When you create a simulation project in Powersim Studio. @(7da.

kg __KILOGRAM Kilogram. l (0. derived from SI base units. The standard unit for energy. 0@da) (Bank calendar) @(364da. sr mol cd A K N .01m Centimeter. __KELVIN Kelvin. @ ((3. 0@rad) Degrees. Based on the base unit for electric current from the SI system. 0@da) (Fiscal calendar) Year. The unit represents a plane angle.1m)^3 Liter. The standard unit for power. The unit is a System Unit that cannot be deleted or modified. @__RADIAN Radians.01 % Available Standard Units There are several commonly used units easily available on the Add Standard Unit on the shortcut menu of the Global Units view. The following expression is true: x% = x * 0. A measurement for volume based on the SI base unit m. It will be undefined if the calendar specified is Gregorian. The unit is a System Time Unit that cannot be deleted or modified. Based on the base unit for temperature from the SI system. Unit Definition Notes m __METER Meter.224 - . The standard unit for force. Based on the base unit for mass from the SI system. yr rad deg 0. Based on the pseudo-unit rad. Based on the base unit for luminous intensity from the SI system. Based on pseudo-unit from the SI system.14159265358979323846/180) rad. derived from four different SI base units. __AMPERE Ampere. The unit is a System Unit that cannot be deleted or modified. 0@rad) Gradians. Derived from m (meter).@(360da. The unit is a System Unit that cannot be deleted or modified. __CANDELA Candela. Among these are the base units of the SI system (except for time. __STERADIAN Steradians. A built-in unit in Studio that is based on the pseudo-unit for solid angles from the SI system. A built-in unit in Studio. Corresponds to the PCT function. kgm/s^2 Newton. Based on the base unit for amount of substance from the SI system. J kgm^2/s^2 (= Nm) Joule.01 Percentage. derived from SI base units. __MOLE Mole. km 1000m Kilometer. Derived from m (meter). The unit makes it possible to work with percentages as a unit rather than as functions (as earlier). @ grad ((3. which is already defined by default).14159265358979323846/200) rad. The unit represents a plane angle. Based on the base unit for length from the SI system. The unit is a System Unit that cannot be deleted or modified. cm 0. W kgm^2/s^3 (= J/s) Watt. The unit represents a plane angle. A pseudo-unit for plane angles from the SI system. as well as a other commonly used units.

750) Greek Drachma. FRF __CURRENCY("FRF"=EUR/6. A unit for currency which takes it settings from the local currency unit specified in Regional Settings (or Options) on your computer.386) Spanish Peseta. Based on Celsius. 273.C °(__KELVIN. This currency is fixed towards the euro. Kelvin. ITL __CURRENCY("ITL"=EUR/1936. This currency is fixed towards the euro. This currency is fixed towards the euro. ESP __CURRENCY("ESP"=EUR/166. The conversion rate for the Greek Drachma (GRD) is based on the conversion rate published 19 June 2000. -32*5/9°C) Fahrenheit.27) Italian Lira. ATS __CURRENCY("ATS"=EUR/13.95583) Deutsche Mark.15° __KELVIN) Celsius. BEF __CURRENCY("BEF"=EUR/40.225 - . When one of these are added.787564) Irish Pound. Available Currency Units There are several currency units easily available on the Add Currency Unit on the shortcut menu of the Global Units view. GRD __CURRENCY("GRD"=EUR/340. Unit Definition Notes __LOCALCURRENCY loc Local Currency Unit. LUF __CURRENCY("LUF"=EUR/40. Based on the base unit for temperature from the SI system. This currency is fixed towards the euro. This currency is fixed towards the euro. EUR __CURRENCY("EUR") The euro currency. This currency is fixed towards the euro. IEP __CURRENCY("IEP"=EUR/0. This currency is fixed towards the euro.3399) Luxembourg Franc. Among these are the thirteen European currencies that are fixed against the Euro.3399) Belgian Franc.55957) French Franc. PTE __CURRENCY("PTE"=EUR/200.7603) Austriann Schilling. This currency is fixed towards the euro. Note! The definition of currencies that are fixed towards the euro are based on the irrevocable euro conversion rates published 31 December 1998. This currency is fixed towards the euro. .482) Portuguese escudo. the Euro is also automatically included. NLG __CURRENCY("NLG"=EUR/2. F °(5/9C. This currency is fixed towards the euro. This currency is fixed towards the euro. DEM __CURRENCY("DEM"=EUR/1. Use this currency unit if the currencies used in your model should use the locale settings (and isn't dependent on currency conversion). The loc unit representing a currency using the currency formatting specified under Regional Settings (or Options) on your computer is also available on the submenu.20371) Dutch Guilder.

Unit for volume. derived from kg (kilogram). pound 0. Unit Definition Notes mm 0. derived from m (meter) and s (second). The table shows their definitions. GBP __CURRENCY("GBP") British Pound (Pound Sterling. Unit for velocity. . derived from m (meter). Unit for length. ft 0. Unit for frequency.94573) Finnish Markka. derived from s (second). Unit for mass.44704m/s (= mile/hr) Miles per hour. Unit for mass. This currency is fixed towards the euro. loc Tip! You can find the latest (daily) euro foreign exchange reference rates for most other currencies at the European Central Bank. derived from m (meter).FIM __CURRENCY("FIM"=EUR/5.226 - . derived from m (meter) and s (second). mph 0. in ft/12 Inch. Unit for length.45359237kg Pound. Unit for mass. derived from l (liter). USD __CURRENCY("USD") US Dollars (independent).9144m Yard. Unit for velocity. JPY __CURRENCY("JPY") Japanese Yen (independent) NOK __CURRENCY("NOK") __LOCALCURRENCY Norwegian Kroner (independent).001kg Gram. yd 0. Locale Currency Unit. Unit for length. ton 1000kg Ton. derived from kg (kilogram). Unit for length. Unit for length. Use this currency unit if the currencies used in your model should use the locale settings (and isn't dependent on currency conversion). knot 0. gl 3. derived from m (meter). A unit for currency which takes it settings from the locale currency unit specified in Regional Settings (or Options) on your computer. derived from m (meter). nm 1852m Nautical mile.3048m Feet. independent).514444m/s (=nm/hr) Knot. Other Useful Units of Measurement The table below contains other useful units of measurement not found in Studio. derived from kg (kilogram).7853l US Gallon.344m (= 1760yd) Mile. derived from m (meter). g 0. Unit for length. derived from m (meter).001m Millimeter. Hz 1/s Hertz. mile 1609.

This is because the various calendars have a different number of days. Unity variables If a unit is not explicitly chosen for a variable.The 'PER' Identifier Studio allows you to use the 'PER' identifier as a substitute for the division operator ('/') when defining units. Therefore. and are taken into account when simulation results are computed. there are two ways to achieve it. Their importance is particularly noticeable when it comes to flow rates. that creating models in this way can cause strange units to be computed by Constructor. Create a Model without Units Units are essential in Studio and are evaluated at run time. it has to know the time horizon to which the flow relates. . However. all variables except flow rates can be defined without a specific unit. this will also affect the sum of the time units for the project. If you need to create a model without using units.. The table below shows how the various time units are defined for the various calendars. All flow rates can now be defined without a rate unit. is to turn off time units for the simulation time in addition to using 1 (=unity) as the unit for all variables. 'quarter' will become undefined. Be aware. unit consistency will not be checked. However. You should be aware. To use the 'PER' identifier for a variable. it is a lot easier to create models with units than without. By using unity as the unit for the variables in the model. the variable will have 1 (=unity) as its unit (achieved by leaving out the unit part or setting it to 1).227 - . If you select two or more calendars. Time without units The most extreme solution. For the simulation to know the magnitude of the flow. it must be exiplicitly defined. This offers a good and stable way of modelling. however. however. Units are used to relate values to each other. as the default operator when Studio calculates a unit for a variable will usually be '/'. thereby making it possible to define units such as month. Evidently there is a major difference between having one car entering an intersection per second.51 and other simulation tools. increasing the possibility that your model contains errors in the definition expressions. the unit inconsistencies might occur. quarter. since 'quarter' is defined differently for the bank and fiscal calendar and undefined for the Gregorian calendar. and year. it will be available if only one of either the bank or fiscal calendar is selected. This is a way of emulating the time scheme familiar from Constructor 2. you must make sure that your flow rates are defined with a rate unit (1/time). Only units that are equal for the selected calendars will be available in the project. Available Time Units in the Project Once you select calendars to be available to your project. As an example. and having one car entering per hour.

You can define both normal and point units as local units. Add a Local Unit Local units are available only to the component it is defined in. Hit F2 and enter a name for the unit. Simply select the cell in the column you wish to edit (click F2 if the cell isn't opened for editing immediately). 2. Open the Global Units view by double-clicking its entry in the Project Window. Open the Local Units view by double-clicking its entry in the Project Window (located under Component and Simulation). 2. 3. To add a local unit: 1. but they cannot be atomic. and enter the definition. A newly created unit will remain undefined until you have defined it on the property page. Double-click the unit to define it on the Unit Definition property page. and select Add Unit on the shortcut menu. Tip! You can also define the unit directly in the Global Units view. Right-click somewhere in the white space inside the view. or select Global Units under Catalog Windows on the View menu. Hit F2 and enter a name for the unit. Double-click the unit to define it on the Unit Definition property page.Calendar Unit Gregorian Bank s (second) @__second @__second @__second min (minute) 0@s+60s 0@s+60s Fiscal 0@s+60s hr (hour) 0@s+60min 0@s+60min 0@s+60min da (day) 0@s+24hr 0@s+24hr 0@s+24hr wk (week) 0@s+7dy 0@s+7dy 0@s+7dy mo (month) undefined 0@s+30dy undefined qtr (quarter) undefined 0@s+90dy 0@s+91dy yr (year) undefined 0@s+360dy 0@s+364dy Add a Global Unit 1. 3. 4. the variable definition will not be accepted as a valid definition. If you use it in a variable definition before it is properly defined. An undefined unit is indicated in the Global Units view with a red question mark.228 - . Right-click somewhere in the white space inside the view. . or select Local Units under Simulation Windows on the View menu. 4. and select Add Unit on the shortcut menu.

2. Simply select the cell in the column you wish to edit (click F2 if the cell isn't opened for editing immediately). Select the currency you wish to add on the submenu that appears. and enter the definition. Thus. Click OK to save the changes. 4. they must be derived from global units. and enter the definition. Note! Since local units cannot be atomic. You should always prefix local units with a '. Add the two currencies to Global Units. Studio also have a list of pre-defined currencies that you can add to your project. Alter the definition of the currency to include the conversion rate. and select Add Currency Unit on the shortcut menu. You can also create currencies with conversion rates towards other currencies. to enable your model to convert between various currencies. Simply select the cell in the column you wish to edit (click F2 if the cell isn't opened for editing immediately).' (punctuation mark) when using it in expressions and fields. the euro (EUR) will be added automatically. Example: USD = __CURRENCY("USD") and GBP = __CURRENCY("GBP"). the local unit 'km' should always be referred to as '. which is a unit that uses the currency settings on the computer running the model. values are presented using the user's own currency settings. Example: USD = __CURRENCY("USD"=0. there is the loc unit. Find the conversion rate to use (either on the Internet or elsewhere).229 - . These are the euro and the currencies that are fixed towards it. in addition to US Dollars and British Pound Sterling. To add the loc unit to your project: 1. To create two currencies with a defined conversion rate: 1.Locale Currency on the submenu that appears. Thus. 2. Please find the correct rate to use on the Internet or elsewhere before implementing the rate in your project! . 3. Add Currency Units You can add currencies to your list of units. Note! The conversion rate used in the example below will change on a daily basis. Select them under Add Currency Unit on the shortcut menu. Right-click inside the Global Units view (somewhere in the white space). Double-click one of the currency units to open the Unit Definition property page.Tip! You can also define the unit directly in the Local Units view. or click Apply to save the changes without exiting the dialog box.km'. Note! If you insert one of the currencies that are fixed towards the euro (such as DEM or FRF). Select loc . To add a pre-defined currency to your project: 1. or define them manually using the __CURRENCY("") syntax.728544*GBP) 5. Right-click inside the Global Units view (somewhere in the white space). 2. First. There are two types of currency units available in Studio. Tip! You can also define the unit directly in the Global Units view. and select Add Currency Unit on the shortcut menu.

To add a standard unit: 1. etc. Define an Atomic Unit An atomic unit is a unit that is not based on other units. If you created an atomic point unit. and enter the definition. you can enter your unit definitions directly in the Definition box. 3. When you have selected Atomic. Such units can be used to measure lengths. all those units will be automatically added to your project. Tip! You can also define the unit directly in the Global Units view. You can define as many atomic units as you like. Right-click inside the Global Units view (somewhere in the white space). the text field will read '@atomic'. 2. Typical examples of atomic units are the seven base units of the SI system. masses. cars. Derived units are derived from SI base units or from your own atomic units. Simply select the cell in the column you wish to edit (click F2 if the cell isn't opened for editing immediately). the text 'atomic' is automatically entered in the Definition box. currency. Enter the long and plural names in Long name and Plural name respectively. Select the type of unit you want to create by selecting either the Point Unit or the Normal Unit option. 1. Select the unit you wish to add on the submenu that appears.Add Standard Units A list of commonly used standard units are available in the Global Units view. Double-click the unit you wish to define. and select Add Standard Unit on the shortcut menu. or right-click it and select . 4. products. cars. Tip! When you have become familiar with the unit definition syntax.230 - Properties on the . To define a derived normal unit: 1. people. Define a Normal Derived Unit Normal units represent intervals on a scale of known quantities. Select the Atomic option to create an atomic unit. Note! To be able to define a derived unit. people. and various units such as products. Note! If the unit you have selected is dependent on other units. all the units used to define it must already be defined in your project. Double-click the unit to define as a normal unit. 2. or right-click it and select Properties on the shortcut menu. etc. Only global units can be defined as atomic.

the auxiliary A is defined as the temperature of 85 degrees Celsius. and transfer it to the unit field by clicking the << button. °<offset>) // Alternative syntax and when used. 4.2. Replace the default text <scale> in the Scale box by the scale of the unit. The lower half of the page is activated. The definition syntax of a point unit is @(<scale>. (Example: To define km as a unit. Replace the default text <offset> in the Offset box by the offset of the unit. Simply select the cell in the column you wish to edit (click F2 if the cell isn't opened for editing immediately). A point unit is defined by two parts. 2000. Select the Derived option. shortcut menu. Replace the default text <scale> by the scale of the unit. 2. or click Apply to apply the changes without closing the property page. the variable definition expression can take the form aux A = 85<<@C>> In this example. Select the Normal Unit option. 5. and enter the definition. A derived point unit is derived from SI base units or from your own atomic units. @<offset>) °(<scale>. 3. enter '1000m'. 5. To define a derived point unit: 1. Select the Derived option.231 - . 7. 100°C. 6. Enter the long and plural names in Long name and Plural name respectively. or click Apply to apply the changes without closing the property page. 6. a date in history. The lower half of the page is activated. The first defines the scale of the unit. Define a Derived Point Unit Point units are used to explicitly define a unique point on a scale. Tip! You can enter the appropriate unit (or unit expression) by selecting the unit in the list on the right of the property page. are examples of such unique points that can be represented by point units in Studio. Double-click the unit to define it as a normal unit. The boiling point of water. 3. . while the other defines the offset. or right-click it and select Properties on the shortcut menu. Note! You can use either of the two available identifiers '@' and '°'. Select the Point Unit option. Tip! You can also define the unit directly in the Global Units or Local Units views. Enter the long and plural names in Long name and Plural name respectively. 4. Click OK to finish the definition. such as January 1. Point units are prefixed with '@'.) Click OK to finish the definition. You may also enter the unit definition directly in the Definition Text box.

In the Definition page.) . or right-click it and select Properties on the shortcut menu. (Example: 100 <<m>>. Double-click the variable. and enter the definition. All previously used unit expressions will be available in the box. If the constant is defined as a literal only (a number) you can explicitly define its unit. 2. Example: Let's say we wish to create a new temperature unit that has its zero at the boiling point of water: 100 degrees Celsius. 2. enter the unit you wish to use in the Unit box. you must explicitly select a unit for it. you can enter the unit directly after the literal expression expressed as '<<Unit name>>'. In the Definition page. All previously used unit expressions will be available in the box. Simply select the cell in the column you wish to edit (click F2 if the cell isn't opened for editing immediately). 1. Double-click the level. all the units used to define it must already be defined in your project. Double-click the variable. In the Definition text field.) Tip! You can use the multi-function list at the bottom of the property page to select units for your definition. 100@C) Note! To be able to define a derived unit. or right-click it and select Properties on the shortcut menu.Tip! You can also define the unit directly in the Global Units or Local Units views. as '<<Unit name>>'. you can enter the unit directly in the definition expression. Specify a Unit for a Constant A constant is a variable that does not change over time. Thus. the scale of our unit will be '10C'. In this case. In the Definition text field. Specify a Unit for a Level A level is defined by an initial value and the sum of flows that run into or out of it.232 - . (Example: 100 <<m>>. and the offset will be '100@C' (remember the '@' to indicate the offset). The unit should measure temperature in intervals of 10 degrees Celsius. In order for the level to work properly. When the cursor is placed in the Unit box you can double-click the unit in the list to insert it. Or: 1. Or: 1. or right-click it and select Properties on the shortcut menu. enter the unit you wish to use in the Unit box. 2. 2. Double-click the variable. or right-click it and select Properties on the shortcut menu. 1. our unit will have the definition unit temp = @(10C.

possible to include literals with units in your definitions. (Example: 100 <<m>>/ 10 <<s>>. or right-click it and select Properties on the shortcut menu. you can assign 'km' as the unit for the auxiliary. however. 2. and is calculated automatically by Studio. (Example: 100 <<m>>. the selected variable must be compatible with the computed unit. In the Definition text field. you can only specify a unit in the Unit box that is compatible with the computed unit. impossible to "fix the mistake" by overriding the computed unit by a specified unit. It is. Double-click the variable. If Studio has computed a unit for the variable. (Example: A / 10 <<s>>. where A is a properly defined variable. It is therefore important that units are included correctly in the variable expressions. If. Specify a Unit for an Auxiliary Some restrictions apply to how you can specify units for auxiliaries. Double-click the variable. enter the unit you wish to use in the Unit box. you are free to assign any unit that is defined using 'm'. for example. which would produce the value 10 <<m/s>>. If the auxiliary is defined by an expression involving other variables (with units) and/or expressions involving units. In the Definition page.233 - . If the auxiliary is defined by a literal (a number) only. the units are automatically included in your expression.Tip! The latter method can also be used when creating variable expressions. you are not allowed to specify the unit yourself unless it is compatible with the computed unit. since you later can only specify units that are compatible with the already computed unit. By using constant auxiliaries with the appropriate units. 2. Studio will itself compute the unit for the variable. If 'km' is defined as '1000m'. To specify a unit for an auxiliary: 1. the units will propagate throughout your model immediately. In this case. in other words.) Include Units in Variable Expressions Units are an integral part of the variable definition.) Tip! The latter method can also be used when creating variable expressions. It is. It is therefore a good solution to use constant auxiliaries rather than literals in variable expressions. You can also include the unit directly in the definition expression of the variable: 1. Such expressions can also contain other variables. You do this using the following syntax: Value <<Unit Name>>. You can do this either in the Unit box or directly in the expression.) Note! If an auxiliary is defined by an expression. Provided your variable definitions are correct. you can specify any unit for the variable. you can enter the unit directly after the literal expression expressed as '<<Unit name>>'. or right-click it and select Properties on the shortcut menu. the computed unit is 'm'. .

Examples The following expressions are valid: aux A = 3<<m>> aux B = 3<<m>>/6<<s>> (=0. Note! To enter a point unit. always remember the preceding '@'. Examples: To create some examples.) Explicitly Select Unit for an Expression To explicitly select a unit for an expression: 1. let's define a few units. making your model easier to maintain. we recommend you to create constants for all such literal expressions. enter the unit you wish to use in the Unit box.5 <<m/s>>) Instead of including literal expressions with units inside definitions of variables.01m = 1852m/hr // nautical miles per hour = ATOMIC =__CURRENCY("USD") = __CURRENCY("GBP"=1. The unit of Result is automatically calculated. You can then use these constants in your variable definitions. Double-click the variable. or right-click it and select Properties on the shortcut menu.11USD) Using these units and the time units in Studio. const A const B aux Result unit Result = = = = 3<<m>> 6<<s>> A/B (yielding a unit of 'm/s') <<m/s>> The units of A and B are entered in the Unit box in the Definition property page. 2. You will find examples of compatible units in the examples listed below. (Example: 20<<@C>>. unit unit unit unit ppl USD GBP NKR m km cm knot = __METER = 1000m = 0.51USD) = __CURRENCY("NKR"=0. On the Definition page. You should note that you can explicitly select the unit of a variable expression only if the unit you select is compatible with the calculated unit. we can create some examples of compatible units: .234 - .

Right-click the Project entry in the Project Window. Furthermore. if you want to make flow rates appear without time rate units as well. $ £ Nkr Create Unitless Variable Expressions Sometimes you might not want to include units throughout your model. m/s km/s km/hr 2. all your flow rates will be given in the (hidden) rate unit <<1/week>>. and select Delete on the shortcut menu. ppl/da (people per day) ppl/mo (people per month) ppl/qtr (people per quarter) 4. that depend on the deleted unit will also become invalid. or select Global Units under Catalog Windows on the View menu. In addition. Select the time interpretation interval. 3. both global and local. When you have selected a time interpretation interval. all your flow rates are given relative to this interval. you should leave the Unit box empty. Uncheck the Time has unit option. 1. 4. Tip! Using units of measurement makes it easier to create models with correct variable definitions. or click Apply to apply the changes without closing the dialog box. Compatible units 1. . 2. you can turn off time units for simulation time. 2. since unit computations provide an instant consistency check of your model! Delete a Global Unit Note! Deleting a unit will render all variables that use the unit invalid. You can now run your models without units on flow rates or other variables. m cm km 3.Ex. Open the Global Units view by double-clicking its entry in the Project Window. Right-click the unit that you wish to delete in the list. In such cases. Click OK to apply the changes. if you have selected a time interpretation interval of '1 week'. any unit. To delete a global unit: 1. Thus. and select Project Settings on the shortcut menu.235 - .

236 - . Furthermore. any unit. Open the Local Units view by double-clicking its entry in the Project Window (located under Component and Simulation). .Delete a Local Unit Note! Deleting a unit will render all variables that use the unit invalid. 2. that depend on the deleted unit will also become invalid. and select Delete on the shortcut menu. 1. both global and local. Right-click the unit that you wish to delete in the list. or select Local Units under Simulation Windows on the View menu.

Work with Variable Definitions
There are three types of variables in Studio: constants, levels, and auxiliaries. Levels are initialized at
the start of the simulation, and thereafter accumulate their value over the simulation run. Auxiliaries
are calculated every time step. Finally, constants are initialized at the start of the simulation and then
left unchanged by the simulation over the run. Constants accept input from the user, however. Both
constants and levels can be made Permanent, in which case they keep their values between
simulations rather than being initialized when the simulation is reset.
The main property of a variable, regardless of variable type, is the variable's definition. Studio will
automatically find the variable's unit, dimension, and data type based on the defining equation,
provided the definition contains enough information. The definition is used to calculate the variable's
value during the simulation (or initially, if the variable is a level or a constant). Unit, dimension, and
data type can also be defined manually, which can be useful in some cases, especially when using
named ranges when creating arrays.
Note! If you manually override the automatic definitions, you must make sure that all the
definitions are compatible!
Levels accumulate the value of flows that flow in and out of them. There are three types of flows in
Studio: Continuous, Discrete, and Logical. The type of the flow is determined by the integration
setting and data type of the flow rate that controls the flow. The way the flow influences the level is
defined by the level's flow definition. When you connect flows to a level, Studio will automatically
set up the flow definition, but you can change it manually. You can create level-and-flow structures
where the flow rates and the levels have different dimensions by using flow functions in the flow
definition.
Studio also features a special type of levels called reservoirs. Reservoirs can never be depleted below
zero. This is achieved by the use of advanced integration techniques.

The three variable types as they are represented in a Constructor diagram. The flow rate is an
auxiliary that controls the flow out of a level. The flow is a continuous flow (the most common flow
type).
Editing variable definitions can be done in several ways. First, you can use the Definition Property

- 237 -

page. The Definition box of the Definition property page features advanced railway syntax checking
and color coding. Second, you can edit the definitions in the variable's definition node in the Details
Window and in the
Equations View. And third, you can use the variable name field in the
Constructor diagram to enter the definition directly. Simply start by typing an equal sign ('=') in the
same way that you normally do when entering cell formulas in spreadsheets.

Variable Properties and Options
There are three variable types in Studio: Levels, Auxiliaries, and Constants. In a simulation model,
levels represent states in the system that change over time. Auxiliaries combine and reformulate
information as it passes through the system. Constants represent information that is not changed by
the simulation, but they can be changed by the user (through input controls).
Below you will find information that is common for all variables, and then information that is specific
to the various variable types.
General Information (All Variable Types)
All variables, whether they are levels, constants, or auxiliaries, share many properties. These
properties define the variable's dimension, unit, data type, whether their values are imported to or
exported from the component, and so on. Most of these properties are identical for the various
variable types.
The (Data) Type of the variable defines the set of values accepted by the variable. The data type
defines the operations that are available for that variable. There are currently four data types available
in Studio: LOGICAL, INTEGER, REAL, and COMPLEX. When variables are used as parameters in
function or operator expressions in definitions, they must fulfill the data type requirements of that
expression. These requirements are described in the data sheet for the various functions and operators.
Note! Although Studio recognizes integers, variables will always use REAL as the automatic
data type. This is to prevent that other variables that use these variables as inputs become
invalid due to data type mismatch. If you need an INTEGER variable, you must select the data
type it explicitly.
The Unit of a variable defines the unit of measurement of the variable. For a unit expression to be
valid, you must use or build on valid atomic or predefined units as they are defined in
Local or
Global Units (available in the
Project Window). Units are set automatically based on the
variable's definition, and you will usually not have to do anything about them. If the definition is a
literal expression without a unit (or rather unity), you are allowed to assign any unit to the variable
using the Unit box. You may override the automatic unit for a variable as long as the unit is
compatible with the unit yielded by the variable's definition (you will be warned if this is not the
case).
Tip! Create constants for all the actual constants in your model, rather than including them as
literal expressions inside your variable definitions. This makes it easier to maintain the
variable definitions in your model (should a unit name change, for example).
The Dimensions of a variable defines the structure of a variable. Variables that have no dimensions
are called scalars, while variables that have one or more dimensions are called arrays. The dimension
of the variable defines both the size of the array and the indices that apply. Studio can automatically
detect the dimension of a variable based on the variable's definition. You are free to manually define
the dimension as well, in which case you have full control of both the size and the indices used. As an

- 238 -

example, while the two dimensions '1..10' and '11..20' have the same size (both containing 10
elements), their indices are not the same (the first is indexed from 1 to 10, while the second is indexed
from 11 to 20). When you manually set the dimension of a variable, you must observe that the
dimension is compatible with the variable's definition (you will be warned if this is not the case).
The Variable Type defines how the variable may be used in the model. There are three variable types
currently available in Studio: Level, Constant, and Auxiliary. The three variable types are described
in detail below. You are usually allowed to change the type of a variable after you have inserted it in
the model. However, certain restrictions apply when you do this. You cannot change the type of a
level if it has flows connected to it, since it is only levels that can have flows.
Variables can import their values from external sources through datasets. Similarly, they can export
their values. A variable can be imported in two ways. Either it can have an initial import, which
means that only the initial value of the variable is imported (the value at the start of the simulation), or
it can have a full import, which means that the variable gets its value for all time steps from the
external source. If the variable is exported, on the other hand, it is calculated in the normal way, and
the results are exported to the external source as specified in the dataset. You may also combine the
settings, allowing you to import and export values from the same variable in the same simulation.
Note! Imported values will override the values calculated by the variable's definition.
The defining expression, called the Definition is the most important part of the variable's properties.
Usually, most of the information described above can be automatically generated by the definition,
and you will experience this in your own work. The definition acts differently for the three variable
types, and it is therefore treated individually below. Applicable for all variable definitions, however,
is that the definition must follow the function and operator requirements, as set forward in the
functions' and operators' data sheets.
Levels and constants may also be defined as permanent variables (not applicable to auxiliaries). A
permanent variable keeps it value between simulation runs, as opposed to ordinary variables which
will always be initialized again when the simulation is reset. Permanent variables can therefore be
used to create levels that accumulate their value over several simulation runs, as opposed to ordinary
levels that will only accumulate their value over one simulation run. Permanent constants allow you to
create user interfaces where the values entered by the user "survive" when the simulations are reset.
Permanent variables will only be recalculated by their definitions on demand, when you click
Restore Permanent Variables.
Level
Levels are variables with memory, and their value are determined by the flows that flow in and out of
them. The value of a level at time t can always be found by the expression below, where dt is the time
step of the simulation run. As we can see by this expression, levels conserve the matter that flows in
and out of them.
Levelt+∆t = Levelt + inflowst - outflowst

For levels, the definition is used to calculate the initial value of the variable; the value at start-up. In
addition, a level contains a flow definition, that defines how the flows should be accumulated each
time step. The flows themselves are controlled by other variables (one per flow) that work as flow
rates.
There are three types of flows available in Studio; continuous, discrete, and logical. If one or more
flows that are connected to the level are continuous, the data type of the level must be either REAL or
COMPLEX for the flow to be defined. This is due to the nature of continuous flows, since a rate cannot
be defined in terms of integers and logical values. If the flow is discrete, the level can be INTEGER as

- 239 -

well. Obviously, for logical flows, both the flow rate and the level must be LOGICAL. The flows are
controlled by flow rates, and when creating level-and-flow structures, it is important that the
controlling flow rates and the levels match each others definitions (including units, data types, and
dimensions).
Note! The level itself can be of any of the available data types. It is actually the connected flows
that will be undefined if the data type of the level doesn't match the data type of the flow rate
that controls the flow.
When connecting a level to an external data source, you are allowed to export the entire time series
yielded by the variable. You are, however, only allowed to import the initial value, since allowing
import of later values would violate the basic principle of levels presented in the equation above.
Levels can also be defined as reservoirs (available on the Integration property page of the variable).
Reservoirs cannot be depleted below zero.
Auxiliary
Auxiliaries are "helper variables" that allow you to combine and reformulate information that exists in
your model. Auxiliaries are volatile in the sense that they have no memory and are calculated at least
once every time step. Their values are always calculated by their defining expressions. Auxiliaries are
usually defined entirely by other variables (used as parameters and operands in the defining
expression). Units, data type, and dimensions will be detected automatically, and you can in most
cases accept the automatic settings of these properties. If you decide to change them, you must ensure
that the new settings are compatible with the automatic settings given by the definition.
Tip! It is good advice to use constant variables instead of including literal constants in variable
definitions. By isolating such constants in their own variables you give yourself the opportunity
to fully utilize Studio's automatic unit detection, as well as visualize potential decision
parameters in your project.
When you create a simulation project, you define the integration order for the entire project. In
addition you can define individual integration order for selected auxiliaries. In addition to the default
option of using the project's settings, you can select between first and zero order integration. The
integration order setting for the variable is especially useful when the auxiliary is used as a flow rate.
Selecting first order integration creates a continuous flow that is unchanged over the entire time step.
Using zero order integration creates a discrete flow. If the auxiliary does not control a flow, the
integration order will only affect the calculation of the individual auxiliary, and thus only affect other
variables indirectly (by the fact that its value is not changed during the time step, as it would normally
be when using higher order integration methods).
Note! While discrete flows are similar to transactions where a certain amount is transferred at
the start of the time step, continuous flows are controlled by rates relative to time. Thus, while a
flow rate controlling a discrete flow has a compatible unit to the corresponding level, a flow
rate controlling a continuous flow must have a unit that is compatible with the level's unit
divided by time.
Auxiliaries allow you to only import the full time series, thus giving you the option of either
calculate all values for the simulation run using the variable's definition, or importing all values from
an external source. In addition, auxiliaries cannot be defined as permanent variables.

- 240 -

Constant
Constants are often used to identify and quantify the boundaries of the model, and to represent
decision parameters. They are, as the name implies, constant, and the definition only defines the
initial value (the definition is only calculated at the start of the simulation). You are allowed to assign
a new value to a constant through input controls, thereby changing the scenario of the model.
By creating permanent constants, you can create constants that not only keep their values over one
simulation run, but also keeps its value between simulation runs. Permanent constants thereby allow
you to create simulations that "remember" the input given by the user.
As mentioned above, it is often useful to create constant variables rather than including literal
constants in various variable definitions. This cleans up your model, and visualize parameters that
might be decision parameters in your system. It also enables you to gain full effect of Studio's
powerful unit detection capabilities. Also, should you have to change units at a later stage, you will
only have to do so for a handful of constants rather than going through all the variables of your
system to find them.

About Permanent Variables
Permanent variables are ordinary levels or constants that keep their values between simulation runs.
You can use permanent constants for user input, since these constants will remember the user's input
when the simulation is reset. If you use normal constants for this purpose, the user must reenter all her
parameter settings when the simulation is reset. Permanent levels are also useful in some situations.
While normal levels are always initialized using their definitions when the simulation is reset,
permanent levels will use the value they had at the end of the last simulation run. Permanent levels
will therefore accumulate their value over several simulation runs, not only over one simulation run as
normal levels do.
The definitions of normal constants and levels are used to initialize the variables at the start of the
simulation. For permanent variables the definitions are only evaluated when the variable is defined or
when the command
Restore Permanent Variables is invoked (on the Simulation toolbar or
menu). You can thereby reinitialize the model at any time, should you need to.
Note! When the
Restore Permanent Variables command is invoked, the levels are also
reinitialized, even if the simulation is in the middle of a simulation run.

About Reservoirs
A reservoir is a level that cannot be depleted below zero. In other words, it does not permit a negative
initial value and a reservoir's outflow is leveled out when the reservoir's value reaches zero.
Note! A reservoir will never become negative, but rather become undefined (NAN) if an outflow
tries to empty it below zero. The outflow should therefore handle the situation when the
reservoir becomes zero specially.
When the reservoir approaches zero, the simulation engine divides the time step into smaller parts, to
ensure that the depletion is performed correctly. When the value of the reservoir reaches 0, the normal

- 241 -

time step is resumed, and the simulation continues as normal.
Note! The simulation engine will recalculate the entire model, and not only the reservoir at the
subdivided time step. You should therefore be aware that the model might produce slightly
different results when you use reservoirs than when you use ordinary levels.
The integration method used when calculating reservoirs will, as mentioned above, subdivide the time
step into smaller portions if the reservoir is depleted towards zero. It is therefore impossible for a
reservoir to have zero order (discrete) or first order flows connected to it. Please observe that your
reservoirs have flows using the project's default integration method connected to it!
Example 1
As mentioned above, the flow rate controlling the flow out of the level must feature some kind of
feedback from the level. Otherwise the value of the reservoir will become undefined (NAN). A
sample model that has this feedback is shown below.

This model is defined as:
unit kg
level Reservoir
aux Ratio
aux Flow

=
=
=
=

__KILOGRAM // Added in Global Units
10<<kg>>
0.3<<hr>>
Reservoir/Ratio

With normal levels, such a depletion of a level is difficult to program. Usually the feedback would
lead to an uncontrollable oscillation in the level. With reservoirs, the simulation engine will divide the
time step into smaller parts, to ensure that the depletion is done correctly. When the value of the
reservoir reaches 0, the normal time step is resumed, and the simulation continues as normal.
Example 2
The second example model shows a simpler case than the model above. In this model, the reservoir is
depleted with a constant value until it becomes zero, in which case the flow out of the reservoir ends.
In addition, it also illustrates the difference between using a level and reservoir for modeling this
behavior.

The model is defined as:
= __KILOGRAM // Added in Global Units
unit kg
level Reservoir = 10<<kg>>
= If(Reservoir>0<<kg>>, 1.1<<kg/da>>,
aux Flow
0<<kg/da>>)

The behavior of the model is shown in the time graph below.

- 242 -

If we, on the other hand, define Level as an ordinary level, the result will be quite different. In this
case, the level will drop below 0 before the flow rate can reduce the outflow. In this case, the final
value of the level will be too low. The behavior of the model (using a level rather than a reservoir) is
shown below.

Finally, if you leave the flow rate constant throughout the simulation, the reservoir will become
undefined as its value drops below zero. The behavior of the model (using a reservoir but not
including a feedback to the flow rate) is shown below.

Variable Definition Examples
The sections below contain various examples of variable definitions in Studio. Although there are
unlimited possibilities for defining variables, these examples should give you an idea of how to get
started.
The examples below show how to define the variables on the Definition property page. To open this,
either:
!
!
!
!

Double-click the variable;
Right-click the variable and select
Properties on the shortcut menu;
Select the variable and click
Properties on the View menu or on the View toolbar;
Select the variable and hit Alt-Enter on your keyboard.

The examples require that there are no previous definitions in the various boxes. If there are, please
delete them (or click Auto in front of them) before applying the changes from the example.
Note! Some of the definitions below are started by the string "def". This implies that the
variable can be of any variable type. Otherwise, "const" represents a constant, "aux"
represents an auxiliary, and "level" represents a level.

- 243 -

Example 1: Literal Expressions
Literal expressions are useful when initializing levels and constants. They are entered as:
def Variable = 10

You can include the unit directly in the literal expressions (or literal parts of other expressions) like
this:
def Variable = 10<<m>>

Alternatively, you can use the Unit box to specify the unit:
def Variable = 10
unit Variable = m

// Unit 'm' must be defined (as __METER)

If you define an array, you can enter the array using '{' and '}', as:
def Variable = {{1,2,3},{4,5,6}}
(auto) dim Variable = 1..2,1..3

In the latter case Studio will automatically calculate the dimension of the variable. In this case, it will
be 1..2,1..3. You can also specify the dimensions yourself, if you wish to. You can also specify
the dimensions explicitly. In addition, if all elements are equal, you don't have to enter all the
elements separately.
dim Variable = 4..5,8..10
def Variable = 4
result Variable = {{4,4,4},{4,4,4}}

Example 2: Expressions with Operators
Expressions involving operators are entered in the same way as in spreadsheets:
def Variable = 10/5
result Variable = 2

If units are included in the expression, they must be included together with one or both of the
operands:
def Variable = 10<<m>>/5<<s>>
unit m = __METER // Added in Global Units

You can only explicitly set a unit for the variable that is compatible with the unit yielded from the
expression itself. In the above example, you can only set a unit that is compatible with m/s.
def Variable = 10<<m>>/5<<s>>
unit Variable = m/hr

Expressions with operators can very well include variable references.
def Variable_2 = ... // Any definition

- 244 -

def Variable_3 = ... // Any definition
def Variable = Variable_2*Variable_3

If several operators are involved in the expression, the calculation order and operator precedence is
used to evaluate the expression. Thus, the expression
def Variable = 10!+5/3

is equal to the expression
def Variable = (10!)+(5/3)

Most of the operators accept arrays as operands, except where noted on the operator's reference sheet.
The default operators will perform the operation element by element. If you wish the operation to be
performed according to mathematical rules for arrays (such as matrix division, etc.), you can precede
the operator by '#' (hash). The difference between the division ('/') and array division ('#/') operators
are illustrated below.
def Variable_1 = {{1,2},{3,4}}
def Variable_2 = {{5,6},{7,8}}
def Variable_3 = Variable_1 / Variable_2
result Variable_3 = {{0.2,0.33},{0.43,0.5}}
def Variable_4 = Variable_1 #/ Variable_2
result Variable_4 = {{3,-2},{2,-1}}

Example 3: Function Expressions
Functions in Studio usually require one or more parameters. Some have optional parameters that you
can leave out if you don't need them. In those cases, the function will use the default value (as
specified on the function's reference sheet). Functions can take both literal expressions and other
variables as input parameters. Most of them will also accept other function expressions as input
parameters. For the function to be properly defined, however, you must make sure that the input
parameters follow the requirements (for type, unit, and dimensions) stated in the function's reference
sheet.
A function usually accepts literal expressions as input parameters.
unit m = __METER // Added to Global Units
def Variable = ABS(-1.321<<m>>)
result Variable = 1m

The ABS function will also accept another function expression as its input parameter.
def Variable = ABS(2*SINWAVE(1,90<<da>>))

The expression above can also be modeled using three different variables, which is the preferred
method to do this. We would use two auxiliaries named Sine Wave and Positive Wave and a constant
named Period. The variable definitions are shown below.
Note! When referring to variable names with spaces, you must always enclose them in
apostrophes (').
const Period
aux 'Sine Wave'

= 90<<da>>
= SINWAVE(1,Period)

- 245 -

{3.12. def 'First Array' result 'First Array' def 'Second Array' result 'Second Array' = = = = FOR(i=1.: 1.. aux Array aux Summary = {{32.4}. since the unit of the four elements wouldn't be compatible.7|i*2)..*] is identical to the expression A[i].10. ARRAVERAGE(Array). a range (ex.61.{2. However.: 2).*. or an entire range ('*'). let's create two auxiliaries and name them Array and Summary.3. the definition for Summary will become invalid.30.14. You can include one index reference for each dimension in the array.40} Example 5: Indexing Arrays When you want to access one or more array elements in an array.52}. The expression A[i.6.aux 'Positive Wave' = ABS('Sine Wave') The output from this simple model is shown in the time graph below. Note! Succeeding '*' can be omitted.246 - . 12.31}} = {ARRSUM(Array).40}) {1.13} Note! If Array in the above example is defined with a unit.93.14.ELEMCOUNT(Array).{49.j=1. The index reference per dimension can be either a single value (ex.FOR(i=3.2). you specify an index reference enclosed in '[' and ']' (square brackets).38}.2.{42. If you omit the index reference for a dimension.2}.6}} CONCAT({1.. the entire dimension is returned. To illustrate. preceding '*' are mandatory. illustrated by the two definition expressions presented below. the dimensions for the elements entered must be identical for all elements.{30. The definitions are presented below. 22.. Note! If you enter an array for each array element. Each array element can very well be a function or array expression itself.ARRSTDEVP(Array)} result Summary = {465.75.10.23. Example 4: Array Expressions Arrays can be created by entering the various array elements enclosed by '{' and '}'. 38.*. It is important to observe that all elements of an array have compatible units and the same data type. The expression A[*.20. You can also use the FOR and CONCAT functions to create arrays.2}.2|i*j) {{1.i] is NOT identical to the expression A[i]! .8.

8 and pull out the new elements 6.. def A = {1.23. The example below. The definitions are presented below. to redimension an array A with the dimension 1. The example below illustrates both approaches.61.2.20} The second example above. This is useful when you build up arrays using the CONCAT function.. Multiple.{42.4. by the LOOKUP and INDEX functions.247 - . you could write A[5. and C. and B.10.. B.{20.. you write A[5.93. and All. You need five variables: Array..INDEX(B)] 93 Example 6: Redimensioning Arrays In some cases.31}} Array[2.?. the INDEX function converts an (integer) variable into an index variable that can be used to index the array directly. C and D.To illustrate. While the LOOKUP function takes the array and the indices as input parameters.23.38}.3] 93 Array[1. As an example. so you could also write A[5. create four auxiliaries and name them Array. If they are open.B) 93 Array[INDEX(A)..{42. In Studio this can be achieved in two ways.20..52}.31}} Array[*.10}} Sometimes it can be useful to use ordinary variables as the index of an array. Thus.{49.. You need three auxiliaries A.93.14}.7]. such numerical subranges can be open in one end (replacing the start or end index with '?').38}.A. resulting in the array Multiple.52}. One or both of the parts can be open.61}.2] {{32. since the CONCAT function can only concatenate succeeding dimensions.?] The following example illustrates how this redimensioning can be used to concatenate two arrays.{49.. The first part contains the new starting and ending points of the dimension. Single...14.93.?] {{93.52}.?:6.{42. you might need to assign new dimensions to an array.3.. it is not allowed to concatenate two arrays which both have the dimension 1.2) to index the array. def Array def Single result Single def Multiple result Multiple def All result All = = = = = = = {{32.2. To pull out the elements from 6 and on.10. A.8:6. To achieve this.3] {23.?:6.4 to the dimension 5..38}.4.3. The second part contains the reference to the cells within the new range.14.23. B. The two parts are separated by a ':' (colon). In this case. illustrates this.{42.5} .7]. When indexing arrays.{49. uses a numerical subrange (1..93.?. the last array must be redimensioned to 5.20.31}} 2 Integer 3 Integer LOOKUP(Array.31}} Array[2.61.93} Array[*.7.61.10.3] {23. def Array def A type A def B type B def C result C def D result D = = = = = = = = = {{32..14.38}. you specify an index range consisting of two parts. A. Studio assumes that the ranges include the elements to the end of the dimensions..20.{49. which requires three variables Array. def Array def A result A def B result B = = = = = {{32.9.

their units must be compatible.10}.{9.10} If you try to concatenate arrays with more than one dimension. the flow rate is allowed to be INTEGER).10} def C = CONCAT(A.8}.{5.9. Flow = dt*Rate To be able to add the value of the flow to the value of the level. Flows are controlled by flow rates.{3.{11.B[6. B. and D.8}.6}} def B = {{7.B[4.8}. Given the expression above. Further.10}.10:6.4.6.10}. This option will only differ from the default option if a higher order integration method is chosen for the simulation project. as shown below: aux Rate = EULER(Expression) // equals first order integration for Rate Note! Reservoirs (levels that cannot be depleted below zero) cannot have first order flows .12}} def C = CONCAT(A.9.4}.12}} About Continuous Flows What Is a Continuous Flow? A continuous flow represents the idea of quantities being transported between level variables.5. The following example illustrates this. or you can opt for a first order flow..7. The first is the definition of the flow rate variable.2. and the flow rate's unit matches the expression above.7.8. and they can only be REAL or COMPLEX (if the level is REAL.def B = {6. the data type of the rate and the level must match.12}} def D = CONCAT(A.2}.. as long as the data type of the flow rate matches the data type of the connected level.4:3. you must observe that only one dimension is different between the arrays.{9. Likewise.{5.. The second is the flow equation specified for the level(s) it is connected to. For continuous flows. Using first order integration for the flow rate is identical to defining the flow rate using the EULER function.B[*.. the value of the flow at a give time t is found by the expression below. def A = {{1. C.4]) result C = {{1.11.3.6:4.{3.4}.{7.8. unitRate = unitLevel/unit∆t The Parts Defining a Flow The flow is defined by two parts.10]) result C = {1.6}.6. You need four auxiliaries A. the unit of the controlling flow rate must be compatible with the unit of the level divided by time. you can alter the behavior of the flow rate by selecting an individual integration order for the flow rate variable.6. as shown below.4.2}. you can either use the default simulation settings for the project. For a flow Flow controlled by a flow rate Rate.{3.248 - . Levels are changed by adding the value of inflows and subtracting the value of outflows from their current values.{11.*]) result D = {{1.3.{5.7..2. You can use any variable as the flow rate variable..9. which means that the flow rate is calculated only at the start of the time step.

Flow = dt*Rate Flow = Rate // continuous flow // discrete flow Since the flow is simply accumulated by the level. Each flow connected to the level is presented in the flow equation. … represents the flow rates controlling the outflows of the level. Tip! You can create discrete flows by using zero order integration.dt*('Out Rate 1't) . In Rate 2. Flow functions give you exact control of how the flow flows into the level on an element basis.. and provides functionality for creating advanced structures such as queues. unitRate = unitLevel Note! When changing a continuous flow into a discrete flow.. The expressions for continuous flows and discrete flows are shown below (as they appear in the flow expression for the connected level). . About Discrete Flows What is a Discrete Flow? While continuous flows represent quantities being transported between levels per time (such as cars passing through an intersection. as shown below. with a sign (+ or -) denoting the direction relative to the level. discrete flows represent a quantity that is accumulated by the level each time step (and is thus independent of the length of the time step). Studio will automatically detect flows that are connected to the level.outflowst = Levelt + dt*('In Rate 1't) + dt*('In Rate 2't) + . The value of the level at a given time t is therefore defined by the expression: Levelt+∆t = Levelt + inflowst . where In Rate 1. Inflows are added to ('+') and outflows are subtracted ('-') from the level. Using Functions in Flow Equations When the flow involves flow rates and levels of different dimensions. the unit of the flow and level must be compatible. discrete flows represent transactions of given quantities at given times (a shipment of cars. or water flowing through a water hose).connected to them. the unit of the flow rate must be compatible with the unit of the level. Given the expression below.dt*('Out Rate 2't) + .. … represents the flow rates controlling the inflows of the level. a or a purchase of a certain goods). and will suggest a flow equation based on the definition of the flow rate and the level. The flow equation of the level defines how the flow is added to the level each time step.249 - . you must make sure that the unit of the controlling rate is changed accordingly! . while Out Rate 1. you must use flow functions in your flow equations to define how the flow should be added to (or subtracted from) the level. Out Rate 2. While continuous flows are integrated over the time step (and is thus dependent of the length of the time step)..

Note! You cannot use discrete flows with reservoirs. Note! When using immediate discrete flows. You can use any variable as the flow rate variable. Each flow that is connected to the level is presented in the flow equation. and at what time the flow is added to the level L. with a sign (+ or -) denoting the direction relative to the level. The flow rate's value calculated in the current time step is then immediately accumulated by the level.outflowst // zero order . you can alter the behavior of the flow rate by selecting an individual integration order for the flow rate variable. Before the introduction of discrete flows in Studio. Levelt+∆t = Levelt + inflowst .250 - . A third problem was caused by higher order integration methods. and the flow rate's unit matches the expression above. Another problem was that if the time step was not 1. Using a zero order flow creates the behavior of the ASSIGN function. which would subdivide the time step and thereby causing different values. Tip! The ASSIGN function available in previous versions of Powersim Constructor can easily be modeled using discrete flows. This means that the variable will only be evaluated upon entry of the time step and stay constant for the remainder of the time step. the values yielded by the flow rate was difficult to relate to the quantum actually being represented. The Parts Defining a Flow The flow is defined by two parts. The value of the level at a given time t is therefore defined by the expression below. the value of the flow rate will remain constant over the time step. the integration is performed at the end of the time step. Changing the time step therefore made it necessary to redefine the affected variables. To avoid this problem. the integration occurs at the beginning of the time step. When Zero Order Immediate is selected. as long as the data type of the flow rate matches the data type of the connected level. while using a zero order immediate flow allows you to create a structure that immediately assigns a value to a level when the condition occurs. With discrete flows you can now create robust model structures that are easily defined and understood. Whereas continuous flows only accept REAL or COMPLEX levels. discrete flows also accepts INTEGER levels. The second is the flow equation specified for the level(s) it is connected to. hence the name immediate. where L is the level and F the controlling flow rate. the flow rate would have to be defined using the EULER function. The first is the definition of the flow rate variable. The problem with these constructions was that the flow rate was dependent on the selected time step. discrete flows had to be modelled using continuous flows with flow rates defined using pulse functions. To create a discrete flow the flow rate must use a zero order integration setting (available on the Integration tab in the variable's Properties). and that are independent of the time step. Lt+∆t = Lt + Ft // Zero Order Lt+∆t = Lt + Ft+∆t // Zero Order Immediate The difference between the two methods is the time at which the flow rate F is calculated. Further. The difference between the two settings Zero Order and Zero Order Immediate is shown in the expressions below. The flow equation of the level defines how the flow is added to the level each time step. When Zero Order is selected. due to the special integration methods used for reservoirs. Inflows are added to ('+') and outflows are subtracted from ('-') the level.

) Ot = 'O 1't It = 'I 1't 'O 2't 'I 2't . ( = AND. as expressed below. Both the flows are logical flows using zero order integration. Studio will automatically detect flows that are connected to the level.251 - . a worker's union is negotiating the conditions and terms for their members and the negotiation is broken. . they do make sense. Third.. they don't really conserve what flows in and out of them. or the employers might try a forced lockout. and will remain TRUE until the conditions are changed. Second. In the meantime.and outflow is given as described above. the worker's union might go on strike for a while. you can use flow functions to create flows where the controlling flow rate and the connected level are of different dimensions.Levelt+∆t = Levelt + inflowst+∆t . all the flows that are connected to a logical level must be logical flows. .. This state might be modeled using a logical flow. and will suggest a flow equation based on the definition of the flow rate and the level. New negotiations will not be tried again until the conditions have changed and the parts agree to try again. say. the state becomes TRUE. since logical levels can have only two values. a flow of logical values might be hard to imagine.outflowst+∆t // zero order immediate where each in. Logical flows differ from other flows in several ways. First of all. and thereby causing the state to become FALSE again. new negotiations will normally not start again for a while. They are more similar to switches being turned on and off. while Out flows out. About Logical Flows What is a Logical Flow? At first. If. When the negotiations are broken. = OR. But if you consider states that have only two possible values. As for continuous flows. A logical flow can be expressed as: Lt+∆t = Lt ¬Ot It where O represents the total outflows and I the total inflows. the flow rate controlling the flow must use Zero Order or Zero Order Immediate integration settings. the flow equation can be expressed as: Lt+dt = Lt ¬Ot+dt It+dt The Behavior of a Logical Level-and-Flow Structure The illustration below shows a model structure containing a logical level State and two logical flows In and Out . // Outflows // Inflows For logical flows using zero order immediate integration. and ¬ = NOT.. where the state is identified as Negotiations Failed.. In flows into State.

Simply create a new simulation project.and outflows.. Int Outt Statet Statet+∆t = Statet ¬Outt Int 1 TRUE TRUE TRUE TRUE 2 FALSE TRUE TRUE FALSE 3 TRUE TRUE FALSE TRUE 4 FALSE TRUE FALSE FALSE 5 TRUE FALSE TRUE TRUE 6 FALSE FALSE TRUE TRUE 7 TRUE FALSE FALSE TRUE 8 FALSE FALSE FALSE FALSE Flow Function Examples You will find several examples of different flow definitions below. To edit the flow definitions. Studio will usually find the correct flow definitions automatically. . Note! Flow functions can only be used with array flows (not scalars). the examples can be modeled without adding ranges or units to the simulation project. All the examples below assume that the timestep of the simulation is 1da (1 day). create the examples.252 - . and run them. If a flow definition is automatically created. You find the flow definition for a level if you click the Flows tab on the Definition property page.The logical level-and-flow structure as it is represented in a Constructor diagram. such as 1.1). it will have a comment added to the definition: dt*COLLECT(Auxiliary) //Automatic If you edit these flow definitions. where a scalar flow rate controls a flow into a scalar level. all utilizing the various flow functions that are available in Studio. Also. Example #1: dt*Rate This example shows a standard flow definition. such as FILLINZERO({'Flow Rate'}). the comment will disappear. The behavior of the model is shown in the table below for various values of the in. and click once to start edit. or include the vectorization operators ('{' and '}') in the flow expression. You must either make sure that the controlling flow rate is an array (with at least a one element dimension. simply select the flow equation you wish to edit.

0} dim Level = 1.4.0} 1/2/2001 {1..0.3} 1/3/2001 {2. Time Level 1/1/2001 0 1/2/2001 1 1/3/2001 2 1/4/2001 3 1/5/2001 4 Example #2: dt*Rate This example shows a standard flow definition.12} . Time Level 1/1/2001 {0.6.2.6} 1/4/2001 {3..aux Rate = 1<<1/da>> level Level = 0 flow Level = dt*Rate The flow definition lets the content of Rate flow directly into Level. The model produces the following time series (for the five first time steps). where an array flow rate controls a flow into a level with equal dimensions.3 flow Level = dt*Rate The flow definition lets the content of each element in Rate flow directly into the corresponding element in Level.3}<<1/da>> dim Rate = 1. aux Rate = {1.9} 1/5/2001 {4.253 - .2. The model produces the following time series (for the five first time steps).3 level Level = {0.0.8.

The model produces the following time series (for the five first time steps)..2}.. aux Rate = {1..2. Time Level 1/1/2001 0 1/2/2001 6 1/3/2001 12 1/4/2001 18 1/5/2001 24 Example #4: dt*COLLECT(Rate) This example shows a flow definition. The contents of the flow is added to the corresponding element in Level.254 - .. where an array flow rate controls a flow into a scalar level.3 level Level = 0 flow Level = dt*COLLECT(Rate) The flow definition creates the sum of all array elements in Rate and lets it flow (joint) into Level. where an array flow rate controls a flow into a level with one dimensionless.0} 1/2/2001 {3.7} .2 flow Level = dt*COLLECT(Rate) The flow definition creates the sum over the second dimension for each element in the first dimension. aux Rate = {{1.Example #3: dt*COLLECT(Rate) This example shows a flow definition. The model produces the following time series (for the five first time steps).{3.1.2 level Level = {0. thereby creating a flow that has the same dimension as the level.0} dim Level = 1.2.3}<<1/da>> dim Rate = 1.4}}<<1/da>> dim Rate = 1. Time Level 1/1/2001 {0.

aux Rate = {9.1/3/2001 {6..48} Example #6: dt*DISTRIBUTE(Rate) This example shows a flow definition.0}} dim Level = 1.{0.2}.36} 1/5/2001 {36. aux Rate = {{1.24} 1/4/2001 {27.1.{3.2 level Level = {0.1.12} 1/3/2001 {18. Time Level 1/1/2001 {0.3 flow Level = dt*DISTRIBUTE(Rate) ..0.255 - . which is the case for DISTRIBUTE). where an array flow rate controls a flow into a level with one dimensionless.28} Example #5: dt*COLLECTFRONT(Rate) This example shows a flow definition.{5.2 flow Level = dt*COLLECTFRONT(Rate) The flow definition creates the sum over the second dimension for each element in the second dimension (rather than the first.. where an flow rate controls a flow into a level with more dimensions.6}}<<1/da>> dim Rate = 1.2.21} 1/5/2001 {12.2 level Level = {{0.18}<<1/da>> dim Rate=1. It is the first dimension that differs.14} 1/4/2001 {9.3.0} 1/2/2001 {9.0} dim Level = 1..0}. The model produces the following time series (for the five first time steps). thereby creating a flow that has the same dimension as the level. The contents of the flow is added to the corresponding element in Level..0..4}.

12}} 1/3/2001 {{9.20.18}} 1/4/2001 {{12.12. Time Level 1/1/2001 {{3.1.{15. In DISTRIBUTETOFRONT. which creates new dimensions behind the existing)..6.0.45}.15}.15}.30.2.15.9}.40.6}.60}.{12.3}.45}} 1/4/2001 {{20.10.12.6.30}} Example #7: dt*DISTRIBUTETOFRONT(Rate) This example shows a flow definition. The contents of the flow is added to the corresponding element in Level. The contents of the flow is added to the corresponding element in Level. where an array flow rate controls a flow into a level with .40.3.{6. Time Level 1/1/2001 {{5.256 - .{30.{20. where an array flow rate controls a flow into an array level with more dimensions.3 level Level = {{0. The dimensions of the flow rate and the level must be equal except from one dimension.30}..50.15}} 1/2/2001 {{10.75}} Example #8: dt*DISTRIBUTE(COLLECTALL(Rate)) This example shows a flow definition.30.0}} dim Level = 1.30}} 1/3/2001 {{15.The flow definition creates a new dimension by dividing the contents of the array elements in Rate by the number of elements in the missing dimension.0. aux Rate = {10.12}. the flow function creates a new dimension in front of the existing dimensions (as opposed to DISTRIBUTE.20.18.{18.{25.30}<<1/da>> dim Rate=1.50.75}.{24.60}} 1/5/2001 {{25. thereby creating a flow that has the same dimension as the level.24}} 1/5/2001 {{15.24..{0.20. The model produces the following time series (for the five first time steps).30.0}. thereby creating a flow that has the same dimension as the level.{10.6}} 1/2/2001 {{6.3 flow Level = dt*DISTRIBUTETOFRONT(Rate) The flow definition creates a new dimension by dividing the contents of the array elements in Rate by the number of elements in the missing dimension.9. The model produces the following time series (for the five first time steps).10.{5.

where an array flow rate controls a flow into a level with one element more in one dimension.{0.{0.0}} dim Level = 1.3 level Level = {0.{40. and then distributes them evenly over all the array elements in Level..30}.20}} 1/4/2001 {{30.{30.0}.4 flow Level = dt*PREFIXZERO(Rate) The flow definition adds a zero element in front of the existing elements in Rate to create a flow with the same dimension as Level.20}.0}..0}.0}.{0.{10.0.45}<<1/da>> dim Rate=1.3 level Level = {{0.30}.0..40}} Example #9: dt*PREFIXZERO(Rate) This example shows a flow definition.0.3}<<1/da>> dim Rate=1.{0.0} dim Level = 1.0.{20.{30.{10.6} .30}} 1/5/2001 {{40.10}} 1/3/2001 {{20.10}.{10.3} {0.257 - .{40.40}.10}. since Studio is unable to create this flow definition automatically.0}.{20. Time Level 1/1/2001 {0.2 flow Level = dt*DISTRIBUTE(COLLECTALL((Rate)) The flow definition first creates the sum of all the array elements in Rate.20.1.2. Time Level 1/1/2001 {{0. aux Rate = {1...20}.different dimensions.0}.{0.40}. aux Rate = {15. Note! You have to enter the flow definition above.2.30}.{0.0}} 1/2/2001 {{10.{20.10}.1.2.{40.40}.4.{30.0} 1/2/2001 {0. The model produces the following time series (for the five first time steps).4.20}.

4}}<<1/da>> dim Rate=1.{3.3}<<1/da>> dim Rate=1. Time Level .4.0}.{0.. where an array flow rate controls a flow into a level with one element more in one dimension.0}} dim Level = 1.0.0.1/3/2001 1/4/2001 {0.3 flow Level = dt*FILLINZEROES(Rate) The flow definition appends zero elements at the end of the existing elements in Rate in all dimensions to create a flow with the same dimension as Level.1..0} 1/2/2001 {1.2 level Level = {{0. aux Rate = {1.6..0} 1/4/2001 {3.2}.0.0..0.4.0}.3. Time Level 1/1/2001 {0.6. where an array flow rate controls a flow into a level with several elements more in one or more dimensions.2.9} 1/5/2001 {0.0.8.1.2.0} dim Level = 1.3.0.{0.0} Example #11: dt*FILLINZEROES(Rate) This example shows a flow definition.9.0} 1/3/2001 {2.12. aux Rate = {{1.3 level Level = {0.0} 1/5/2001 {4.6.3..12} Example #10: dt*SUFFIXZERO(Rate) This example shows a flow definition.4 flow Level = dt*SUFFIXZERO(Rate) The flow definition appends a zero element at the end of the existing elements in Rate to create a flow with the same dimension as Level.2.258 - .8..

0}} Example #12: Pipeline Delay This example shows how to create a pipeline delay using an array level with three different flows attached to it..0.0}} 1/2/2001 {{1..4.0..0}.{0. aux Input = 1<<1/da>> dim Input=1..0.{0.9.0}.0}.0. the contents of elements 1..0. are replaced by 0. Thereby.259 - Output .0.1 aux 'In Transit' = FOR(i=1.0}da^-1 {0}da^-1 1/2/2001 {1}da^-1 {1.0}} 1/4/2001 {{3.0.{0.dt*SUFFIXZERO('In Transit') + dt*PREFIXZERO('In Transit') .0}.0.{3.0}da^-1 {0}da^-1 .0}. The missing elements in the dimension.0. controlled by Output. Note! Since the dimensions for Input is 1.0. the variables are considered arrays by Studio.0. Finally.1 and Output is 10.9 aux Output = Container[10] dim Output = 10.{0..0}.10 flow Container = + dt*FILLINZEROES(Input) .0} {0. The table below shows the results from the simulation for the first 11 simulation steps.dt*FILLINZEROES(Output) The flow definition lets the element from Input flow into the corresponding element in Container.10.0.0. the last outflow.10 by the flow controlled by 'In Transit'.0.10.0.0.{0.0.0}} 1/3/2001 {{2.9 from Container.0.0}.0.0. elements 1.0}.0.0}..2.6..0.4. a preceding 0 is added to the array.0.0.0.8.0.0}} 1/5/2001 {{4. The difference in the dimension.0. the element 10.0. the elements 2.0. are replaced by 0.0. is replaced by 0 on the outflow.{12..16.9 are shifted to the elements 2. Time Input Container 'In Transit' 1/1/2001 {1}da^-1 {0..10 level Container = 0 dim Container = 1. empties element 10 from Container.1/1/2001 {{0..0} {0.10.9 | Container[i]*1<<1/da>>) dim 'In Transit' = 1. The difference in the dimension.0.{8.8. On the inflow. however..0}. The number of elements in the level decides the delay time.0.0.0.{6.0.12.0.0.. The flow rate 'In Transit' empties the contents of elements 1.{0.

1.1.1.1.0. In some cases.1. If a structure of auxiliaries are mutually dependent on each other.0} {1. This happens when one of the variables involved in the loop has explicit definitions for Type. Such a structure would cause an infinite loop in the simulation engine.0.1. valid feedback loop is shown below.0. This circular loop is invalid since it only includes auxiliaries.1.1.1.0.1.0.1}da^-1 {1}da^-1 About Circular Definitions One of the strengths in Studio is that you can create feedback loops.0.1. When Studio detects such circular definitions.0}da^-1 {0}da^-1 1/4/2001 {1}da^-1 {1.0. Unit.0.1.0.0.0. it will mark the links and auxiliaries in the diagram to make it easier for you to identify them.1/3/2001 {1}da^-1 {1.1.0.1.1. and Dimension.1.0. The figure below illustrates an illegal circular loop in Studio. Studio would not be able to determine where to start when calculating the values of the variables.0}da^-1 {0}da^-1 1/6/2001 {1}da^-1 {1.0}da^-1 {0}da^-1 1/9/2001 {1}da^-1 {1.1.0}da^-1 {0}da^-1 1/7/2001 {1}da^-1 {1.1.0}da^-1 {0}da^-1 1/10/2001 {1}da^-1 {1. Studio will not be able .1.0}da^-1 {0}da^-1 1/8/2001 {1}da^-1 {1.1.0.1. Given the structure above.0.1.0.0} {1.0.1.1.1. Studio will be unable to recognize circular references.1.1. or Dimension (it is sufficient to uncheck the Auto check box in front of the boxes). between auxiliaries and constants.260 - . however. these feedback loops must be delayed.1.1. However.0.0.0.1.0.0.0.1.1.0} {1.1. or circular references.0.0.1.1. the structure will appear well-defined in the diagram. This feedback loop is valid since it incorporates a time delay using a flow into a level. Unit.1.1.1.1.1.1.0} {1.0.1.0.0.1.0.0.1.1.0.0.1.0. To help you identify the circular references.1. However.0.1.1. so that they affect the origin of the loop at the start of the next time step.1.0.0.1.1.1. when you start the simulation.1.1.1.0.1.0.0.1.1.1} {1.0. if one of the variables is defined explicitly with regards to either Type.0.0} {1. It is not allowed to create feedback loops.0.1.1.1.0. the links and variables will be marked by question (?) marks in the diagram.1.1.1.0.0.0.1.1.1.0.0.0} {1.1.0.1.0} {1.1.1.0} {1.0.0.0. A normal.1.0.0.1.0}da^-1 {0}da^-1 1/11/2001 {1}da^-1 {1.1.0}da^-1 {0}da^-1 1/5/2001 {1}da^-1 {1.1.1.0.1.1.0.

and dimension are explicitly defined for one of the variables in the loop. If you suspect that there might exist circular references in your model. You will also see the error messages (if any) that is produced by the simulation engine. and will therefore be NAN (Not a Number). I The parameter must be an INTEGER. are present in the wizard. When you work in the Function Wizard. About the Function Wizard. and they will all return the value of NAN (Not a Number). The Wizard is easily available on the Definition property page in the Properties dialog box. Sign Description L The parameter must be a LOGICAL. as explained above. unit.you can select a function category to narrow the list . . and set at least one of the properties Type. This situation is shown below.to evaluate any of the variables. The table below explains the various abbreviations and codes in the parameter list.261 - . the Function Wizard contains all the available functions in Studio. the wizard also contains a graph view that facilitates graphical data input. Additional information. This is a great help when creating valid function expressions.a list of all the functions parameters is shown. you should go through the variables that are not calculated correctly (with ? as their values). This will appear as a ? (question mark) in the variables' values (here presented using auto reports). or Dimension to Auto. A The parameter can be of any type. Unit. However. Apart from the operators. R The parameter must be a REAL (or INTEGER). This will uncover any circular references present in your model. If the type. making it easy for you to create valid function expressions. C The parameter must be a COMPLEX. the values of the variables will be impossible to determine. such as a description and list of valid data types for the parameters. [] The parameter is optional. <> The parameter is required. The Function Wizard allows you to easily insert function expressions into your definition equations. When you have selected a function in the alphabetical list . For some functions. you will see the value produced by the expression as you define it. then Studio will be unable to detect the circular references.

The only requirement is that the two units are compatible. The examples below illustrate how you can use comments in your definition equations. The example requires that the unit mm is defined in Global Units as specified below.24 mm Added in Global Units Added in Global Units = 0. The first value is the unformatted value.00124 m Length = 1. unit m = __METER // unit mm = 0. Adding Comments to Definitions To add comments directly in your definitions: 1. If the comment occurs at the end of the line. You can achieve this by using units that match the value range you wish to display. Position the cursor where you want to add the note.Expenses RANDOM() // The income from sales // The expenses generated from sales activity // Amplitude // * SINWAVE(1. the succeeding '//' can be omitted. Although this formatting is performed automatically.262 - . which expresses two lengths using two different length units. 3. (Just copy and paste the examples into the Definition box in the Definition property page of the variable.About Value Formatting Values shown in controls and auto reports are automatically formatted using the number of decimals specified in Regional Settings (or Options) on your computer (the default setting is 2).00 m = 1. Make sure that your comments don't interfere with the definition equations! . Consider the examples below. Note! All characters that occur between two '//'s or between '//' and the end of the line will be ignored when Studio compiles the equations. Tip! You can still view the unformatted value of the variable by hovering the mouse pointer over the variable until a tool tip appears. The value appearing in the tool tip is unformatted. the comment will disappear. Add the comment(s) enclosed by '//' (two division signs).24 mm You should always try to use units that best reflect the value range of the variable. Select the definition field where you wish to add a note.001m // Length = 0. and you are not allowed to add your own. the second is the automatically formatted value shown in Studio (using the default setting of 2 decimals). Once you have edited the flow definition.) Income .20<<da>>) // Wave // Flow equations that are generated automatically by Studio will get an automatic comment added in the Flows box of the Definition property page. you can still control the appearance of values in your models. 2. Tip! You can always override the automatically generated unit for a variable by specifying a unit in the Unit box of the Definition property page.

or click Apply to make the changes and remain on the Definition Property page. To create line shifts. The unit is available on the Add Standard Units when you right-click in the view.263 - . You can either enter a single unit or a unit expression. Define a Variable in the Name Box You can enter a variable definition in the name box. 2. simply point to it. Note! The example below assumes that the unit m (meter) is added to Global Units. Enter the unit definition in the Unit edit field.Define a Variable on the Definition Property Page Select the variable and click Properties. Type an equal sign. Click the Definition tab on the Property pages. 5. 3. you can inspect the level's flow definitions by clicking Flows tab above the Definition box. You can edit the name of the variable in the same operation (type Variable name=variable definition): 4. Click OK to accept the definition and return to the diagram. Enter the dimension definition in the Dimensions edit box. 1. Enter a new variable definition or edit the old one. 6. . Tip! Other variables can be used as parameters in your definition. The definition text now disappears and only the name is shown. 4. Click the name symbol or the variable itself to select it. you can use soft line breaks to format the definition in the same way you would in the Definition box on the property pages. To view the value of individual variables in the definition. You can type the new definition equation directly: 3. and a tool tip containing the variable's value will appear: If you are defining a level. Enter the definition text in the Definition edit box. hit CTRL+ENTER. Press Enter or click elsewhere in the diagram to finish the edit operation. 1. 2. Tip! When editing definitions in the name box of the variable. The current definition equation (if any) appears in the name box.

There are several ways of doing this. or click Apply to save the changes without closing the dialog box. 4. Click OK to save the changes. To define the variable using only the definition expression: 1. Expand the items under the variable by clicking Expand. Note! You cannot change a level into an auxiliary or a constant if it is connected to a flow! Define Flow Equations for a Level Studio will automatically create flow definitions based on the dimensions of the flows that are connected to the level. Enter the new variable definition. and select Properties on the popup menu. and hit Enter to save the changes. 5. ! ! In the Details Window. To define the variable. 3. or right-click it and select Properties on the shortcut menu. You are. Right-click the variable in either the Constructor Diagram or the Details Window. Locate the variable you wish to define in the list. Select the flow definition you wish to edit. Open the Details Window (or the Equations View). Enter the new flow definition. Note! Automatically created flow definitions are succeeded by a comment: '//Automatic' To edit the automatically created flow definitions: 1. however. 2. 2. or 1. 3. right-click the variable. 2. Click OK to save the changes. 2. or click Apply to save the changes without closing the dialog box. Enter the variable definitions in the Definition property page. .264 - . and in addition have the possibility to set type. Double-click it. Click once inside the flow definition to make it editable. and select the new variable type on the shortcut menu. 6. and end it by hitting Enter. Locate the level whose flow definition you wish to edit. select the new variable type in the Variable Type box. free to change these flow definitions at any time. Click the Flows tab on the Definition tab. 4. On the Definition property page. and dimensions explicitly: 1. 3. Hit F2 to edit the definition. There are two ways of defining variables in this view. or select it and click Properties. unit. Change Variable Type You can change a variable into a different variable type.Define a Variable in the Equations View You can also define variables in the Equations View. Double-click the level that you wish to change. which is located under the Simulation in the Project Window.

obviously).*]). When creating flow definitions.1]). On the level's definition property page. Double-click the variable. 3. 5. Expand the subitems under the level item by clicking appear. For continuous flows. and select Automatic on the shortcut menu. you can make it a lot easier to read for others (including yourself. For discrete flows. | IF(i<=ELEMCOUNT(R[*. You must also observe that the unit of the flow rate that controls the flow has the right unit. or . or select it and click Properties. select Flows. By splitting the definition into several lines and indenting them. All available functions are listed. If. enclose them in '//'.. 1. put your cursor in the Definition text box. the flow rate could have the unit 'm/s' or similar. In this example. Select the flow definition to edit. 2. you can use the different flow functions available in Studio. Hit F2 to edit the definition Expand. then the flow rate should have a unit of 'm' divided by a time unit..265 - . the unit of the flow rate should be compatible with the unit of the level. The flow definitions will If you wish to let Studio automatically define your flows again: ! ! In the Details Window. On the Definition property page. then you don't need to include the trailing '//'.. Double-click a function to insert it in the definition expression. LOOKUP(LOOKUP(R. and enter an empty string for the flow definition you wish Studio to calculate. // End IF 0<<unitR>> ) // End IF ) // End FOR Insert a Function in a Definition There are two ways of inserting a function to your definition. IF(j<=ELEMCOUNT(R[1. both units should be 'm'. Select Functions in the multi-function list at the bottom of the property page.3. the level has the unit 'm'. Formatting Variable Definitions There are several ways in which you can format your variable definitions. If the comment lasts for the rest of the line.i).j). ! ! To indent your line hit CTRL+I or Tab. FOR(i=. the unit should be compatible with the unit of the level divided by a time unit. 0<<unitR>> ). The example below shows how a definition including several FOR and IF functions can be made a lot more readable by using indentation and comments. 4.j=. Given the example above. 4. To add comments to your definition. right-click the flow. say.

) . The accepted input type is indicated to the right of the parameter field. an inconsistency will appear in the diagram. 2. Click OK to save the changes. 3. 2. From the list of variables that appears. Select the variable and click Properties. will be listed. and a short description for each parameter is provided at the bottom of the wizard. 2. Insert Variable Name in a Definition To insert variable names into the definition expression: 1. 5. All units that are defined in the project. Click the Definition tab. Tip! All the dimension definitions that have been previously used in the model. select All Variables or Linked Variables in the multi-function box. double-click the name of the variable you want to include in the definition expression. Note! The Linked Variables list contains the variables currently linked to the variable in the Constructor diagram. Double-click a unit to insert it in the previously active box. On the Definition Property page. On the Definition property page. 3. will be available in the dropdown list of the Dimensions box. Insert Unit Name To insert a unit of measure that has already been defined: 1. Click OK to insert the function expression into the Definition text field. 4. 2. All ranges defined in the model will now appear in the multi-function box. Select a function in the list on the left and the parameters you need to fill in will automatically appear on the right side of the wizard. whereas the All Variables list contains all the variables in the model. 1. On the Definition Property page.1. select Units in the multi-function box. Insert Range Name for a Dimension You can display already defined ranges and insert them into the definition of a variable.266 - . The Function Wizard contains a lot of useful information when you are defining a function expression. Define the input parameters according to their requirements. (Required Input implies that if a linked variable is not used in the definition. click the Function Wizard button to launch the Function Wizard. or Apply to save the changes without closing the property page. and select the Dimensions box. Double-click a range in the list to insert it into the Dimensions box. both global and local units.

2. Type or select the unit for the variable in Unit. Click Properties. 3. 2. or Apply to save the changes without exiting the property page. or click Apply to save the changes without exiting the property page.267 - . Click OK to save the changes. 4. Select one or more variables. Type or select the dimensions of the variable in the Dimensions box. 4. Click Properties and click the Definition tab. before you can use them in your model. Studio will define the dimensions using numeric subranges. Click Properties and click the Definition tab. and click the Definition tab. or click Apply to save the changes without exiting the property page. 3. or you can explicitly define it yourself. or Apply to save the changes without exiting the property page. Click OK to save the changes. Note! Named ranges must be defined in the Local Ranges or Global Ranges view. To automatically detect the dimensions: 1. To automatically detect the unit of measurement: 1. available in the Project Window. . Click OK to save the changes. To manually define the dimensions: 1. Double-click a unit in the list at the bottom of the property page to insert it into the expression. Select Auto for Unit. 4. or you can explicitly define it yourself. whereas you can use range definitions when you define the dimensions yourself. If you use automatic detection. 3. 3. Click Properties. 2. Select one or more variables. Double-click a range in the list at the bottom of the property page to insert the selected range in the expression. 2. To manually define the unit of measurement: 1. Select Auto for Dimensions. Select one or more variables that you want to define as arrays. Set Unit of Measurement You can allow Studio to automatically detect the unit of the variable. Click OK to save the changes. and click the Definition tab. Note! You must define the units in either the Global Units or Local Units view. You can use both numeric subranges and named ranges when defining the dimension.Set Array Dimensions from the Definition Property Page When you are working with arrays. you can allow Studio to automatically detect the dimension of your arrays. Select one or more variables you want to define as arrays. 4.

2. REAL. When you wish to explicitly assign the unit of measurement. and COMPLEX. Note! Be cautious when changing the data type of a variable. it is important that the unit you select is compatible with the unit computed from the variable's definition. 3. Select the data type from the list in Type. 5.Note! Normally you would enter the unit of measurement for constants and levels only and let Studio detect the units for all computed variables that depend on these. There are four data types in Studio: LOGICAL. An explanation of each function is shown beneath the list. When a parameter is selected. all the parameters of a function are shown. Click OK to save the changes or Apply to save the changes without exiting the property page. Tip! Please refer to the help system for more information about the functions available in Constructor. In addition. a description is shown beneath the list. 4. Select the variable in either the Constructor Diagram or the Details Window. as it can lead to inconsistencies in your model! Insert a Function Expression with the Function Wizard You can let the Function Wizard guide you through the process of inserting function expressions in the variable that you are defining. Select the variable in either the Constructor Diagram or the Details Window. 2. To automatically detect the data type for a variable: 1. Under Function Category. Click the Definition tab and click Function Wizard (located directly below the Definition box). and click Properties. 3. . To manually select the data type for a variable: 1. or Studio can automatically detect it based on the definition of the variable. and click Properties. Select Auto for Type. INTEGER. 6. 2.268 - . Click a variable and select Properties on the toolbar. 3. All the available functions of this category are listed under Function Name. Click OK to save the changes or Apply to save the changes without exiting the property page. Click OK to enter the function expression into the variable definition. Define each parameter in the appropriate definition field. Set Data Type for a Variable The data type of a variable can be changed manually. Select the function you want to use. select a category of functions. 1.

After a short delay. Click the Documentation tab. Powersim control: Insert a data presentation control. 1. If you have started editing the definition.269 - . Details Window: The value of a variable appears next to its name. Definition Property Page: Double-click the variable in the diagram. . at all times. An auto report will be added to the diagram. and then proceed with the steps below. click Apply to save the changes first. Customize the Appearance of Definitions The Definition box on the Definition property page features syntax highlighting and coloring as you enter your definitions. Tip! Using the Documentation property page to document your model makes it easier for others to understand your model. Note! You cannot change the formatting used in the Definition box while you are editing a definition due to the automatic syntax checking that Studio performs while you work. show the current value of the variable. or right-click it and select Properties on the shortcut menu. Write Documentation for a Variable You can use the Documentation property page to document the variables in your model. 2. the value of the variable will popup similar to a tool tip. as well as specify the appearance of function names. You can specify your own colors for the syntax colors. Definition Property Page: You can view the value of a variable that is part of another variable's definition simply by pointing to its name in the definition. and use the Documentation and Notes boxes to document the variable. In addition. The label will disappear when you move the mouse pointer away from the variable. In addition. should you wish to. and view the value in the value field below the Definition box in the Definition property page.View the Current Value of a Variable There are several ways of viewing the current value of a Variable: ! ! ! ! ! ! ! Pop-up: Point to a variable in the diagram. The value will appear in a tool tip: Equations view: You can view the value of any variable by expanding the variable in the Equations View. Auto report: Right-click the variable and select Show Auto Report and select an auto report type on the shortcut menu. and define the variable as a parameter. such as the table or time series control. This will. you can specify the font and font size used in the box. parenthesis are matched making it easier to keep track with your function expressions. Double-click the variable. You can also attach notes to them.

variable definitions are not affected. To change color for a syntax element. Any variable in Studio can contain child variables. select the element under Element. Child variables of submodels. Access to variables outside the parent variable or child variables within other variables are restricted. each contained within its own sub-model. on the other hand. click OK to save the changes. 3. and select a new color under Color. Hence. Right-click inside the definition box. Apart from this. and constants can freely access all their parent's sibling variables (all variables one level up in the hierarchy).To customize the appearance of the definitions: 1. 5. .270 - . and each variable can in turn have child variables. 2. Parent. can be defined as public. Specify the font and font size you prefer under Font and Size. To change the appearance of function names. You can customize the appearance of the definitions. When referring to a variable on another level .the ability to create submodels within your model. Each variable represents a node in the structure. and a parent variable can access all its child variables. When you're finished. About Hierarchical Models Studio introduces hierarchical structures to simulation models . Child variables of levels. and Public Child variables A hierarchical model resembles the structure of a folder structure on your computer. Your main model will connect the various submodels and only contain the variables that are unique to the "top-layer" of the model. However. when referring to a variable that is the child of another variable the relative path to this variable must be used. public variables of a submodel constitute an interface for the submodel. There are three options available: ! Uppercase (ex: DELAYPPL) ! Mixed case (ex: DelayPPL) ! Lower case (ex: delayppl) 4. auxiliaries.say. Thus. child variables in variables of these types can only be used to create internal models that define the value of the parent variable itself. All sibling variables can freely access each other. This allows them to access or be accessed by any sibling variable of their parent. select the desired option under Function Names. The most striking advantage is that you can divide your simulation model into smaller sections. only the parent variable can access child variables. as well as by any public child variable of their sibling submodels. and select Options… on the shortcut menu. Child .

K in its definition. All variables are private by default. and simplify the process of connecting your submodel to the main model (or to the other submodels of your simulation hierarchy). you can allow variables to be Public. will become public when the new submodel is created. The figure below illustrates how public and private variables relate to each other in a submodel. and they can themselves access variables at a higher level in the hierarchy. and it can also be accessed from outside the submodel. The same is the case for X. The variable B refers to the variable L in its definition. which refers to C outside the model without being public. the variable A can use M1. To make the definitions of B and X valid. Creating Submodels from Components Components. Variables that are not public. the variables Y is allowed to use the variable D in its definition. are referred to as private variables. the reference is illegal and B is undefined. A public variable in a submodel is allowed to access variables on the parents level. but since L is not public. In this process. or child variables of their siblings. since they can only be accessed from within the submodel itself. This results in an invalid variable reference. all variables that have a transfer direction defined in the component. can be copied into your current simulation model as a submodel. . a child variable may only access sibling variables of their parents. from either the current simulation project or from an external file. These variables can be accessed from outside the model. This makes it easy to create an interface to your component. Thus. Likewise. as shown below. Thus.Note! You can only access variables on level up or down in the hierarchy. Private and Public Variables Public Variables in Submodels When you create hierarchical models using the submodel variable type. The variables K and Y in the submodel M1 are public.271 - . you must make the variables L and X inside M1 public. Variables that are made public are tagged with a green dot.

it will become a submodel. You can thereafter define them using any variable on the parent level. When the component is copied (by drag and drop. constants. as shown below. The Relationship between Public Variables and Connection Studio allows you to create components that can later be copied directly into a model as a submodel. Child Variables inside Auxiliaries. the variable A. As you can see in the figure. By defining a Connection (Transfer Direction) for the variable. Constants. However. for example) into another model diagram. these child variables can freely access any variable above them in the hierarchy. but cannot themselves be accessed by such variables. and is defined with a transfer direction of Out. and Levels When using child variables inside auxiliaries. or levels. which is a sibling of K. The figure below shows how a component named Due Payment can be modeled. The simple example below illustrates this. cannot be defined by referring to the child variables of K. will automatically become public. G and X can be defined by the means of K's sibling variables. The variables that have defined a transfer direction. . The variable Amount defines the amount to base the calculation on. it will automatically become a public variable in the resulting submodel. and is defined with a transfer direction of in. the variable Due Payment is the output from the component. the child variables of K. the child variables can not be accessed from outside the parent variable itself.By defining both L and X as public variables. The child variables of an auxiliary. They can access variables on a higher level of the hierarchy. Likewise. or level cannot be made public.272 - . all the definitions in the model becomes valid. A simple component implementing the payroll tax and similar amounts to be deducted with given periods. constant. However.

The syntax is: <Variable Name> // Refers to the variable named Variable Name // on the same level in the hierarchy Consider the example below. In this case.When a component is copied to a model as a submodel. We want to define A as 10 and X as 2*A. it is extremely important that you follow the rules for referring to variables very strictly. You should keep in mind that each submodel has its own "name space". The simple model and its definitions are shown below. the referring child variable must be marked as public if the parent variable is a submodel. Hierarchical Syntax The discussion below shows some very simple examples of how to refer to variables at different levels of the model hierarchy. To refer to a variable on the parent's level. the definitions will look like: const A X aux = 10 = 2*A Referring to variables on a higher level You can also define a child variable of a submodel by referring to variables on its parent's level. A and X are both child variables of the model variable M1. Thus.273 - . making it possible to use the same variable name in many different submodels. where the submodel M1 contains two child variables. Parent~<Variable Name> // Refers to the variable named 'Variable Name' // on the level above in the hierarchy . all variables that have a defined transfer direction (in or out) will automatically be converted to public variables. In this simple case. you use the syntax shown below. otherwise you can easily refer to a variable in the wrong submodel! Note! You can only refer to variables one level above or below the variable you are defining! Referring to variables on the same level When you define variables on the same level of a model — referred to as sibling variables — you use the variable name directly.

X.<Child Variable Name> Again. while F is a sibling of M1. like this: const F = 10 Y = A*Parent~F aux Referring to a variable on a lower level You can refer to a variable at a lower level of the model. The syntax to access a variable lower in the hierarchy is: <Variable Name>.274 - . and Y are child variables of M1. When the variable is public. we define it using the Parent~ prefix. . while F and K are siblings of M1. A new variable named F on the parent's level and a new child variable named Y inside the submodel are added. A. Y is also made public on the shortcut menu (or on the Advanced property page in the Properties dialog box). X. like this: aux K = F * M1. however. named K.Consider the model shown below. we must use the syntax explained above. Y is Public. You must make sure. it is accessible by and can also itself access variables above it in the hierarchy. Notice the green dot on Y that indicates that the variable is made public. We will define K as F*Y. that the variable you wish to refer to is defined as Public. consider the example below. But to illustrate how the syntax can be used in a more advanced manner. consider the simple example below. and Y are child variables of M1. However.Y Referring to variables at different levels of the hierarchy The basic syntax has been discussed above. This is indicated in the Equations View by a green dot on the variable entry. Notice that all the child variables have been made public to allow other variables anywhere in the hierarchy to access them (otherwise only variables below them in the hierarchy would be allowed to refer to them). A. A new auxiliary is added. since Y is a child of M1. To define Y like it's parent's sibling F times A.

A more complex hierarchical model.
The table below shows how the various variables can refer to other variables in the hierarchy. Keep in
mind that you can only refer to variables one level above or below the variable you are defining. In
this example no variables have the same name, to make it easier to analyze the syntax. When you
create your own models and submodels, a name can be used once on each level.
Referring Referred variables
variable A
C

F

B

A

M1.C

Unavailable M3.H

D

Parent~A

C

M2.F

G

Unavailable Parent~C F

H

K
Unavailable

Parent~M3.H Unavailable
Unavailable Unavailable

Monitor the Flows of a Level
When working with hierarchical public child levels in submodels, the flows will usually come from
outside the submodel itself. When you are creating the submodel - especially when implementing the
submodel as a component that you would wish to make as general as possible - you cannot know how
many flows are connected to the level (since these can be added to a public level after you finished
the submodel itself).
To enable you to access the total sum of the in- and outflows for a level, Studio offers the option to
turn on Monitored Flows for any level. There are six flow types that you can monitor independently
from each other. The flow type is dependent of the integration order selected for the flow rate that
controls the flow. The value of these are made available as public child variables within the level
itself.
!

!

!

!

Inflows: The sum of all continuous flows into the level. Can be accessed through the
variable .inflows.
Outflows: The sum of all continuous flows out of the level. Can be accessed through the
variable .outflows.
Zero Order Inflows: The sum of all flows into the level controlled by zero order flow rates. Can
be accessed through the variable .zo_inflows.
Zero Order Outflows: The sum of all flows out of the level controlled by zero order flow rates.
Can be accessed through the variable .zo_outflows.

- 275 -

!

!

Zero Order Immediate Inflows: The sum of all flows into the level controlled by zero order
immediate flow rates. Can be accessed through the variable .zoi_inflows.
Zero Order Immediate Outflows: The sum of all flows out of the level controlled by zero order
immediate flow rates. Can be accessed through the variable .zoi_outflows.

Although child variables of a level cannot be public, the generated monitor flow child variables can
nevertheless be accessed from any sibling variable of their parent level.
To Enable Flow Monitoring
1. Right-click the level you wish to monitor flows for, and select
Properties on the shortcut
menu.
2. Click the Advanced tab.
3. Select the flow types you wish to monitor under Monitored Flows.
4. Click Apply to save the changes, or OK to save the changes and close the dialog box.

Hierarchical Models: Examples
We have presented a few examples below of how to implement hierarchical models. These models are
presented with their Constructor diagrams, to make them easier to understand.
The conveyor
A conveyor carries quantities, taking input at one end and delivering output at the other end with a
given time delay. Examples of conveyors are moving side walks, conveyor belts (hence the name),
and other processes that take a fixed amount of time.
The submodel below shows how a conveyor may be implemented using the DELAYPPL function.

The conveyor submodel. The public variables are marked with a cross in the upper right corner.
When the submodel is used, a flow is connected directly to the submodel and into the Contents level.
By monitoring the inflows of the level and accessing the total value of the inflows, any number of
flows may be connected in the main model to the conveyor submodel. The value of the inflows can be
accessed through the Contents.inflows child variable.
The variable definitions of this submodel are presented below. Note that all the input is coming from
outside the submodel, including units and dimensions. By allowing the interface variables to import
these properties, the submodel can be kept generic and can be used anywhere a conveyor is needed.
const
//
const
//
//
aux

Initial = ...
This is the initial content of the conveyor.
'Delay Time' = ...
This is the time it takes it takes for the input
to travel through the conveyor
Output = DELAYPPL(Conveyor.inflows, 'Delay Time', Initial/'Delay Time')

- 276 -

level Contents = Initial

To allow variables outside to be used in the definition of the Delay Time, Initial, and Contents
variables, all of them are defined as Public. Similarly, to be able to connect the flow controlled by
Output to a level outside the submodel, Output is also defined as Public.. As you can see in the
diagram above, this is indicated by a small cross in the upper right corner of the variable symbol.
Tip! When the two variables Initial and Time in Conveyor are made public, the modeler can
control these properties without having to open the submodels diagram.
The diagram below shows how you can use the submodel in the parent model. Connect the flow
controlled by Input to the submodel, and Studio will automatically connect it to the Conveyor level
(since it is the only public level available in the submodel). Links are drawn from the two variables
Time in Conveyor and Initial Amount in Conveyor and to the submodel. When the links are created, a
dialog box allows you to easily use them to define the public child variables Delay Time and Initial.
Finally, you can include the public child variable Output in the parent diagram, and connect the flow
that is automatically created to a any compatible level. The child relationship between the submodel
Conveyor and the public child variable Output is shown by a straight satellite line.

The conveyor submodel in the main model diagram.
The definitions of the variables Stock, Demand, and Warehouse are not relevant to this discussion, so
we will leave them out. The definition of Output is already given in the submodel, and we will not
change it (changing it will change the behavior of the submodel). However, we need to define Input as
the maximum of the Demand and the available Stock.
aux Input = MAX(Stock * TIMESTEP, Demand)

If you need to access the contents of the conveyor in your simulation, you can draw a link from the
submodel to the variable in question, and define it with a reference to Conveyor.Contents. Similarly, if
you need to create a parameter for it, you can create a parameter with Conveyor.Contents as the value
source.
Array Sort Module
The discussion about the VBFUNCTION in Powersim contains an algorithm for sorting an array,
processing it, and then sort it back to its original order. This model structure is very suitable for
submodel implementation. The model could look something like this:

- 277 -

An implementation of a submodel for sorting, processing, and resorting an array.
The four variables Sort Input, Sorted Array, Processed Array and Sort Output are defined as public
variables, since they will be used to provide input and output from the submodel. To view equations
for the submodel, please refer to the documentation of the VBFUNCTION.
When the submodel is used in the parent diagram, you can decide yourself whether you want to link
directly to the submodel, or if you want to include the public variables in the parent diagram. The
following diagram shows two different scenarios. In the first diagram, all the public variables are
included in the parent diagram. In this case the links from the surrounding model should be connected
directly to the included child variables.

The submodel used in a parent diagram. All the public auxiliaries are included in the diagram,
making it easy to see the variable connections between the main model and the submodel.
The Calculation submodel is another submodel that performs some actions on the sorted array from
the Array Sort submodel. In this diagram, the only variables belonging to the parent diagram are the
auxiliaries Array and Array 2, and the submodels Array Sort and Calculation. The other variables are
child variables that are included in the parent diagram.
An alternative diagram is shown below, where the child variables have been left out of the parent
diagram. In this diagram the variable to variable connections are missing, and the diagram only
indicates that information flows between the two submodels Calculation and Array Sort, and that the
Array variable provides input to the submodel, and that the Array 2 variable receives information
from Array Sort.

- 278 -

The submodel used in a parent diagram. None of the public auxiliaries are included in the diagram,
hiding the implementation of the submodels completely.
A Generic Account Submodel
Similar to the conveyor submodel above, we can easily create a submodel that represents an account.
By specifying the opening balance, interest rate, and the interest period, the submodel can be used as
an account level. The account will automatically calculate and add the interest to the account, and you
can add as many inflows and outflows that you wish to and from the submodel.
The submodel itself is shown below.

The Account submodel will calculate the running interest, and add the interest to the account at
regular intervals. The user can specify the Opening Balance, and the Period and Rate for interest
calculation.
The variable definitions are shown below.
const 'Opening Balance' = ...
// The opening balance of the account.
// Example: 1000<<USD>>
const 'Interest Rate' = ...
// The interest rate to be used.
// Example: 10<<%/yr>>
const 'Discount Period' = ...
// The period for when interest is added to
// the balance of the account.
level Balance = 'Opening Balance'
'Running Interest' = Balance*Rate
aux
level 'Accumulated Interest' = 0 * 'Opening Balance'
// This is defined as 0, but is multiplied with
// 'Opening Balance' to ensure that the correct
// currency is used for the variable.
'Due Interest' = IF( TIMECYCLE( STARTTIME, Period),
aux
'Accumulated Interest',
0 * 'Accumulated Interest')

- 279 -

//
//
//
//

The flow rate controls when the 'Accumulated Interest' is
emptied into Balance. In the last parameter of the IF function,
0 * 'Accumulated Interest' is used to define the parameter
with the same unit as the second parameter.

When using the submodel in the parent diagram, you can connect any number of incoming flows to
the submodel, and they will all connect directly to Balance (provided their unit is compatible).
Likewise, any number of outgoing flows can be drawn from the submodel.
To define the three input parameters of the submodel, you can include them in the parent diagram, as
shown in the illustration below. By defining them by the appropriate values and units, the Account
submodel will be properly initialized.

Simply draw flows in and out of the submodel to connect the appropriate inputs and outputs to the
Account.
A Note on the Account Example
If you wish, you can define the three child variables Interest Rate, Discount Period, and Opening
Balance within the submodel directly, instead of including them in the parent diagram. You can also
create input variables on the parent's level, and then link these input variables directly to the
submodel, as shown in the conveyor example.
You may also enter the initial definition directly in the Balance level, if you define it internally in the
submodel. You can also create an input variable on the parent's level, and draw a link from this
variable and directly to the submodel, and define the initial value of the level that way. However, if
you include the Balance level in the parent diagram, the flows must flow to and from the included
level rather than to and from the submodel itself. This is illustrated below.

If a public level is included in the parent diagram, any flows that run to or from it must be connected
to the included child level rather than to the submodel itself.

- 280 -

Work with the

Equations View

The
Equations View allows you to create your model without using any diagrams at all. You can
create, delete, and define variables.
The
Equations View always displays the entire structure of your model. It is unaffected by
operations in the diagrams that do not alter this structure, for instance excluding variables and creating
snapshots.
The columns of the
Equations View allows you to view and edit the most important properties of a
variable in a convenient way. If your model contains child variables, these can be shown below their
parents as a tree view in the Name column. You can also use the columns to group the variables to
make it easier to navigate in the list of variables. You can hide and display columns and sort them.
The
Equations View allows you to modify and/or view the following properties: Name,
Dimensions, Unit, Type, Definition, Value, Transfer Direction, Documentation, Note, Reservoir,
Modify Time, Create Time.
Tip! Working in the

Equations View and in the

Details Window are equal operations.

Create a Variable in the Equations View
1. Right-click anywhere in the white space.
2. Select the variable type you want to create on the shortcut menu.
A new variable of the selected type is created in the Equations View.
You can also create child variable for a variable in the Equations View:
1. Right-click the variable for you wish to add a child variable.
2. Select the variable type of the child variable you wish to create on the shortcut menu.
A new child variable is added to the selected variable.
Tip! You can drag the variable from the Equations View and onto open diagram (that belongs
to the component) to include it in the diagram.

- 281 -

Create a Link in the Equations View
There is no Create Link command in the Equations View. The link in a Constructor diagram is
merely a visual representation of the fact that one variable (at the end of the link) is defined by
another variable (at the start of the link).
In the Equations View, this kind of dependency is created by incorporating one variable in the
definition of another.

The variable 'Interest' depends on two other variables: 'Balance' and 'Interest_Rate'.
The dependency of the variable 'Interest' on 'Balance' and 'Interest_Rate' in the illustration above
corresponds to information links going into 'Interest'.
Tip! If the variable name contains a space, such as Interest Rate, remember to enclose
the name in apostrophes ('), as in 'Interest Rate'.

Define a Variable
A variable that is undefined - either because it is newly created or for any other reason lacks a valid
definition - will be marked with a red circle in the Equations View.
1. Locate the variable in the list.
2. Select the Definition column.
3. If the field is not automatically opened for editing, hit F2. The field will be automatically opened
for editing if you select is using the mouse.
4. Enter the new variable definition, and hit Enter to save the changes.
Alternatively, you can click
dialog box.

Properties or Alt-Enter, and define the variable in the Properties

Tip! You can include the unit of measurement in the definition if you wish to. You enter the unit
using the following syntax: value <<unit>>.

Create a Flow in the Equations View
You can create flows to and from a level directly in the Equations View.
1. Right-click the level that you want to create a flow to, and select Add Flow on the shortcut menu.
2. A flow and a rate variable is created. Define the rate variable to determine the flow. Use the same
procedure as when defining an auxiliary variable.
3. The new flow is by default an inflow. You can reverse it on its shortcut menu.
You can also modify the flow definition, if you wish to:

- 282 -

1.
2.
3.
4.

Expand the subitems under the level.
Select the flow definition you wish to change.
Hit F2 to edit the flow definition.
Enter the new flow definition, and hit Enter to save the changes.

Reverse a Flow in the Equations View
1. Expand the subitems under the level for which you wish to reverse a flow.
2. Right-click the flow you wish to reverse.
3. Select
Flip Flow.
Note! If the flow is present in a diagram, both the flow and level will be shown with '#' (hash)
marks to indicate that the diagram is no longer consistent. To fix this, delete the flow, add a
new in the opposite direction, and reconnect the flow rate to the valve.

Change Variable Type in the Equations View
You are allowed to change the type of a variable, for example change an auxiliary into a level. Certain
restrictions apply to this operation. You are not allowed to change a level into an auxiliary if flows are
connected to it.
To change the type of a variable:
1. Right-click the variable you want to change, and select the new variable type on the shortcut
menu.
or
1. Right-click the variable you want to change, and select
Properties on the shortcut menu.
2. On the Definition property page, select the variable type under Variable Type.
3. Click OK to save the changes, or click Apply to save the changes without exiting the dialog box.
Note! To change a level into a reservoir, you must change the level's integration settings
available on the Integration property page.

Delete a Variable in the Equations View
Note! If you delete a variable (submodel) that has diagrams, you cannot undo the deletion! The
deleted variable, all its child variables, and all its diagrams will be lost.
1. Select the variable and hit Del, or right-click it and select

Delete on the shortcut menu.

The variable is removed from the model itself, and will therefore disappear from all the diagrams it
previously was included in.
Note! If you delete a variable, you may render other variable's definitions invalid!

- 283 -

. these child variables will also be deleted.284 - .Note! If the variable you delete contains child variables.

You are then allowed to refer to the given range name when you use the range definition. index variables allow you to select elements to view in a control. Adult Females. By connecting the index variable to a switch control. This is what Studio itself does when it automatically creates dimension definitions.285 - . Young Females. They are useful for different purposes. Alternatively. Global and Local Ranges and Index Variables There are two different views in which you can create and define ranges and index variables. Creating named ranges makes it easier for you to ensure that all your dimension definitions are identical throughout your model. the new dimension is instantly recognized by all your array variables using the same range definition. Born Males. Second. Named ranges also make it easier for you to change the dimensions across your project. ! An enumerated range is a list of enumerations by which you refer to the various array elements. only be available to the component in which it is defined. index variables can be used in the FOR function. and enumerated and numerical subranges.Work with Ranges and Index Variables Ranges and dimensions Ranges are interval definitions that can be used to specify dimensions for array variables. Old Females. An example is the named range 'Population Groups'.' (punctuation mark). You can create unnamed ranges by simply using the range definition directly. you can create a range with a unique range name. you should prefix it with a '. You can also define ranges locally for each component. to declare the dimension part. To refer to a local range. Types of Ranges There are three types of ranges in Studio: Enumerated ranges. as the name implies. Ranges can be specified in two different ways. if you use a range definition many different places in your model. By changing the definition of your range. Index variables Index variables are also defined in the Ranges view. you can easily change the value being displayed in another control. for example a time graph. First. A local range will. Young . Global ranges are available to all the components in a simulation catalog. defined as 'Born Females.

Index variables can be defined in various ways: ! ! ! By another range. Given the example above. The subrange will then contain the elements of the enumerated range between these borders. while the other will contain all elements containing males. .! ! Males. the value of the index variable will step through the range from the lower to the upper limit automatically for each iteration. When you define an enumerated subrange. an enumerated subrange is a subset of an enumeration. you can use a Switch control to allow the user to select the value of the index variable manually (see example below). indexed from 1 to 5. As a numerical subrange. As an enumerated subrange. be sure to use the Rename Elements command available on the shortcut menu of the range. The numerical subrange defined as 1. Index variables can either be defined locally (within the FOR function) or in the Global or Local Ranges View.286 - . Alternatively.. you can refer to the elements of the array using these enumerations rather than index numbers.'Old Females'. If you use the FOR function. for example. A numerical subrange is similar to an enumerated range. Adult Males. To define it.'Old Males'. Since the value of the index variable can be either a numerical or an enumeration element. This means that even if you have two (or more) windows open of the same simulation. and one subrange Males defined as 'Born Males'. The value of the index variable itself will vary within the limits defined. Old Males'.. you can view different parameters in different windows even if it is the same simulation. Note! When renaming enumeration element names. Only index variables defined in the two ranges views are accessible outside the variable definition itself. you specify the lower and upper integer to use as range elements. The first subrange will contain all elements containing females. Changing the names of elements directly in the Property Page or definition text will redefine rather than rename elements! About Index Variables Index variables can be used to access or define various elements of an array. if you have connected the index variable to a switch control to select parameters to view in a time graph. the value of the index variable will be independent between the two windows. The index variable definition defines the range of the variable. When you use this range to define an array. you must specify the lower and upper elements of an existing enumerated range. we can create one subrange Females defined as 'Born Females'.5 will contain five elements. with the exception that the numerical subrange is actually a subset of the range of all integers. Say. you must use the NUMERICAL function when using the index variable within a definition (see example below) The value of an index variable is independent of the simulation and of other simulations. This is a highly useful way of making your model readable and easy to understand..

West index 'Graph Selector' = Regions Index variable used in controls The range Regions can be used for many purposes. The sales for each region is shown in a time graph. (Click the radio buttons to illustrate the functionality. but let's consider an example where it is used to identify the sales in different regions of. since a globally defined index variable can be either an enumerated or a numerical subrange. you can create one time graph where all four elements are parameters. say. However. a country. aux Auxiliary_1 = FOR('Graph Selector' | NUMERICAL('Graph Selector')) = {1. either as a time graph with all the elements displayed simultaneously. The illustration below shows how the simulation can be presented in two ways. The top time graph displays the sales for all four regions simultaneously.Examples The following examples uses the range Regions and the index variable Graph Selector. where you select one array element as the parameter in each time graph. 4} . The switch control allows you to switch between the various regions easily. South. First. defined as below.287 - . East. the index variable is used in the same way as an internal index variable would normally be. The lower time graph shows the sales for each region individually.) Index variable used in FOR function The index variable can also be utilized when the FOR function is used to define variables. you can control its value and thereby which element to view in the time graph. 2. Second. you can create one time graph for each region. There are three ways in which to achieve this. Third. you must use the NUMERICAL function if you want to use the value of the index variable in the definition. 3. By connecting the index variable to a switch control. The simple example below shows how you can use a globally defined index variable within the FOR function. or by using the index variable and a switch control. These are both defined in the Global Ranges view: range Regions = North. you can create one time graph where the Graph Selector is the parameter for the time graph. In such a case.

Double-click the index variable to define it on the Definition property page. Open the Global Ranges view by double-clicking its entry in the Project Window. and select Add Range on the shortcut menu. 2. 4. 2. Open the Global Ranges view by double-clicking its entry in the Project Window. 2. 3. 3. Double-click the range to define it on the Range Definition property page. If you use it in a variable definition before it is properly defined. 3. A local range is prefixed with a '. or select Global Ranges under Catalog Windows on the View menu. A newly created range will be undefined until you have defined it on the property page. An undefined range is indicated in the Global Ranges view with a red question mark.Add a Global Range 1. 4. Define an Enumerated Range An enumerated range specifies a series of named elements that is used as indexes rather but than . Hit F2 and enter a name for the new range. hit F2 and enter the definition. Hit Enter when you've finished typing. or select Global Ranges under Catalog Windows on the View menu. Right-click somewhere in the white space inside the view. Open the Local Ranges view by double-clicking its entry in the Project Window (located under Component and Simulation). Right-click somewhere in the white space inside the view. Create an Index Variable 1. To add a local range: 1. and select Add Index Variable on the shortcut menu.' (punctuation mark) when you use it in variable definitions. and select Add Range on the shortcut menu. Note! You can also create a local index variable in the same way in the Local Ranges view. or Select the Definition field in the multi-column view. 4. Right-click somewhere in the white space inside the view. the variable definition is not accepted as a valid definition. or select Local Ranges under Simulation Windows on the View menu. Hit F2 and enter a name for the new range. Double-click the range to define it on the Range Definition property page. Hit F2 and enter a name for the new range.288 - . Add a Local Range A local range is available only to the component it is defined in.

and hit Enter. Adults. Enter a name for your new element. East. South. This will select the name of the next range element ready for input. 3. and select Add Range on the shortcut menu.. and select Add Element on the shortcut menu. . The subranges North. Young. and expand it to display all the range elements in the list. Old are examples of enumerated ranges. Enter a new name for your new range. Rename Range Elements You can rename the range elements of a range in the Global Ranges or Local Ranges view. and hit F2.289 - Properties on the shortcut menu. Right-click inside the Ranges View. West and Infants.. Select the range element you wish to rename. 4. Reorder: Select Move Up or Move Down to change the order of the range elements. Right-click the new range. The range elements are shown as nodes below the range they belong to in the Ranges View. Locate the range containing the range elements you wish to rename. Tip! If you wish to quickly rename several elements in one process. 2.integers. Repeat step 2 for all the elements you wish to add to the range. you can hit Arrow Down rather than Enter when you have entered the first name.South and Adult. Define an Enumerated Subrange An enumerated subrange specifies a continuous interval of enumeration elements from an enumerated range to use as index arrays. or right-click it and select . 1.Old are examples of enumerated subranges. 2. rearrange them. Note! Before you can create an enumerated subrange you must define an enumeration range to base it on. Double-click the range to define. You may also enter the range definition directly in the Definition Text box in the Properties dialog box. Deleting and sorting range elements By right-clicking any range element in the list you can ! ! Delete: Select Delete to delete the range element. The ranges North. To define an enumerated subrange: 1. Open the Global Ranges (or Local Ranges) view. This makes it easy to edit their names. 3. Enter the new name of the range element. and add more range elements to the range. To create an enumerated range: 1.

enter the range you wish to use in the Dimensions box. Select the Subrange option. Select the Subrange option. in the Enumeration box. Any variable can have more than one dimension. 3.20 are examples of numerical subranges. The subranges 1. You may also enter the range definition directly in the Definition Text box. Enter the first element of the subrange in the First box. 6. and you can use ranges for all of the dimension definitions. Click OK to save the changes. the Dimensions box will already have a definition. 2. . 3. If the variable is defined by an expression that automatically yields an array definition. will have two dimension definitions. a matrix. You may also enter the range definition directly in the Definition Text box. Ranges can also be used when defining index variables (for example in the FOR function). and so on. or right-click it and select Properties on the shortcut menu. Double-click the range to define. (Select an enumerated range to create an enumerated subrange. or Apply to save the changes without exiting the dialog box.) 4..2.. Click OK to finish the definition. All previously used dimension definitions will be available in the box. To define a numerical subrange: 1. 6. 5. In the Definition page. (Select <numerical> to create a numerical subrange. or right-click it and select Properties on the shortcut menu. In this case. 5. A variable with two dimensions. or click Apply to apply the changes without closing the property page.290 - .5 and 4. a three-dimensional will have three. 2. Enter the last element of the subrange in the Last box. or click Apply to apply the changes without closing the property page. You can either enter the number directly or use the spin buttons. 3. Click OK to finish the definition. Select the range that you want to base your subrange on. Select the last element of the subrange in the Last box. You can either enter the number directly or use the spin buttons. the range(s) you specify for the variable must be compatible with the ranges automatically found by Studio. To specify a global range: 1. Select the first element of the subrange in the First box. Double-click the variable. Define a Numerical Subrange A numerical subrange specifies a continuous interval of positive integers used to index arrays. Specify a Global Range for a Variable You use ranges (and named ranges) to specify the dimensions of a variable.) 4. Select <numerical> in the Enumeration box.

In the Definition page. enter the range you wish to use in the Dimensions box. 3. and hit Delete. the multi-functional list on the bottom of the property page will show the named ranges. or select Global Ranges under Catalog Windows on the View menu. and so on. To select an explicit range: 1. or right-click it and select Delete on the shortcut menu. In the Definition page. Furthermore. or right-click it and select Properties on the shortcut menu. and you can use ranges for all of the dimension definitions. the definitions of any other variables that depend on them will also become invalid. All previously used dimension definitions will be available in the box. The range must be prefixed with a punctuation mark (. To specify a local range: 1. 2. . Tip! After selecting the Dimensions box. Delete a Global Range or Index Variable 1. or Apply to save the changes without exiting the dialog box. the multi-functional list on the bottom of the property page will show all the defined named ranges. 2. Double-click the variable. this operation will render the definition of these variables invalid. enter the range you wish to use in the Dimensions box. Open the Global Ranges view by double-clicking its entry in the Project Window. 3. Click OK to save the changes. Select the range you wish to delete in the list.291 - . Ranges can also be used when defining index variables (for example in the FOR function). a matrix. Any variable can have more than one dimension. 2. or right-click it and select Properties on the shortcut menu. will have two dimension definitions.).Tip! After selecting the Dimensions box. A variable with two dimensions. Double-click the variable. or Apply to save the changes without exiting the dialog box. Explicitly Select a Range for a Variable You can explicitly select the dimension of a variable expression provided the range you select is compatible with the calculated range. Note! If you delete a range or index variable that is in use by variables in your model. Specify a Global Range for a Variable You can use ranges to specify the dimensions of a variable. Click OK to save the changes. a three-dimensional will have three.

Select the range or index variable you wish to delete in the list.292 - . Furthermore. Note! If you delete a range or an index variable that is in use by variables of your model.Delete a Local Range or Index Variable 1. . or select Local Ranges under Simulation Windows on the View menu. and hit DELETE. Open the Local Ranges view by double-clicking its entry in the Project Window (located under Component and Simulation). this operation will render the definition of these variables invalid. or right-click it and select Delete on the shortcut menu. 2. the definitions of any other variables that depend on them will also become invalid.

or you can summarize them over a given summary period. This is identical to letting the variable control a flow into a level. You can either record them using the highest possible resolution (normally one value per time step. Summary types are available for parameters in controls. Average: Record the variable's average value over the summary period. The figure below illustrates the difference between the various summary types when applied to a variable showing a linear growth. Minimum: Record the variable's minimum value over the summary period. Accumulated: Record the variable's accumulated value over the summary period. but the summary period they use are defined in different ways. and then report the level's value. and Risk Assessment variables.293 - . unless the size of the simulation doesn't permit it). . The summary types behave identical for all these types of parameters and variables. dataset variables use the selected reporting period for the dataset. dataset variables. When using summary types. These are: ! ! ! ! ! ! First: Record the variable's value at the start of the summary period. Last: Record the variable's value at the end of the summary period. While control parameters and Risk Assessment variables use the major interval as specified in the Report tab of the Simulation Settings dialog box. each data point will represent a summary for the past period rather than the exact value at a given time.Work with Summary Types Powersim Studio features two ways of recording parameters. Maximum: Record the variable's maximum value over the summary period. When you choose to record summaries you can select from different summary types.

the accumulated parameter's unit will be ppl). Zero Order Immediate flows are performed immediately before the current time step starts. during the time step. The reason for this is that the calculations of flows controlled by these auxiliaries are performed at various times during the time step. Note! When using the Accumulated summary type. Summary Types and Discrete Variables Discrete variables are variables where the Integration Order of Controlled Flows is set to either Zero Order or Zero Order Immediate. Certain limitations apply when using summary types on auxiliaries with zero order integration order. Zero Order equals Incoming. This can be seen as the First value being the value at 4/1/2003 00:00. .294 - . This is illustrated below. Note! The First value of the next period equals the Last value of the current period.The graph shows a linear variable shown with various summary types and a summary period (major interval) of one quarter. It will always be the variable's unit multiplied with time (if the variable's unit is ppl/da. while the Last value is the value as 3/30/2003 24:00. while Zero Order flows are performed at the same time as other flows in the system. An auxiliary that is defined as Zero Order Immediate is considered an Outgoing value from the previous time step. the unit of the resulting parameter will not be identical to the variable's unit (except if the integration order of the variable is Zero). and Zero Order Immediate equals Outgoing An auxiliary that is defined as Zero Order is considered an Incoming value to the current time step.

Average is Undefined for Zero Order Variables The Average summary type is not available to Zero Order parameters. The engine calculates one transaction per timestep. you will notice that either the Incoming or the Outgoing summary type will produce undefined numbers consistently: ! ! When using Zero Order integration. Discrete flows are calculated at different times depending on their integration setting. This can be illustrated by considering two examples of loan payments. In the first example. we have a timestep of one month and a summary period of three months. When using Zero Order Immediate integration. Zero Order flows are calculated along with ordinary flows. The reason for this is the nature of zero order flows in the simulation engine. Reporting simulation results for the time step. while Zero Order Immediate flows are calculated at the start of the current time step before the values of the time step are reported. Calculating all flows controlled by ordinary or Zero Order auxiliaries. the instalment is $300 every third month. In both cases. it still counts as a transaction.Calculating auxiliaries and constants. the values will change. There are three timesteps in each summary period. so the average payment per transaction would be $100 in the first case. in the second case. However. but only one transaction. the result of the average would be dependent on the summary period. while it should have been $300. Incoming is always undefined. there is still three timesteps. while in the second example. if we change the summary period to four months. The average becomes $100 per transaction. at the end of the time step and before values for the next time step are reported. a monthly instalment of $100 is used. Hence. . The table below illustrates this behavior. so even if the value of the transaction is zero. However. Calculating all flows controlled by Zero Order Immediate auxiliaries. When you apply a summary type to a parameter based on a zero order variable.295 - . since the average would be calculated as the sum of all transactions divided by the number of timesteps within the summary period. Outgoing is always undefined. which is correct.

296 - .Summary period: 3 months Time Case 1 Case 2 1/1/2003 $100 $300 2/1/2003 $100 $0 3/1/2003 $100 $0 Average $300/3 = $100 $300/3 = $100 Summary period: 4 months Time Case 1 Case 2 1/1/2003 $100 $300 2/1/2003 $100 $0 3/1/2003 $100 $0 4/1/2003 $100 $300 Average $400/4 = $100 $600/4 = $150 If you need to display the average of discrete variables. we suggest you create a simple model structure to calculate it for you the way you need it to be. .

Instead. You will therefore not find step by step instructions here. Each array variable consists of several elements. This chapter assumes that you have a good knowledge on how to create variables and define them. or arrays. A scalar model and an array model with four layers.Work with Arrays Arrays are variables that can hold sets of values rather than single values. for more advanced use. Arrays may be one-dimensional. or multi-dimensional. One array variable can hold several values. Array variables may be used in many different ways. and model various other behaviors. You can easily create arrays that match each other by using named ranges and subranges. The dimensions of the array specifies the size and structure of the array. also called matrices. you will find examples of variable definitions. while reducing the amount of work necessary to create and maintain a model. as opposed to an ordinary scalar variable. This is illustrated in the figure below. When linking together several array variables with the same number of elements in a model. Arrays can be used to create layers in a model. Why Use Arrays? An extremely powerful feature of Powersim is the possibility to define indexed variables. At each layer the variable elements are interconnected. create queues. which holds only a single value. Arrays make the flow diagram smaller and more presentable. you can depict the model as a stack of layers. also called vectors. You may treat the layers as four individual models or. and explanations on how to work with arrays. .297 - . Named ranges also makes your model easier to understand. which will be described below. make connections between variable elements on different layers of the model.

. The ranges 1. The population example can easily be modeled using an array level rather than single levels. An array with the dimension 1. imagine a model of a population accumulated into three levels: Young. Thus.South and Young. structured as a vector. ! Enumeration Subranges: An enumeration subrange is a subrange of a enumeration range. since each level represents a group of people in a population.. In the Constructor diagram. A numerical subrange is a subrange of all integers rather than an enumeration range. ! In the Population example..20 are all examples of numerical subranges. all groups can be represented using a single level with three array elements.Using Arrays to Represent Groups of Values By defining a variable as an array. and the changes would be immediately recognized throughout the model. East. They are structured in a 3x3 matrix (table).... However. you will have to change these throughout the model. You can define three types of ranges: ! Enumeration Ranges: An enumeration range contains a set of (labeled) elements. you can refer to the named ranges rather than the numerical dimensions (actually numerical subranges) used above. To demonstrate the power of arrays. we can create the range Regions defined as North.. An array with the dimension 1. Adult. Altogether.. on the other hand. Old..1. Using scalar variables. Dimensions and Ranges An array's dimensions specifies the number of elements and the structure of these elements. we could create the enumeration range 'Age Groups'. the array will have 9 elements. The subranges North. South. used named ranges. When you later specify array variables. -3. Numerical Subranges: An numerical subrange is similar to enumeration subranges.. it would be a good idea to use the named range 'Age Groups' rather than give the level the dimension 1. you could change the definition of the range itself. defined as Young. with the exception that it contains numerical value instead of named elements. And for the example above. If you have entered numerical subranges directly into the definitions. and 10. Adult. If you. we would need three different levels to represent each of the age groups. The reason for this is that you might later want to expand the population model by new age groups. Global and Local Ranges offer the capability to predefine such array dimensions as named ranges. and Old.3 has three elements.4. an array variable is represented by a symbol with a double frame.3. West.3. a group of related values may be represented as one variable.3.Adult will be subranges of the enumeration ranges described above. An array will be represented by a double-framed variable symbol.3 has two dimensions.298 - . and since each age group will have similar characteristics and model structures attached to them.

and the change is immediately reflected in all the array variables that uses the same range. When the structure is finished. you can simply redefine the range in one place.. ! ! ! Maintainability: Changes to an array structure immediately takes effect for all elements of the array. and wages) and so on.9 | Container[i]*1<<1/da>>) dim 'In Transit' = 1. It is easy to identify duplicate structures. different accounts payable (for example marketing expenses. and make sure that it behaves the way you want. you simply add one dimension to each layer in your model. If you want to make a model of four competing companies. different market segments. Complexity: Models can sometimes become significantly smaller when using arrays.299 - . You carefully model each structure. such as different kinds of workers. you might include work force. If you make a business simulator. By creating a flow with as many elements as the delay of the flow. different kinds of capital (for example buildings and machines). markets.9 aux Output = Container[10] dim Output = 10..1 aux 'In Transit' = FOR(i=1. you can model these structures once and use them as many times as you wish. goods.. The model shown below illustrates how to model such a queue.10 level Container = 0 . taxes. How to model a queue in Studio. Create Queues Using Arrays You can easily create queues using arrays. this would involve four similar structures. for example. different product lines.Create Layered Models Using Arrays Models often contain a lot of identical or almost identical structures. Once a model of one company is developed. you can add more companies by adding a company dimension to each array variable in the model. This layering of models is easily achieved by the use of arrays. and finance. and then let the array elements flow one element up in the array for each simulation step. Layering of models gives you two important advantages.. production. Dimension changes: If you use ranges when creating your models. The main difference consists of parameter values (constant auxiliaries) and levels. By using arrays. The equations for the model are: aux Input = <The Input> * 1<<1/da>> dim Input=1. capital.

If an array element is an array.N'. Element2. Arrays can also be created by using the FOR and CONCAT functions.).10 flow Level = + dt*FillInZeroes(Input) .1]. then all the elements must have the same dimension. Indexing Arrays Arrays are indexed by using the syntax Array[<index-expression>] where <index-expression> identifies the elements in the array.300 - ... Array Syntax Creating Arrays Arrays are created by listing the elements of the dimension inside '{'and '}' (braces). Array[1. numerical or enumeration subranges). Examples: Array[1]. The table below summarizes the legal index expressions.dim Level = 1.. function expression. and explains how they work.and also the elements of enumeration subranges . Array[1. and can be either subranges (numerical or enumeration) or named ranges (enumeration ranges. ElementN) giving the automatic dimension of '1.dt*SuffixZero('In Transit') + dt*PrefixZero('In Transit') . The named ranges . when Input is defined as a sine wave.must be defined as either local or global ranges. Assigning dimensions to a (scalar) variable definition also creates an array with identical elements. (A and B denote an integer. The graph below shows the result of the model..) Index Description A An exact position within a dimension.dt*FillInZeroes(Output) The flow definition will automatically be inserted based on the dimension of the various variable and dimension definitions.1. or an array itself. An array element can be a literal. Dimensions define the structure and number of elements in the array. etc.1]. The syntax is {Element1. You can override the automatic dimension by entering a compatible range expression for the array manually. .. . You can include one integer per dimension.

?. <indexexpression> follows the syntax described above. You can enter a variable definition and let Studio automatically detect the dimension of the array.. If the starting or ending point is replaced by '?' (question mark).4].B Indexes a range in the array. which also illustrates how arrays are defined in the most basic way. the dimension will be .?] A[*. Automatically Detect Dimensions You can create arrays in several ways that will make Studio automatically detect the dimension of the variable. etc. If the '*' is used at the end of the expression.2.. Array[1.4. however. All elements in the dimension are returned. Redimensioning Arrays Arrays can be redimensioned to temporarily change the dimension.). is by listing the array elements separated by list separators.*. Array[*. * Indexes the entire dimension.. The syntax is Array[<redimension-expression>:<index-expression>] where <redimension-expression> identifies the new start end value for the dimension. A[3. an array with one dimension containing four elements. that if you explicitly set the dimension of the array.4 // Automatically detected Note! When a dimension is defined automatically. The elements in the range (including A and B) are returned.A. or you can explicitly set the dimension of the array yourself.6:4] A[*.. can easily be defined using definition below. The index expression must be constructed based on the new.4:2.2. The easiest way..3].). respectively.2]. The redimension expression can also be open (ending or starting with '?' (question mark).2].3. You can include one range per dimension. as well as named ranges.*]=Array[1]. Array[*. it will be defined with a starting point of 1. A[?. Thus. You can include one '*' per dimension.99}.301 - .3. and using '{' and '}' to enclose the dimension..6:2. you can omit it. Studio will automatically detect the dimension. temporary dimension.6...... etc.4] Create Arrays There are two ways of turning a variable into an array. You should note.4} dim Variable = 1. The redimension expression can contain be both numerical or enumeration subranges. aux Variable = {1. Examples: Array[1. the range includes all elements from start or all elements to end.2. Examples: Array[1. the dimension must match the dimension of the variable definition...?]. If you define an array with the variable definition {26.4]. Examples: A[1.

but use the named range.. you must make sure that the dimensions match. In this case you can enter a "scalar" definition. it can cause trouble. If the array should contain more than one dimension. Ranges are useful because the number of elements within them can be altered later without causing a need to go through the entire simulation model and change definitions accordingly.automatically set to '1.1.2}. range Regions = north. The example shows how another variable can index the array we have created.4}.20}.0}.0}} In some cases you might find that the automatically detected dimension is not correct for your use.8 aux Variable_2 = FOR(i=3. To gain the full effect of ranges. as is shown below. The dimension is entered in the Dimensions field for the variable. In this case you can override the automatically detected dimension. Thus.east.6}} dim Variable = 1.8 result Variable_2 = {{14.. then the explicitly assigned dimension must also contain four elements. aux Variable_1 = {{7. as shown below. If you are performing operations related to other arrays with other dimensions.south. Assign Dimensions Explicitly Sometimes the expression that defines each element is identical for all the elements in the array. the same syntax can very well be used even if the various elements are function expressions.172}} Note! When you assign dimensions to an array.' (punctuation mark).{19.3.{3..j]*2) dim Variable_2 = 3.east. and specify the variable's dimension explicitly. The only difference between these is that local ranges are referred to with a preceding '.{0.86}} dim Variable_1 = 3.j=7.302 - - defined as .. aux Variable = {{1.8 | Variable_1[i.7.2 // Automatically detected The examples have shown how arrays can be built up using literals only.west aux Variable = 0 dim Variable = Regions Regions // Added to Global Ranges // Manually assigned .. aux Variable = 0 dim Variable = 1..2.{5.. it is therefore important that your model doesn't refer to array elements directly. Create Arrays Using Ranges and Subranges Named ranges and subranges can be defined as either global or local ranges. If the automatically detected dimension contains four elements..2 // Manually defined result Variable = {{0.south. then the elements of each dimension must be enclosed in '{' and '}' (braces).west' .7.1... an array containing two dimensions (a table) can be entered using the definition below.4.10}. The example below shows how the global range 'north.3'.is used to define a variable..{38. However.4.4.

'Age Groups' // Manually assigned result Variable = {{0. . a change in the named ranges will automatically be recognized throughout the model. remember to enclose them in apostrophes ('). is {Element1.in conjunction with the Regions range above.1.10} {{3.0... Each element may also be an array.0}} Note! When using names with spaces or other special characters. It is important that all the elements share the same dimensions.2}.old aux Variable = 0 dim Variable = Regions.0. You can add index variables to the dimension expression in .west // Added to Global Ranges // Added to Local Ranges range 'Age Groups' = ..{0. range Regions = north.south...2..{3. B} will produce an array with one more dimension than A and B have.0.2}.6}.2. {3. are the various array elements. Note! All elements listed within one set of braces must share the exact same dimensions. Build Arrays Element by Element The syntax for defining arrays element by element..youth. The arrays will automatically be resized to the new dimensions. A and B must also share the same dimension. .8}} {{{1. The definition aux C = {A. .4}} {{5. Element2.. remember the preceding '.0.6}. ElementN} where Element1. Element3.. A B C dim C 3 2 {3.{6.2} 1..2 Build Arrays Using the FOR function The FOR function offers a convenient way of building arrays.1..2}.{0.youth. .{{5. It is not sufficient that they have the same number of elements in each dimension. The table below shows a few examples for given A and B.2.0}.east.adult..2 {{1. It uses the local range 'Age Groups' .2} {6. {7.8}}} 1.old' . Given the definitions above.0.' (punctuation mark) for both range and range elements.adult.defined as '. when referring to local ranges.result Variable = {0.1.0}. Also.0} All the dimensions in a dimension definition can be named ranges.10}} 1.{0.0}.0.. since the function takes the resulting array's dimensions as input parameters.4}}.2 {3.303 - .. as the following example suggests. {7..

3. You cannot explicitly assign dimensions to a variable defined by the FOR function.304 - .south.2.9'...w FOR(i=.. the index variable i is used to define the array elements..7.3.8.0.9. and cannot be used outside the function (the expressions F(i=1..2)) {{1.1..j=3.9.youth.8 | i) {4.2.1.6.3. It exists only internally in the FOR function.4}.. . In some of the examples. instead of using the expression A[i-1] (in which case the dimension of the index variable will be '0.10 aux B = FOR(i=1..6..5. aux A = {1.' (punctuation mark) must be added in front of the range or element name.3 FOR(i=4. a '.4.1}.3 | 0) {0.7. If the dimensions doesn't match. Note! The resulting dimension for the variable is derived from the expression directly.1}.'Age Groups' | NUMERICAL(i)*100) {100. Index variables can be used to compute values or to index other arrays.8. If you are sure that your variable expression handles the index variable correctly.the first part. you can specify various definitions for various parts of your array.6. defined as {1. The dimension of the index variable must match the dimension of the array it is used to index.9} .1.10')..6.0} 1. Thus. {2.. .8 FOR(i=Regions | i*2) {2.5.infants . Expression Result Dimension FOR(1.10} dim A = 1.5.4.8. as shown below. 400} .west range 'Age Groups' = ..old' // Added to Local Ranges Note! When referring to local ranges or range elements.10 result B = {10.2..adults.{2. The second part of the input parameters contains the element definitions. .3 You can also use the index variable in the FOR function to index an array.8} 4.3 | IF (i<=j.10} (dimension automatically detected to '1.1.10 | IF(i>1.5.4 | i*j) {{3. which is outside the dimension of A and therefore will cause an invalid expression). . By using the IF function.{6.4. The table shows a few examples on how the FOR function can be used to define arrays.3.3.old FOR(i=1. you can use the INDEX function to index the variable.7. and inserted into the Dimension field of the property page.8} 1...3 | 1)*i is not allowed)..6.east..4 FOR(i=1.1}} 1.infants.. 200. A[INDEX(i-1)]. you can use the expression A[INDEX(i-1)].2. The examples use the following range definitions that must be added to your simulation project to make the examples work: // Added to Global Ranges range Regions = north.7.2.j=1.3. The example below illustrates how a combination of the FOR and IF functions is used to shift the elements of an array A.8. 300.1. Studio will regard the variable expression as invalid.10} n.4.. A[10])) dim B = 1..2.

Note! A dimension is open only when the array is created immediately.1.5.3}.2.5.11' for Input3..4 | i+j)) dim Variable_2 = 1. '9. '2. The index expression can be an integer (to uniquely identify one array element).concatenate arrays . The index of an array element is relative to the dimension definition and to the position of the element inside the array. Input2.3.{1.2. The syntax of the function is CONCAT(Input1.3.9}) dim Variable_1 = 1.5. The dimension of an array that is indexed is reduced by the number of indices that is used. as in the expression {1.Build Arrays Using the CONCAT Function The CONCAT function .2}.6.can be used to construct arrays. j=1. The CONCAT function can be used in conjunction with both the FOR and IF functions.. The last dimension can. … must share all but one dimension....1' for Input1. aux Variable_1 = CONCAT({1.5}.8.3.{7. as an example. FOR(i=1.8.4.7}} Index Arrays The elements of an array can be accessed by its index value.4 result Variable_2 = {{0. .) where Input1. and so on..9} aux Variable_2 = CONCAT(FOR(i=1.4.305 - ..4. and is thereby capable of creating the most advanced array expressions. a numerical subrange (to identify two or more array elements).3.. The example below shows how the CONCAT function is used to concatenate various array expressions.6. j=3.. be '1.9 // Automatically detected result Varilable_1 = {1.6}.2 | i-j). or an '*' (asterisk) (to identify all elements in a dimension). The array can be indexed by the following syntax: Array[<index-expression>] where <index-expression> is the index dimension for the element(s) you wish to index. Input2.6}. .. The last dimension must be either open or sequential.{3.1.7. This is illustrated in the figure below.{2.8' for Input2... The figure illustrates the relationship between the dimensions of an array and the index values of the array elements.-1.0.

. making the expressions A[1. If the variable you have computed is a real. for convenience named Array.INDEX(INTEGER(B))] = 4 . This is useful if you have one variable that computes the array element you need to index.57.94}.51. etc.42.19.5.15. Result: <--Result--> Dimension: <--Dimensions--> Note! The two last examples shows how an array can be redimensioned in Studio. while another variable contains the array itself. you can use the INTEGER function to convert it to an integer.1.4.5') is presented in the first row. aux Array = {{3. {69. Trailing '*'s can be omitted.63. The example below illustrates this use of the INDEX function.68}..35. is defined as: aux Array = {{48.0. The first index refers to the first dimension. Examples The illustration below demonstrates how a two-dimensional array can be indexed in various ways..*] and A[1] identical.. {97.11}} dim Array = 1..4.1.1} aux Result2 = Array[INDEX(A).67.39.3}. The index of the first dimension is presented in the first column. and is presented as such below.5 // Automatically detected Array can be compared to a table. Index Arrays Using INDEX Function The INDEX function allows you to convert a normal variable into an index variable. while the index of the second dimension ('1.2. Redimensioning affects the dimensions of the resulting array.When indexing arrays.1}} aux A = 2 type A = Integer aux B = 3 type B = Real aux Result1 = Array[INDEX(A)] = {6.{6. The input parameter for the INDEX function must be an integer (data type).45. {8. the index expressions refers to the dimensions as they are defined for the variable. 1 2 1 48 39 3 4 5 0 42 94 2 69 57 19 51 18 3 8 15 35 63 68 4 97 1 67 45 11 Definition: Select an expression. The array.18}. the second to the second dimension.306 - .4.3.3.

that you ensure not to index a value outside the dimension of the array.Using INDEX with FOR and IF The INDEX function can also be used in conjunction with the IF and FOR functions.9. if they are defined using named ranges.307 - .7} = 5 = 6 Index Arrays Using Ranges and Subranges If an array's dimensions are defined using ranges or subranges.10'). then you have to revisit every array throughout your model to resize the arrays. as this will return '?' (NAN). By using the INDEX function instead. and the index(-es) as its next parameters.7}} The integers used as indices in the examples below can be replaced by integer variables. aux Array = {1. you use the element name rather than the index number to access each array element.4. Studio will not accept an index variable if its dimension exceeds the dimension of the array it tries to index.6. '1.5} {2.10} aux Result = FOR(i=1. The expressions are based on the following array: aux A = {{4.3..10 | IF(i<10.g.3 LOOKUP(A.j) = Array[INDEX(i). Array[INDEX(i-1)]. A[10])) Use Basic Variables as Index Variables The LOOKUP function allows you to look up values in an array.. you can change the definition of the .2.6.1.3 LOOKUP(A. you can avoid this dimension matching check. Examples The table shows a few examples on how to use the LOOKUP function. LOOKUP(Array. This is an alternative to using the INDEX function.3) LOOKUP(A.2) {4. The LOOKUP function takes the array as its first parameter.{9. The dimensions are automatically found by Studio when you click Apply.8.INDEX(j)] Note! The variable used as an index variable must be defined with INTEGER as its datatype.3.1) = 1.1. aux dim aux dim aux aux B B C C D E = = = = = = LOOKUP(A..3) = 1.5}. Be aware. However..7. The advantage of using named ranges and subranges is apparent when you need to resize your model to accommodate new array elements. The following example shows how the contents of an array can be shifted.1.6.{2. The expression below shows the relationship between LOOKUP and INDEX. If the arrays are defined either automatically or by numerical subranges directly (e.i.8}. however.5.3.

.20} dim 'Result 3' = 1.south.18. the redimension expression must have the same number of elements as the dimension of the array you are indexing.4 | 'Array A') = {34.40.67.2.west // Added to Global Ranges aux 'Array A' = {34.1.6}.east.2} aux 'Result 3' = Array[south.8}} . In this case.3.62.. aux dim aux dim aux A = {{1.5.2. The redimension expression can be open in either end.west // Added to Global Ranges aux Array = {4...4]) = {{1..40} aux 'Result 2b' = REDIM(1.4:3..?].1.?:5.62.'Array B'[5.. By adding the new dimension of the array before the index expression..2.4}} A = 1.9} dim Array = Regions aux 'Result 1' = Array[north] = 4 aux 'Result 2' = Array[east.{7. and the change will propagate throughout your model.B[*.{3..south.42.13. you can give the array new dimensions that will only be used within the current function expression..20} dim 'Array B' = 1.west.4 aux 'Result 1' = 'Array A'[1.. In this case you must observe that only one of the dimensions differ from each other.40} aux 'Result 3' = CONCAT('Array A'[1.2 'Result 1' = CONCAT(A.13. The example requires the global range Regions to be defined as north... Since you cannot concatenate arrays that have the same dimensions. Needless to say.range.2 B = {{5.8 The example below shows how to redimension and concatenate two arrays with two dimensions each.4:?. The following examples illustrate how to use named ranges.4] = {34. The syntax is shown below.south. you can use the powerful redimensioning syntax in Studio.?:1.6}.18.east.62. The redimension feature is especially useful when used in conjunction with the CONCAT function.18.?] = {34.9} Redimension Arrays Sometimes you might need to give an array new dimensions temporarily. range Regions = north. Tip! You can also redimension an array using the REDIM function.?:2] = 18 aux 'Result 2' = 'Array A'[?. You only have to revisit the boundary models that contain initialization values for the various elements. with the syntax REDIM (<redim_expression> | Array)...1.?] = {2.2}.62.east.67.. Be aware that the index expression must be entered relative to the new dimension of the array.4.. Array[<redimension-expression>:<index-expression>] where <redimension-expression> is the new dimension of the array.7.1.2..9} aux 'Result 4' = Array[Regions] = {4.south] = {1.8}} B = 1. you can redimension the arrays to make it possible to concatenate them.308 - .{3.2.18. range Regions = north.40} dim 'Array A' = Regions aux 'Array B' = {42.

4...dim 'Result 1' = 1.309 - ....2 .1.4}.{7.6}..{5.2}.{3.2.B[3.4]) = {{1.8}} dim 'Result 2' = 1. 1.4:3.4 aux 'Result 2' = CONCAT(A.

When you are using field codes. including variable names and units. and you can change the appearance to suit your needs. . The time series control used to display a time graph of inventory fluctuations over time in two different inventories. Using Field Codes in Controls You can use field codes to automate the layout of controls.About Powersim Controls Dynamic controls constitute the most convenient means of displaying simulation results and letting the user control the values of key model variables. The figure below shows how a time graph control can be used to display inventory fluctuations over time. axis titles. range names. The field codes can be used to insert text into control titles. You can change the summary period for each control individually later. There are several controls available in Constructor. The summary period for each of these will default to the Major Interval specified under Simulation Settings. and time labels. Using Summary Types in Controls Summary types are available in the Time Graph and Time Table controls.310 - . the names presented in controls will change if you change the name of the corresponding variable. saving you a great deal of time when creating simulation presentations. There are several field codes available. etc. These are highly customizable. graph names.

1. Double-click the control. it can be used as an indexing variable for another parameter. Change the values of the Horizontal and Vertical fields to the new position coordinates. slider. Use Index Variables in Controls Index variables are defined in the Global Ranges or Local Ranges views. or right-click it and select Properties on the shortcut menu. Select the Symbol tab in the property dialog box. Slider. Gauge. etc. gauge. Using index variables can simplify complex simulation interfaces a lot! Insert a Control in your Diagram 1. you can select the object and click Properties on the toolbar or in the shortcut menu. 2. Time Table. and table controls allow you to set the value of the index variable directly. Tip! You can change the appearance of a control at any time. and provide a useful measure of controlling which element in an array is being displayed in your control. and Switch. Double-click the control to define its appearance. Alternatively.311 - . Chart. or right-click it.Using Index Variables in Controls Index variables can be used to access or define various elements of an array. Index variables can be used to index parameters in your controls. Click inside the diagram. and selecting options on the shortcut menu. Alternatively. Tip! You can alter the settings of the various parts of the control by right-clicking them. Move a Control A control can be moved in two ways. Click the button of the control you would like to insert in your diagram. and drag the control to the desired size. The controls currently available are: Time Graph. 3. Or 1. Index variables are defined in the Global Ranges or Local Ranges views. allowing a switch control to control the displayed parameters of a time graph. The index variable can be used directly as the parameter in the control. and select Properties on the shortcut menu. You will be allowed to alter the value of the index variable within the range defined in Global Ranges . Select the control and drag it to its new position while holding down the mouse button. Table. 3. 2. allowing you to control the value of the index variable. and provide a useful measure of controlling which dimensions in an array is being displayed in your control. The switch. even when the simulation is running.

Bolts]. IV_Product]. Washers. like this: Index Variable IV_Product = Products // Defined in Global Ranges By selecting IV_Products as the parameter for the switch control. IV_Product]. Nuts]. You can index arrays using index variables in all controls. The controls will now look something like this: The switch control allows you to select which graphs to display in the time graph. Sales[South. select the parameters Sales[IV_Region. The various combinations of indices and relevant index variables will show up in the Parameter list box on the Parameter property page. and Sales[West. IV_Product]. (Click the radio buttons to see effects. Example Let's consider an example and see how the Powersim controls can be used to present the various elements of an array in a time graph by using index variables. you can display the time graphs as region per product group. This allows you to control which dimensions of the control's parameter is displayed by altering the value of the index variable in an input control. and Sales[IV_Region. This is shown below. To achieve this. by setting the value of the index variable IV_Regions.) Alternatively. West // Defined in Global Ranges // Defined in Global Ranges Range Products = Bolts. Washers]. create a new index variable. and Sales[North. Select IV_Region as the parameter for the switch control. Sales[IV_Region. The sales figures are kept in an array. . Sales[East. IV_Product] as the parameters for the time graph. like this: Index Variable IV_Region = Region // Defined in Global Ranges You should insert a switch control and a time graph control in the diagram. Range Region = North. Nuts The variable Sales has the dimensions Region.or Local Ranges. East. we create an index variable IV_Region.312 - . defined by the global ranges Regions and Products. South. and there are four different geographical areas. For the time graph. you can achieve this effect. and we wish to display the results for each geographical region separately. To achieve this. Let's assume that you wish to present the sales of a factory. Products. There are three different products.

(Click the radio buttons to see effects. Hit Del on the keyboard. by setting the value of the index variable IV_Product.313 - . IV_Product for the other. whereas the User mode only allow you to run the simulation and provide input to the variables using controls. While in Design mode you can alter any objects. or select Delete on the Edit menu. move them. IV_Product] as the parameter for the time graph. you need to select IV_Region as the parameter for one of the switch controls. The switch control allows you to select which graphs to display in the time graph.) Finally. resize them.The switch control allows you to select which graphs to display in the time graph.) Delete a Control To delete a control: 1. Toggle Between Design and User Mode Powersim Studio allows you to toggle between Design and User mode. The resulting control complex is shown below. To toggle between Design and User mode: 1. (Click the radio buttons to see effects. Click Toggle Design Mode to toggle between the two modes. 2. by setting the value of the index variable IV_Product. Select the control you wish to delete. To achieve this. and thereby creating a time graph where you can view any combination of the two. and finally Sales[IV_Region. .. etc. you can have one switch control setting the value for each of the index variables.

you can right-click a control to show or hide the parameters. When the button is not depressed.The state of the button shows the current mode: ! ! : When the button is depressed. Studio is in Design mode. Studio is in User mode. Tip! When the simulation is in User mode.314 - . . You can also hide graphs in the time graph or chart controls by right-clicking them and select Hide on the shortcut menu. and you can only interact with the simulation. and you can edit the diagram freely.

Reference parameters thereby offer the capability of comparing the current simulation run to previous runs. However. Select the variables one at a time from the list on the left side. Select the control you wish to change. and drop it on the control. Most of the controls available in Studio allow you to enter new values for their parameters.315 - Add Parameter to . Finally. You can also use Index variables as input parameters in Studio. Drag the variable(s) you wish to display. Some of these can only be read. 3. including minimum. 2. which means that you can use one control to provide input or output for several array elements without cluttering the view. previous simulation run. from the Details Window. average and accumulated.Work with Parameters A control can have two different types of parameters: Active Run Parameters and Reference Data Parameters. Expand the component's folder in the Value Source list. their initial values will be restored when the simulation is reset. If you want Studio to remember the values you've entered in controls between simulation runs. To add active run parameters to a control: 1. Index variables allow you to select array elements to view in controls. reference data parameters displays the value that the variables had in a reference. while some of them can also accept input. Click the Parameters tab in the Properties dialog box. you can use Control parameters to control the simulation settings. you should define their parameter's corresponding variables as permanent. The summary period used differs from control to control. or 1. You can drag the variable from a diagram. and click . or from the Equations View. Control parameters include run information and time related parameters. While active run parameters display the current value of the variables at any time. 4. Summary types allow you to display a summary for a parameter rather than the full time series. maximum. You can select from various types. and click Properties. if the Permanent option is not selected for the corresponding variables. Add Active Run Parameters to a Control The active run parameters of a control are the variables from the current run that you want to display in the control.

316 - .such as the table control . 4. Switch. or Apply to save the changes without closing the dialog box. The parameters that cannot be selected will be marked with a small red sign. Table. Some variables have several dimensions. the reference data parameter will become visible in your control. or Apply to save the changes without closing the dialog box. A reference data parameter has a preceding '*' (asterisk) to distinguish it from active run parameters. and click OK. and click Add Advanced Parameter. Select the control you wish to change. 3. Reference data parameters enables you to compare results from various simulation runs in an intuitive and simple way. 5. 5. . all the possible parameters for a control will be listed in a treeview in the Parameter property page. you must first select a simulation run as the reference data on the Simulation menu. Add Reference Data Parameters to a Control The reference data parameters of a control are the variables from the selected reference run that you want to display in the control. Click the Parameters tab in the Properties dialog box. and click Properties. Select the variable you wish to add a paraameter from the list on the left side. Click OK to save the changes. 2.you might have to perform additional formatting before the parameters are actually shown in the control. The Add Advanced dialog box will appear. You can choose between previously stored simulation runs available in your simulation project. such as the Slider. Select the Reference run option. You can browse through this treeview to find the parameters you want to add. When the reference data has been specified. while others accept both scalars and vectors. Click OK to save the changes. Before you will actually see the reference data parameter in the control. For these variables. To add reference data parameters to a control: 1. Reference data parameters are displayed with a preceding '*' (asterisk) to distinguish them from active run parameters. Some controls accept only scalar parameters. Note! For some controls . Add Simulation Control Parameters to a Control Note! Simulation control parameters can only be used in controls that display the current value of the parameter and that support scalar parameters.add them to the parameter list on the right as active run parameters. and the Gauge controls.

StartTime: Get or set the start time of the simulation. and click Properties. StopTime: Get or set the stop time of the simulation. 4. Select the control parameter you wish to add. and the Gauge control. Timestep: Get or set the timestep of the simulation. Select the control you wish to change. 5. Index variables are defined in the Global Ranges or Local Ranges views. Click the Parameters tab in the Properties dialog box. 4. or Apply to save the changes without closing the dialog box. Alternatively. 3. such as the Time Table and the Time Graph. Add Index Variable Parameters to a Control Note! Index variable parameters can only be used in controls that display the current value of the parameter and that support scalar parameters. and click Add Parameter. 2. Click the Parameters tab in the Properties dialog box. Click OK to save the changes. Select the index variable you wish to add. 2. Table. There are six . while you can use the other parameters to view and change the simulation settings using controls. 3. The available control parameters are: ! ! ! ! ! ! RunCount: Get or set the run count of the simulation settings. Time: Get the current simulation time. RunIndex: Get the current run index. Click OK to save the changes. To add an index variable parameter to a control: 1. and click Add Parameter. Expand the Simulation Control node of the Value Source list. and provide a useful measure of controlling which dimensions in an array is being displayed in your control. Add Parameters with Summary Types Note! Parameters with summary types can only be displayed in controls with a time axis. or Apply to save the changes without closing the dialog box. The index variable can be used directly as the parameter in the control. Expand the Index Variables node of the Value Source list. Switch. allowing you to control the value of the index variable. The two parameters Time and RunIndex are read-only.Simulation Control Parameters can be used to access the run count and time information of the current simulation.317 - . Both Active run parameters and Reference parameters can utilize summary types. it can be used as an indexing variable for another parameter. 5. Select the control you wish to change. To add a simulation control parameter to a control 1. such as the Slider. and click Properties.

or click Apply to apply the changes without closing the dialog box. 5. and click <<Remove to remove them from the parameter list of the control. Right-click the corresponding column or graph of the parameter you wish to remove. Select the summary type to use under Summary type. To add a parameter with a summary type to the control: 1. 2. 3. Click the Parameters tab in the Properties dialog box. Select the Parameters tab in the property dialog box. or chart control. this summary period equals the Major Interval defined in the Simulation Settings dialog box. Click OK to save the changes. Select Auto to allow Studio to automatically scale the parameter.summary types available: First. or click Properties. Click OK to save the changes. Minimum. the control will use this for its value axis as long as you select Auto for the scaling. you can also remove the parameter by deleting the corresponding graph or column in the control: 1. If the control you are working with is a time graph. 8. time table. The scaling of a variable doesn't affect the value of the variable. Select the variable you wish to add. Double-click the variable you wish to change. Expand the components folder in the Value Source list. or Apply to save the changes without closing the dialog box. Remove Parameters from a Control To remove parameters from a control: 1. and select . Select the parameter(-s) to be removed in the list on the right side. 6. Select the Summarize over Period option in the Add Advanced dialog box that appears. but is used to automatically scale the value axis of controls that has the variable as its parameter. To set the scale of a parameter: 1. 4. and click Properties. 4. and Accumulated. Maximum. Average. Specify the value domain of the parameter under Minimum and Maximum. 7. 2. a summary period will be used. Adjust the Scale of a Parameter You can control the value domain of a variable directly on the variable itself. Click OK to save the changes. 3. you can also control the summary period for each control individually by changing the Major Interval of the time axis ( Time Graph) or the Report Interval ( Time Table). 3. Click OK to add the parameter with the selected summary type. or Apply to save the changes without closing the dialog box. and click Add Advanced Parameter…. When calculating the value of the parameter. Double-click the control that you wish to change. or right-click it and select Properties on the shortcut menu. However. If you have set the value domain for a variable. Last. 4. 2. By default.318 - . Select the Scale tab in the Properties dialog box. Select the control you wish to change.

Right-click the control. Select the General tab in the Properties dialog box.Delete on the shortcut menu. . or click Properties. Select the Stop on Input option to make the simulation automatically stop whenever the control receives input. Select the input mode under Allow Input. Auxiliaries will never accept input from controls. or Apply to save the changes without closing the dialog box. Change the Input Mode of a Control There are four input modes available for controls: ! ! ! ! Never: The control will never accept input. the control will always be read only. 5. 2. Always: The control will always accept input. 3. Note! You can only set new values for constants of levels. Right-click the graph and select Hide on the shortcut menu. and the settings of the options above will have no effect. and select the parameter to show or hide (checked parameters are visible) on the shortcut menu. When stopped: The control will only accept input when the simulation is stopped.319 - . To change the input mode of a control: 1. Click OK to save the changes. Hide or Show Parameters in User Mode When Powersim Studio is in User mode. If the control is a time graph or chart control you can easily hide a graph: 1. 1. 4. If the parameter selected is an auxiliary. you can hide or show parameters in controls easily. Initially: The control will only accept input at the start of the simulation. Double-click the control that you wish to change. Note! Studio is in User mode when the Toggle Design Mode button is not depressed.

you can make Studio remember the value entered by the user even when the simulation is reset.A slider bar used in read only mode to indicate the amount accumulated over time in a level. Tip! By enabling the Permanent option for constants and levels used as input parameters in controls. .320 - .

you can access all the properties of the control at once. Below is a list of topics that explain procedures that are common to all Powersim controls. or by right-clicking them and use the shortcut menus. please refer to each individual control. This is available by clicking Properties on the shortcut menu or on the toolbar. For more specialized information on how to use a specific control. Minor Tick Style Cross Displays the minor ticks as a cross on the axis: Outside Displays the minor ticks on the outside (away from the center of the control) of the axis: Inside Displays the minor ticks on the inside (toward the center of the control) of the axis: None Turns off the minor ticks on the axis. or select it and then click Properties on the toolbar (or shortcut menu). Axis Formatting The table below explains the various options when formatting axis.Format Controls The various controls available inside Powersim Studio are very different. but much of the formatting capabilities are the same between them. Major Tick Style Cross Displays the major ticks as a cross on the axis: Outside Displays the major ticks on the outside (away from the center of the control) of the axis: Inside Displays the major ticks on the inside (toward the center of the control) of the axis: None Turns off the major ticks on the axis.by selecting them and using toolbar buttons. Axis Position . You can also format them in the Properties dialog box.321 - . You can format individual objects within the control . If you double-click the control.such as time and value axis .

Auto Automatically places the unit label based on the orientation and type of value axis. Low Displays the tick labels on the left or top of the control. at the middle of the axis. described below. High Displays the tick labels on the bottom or right of the control. the unit of the topmost . Unit Label Position (Value Axis only) None Turns off the unit label for the axis. At Maximum Displays the unit label at the maximum point of the value axis. if you like). Low Displays the axis on the bottom or right of the control. The value axis of the controls will in these cases automatically detect the units and display the parameters in the best way. Along Axis Displays the unit label along the value axis.322 - . Tick Label Position None Turns off the tick labels for the axis. The unit of the axis is shown above the axis (you can customize the position manually. The Value Axis and Parameters with Different Units You will often experience the need to display parameters with different units in the same control. When the parameters shown in the control have equal or compatible units. High Displays the axis on the left or top of the control. Parameters with compatible (or equal) units When the control contains several parameters with equal or compatible units.Auto The axis cross as close as possible to the origin of the coordinate system. the name of the parameter is followed by (?) in the control's legend. Note! If the parameter you have added to the control is undefined. With Axis Displays the tick labels close to the axis. There are two possible cases. With Tick Labels Displays the unit with the tick labels of the value axis. the value axis will choose the unit of the topmost parameter and use that as the unit for the axis. At Minimum Displays the unit label at the minimum point of the value axis.

Change the values of the Width and Height fields to the size you wish. 2. To change the axis position: 1. and select the Time Axis tab (alternatively Value Axis or Element Axis). or click Apply to apply the changes without closing the dialog box. The numerical values are plotted against the value axis. 1. 2. The unit name of the value axis is displayed above the value axis. Double-click the axis. 3. Select the control. Parameters with incompatible units When the control contains several parameters with incompatible units. On the shortcut menu that appears. 4. Element Axis. When the parameters shown in the control have incompatible units. Or 1. While the options discussed below are available for all of these axis types.parameter is chosen for the value axis. Right-click the axis. Select the Symbol tab in the property dialog box. and use the resize handles that appear on the outline of the control. Resize a Control A control can be resized in different ways. Right-click the time axis. and select Axis Position on the shortcut menu. On the shortcut menu that appears. Double-click the control. or right-click it and select Properties on the shortcut menu. select the tick style. Click OK to save the changes. the unit of each parameter is shown in the legend. select the axis position. To change major and minor tick styles: 1. Format an Axis There are various axis types available in Studio: Value Axis. To change the tick label position: 1. and select Major Tick Marks (or Minor Tick Marks) on the shortcut menu. These will be discussed for each axis type individually. the parameters' units are displayed in the control's legend. . each may have individual options not discussed below. and Time Axis. 2.323 - .

Select the orientation you wish to use under Orientation. Select the tick label position under Tick Label Position. 5. Tip! You can also change the position of the tick labels for the axis. Right-click the object (or parent object) whose texts you wish to format. Select the position from the shortcut menu that appears. if the object itself is unavailable for selection (such as tick labels for an axis). Click OK to save the changes. Change the Position of an Axis To change the position of an axis (time or value): 1. 3. Available options are Horizontal. or Apply to save the changes without closing the dialog box. To format the objects. . 4. Tick labels in axes can also be oriented in a custom angle (from -90° to 90°). Upwards. you must select the object itself. Select the objects you wish to format in the Properties list. and select Axis Position on the shortcut menu. All the objects are available if you select the entire control. Upwards. For tick labels you can also enter a custom rotation angle by selecting the Custom option. and select Properties on the shortcut menu. Change the Orientation of Texts in Controls Texts in various labels and titles can be oriented in various ways. Click the Alignment tab. Allowed values are from 90° to 90°. 2. Right-click the axis you want to change. on the axis' property page when clicking Properties. Time graph control using a time axis with tick labels rotated to -45°. and then enter the angle under Degrees. or its parent object. 3. Downwards. Most texts available for labels and titles can be oriented either Horizontal. 2. 1. Click Apply to save the changes. Downwards. or OK to save the changes and close the dialog box. and Vertical. and Vertical.324 - .2. Note! All the formatting options are also available on the Time Axis (or alternatively Value Axis or Element Axis) property page when clicking Properties.

You can alter the shape of the control. 2. specify the new Maximum and Minimum values. There are three methods you can use to change the appearance of a control: ! ! ! Toolbar buttons: Use the toolbar buttons on the Format toolbar to format the selected control or object within the control. You can also change the appearance of the axis label on the Text and Font property pages when clicking Properties. . or select it and click Properties. 4. Right-click the axis. Properties dialog box: Double-click the control or object within the control to access the Properties dialog box of the control or object (alternatively. it will be automatically hidden.325 - . The Properties dialog box for the control contains all the properties for all the objects within the control. select the corresponding Auto option. simply select the text and replace it with a text of your choice. or font variation you wish. and so on.Show Label for an Axis 1. Note! If the label is empty. as well as for the control itself. or Apply to save the changes without closing the dialog box. unless you specify another scale for the axis: 1. the font of labels and values. Tip! You can use the field codes to dynamically update the axis label. as well as the Major and Minor units for the value axis.and select the object to show. You are of course free to format the text using any font. You can hide the label by right-clicking it and select Hide on the shortcut menu. title. the title. click Properties). To let Studio automatically select a value. Simply right-click the object it belongs to . Customize the Appearance of a Control You can change the appearance of each control available in Studio in numerous ways. 3. font size. Double-click the value axis. legend. All the properties of the object is available here. The options vary from control to control. or by using the Format toolbar. Shortcut menu: Right-click the control or object within the control to access the shortcut menu. You can also change the visibility of items. the interior fill and colors. To alter the text. Click OK to save the changes. and select Show Label on the shortcut menu. Many formatting options are present on the menu. Change the Scaling of the Value Axis The value axis will use the scale information of the parameter by default. etc. You can hide or show axis labels. Select the label and edit it if you like. Click the Value Axis tab. Under Scale. dash styles and thickness of all the lines. 2.such as the time axis .

Show and Format the Title To show the title (if it is hidden): 1. Type a title for your control. and select the new position on the shortcut menu. and select Show Title on the shortcut menu.Tip! When selecting a property from the list. Use the CTRL key to add or remove a single property to or from the selection. 2. Select the position of the title on the shortcut menu that appears. To hide the title: 1. To change the position of the unit label: 1. and select Position on the shortcut menu. Right-click the unit label and select Hide on the shortcut menu. Note! If the title is empty. 2. To hide the unit label: 1. the unit will be displayed in a label on the axis. Change Position of Unit Label If the parameters displayed on the value axis share the same (or compatible) units. hold down the SHIFT key down while selecting another property from the list and all properties between the two selected will also be selected. To change the position of the title: 1. You can select between several unit label positions. it will automatically be hidden. Right-click the control. You can format the appearance of the title on the Format toolbar. Right-click the value axis and select Show Unit Label on the shortcut menu. Right-click the unit label.326 - . Right-click the title. Right-click the title and select Hide on the shortcut menu. To show the unit label: 1. .

Field codes are not case-sensitive. {"<optional text>"!<object. and so on. properties and switches are shown in the table below. If there are more parameters available for the given text and they have different names. If the field code itself is empty. Tip! You are allowed to use the short form Par instead of typing the complete word Parameter. you can use switches to control the appearance of the text. Range Name - Displays the name of the range. I Display only the part of the parameter's name that are different from the other displayed parameter names. This switch is only available in Legends and Parameter Titles. The sections in italics are optional. The available objects. The field codes are entered as the text for the label you wish to use it for.About Field Codes Field codes allow you to include details from your simulation model in your presentations. In addition. - Displays the unit of the parameter. then the field code will display an empty string instead. either. This switch is only available in Legends and Parameter Titles. Studio will translate Par into Parameter on the fly. Object Property Switch Description Parameter Name Unit - Display the full name of the parameter. You can also add optional texts before the and after the field code. for example titles.property>###BOT_TEXT###lt;switch>!"<optional text>"} The core of the field code consists of an object and the property you wish to display. Time Label - Displays a time label . legends. I Displays the part of the unit of the parameter that are different from the other displayed parameters. The syntax for field codes are shown below. these strings will not be displayed. axis labels.327 - .

Text Available Parameter.Name {Range. Parameter.Label Parameter.Unit Time. South.Label Empty Description The title can be set up to display the time label. using the \I switch will display North.Name} The element axis label can display the parameter name (if there is only one parameter available). the time label. or the name of the range of the parameter(s).Name Parameter.Name} The value axis label can display the parameter name (if there is only one parameter available).Label Range. it can also display the name of the parameters' range.Label {Parameter. Parameter. The table below summarizes what texts support field codes in each control.Unit Time.Name Parameter. South.Label {Time.Unit Range. East.Where can Field Codes be Applied? Field codes can be applied in all of the controls available in Studio. the parameters' unit (if there is only one unit available).Label Title Element Axis.Name\I} By using the optional "\I" switch. East.Unit Time. and A[East] if the switch is not used. If you are displaying an array A with the elements North.Name Parameter. and the time label.Name Parameter. or the name or unit of the parameter (s) shown in the control. the parameters' unit (if there is only one unit available).Name Time.Name Parameter. and West in the legend. A [East]. and West. In the Chart control. Parameter.328 - .Unit {Parameter. you can shorten the {" ("! Parameter. the parameters' unit Legend Time Axis.Unit Time. The default field code will also display the parameters' units in a parenthesis behind the parameter name.Label Used Default in .Unit\I!")"} legend into showing the parts of the parameter names that are different from each other. Parameter.Label} The time axis label can display the parameter name (if there is only one parameter available).Name Parameter. A[South]. The legends will be displayed as A[North].

Unit [<name>]. but is always deselected.Label Label The label can be set up to display the time label. Note! If you are creating a language specific text.Name\I} See description for Legend {" ("! above. However.Unit\I!")"} Parameter. make sure you create texts for all the languages that the model will be displayed in! . If the text contains a mixture of normal text and field codes.Name\I} See description for Legend above.Label {Time.Title {Parameter. NB! The property is named Gauge Display. This behavior of this option is shown below: ! ! ! If the text contains only field codes.Unit Time.329 - . and the time label. In the Chart control. Value Axis.Label} The time title (the header of the column or row containing time information) can display parameter names or units.(if there is only one unit available). you can select whether the string is used for all languages or only for the selected language.Value Axis.Name Parameter. the For all languages option is not available. This is controlled by using the For all languages option on the Text property page.Name} Gauge Dial. or the language settings for the project or view. it can also display the name of the parameters' range. You can specify yourself whether the text should be used for all languages or only for the selected language. The text will only exist in the selected language. {" ("! Parameter. Parameter. the For all languages option is not available.Name Parameter. If the text contains only normal text and no field codes. Field Codes and Languages Field codes can be used to create graphs that display nicely and at the same time update their display should you alter the parameter selections of the controls. The same string will always be used for all languages.Label {Parameter.Title Parameter.Label in the Gauge control.Unit\I!")"} Parameter.Value Axis.Name Parameter. if you are writing strings that are combinations of field codes and normal text. the For all languages option is available.Unit Time.Unit {Parameter. Parameter. but is always selected. and will return the string in the correct language.Label Time.Name Parameters Parameter. or the time label. The field codes themselves are language independent. or the name or unit of the parameter (s) shown in the control.

you can do so by combining the Parameter. The default field code for legends and parameter titles are shown below. You can even include extra texts to separate them. Studio will automatically convert this into Parameter for you. and it will not show the unit.Name\I}{" ("!Parameter. The default field codes for the parameter titles in the Time Table are equal to the default field code for legends. Tip! You are allowed to type only Par (the field code is not case-sensitive) for simplicity. By including optional text within the field code. the part containing the unit in the field code will be visible. If you want to display both the parameter name and the parameter unit. for the array Sales.Name and Parameter. the text will only be shown when the rest of the field code is shown. the resulting legend will display the parts of the parameter names that are not equal.Unit field codes. However. An example is shown below. and encloses the unit in parenthesis. South. When using the parameter names and units in these texts.330 - . {Parameter. As you can see from the field code. you can use the optional \I switch to hide the common sections of the variable and unit names. To allow the title to automatically display the parameter name and unit (if the parameter name and unit are unique). the unit itself is not included in the legend. all the information is shown in the legend. The control below displays two scalar variables Shipment and Weight. The dimension of the variable is Region = North. If you are displaying parameters with the same unit. if the parameters have different units. When two parameters have different units and different names. it adds a space between the parameter name and the unit. This is convenient when you want to save space in your legends. and West.Legends and Parameter Titles when using Field Codes Legends and Parameter titles can be defined using field codes.Unit\I!")"} If you display an array in a time graph when using this field code. East. the following field code is used by default: . where the two have different units. The default formatting of a time graph legend when displaying an array with four elements.

2. To enter the field code on the property page: . When two parameters have different units and names.{Parameter. with the array Sales show in the Time Table. they are shown in the columns rather than in the title. and select Edit Text on the shortcut menu. are shown below. Right-click the text you wish to alter. The second example above. the variable name and unit is displayed in the title of the control. Define a Field Code You can enter a field code in the property page for the text. but the control uses the default field codes. (The display itself is formatted. the information is shown in the column headers. is shown below. while the array element names are shown in the parameter titles.) When an array is displayed in a Time Table. 1.331 - . and hit Enter when you're finished. since there are more than one parameter and unit name. with two different parameters with separate units.Unit!")"} The first example above. Enter the new text. In this case.Name}{" ("!Parameter. or by entering it directly in the text itself.

If the text contains a mixture of normal text and field codes.1. . or OK to save the changes and close the dialog box. 6. Right-click the control (or the item containing the text) that you wish to change. 4. you can select to use the same text for all languages by selecting the For all languages option. 5. 2. Click the Text tab. Select the text you wish to alter under Properties. 3.332 - . Enter the new text under Text. Click Apply to save the changes.

share of income and development expenses for four different products.Work with the Chart Control As opposed to the time series control. The Chart Control supports parameters using index variables to index its dimensions. Smooth Line: The line between the element points are smoothed (requires that the graph is already shown as a line). but they must all have just one dimension each (they must be vectors). Tip! You can restrict data input to one point only by holding down Alt while dragging the data point along the value axis. you can control the shape of the graph by dragging the shape of the graph along the element and value axes. The chart can show several types of charts: ! ! ! ! Line: The element points are connected by a straight line. the second element in . while the element index is shown along the element axis (corresponding to the time axis in the time graph). allowing you to create user interfaces where you can select different parameter elements for display. the value of the array elements are shown along the value axis. You can also use the chart control to provide input to the simulation. Note! All the parameters of a chart control must be vectors (arrays with only one dimension). In the chart control. You can display as many parameters you wish in the chart control. The elements are drawn from left to right (the first element in position 1.333 - . which must be arrays. If the parameter is a constant. the Chart Control is used to display the instant value of its parameters. Bar: Shows the values of the elements as bars along the element axis. The chart graph showing a bar graph that represents the market share. Step: The element points are connected by a horizontal rather than a straight line.

and Bar. .) regardless of the dimension of the array. The property page can be accessed by right-clicking the graph or the entire control. Select the graph you wish to change.334 - . Smooth Line. and Bar (bottom right). The options are also available on the Chart Graph property page for each selected parameter. Right-click the graph. Step. 2. Tip! If a graph is filled. You can format the graph with a pattern on the Fill property page. and select the graph type to use on the shortcut menu. Right-click the graph you wish to change. Format the Graphs in the Chart Control To format the color and line of the individual graphs: 1. and select the graph type on the shortcut menu. available when you double-click the graph or click Properties. etc. To change the type of the graph: 1. Change the Graph Type of a Parameter 1.position 2. Smooth Line (top right). The figure below illustrates the difference between the four types. Use the Format toolbar to format the line color and fill color of the graph. The four available chart types: Line (top left). The options are: Line. you can select the graph by clicking the filled area under the graph. and selecting Properties on the shortcut menu. The cursor will change to a small square when it hovers over a graph line. Step (bottom left).

! Send to Back: Sends the graph to the back of the control. Double-click the control that you wish to change. ! Send Backward: Sends the graph one step closer the back. Select the Parameters tab in the Properties dialog box. or Apply to save the changes without closing the dialog box. 4. 2. However. Right-click the graph you wish to hide. 2. or select it and click Properties. The topmost parameter is displayed at the back of the graph area. and select Order on the shortcut menu. or Apply to save the changes without closing the dialog box. Sort the parameters in the list by selecting them and clicking Up or Down. you can also toggle parameters on and off by right-clicking inside the control. Select the parameter to show in the list. 2. or Apply to save the changes without closing the dialog box. or select it and click Properties. 2. 4. Double-click the control that you wish to change. and the other parameters are displayed in front of it. and select the Visible option. The options are: ! Bring to Front: Brings the graph to the front of the control. Select the Parameters tab in the property dialog box.Change the Order of Parameters The order of the parameters will decide the order in which they are displayed in the time graph. Click OK to save the changes. Click OK to save the changes. and selecting (or deselecting) the parameter name. Select a command on the shortcut menu that appears. 2. the topmost parameter is displayed at top of the legend. To change the order of the graphs: 1. Select the parameter to hide in the list. and select the Visible option. 3. Right-click the graph you wish to change. Double-click the control that you wish to change. Show Hidden Parameters in the Chart Control To show the graph of a parameter that you have previously hidden: 1. 3.335 - . or click Properties. . You can also perform the change in the Properties dialog box: 1. Click OK to save the changes. or 1. 4. If you switch to User Mode. 3. Select the Parameters tab in the Properties dialog box. Hide Parameters from the Chart To hide a parameter from the control without deleting it: 1. ! Bring Forward: Brings the graph one step closer to the front. Select Hide on the shortcut menu.

You can also access the properties of the legend on the General tab when clicking . or Apply to save the changes without closing the dialog box. Note! The intervals for the gridlines of the value axis are specified on the Value Axis property page. Alternatively. 3. and select Hide on the shortcut menu. and select Show Legend on the shortcut menu. Toggle on/off the Legend for the Chart To hide or display the legend for the chart: 1. as well as its interior fill on the Format toolbar. . 4. Double-click the control that you wish to change. The intervals for the gridlines of the time axis are specified on the Report property page in the Simulation Settings dialog box. Select the Fill tab to format the interior fill of the graph area. select the gridlines to display. 4.336 - Properties. 3. Select the Line tab to format the lines. Show Gridlines 1. Click OK to save the changes. Select the General tab in the Properties dialog box. Vertically. or Apply to save the changes without closing the dialog box. or select it and click Properties. ! Major Vertical Grid: The major grid of the time axis. 2. you can use the Properties dialog box: 1. ! Minor Horizontal Grid: The minor grid of the value axis. Under Gridlines. Right-click the chart you wish to change. You can change the line settings for the following properties: ! Line: The outline of the graph area. Note! The intervals used for the value axis gridlines are specified on the Value Axis tab in the Properties dialog box for the control. ! Major Horizontal Grid: The major grid of the value axis. Click OK to save the changes.Format the Chart Area You can format the color and style of the border of the graph area. 2. or select it and click Properties. the chart control will draw one gridline per element. To hide the legend: 1. ! Minor Vertical Grid: The minor grid of the time axis. Right-click the legend. Double-click the graph area of the control that you wish to change.

7. we add an extra auxiliary . The control will now show the values of the four scalar variables along the element axis. Note! Although the Chart control can be used to provide input for the elements of the array. To display the value of these four variables. 2.as parameters. If you change a level.Presenting a Set of Scalar Variables in a Chart Control The chart control only accepts vectors . This means that you can only input values to constants or to levels. 'Company D'} The 'Market Share' variable is added to a chart control. Add an auxiliary to your model (either in the Details Window or the Constructor diagram). The definitions are shown below. Click OK to save the changes. you will first have to build an array where the various scalar variables form the various elements.arrays with one dimension . The procedure below shows you how to achieve this. Note! Before you can arrange several variables in an array. Use the Chart Control as an Input Object The chart control allows you to input values to parameters that accept this input. 4. Element_2. . you must observe that their units are compatible. Insert a chart control in your diagram. where each variable is a scalar auxiliary. aux aux aux aux aux 'Company A' 'Company B' 'Company C' 'Company D' 'Market Share' = = = = = <any definition> <any definition> <any definition> <any definition> {'Company A'. 1. The only requirement is that the units of the scalar variables are compatible... the value(s) you have entered for the variable during the simulation run will not be reset when you reset the . 'Company C'. the change will only affect its initial value.}.337 - . these values will not be reflected in the original scalar variables.Market Share . Format the chart control in any way you wish. Define the new auxiliary as an array with the linked variables as elements. hence this method is unsuitable to provide input to scalar variables! Example The model below shows the market share of four companies. Drag the recently defined auxiliary and drop it on the control. 5. 'Company B'. If you need to present a set of scalar variables in a chart control. using the syntax {Element_1.and use the four scalars as elements. 3. 6. Tip! If you define the parameter's corresponding variable as Permanent. Create information links from the scalar variables to the new auxiliary.

Point to the curve that you wish to change in the graph using the mouse pointer. so that you Tip! When the graph is used for input. 2. it is useful to format it as either a step or bar graph. To prepare to use the chart control as an input object: 1. you can lock the mouse pointer to the current data point only. Drop the variable(s) on the control. 2.338 - . The mouse pointer changes to a small square with arrows in all directions to indicate that the graph accepts user input. Drag the graph to its new shape. since these graphs allow a wider input area. By sweeping along the element axis. you can provide new values for all the elements in the array. When you want to change the value of the parameter: 1. Tip! If you hold down Alt while you drag. thereby providing input for all the elements in the array.simulation. . Insert a chart control in your diagram.

say. A gauge shows the current value of a parameter.Work with the Gauge Control The Gauge Control displays the immediate value of its parameter. and can display only one parameter at a time. The Gauge Control accepts index variables as parameters. The control may also be used for data input.339 - . Examples of Gauge Formatting This page contains several examples of gauges. Similar to a speedometer or an analog ammeter. You can create sectors in the gauge dial by using customized picture fills. You control the size. Simply drag the gauge needle to change the value of the control's parameter. a time graph. if the gauge hub should be visible. and color of the gauge disc. the margins of the dial (the area between the boundary of the dial and the span of the value axis). and position of the gauge needle. the size. The index variable can be used to control which element of a parameter is displayed in. as well as the rotation of the gauge itself. If you need to create sectors in the gauge dial. the color and fonts used by the value axis. shape. the gauge displays the value by pointing a needle to a fixed scale. The various components of the gauge control can be customized allowing you to create a gauge that fully satisfies your requirements. color. Use these examples as an inspiration to create nice gauges for your simulator interfaces! Gauge Notes Dial style: Auto (or Pie Based) Direction: 90 Dial span: 100 Display span: 90 Dial inner radius: 40% . shape. you can create your own picture fills that you can use for the gauge dial. Values for gauge specific properties are presented for each gauge.

340 - .Dial fill type: Picture Fill Needle style: Triangle Head position: Outside Dial Tail position: At Dial Center Hub visibility: Visible Hub size: 5% Notes: The picture fill of the gauge dial is created as explained here. Dial style: Auto (or Pie Based) Direction: 90 Dial span: 100 Display span: 90 Dial inner radius: 60% Dial fill type: Solid Needle style: Arrowhead Head position: Inside Axis Tail position: Outside Dial Hub visibility: Hidden Hub size: Dial style: Auto (or Pie Based) Direction: 90 Dial span: 100 Display span: 90 Dial inner radius: 70% Dial fill type: No Fill Needle style: Spear Head position: Inside Dial Tail position: Behind Dial Center Hub visibility: On Hub size: 5% Dial style: Chord Based Direction: 180 Dial span: 150 Display span: 140 Dial inner radius: 50% Dial fill type: Solid Needle style: Line Head position: At Axis Tail position: Inside Dial Hub visibility: Hidden Hub size: Dial style: Auto (or Chord Based) Direction: 90 Dial span: 240 Display span: 220 Dial inner radius: 0% Dial fill type: Solid Needle style: Triangle Head position: Inside Axis Tail position: Behind Dial Center Hub visibility: Visible Hub size: 12% .

and colors of the gauge dial to suit your preference. the dial will be pie based if the dial span is less than 180 degrees. shape. margins. If you select Auto. and by using picture fills for the interior fill of the gauge dial. There are unlimited combinations available. and the various options will have different effects on different spans. The illustration below shows the two options Pie Based and Chord Based. Style The Style property allows you to control the shape of the gauge dial. and chord based if the dial span is more than 180 degrees.Dial style: Pie Based Direction: 90 Dial span: 270 Display span: 270 Dial inner radius: 40% Dial fill type: Solid Needle style: Arrowhead Head position: 80% (custom) Tail position: 50% (custom) Hub visibility: Hidden Hub size: Dial style: Pie Based Direction: 90 Dial span: 360 Display span: 360 Dial inner radius: 40% Dial fill type: Solid Needle style: Diamond Head position: 80% (custom) Tail position: 80% (custom) Hub visibility: Visible Hub size: 12% Dial style: Auto (Pie Based) Direction: 90 Dial span: 80 Display span: 70 Dial inner radius: 40% Dial fill type: No Fill Needle style: Triangle Head position: Inside Axis Tail position: Inside Dial Hub visibility: Visible Hub size: 7% Gauge Dial Properties You can specify the direction. The shape of the dial is dependent on the dial span. . you can create gauges with various sectors.341 - .

b) Chord Based dials. b) Display span. The two properties allow you to control the shape and appearance of the gauge dial.342 - . Tip! If the value for Display span is higher than the value for Dial span. Studio will automatically make them equal. Possible values are 0% to 100%. The illustration shows the gauge dial when rotated to various angles (0°. Outer and Inner radius The Outer and Inner radius are shown in the illustration below. c) Inner radius. Possible values are 0 to 359. Direction The Direction property allows you to control the direction of the gauge dial (and hence the gauge needle). The Display span property allows you to specify the portion of the dial that will be used to display the value of the parameter. Possible values are 1 to 360. 180°. which creates dial pointing upwards. and 270°). although it cannot exceed the value of Dial span. The Dial span and Display span are shown on the illustration below. 90°. . a) Dial span. Dial and Display span The Dial span property allows you to specify the curvature of the gauge dial. The default value is 90 degrees.a) Pie Based dials. Possible values are 1 to 360. d) Outer radius.

The Tail property allows you to control the position of the tail of the gauge needle. Axis At Axis The end of the needle touches the line of the value axis. Outside The end of the needle touches the outer line of the gauge dial. d) spear. The number represents a percentage of the outer radius of the .Gauge Needle Properties The gauge needle can be customized in several aspects. You can change the shape of the needle. The various options are the same as for the Tail property below. The end of the needle is placed at a position corresponding to the percentage entered in the Custom box. and are listed in the table below.343 - . Style The Style property allows you to control the shape of the gauge needle. The gauge needle can have several shapes: a) arrowhead. Option Description Outside The end of the needle touches the outer limit of the value axis. or you can enter a custom value. diamond. You can choose between several predefined positions. At Dial Center The end of the needle is placed exactly at the center of the gauge dial (at the center of the gauge hub. Dial Inside Dial The end of the needle touches the inner line of the gauge dial. you can even create a gauge needle that points "inwards" to the value axis. Inside Axis The end of the needle touches the inner limit of the value axis. and are listed in the table below. and select between several predefined shapes such as arrowhead. Position The Head property allows you to control the position of the head of the gauge needle. c) line. or you can enter a custom value. Next. b) diamond. and spear. you can also customize the starting and ending point of the needle. if it is visible). By selecting a starting point outside the gauge dial. and e) triangle. The various options are the same as for the Head property above. You can choose between several predefined positions. The custom value is given as a percentage of the entire gauge dial. The custom value is given as a percentage of the entire gauge dial.

Hide on the Format the Gauge Dial You can specify the direction. specify the appearance of the gauge dial using the properties listed below. Tip! You can hide the gauge hub if you like. a) Triangle style. Select the dial of the gauge that you wish to format. Various combinations of needle style and positions. head at axis. but the entered value must be less than or equal to the value entered for Dial span. Double-click the gauge dial. even negative numbers. c) Triangle style. you can create gauges with various sectors. ! Inner radius: The inner radius of the dial given in percentage of the total dial size. b) Triangle style. 2. ! Style: Select the style of the dial (pie or chord based). specify the size of the dial using the properties listed below. Valid values are 0% to 100%. valid values are 0 to 359. You can enter any value. On the Gauge Dial property page. tail at dial center. tail custom at 105%. head at axis. To format the interior fill and line of the gauge dial: 1. Click OK to save the changes. while a negative value will place the end of the needle beyond the dial center. 100% being equal to the option Outside Dial. tail custom at 80%. ! Direction: Specify the direction of the gauge dial. head inside dial. tail inside dial. by right-clicking it and selecting shortcut menu. e) Arrowhead style. 3.344 - . valid value are 1 to 360. tail at dial center. margins. and select a color for the dial fill. and by using picture fills for the interior fill of the gauge dial. To format the shape of the gauge dial: 1. head at axis. Valid values are 1 to 360. or Apply to save the changes without exiting the dialog box. d) Triangle style. ! Display span: Specify the area of the dial covered by the value axis. or right-click it and select Properties on the shortcut menu. shape. 2. head outside dial.gauge dial. tail at dial center. ! Dial span: Specify the curvature of the gauge dial. head outside axis. d) Arrowhead style. and 0% equal to the option At Dial Center above. ! Outer radius: The outer radius of the dial (100% represents the maximum size possible). and colors of the gauge dial to suit your preference. Click the small arrow next to Fill Color. 4. . A value Custom larger than 100% will cause the end of the needle to be placed outside the gauge dial. There are unlimited combinations available. On the Gauge Dial property page.

and select a color for the needle fill. Line. To format the shape of the gauge needle: 1. specify the appearance of the gauge needle under Style. Click the small arrow next to Fill Color. Click OK to save the changes. To format the interior fill and line of the gauge dial: 1. 5. or Apply to save the changes without exiting the dialog box. You may also enter a custom percentage value representing the distance from the center of the gauge dial. 3.345 - . On the Gauge Needle property page. Click the small arrow next to line. and Triangle. Click the small arrow next to Line Color. Format the Gauge Needle The gauge needle is highly flexible through its advanced style and position properties. . Double-click the gauge needle. 3. Negative numbers are allowed (although they are seldom useful). or right-click it and select Properties on the shortcut menu. 4. and select a color from the dropdown for the dial Line Style. Select the dial of the gauge that you wish to format. 4. Gauge dials can be a) pie shaped or b) chord shaped. Spear. in addition to the common color and line properties. On the Gauge Needle property page. Diamond. by right-clicking the gauge dial itself and selecting Properties on the shortcut menu. Tip! You can make the gauge needle point "inwards" by entering a custom tail position larger than the head position. There are several styles available: Arrowhead. 2. specify the position of the needle using the properties listed below. 2. There are several available options. You may also enter a custom percentage value representing the distance from the center of the gauge dial. You can freely format the gauge dial as you wish to.3. Negative numbers are allowed. ! Head The position of the head of the needle. ! Tail The position of the tail of the needle. There are several available options. and select a color from the dropdown for the needle line. and select a style from the dropdown for the dial Tip! You may of course format the fill and line on the corresponding property pages also. Click the small arrow next to line. Click the small arrow next to line. and select a color from the dropdown for the dial Dash Style. Line Color.

and can be visible or hidden. . Select the hub of the gauge that you wish to format. and select Hide on the shortcut menu.346 - . Right-click the gauge hub. and select a style from the dropdown for the needle Tip! You may of course format the fill and line on the corresponding property pages also. 4. The hub can be formatted freely. enter a new percentage size in the Size box under Hub. Tip! You may of course format the fill and line on the corresponding property pages also. Line Style. To format the size of the gauge hub: 1. 5. Note that the percentage refers to the total size of the gauge control. You can format the fill and line of the gauge hub using the toolbar: 1. and select a color for the hub fill. 2. Click the small arrow next to Fill Color. Right-click the gauge. Entering a value of 99% will make the hub cover the entire gauge dial. and select a style from the dropdown for the hub line. and it can be visible or hidden. by right-clicking the gauge dial itself and selecting Properties on the shortcut menu. and select 2. and select a color from the dropdown for the needle Dash Style. The gauge hub can be formatted independently of the gauge needle. Click OK to save the changes. On the General property page. and select a color from the dropdown for the hub line. and select Properties on the shortcut menu. Format the Gauge Hub The gauge hub is placed in the center of the gauge dial. or 1. Select the General tab. Properties on the shortcut menu.4. Click the small arrow next to line. Click the small arrow next to line. 3. Click the small arrow next to Dash Style. or Apply to save the changes without exiting the dialog box. Right-click the gauge control. 2. Click the small arrow next to Line Style. by right-clicking the gauge hub itself and selecting Properties on the shortcut menu. 5. Click the small arrow next to Line Color. and select a color from the dropdown for the hub line. 3. Show or Hide the Gauge Hub To hide the gauge hub: 1.

Under Hub. Click OK to save the changes. Click OK to save the changes. Click the gauge needle. If Studio is in User Mode. If the control accepts input. and 270°). 2. or right-click it and select Properties on the shortcut menu. deselect the Visible option. Right-click the gauge control. or Apply to save the changes without exiting the dialog box. Use the Gauge Control as an Input Control You control the input mode of the gauge control on the General property page. 3. . you can control the value of its parameter: 1. and select Properties on the shortcut menu. or Apply to save the changes without closing the dialog box. the control will not be selected when you drag the needle. Under Hub. This is illustrated below. Select the General tab. 4.347 - . Tip! If you define the parameter's corresponding variable as Permanent. Rotate the Gauge Control You can rotate the gauge control: 1. 180 will cause the needle to point to the left. select the Visible option. 180°. and drag the needle to a new position while holding down the mouse button. a value of 90 will make the needle point downwards. 90°. The angle under Direction represents the direction that the gauge needle with point when in the center position. The illustration shows the gauge dial when rotated to various angles (0°. the needle will point to the right. Change the angle under Direction. and the default value of 270 results in a gauge where the needle points upwards. Click OK to save the changes. Double-click the gauge control that you wish to rotate. Select the Gauge Dial tab. The state of the Design Mode button indicates what mode Studio is currently in. or 1. If the direction is 0. 4.3. 4. Right-click the gauge control. the value(s) you have entered for the variable during the simulation run will not be reset when you reset the simulation. To show the gauge hub: 1. 3. 2. or Apply to save the changes without exiting the dialog box. and select Show Hub on the shortcut menu.

select Bitmap in the Paste As dialog box. Use the tick marks to ensure that the sectors have the correct size and shape. and clean up the image until you have only the gauge dial left in the image. Make sure that the shape of the gauge dial (inner radius and dial span) are correct. Use the following guidelines to create a gauge with sectors. it is useful to leave the tick marks of the value axis. and are not influenced by changes in scaling of the value axis (and/or parameter).348 - . In the image processor. In the image processor. 3. Select the Fill property page. and click OK. and select Picture under Type. The gauge might look something like this: 2. and double-click the dial to open the Property Pages. Make a screen shot of the gauge (by hitting Alt+Enter). 1. To make it easier to create the sectors. Before creating the bitmap. 8. create the desired colored sectors. 9. Switch back to Powersim Studio. Make sure that the value axis and scaling of the parameter are correct before continuing. crop the screen shot until only the gauge dial is visible. 6. and paste the screen shot into your favorite image processor.Create a Gauge with Sectors You can create a gauge dial with sectors by creating a bitmap with the correct shape and color sectors. Enter a suitable name for the bitmap in the Select Resource dialog box. 4. Colors used in bitmaps might be displayed differently on other people's computers (if the end user has fewer colors than you have yourself). 7. 5. Then click Select Picture to open the Select Resource dialog box. The sectors are (obviously) static on the bitmap. you should consider the following factors: ! ! ! The shape of the bitmap must match the shape (not necessarily the size) of the gauge dial (inner radius and dial span). Click OK to select the picture. and then use that bitmap as the fill for the gauge dial. The gauge should now look something like this: . Click Paste. Click Apply to view the changes. select the bitmap and copy it to the Windows clipboard. In the image processor. Insert and format the gauge.

3. If the parameter is a level. or Apply to save the changes without closing the dialog box. the value(s) you have entered for the variable during the simulation run will not be reset when you reset the simulation. The index variable can be used to control which element of a parameter is displayed in. the slider bar will only allow you to set its initial value. or it can be used to monitor the value of other variables. you are allowed to alter the appearance of the Slider control to a wider extent. 2. Select the General tab in the property dialog box. Tip! If you define the parameter's corresponding variable as Permanent. Click OK to save the changes. Double-click the control that you wish to change. The Slider Control accepts index variables as parameters. . or click Properties. The slider bar used to provide input to a constant auxiliary (left) and as a tool to measure the value of an auxiliary (right). Specify the orientation by selecting either the Horizontal or the Vertical option. As for the other controls. 4. The slider bar is shown below.Work with the Slider Bar Control The Slider Control can be used to provide input to constant auxiliaries and levels. Change the Orientation of the Slider Bar To change the orientation of the slider bar: 1.349 - . say. a time graph.

350 - . Combo Box: A drop-down list with several entries that sets the value on selection. Radio Button: A multi-state button that sets the value on selection. You can create several different button types with the Switch Control: „ „ „ „ „ „ Push Button: Set the value while the button is depressed. In this figure. The index variable can be used to control which element of a parameter is displayed in. Each control will set the value of a constant auxiliary based on the selection in the control. The Switch Control makes it possible to create control panels for controlling input to your simulation. . Static: A static text that change with the value of the control's parameter.Work with the Switch Control The Switch Control allows you to select between a set of given inputs to parameters during the simulation. with a frame object providing the outer frame and the title of the panel. This button type can also be shown as a push button. The Switch Control accepts index variables as parameters. Check Button: A two-state button which sets the value on check/uncheck. List Box: A list with several entries that sets the value on selection. Tip! If you define the parameter's corresponding variable as Permanent. say. four Switch Controls are used. the value(s) you have entered for the variable during the simulation run will not be reset when you reset the simulation. a time graph. You should use the Switch Control when you want the user to quickly be able to switch between two or more strategies or input alternatives. This button type can also be shown as a set of push buttons.

you must deselect the Automatic option.351 - . Create a Check Button To create a check button in a Constructor diagram: 1. 2. 8. Insert a Switch Control. you can control the values that will be set by the button. and once again to revert it. Insert a Switch Control. 5. Double-click the control. 5. If you select the Automatic option. „ The value under Clear is the value when the button is not clicked. or select it and click Properties. Value: Clear A push button changes the value of the parameter only when it is depressed. but you must click once to depress the button. Add the parameter you wish to the control by drag-and-drop (or on the Parameters property page). click the Text tab. and select Label under Properties. Click OK to save the changes. and then select the Push-like option. Select Check Button under Type to create a check button. Under States. select Check Button under Type. 6. The default field code will display the parameter's name on the face of the button. 3. Add the parameter you wish to the control by drag-and-drop (or on the Parameters property page). „ The value under Set is the value when the button is clicked. To enter a different label for the button. 9. Enter the new text or field code for the label under Text. If you select the Automatic . 4. 7. 2. you can control the values that will be set by the button. Select the General tab in the Properties dialog box. 3.) Note! The push button will not use the texts entered for the Text property available under States. Under States. (Click the image to demonstrate. 6.Create a Button To create a button in a Constructor diagram: 1. To specify the values manually. Double-click the control. or select it and click Properties. or Apply to save the changes without closing the dialog box. Select the General tab in the Properties dialog box. The appearance of the buttons are identical. Select Push Button under Type to create a push button. the control will find settings based on the type and value of the selected parameter. Tip! To create a "sticky" button. 4.

click the Text tab. You can create a "sticky" button by selecting the Push-like option. the control will find settings based on the type and value of the selected parameter. If you select the Automatic option. Create Radio Buttons To create radio buttons in a Constructor diagram: 1. To specify the values manually. To enter a different label for the group. the control will find settings based on the type and value of the selected parameter. To specify the values manually. The default field code will display the parameter's name on the face of the button. you must deselect the Automatic option. 8. 2.option. you can control the number of options that should be available in the group of radio buttons. „ The value under Set is the value when the button is selected. To enter a different label for the button. „ The value under Clear is the value when the button is not selected. 7.352 - . Under States. . 3. or Apply to save the changes without closing the dialog box. their value. Enter the new text or field code for the label under Text. or Apply to save the changes without closing the dialog box. 9. Add the parameter you wish to the control by drag-and-drop (or on the Parameters property page). the text will equal the value. Click OK to save the changes. The difference between a check button and a push-like check button is illustrated below. Enter the new text or field code for the label under Text. Double-click the control. „ Specify the text for each option under Text. „ Specify the value for each option under Value. You can create "sticky" buttons by selecting the Push-like option. Insert a Switch Control. and select Label under Properties. Select the General tab in the Properties dialog box. you must deselect the Automatic option. 8. and the text that will appear for each option. Select Radio Buttons under Type to create a set or radio buttons. (Click the images to demonstrate. „ Select the number of options you wish to create under Count. Value: Clear Value: Clear A check button can have two styles: check button or push-like check button. 9. 4. click the Text tab.) Note! The check button will not use the texts entered for the Text property available under States. or select it and click Properties. Click OK to save the changes. If Auto is selected. The default field code will display the parameter's name on the face of the button. and select Label under Properties. 5. 6. 7.

The value selected corresponds to the selected radio button. The default field code will display the parameter's name on the face of the button. If you select the Automatic option. the text will equal the value. „ Specify the text for each entry under Text. their value. or select it and click Properties. Under States. Select the General tab in the Properties dialog box. 4. the control will find settings based on the type and value of the selected parameter. „ Select the number of entries you wish to create under Count. you can control the number of entries in the list. First Second Third Fourth Value: Val 1 A switch control will have as many entries in the list as the selected number of states. 2. 3. (Click the image to demonstrate. or Apply to save the changes without closing the dialog box. 6. 7. Add the parameter you wish to the control by drag-and-drop (or on the Parameters property page).Value: Val 1 A switch control will have as many radio buttons as the selected number of states. Click OK to save the changes. 5. 9. Select List Box under Type to create a push button. Enter the new text or field code for the label under Text. and select Label under Properties. The value selected corresponds to the selected list entry. you must deselect the Automatic option. „ Specify the value for each entry under Value. Double-click the control. Insert a Switch Control.353 - . (Click the image to demonstrate. To enter a different label for the list box. and the text that will appear for each entry. To specify the values manually. click the Text tab.) Create a List Box To create a list box in a Constructor diagram: 1. If Auto is selected. 8.) .

Select the General tab in the Properties dialog box. To specify the values manually. Insert a Switch Control. Select the number of entries in the combo box under States. „ Select the number of entries you wish to create under Count. Select the General tab in the Properties dialog box. 3. their value. 4. 9. Add the parameter you wish to the control by drag-and-drop (or on the Parameters property page).Create a Combo Box To create a combo box in a Constructor diagram: 1. If Auto is selected. 2. Under States. you can control the number entries. Under States. the control will find settings based on the type and value of the selected parameter. and the text that will appear for each entry. Click OK to save the changes.) Create a Static Text Object To create a static text object in a Constructor diagram: 1. (Click the image to demonstrate. 5. The value selected corresponds to the selected list entry. you must deselect the Automatic option. or select it and click Properties. or Apply to save the changes without closing the dialog box. „ Specify the text for the entry under Text. you can control the number entries. or select it and click Properties. 3. and the text that will appear for each entry. 10. Double-click the control. Select Combo Box under Type to create a combo box. If you select the Automatic option. „ Specify the value for the entry under Value. you must deselect the Automatic option. The default field code will display the parameter's name on the face of the button. 5.354 - . To enter a different label for the combo box. „ Select the number of entries you wish to create under Count. . 6. Enter the new text or field code for the label under Text. click the Text tab. To specify the values manually. and select Label under Properties. the control will find settings based on the type and value of the selected parameter. First Value: Val 1 A switch control will have as many entries in the list as the selected number of states. 7. 6. Select Static under Type to create a combo box. Insert a Switch Control. Double-click the control. the text will equal the value. their value. 2. Select the number of entries in the combo box under States. 4. If you select the Automatic option. 8. 7. „ Specify the value for the entry under Value. Add the parameter you wish to the control by drag-and-drop (or on the Parameters property page).

The Switch variable controls the behavior of the Strategy variable.80) aux Strategy = {'Wave Input'. Use the Switch Control to Select Strategy The Switch Control is an ideal tool if you want to give the users of your simulations a change to select between alternative strategies. The example below uses three different strategies for testing a model. 'Step Input'. the variable Strategy can be either a wave. and an additional constant auxiliary that acts as the switch. STARTTIME+90<<da>>) aux 'Random Input' = RANDOM(0. Selecting between Strategies During Simulation To achieve this effect. the value is assigned to the variable.„ Specify the text for the entry under Text. Tip! If you define the parameter's corresponding variable as Permanent. The two (or more) alternative values are entered under Values. the value(s) you have entered for the variable during the simulation run will not be reset when you reset the simulation. A more advanced method is to actually allow the user to change strategy during the simulation. the text will equal the value. The text that is displayed in the control will depend on the value of the connected parameter. Select Initial Value You can allow the Switch Control to change the initial values of both constant auxiliaries and levels. you need to have each strategy implemented in one auxiliary each. 90<<da>>) aux 'Step Input' = STEP(40. These two methods are explained below. a step. simply drop the variable on the switch control. Based on the value of a constant auxiliary.355 - . To achieve this. Using this approach you can allow the user to change conditions of the simulation. and format the control as radio buttons with two (or more) states. If Auto is selected. This allows you to control a text string that appears in the diagram by controlling the value of a variable. Click OK to save the changes. or random. The simplest way of achieving this is by allowing the user to choose between two (or more) possible initial values for levels or constant auxiliaries. 8. or Apply to save the changes without closing the dialog box. which in turn is controlled by a switch control. The model is defined like this: aux Switch = 2 type Switch = Integer aux 'Wave Input' = 40+sinwave(40. When the user selects either radio button. 'Random Input'}[INDEX(Switch)] .

. The switch control was changed several times during the simulation. The animation shows one possible simulation run of the example described above.As can be seen from the definition. together with a time graph showing the output from one simulation. Note! Switch must be defined as an INTEGER for the INDEX function to work. The array is indexed by the value of Switch.356 - . The switch control is a threestate radio button. Tip! The same techniques can be used for switches formatted as list or combo boxes. A switch control is added to the diagram to control the value of Switch. the three input alternatives are concatenated into an array in the variable Strategy. The switch control is shown below. Under Values you should therefore enter the contents of Table 1. Value Text Val 1 1 Wave Val 2 2 Step Val 3 3 Random Table 1: The values of the three radio buttons. and the values are selected accordingly to the index value of the corresponding input variable.

The insertion process is generic. including the ability to insert single cells. Time Table Add an Array to the Table Control You can easily display an array in a table control. starting from the cell where you dropped the variable. The index variable can be used to control which element of a parameter is displayed in. a time graph. the name of a variable. A table control used to supervise a company's stock.Work with the Table Control The Table Control is used to display the value of a variable in the present simulation period.357 - . The Table Control accepts index variables as parameters. If you add arrays with more than two dimensions. you should use the Control rather than the Table Control. the automated insertion process can distribute the first two dimensions of the array in the cells of the table. allowing you to create user interfaces where you can select different parameter elements for display. along with the quantity in stock at this time. Through its flexible formatting capabilities. Tip! To display the entire time series of the variable. the array syntax must be utilized to display the other dimensions than . You can also insert as many rows and columns you wish. you can enter a new value for it in the table control. However. it is mostly useful for vectors (one dimensions) and matrices (two dimensions). the table control is ideal for creating a report form that updates as the simulation advances. and can be used for any array of any dimension. The table displays the current simulation time. since the table can easily display these as lists or tables without using the array syntax to display elements. The Table Control can be used to present data from read only variables. or a variable value in a table cell. say. By dropping the array variable on a cell in the table. If a constant auxiliary is selected as a parameter. The control also supports parameters using index variables to index its dimensions. You can display either a text.

or single cell (no dimensions distributed) under Paste as. new rows (or columns) will be created as necessary. 2. and select shortcut menu. In the Paste Array Parameter dialog box that appears. Add or Insert a Column in the Table Control To add a column below on the right side of the table control: 1. Right-click anywhere inside the tabular area of the control. Insert Column on the Add or Insert a Row in the Table Control To add a row at the bottom of the table: 1. Click OK to add the array into the table. Right-click anywhere inside the tabular area of the control. you can enter a new value for it in the cell. list (the first dimension distributed in columns or rows). If a parameter is shown in the cell. If the new rows (or columns) becomes too narrow. and select shortcut menu. 1. If the control contains too few rows (or columns). Thus. Insert a table control in your diagram. Drop the array variable you wish to display onto the first cell where you want its value to appear.the two first. and it accepts input (constant auxiliary or initial value of level). provided there is enough space to accommodate them. the overshooting array elements will not be added to the control. . and create a new and bigger one before trying again. and select shortcut menu. and select shortcut menu. if you wish to save a column (and/or a row) for headers. The size of the control should be made large enough to accommodate most of the elements of the array. In this case you should delete the control. Right-click anywhere inside the tabular area of the control. drop the variable on the second column (and/or second row) of the control. ! You can select whether to display the array in a table (the two first dimensions distributed in columns and rows). 4. 3.358 - . Right-click anywhere inside the tabular area of the control. The array will be displayed as specified. Add Row on the To insert a row below the selected cell in the table: 1. ! Under Layout you specify whether the first dimension of the array should be displayed downwards (rows) or across (columns) the control. you can specify how the array should be displayed in the table control. Add Column on the To insert a column to the right of the selected cell in the table control: 1. Insert Row on the Display a Text in a Cell You can enter text in any empty cell in the table control.

you can display the name of a variable in any cell you wish. Type the text. 2. select Assign Parameter Name on the shortcut menu. Note! This procedure requires that you have added at least one parameter to the control (you can do this by dropping a variable symbol on a table cell). 4. Tip! When you have selected a cell. To display the value of another . Tip! To show an empty cell. Click OK to display the variable name in the cell. and select the parameter name on the menu that appears. Select the cell in the table (point and click with mouse).To enter text in a cell: 1. select Remove Assigned Parameter on the shortcut menu. you can display the value of a variable in any cell you wish. you are not allowed to edit the text. Alternatively. Only the first 10 parameters are available on the shortcut menu. and select Assign Parameter… on the shortcut menu. Note! If the cell displays a variable name or read only value. Select the Name option under Type. you can format the font and color of the cell on the Format toolbar. 1. To display the name of another variable in a cell: 1. 1. 3. 2. and finish typing by hitting Enter. Display a Variable's Value in a Cell Once you have inserted a table control in your diagram. Once you have selected one cell. Right-click the cell. Drop the variable on the cell where you want to display its value.359 - . and select the parameter name on the menu that appears. Display a Variable's Name in a Cell Once you have inserted a table control in your diagram. Tip! You can drag variables from diagrams or from the variable window. select Assign Parameter Value on the shortcut menu. Right-click the cell. Right-click the cell. 1. you can use the pointer buttons on the keyboard to move the selection. Only the first 10 parameters are available on the shortcut menu. Select the variable whose name you wish to display in the dialog box.

However. When the resize cursor appears. select Remove Assigned Parameter on the shortcut menu. Use the Table Control as an Input Object The table control allows you to input values to parameters that accept this input. Change the Height of Rows and Width of Columns To change the width of a column: 1. 4. 2. and select Delete Column on the shortcut menu. Right-click the column you wish to delete. the height of the rows will not adjust to the new control height. Delete a Column in the Table Control 1. Delete a Row in the Table Control 1. and select Assign Parameter… on the shortcut menu. Note! Deleting a column does not remove parameters from the control. 2. drag the outline of the control itself. Right-click the cell.variable in a cell: 1. Tip! To change the overall height of the table control. Select the variable whose name you wish to display in the dialog box. and select Delete Row on the shortcut menu. Tip! To show an empty cell. Right-click the row you wish to delete. Note! Deleting a row does not remove the parameters displayed in it from the control. 2. Click OK to display the variable name in the cell. This means that you . Tip! To change the overall width of the table control. Select the Value option under Type. 3.360 - . The width of the columns will automatically adjust to the new control width. Point to the line separating the rows you wish to resize. Point to the line separating the columns you wish to resize. click the mouse-button and hold it down while dragging the column to its new width. click the mouse-button and hold it down while dragging the row to its new height. When the resize cursor appears. drag the outline of the control itself. To change the height of a row: 1.

Tip! If you define the parameter's corresponding variable as Permanent. Hit Enter to send the value to the target variable. which would immediately be converted to 1 m/s in the target variable.can only input values to constant auxiliaries or to levels. . Drop the variable(s) on the cell(s) where you want to display its value. Type the new value. 3. Tip! You can enter new values using any compatible unit of the target variable's unit. you can type the unit of the variable directly as text (or omit it. Select the cell. you could very well enter '3600 m/hr'. the change will only affect its initial value. If you change a level. Using the example above. For example. 2. if you like). Insert a table control in your diagram. or hit F2 to enter the existing value. When you want to change the value of the parameter: 1. When typing input values. simply type '20 m/s' or '20' (without quotation marks). the value(s) you have entered for the variable during the simulation run will not be reset when you reset the simulation.361 - . if you wish to enter 20 m/s as the new value. To prepare to use the table control as an input object: 1. 2.

Thus. Use the Format toolbar to format the line color and fill color of the graph. the time graph will scroll as the simulation advances. The time graph uses the report window of the simulation when it displays data. The scroll interval is determined by the report window's slide value. Select the graph you wish to change. Format the Graphs in the Time Graph Control To format the individual graphs: 1. You can format the graph with a pattern on the Fill property page. The time graph control supports parameters using index variables to index its dimensions. Tip! To show the behavior of a variable over time in a table. you can select the graph by clicking the filled area under the graph. available when you click doubleclick the graph or click Properties . use the time table control. if the report window is shorter than the total simulation length.Work with the Time Graph Control The time graph control is used to display the time series of variables as they develop over time. allowing you to create user interfaces where you can select different parameter elements for display. The time graph control shows the time series for wind variations at two different locations. The cursor will change to a small square when it hovers over a graph line. Tip! If a graph is filled. .362 - . 2. The time graph control is ideal for graphically presenting one or more variable's behavior over time.

If you select this option. If the major interval of the time axis is month. Properties Explained The default settings for major and minor intervals will follow the selections done in the Simulation Settings for the simulation. while deselecting it will include the common information in all the tick labels of the range.like for other axes available . selecting this option will display the year in the tick label. Change the settings for the properties you wish to change. With a major interval of one month. the tick label may be shown as Jan 1.363 - . Short will display the month number (1). You can override these for each Time Graph control individually. Click the Time Axis tab. whether to show static information. while Long will display the entire month name (January). etc. or OK to save the changes and close the dialog box. and also the format of the (time) tick labels. Placement Format Show static time elements Allow second level Description . If you select In intervals. the tick label will be shown directly below the tick label and denote that point in time. You can specify short or long time formats. information that is common for some of the tick labels will be shown below a range of tick labels. and select Properties on the shortcut menu.the minor and major intervals used by the axis. Click Apply to save the changes. Medium will display the month with three letters (Jan). while deselecting it will remove the year from the tick label. 4. and more. Right-click the time axis. Tick Label Options Property Available options Automatic In intervals Between intervals Specify the placement of the first level tick labels relative to the tick marks. 3. the simulation runs for one full year. the tick label will be shown inside the interval and denote the period. The major interval of the time axis will be used as the summary period for the summary parameters selected for your control. The time axis offers extensive control of the tick labels. etc. As an example. say. To change the properties of the time axis: 1. then the tick label may be shown as Jan. Short Medium Long Select the date and time format to use for the tick label. Feb. If. on/off Select whether the tick labels should be shown in one or two lines. Feb 1. if you want to. 2.Format the Time Axis in the Time Graph Control Formatting the time axis in the Time Graph control allows you to control the position and style of tick labels . It is recommended that you try the various options to see how they work for various intervals and periods. on/off Select whether time information that is common for all tick labels should be shown or not. If you select Between intervals.

364 - .Format (second level) Short Medium Long Select the data and time format to use for the second level tick labels. Examples The three illustrations below show how the tick labels of the time axis can be changed by using the options above. The settings for each are shown in the table. Time Graph Tick Label Options Placement: In intervals Format: Medium Show static time elements: Off Allow second level: On or Off Format (second level): Any Placement: Between intervals Format: Medium Show static time elements: On Allow second level: Off Placement: In intervals Format: Short Show static time elements: On Allow second level: On Format (second level): Long .

Since summary parameters contain only periodic data. To change the order of the graphs: 1. . these parameters are summarized over a summary period. the topmost parameter is displayed at top of the legend. you may change their graph type to Step. but you can also change it for each individual control. These options are available when you right-click the graph for each individual summary parameter in the control. or click 2. and Bar as well. The default value is the major interval selected in Simulation Settings on the Simulation menu. ! Send to Back: Sends the graph to the back of the control. and the other parameters are displayed in front of it.365 - Properties. ! Send Backward: Sends the graph one step closer the back. Double-click the control that you wish to change. The options are: ! Bring to Front: Brings the graph to the front of the control. 2. Tip! You can display both normal and summary parameters in the same time graph! The summary period for the summary parameters are equal to the major interval of the time axis of the control. The topmost parameter is displayed at the back of the graph area.Use Parameters with Summary Types in the Time Graph Control The Time Graph Control allows you to use parameters with summary types. Select a command on the shortcut menu that appears. and then reported once per period. Change the Order of Parameters The order of the parameters will decide the order in which they are displayed in the time graph. ! Bring Forward: Brings the graph one step closer to the front. However. Right-click the graph you wish to change. You can also perform the change in the Properties dialog box: 1. Select the Parameters tab in the property dialog box. and select Order on the shortcut menu. Unlike ordinary parameters. The summary period equals the major interval of the time axis. where three are summarized and displayed as bar graphs. . A Time Graph control displaying four parameters. should you wish to. which in this example is set to one quarter.

or select it and click Properties. or Apply to save the changes without closing the dialog box. and Bar. 1. The options are: Line. 2. Select the Parameters tab in the Properties dialog box. 3.366 - . The figure below illustrates the difference between the four types. Step. Step (bottom left). Click OK to save the changes. or 1. The options are also available on the Chart Graph property page for each selected parameter. Change the Graph Type of a Parameter You are allowed to change the graph type for parameters with summary types in the time graph control. Select Hide on the shortcut menu. . Right-click the graph you wish to hide. Smooth Line. and select the Visible option. and Bar (bottom right). 4. Sort the parameters in the list by selecting them and using the Up and Down buttons. and selecting Properties on the shortcut menu. and select the graph type to use on the shortcut menu. or Apply to save the changes without closing the dialog box. The four available chart types: Line (top left). The property page can be accessed by right-clicking the graph or the entire control. Right-click the graph you wish to change. Click OK to save the changes. Smooth Line (top right). Double-click the control that you wish to change. Select the parameter to hide in the list. 2. 4.3. Hide Parameters from the Time Graph To hide a parameter from the control without deleting it: 1.

2. and '. Options are '. Select Times down to control the orientation of the variable history. Select Include times to include time information with the history. 1. Select the destination for the export under Destination. Double-click the graph area of the control that you wish to change. or Apply to save the changes without closing the dialog box. If selected. The history can 1. '. 2. as well as its interior fill on the Format toolbar. Select Clipboard to export the history to the Windows Clipboard. 7.367 - .Show Hidden Parameters in the Time Graph To show the graph of a parameter that you have previously hidden: 1. Double-click the control that you wish to change. 3. Right-click the graph of the parameter whose history you would like to show in the time graph control. click Export…. You can change the line settings for the following . or select it and click Properties. Select the Decimal Separator. the values will be separated by a line shift.' (comma). Control the layout of the history in the Export History dialog box. Options are 'Tab'. and select the Visible option. Control the decimal separator and column delimiter under Format. Alternatively. You will be prompted to specify a file name and a location when you click OK. When you are satisfied with your selections. 2.' (comma). 5. Right-click the control and select Show or Hide Parameter on the shortcut menu. click OK to export the data. The history of the parameter will appear in the history dialog box. Select the parameter you wish to show (or hide) in the submenu that appears. 2. 2. Select File to export the history to a text file. 3. Select the Parameters tab in the Properties dialog box. and you can paste it into the any Windows application. 2. Select the Delimiter. Click OK to close the history dialog box. When you click OK the history is copied to the Clipboard. Select the parameter to show in the list.' (point) and '. Show and Export the History of a Parameter You can show and export the history for a parameter in the be exported to a file or to the clipboard. 1. Select Include headers to include column (or row) headers.' (semi-colon). To export the history to a file or the clipboard. 'Space'. and select Show History on the shortcut menu. or select it and click Properties. 6. Format the Graph Area You can format the color and style of the border of the graph area. or 1. 4. 1. Time Graph control. Click OK to save the changes. 3. Select the Line tab to format the lines. 4. you can use the Properties dialog box: 1.

while the intervals used for the value axis gridlines are specified on the Value Axis tab in the Properties dialog box for the control. Select the General tab in the Properties dialog box. Show Gridlines 1. You can also access the properties of the legend on the General tab when clicking Properties.368 - . the report length is one quarter. Note! The intervals for the gridlines of the value axis are specified on the Value Axis property page. say. or select it and click Properties. and select Show Legend on the shortcut menu. 2. Right-click the time graph you wish to change. To hide the legend: 1. Create a Scrolling Time Graph The report window . The intervals for the gridlines of the time axis are specified on the Report property page in the Simulation Settings dialog box. and the slide interval is one week. Select the Fill tab to format the interior fill of the graph area. The length of the report window specifies the portion of the simulation to view at a time. Note! The intervals used for the time axis gridlines are specified on the Time Axis tab. ! Major Vertical Grid: The major grid of the time axis. ! Minor Horizontal Grid: The minor grid of the value axis. Click OK to save the changes. Click OK to save the changes. and select Hide on the shortcut menu. or Apply to save the changes without closing the dialog box. select the gridlines to display. Toggle on/off the Legend for the Time Graph To hide or display the legend for the time graph: 1. . If. Double-click the control that you wish to change. The report window is defined by a length and slide. ! Minor Vertical Grid: The minor grid of the time axis. 4. 4. 3. the simulation runs for one year. Under Gridlines.properties: ! Line: The outline of the graph area. the report window will slide one week further. while the slide specifies the interval by which the report window will scroll. the report will show data for the last quarter at a time. ! Major Horizontal Grid: The major grid of the value axis. and when the end of the current quarter is reached.which you can specify on the Report tab in the Simulation Settings dialog box allows you to select a smaller portion of the total simulation to view. Right-click the legend. or Apply to save the changes without closing the dialog box. 3.

4. .The animation illustrates how the report window can be used to present only a portion of the simulation at a time. To set up a report window for the simulation: 1. Select the Report tab. and when the first month is completed. 2. The changes are immediately recognized by the time graph control. Select Simulation Settings… on the Simulation menu. The report window has a length of one month. 3. The entire simulation lasts for two months. select the appropriate length and slide of the reporting window. while the slide indicates when the window will scroll.369 - . it slides by an interval of one day. The length denotes the size of the window. Click OK to save the changes. Under Reporting Window.

The first alternative can only be used when all the parameters displayed in the control use the First summary type. The Time Table can be used to display the value of parameters over the simulation in various periods. . the control will display the time rather than the period. The other alternative is to display the name of the period that the value belongs to (such as January 2003).Work with the Time Table Control The Time Table Control is used to display the time series of variables as they develop over time. The specified reporting interval for the control will be used as the summary period for its parameters. If you add parameters to the Time Table control by clicking Add Parameter button. the summary types of the parameters. Tip! If all the parameters of the control use the First summary type. the time table will always display the interval names. Parameters in the Time Table control will always be defined with summary types. Time in the time table will be displayed in two alternative ways. the parameter will be added with Automatic as the summary type. always force the time to be displayed as period name by selecting the Always show interval names option. however. The default summary type used for parameters made from model variables is First. When any other summary type is detected. You can. It can be displayed accurately. indicating the exact time of the time step when the value is reported (such as 1/1/2003). Format the Time Display in the Time Table Control The way time is displayed in the Time Table control is dependent of the interval used. allowing you to create user interfaces where you can select different parameter elements for display.370 - . The time table control is ideal for presenting one or more variable's behavior over time. You can change the orientation of the table. The Table Control supports parameters using index variables to index its dimensions. as well as the formatting of text and cells. and the settings done in the Time Table property page.

while deselecting it will remove the year. the time table will always display interval names. To change the order of the parameters: 1. on/off Select whether time information that is common for all tick labels should be shown or not. even when all the parameters are defined using the First summary type. say. or on top in a horizontal table. Select the Parameters tab in the property dialog box. Sort the parameters in the list by selecting them and using the Up and Down buttons. display the average over the period. Change the Report Interval of the Time Table The Time Table Control allows you to specify a report interval for the control. To change the report interval and summary period of the Time Table: 1. 2. and not only for the time step in which it is displayed. Double-click the control that you wish to change. Select the General tab in the Properties dialog box. is simply that the value displayed is valid for the entire period. As an example. It is recommended that you try the various options to see how they work for various intervals and periods. or click Properties. specify the report interval and summary period to be used.371 - . You can also control the format of the time display.Note! The reason for displaying the period name rather than the time of the reporting time step. as an example. or click Properties. If this option is selected. This report interval is used as the summary period for the parameters. The parameter may. while Long will display the entire month name (January). selecting this option will display the year in the times. Double-click the control that you wish to change. and therefore the only time display that makes sense is the name of the period. the simulation runs for one full year. 2. 4. . Under Report Interval. The topmost parameter is displayed to the left in a vertical table. Change the Order of Parameters The order of the parameters will decide the order in which they are displayed in the time table. 3. or Apply to save the changes without closing the dialog box. Medium will display the month with three letters (Jan). and you can specify whether time elements that are static over the Times Options Property Format Always show interval names Show static time elements Available options Short Medium Long Description Select the date and time format to use for the tick label. Short will display the month number (1). 3. Click OK to save the changes. If. on/off Select whether to display interval names or not.

or Apply to save the changes without closing the dialog box. 2. Minor Interval. or Apply to save the changes without closing the dialog box. Double-click the control that you wish to change. Select the Parameters tab in the Properties dialog box. Click OK to save the changes. 2. Hide Parameters from the Time Table Control To hide a parameter from the control without deleting it: 1. Specify the orientation by selecting either the Horizontal or Vertical option. and select the Visible option. Select the parameter to hide in the list. Double-click the control that you wish to change. 3. Click OK to save the changes. The Time Step. 4. Click OK to save the changes. 3. or click Properties. or Apply to save the changes without closing the dialog box. The report interval is specified using an integer and one of the predefined intervals in the box. or click Properties. and Major Interval refer to the settings specified in the Simulation Settings dialog box. under the Report tab. 4. Change the Orientation of the Time Table To change the orientation of the time table: 1. Select the General tab in the Properties dialog box. .4.372 - .

You are given the opportunity to optimize your policies. The Risk Assessment task automatically changes variable values and computes new results.373 - .and worst-case scenarios are. even to conflicting goals. all presentations for the task must be created in private diagrams. and Studio will analyze the effects of the changes in assumptions on the selected effect variables. you will first select one or more assumption variables and one or more effect variables. to help determine the probability of obtaining the best strategy. To define a Risk Assessment task.Working with Risk Assessment Why use the Risk Assessment task? Risk Assessment helps an organization assess their potential and risk. The risk assessment runs will not affect the ordinary simulation runs that are performed on the component. and thus discloses how vulnerable the model is. With this tool you can easily disclose how likely best. and adjust your objectives to risk factors in your model. Studio analyzes how sensitive the results are to changes in these uncertainties. The assumptions will be varied in the specified manner. The result is a series of probability distributions showing the sensitivity of the effects variables to changes in the assumptions. How to use the Risk Assessment task You can add the Risk Assessment task to any component in a simulation project. A risk assessment analysis will provide you with a probability distribution of how the variation in assumptions will affect the value of effect variables. similar to a separate simulation run. or disclose the riskiest. Since the various Risk Assessment variables are only available internally in the task. .

Being an inventory manager. you can study how sensitive your model is to changes in these assumptions. Effect variables must be computed variables of which you want to study the effects of uncertainty in the selected assumptions. . Now you want to assess the risk of running out of inventory due to uncertainties regarding delivery times for supplies.Sample methods The Risk Assessment task uses sophisticated sampling methods to produce sample value sets for the selected assumptions defined by probability distributions. it is your policy to keep the inventory equal to the expected demand plus some extra. Let us say that you make the following choices for assumptions and effects: ! ! ! ! assumption . The latter allows you to specify the probabilities of possible values to occur. Latin Hypercube is the recommended method. Assumption variables must be changeable variables.inventory coverage (fixed value) assumption . and below or above certain percentiles. You can easily experiment with future scenarios and develop the best long-term strategy. Many models will include relationships and variables that are difficult to define accurately. Latin Hypercube combines random sampling with factorial design.demand pattern (distribution) assumption .374 - . By using the Assess Risk task.average delivery delay for supplies (distribution) effect .cost of lost sales plus cost of inventory The Risk Assessment task now produces distributions of values for the effect variables. Example of use The effect of motivation on productivity and the effect of price on demand could be typical assumptions of a model. and to uncertainty about the cause-and-effect relationships between elements of the system you are modeling. but you can also use the Monte Carlo method. staffing and capital costs allow minimal inventories. Assumptions can be defined as fixed values or probability distributions. While the Monte Carlo method is a simple random sampling method. About Risk Assessment Uncertainty in your models can relate to uncertainty about the future. The Risk Assessment task produces distributions of values for the effect variables. The Risk Assessment task shows how sensitive a model is to changes in its assumptions. and you can see the likelihood (risk) of undesirable results. before simulating the model. You can study the probabilities of results in different ranges. as well as favorable results (opportunities). and you must make "guesstimates" in order to complete the models. This is required to approximate the probability distribution function of the selected effects. Risk Assessment has been used for example to find what levels of production. and to show which investments maximize profits without hurting the cash flow. This way you can test the model's robustness to variations in assumptions.

3. available by double-clicking Risk Assessment Variables in the Project Window. Open the model Open the simulation project that contains the component that you wish to perform the Risk Assessment on. . and select Risk Assessment on the submenu. For further details. How to Assess Risk The guidelines below outlines the main operations of how to use the Risk Assessment task in Studio. The Risk Assessment task will be added to the component as a separate simulation task.The Risk Assessment Process The graphical overview below explains how the Risk Assessment task in Studio works. please refer to the appropriate sections in the help system or use the links below to jump directly. The simulation runs performed on this task will not interfere with the normal simulation runs in other simulation tasks on your component. point to Add Solver Task. Select assumption and effect variables for your analysis You select the assumptions and effects in the Risk Assessment Variables window.375 - . 2. Add the Risk Assessment task You add the Risk Assessment task to the component by right-clicking the component in the Project Window. 1.

You will see the run number and the simulation status of the current run in the status bar. These are available by double-clicking Private Diagrams in the Project Window. Make a presentation diagram for your analysis The Risk Assessment data are only available within the Risk Assessment task of the component. a sample is . 5. to properly approximate the probability distribution of the assumptions. The Monte Carlo sampling method uses computer-generated random numbers (like a Monte Carlo roulette wheel) to produce sets of values.376 - . Use the selection of available controls to present the results from the analysis. The Monte Carlo Sampling Method. The presentation diagrams for your analysis must therefore be created in a private diagram for the task itself. Define the simulation settings The simulation settings for the Risk Assessment task includes two parts: The simulation setting for each run (which is the same as the simulation settings for a normal simulation) and the Risk Assessment specific settings for how to control the multiple runs associated with a Risk Assessment analysis. Assumptions can be defined as fixed values or probability distributions. The probability distribution of each assumption is segmented into a number of non-overlapping intervals with equal probability. the Risk Assessment will start running its batch of simulation runs. 6. The latter allows you to specify the probabilities of possible values to occur. and how to record the resulting time series from the analysis. 4. The Latin Hypercube Sampling Method The Latin Hypercube sampling technique is the recommended sampling method. You can also select the number of generations to generate.Assumption variables must be changeable variables. which means that all areas of the sample space are represented. It combines the advantages of simple random sampling (as used in the Monte Carlo technique). the results will be presented in the controls. Note! Note that the Monte Carlo method needs a higher number of samples than the Latin Hybercube method. because it is tenfold better than the Monte Carlo technique. For each assumption. Their probability is determined by the probability distribution function chosen for the particular variable. Run the Risk Assessment analysis When you click Play. and full factorial designs. When all runs have finished. The Risk Assessment analysis allows you to select between two different sampling methods: Latin Hypercube and Monte Carlo. Effect variables must be computed variables of which you want to study the effects of uncertainty in the selected assumptions.

whereas the maximum number allowed is 10 000. This is required to approximate the probability distribution function of the selected effects. You must select one or more assumption variables and one or more effect variables. . The default value is 40. that there is no correlation between them. Click the Risk Assessment tab in the dialog box. The minimum number of generations is 10. or right-click Risk Assessment in the Project Window. Select the sampling method to be used in the Method drop-down box.. you can enter a positive integer to initialize the random number generator. The Monte Carlo method would normally require at least ten times as many generations as Latin Hypercube. The default value is 100. Enter an integer indicating how many generations (samples) you want to use from the probability distribution of each assumption. however.) You can enter any value between 0 and +? (infinity). but you can also use the Monte Carlo method. Changing the seed might affect the results. but you may consider using fewer generations in test runs than in the final analysis. i..e. Note! Powersim Studio assumes that the assumptions are independent of each other. Select Simulation Settings. under Generations. 6. The recommended value is at least 40. Tip! When you use this sampling method.. you can determine a different interval to record. before simulating the model. it is recommended the number of generations is 40 in the final run. while a higher value requires more processing time. you have to select the variables that you wish to study. 4. To select and define the sampling method: 1. Under Seed.generated from each interval. Latin Hypercube combines random sampling with factorial design. to use a lower number in the test runs. one value will be recorded for every time step of the simulation. on the Simulation menu.377 - . If you select this option. on the shortcut menu. the summary type that is selected for each effect variable in their property page will be used.. A lower value may produce a rougher approximation of the probability distribution. 2. The section History of Effects allows you to specify how the effects are recorded. and select Simulation Settings. If you select With Maximum Resolution. Select and Define a Sampling Method The Risk Assessment task uses sophisticated sampling methods to produce sample value sets for the selected assumptions defined by probability distributions. By selecting Summarized over Period. however. Latin Hypercube is the recommended method. It might be wise. Working with Risk Assessment Variables Before you can start your Risk Assessment analysis.. Options are Latin Hypercube and Monte Carlo. 5. (Using the same seed for successive runs will always yield the same results. 3. While the Monte Carlo method is a simple random sampling method.

Parameters: Minimum. and there is no distinction between decisions and assumptions in the software. You are requested to enter minimum and maximum values for the range. Parameters: Mean. decide upon the production volume of a new production line or the salary of a group of employees.Assumptions are changeable variables beyond your control. Changeable variables are model variables that the Risk Assessment task can alter during the execution of the simulation runs. Effects are computed variables for which you want to study the uncertainty distribution in the Risk Assessment task. and to set a lower/upper limit for values to be included. which determines where the peak occurs. all values within the specified range are equally likely to occur. Levels that accumulate flows and auxiliaries that depend on other variables belong to this category. because many random variables of practical interest are normal or approximately normal or can be transformed into normal random variables in a relatively simple fashion. Normal Distribution The normal distribution is bell-shaped. and standard deviation. Decisions can take place at the start or at a specified time of the simulation. Uniform Distribution In the uniform distribution. You are requested to enter the expected value and standard deviation. . Use it when you wish to avoid values above or below a certain limit. Computed variables are variables that the Risk Assessment task cannot alter during the execution of a task. the normal distribution is a useful approximation of more complicated distributions. and it can therefore be selected as an assumption with a fixed value. and are variables that you can directly influence. At the policy level. Decisions are assumptions with fixed values. It is quite common that there is uncertainty around the value of assumptions. decisions are parameters to policy procedures. Standard Deviation. Maximum.378 - . which determines the width and height of the peak. You are requested to enter the expected (mean) value. Inflation rate and interest rate are typical examples of assumptions. Parameters: Mean. for example.) Note that the initial value of a level can be controlled by the task. The normal distribution is very useful. Lower Limit (optional). In addition. Assumptions can take place at any time in the simulation. for example to avoid negative values for a population variable. but you can limit the values at both ends of the distribution. Truncated Normal Distribution Identical to the normal distribution. You can. Types of Probability Distribution The table below describes the probability distributions that you can use in the Risk Assessment task in Powersim Studio. Standard Deviation.External factors that influence a model are assumptions if they are modeled as constants rather than computed variables. Upper Limit (optional). (Decisions are a conceptual term in Studio.

Peak. which must be a positive value that shifts the curve along the horizontal axis. you are requested to enter minimum. 1. β (Beta) Select Variables for Risk Assessment When you have opened a model and added a Risk Assessment task to the component you wish to study. 3. to add an effect variable. you can create assumption and effect variables. so you can use the treeview to define the variable to suit your analysis. and scale input value. These are explained in detail below. Exponential Distribution For the exponential distribution. To apply the assumption at the start of the simulation. You will be warned if you try to enter a start time that is beyond the time interval of the simulation. enter the value Start or right-click and select Apply at Start Time on the shortcut menu. Define an Assumption with a Probability Distribution When you want to include uncertainty in your task. 2.. Select the time at which the assumption should be applied in the Apply Time column of the treeview. on the shortcut menu to add an assumption variable. The general form of the exponential probability density function is: Parameters: µ (Mu). Alternatively. The selected variable will appear under the appropriate node in the treeview. Maximum.Triangular Distribution For the triangular distribution. Right-click the Distribution cell of the treeview. Beta (ß).379 - . or Right-click the Effects node and select Add Effect. To define an assumption with a probability distribution in the treeview: 1. My (µ). you can specify a statistical distribution instead of a fixed value for one or more assumptions. and select the probability distribution you wish to use on the submenu. click Distribution on the shortcut menu. The Risk Assessment Variables window will open. for example. Double-click Risk Assessment Variables in the Project Window. 2. Studio features five different distributions that you can select between. you are requested to enter a location input value. and click OK to make a selection.. which determines the shape of the curve. you can enter a time at which the assumption should be applied. Select the assumption you wish to define in the Risk Assessment Variables window. too. You can. use this distribution when describing lifetime probability for a device. The treeview is updated with properties corresponding to the selected distribution. maximum and peak values. .. Right-click the Assumption node and select Add Assumption. 3. Select the variable you wish to select in the dialog box. The various properties of the variable will be available in the treeview. Parameters: Minimum..

in the treeview. and change their values in the Value column of the treeview. Select the Assumption tab. 3. Select the Assumption tab. To apply the assumption at the start of the simulation. Right-click the assumption you wish to define in the Risk Assessment Variables window. Select the Fixed Value property and enter the correct value in the Value column of the treeview. Select the time at which the assumption should be applied in the Apply Time column of the treeview.. etc. and you can yourself decide their values. 2. or click Apply to save the changes without closing the dialog box Define an Assumption with a Fixed Value Assumptions with a fixed value can be considered as decisions in the analysis. You will be warned if you try to enter a start time that is beyond the time interval of the simulation. Click OK to save the changes. enter the value Start or right-click and select Apply at Start Time on the shortcut menu. These are parameters that you can control fully in your system.4. you can enter a time at which the assumption should be applied. Change the available parameters for the distribution according to your preferences. Click OK to save the changes. 5. To define a probability distribution for an assumption in the Properties dialog box: 1. such as Mean. Select the assumption you wish to define in the Risk Assessment Variables window. To apply the assumption at the start of the simulation.380 - . Enter the time at which the assumption should be applied in the Apply Time field. Select the probability distribution to use in the Distribution Type list. enter the value Start or use the spin button to select it. 3. To define a fixed value for an assumption in the Properties dialog box: 1. You will be warned if you try to enter a start time that is beyond the time interval of the simulation. and select Fixed Value on the submenu. 2. Right-click the Distribution cell of the treeview. 3. 4. Alternatively. 5. 6. Decisions can occur at any time during the simulation. 4. To apply the assumption at the start of the simulation. you can enter a time at which the assumption should be applied. 6. Alternatively. enter the value Start or use the spin button to select it. Right-click the assumption you wish to define in the Risk Assessment Variables window. 2. Select the various properties. Enter the value of the assumption in the field under Distribution Parameters. or click Apply to save the changes without closing the dialog box . Select Fixed Value in the Distribution Type list. you can enter a time at which the assumption should be applied. To define a fixed value for an assumption in the treeview: 1. Alternatively. You will be warned if you try to enter a start time that is beyond the time interval of the simulation. click Distribution on the shortcut menu. Enter the time at which the assumption should be applied in the Apply Time field. and select Properties on the shortcut menu. Standard Deviation. The available parameters in the Distribution Parameters list will be automatically updated to correspond to the selected distribution. 4. and select Properties on the shortcut menu.

and select Delete on the shortcut menu. and each effect may use a different summary type (if required). Select the estimates you wish to compute in the Available Estimates lists. The summary type is individual for each effect. This summary type will be used if the option Summarized over Period is selected on the Risk Assessment tab of the Simulation Setting dialog box. Open the Project Risk Assessment Variables window by double-clicking the node in the Window. Right-click the variable you wish to delete in the list. To specify an effect variable: 1. though. Open the Risk Assessment Variables window by double-clicking the node in the Project Window. You can select as many estimates per effect that you wish. you can either sample all the effects with maximum resolutions. Right-click the effect you wish to define in the Risk Assessment Variables window. Thus. 2.381 - . Hit Del on your keyboard to delete the variable. Presenting Results from Risk Assessment Analysis Results from a Risk Assessment are most often presented using High-Low Charts and High-Low Tables. Select a summary type for the effect. Select the variable you wish to delete in the list (under either Assumptions or Effects). You can record the time series for the effects in different ways. or click Apply to save the changes without closing the dialog box Delete a Risk Assessment Variable 1. You can also summarize the data over an interval. These distributions are produced by varying the assumptions according to their defined probability distributions. Note! The same interval is used for all effect variables. These presentations can be created using time graphs and time tables. 2. 4. and you can have Studio compute various estimates from the data. The summary interval is selected in the Simulation Settings dialog box.Specify an Effect Variable The Risk Assessment task will produce probability distributions for the various effect variables that you have selected. and then record the resulting time series from the various runs. These time series are computed at the end. 5. or you summarize all effects over the same period. You select which estimates to compute for each effect separately. or 1. Click OK to save the changes. yielding one recorded value per time step. 2. You can select several different summary types. It is also possible to model structures that can be used to present histograms by the use of chart graphs. Select the Effect tab. 3. 3. and select Properties on the shortcut menu. You can either record them in the traditional way. .

the yellow band shows 0-100%. 5%/95%. An Interaction diagram can only contain presentation symbols. The red line in the center is the effect's average value. Parameter Line color Fill color High Orange Yellow 90% Percentile Blue Cyan 75% Percentile Dark green Light green 50% Percentile Red 25% Percentile Dark green Cyan Low Orange White (use the background color of the graph area). and they only exist within the simulation task where they were created. You can use any presentation objects at your disposal in Studio. The bands of the high-low chart is created by coloring the area between pairs of an effect's estimates. such as variables. and controls. flows. High-Low charts are created in Studio by using the standard Time Graph control and using different line and fill colors for the different estimates. Private diagrams. None . and 25%/75%. A Constructor diagram can contain any available symbol. while the red line shows the 50% Percentiles. which can only be used for data input and output. the green band shows 25-75%. High-Low charts High-low charts display graphs showing bands of the lowest to the highest output values over time. and you must therefore use Private Diagrams to set up data presentations for these analyses.382 - . Note! Shared diagrams are Constructor diagrams. such as frames. The table below shows line and fill colors of the various parameters to achieve the display above. hyperlinks.Private Diagrams The Risk Assessment variables will only be available inside the task itself. The High-Low chart shows the bands of the lowest to the highest output values over time. are Interaction diagrams. 10%/90%. the blue band shows 10-90%. In this graph. as affected by variation in assumption values.Bands can be created by using these pairs: High/low. and they are identical in all simulation tasks of a component. Private Diagrams are so-called Interaction Diagrams. on the other hand. The illustration below shows one such high-low chart where all of these pairs have been used. and controls.

IF(FLOOR((Parent~Input-Offset)/'Category Size'.Histogram.. 0) . const 'Category Size' = .High-Low tables The High-Low tables shows the time series for the various effect estimates.0) . and you can shift the starting point of the histogram by setting the value of Offset.0) //End IF ) //End FOR integration Category = Zero Order Immediate aux Reset = IF(RUNINDEX=1.. and increase the value of the corresponding array element by one. 1. Category will evaluate the input variable Input.. const Offset = .. // The variable should have the same unit as // Parent~Input level Histogram = 0 Histogram = Histogram dim aux Category = // The variable uses the Zero Order Immediate integration setting FOR(i=Histogram | IF(TIMEIS(STOPTIME). You can control the size of the categories by setting the value of Category Size. // This variable is defined outside the submodel // (on the parent level). and the Category auxiliary are defined as public variables. range Histogram = . Powersim Studio doesn't feature a specialized histogram control. Offset and Category Size constants. The equations for the submodel is shown below.. It is achieved simply by adding a time table to your diagram and selecting the desired estimates as parameters. // A range defining the number of categories for your histogram // By var Parent~Input = . The Reset flow resets the Histogram level at the start of the first simulation run..383 - . This allows the level to collect the inflows over all of the simulation runs that constitutes the Risk Assessment analysis. you can present your data in a histogram by using a simple model structure and a Chart control. // The size (or width) of the histogram categories // The variable should have the same unit as // Parent~Input // The offset of the first category (0 + Offset). Histograms The histogram displays the number of occurrences of different values for the given effect. The level Histogram is an array. The total number of occurrences equals the number of samples specified in the method tab.1)=NUMERICAL(i). The Histogram level. At the end of the simulation. The model structure is presented below. However.. The model structure that collects data for display in a histogram. This allows these variables to refer to variables and to be presented in controls outside the submodel. // The Input variable to create a histogram for. Notice that Histogram is defined as a permanent variable. This means that it retains it value between simulations.. where each element represents a value category of the histogram.

4. Repeat step 5 until your graph looks right (see illustration below). a graph like the one below can be created. Define the Histogram range using an enumeration range. Define Offset corresponding to the output range of your effect. Click Apply to see the changes in the graph. 2. such as High/Low. etc. 5%/95%. 6. Note! If you are working with a Risk Assessment presentation. High-Low charts are created in Studio by using the standard Time Graph control and using different line and fill colors for the different estimates. 90%. with the name '50-54'. '55-59'. The range Histogram has eight elements. you must create the graph in a Private Diagram. The submodel has been defined with a Category Size of 5000USD and an Offset or 50000USD.). make sure to select corresponding pairs of parameters. where the name corresponds to your categories. such as: ! ! ! Define Category Size corresponding to the output range of your effect. or else the effect will not be available to the graph. etc. Right-click the time graph. By carefully selecting the fill and line colors. Create a High-Low Chart High-low charts display graphs showing bands of the lowest to the highest output values over time. 5. 95%. To create a high-low chart in Studio: 1.integration Result = Zero Order Immediate The level Histogram can now ben displayed in a chart control You control the display of the histogram by several factors. Select the parameters you wish to display in the high-low chart. 3. etc. select Properties on the shortcut menu and select the Parameters tab. Use the Fill and Line property pages to set colors to the various parameters' graphs. Insert a Time Graph control in your diagram by clicking Time Graph and drag the object to the desired size. In a Risk Assessment analysis. 10%/90%.384 - . Use the Down and Up to sort the parameters in descending order (in Risk Assessment this would be High. remember that you must perform . as affected by variation in assumption values. The illustration below shows how a histogram can be presented. Note! If you are creating a high-low chart for a Risk Assessment effect.

the yellow band shows 0-100%. Use the Down and Up to sort the parameters the way you prefer. 4. The table below shows line and fill colors of the various parameters to achieve the display above. Click the General tab. 5. 2. . Click Apply to save the changes. To create a high-low chart in Studio: 1. 3. select Properties on the shortcut menu and select the Parameters tab. It is achieved simply by adding a time table to your diagram and selecting the desired estimates as parameters. You can control the reporting interval under Report Interval. In this graph. while the red line shows the 50% Percentiles. 6. Insert a Time Table control in your diagram by clicking Time Table and drag the object to the desired size. Select the parameters you wish to display in the high-low chart. the blue band shows 10-90%. Parameter Line color Fill color High Orange Yellow 90% Percentile Blue Cyan 75% Percentile Dark green Light green 50% Percentile Red 25% Percentile Dark green Cyan Low Orange White (use the background color of the graph area).385 - . You can select between several available intervals. the green band shows 25-75%. or OK to save the changes and close the dialog box. Right-click the time graph.one analysis before the graph will be drawn. The High-Low chart shows the bands of the lowest to the highest output values over time. None Create a High-Low Table The High-Low tables shows the time series for the various effect estimates.

Select ra_presentation. Drag a link from the variable you wish to create a histogram for and to the submodel. You can either set them directly in the Equations view by defining them. Category Size and Offset. 10. If you need more categories in your histogram.386 - . Click inside the diagram where you want to place the submodel. 4. The few steps below shows you how to use it. However. you can increase the number of elements in the Histogram range. We have included the Histogram submodel as a component in the ra_presentation. You have to set two more variables inside the submodel. Highest and lowest values. Open the diagram where you want to insert the submodel. . Powersim Studio doesn't feature a specialized histogram control. you can present your data in a histogram by using a simple model structure and a Chart control. The total number of occurrences equals the number of samples specified in the method tab. To add a histogram to your simulation project: 1. 8. Select Histogram in the Copy Component dialog box. Create a Histogram The histogram displays the number of occurrences of different values for the given effect. Format it to suit your preferences. as well as the 25% and 75% percentiles. or you can insert two constants in your diagram. 7.sip project of the Learning Lab.. 3. 5. Open the simulation project where you want to utilize the Histogram submodel. The default value is 8. Click the small arrow next to Copy Component as Submodel and select Browse for File to Copy from. so you can easily utilize it in your Risk Assessment projects. on the submenu.The time table shows the time series from a Risk Assessment analysis.Input variable in the Define Child Variable dialog and click OK. and connect them to the corresponding variables inside Histogram.sip 6. which you will find in Global Ranges. Both these variables need the same unit of measurement as the variable you wish to chart. Select the Histogram. 2.Histogram as a parameter for the chart. 9.. Browse to the folder where you installed Powersim Studio. Add the variable Histogram. 11. then go to the Samples\Bits\ folder. drag links to the Histogram submodel. Insert a Chart Control on your diagram. It shows the Average.

The submodel has been defined with a Category Size of 5000USD and an Offset or 50000USD. . By deleting the existing range named Histogram and then creating a new enumeration range by the same name. '55-59'.387 - . etc. the histogram will get the range element names along the category axis. The illustration below shows how the finished histogram may look. The range Histogram has eight elements. with the element names '50-54'.Tip! You can also get category names in the histogram.

where you import initial values and export simulation results. The transfer setting of the connection controls when new data in the dataset instance is saved back to the main dataset. Datasets are flexible. and variables can be interconnected if their transfer directions correspond to each other — a model variable with a transfer direction of out can connect to a dataset variable with a transfer direction of in). These connections can go both ways. From the Datasets entry you are allowed to add new datasets. To be able to connect to each other. datasets are also capable of importing range. which stores its histories internally in Studio). You can even perform a combination of the two. In addition to handling data input and output. A dataset supports bidirectional transfer. In Automatic mode." such as SEM-BPS. The dataset contains connections between the data source and one or more variables in your simulation project. history for the variables (if available). unit and time definitions. or internally in Studio. the variables must also have compatible type. allowing you to run the simulation even if a connection to the external data source is not available. the same dataset can very well be used to import input data into some variables. and information about how these histories are being transferred to external data sources (except the Studio dataset.388 - . Architecture The dataset definition contains the definition of the variables. The connection between the dataset and the simulation is made in the Co-models View. if you like) does. while in Manual mode. remove them and define them. new data is saved immediately. an instance of the dataset is created. and unit definitions. while at the same time receiving time series to another model variable. provided one exists. and allow you to both import input data to variables and export simulation results. dimension. in much the same way as a component (or model. Microsoft Excel spreadsheets. making it easy to export the time series of a model variable to the value store. Datasets are managed in the Project Window in Powersim Studio. Variables in the model and the dataset have defined transfer directions. you control when the data is written back to the main dataset .Datasets in Powersim Studio Datasets represent a connection between data from external files or data sources and the variables in your simulation. This instance keeps a copy of the history for each variable. while exporting simulation results from others. When a connection is made. A dataset contains variables. Most datasets will keep the last saved data in its cache. About Datasets Datasets allow you to transfer data between a simulation and a "value store.

If the dataset is set to Manual transfer. . You can only save data at the end of the simulation. a time series is generated for the model variable. the co-models dataset variable will transfer its time series to the main dataset at the end of the simulation. When the connection between the simulation and the dataset is made. This is also where the connections are established on a variable to variable level. This time series is transferred continuously to the connected dataset variable in the co-models view. or you can define them manually by drag and drop. The transfer direction of the dataset and model variables must match each other in order for a connection to be established. you can connect the model variables to the dataset variables.yourself. If the dataset is set to Automatic transfer. since the value of model variables may change significantly as you start to import data from the dataset (rather than calculating the imported model variables internally). During a simulation. however. you decide yourself when the transfer from the co-models dataset to the main dataset is made.389 - . if you wish. Note! You can only create dataset connections at the start of the simulation. This connection can be made automatically. Dataset Overview The relationship between simulations and datasets. The connection between the simulation and the dataset is set up in the Co-models view.

unit of measurement. This summary type is only available for dataset variables that have the transfer direction in in the dataset. These will be exported to and from the dataset as ordinary continuous variables. . or you can create them on basis of existing model variables. About Summary Types Most datasets are recorded with a lower resolution than the simulation is run on. and a defined transfer direction. be data from a real system. However. Last: Record the variable's value at the end of the summary period. This summary type is only available for dataset variables that have the transfer direction in in the dataset. dataset variables have a defined dimension. This history can be recorded from a simulation. You can create and define them manually in the dataset's view. You can select between different summary types. A connection can only be established between a model variable and a dataset variable if the dimension of the two have matching (identical) dimensions. or enumeration ranges or subranges. This is identical to letting the variable control a flow into a level. About Dataset Variable Dimensions Just like model variables. Average: Record the variable's average value over the summary period. They have a data type. ! ! ! ! ! ! First: Record the variable's value at the start of the summary period.a dataset variable has a history of values. You should therefore take care when exporting or importing model variables using either Zero Order or Zero Order Immediate integration settings. Note! If you use named ranges (either numerical or enumeration ranges). In this case you can select how the dataset variable should be summarized over the sampling period of the dataset. instead of having a definition that controls the way the variable is computed as the time advances . using either named or unnamed numerical subranges.as the a model variable has . as shown below. Minimum: Record the variable's minimum value over the summary period. Dataset variables can be created in two ways. you can only use ranges that are defined in Global Ranges. Unlike model variables. dimension. The last method enables you to quickly connect your model variables to datasets and have their time series saved in external data stores. and then report the level's value. The dimensions are specified in the same way as for model variables. Accumulated: Record the variable's accumulated value over the summary period. dataset variables are only treated as continuous variables. Maximum: Record the variable's maximum value over the summary period. or be computed using other software.About Dataset Variables Dataset variables are counterparts to ordinary model variables.390 - .

while other datasets only support one of them.391 - . Minimum: Records the minimum value during the sample period. the change is immediately reflected for all the dataset variables as well. and data are transferred between model and dataset variables. If you have specified that the dataset allows write-back in addition. Dataset transfers The data transfer between the dataset connection and the data store can be set to Automatic or Manual. Average: Records the average value over the sample period. Last: Records the last value of the sample period. and stored in the data connection. Maximum: Records the maximum value during the sample period. data is read from the data store when the simulation is initialized. . or you can set a common dimension for all the variables in the dataset. the dimension definition is entered on the dataset itself rather than on each variable individually. About Transfers in Datasets Data is transferred on two different levels when using datasets in Studio. even if the variable in question is imported from the data store and to the simulation. When the simulation is finished. Note! Some datasets support both individual and common dimensions. The history is summarized over a given period. If you set a common dimension for all dataset variables. and you can select the summary type for each dataset variable individually. Accumulated: Records the accumulated value over the sample period. About History in Datasets Variable history is recorded in the dataset connection per dataset variable. the edited time series will also be transferred back to the data store. Edit and Write-back of Variable History Provided the dataset supports manual editing of variable history. For automatic transfers. When changing the dataset's dimension definition. the data is transferred back to the data store from the data connection. All data from the dataset are read at once. This will be apparent when working with the dataset in question. You can either set the dimension for each individual dataset variable. you can edit the history for a dataset variable. The available summary types are: ! ! ! ! ! ! First: Records the first value of the sample period.Common or Individual Dimensions There are two ways of setting dataset variable dimensions in Studio. Data are transferred between the data store and the dataset connection.

The initial value of the constant is imported from the time series for the out-in constant.For manual transfers. If the dataset contains data with a lower resolution than the simulation requires. Variable transfers Data transfer on the variable level occurs continuously throughout the simulation. and doesn't involve the external data store at all. Create a Dataset You can add and delete datasets from your project in the Project Window. and data can only be saved at the end of the simulation. 2.392 - . Constant out in in out in-out The history for the constant is exported from the simulation and to the dataset. while the rest of out-in the history for the level is exported from the simulation and to the dataset. out in in out The entire time series is imported to the auxiliary from the dataset. 1. while the rest of the time series for the constant is exported from the constant to the dataset. . Simulation Dataset Comments Level The history for the level is exported from the simulation and to the dataset. Valid transfer directions for different variable types All transfer directions are not compatible with all model variable types. and select Add Dataset on the shortcut menu. open it by clicking Project Window on the View menu. The data transfer on this level is performed between the simulation and the dataset connection. The table below shows the different transfer directions that are allowed for each variable type. However. This is useful when you want to record the user inputs made during a simulation. Data can only be loaded at the start of the simulation. Right-click Project in the Project Window. you control the data transfer between the data connection and the data store yourself. during the simulation. Select the dataset you wish to add on the submenu. but choose yourself when you want to transfer data to and from the data store. Auxiliary The history for the level is exported from the simulation and to the dataset. in this transfer mode you don't have to load or save data for every simulation. The entire time series for the constant is imported to the auxiliary from the dataset. out in-out in An initial value is imported to the level from the dataset. data will be interpolated for the intermediate data points. If the Project Window is not open.

Model variables can be dragged from the Diagrams view. we recommend that you arrange the views you need to use using the Window menu. or from the node in the Co-models view. The dataset you selected will appear below the Main node. reset it by clicking Reset Simulation in the toolbar.The dataset you added will appear in the Project Window. Connect a Dataset to a Simulation A dataset connection represents the physical connection between a simulation and a data storage. The difference is that if you drop the model variable on the dataset connection. 4. Tip! You can organize the content of your project in folders in the Project Window. as illustrated below. If you have started (or finished) a previous simulation run. and select Create Dataset Connection. Open the Co-models view by double-clicking the node. The connection details for the data storage are defined in the dataset definition. If the simulation is not at start time (initial time).393 - . or right-clicking it and select View on the shortcut menu. 2. Create Dataset Variables by Drag and Drop You can create dataset variables by dragging their model variable counterparts onto either the Dataset connection node in the Co-models view. Main Tip! Before performing the drag-and-drop operations. You can then drag the components and datasets into the folder. Simply right-click Project in the Project Window. Right-click anywhere inside the Co-models view. a connection will also be established at the same time. When a dataset connection has been made in the Co-models view. 1. If the Co-models view is not open. Dataset connections are managed in the Co-models view. and select New Folder on the shortcut menu to create the folder. or onto the Dataset node in the dataset's view. the connection will appear below the main model in the list. expand the nodes in the Project Window until the Comodels node for the current simulation is visible. It is therefore not possible to create dataset connections when the simulation has started. or by hitting Ctrl-R. Importing data from an external data source (rather than calculating the variables inside Studio) will significantly change the behavior of the model. This makes it easy to drag from the source and . 3. Select the dataset you wish to connect on the submenu. the simulation must be reset before you can create new dataset connections. the Equations view.

Right-click the Dataset node. Note! Unlike model variables. 2. Create Dataset Variables Manually Dataset variables can be created manually in the Dataset view. and unit is created. units. Each variable will be handled individually. and select Add Dataset Variable on the shortcut menu. Enter the name for the dataset variable and hit Enter. In the opposite case. 2. the model variable would get the opposite direction of the dataset variable. Thus.drop it on the correct target. and dimensions of the two variables match each other. Dropping a model variable on an existing dataset variable A single model variable can be dropped on a dataset variable in either the Co-models or Dataset view. A new dataset variable with the same type. dimension. types. if you drag-and-drop a model variable that you already set the transfer direction for. If the model variable is dropped in the Co-models view. a defined transfer direction will never be altered. provided the transfer directions. allowing you to select the transfer direction of the model and dataset variables. 3.394 - . When manipulating model or dataset variables by drag-and-drop. as well. and the model variable didn't have a defined transfer direction. the dataset variable's transfer direction is defined in accordance of the model variable's direction. Tip! If you drag the variable using the right mouse button. a shortcut menu will appear when you have dropped the variable. a connection is also established. If the model variable is not an interface variable yet. If the variable was dropped on the Main node in the Co-models view. the transfer direction of the model variable will be set in accordance to the transfer direction of the dataset variable. You are allowed to drop a selection of variables on the drop targets. These will be exported to and from the dataset as ordinary continuous variables. Select the model variable you wish to export of import from the model. a connection is established. dataset variables are only treated as continuous variables. To add a new variable to the dataset: 1. if the a dataset variable existed (with the same name as the model variable). Dropping model variables on dataset nodes 1. Drop the variable on the target of your choice. You should therefore take care when exporting or importing model variables using either Zero Order or Zero Order Immediate integration settings. . when the model variable already has a defined direction while the dataset variable has not. Open the Dataset view of the dataset you wish to work on. Likewise. and dataset variables are created to match the properties of the model variables. the dataset variable will automatically get the opposite transfer direction.

Maximum. Average. Specify or select the Unit for the variable under Unit. and that a dataset connection is already established. You can document the variable in the Documentation and Note fields available in the dialog box. You should therefore take care when exporting or importing model variables using either Zero Order or Zero Order Immediate integration settings. Note! The procedures below assume you have already opened the Co-models view (doubleclick the node in the Project Window). Last. or make the connection by drag-and-drop. In. or OK to save the changes and close the dialog box. Options are First. The connection can be established in several ways. Options are any unit that id'. 6.395 - . 4. You are only allowed to auto-connect these variables if all of the dataset variables can be properly connected (or are already . The dimension of the dataset variable must match the dimension of the model variable it is going to connect to. 3.s defined in the project's Global Units. You can auto-connect all the variables of the dataset at once. In this case you must specify the dimension in the Dimension entry for the Dataset node. and Boolean. Options are None. 7. Integer. You can also access most of the properties in the Properties dialog box. and select Properties on the shortcut menu. Connect Model and Dataset Variables Model and dataset variables are connected in the Right-click the Co-models view. These will be exported to and from the dataset as ordinary continuous variables. Minimum. The datatype of the dataset variable must match the datatype of the model variable it is going to connect to. 8. Out and Out-In. 5. 2. Click Apply to save the changes. Note! You can set all dataset variables to have the same dimension by right-clicking the Dataset node and selecting Common Dimensions on the shortcut menu. autoconnect a single variable at a time. you right-click it and select Summary Type on the shortcut menu. Options are Complex. Real. Auto-connect all dataset variables at once 1. To define a transfer direction for the dataset variable. To define the summary type to be used for the dataset variable. Select the datatype of the variable under Type. dataset variables are only treated as continuous variables. Select Auto-connect to Main Model on the shortcut menu. Right-click the Dataset Connection node of the connection you wish to auto-connect. you right-click it and select Transfer Direction on the shortcut menu. The unit of the dataset variable must match the unit of the model variable it is going to connect to. and Accumulated (some options may be excluded if they are not compatible with the selected transfer direction). Note! Unlike model variables. Specify or select the dimension of the variable under Dimension.You can define the dataset variable in the different columns in the Dataset view. Right-click the variable you wish to define. To define a dataset variable: 1. The corresponding dataset and model variables will be connected to each other.

Right-click the dataset variable you wish to connect. a connection is established between the two variables. Connect single variables by drag and drop You can establish variable connections by drag and drop as well. Select the model variable you wish to connect to the dataset variable. the transfer direction of the other variable will be changed to the corresponding direction. a shortcut menu appears when you have dropped the variable. if only one of the variables have a defined transfer direction. the default action will be executed. In this case. Select the model variable you wish to connect to on the submenu. the model variable will be exported to the dataset. 2. Drag the model variable and drop it onto the dataset variable you wish to connect it to. The list that appears contains only model variables that can be connected to the dataset variable in question. Connect single variables manually 1. you will not be allowed to drop the model variable onto the dataset variable. Auto-connect single variables 1. When the operation is performed. Set the Transfer Directions for Model and Dataset Variable The transfer direction of model and dataset variables will be set automatically if the variables are connected or created by drag and drop. the connection will automatically be broken. and select Auto-connect Variable on the shortcut menu. . Finally. and there exists model variable counterparts (with the same variable name) for all the dataset variables. as well as from the Co-models view itself. The model variable will be connected to the dataset variable. Note! If you change the transfer direction of variables that are already connected. allowing you to select the action yourself. If the transfer directions (or other parts of the definitions) doesn't match. You are only allowed to auto-connect variables that have corresponding properties and the same name. The dataset variable will be connected to the corresponding model variable (with the same variable name). This operation allows variables with different names to be connected to each other.connected). should you wish to. 1. Tip! If you use the right mouse button when dragging and dropping. Also.396 - . If you use the left mouse button when dragging and dropping. and select Connect Variable on the shortcut menu. You may also defined these transfer directions manually. Right-click the dataset variable you wish to auto-connect. you can also drag variables from both the Equations View and Constructor diagrams. if none of the variables have a defined transfer direction. 2.

2. 1. ! To set the transfer direction in the Equations View: 1. Right-click the variable you wish to set the transfer direction for. Out. and then select the direction to use. Options are In. To set the transfer direction for a model variable The transfer direction of a model variable can be defined in Constructor diagrams. and In-Out. Variable Type Allowed transfer directions Level Out. Out. Right-click the variable you wish to set the transfer direction for. In-Out Auxiliary In. . In-Out Set all the Dataset Variables to the Same Dimension The dataset variables must share the same dimensionality as the model variables to which they are connecting. too. Out. ! All transfer directions are not compatible with all model variable types. Select Transfer Direction on the shortcut menu. Sometimes. in the Equations View. and select the Common Dimensions option on the shortcut menu. Out Constant In. Options are In. ! To set the transfer direction in a Constructor diagram: 1. and select Properties on the shortcut menu. Right-click the variable in the Equations View or the Constructor diagram. Select the Dimension entry in the dataset view next to the Dataset node. In datasets this is achieved by enabling the Common Dimensions option. 3. Select Transfer Direction on the shortcut menu. Select Advanced on the shortcut menu. 2. Out. and Out-In.397 - . Right-click the dataset variable you wish to set the transfer direction for. The table below shows the different transfer directions that are allowed for each variable type. and In-Out. Select Transfer Direction on the submenu. and it is convenient in this case to make all the dataset variables have the same dimension. 2. you will experience that all the model variables have the same dimension. and in the Properties dialog box: To set the transfer direction in the Properties dialog box: 1. and In-Out. 3. 2. Right-click the Dataset node in the Dataset view. and select the direction to use on the submenu that appears. 1. Options are In. 2. Out. and select the direction to use on the submenu that appears.To set the transfer direction for a dataset variable The transfer direction for a dataset variable can only be set in the given dataset's view. Select the transfer direction in the Transfer Direction drop-down box. Options are In. Click the Advanced tab.

or select the cell and hit F2. This makes it easy to change the dimensions of all the dataset variables in one operation. Set the Dimension of a Dataset Variable The dataset variable must have a dimension definition that is compatible with the dimension of the model variable it is going to connect to. and enter the dimension definition you want to use for all the dataset variables. Average. You can also define the dimension directly in the dataset view under the Dimension column: 1. Hit F2. Last. In this case you can select how the dataset variable should be summarized over the sampling period of the dataset. Tip! If the Dimension column is not visible. Right-click the dataset variable you wish to set the summary type for. This summary type is only available for dataset variables that have the transfer direction in in the dataset. Enter the dimension definition. Right-click the dataset variable you wish to define and select Properties on the shortcut menu. When the Common Dimensions option is enabled. The summary period is always identical to the period of the dataset. Options are First. Average: Record the variable's average value over the summary period. Minimum (transfer direction must be 'in'). Summary types works in the same way as they do in the simulation. Double-click inside the Dimension cell of the column view for the appropriate dataset variable. right-click the column headers. or OK to save the changes and close the dialog box. Click Apply to save the changes.398 - .3. and select it in the . Maximum (transfer direction must be 'in'). 1. 4. Minimum: Record the variable's minimum value over the summary period. and hit Enter. To set the summary type for a dataset variable 1. 2. 2. Hit Enter to save the definition. Accumulated: Record the variable's accumulated value over the summary period. as shown below. all the dataset variables will use the dimension definition entered on the dataset node. ! ! ! ! ! ! First: Record the variable's value at the start of the summary period. Select Summary Type on the shortcut menu. Last: Record the variable's value at the end of the summary period. and then report the level's value. and select the summary type to use on the submenu that appears. 2. Maximum: Record the variable's maximum value over the summary period. Enter the dimension definition in the Dimension box. Set the Summary Type for a Dataset Variable Most datasets are recorded with a lower resolution than the simulation is run on. 3. This summary type is only available for dataset variables that have the transfer direction in in the dataset. This is identical to letting the variable control a flow into a level. and Accumulated. You can select between different summary types. The dataset variable's dimension is defined in the dataset's view.

Right-click the dataset you wish to disconnect in the list. Disconnect a Dataset from a Simulation Note! This operation cannot be undone! To disconnect a dataset from a component: 1. Select the variable in the Variables list. Delete on the shortcut The dataset will be removed from the list. but no changes will be done to the model and/or dataset variables. 2. There are several columns available for you. Locate the dataset in the Project window. Enter the new name for the dataset. 3. Open the Co-models view. Disconnect Dataset and Model Variables You can disconnect dataset and model variables in the Co-models view. they must both share exactly the same name. and select Disconnect on the shortcut menu. 1. 2. Rename a Variable in the Dataset You can rename a variable in a dataset on the Variables tab: 1.shortcut menu. Alternatively. The connection between the two variables will be lost. Note! To be able to connect the variable to a variable in a component. and hit Enter . Rename a Dataset To rename a dataset: 1. .399 - . click the entry twice (not too fast). Any connection to external data stores will be shut down. by expanding the Datasets entry 2. Hit F2 to rename it. and select menu. Right-click the dataset or model variable you wish to disconnect. Select the dataset you want to rename and hit F2 to rename it.

Select the dataset to rename in the list. If the transfer mode for the dataset is set to Manual. This operation doesn't rename the spreadsheet globally. 2. The dataset variable will disappear from the dataset. and select Delete on the shortcut menu.400 - . Delete Dataset Variables Dataset variables can be delete in the Dataset view. Open the Dataset view of the dataset you wish to work on. by selecting External Data on the Co-models view Simulation menu. and select Delete on the shortcut menu. and hit Enter when finished.) 1. just change the name it is shown by in the Co-models view. 3. If the Project Window is not open. If it was already connected to a model variable. Hit F2 to rename the dataset. 2. Right-click the dataset variable(s) you wish to delete. Delete a Dataset You can add and delete datasets from your project in the Project Window. the transfer between the external data store and the dataset connection will be performed automatically when needed. or by using the shortcut menu on the dataset connection in the itself. Right-click the dataset you wish to delete. This is done inside the simulation. Note! You are only allowed to load data at the start of the simulation! .Rename a Dataset in the Co-models View To rename a dataset in the Co-models view: 1. Note! The operation below cannot be undone! 1. Open the Co-models view. Load History from a Dataset If the transfer mode for a dataset is set to Automatic. Note! Any data that are not transferred to an external data store will be lost when a dataset variable is deleted and the project is saved. the connection will obviously be lost. The dataset you will disappear in the Project Window. 2. you must control the data transfer yourself. open it by clicking Project Window on the View menu. (You can undo the operation without loosing data. on the other hand.

Datasets that have changed since the last time you saved will be marked with an asterisk (*).. Save a Dataset If the transfer mode for a dataset is set to Automatic. To enable manual edit of dataset variable history 1. on the submenu. Right-click the dataset you wish to load. You can access these settings by clicking … for the relevant dataset You can also save the history for the dataset connection itself in the Co-models view. you can only save data at the end of the simulation! 1. 1. Edit the History of a Dataset Variable If the dataset allows it. Some datasets allow you to change settings for the external data store. on the submenu. Some datasets allow you to change settings for the external data store. and select Save Data on the shortcut menu. and select Load Data on the shortcut menu.. and the transfer mode for the dataset connection is set to manual. Click OK to save data to the external data store. Datasets that have changed since the last time you saved will be marked with an asterisk (*). Click OK to save data to the external data store. the transfer between the external data store and the dataset connection will be performed automatically when needed. 2. such as version or package information in the SEM Dataset. Select External Data on the Simulation menu. 3. Open the Co-models view. or by using the shortcut menu on the dataset connection in the itself. If the transfer mode for the dataset is set to Manual. on the other hand.. Select the dataset(s) you wish to save in the Save External Data dialog box. 3. . Right-click the Dataset node and select Allow Manual Edit on the shortcut menu. 2. and select Save. you can edit the history of a dataset variable in the Co-models view. This is done inside the simulation. 1. Right-click the dataset you wish to load. The dataset will only allow you to edit a dataset variable's history if the Allow Manual Edit option is enabled. the dataset variable has a transfer direction of out. by selecting External Data on the Co-models view Simulation menu. Select the dataset(s) you wish to load in the Load External Data dialog box. 2. Select External Data on the Simulation menu. such as version or package information in the SEM Dataset.1..401 - . Open the dataset's view. and select Load. Note! If the dataset receives data from the simulation (contains connected dataset variables with a transfer direction set to in). 3. You can access these settings by clicking … for the relevant dataset You can also load the history for the dataset connection itself in the Co-models view. you must control the data transfer yourself.

Options are 'Tab'. If you want to change the .402 - .' (point) and '. 'Space'.. The data must only contains values separated by delimiters. and '. 6. 1.. the new series will be saved back to the dataset the next time you select Save External Data. Options are '. and select Properties on the shortcut menu. To edit a dataset variable's history 1. '. Import the History of a Dataset Variable from a File or the Clipboard An external data history can be imported to a dataset variable in the Studio Dataset. and the dataset variable itself has the transfer direction set to out. 2. To import a history for a dataset variable 1. hit F2 to edit the value. the data must be saved without times and headers. the transfer mode for the dataset connection is set to manual. On the History property page you can edit the value for each period under the Value column. Right-click the dataset variable whose history you wish to edit. 2. When importing data from the clipboard or a file. and select Properties on the shortcut menu. Select the separators to use under Separators.' (semi-colon). Click the History tab. While you can import a history for any variable at any time in the Studio Dataset view. Open the dataset's view. Select the Decimal Separator. 5. In the latter case.… If you opted to import data from a file. Right-click the Dataset connection node.' (comma). Note! If you want to be able to save the edited history you must also select the Allow Writeback option.' (point).4. 3. Select Manual on the submenu. Select the cell. and '. and hit Enter to finish typing.' (comma). '. Select the Digit Grouping Symbol. 1. You can see the dimension of the impoted data under Dimensions. To save an edited history for a dataset variable If the option Allow Write-back is selected for the dataset. Right-click the dataset variable for which you want to import a history. 2. 2. 3. you are only allowed to import a history at the start of the simulation. Options are 'Space'. when the dataset supports manual edit. you will be prompted to select the file to import. Click Import from File… or Import from Clipboard. Open either the Studio Dataset view or the Co-models view by double-clicking their entries in the Project Window. Repeat the step above for all the time periods you wish to edit. You can control the orientation of the import in the Import History dialog box. Select the Delimiter.' (comma). certain limitations apply to importing histories in the Co-models view. 4. or by right-clicking them and selecting View on the shortcut menu. 3. and select Transfer on the shortcut menu. You can import a history in both the Studio Dataset view or in the Co-models view. Right-click the Dataset node and select Allow Write-back on the shortcut menu.

Control the layout of the history in the Export History dialog box. 6. 2. you can select to include header and time information with the data.403 - . 3. 7.' (comma). You can also specify the orientation. click OK to export the data. Select the destination for the export under Destination. Click the History tab in the Properties dialog box. 3. 5. When you are satisfied with your selections. 7. 8. About the Studio Dataset The Studio dataset stores data for the dataset variables in a data store internally in Powersim Studio. 2. Select Properties on the shortcut menu. click OK to import the history. 8. Select the Delimiter. Export the History of a Dataset Variable to a File or the Clipboard You can export data from both the Studio Dataset view and the Co-models view. Select Include headers to include column (or row) headers. When you click OK the history is copied to the Clipboard. Options are 'Tab'. decimal point and column separator. 1. Select Include times to include time information with the history. 2. you can control where in the variable's history the data is inserted. and you can paste it into the any Windows application. 2. To export the history for a dataset variable in the Studio dataset: 1. '. the values will be separated by a line shift. Data can only be exported for each dataset variable individually. and '. You will be prompted to specify a file name and a location when you click OK. Control the decimal separator and column delimiter under Format.' (semi-colon).' (comma). select the Flipped option. Select Clipboard to export the history to the Windows Clipboard. You also select whether you wish to export to text files or the Windows Clipboard.orientation of the data array. If the history you are importing are smaller than the dataset variable's history (times and/or dimensions). Note! This functionality is only available to datasets that display the History property page for the dataset variables in the Co-model view of the simulation. The Studio dataset also allows you to export and import data to and from the Windows Clipboard or a text file. Select the dimension at which to start the import under Element Offset. Select the time period at which to start the import under Time Offset. 1. Click Cancel to close the dialog box. Right-click the dataset you wish to export either in the Studio Dataset view or the Comodels view. Select the Decimal Separator. Select Times down to control the orientation of the variable history. 'Space'. 1. When you're satisfied with your selections. Click Export…. 2. If selected. Options are '. Select File to export the history to a text file. When exporting data.' (point) and '. . 4. 1.

404 - . The summary type allows you to control the way the history for the dataset variable is recorded during the simulation. Right-click the Dataset node in the view. Tip! The first and last periods of the dataset doesn't have to match the simulation's start and stop times. Open the Studio Dataset view by double-clicking it in the Project Window. 6. the dataset will return NAN. 1. Note! These are the settings that control the time span and resolution of the dataset. If the simulation requests data that are beyond the time span of the dataset. The connection between the dataset and the simulation is managed in the Co-models view. Maximum. They do not have to match the simulation settings of the simulation they are being connected to. and years. or by rightclicking it and select View on the shortcut menu. Times and summary types in the Studio Dataset The Studio dataset can record the history from the dataset variables in three different intervals: months. If the dataset doesn't contain data for the current simulation time. Specify the first period of the dataset under First Period. You can specify a summary type to use for each dataset variable individually. In addition to selecting a recording period for the dataset. 5. 3. which is available in the Project Window. quarters. Options are First. Define the sampling period under Period. The dataset variables are defined in the Studio Dataset view. quarters. 2. Last. you must also select the first and the last period to include in the dataset. Click the Times tab to specify the period information. and years. Specify the last period of the dataset under Last Period. . You can specify the period in any number of months. Note! The two summary types Min and Max are only available when the dataset variable has the transfer direction set to in.The Studio dataset contains dataset variables that you can connect to model variables in the simulation. Average. and select Properties on the shortcut menu. 4. The summary period is identical to the specified period for the dataset. Minimum. Set Period Information for the Studio Dataset When you create a Studio dataset you have to specify the sampling period for the dataset. the value NAN will be returned. as well as the first and last periods to record. and Accumulated.

making it easy to export the value history produced by some variables to the spreadsheet. The variables' respective names in other languages are unimportant. you must define the connection type in both the model and the dataset. Interface variables and dataset variables with identical names and corresponding properties can . and unit definitions.Working with the Spreadsheet Dataset The Spreadsheet Dataset allows you to transfer data between Powersim Studio and Microsoft Excel. In order to connect a variable in the model to a variable in the dataset. The model variable can have three different transfer directions: states: out. The selected spreadsheet language is also used when creating the resulting spreadsheet file. The Dataset supports bi-directional transfer. in much the same way as a component (model) does. or it can transfer the entire time series. while at the same time importing value history to other variables. This is shown in the figure below. When the dataset is connected to the model. just like the model variables. The Inner Workings of the Spreadsheet Dataset Connections between the Spreadsheet Dataset and the simulation The connection between the Spreadsheet Dataset and the simulation is managed in the Co-models view. in.405 - . These definitions must correspond to each other for two variables to be able to connect. and in-out. The language of the dataset view is thus independent of the spreadsheet (connection) language. the corresponding variables in the dataset and model interconnect and exchange data. In addition.the resulting spreadsheet. The dataset contains variables. A small arrow on the outline of the variable symbol indicates that the variable can be connected to a dataset. After the dataset is connected to the component. dimension. you can auto-connect dataset variables and interface variables that have the same name in the specified spreadsheet language. The dataset can transfer the immediate behavior of a variable. The connection state of a model variable is indicated in the Constructor diagram. the dataset also offers advanced formatting control over the output . The dataset variables have type.

but you are also allowed to connect variables with different names as long as the data type. dimensions. and October have 31 days and the rest of the months have 30 days. unit. while Excel dates are more or less limited to the last century and on. since the January. when the dataset receives date information from Microsoft Excel.be auto-connected. using the built-in date formats available. you will notice that the dates and times exported to Excel are translated into the Gregorian calendar automatically. 1/28 day must be deducted from each (Gregorian) day in order for the calendars to be compatible. 4/15/2003 4/15/2003 Since April has 30 days in both the Bank calendar and the Gregorian calendar. The table below summarizes how the times correspond to eachother. 3/15/2003 3/15/2003 11:12:00 Since January has 30 days in the Bank calendar and 31 days in the Gregorian calendar. and the dates are exactly the same between the two. 3/1/2003 3/1/2003 The start of the month is equal in both calendars. Date formats and calendars in Studio and Microsoft Excel The date formats in Studio and Microsoft Excel are different. if you need to transfer data with a period less than a full month. you must manually adjust the times in your Excel sheet with the appropriate calendar conversion factor. and transfer direction is compatible. 1/15/2003 1/15/2003 11:12:00 Since January has 30 days in the Bank calendar and 31 days in the Gregorian calendar. as the Bank calendar January has 30 days. If the period selected for the dataset is less than a full month. it will automatically convert the dates to simulation times in Studio. July. As an example. the Gregorian calendar January has 31 days. Simulations run with the Gregorian calendar will be fully compatible with Excel. You don't have to think about this at all. all the dates in April are equal between the two calendars. 1/30 day must be added to each (Gregorian) day in order for the calendars to be compatible. 2/1/2003 2/1/2003 The start of the month is equal in both calendars. the range of available times is far higher in Studio. Microsoft Excel only support the Gregorian calendar. which will add exactly 2 seconds to the minute. this translation will become visible as the calendars must be stretched a little to be compatible. where you can virtually run a simulation from the start of the history. the strecthing factor is different from the ones used by the Bank to Gregorian calendar conversion. Alternatively. If your simulation is using the Bank or the Fiscal calendar however. simply enter the dates as you would normally do in Microsoft Excel. The translation follows the same principles when the simulation uses the Fiscal calendar. . The best solution is to simply run your simulation using the Gregorian calendar. 4/1/2003 4/1/2003 The start of the month is equal in both calendars. The dates in the Bank calendar are therefore stretched by 31/30 days. 2/15/2003 2/14/2003 01:36:00 Since January has 30 days in the Bank Calendar and 28 days in the Gregorian calendar. However. April.406 - . Powersim Studio Bank Calendar Microsoft Excel Gregorian Calendar Comment 1/1/2003 1/1/2003 The start of the month is equal in both calendars. 1/30 day must be added to each (Gregorian) day in order for the calendars to be compatible. While Powersim Studio supports three different calendars. However. Also.

Click the General tab (if necessary). Select the Transfer at regular intervals option. Click the Layout tab. Note! When using an existing spreadsheet. Available time units for the sampling interval are Timestep. you might want to alter these formats yourself. day. month. Double-click the Spreadsheet Dataset entry in the Project Window. 1. however. hour. making it easy to understand the output in the spreadsheet. Right-click the Dataset node in the Spreadsheet Dataset view. It will even include units in the format. 3. Set Sampling Times for the Dataset The sampling times specify the intervals at which values are transferred to or from the dataset. You control this on the Layout tab. Click Apply to save the changes. 4. Example: 2xMonth indicates that the sampling interval is two months. you can specify that the dataset only update values and not formats. You can then simply copy the times from the exported time series. or you can let the dataset create a new spreadsheet when it is connected to the component. 5. Note! The sampling times can only be set for transfer to the spreadsheets or for bi-directional transfer. Right-click the Dataset node. week. and select Properties on the shortcut menu. it will automatically format the output in the spreadsheet. Update Formatted or Unformatted Values When the dataset transfers values from the simulation to the spreadsheet. enter the name of the spreadsheet workbook you wish to . 2. 6. quarter.Tip! If you need to create the times for such calendar conversions. This sampling period is also used for the summary types of the dataset variables. In some cases. and use those times for your input data. simply set up a Spreadsheet dataset with the correct sampling times and calendar combinations that exports a time series to Excel. be sure to select the correct transfer options in the dataset to avoid accidentally overwriting important data! To use an existing spreadsheet with the dataset: 1. Connect the Dataset to a Spreadsheet You can connect the dataset to an existing spreadsheet on your computer. Use the boxes below the option to specify the sampling interval of the dataset. Under Workbook on the General tab. thereby producing one value each second month. In this case. 3. and select Properties on the shortcut menu. year. minute.407 - . 2. and second. The preceding number denotes the length of the interval. or OK to save the changes and close the dialog box.

... subscript and unit.1] My Var[1.. Tip! You can use the {RUNINDEX} code to allow the names in Sheet.. Subscript. the dataset will launch Microsoft Excel with the specified file name. My Var My Var[1... Times <Time> <Time> . <Time> <Value> <Value> .. Excel will automatically create it. 4... or OK to save the changes and close the dialog box.. or Workbook to automatically change for new simulation runs. You can access this by right-clicking the Dataset node in the Spreadsheet Dataset view. and dimension 1. the name and subscript. and selecting Properties on the shortcut menu.. c) Name.. you can specify a template to use for the new file under Template on the General property page. .1.) Control Spreadsheet Layout You can control the layout of the resulting spreadsheet using the Layout properties page for the dataset. The table below shows the possible header layout for the variable My Var. (Requires you to set the Run Count in Simulation Settings for the project. ...use. the name.408 - .. Change the Orientation of the Table The orientation of the layout decides whether values are printed in columns .. and to control how subscripts and units are written to (or read from) the spreadsheet. The options here allow you to change the orientation of the tables.. and d) Name. Click Browse to select the workbook file from a location on your computer.Variable Names Across . Tip! If the file doesn't already exist on the computer. Format Variable Header Under Variable Names..2. with the unit m.. Variable 2 <Value> <Value> . . . .. Times Variable 1 Variable 2 .or in rows .. . You can also hide the header completely. b) Name.2. Subscript..Variable Names Down.. Unit.. . Click Apply to save the changes. Unit. Cell.. The tables below show the difference between these options... b) Variable Names Down The illustration shows the difference between the two possible orientations of the output table. a) Variable Names Across .. If the file doesn't already exist on your computer... The header cell can contain the name only. or the name and unit.1] (m) My Var (m) a) b) c) d) The various variable header formats: a) Name. When you connect the dataset to a simulation. <Time> <Value> <Value> . Variable 1 <Value> <Value> . you select the content of the variable header cell.

and select Properties on the shortcut menu. . 4. 1.. Click the General tab (if necessary).. 2. Right-click the Dataset node in the Spreadsheet Dataset view.You can also select to put the subscript and/or the unit in separate cells. a) Times in separate cells selected b) Times in separate cells not selected You can turn the time column on and off using the "Times in separate cells" option. Note! If the cell reference is omitted in the definition. you can either enter a normal cell reference (such as A4.. and so on.. etc.409 - . As cell reference. left cell in the spreadsheet is selected by default..1] [1... the upper. This will affect the first column of the spreadsheet.1] [2. .2] <Value> <Value> <Value> <Value> <Value> <Value> <Value> <Value> The table header for the variable My Var. <Time> <Value> <Value> . the variable table will start at the first column. 3. If it is not selected.. Define Starting Cell of the Spreadsheet When you use the dataset to transfer data to the spreadsheet..... The table below shows the layout for the example above... <Value> <Value> . Under Cells. Tip! You can use the {RUNINDEX} code to allow the cell reference to automatically change for . when units and subscripts are presented in separate cells... or you can use a name referring to a range of cells in Microsoft Excel. <Value> <Value> .)... . My Var (m) [1.. please refer to the documentation for Microsoft Excel. .. <Time> <Value> <Value> . .. If the option Times in separate cells is selected. enter the cell reference for the upper left corner of the area you wish the dataset to produce its table. Include Times Finally. . you might want to adjust the starting position of the tables generated by the dataset..2] [2. you can select whether to include times in the spreadsheet or not. C3.. Variable 1 Variable 2 . or OK to save the changes and close the dialog box.. explanatory cells. Times Variable 1 Variable 2 . the first column will contain time information. . Click Apply to save the changes. which will be placed below the variable header. For information on how to create named cell ranges. You might want to include headers... with both subscripts and units in separate cells.

you are also allowed to include the sampling times in the spreadsheet. you can specify how many dimensions should appear next to the name. Then you can use this file as a template when formatting the spreadsheet to include sampling times. with sampling times at regular intervals.new simulation runs. you must include the sampling times in the first column of the spreadsheet. Studio will format the spreadsheet using the layout specifications you have selected in the Layout tab.. If you transfer Immediate Behavior. ! ! ! First. 1. the layout of the spreadsheet must be equal to the layout that you have specified on the Layout tab of the Spreadsheet Dataset. When you have selected Common Dimensions for All Variables.N. and subscripts. Thus. units. (Requires you to set the Run Count in Simulation Settings for the project. You must take into account all the rows (or columns) that the dataset will use for variable headers.M. This option allows you to group the array elements in a grid rather than a long list. you can format the output in an alternative way using the Common Dimensions for All Variables option. Third. To do this. the last sampling time in the spreadsheet should coincide with the stop time of the simulation. the dataset contains X variables all having the dimensions 1. Tip! When creating a spreadsheet with sampling times. When you synchronize the spreadsheet. Format Array Dimensions If all the variables in your dataset have the same dimensions.. Note! If you select Common Dimensions for All Variables. say. it is a good idea to create a bidirectional dataset first.) Format a Spreadsheet for Transfer to a Model Variable When using a one-directional transfer from the spreadsheet. 1. There are a few issues you should be aware of when setting up a spreadsheet like this. If you use a bidirectional transfer. If. the dataset will require all dataset variables (as well as their model variable counterparts) to have the same dimension.P. the dataset will produce the output shown in the figure below.Q) .. 1. you simply use the time format in Excel. for the same reason as mentioned above. all variables have four dimensions and you specify that two should appear next to name. the array elements can be grouped in a grid.410 - . The reason for this is that the dataset will return NAN (Not a Number) for any simulation times that lie beyond the time series in the spreadsheet. when transferring Immediate Behavior. while Behavior over Time will always present the array elements subsequent cells.. Second. and Studio will automatically convert these relative to the simulation time of the component. (In the figure. the first sampling time in the spreadsheet should coincide with the start time of the simulation. the dataset will not contain an initial value for the variable.

. . <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> Q <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> .... N 1 <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> 1 . two dimensions is selected to appear next to the name. To view the order of the variables. right-click the column headers and select the Order column on the shortcut menu to display it in the view.Variable 1 1 1 .N... Variable X .P. Select Synchronize Spreadsheet on the shortcut menu to update the spreadsheet.M. N . When you transfer Behavior over Time. three dimensions would appear in the three columns below the name. and leave formatting and header content remain unchanged when transferring data from the simulation. 2.1.. The example shows an example with X variables. To sort the order of the variables: 1... To sort the variables in the order they will appear in the spreadsheet. The layout above is achieved by transferring Immediate Behavior. You can also select to only transfer values... 2. Right-click the correct dataset connection in the list..Q'.411 - ... Select Move Forward (or Move Backward) on the shortcut menu. N .. .. Tip! You can use a template to format the spreadsheet.. Open the Co-models view.. <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> 1 <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> P . 1. 3... Sort the Order of Variables in the Spreadsheet The dataset variables are listed in the spreadsheet in the order decided by the number in the Order column of the Spreadsheet Dataset view. In addition. If one dimension next to name was selected.. all having the dimensions '1. M 1 .1. Right-click the variable you wish to promote (or demote) in the list. while only one would appear in the left column... M 1 . you need to update the spreadsheet as well. . simply click the header of the Order column.... Synchronize the Component and the Spreadsheet .... 1 1 .... If three dimensions next to name was selected. all dimensions are presented in rows below the variable names. <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> Q <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> <x> The table above shows the output produces by the dataset when the Common Dimensions for All Variables option is selected.. N .. When you have changed the order of the variables..1. three dimensions would appear in the three leftmost columns.

Click Apply to save the changes. if you have specified a template for the dataset. or OK to save the changes and close the dialog box. deselect all of the options mentioned above. Select the Headers option to allow the dataset to always update the variable headers. Righ-click the dataset connection in the Spreadsheet on the shortcut menu. Update the Spreadsheet with Values Only If you have created a spreadsheet workbook that you wish to connect the simulation to. . Select the Number formats option to allow the dataset to always update the number formats in Microsoft Excel. Select the Time formats option to allow the dataset to always update the time formats in Microsoft Excel. Right-click the Dataset node in the Spreadsheet Dataset view. Co-models view. you will often change the layout of the resulting spreadsheet. Click the Layout tab. or OK to save the changes and close the dialog box. 4. Right-click the Dataset node in the Spreadsheet Dataset view. the spreadsheet workbook will not be saved when the simulation project is closed. When running in this mode.When changing the definition of the dataset. 5. you might loose data. and select Properties on the shortcut menu. 3. you might not want the dataset to update anything except for the numerical values only. These utilities makes it easy to see the area in the workbook that will be updated by the dataset connection.412 - . You specify what to updated under Update in dataset. 1. and select Properties on the shortcut menu. Click Apply to save the changes. 4. Click the General tab. 3. Use the Dataset without Saving the Spreadsheet If you only wish Microsoft Excel to work on a temporary file (which is not saved): 1. To update these changes in the spreadsheet: 1. and select Synchronize Note! When you synchronize the spreadsheet. it will be used when creating the temporary file. You can also show the spreadsheet and select the cells in the spreadsheet by using the Select Spreadsheet and Select Cells commands available on the shortcut menu of the dataset connection. unless you manually switch to Microsoft Excel and save the workbook. Select the Temporary option. To achieve this: 1. It is a good precaution to always work on a copy of the workbook file to prevent loss of important data. 2. 3. However. If you want to update the spreadsheet with values only. 2. 2.

When the simulation has reached the end. Select the cell range for which you want to validate data. 4. 3. This is useful if you want to save the results from various simulation runs. To achieve this. Cell or Workbook. and select Properties on the shortcut menu. At this point the run number is reset. select Validation.Ensure Valid Data from Spreadsheet When transferring data between a spreadsheet and a component. Select the name you wish to update automatically with the run number . Note! The run number is reset when the simulation is reset. sheet. 6. new simulation results will be stored on separate sheets named Simulation1. The sheets should all start with Simulation. and end with the run number. . Example You can save the results from the various simulation runs in various sheets in the workbook. 5. Recommended choices are Whole Number or Decimal.413 - . Click OK to save the changes. you can use the Data Validation feature in Microsoft Excel. Switch to Microsoft Excel after connecting the dataset to a component. select the type of value to allow. 2.Sheet. or OK to save the changes and close the dialog box. and Maximum boxes to specify the criteria for the data validation. 4. On the Data menu. Minimum. 3. Use Names for Cells. you can make the spreadsheet dataset automatically change cell. 2. Simulation2. corresponding to INTEGER and REAL in Powersim Studio. Click the General tab (if necessary). Right-click the Dataset node in the Spreadsheet Dataset view. 5. Use the Data. you should start a new simulation by clicking Start simulation directly rather than resetting the simulation first. Enter the name followed by the code '{RUNINDEX}'. To ensure this. etc. The selected range will now make sure that the data that is added to the cells in the range are valid with regards to the entered validation criteria. or File that Change with Run Number If you have specified the run count in Simulation Settings for the project. Sheets. To make names change with run number: 1. it is always useful to be certain that the data is transferred is actually valid for the target variable. or file reference to reflect the run number. you enter the following text in the Sheet box: Simulation{RUNINDEX} Each time you click Start Simulation. This continues until the run count specified in Simulation Settings is reached. Click Apply to save the changes. Under Allow. 1.

and then return it as an input to another variable. It can either transfer the entire time series . Enter the name of the template to use under Template on the General tab. or if you want to provide historical data as input to a variable. or when the Temporary option is selected on the General property page. since they are not used by the dataset in this mode. Use the Dataset to Transfer Behavior over Time The dataset can operate in two different modes.between the spreadsheet and the variable. Click the General tab (if necessary). Right-click the Dataset node in the Spreadsheet Dataset view.both in the model and the dataset .Immediate Behavior . Click the Layout tab. When Immediate Behavior is selected. Tip! Under Update in Dataset you can turn off updating of headers. or OK to save the changes and close the dialog box. the spreadsheet will only contain one value per variable. 2.between the spreadsheet and the variable. The file can be a normal spreadsheet (*. Click Apply to save the changes.or it can transfer instant values . When you transfer immediate behavior. 4. the spreadsheet will contain a series of values per variable.414 - . This transfer method is ideal if you wish to monitor the value of a variable. This way the formatting you have performed in your file (or template) will remain intact as the simulation advances. and time formats. 4. Click Apply to save the changes. Right-click the Dataset node in the Spreadsheet Dataset view.xlt).xls) or a template (*. To set up a transfer of immediate behavior: 1. or if you want to use the value of one variable to perform calculations in the spreadsheet. Working with variables . Select Immediate Behavior under Category. 3.Behavior over Time .Use a Spreadsheet Template When you create a new file. number. Use the Dataset to Transfer Immediate Behavior The dataset can operate in two different modes. you can specify a template that the dataset will use when it connects to Microsoft Excel: 1.Behavior over Time . 2. You can also provide the model with an historical initial . and select Properties on the shortcut menu. This transfer method is ideal if you wish to save the value development over time. several of the options are disabled. When you transfer behavior over time.or it can transfer instant values . 3.Immediate Behavior .is identical when working with Immediate Behavior and Behavior over Time. or OK to save the changes and close the dialog box. and select Properties on the shortcut menu. It can either transfer the entire time series .

Click the Layout tab. and provide the result from those calculations as input values to another model variable. and select Properties on the shortcut menu. 4. When you have created a bi-directional dataset. This means that you can import values for a model variable from the spreadsheet while at the same time exporting values from other model variables to the spreadsheet. When you have selected this option. In this case. 3. If the connection is Bidirectional or From Spreadsheet. or OK to save the changes and close the dialog box. Select Behavior over Time under Category.value.415 - . Create a Bi-directional Transfer for Variables You can transfer data in both directions between Powersim Studio and Microsoft Excel by use of the Spreadsheet Dataset. To set up a bi-directional transfer: 1. while the rest of the time series is imported from studio. 2. it is possible to let Microsoft Excel perform calculations on output values from one or more model variables. It is a good precaution to always work on a copy of the original workbook. Click the Layout tab. and select Properties on the shortcut menu. but still doesn't generate to many output points. To set up a transfer of behavior over time: 1. Thus. Click Apply to save the changes. when in this mode. or you can let the dataset load the sampling times from the spreadsheet. When you have selected to transfer behavior over time. out. You can either set the sampling times at regular intervals that you specify yourself. to avoid deleting important data accidentally. you must also provide the dataset with information on the sampling times for the behavior. which is a combination of the two in which the initial value is exported from the spreadsheet. Right-click the Dataset node in the Spreadsheet Dataset view. you can specify the sampling times in two different ways. . 2. Click Apply to save the changes. Select Bi-Directional Transfer under Transfer direction. there is always a danger that you might overwrite data in the spreadsheet workbook. 4. unless you explicitly tell it to (by clicking Synchronize Spreadsheet in the Properties dialog box of dataset in the Co-models View). Transfer Behavior from a Spreadsheet to a Model Variable You can restrict the dataset to only allow transfer of data in one direction between Powersim Studio and Microsoft Excel. or out-in. you can also provide the sampling times directly from the spreadsheet. the dataset will not add any information to the spreadsheet. or OK to save the changes and close the dialog box. and afterwards record the output from the variable as a time series. Right-click the Dataset node in the Spreadsheet Dataset view. Note! When using bi-directional transfer. However. a dataset variable can have different transfer directions: it can be in. Be careful to select a sampling time that captures the interesting behavior. 3. the dataset will only allow values to be transferred from the spreadsheet to a model variable.

if you have only five data points for the entire simulation. Thus. The dataset will read the times from the first column of the spreadsheet. Interpolate Transferred Data between Data Points When the sampling times are longer than the time step of the simulation. a dataset variable can only have one transfer direction: out. . or OK to save the changes and close the dialog box. Click Apply to save the changes. a dataset variable can only have one transfer direction: in. and select Properties on the shortcut menu. you simply select Step. and select Properties on the shortcut menu. When you have selected this option. The corresponding transfer direction for the model variable is in. Select Transfer to Spreadsheet under Transfer direction. To set up a transfer from a model variable to a spreadsheet: 1. you can let the dataset interpolate linearly between existing data points. The corresponding transfer direction for the model variable is Exported. the dataset will transfer a value that corresponds to a value on a straight line between the neighboring sampling points. but only allow values to be transferred from a model variable to the spreadsheet. the dataset will not import any information from the spreadsheet to the model. and automatically convert them into times that are compatible with the simulation time. be aware that all data will be overwritten for every simulation run. To set up a transfer from a spreadsheet to a model variable: 1. When entering times in the spreadsheet.416 - . or OK to save the changes and close the dialog box. Click Apply to save the changes. 2. Click the Layout tab. you can in some cases get a better estimate of the behavior of the reallife system. unless you change the spreadsheet workbook to use by the dataset. If you don't want to use interpolation. 4. When transferring only from the model to the spreadsheet. you have to specify the sampling times at regular intervals. Note! When transferring in this direction. Right-click the Dataset node in the Spreadsheet Dataset view. Thus. Select Transfer from Spreadsheet under Transfer direction. 3. When you have selected this option. In this case.When transferring only from the spreadsheet to the model variable. you have to specify the sampling times in the spreadsheet. 4.. Right-click the Dataset node in the Spreadsheet Dataset view. Transfer Behavior from a Model Variable to a Spreadsheet You can restrict the dataset to only allow transfer of data in one direction between Powersim Studio and Microsoft Excel. which will transfer the last sampling point until the new sampling point is reached. you should use one of Microsoft Excel's date formats. Currently. you can allow the dataset to produce estimates of the values that lie between the sampling points. 3. when between sampling points. 2. Click the Layout tab.

or OK to save the changes and close the dialog box. as the dataset variable is created. Note! If you select the Transfer at Regular Intervals option. 4. 8. and the Times in Separate Cells option under Dataset Includes is selected. or OK to save the changes and close the dialog box. and select Properties on the shortcut menu. Click Apply to save the changes. and you can add the custom times to the spreadsheet. Click Apply to save the changes. Under Sampling Times. and a connection is established.To turn on linear interpolation: 1. Microsoft Excel will open automatically with the file specified in the dataset. You can also define variables by drag and drop after the dataset connection below is established. select the variable to create interpolated. 4. by dragging an interface variable from the Main node and dropping it on the dataset variable you wish to connect it to. you can of course add the times to the spreadsheet before the dataset has been connected to the component. all properties are set corresponding to the model variable. 10. Switch to Microsoft Excel (if you haven't already entered the times in the workbook used by the . 9. you can select whether you want to export it from or import it to the simulation on the shortcut menu that appears. 3.417 - . select the Load Times from Dataset option. intermediate values for. 2. and select Properties on the shortcut menu. This process automates several of the steps above. Transfer Data at Given Times in the Spreadsheet You can transfer data at times that are specified in the spreadsheet. rather than at regular time intervals. 6. This requires that the transfer direction of the data is set to either Bi-directional Transfer or Transfer Data from Spreadsheet. 7. Create and define the variables you need to in the Studio Dataset view. 3. Under Transfer Direction. Right-click the Dataset node in the Spreadsheet Dataset view. You should therefore be sure to select the Load Times from Dataset before connecting the dataset to the component in step 4 below! 1. Right-click each variable. select either Bi-directional transfer or Transfer Data from Spreadsheet. the times in the spreadsheet will be overwritten. You can also connect variable by drag-and-drop. Under Interpolation. Click the Layout tab. select Line. Expand the dataset connection node in the Co-models view. You can create variables by dragging them from the simulation and dropping them on the Dataset node. 5. If the dataset uses a pre-defined file. When you have dropped it on the node. The connection is now established. Connect the dataset to the simulation in the Co-models view for the simulation in question. 2. 1. and select Auto-connect Variable on the shortcut menu to connect it to the corresponding variable in the simulation. In the Variables list on the Variables tab. Right-click the Dataset node in the Spreadsheet Dataset view. Tip! You can also create dataset variables and connections directly by dragging a model variable with the right-button from the diagram and dropping it on the dataset connection node in the Co-models view. Repeat the step above for all the interface and dataset variables you wish to connect.

enter the times at which you wish to import data. and select Properties on the shortcut menu.418 - . Select the Continuous Data Transfer option. . Right-click the Dataset node in the Spreadsheet Dataset view. 2. or OK to save the changes and close the dialog box. 1. 4. as the simulation is not delayed by communication between Studio and Microsoft Excel. Click Apply to save the changes. To transfer data continuously to the spreadsheet: 1.dataset). In the first column (if Variable Names Across is selected under Orientation) or the first row (if Variable Names Down under Orientation is selected) of the spreadsheet. You can use the time formats available in Microsoft Excel. the transfer will occur at the defined intervals (controlled either by dataset settings or by explicitly defined times in the spreadsheet). Click the Layout tab. 2. The dataset will automatically convert these times to their equivalent in Powersim Studio. 3. Note! Be sure to select the correct sheet when entering the times (you must obviously use the same sheet as specified under Sheet on the General tab of the dataset. Transfer All Data at the End of the Simulation You can let the dataset transfer all the simulation data at the end of the simulation. Deselect the Continuous Data Transfer on the Layout tab. This can speed up the simulation. Note! This option will only affect data transfers from the component to the spreadsheet. If values are imported from the spreadsheet to a model variable.

as well as to define units. The connection between dataset variables and model variables are done on either a one-to-one basis or one-to-many basis. and are forms that define data input and output to the SEM-BPS system. Planning layouts are defined in the planning level. it can only be connected to one model interface variable. and restrictions that apply to all the various planning tasks being performed within that level. The dataset can import values from key figures to model variables in the simulation. planning packages. a dataset variable is importing data from the simulation to the dataset connection. dimension and version ranges. It also covers the requirements that must be met by the planning architecture in SEM-BPS in order for the connection to work. depending on the transfer direction of the variable connection. This architecture is constituted by planning areas. The connection to the SAP Business Warehouse (BW) InfoCube is set up through SEM-BPS and the planning architecture supplied there. The planning area contains the link to the SAP BW InfoCube. The SEM Dataset utilizes these layouts to define the data transfer between the two systems.Work with the SEM Dataset The SEM Dataset provides a connection between Powersim Studio and the SAP Strategic Enterprise Management . The purpose is to produce consistent and realistic plans by adding the capability to test various scenarios before applying them in the business. If.419 - . or export simulation results from model variables to the key figures.Business Planning and Simulation (SEM-BPS) system. The documentation available in the following topics concentrates on how the SEM Dataset is set up and utilized inside Powersim Studio. The planning level contains the characteristics and key figures that are used in the business planning process. The characteristics included in the planning level as well as the restrictions made for these characteristics in the planning level and/or in the planning package. A planning level must therefore contain at least one planning layout that complies with the requirements set by the SEM Dataset. For further information on the SAP SEM-BPS system. and this information is used to map the simulation time to the reporting times of the SEM-BPS system. is read by the SEM Dataset. in the SAP BW InfoCubes. . planning levels. A dataset variable that exports data from the dataset connection to the simulation can be connected to any number of model interface variables. The SEM Dataset uses the planning architecture in SEM-BPS to establish a connection between the two systems. please refer to the documentation distributed with the SAP system. It allows you to use Powersim Studio as a planning tool with SEM-BPS for creating group-wide business plans. on the other hand. The main purpose of the dataset is to connect model variables in Studio to their counterparts. The planning package contains the final restriction of data for the specific planning task that is done with that package. the key figures. and planning layouts. and dataset variables in the simulation project.

Packages. you must always use the Note! When you run simulations that use the Load… and Save… commands available under External Data… to load and save data that are temporarily stored in the dataset connection inside Powersim Studio. Version ranges. and packages. characteristics related to time are translated into time information in Studio.420 - . The connection between Powersim Studio and SAP SEM-BPS also relates to this structure. the dataset will connect to SEM-BPS and read the master data information from SEM-BPS. A planning level and area in SEM-BPS contains various characteristics and key figures. This package can be specified in the dataset definition. and a planning layout (more on the planning layout later) must be defined in the SEM Connection dialog box. characteristics describing ranges are translated into dimension and version ranges. does not affect the simulation model directly. In Powersim Studio. It is important to keep in mind that the actual time series is retrieved from the planning package. apply the simulation to all planning packages within the selected level. The planning area. When Studio uses the SEM Dataset to connect to SEM-BPS. planning level. the data connection is based on a SEM Dataset definition. The master information is used to create global ranges and units and time information for the dataset. The master data can also contain allowed values for characteristics. while currency and unit characteristics are translated into units in the simulation project. Levels. How the SEM Dataset Works The SAP SEM-BPS system features a planning architecture that is structured into planning areas. on the other hand. and one layout may therefore be used by several packages. and Layouts The user can define the SEM connection in the SEM Dataset view. or it can be entered for each dataset connection individually in the Co-models view (a package must be defined for the dataset connection to be able to establish communication with SEM-BPS). SEM-BPS also contains layouts. Key figures are translated into dataset variables. Layouts are defined in the planning level. When saved. otherwise it must be restricted in the planning level. and units. and you must therefore specify a layout to be used by the dataset when you define it. whereas dimension ranges may be restricted in the planning package only if the planning package is part of the dataset definition. levels. If the package is defined in . time information. Planning Areas. which control the presentations of the data available in a given package.such as ranges. The master data contain information about key figures and characteristics . and the planning level and the package are the most important. Characteristics describing ranges can also be restricted to a single value. however. in which case it will not appear in the simulation at all. The SEM Dataset in Studio interacts with layouts to structure the data in and out from SEM-BPS. You can. but will instead be handled by the Dataset itself when reading or writing data to the SEM system. or for each individual dataset connection. The package information can be entered in the SEM dataset definition itself. but is used to decide where the data are going to be read and written in the SEM-BPS system. Note! Dimension ranges are added to Global Ranges as ordinary ranges when the Dataset is synchronized with SAP SEM-BPS. Version ranges may only be restricted in the planning package. which is associated with a planning area and a planning level. and you must therefore select a planning package when you want to perform simulations on data from the SAM BW InfoCube.SEM Dataset.

you must make sure that decimal count for each dataset variable in the SEM Dataset corresponds to the decimal count set in SEM-BPS. and key figures to value columns will thus make the layout Studio compliant. and currencies may be restricted in the planning package.the dataset definition. Otherwise these characteristics must be restricted in the planning level.421 - . ranges. A SEM layout cannot contain more than 10. „ „ „ „ „ „ „ „ „ All the characteristics included in the planning level must be included in the planning layout. An SEM layout contains three parts: the header area. This will not affect the connection to SEM-BPS. the SEM dataset will use the currently selected language when defining the necessary variables. and units. it is locked and cannot be changed for each dataset connection individually. Studio Compliant Layouts You must select a Studio compliant planning layout when defining the SEM Dataset. unless they are characteristics that are going to be used as version ranges. You should normally not have to worry about this when you establish or work with SEM Dataset connections. This technical name is defined in a special technical language space within Powersim Studio. The three icons will illustrate the current connection . Characteristics that are going to be used as version ranges must be assigned to the header table of the layout. Locked time characteristics (restricted to a single value) must be assigned to the header area. As you will see. Time interval and unrestricted time characteristics must be assigned to the lead columns. Characteristics that are going to be used as dimension ranges must be assigned to the lead columns. Language in SEM datasets When you establish a connection between SEM-BPS and Studio.000 rows of data (this is a restriction of the layouts in SEM). (Otherwise.) Assigning single-valued characteristics and characteristics used as version ranges in the header area. The list below summarizes the rules you must follow to be able to connect to the layout. an icon will appear in the system tray of the Windows Task Bar. units. the lead columns. The dataset uses the layout when reading and writing data to the SAP system. if you wish to. if you wish to). You define this Studio compliant layout in SEM-BPS. Characteristics that are assigned to the header table of the layout must be restricted to a single value on the level (although you can also assign such characteristics to the leading columns. It is recommended that the number of decimals to use for the values in the layout should be set to undefined. all SEM dataset variables will have a technical name that corresponds to the technical name in SEM. ensuring that connections are established correctly. Connection status for the SEM dataset When a connection is established between Powersim Studio and SAP SEM-BPS. The key figures that are going to be available to the dataset must be assigned to the value columns of the layout. Note! If the package is defined in the dataset definition. and the data columns. characteristics that define dimension ranges. This technical language has a prefix of _07FF_. You may change all these names later. characteristics defining dimension ranges and times to lead columns.

whether it's logged off. the initial value will be transferred from SEM-BPS to Studio. you can right-click it and control the connection status of the SEM Dataset on the shortcut menu. Key figures Key figures in SEM-BPS are transferred to the dataset as dataset variables. After creating a dataset connection between a SEM Dataset and a simulation in the simulation's Co-models view.422 - . allowing Studio to automatically log off the SAP system when the specified time has elapsed. you can connect the dataset variables to their model variable counterparts. This allows you to change the display name of the dataset variable to anything you like. data will be transferred from SEMBPS to Studio. When you synchronize your SEM Dataset to SEM-BPS. You can view the different characteristics available in the SEM-BPS system on the Characteristics property page for the SEM Dataset. Model variables that have a defined transfer direction are called interface variables. and they must be included in the planning level. and if it is set to out-in. The key figures in SEM-BPS must be marked as InLevel. Only the key figures that are present in the selected layout of the SEM Dataset definition will be available in Studio. should you wish so). You may also define a time-out interval. Connecting the model interface variables to the corresponding dataset variable can be achieved by a simple drag-and-drop operation. If the direction is set to in. but opposite transfer directions. and these will be available under the Main node. while the rest of the time series will be transferred from Studio to SEM-BPS. the variables must have compatible units. The icons are shown below. the dataset variables will be available under the SEM Dataset node. or data transfer is active. but you are not currently logged on to the SAP SEM-BPS system. „ „ „ SEM Dataset Offline: The open simulation project contains a SEM Dataset. and data are being transferred. The transfer direction you specify for the dataset variable will control the direction of data transfer to and from SEM-BPS. Different layouts in the SEMBPS structure can use different selections of key figures (or all. should you wish to. but there is currently no active data transfer. The various mappings are discussed below. which in turn can be connected to model variables when a dataset connection is made. The technical name of the dataset variable will be identical to the technical name of the key figure. When the icon is visible in the system tray. a dataset variable will be created for each key figure available in the selected layout. SEM Dataset Active: You are logged in to the SAP SEM-BPS system. Once you have created a dataset connection.status. data types. data will be transferred from Studio to SEM-BPS. Connection Details The various key figures and characteristics available in SEM-BPS are interpreted into various properties within Studio and the SEM Dataset. SEM Dataset Online: You are logged in to the SAP SEM-BPS system. When connecting a model variable to a dataset variable. logged on but not transferring data. . dimensions. if it set to out.

If your SEM-BPS system utilizes fiscal time characteristics. The time characteristics available in the planning level are used by the ways. one of them can be interpreted as a locked time characteristic. Unrestricted Time Characteristic: In systems with two (or more) time characteristics.423 - . Version and Dimension Ranges Characteristics describing ranges define the dimensions of the key figures in the SEM-BPS system. please read Mapping Time Characteristics to Simulation Time. A locked characteristic must be restricted to a single value in the planning level. A time interval characteristic is restricted to a continuous time interval in the planning level or the planning package. and these three interpretations are shown below. they are treated equally in Studio. Locked Time Characteristic: In systems with two time characteristics. one of them may be left unrestricted. „ „ „ SEM Dataset in various Time Interval Characteristic: There must always be at least one time characteristic available. while the unrestricted time interval is used to determine the minor interval of the reporting time. Both are imported as global units and when the dataset is defined or a dataset connection is established. and denotes the structure of the storage. Note that the fiscal time characteristic 0FISCVARNT will always be treated as a locked time characteristic. Version dimensions affects the data source of the simulation. you must make sure that they have compatible units. One key figure can contain several versions or elements. defined by the available range characteristics. they will both appear in Global Units. If such a range characteristic is assigned to the header area of the planning layout that the SEM Dataset connects to. you must include time characteristics that control the recording times of the dataset. Calendar time characteristics will be mapped to the calendar of the simulation directly. If an unrestricted time characteristic is present. the time interval characteristic above will be used to determine the major interval.Time-related characteristics When you create the planning level of the planning architecture. Such chacteristics are used to determine the resolution of the dataset. as they will control where in the SEMBPS system data are transferred to and from. or in the planning package if the package is specified in the dataset definition. and one of these must be a time interval characteristic. the conversion will be defined using one of the fiscal translation schemes available in the SEM Dataset. These range characteristics may be used in two different ways in the simulation project. Note! When connecting a dataset variable to a model variable. This characteristic is used to determine the sampling interval of the dataset. There are quite a few valid combinations of time characteristics and restrictions of these that can be used with the SEM Dataset. For a complete listing of allowed combinations of time characteristics. The version of a simulation is selected for each dataset . Although units and currencies are treated separately in SEM-BPS. Units and currencies Units and currencies must be restricted to single value in the planning level. There are two different types of time characteristics in SEM-BPS: calendar and fiscal time characteristics. it will be used as a Version Range in Powersim Studio. in order to be transferred to the simulation properly.

Characteristics that are used as version ranges can only be restricted in the planning package. Ranges that are used to define the dimension of variables are copied to Global Ranges for the simulation project. it will be used as a dimension range in Powersim Studio. Examples of time interval characteristics are 0CALDAY. the dataset variables. where you can define subranges from a range by selecting the first and the last range element. Characteristics that are used as dimension ranges must be restricted in the planning level. 0CALQUART1. or are left unrestricted. are compatible with Powersim Studio. The dimension range will affect the dimension of the simulation model. It is used by the SEM Dataset to determine the resolution of the sampled time series. A locked time characteristic must always be accompanied by a time interval characteristic. Locked Time Characteristics: A time characteristic that is restricted to a single value in the planning level or planning package. When preparing a planning architecture that is going to communicate with Powersim Studio through the SEM Dataset. „ „ „ Time Interval Characteristics: A time characteristic that is restricted to a continuous range in either the planning level or in the planning package.connection individually. and 0CALYEAR restricted to a continuous subrange in the planning level or package. Note! When you restrict a characteristics in the SAP SEM-BPS system to a range. and their connected interface variables. To be able to connect dataset and interface variables. it will be selected automatically when you establish a dataset connection. Unrestricted Time Characteristics: A time characteristic that is. their dimensions must be identical. The time characteristics in SEM-BPS can be interpreted in three different ways by the SEM Dataset. The dimension range will be used to define the dimensions of the dataset variable. to a continuous range. The table below summarizes the allowed combinations. It must be assigned to the lead columns of the planning layout. or it may be restricted in the planning package. and the resulting dataset variable will be an array. and . If a characteristic in SAP SEM-BPS is assigned to the lead columns of the planning layout. or it may be accompanied by a locked or an unrestricted time characteristic. Examples of unrestricted time characteristics are 0CALMONTH2. and it must be assigned to the header area of the planning layout. A time interval characteristic must always be included in the planning level. 0CALWEEK. Examples of locked time characteristics are 0FISCVARNT or 0CALYEAR restricted to a single value. depending on whether they are restricted to a single value. and the resulting subrange will contain all the elements between the start and end element. as the name implies. provided the planning package is a part of the connection details that are saved with the dataset definition. A time interval characteristic may appear alone (as the only available time characteristic in the planning level). An unrestricted time series must always be accompanied by a time interval characteristic. Mapping Time Characteristics in SEM to Simulation Time There are a wide selection of available time characteristics in the SEM-BPS system. or you can select them when saving and loading the simulation data. This is similar to defining subranges in Studio. you must make sure that the time characteristics that are included in the planning level. 0CALMONTH. unrestricted in the planning architecture. and it must be assigned to the lead columns of the planning layout. Tip! If you restrict the version range to a single value in the planning package. you must ensure that it is restricted to a continuous subrange of the available values for the characteristic.424 - .

0CALWEEKDAY1 that are left unrestricted in the planning architecture, and combined with
corresponding time interval characteristics as listed in the tables below.
Mapping fiscal time characteristics
When you include fiscal time characteristics in the planning level, you must always include the
0FISCVARNT characteristic as well, and it must be restricted to a single-value in either the planning
level or the planning package. Furthermore, it must be assigned to the header area of the planning
layout. The 0FISCVARNT time characteristic determines which fiscal calendar reporting scheme is
used.
The
SEM Dataset may use two different methods of translating the fiscal time characteristics to the
simulation calendar. When you have synchronized the dataset with SEM-BPS, please ensure that the
default fiscal time translation used is correct for your application. You find this on the Time
Translation property page in the
SEM Dataset view.
The table below summarizes the allowed combinations of fiscal time characteristics.
Locked Time
Characteristic

Time Interval
Characteristic

Unrestricted Time
Characteristic

0FISCVARNT

0FISCYEAR

0FISCVARNT

0FISCPER

0FISCVARNT & 0FISCYEAR

0FISCPER3

0FISCVARNT

0FISCYEAR

0FISCPER3

Mapping calendar time characteristics
When using calendar time characteristics in SEM-BPS, the calendar will be automatically mapped
towards the simulation time. The table below summarizes the allowed combinations of various
calendar time characteristics in the SEM-BPS system.
Locked Time
Characteristic

Time Interval
Characteristic

Unrestricted Time
Characteristic

0CALDAY

0CALWEEK

0CALMONTH

0CALQUARTER

0CALYEAR

0CALYEAR

0CALMONTH2

0CALYEAR

0CALMONTH2

0CALYEAR

0CALQUART1

0CALYEAR

0CALQUART1

0CALYEAR

0HALFYEAR1

0CALYEAR

0HALFYEAR1

0CALWEEK

0WEEKDAY1

0CALWEEK

0WEEKDAY1

- 425 -

Time Translations in the SEM Dataset
Data in SEM-BPS are structured in time periods, much like time series in Powersim Studio. To be
able to map the data correctly to time series in Powersim Studio, the
SEM Dataset must specify
how the calendars should be mapped.
Although the planning level and package can contain several time characteristic, all except one must
be single. If the time characteristic that is not single is restricted, then it is available at the planning
level, otherwise it is only available in planning packages.
Calendar Characteristics in SEM-BPS
Time characteristics in SEM-BPS that are related to the calendar (such as 0CALWEEK and
0CALMONTH) are mapped directly to the calendars in Studio as well. When the planning level (and
package) contains these time characteristics, no calendar translation is required in the
SEM
Dataset.
Fiscal Time Characteristics in SEM-BPS
Fiscal calendars in the SAP system are different from "ordinary" calendars, because their starting
period doesn't necessarily have to coincide with the regular calendar year, and because they often
feature extra, special periods in addition to the regular (calendar) periods. Therefore, if the planning
level includes fiscal time characteristics, then the
SEM Dataset must relate the fiscal calendar to
the calendar of the simulation using one of two different fiscal translation methods available in
Studio. The two available methods are translating the fiscal calendar by fiscal variant or by fiscal
periods.
If you select to translate the fiscal time characteristic by the fiscal variant, you will specify a general
method of translating the fiscal calendar based on its features. The most common fiscal variants will
be recognized by the
SEM Dataset, and the settings of the fiscal variant translation method will be
defined automatically. Please ensure that the automatic settings are correct, especially if you use a
fiscal variant that is not very common. The SEM Dataset will map the fiscal periods to the simulation
calendar in Studio based on these settings.
The fiscal variant translation method allows you to specify the starting time of the first period, the
time unit to base the dataset period on, and how many relevant periods the data contains. As
mentioned above, a fiscal calendar in SAP may contain some special (extra) periods each year. It is
therefore important that you select how many of these periods should be used to report simulation
data. The time unit that the dataset period is based combined with the number of relevant periods of
the fiscal calendar will determine the length of the sampling period used by the dataset. If, say, the
time unit is set to Month, and the number of relevant periods is set to 12, then the sampling period
will be 1 month. Similarly, if the time unit is set to Month and the number of relevant periods is set to
4, then the sampling period will be 3 months.
For a fiscal calendar in SAP, the starting period may be shifted compared to the normal calendar. The
fiscal year may for example run from July to July, rather than from January to January. It is therefore
important that you select the starting time of the first period of the fiscal calendar you are using. As an
example, if the first period of the fiscal year 2003 is 1 April 2003 (and the sampling time is one
month), then the simulation time 1 April 2003 will be mapped to the fiscal time period 001.2003, the
simulation time 1 May 2003 will be mapped to the fiscal time period 002.2003, and so on. Similarly,
if the fiscal year 2003 starts on 1 July 2002, then the simulation time 1 July 2002 will be mapped to

- 426 -

001.2003, the simulation time 1 August 2002 will be mapped to 002.2003, and so on.
Note! When you select this translation method, Studio will analyze the time characteristic and
suggest parameters for you. In most cases, these default values will be appropriate for most
purposes. You should review them and only change them once you're certain they must be
changed.
If you select to translate the fiscal time characteristic by fiscal periods, you specify the starting time of
the first period and the ending time of the last period in the data source. You must then mark all the
special periods for the data source manually. It is a requirement that the entire time scope of the
dataset is known in the dataset definition if you are going to use this translation method. Thus, if the
time characteristics are restricted in the planning package, the planning package must be specified in
the dataset definition.
Independently of the translation method selected, you can always change the parameters of the
selected translation method on the Time Translation property page, for the SEM Dataset definition.
To open this property page, right-click the Dataset node in the
SEM Dataset view, and select
Properties on the shortcut menu.
Times in the Co-models View
When you have created a dataset connection, the times are mapped, and you can view the reporting
times of the dataset connection on the Times property page, available when you right-click the dataset
connection and select
Properties on the shortcut menu.

Ranges and Units in SEM Datasets
Characteristics in the SEM-BPS system that are related to ranges, units, and currency are imported to
the simulation project as global ranges (for dimension ranges), version ranges (within the SEM
Dataset), and global units (units and currency).
Characteristics that are used as dimension ranges, version ranges, and units, must be restricted when
the dataset definition is created. Thus, if the planning package is set for the dataset definition, these
characteristics may be restricted in either the package or in the level. If the planning package is left
open in the dataset definition, then these characteristics must be restricted in the planning level.
Version and Dimension Ranges
Characteristics describing ranges can be interpreted in two ways in the dataset; as either Dimension
Ranges or Version Ranges.
Whether a characteristic is used as a dimension range or a version range depends on where the
characteristic appears in the planning layout. If the characteristic appears in the header area of the
planning layout, it will be used as a version range. If the characteristic appears in the lead columns of
the layout, it will be used as a dimension range.
If you use characteristics as dimension ranges, the range will be used to set the dimension of the
dataset variable directly, turning them into arrays. These ranges will therefore be defined as global
ranges, available in the
Global Ranges view.
The order of the ranges in the Ranges property page of the dataset will affect the order the ranges
appear in dimension definitions for the dataset variables. The topmost variable range will appear as

- 427 -

the first dimension, the second as the second dimension, and so on.
Note! When you restrict a characteristics to a range in the SAP SEM-BPS system, you must
ensure that it is restricted to a continuous subrange of the available values for the
characteristic. This is similar to defining subranges in Studio, where you can define subranges
from a range by selecting the first and the last range element, and the resulting subrange will
contain all the elements between the start and end element.
Alternatively, you can use the ranges as version ranges, in which case the range will affect the data
source of the simulation rather than the dimension of the model variable. If a dimension is used as a
version, you must explicitly select what version to simulate on. You do this in the Connection
property page of the dataset connection in the
Co-models view under the simulation, or in the
External Data Details dialog box.
Units
When the dataset is synchronized with SEM, the unit definitions that are available in SEM-BPS and
that are not already present in the simulation project, will be automatically created in
Global Units.
All used units are imported as global units, and will be available for all the components in the project.
Note! All imported units will be defined as ATOMIC in Global Units, even if an imported unit
may be an SI unit. Studio has no means of detecting whether this is the case or not. If so, it is
recommended that you add the unit before making the connection to SEM-BPS.
The

SEM Dataset requires that all units used in the simulation must be restricted to a single value.

In addition to the units included as characteristics in the planning level, a single variable can also have
a unit definition attached to it. These units will also be added to the system as global units.
The Units property page of the SEM Dataset allows you to inspect the unit definitions that are present
in the planning level. The information available includes the units name, technical name, definition,
description, and whether or not it is a currency unit. The property page is available by right-clicking
the Dataset node in the
SEM Dataset view, and selecting
Properties on the shortcut menu.

Work Offline with the SEM Dataset
The
SEM Dataset will store the data that was loaded from the SEM-BPS system at the last data
transfer, even if the simulation project was saved and closed in the meantime. The dataset will not
hold data for all versions of a dataset, however, so you are restricted to using one version while
working offline. When you are running the simulation, new time series will temporarily be stored in
the dataset connection. Once you are online again, you can save the changes that you made to the
dataset connection back to the SEM-BPS system.
SEM Dataset is, strictly speaking, always working offline, as it only connects to
Note! The
SEM when synchronizing, loading, or saving data. However, since a connection must be
established each time you change a version, package, or synchronize the dataset with SEMBPS, it will usually be required to have a connection readily available.
The table below shows which operations require a connection to be established between Studio and
SEM-BPS, and which operations that can be run completely offline.

- 428 -

Operation

Connection
Required

Defining dataset (importing characteristics and key figures)

Yes

Synchronizing dataset

Yes

Creating dataset connection (in Co-models view)

Yes

Loading and saving data

Yes

Changing versions

Yes

Changing package for dataset connection

Yes

Inspect or change dataset properties (dimension ranges, version ranges,
time translation details)

No

Viewing/Editing history for dataset variables

No

Running simulation

No

Note! When you run a simulation, all the dataset variables with the transfer direction set to in
will be reset when you reset the simulation.

Connection status for the SEM dataset
When a connection is established between Powersim Studio and SAP SEM-BPS, an icon will appear
in the system tray of the Windows Task Bar. The three icons will illustrate the current connection
status, whether it's logged off, logged on but not transferring data, or data transfer is active. The icons
are shown below.
„

„

„

SEM Dataset Offline: You are not logged on to the SAP SEM-BPS system, and no data is
currently transferred (obviously).
SEM Dataset Online: You are logged in to the SAP SEM-BPS system, but no data is currently
being transferred.
SEM Dataset Active: You are logged in to the SAP SEM-BPS system, and data is being
transferred.

When the icon is visible in the system tray, you can right-click it and control the connection status of
the
SEM Dataset on the shortcut menu. You may also define a time-out interval, allowing Studio
to automatically log off the SAP system when the specified time has elapsed.

How to Prepare SEM-BPS for the SEM Dataset
The planning architecture of the SEM-BPS system consists of three structures: the planning area, the
planning level, and the planning package. The discussion below will not explain how these interact
with eachother, and how you should define them, as this discussion belongs to the SAP SEM-BPS
documentation. The discussion does, however, point out the most important aspects that needs to be
taken care of in order for a connection between SAP SEM-BPS and Powersim Studio to be
established.

- 429 -

Setting up the planning area
The planning area of SEM-BPS is used to create a link to an InfoCube in the SAP Business
Information Warehouse (SAP BW). No particular selections are required on the planning area to
make the
SEM Dataset work.
Setting up the planning level
The planning level is used to limit the characteristics and key figures available to those that are
relevant to the business issue. In addition to selecting which characteristics and key figures should be
available in the planning level, you can also restrict the characteristics to certain values or value
ranges as well. This restriction will apply to all the planning packages that are created in the level as
well.
You include all the key figures that you would like to access in Powersim Studio in the planning
level.
The time characteristics to be used by the dataset connection must also be included in the planning
level. Your planning level cannot contain both fiscal and calendar time characteristics. If your system
uses the fiscal characteristics, the time characteristic 0FISCVARNT must always be present in the
planning level. You must use an allowed time characteristic and restriction combination in order for
the time characteristics to be properly interpreted by Powersim Studio. For a complete listing of
allowed combinations of time characteristics, please read Mapping Time Characteristics to Simulation
Time.
Superior characteristics must always be restricted to a single-value either in the planning level or in
the planning package.
Characteristics that represent dimension ranges may be restricted in the planning level; or
alternatively in the planning package, provided the planning package is defined in the dataset
definition. Dimension range definitions will be created in the simulation project based on the
characteristics available in the planning level. You may also leave such characteristics unrestricted, in
which case the resulting dimension range in Powersim Studio will actually contain all the available
elements of the characteristic. You should use unrestricted characteristics with great caution, as very
large dimension ranges will result in an extremely high number of variable (array) elements in your
simulation model.
Characteristics that represent version ranges must be marked as Selected in Package in the planning
level. The value of the version ranges are used by Powersim Studio to decide where in the database to
store the data, and Powersim Studio must therefore be able to control the value of the characteristic in
the planning package. If the version range is restricted to a single value in the planning package, it
will automatically be used by the
SEM Dataset when data are transferred between the systems.
The version can be selected in Studio either when the dataset connection is made, or at the time of
loading and saving data between the two systems.
Note! When you restrict a characteristic to a range, you must always make sure that the
restriction is a continuous subset of the available values for the characteristic. You cannot
build a selection of elements from various sections of the available values. Thus, restricting a
range characteristic for a SEM Dataset in SEM-BPS is pretty similar to creating enumeration
subranges from enumeration ranges in StudioSuperior characteristics must always be included and restricted to a single-value in the planning level.
All other characteristics included in the planning level, including units of measurement and

- 430 -

currencies, must be restricted to a single value either in the planning level or in the planning package.
Planning Level Checklist
„
„
„
„

„

„

„

Include the key figures you wish to make available to the SEM Dataset(s).
Include the time characteristics you wish to use.
Include the characterstics you wish to use as ranges in the simulation project.
Include other required characteristics, such as units and currencies. These
characteristics must be restricted to a single value either in the planning level or in the
planning package.
You may restrict the characteristics that are to be used as dimension ranges in the
simulation model. Only restrictions containing a continuous subset of elements are
allowed.
Characteristics that are to be used as version ranges in the simulation model must be
defined as Selected in Package.
Superior characteristics must be restricted to a single-value.

Setting up the planning package
The planning package is the lowest level in the planning architecture, and it takes the characteristics
and key figures included in the planning level and serves to further restrict characteristics whose
values have not already been restricted in the planning level.
Characteristics used as version ranges may be restricted in the planning package. This will limit the
number of options available when you select the version to work on in the simulation model. If you
leave it open, all the available elements will be visible when you specify the version for the dataset in
Studio.
Characteristics used as dimension ranges that are not already restricted in the planning level, may be
restricted in the planning package, but only as long as the planning package is selected in the dataset
definition itself, and not in the dataset connection. They may also be left unrestricted, but be cautious
to avoid that the ranges you import to the simulation model becomes too large to handle.
Other characteristics that haven't already been restricted in the planning level, must be restricted in the
planning package.
Finally, you may also restrict time characteristics in the planning package. For a complete listing of
allowed combinations of time characteristics and corresponding restrictions, please read Mapping
Time Characteristics to Simulation Time.
Planning Package Checklist
„

„

„

You may restrict the characteristics used as dimensions and versions that are not already
restricted in the planning level. Only restrictions containing a continuous subset of
elements are allowed.
Other characteristics, such as units and currencies, that are not already restricted in the
planning level, must be restricted to a single-value in the planning package.
You may restrict time characteristics in the planning package, provided they match the
requirements for time characteristics mapping to simulation time.

- 431 -

Setting up the planning layout
The planning layout serves as a form for structuring data for in- and output in SEM-BPS. A planning
layout can be viewed in SEM-BPS as an Excel spreadsheet. The planning layout contains three panes:
The header area; the lead columns; and the data columns. Powersim Studio uses the structure of a
planning layout to transfer data to and from SEM-BPS, and you must therefore add at least one
planning layout to your SEM-BPS system to be able to connect to it from the simulation model.
Each SEM Dataset in Studio may connect to a different planning layout within the same planning
architecture, and this allows you to make different layouts for different datasets.
The characteristics available in the header area are valid for the entire planning layout. The lead
columns determine the contents of the rows, and you are allowed to define several lead columns in
each layout. Finally, the data columns contain the actual data transmitted to and from the database.
Note! A planning layout may only contain 10,000 rows of data, so keep this in mind when you
define the planning layouts to use for the dataset connections.
Note! All the characteristics that are included in the planning level must be assigned to the
planning layout for the layout to be compatible with the
SEM Dataset. You may, however,
include only a selection of the key figures available in the planning level.
The time, unit, currency, and superior characteristics that are restricted to a single value, must be
assigned to the header area of the layout.
To use a range characteristic as a version range, it must be assigned to the header area of the planning
layout. This is the way Powersim Studio will identify version ranges when synchronizing the dataset
with SEM-BPS.
The time characteristics that are not restricted to a single value must be assigned to the lead columns
of the planning layout. If you have more than one such time characteristic in your planning
architecture, you should assign each of them to an individual lead column.
The range characteristics that are being used as dimension ranges in the simulation model, must be
assigned to the lead columns of the layout. This is the way Powersim Studio will identify dimension
ranges.
Note! Dimension ranges are created when the dataset definition is made. The characteristics
defining dimension ranges may therefore only be restricted in the planning package if the
package is a part of the connection details of the dataset definition.
Finally, the key figures that should be available to the SEM Dataset that connects to the planning
layout, must be assigned to the data columns of the planning layout.
Planning Layout Checklist
Assign the characteristics and the key figures to the various panes of the planning layout
according to the lists below.
„

Header Area
„ Locked time characteristics (restricted to a single value)
„ Unit and currency characteristics (restricted to a single value)
„ Superior characteristics (restricted to a single value)

- 432 -

Version range characteristics
„ Lead Columns
„ Time interval characteristics
„ Unrestricted time characteristics (if any)
„ Dimension range characteristics
„ Data Columns
„ Key figures
„

Define a SEM Dataset
The steps below provide an overview of the process of how to define a

SEM Dataset.

1. Create a new
SEM Dataset in the
Project Window. When you have created the dataset, open
its view by double-clicking it.
2. Right-click the Dataset node, and select
SEM Connection… on the shortcut menu.
3. In the SEM Connection dialog box, specify the planning area, planning level, and planning layout
you wish to connect to. The planning package may also be specified on the dataset definition. If
your simulation must access different packages, however, you should set the package on each
dataset connection individually instead. You are also allowed to set the package to use when
loading and saving data from the simulation (unless it is locked in the dataset connection or
defined directly in the dataset definition). Click OK to accept the connection details.
4. The
SEM Dataset will load the available characteristics and key figures from SEM-BPS.
Studio will automatically generate dataset variables for the key figures, global ranges for
dimension range characteristics, and global units for unit and currency characteristics. You can
inspect the available characteristics in the Characteristics property page of the
SEM Dataset.
5. If the planning level you are connecting to contains a fiscal time characteristic, a translation
method is automatically set up for the dataset. In most cases, the automatic interpretation of the
fiscal calendar schemes will be good, but please ensure that the translation settings are correct
before running a simulation. The settings are available in the Time Translation property page for
the
SEM Dataset.
6. You can control the order in which dimension ranges will appear in the dataset variable definitions
by sorting the order of the available ranges in the Characteristics property page of the
SEM
Dataset.
7. You can now verify that the dimension ranges have been created in
Global Ranges and units
have been created in
Global Units.
8. To connect the dataset to the simulation, you must open the
Co-models view of the respective
simulation.
9. Right-click inside the Co-models view, and select Create Dataset Connection on the shortcut
menu. Select the newly created SEM Dataset on the submenu to create a dataset connection.
10. Make sure that the interface variables of your simulation have corresponding unit, dimension, and
transfer directions, and connect them to the dataset connection.
11. If the dataset connection needs package and version information, right-click the dataset
connection, and select
Properties on the shortcut menu.
12. On the Connection property page, you can set the package to work on by entering the technical
name of the package in the Package text box. You can also click Change… and specify the
package in the SEM Connection dialog box.
13. You can also select an element for each version range in the dataset. Select the row containing the

- 433 -

. Once the complete connection details (including package and versions) are set. Right-click the dataset connection and select Load Data on the shortcut menu. the unit of the resulting time series will become the unit of the dataset variable multiplied with time. Changing the unit of the dataset variable accordingly will ensure that the time series that is saved to SEM-BPS has the same unit as the key figure it is saved to. 15. You can now run the simulation. You can save simulation data back to SEM-BPS at any time you wish (you can run as many simulation runs as you wish without saving data). and select Load… (this command will only be available if you have connected variables to the dataset connection). can use summary types. Load and Save Data using the SEM Dataset When you run a simulation that utilizes a SEM Dataset. Open the SEM Dataset view. 1. you can load data to the dataset connection. and select SEM Dataset. Click Apply (or OK) to apply the changes. the resulting unit when using the Accumulated summary type will be USD. You should take this into account when using the Accumulated summary type for a dataset variable in the SEM Dataset . You can create new dataset variables for key figures. when using the summary type Accumulated. you control when data is loaded and saved manually. Using Summary Types for Key Figures All dataset variables. Right-click the dataset connection and select Save Data on the shortcut menu. If the package and/or version is locked. 17. it cannot be changed when you access the Load External Data… or Save External Data… dialog boxes. level. SEM Dataset as well. including dataset variables in the SEM Dataset. and packages will change after you created the In this case you can easily synchronize the dataset with the SEM-BPS system.which represents a key figure in SEM-BPS. If a package is defined in the dataset definition and the dataset doesn't contain versions. Right-click the Dataset node.434 - .14. or select External Data… on the Simulation Menu. and characteristics will be updated. The SEM Dataset will be updated with the latest changes from the SEM-BPS system. If the unit of a dataset variable is USD/mo. There are other options and functionality available in the should enable you to make an initial connection. This is similar to the relationship between the units of a level and of the flow rate controlling a flow to the flow rate (when the flow is continuous). 2. Synchronize on the shortcut menu. and select Save… (this command will only be available if there are unsaved information in the dataset). or select External Data… on the Simulation Menu. version range. However. but the steps above Synchronize a SEM Dataset with SEM-BPS Sometimes the planning area. 16. You can lock both the package and the version by selecting the Lock options for each. and click on the element field to open a drop down list where you can select between the available versions.

please follow the procedure below. 3. . A dialog box will appear. no data will be transferred unless you use the Load… or Save… commands yourself. To set a package for a dataset connection: 1. if a package isn't selected or a version is required for the data to load. Specify the package to use for the dataset connection in the Details property page. Click External Data… on the Simulation menu or toolbar. Note! You will not be able to transfer data between Studio and SAP SEM-BPS if some of the required connection details are missing. In the External Data… dialog box when loading or saving data. To load (or save) data for a SEM Dataset. Otherwise. Right-click the Connection of SEM Dataset in the Co-models view. Click OK when finished. or OK to save the changes and close the dialog box. click … next to the dataset connection name in the dialog box. Select the Lock option under the package name in the Details Property page. Click Apply to save the changes. On the individual dataset connection in the Co-models view for the simulation. you control when data are loaded and saved between Studio and SEM manually by using the commands available under External Data…. The Load External Data (or Save External Data) dialog box will appear. 2. 2. and click Load… (or Save… on the menu that appears. or OK to save the changes and close the dialog box. If the package is specified in the dataset definition. Click Apply to save the changes. If the package is specified in the dataset connection. and select Properties on the shortcut menu. Set and Lock Packages in the SEM Dataset While the planning area and level must be specified in the global definition for the the planning package can be specified on three levels: „ „ „ SEM Dataset.435 - . allowing you to select the required connection details. provided it has not been locked in the dataset connection. To lock the package for a dataset connection: 1. it cannot be changed in the dataset connection or when loading or saving external data. 3. 2. Right-click the Connection of SEM Dataset in the Co-models view.data will be automatically loaded from SEM when you first create the dataset connection. If you need to select a version and/or a package for a dataset connection. The dialog box is available by clicking External Data…. Remember that when working with the SEM Dataset. 1. 3. In the dataset definition in the SEM Dataset view. Tip! You may use the External Data dialog box to view versions or packages. and select Properties on the shortcut menu. it is available for selection when loading or saving external data. and then selecting Details… on the submenu. Click OK to load the data from the SEM Dataset.

Specified and locked in the dataset connection: If you specify the planning package in the dataset connection (which requires that a package is not selected in the dataset definition) and then lock it. Specified and unlocked in the dataset connection: If you specify the planning package in the dataset connection (which requires that a package is not selected in the dataset definition) and leave it unlocked.436 - . 4. Repeat the last two steps for all the version ranges (otherwise you will not be able to save or load data). available under . layout. „ „ „ In the dataset definition: If you specify the planning package in the dataset definition. The version of a dataset connection can be specified in two different ways: „ „ On the individual dataset connection in the Co-models view for the simulation. and package it should connect to. the SEM Dataset needs information about the planning area. These characteristics will be used as version ranges when you work with the simulation. Select the version you wish to use in the Version column for the various available version ranges. The version is available for selection when loading or saving external data. 5. the user is allowed to select a different package when loading or saving data by clicking Load… or Save…. While the planning area. each dataset definition can use its own individual package when connecting to SEM. In the External Data… dialog box when loading or saving data. and layout must be specified in the dataset definition itself and defines large parts of the dataset directly. and a change in the dataset definition will affect all the dataset connections. provided it has not been locked in the dataset connection. level. the package and version may be selected in different ways. 2. Right-click the Connection of SEM Dataset in the Co-models view. the same planning package will be used for all dataset connections that use the dataset definition. it will also require a version to be selected before data can be read or written. Click Apply to save the changes. you can assign range characteristics to the header area. or OK to save the changes and close the dialog box. select the corresponding lock option in the list. To lock the selected version element. The version will decide where in the InfoCube you save your data. Specifying the package The planning package can be specified in three different ways. In addition. To set (and lock) a version for a dataset connection: 1. and select Properties on the shortcut menu. If the dataset also contains version ranges. each dataset definition can use its own individual package when connecting to SEM. Allow the Simulation User to Specify Package and Version When connecting to SEM-BPS. It cannot be changed for each dataset connection independently. 3. level.Set and Lock Versions in the SEM Dataset When setting up the planning layout that the SEM Dataset will use when connecting to SEM-BPS.

the dataset connection will always use this version when loading and saving data. . 10 min (default). In addition. 5 min. Studio will keep the connection to the SAP system open until you manually close it. 20 min. leave the package field empty in the dataset definition. and you must identify yourself with your username and password. 2.437 - . the dataset connection will use this version as the default version. Specified and unlocked in the dataset connection: If you specify the version in the dataset connection and leave it unlocked. available under External Data… Thus.External Data… Thus. and select the timeout interval from the submenu. The next time you need to connect to SEM (to save or load data. 1. to allow the user to specify the version when loading or saving data to and from SEM. specify the default version in the dataset connection. specify the default package in the dataset connection. etc. or Never. you can disconnect Powersim Studio from SAP.). Right-click the SEM Connection icon in the system tray (on the taskbar next to the clock). You may also allow Studio to automatically log you off after a given time period. and leave the field unlocked. „ „ Specified and locked in the dataset connection: If you specify the version in the dataset connection and then lock it. the user is allowed to select a different version when loading or saving data by clicking Load… or Save…. Select Timeout Settings on the menu that appears. Right-click the SEM Connection icon in the system tray (on the taskbar next to the clock). If you haven't manually logged off the SAP system within the specified timeout interval. Specifying the version The version that the SEM Dataset uses when writing or reading data to or from SEM can be specified in two different ways. Select Log off on the menu that appears. Studo will automatically log you off. 1. and leave the field unlocked. 2 min. 3 min. If you select Never in the submenu. Disconnect Powersim Studio from SEM When you have synchronized your dataset connection with SEM-BPS. Available options are 1 min. to allow the user to specify the package when loading or saving data to and from SEM. 2. a new connection will be opened.

much in the same way as working with runs in projects in Studio. When you are running the simulation and varying input parameters to study their effects. There are two ways to enter Presentation Mode. A simulation game can be opened again by double-clicking the file in Windows Explorer.sig). Finally. etc. you can double-click the project in Windows Explorer. The Presentation Mode acts pretty much like a browser. you cannot switch back to Design mode. Note! Before you can switch to Presentation Mode. This allow your users to save interesting runs for later use and use the as reference data. controls. Studio features three various modes for you to run your project in. and study the results.sipfile).Utilizing Modes in Studio Since you have various needs based on the status of the project.sig or *. when you have created a simulator interface for your simulation.438 - . you must define the appearance of the mode in Project Settings on the Project menu. objects. The diagram will be in read-only state. the . The Design Mode allows you to edit and create your model using variables. The Presentation Mode itself is a single-document interface (SDI) where the Project Window. is only available in the Enterprise edition of Studio. where the user can run the simulation. preventing yourself from accidentally making changes to the model. Details Window. Note! Executive Authoring. you can run your project in User Mode. the ability to create simulation projects that can be opened in the Executive edition of Studio. where the user is allowed to browse and play through your simulation in a way specified by you. If you have specified that the simulation project will start up in Presentation Mode. and all other simulation-oriented development aids have been removed. you can let your users run the project in Presentation Mode. play with input values. allowing you to test your simulator before you publish it. You can save your simulation runs in Presentation Mode in Simulation game files (*. or by opening it clicking Open in the Presentation Toolbar. There is only one toolbar available. About the Presentation Mode A Simulator Browser The Presentation Mode can best be described as a "simulation browser". Note! If Presentation Mode is opened in dedicated mode (by double-clicking a *. You can switch to Presentation Mode at any time while you work in Studio. and it will automatically open up in a dedicated Presentation Mode.

sig). By using controls. Studio also allows you to customize both the icon and caption used for the Presentation Mode. the Hyperlink object may also be used to launch external files. etc. save the your simulations in Simulation Game Files (*. This enables you to create a simulator where your users can save their results when they find interesting decision parameters. What is Executive Authoring? Note! This functionality requires an Enterprise license. only projects created using an edition of Studio featuring Executive . The picture below shows how a simple simulator interface might look when viewed in Presentation Mode. you can create an attractive user interface on top of your simulation. visit web pages. or by double-clicking a simulation game file. The toolbar contains browser-buttons like the ones we know from web browsers. send e-mail messages. freeforms. While all simulation projects might feature a Presentation Mode setup (except projects created in the free Express edition of Studio). You can. which allow you to navigate in the simulator. In addition to provide interdiagram jumping. Tip! You can utilize the strong capabilities available in the Hyperlink and Bookmark objects to further increase the functionality of your simulation interface. as well as the active run and the current state of the simulation. frames. hyperlinks and bookmarks. for example. however. should you wish to. These files contain a reference to the simulation project.Presentation Toolbar.439 - . you will not be able to switch back to Design Mode. Simulation Game Files If Studio is opened in Presentation Mode (also called dedicated Presentation Mode). Studio will open in dedicated Presentation Mode if you start it by double-clicking either a simulation project that is set to open in Presentation Mode.

The list below describes some of the options available for you when creating your simulation. bookmarks. Remember to make all reference runs that are going to be visible in Presentation Mode public. The Executive version will always start up in dedicated Presentation Mode. that you do not implement hyperlinks that makes the user jump inadvertently from one simulation to another! . Restricting the input range and making sure the controls can automatically scale themselves will avoid the user to create scenarios where the data exceeds the scaling of value axis and table cells. Switching to User Mode allows you to test controls and hyperlinks as they will appear in Presentation Mode. and removes unnecessary toolbars and menus. and controls to create user interfaces for your simulator. however. as described above. Using index variables to index parameters in controls is an elegant way of simplifying the user interface. is a convenient way of sharing your simulator with others. Also. enabling the various simulations to display different scenarios and time horizons. more a testing environment that you can switch to while creating your simulator. Create a Simulator for Presentation Mode The Presentation mode can be utilized to create a stand-alone simulator. while the Presentation Mode changes the appearance of the entire project.Authoring can be opened using the Executive edition. By creating a simulator home page you can easily create links that jump to various diagrams within different simulations. This allows you to create simulators that are tailored to different user groups and decision scenarios but still have only one model source. and cannot inspect the underlying model unless you grant them access to do so. run it. Each simulation can contain its own simulation settings. Using the Enterprise edition and then distributing the simulator using the Executive edition. As you will see. however. The Difference between User and Presentation Modes The Presentation Mode gives you a browser-like presentation method for your simulation. The User Mode is. The end-user can open the simulator. and control external datasets. By using private diagrams. You can thereby switch your simulator interface to User Mode to allow easier access to controls and hyperlinks. User Mode will only affect the current diagram. A carefully designed user interface makes it easy for the user to browse the simulation using the browser capabilities available in Presentation Mode. Although the simulator runs inside Powersim Studio. without changing the user interface. the Presentation Mode changes the interface of Powersim Studio completely. Make sure.sir) that are previously saved in Studio (not in Presentation Mode). Create Flexible Models: Make sure that your controls can cope with the results produced by the simulation. without performing changes to the original simulation project. The user can access only the parts of the simulation project that you have specified. it appears to be a stand-alone application with its own interface and help system. while keeping your model diagrams in Design Mode. save and load simulation runs. Use Reference Runs: Reference runs that can be displayed alongside the current simulation results enable your users to quickly see the effects of changes compared to the known scenarios. Reference runs can also be loaded from files (*. ! ! ! ! User Interface: Use hyperlinks. Utilize Multiple Simulations: Powersim Studio allows you to create several simulations for each component. you can also create customized user interfaces for each simulation.440 - .

and specify the window on the Presentation Mode Setup property page. it will open the simulator in Studio's Presentation Mode. The user may save in the middle of the simulation. Click Toggle Design Mode. Click Presentation Mode. When the user clicks Help. obviously). Switch to Presentation Mode You can switch to Presentation Mode in two different ways: 1. and load the state of the simulation at the time it was saved. Note! When Studio is in Run mode. you will not be allowed to switch mode. Create the help system in HTML files in the same folder as your simulation project (like a miniature web site).ico) on your system. The simulation will always be opened in Presentation Mode when running this version. Studio is in Run mode. The state of the button shows the mode of Studio: ! : If the button is depressed. To specify a different default window. Hit F5 on your keyboard. Remember to include it with your simulator when you distribute it! Distribute your Simulator in Studio Executive: If you create your simulator in an Enterprise version of Studio. 2. A game file contains a "snapshot" of the simulator (and all its simulations) at the time when the game was saved. ! : If the button is not depressed. Toggle between Design and User Mode The Design mode allows you to make changes to your model. Implement Dedicated Simulator Help: You can create your own help system that will open when the user clicks Help in the toolbar. An icon must be saved as an icon file (*. Studio is in Design mode. you can distribute the simulator using Powersim Studio Executive. and name the starting page by the same file name as your simulation project (except the file extension. select Project Settings on the Project menu. and opening the file again to start at that particular time and state. Add a Simulator Title and Icon: You can add a customized title for your simulation under Project Settings on the Project menu. .! ! ! ! Use Game Files: Games files (*. This is a specialized simulation player provided by Powersim. When you doubleclick the file. To toggle between Design and User mode: 1. the "help web" will be automatically opened in the default HTML browser selected for the system. Game files can also be used to share interesting simulation runs between several users. You can also specify an icon to replace the default Powersim Studio icon in the titlebar. You can only play the simulation and provide input to the simulation through controls.441 - .sig) allows you to save a simulation game. Note! If you have not specified a home page for the Presentation Mode. you are not allowed to make changes to the structure of the simulation model.

Specify a custom icon and caption to appear in the titlebar when the project is viewed in Presentation Mode. This is the window that will be presented when Presentation Mode is entered. select the Start up in Presentation Mode option. Note! The Presentation Mode button is only available if you started Powersim Studio in Design Mode. Tip! You can use passwords to protect your simulation project from viewing and/or editing. 2. Select the Start up in Presentation Mode option. Click the Presentation Mode Setup tab. 3. Note! The icon must be an icon file (*. Navigate in Presentation Mode When your simulation project is supposed to be viewed in Presentation Mode. 3. the button will not be available to the user. If the simulation project is protected against edit access. 4. By applying different passwords to different levels of protection. Click Presentation Mode to switch back to Design Mode.442 - . Select Project Settings on the Project menu. Select Project Settings on the Project menu. Specify the default startup window in Presentation Mode Home Page. 5. it will be automatically presented in Presentation Mode. 1. When the project is opened. you can ensure that only authorized users run and edit the model. 2. you should implement . Click Presentation Mode Setup. Start Project in Presentation Mode To start a project in Presentation Mode: 1.ico). If you launch a simulator by double-clicking a file which starts directly in Presentation Mode. If you would like the project to automatically start up in Presentation Mode. Specify the Presentation of a Project You specify the Presentation Mode for a project on the Presentation Mode Setup property page. you must enter the correct password to unlock the project.Switch to Design Mode from Presentation Mode To switch to Design Mode from Presentation Mode: 1. and not a bitmap picture.

including the state and available history for all simulations. and you load a simulation project (by double-clicking the simulation project or game file in Windows). Click Open on the toolbar.navigation means for your users to take advantage of. Select the file you wish to load.sip. When the user double-clicks a game file. This works exactly as you would expect in web browsers. you build a structure of your simulator in much the same way as implementing web pages. Add and View Project Documentation in Presentation Mode There are several ways of adding documentation to your simulation project: ! ! ! You can use frames with text and pictures to explain and illustrate your simulation to your users. 2. 2. They also allow you to save different versions of the simulator that the user can load in Presentation Mode. Example: If your project is named MyProject. . You may of course also load simulation run files (*. and link to other pages as you find necessary.sir) files directly in Presentation Mode. You can use the Hyperlink object in Studio to link your simulation project to html files (or other files containing the documentation) on the computer or on the web.htm in the same folder. To Load a Simulator Game File 1.sig) allow your users to save and load simulations when using your simulator in Presentation Mode. 3. Game files allow your users to save a simulation for their own reference. The html file will be opened in the default browser when the user clicks Help. To Save a Simulator Game File 1. and share interesting simulation runs with other users of your simulator. Click OK. Note that this file can be the homepage of your documentation set. Studio will launch the simulator in Presentation Mode and load the saved game. Click Save on the toolbar. Tip! Reference runs can also be saved internally in the simulation project. save an interesting state that they can revisit later. you should place a file named MyProject. the Presentation Mode's browser buttons Back and Forward will be activated. Use Game Files in Presentation Mode Game files (*. When the user has visited one bookmark.443 - . This happens when you have specified that the simulation project should always be run in Presentation Mode when loaded. A game file can only be saved when Studio is opened in dedicated Presentation Mode. allowing your users to navigate back and forward through their browser history. You can add a html-file with the same name as your project in the same folder. They must be marked as Public to be available in Presentation Mode. By using hyperlinks and bookmarks. The game file will contain a "snapshot" of the simulator. Specify the file name to save the file to.

3. or by opening it directly in Presentation Mode. 2. . The simulation game is saved in a simulation game file (*. Back and Forward The Back and Forward buttons let you navigate through your browsing history in the same way as similar buttons in a web browser. The Presentation Toolbar Note! This toolbar is only available in Presentation Mode! The Presentation Toolbar allows you to navigate through your simulator interface. Select the Start up in Presentation Mode option (this will make your project automatically open in Presentation Mode). You can load the game file later by double-clicking it in Windows Explorer. The user will now be able to open the project in Presentation mode.sig). Enter a password for the Full Access level of protection. Tip! By protecting both the Run Access and Full Access levels in Studio. Follow the procedure below to protect your model: 1. To be able to edit the model. Select Protect on the Project menu. but will be prompted to enter a password to switch to Design Mode to see the underlying model. Protect Your Project in Presentation Mode By applying security settings to your simulation project. you can prevent your simulator users from accessing the underlying model. and select the Presentation Mode Setup tab. 4. The button is only available when Studio is started in Presentation mode (by double-clicking either a simulation project or a simulation game file).444 - . and also allows you to switch back to Design Mode. the user must also enter the Full Access password. Click OK. you can make sure that only licensed users (who know the Run Access password) can open the simulator in Presentation Mode. Open Simulation Project or Simulation Game Save Simulation Game File allows you to save the decisions and the simulation you have done in the current project. containing a link to the active project. Select Project Settings on the Project menu. Open Simulation Project or Simulation Game Open Simulation Project or Simulation Game File allows you to open another simulation project or a simulation game file into Presentation mode. a list of the most recently visited windows will be displayed. By clicking the small arrow next to Back. 3.

If the project is protected.Home Brings you back to the default window of the simulator (as specified in the Presentation Mode Setup property page). Reference Data Allows you to select reference data to be presented in controls. Play. if one exists. Help Launches the project documentation. Reset. . and play stepwise. a generic help for Presentation Mode will be launched. play and stop it. Play Stepwise Identical to the buttons on the Simulation toolbar. Presentation Mode Switch off Presentation Mode and return to Design Mode of the simulation project. restore permanent variables. Advanced Commands The button opens a submenu where you can work with cue points. and work with external data. autoscale. you must enter the correct password to unlock the project. these commands let you reset the simulation.445 - . Zoom Allows you to zoom the current view in or out. Otherwise.

currency symbols. Tip! You can hide the language prefix from the diagrams if you wish to.Work with Languages Views in Powersim Studio support a range of different languages to make it easier for you to share your work with colleagues who speak other languages than yourself. and so on. such as English (United States). However. If a text doesn't exist on the selected language. This means that within one language group. the English name is used with a prefix of '_ENU_' when the language is changed to German (Germany). the selected language also influences the decimal and list separators. The table below shows a simple example. number formatting. the text of another language will be displayed instead. The first row of the table displays the original model (created in English (United Kingdom)). unless you are using it as the name for the same variable. Thus. with an added prefix. in several languages for each simulation project. (b) Since there is no name for the variable in German (Germany). etc. and the . a variable can obviously have two different names in two different languages of the same language group. if a string is already used in one language of a language group. (c) By editing the name again. However. it cannot be used in any of the other languages of that language group. You select the language for the entire simulation project. The names and texts will be saved in all the different languages you have entered. the same name can only be used to identify one unique variable. and English (Jamaica). In addition to controlling the names and texts. you must also be aware that definitions must be entered using the separators for that language.446 - . (a) The variable is named 'Inventory' in English (United States). should you need to. This allows you to enter variable names.. Thus. where four variables are named in two different languages. All the languages belonging to the same language group share the same namespace in Studio. comments. by deselecting language prefix on the View menu. a German name for the variable is added to the simulation project. This feature is useful if you need to translate the simulation project. When you load a simulation project. Studio will automatically select a language for your project. English (United Kingdom). Language Groups and Common Namespaces All the languages of the same "family" belong to the same language group. you are free to specify the language explicitly for each open view. when you have changed languages. documentation.

and since all the names in both languages are either unique or identify the same variable. Salg Adferd 'Pommes frites' Chips English (United States) English (United States) Norwegian (Bokmål) The model is localized to Norwegian (Bokmål). it will be selected (or the one with the lowest sublanguage ID if more than one sublanguage exists). . The list below summarizes the criteria used in this selection process. New windows will use the same language as the currently active window. If another language in the same language family of your default language is present.447 - . even though it is used to identify another variable. The ones that are not accepted by Studio are written in red text. an error message will be produced for that name. the language that you used at that time will be selected (provided you are among the ten last users of the project). If you have worked on the project earlier. it will be selected. Your default (system) language will be selected if it is present. Remember that this only applies to the first window that is opened for the project. If only one language exists (in addition to Neutral). 2. all names are accepted. 4. Sales Behavior 'French Fries' 'Potato Chips' The model is localized to US English. 1. Chips is accepted as the name for the fourth variable. Language English (United Kingdom) First Second Variable Variable Name Name Third Variable Name Fourth Variable Name Comment Sales Behaviour Chips Crisps The original names of the variable. The others are valid and will be accepted. but since the name Chips is already used in English (United Kingdom). Sales Behavior 'French Fries' Chips The model is localized to US English. and since Norwegian doesn't belong to the same language group as English (United Kingdom).next two rows displays two different suggestions of names in English (United States). 3. Automatic Language Selection When you open an existing simulation project Powersim Studio will attempt to select the language that comes closest to the language you have selected in Regional Settings on your computer.

Examples of such strings are unit names (at least for standard ST units) and strings built entirely by field codes. Note! We recommend that you use a "real" language for all strings that are related to a language. decimal. However. and use Neutral only for strings that are common between all languages. If a string exists in the Neutral language. it will always appear as 'My Variable' for all languages that don't already have a name defined. (semicolon) Decimal . (punctuation) Thousand . 6. (comma) . For the Neutral language. The table below provides a few examples on how this automatic language selection works.5. if you enter the variable name in the Neutral language. the list. The variable name 'My Variable' created in English (United States) will always be shown as '_ENU_My Variable' in all other languages. it will be used for all languages where the same string is not defined. unless the language prefix is turned off. The table below shows the separators used by the Neutral language. the language with the lowest sublanguage ID will be selected. one of the existing languages will be selected. If all else fails. regardless of the options you have selected in Regional Settings on your computer.448 - . and thousand separator will be constant. If all the languages in the project share the same primary language ID (for example English). System Language Languages in Project Selected Language English(US) English(US) English(UK) English(US) English(US) Greek Greek English(US) English(UK) English(Australia) German(Germany) English(UK) English(US) German(Common) German(Germany) German(Germany) German(Austria) German(Luxembourg) English(US) German(Germany) Greek Norwegian(Bokmal) Finnish One of the languages will be selected. The Neutral Language The Neutral language is used in Powersim Studio to give you a possibility of creating language independent strings. or the string is already defined on the selected language. Separator Sign List .

The Common Languages The Common languages belong to a language group and will define strings that will appear for all languages of that language group. and they will only appear in your simulation project if it already had strings in this language when it was opened. To reset the language selection of the view to the project default: 1. all the texts that you enter are stored only on the language that was selected. the language setting will be reset. list separators.449 - . Common languages are now not used when creating simulation projects anymore. and will be displayed in the titlebar of the view. and click OK. Select the new language in the Language box on the Project menu or on the toolbar. and other settings found in Regional Settings on your computer. which replaces the need of the common languages. Toggle Language Prefix on/off When you create your model. If you close the view. The language selection is only used for the current view. The language selection is done for the entire simulation project. currency symbols. Select the language you wish to use for the view in the dialog box. Select Language on the View menu. Select Language on the View menu. and you don't need to select the language again when switching views. On the submenu. Set Language for a Project To change the language of a project: 1. language . 2. click Select… 3. and other settings found in Regional Settings on your computer. We recommend that all new simulation projects utilize one of the "real" languages available for selection. Select Automatic on the submenu. In newer versions of Studio. Explicitly Set Language for a View You can override the language selection of the project for a single view. if you wish to. 2. Note! Be aware that the selected language also influences decimal separators. 1. languages belonging to a language group will share the same name space. list separators. If you share your model with a user with a different language setup than yourself. Note! Be aware that the selected language also influences decimal separators. currency symbols.

450 - . and select Properties on the shortcut menu. Hidden strings. and select the new language for the view by selecting Language on the View menu. 9. 6. Tip! It is recommended that you do all the development of your model in your own language to avoid confusion. ! ! Select Language Prefix on the View menu to display language prefixes. unit. or right-click them. Just enter the translated texts in the same way as for the original controls. open two windows each as described above. Translate the visible strings in the diagram by renaming them in their new language (select them and start typing). must be translated in the Properties dialog box (or in the Equations View of Details Window. You therefore have the ability in Studio to turn off the language prefix. Select the window where you will perform the translation. 1. 2. 4. Create a new window by selecting New Window on the Window menu. This is very useful when you are translating your model. list separators. To open the Properties dialog box. and translate them in the Properties dialog box. 10. Arrange the windows in a practical way. Repeat the above steps for all objects in the diagram. Note! The language prefix will not be hidden in definitions (variable. Controls. currency symbols. double-click the objects. can be translated directly. To translate global and local ranges. or range). and write the translated text. 5. (The option is selected by default. Switch to the new language window by selecting the identical object here. such as documentation and notes for variables and units. since decimal and list separators also follow the selected language. The selected language still influences decimal separators. Below is a suggested procedure for translating your project. The range . you can copy the text. Click Apply before selecting the original language again. Translate a Project The built-in language support in Powersim Studio makes it easy for you to translate your simulation project to other languages. A check mark will appear in front of the option to indicate that the option is turned on. 11. if you prefer). To translate global and local units. Therefore.prefixes will be displayed. The various fields will be empty if a text doesn't exist in the selected language. 7. or your changes will get lost. but it can be annoying and tedious in some cases. 8. Language prefixes will still be shown in variable definitions and in the Details Window and Equations View. either manually or by using the commands on the Window menu. If you want to. The texts will now appear with a prefix (if Language Prefix is not turned off) to indicate that they do not exist on the currently selected language (provided that the project has not been translated yet). select the object in the window showing the original language. A check mark will disappear to indicate that the option is turned off. click Select… and then select the language you wish to translate to. like the Time Graph and Table Controls. Note! The selection above only affects the prefix of strings viewed in diagrams. open two windows each as described above. and other settings found in Regional Settings on your computer. 3.) Deselect Language Prefix on the View menu to hide language prefixes.

you will change the language for the entire simulation project. while the range elements are translated in the Rename Elements dialog box.451 - . available on the shortcut menu of the range itself. Note! If you use the Language box available on the toolbar or on the Project menu. and not only for the current view. .names can be translated directly in the view.

and especially large ones. The model described below shows a model structure where several variables are undefined. Therefore. you should always start by searching for problematic variables. Studio's extensive search capabilities allows you to search not only for given variables in both equations and diagrams. This might save you a lot of time and energy. Thus.452 - . and not caused by linked variables being undefined. By selecting C or D as the variable in the Go To Variable dialog box and selecting the Problematic Variable(s) for Selected Variable option. they are not undefined because one of their linked variables are undefined (in which case the linked variable might be problematic instead). aux aux aux aux A B C D = = = = undefined undefined A + B C / 10 // A is left undefined // B is left undefined Given the definitions above. Studio . When you are debugging a large model. these two variables are problematic variables for both C and D. problematic variables are sources of other variables being undefined. A variable is called problematic when the reason why it is undefined is given entirely in its own definition. and then search for the corresponding problematic variables. but also for other variables that are defined by the given variable. but they are both still undefined since variables A and B are undefined.Finding Variables in Studio When you are creating models in Studio. About Problematic Variables Problematic variables are variables that are undefined in themselves. Locating variables that are the "source" of trouble for other variables is often a tedious task. Studio now allows you to select a variable. we immediately conclude that both variables C and D are defined properly. you will often need to search for variables in your project.

2. aux A = 10<<m>> aux B = 4<<m>> Find Problematic Variables Problematic variables represent variables that cause problems for other variables. Defining A will fix only part of the problem. as displayed below. 3. or select 2. 4. if you search in Diagrams). . Defining B rules out the problem. When resolving problems in your model. Select the Variable named under Go to what. Click Go To Variable on the toolbar. or select Go To… on the Edit menu. Select the variable you wish to find in the Enter Variable Name combo box (or type the name manually). . Click Go To Variable on the toolbar. To find problematic variables in your model: 1. you should start by locating the problematic variables and define them properly. and select the Problematic option under Enter Variable Name to display only problematic variables in the Variable list. Select Problematic Variable of under Go to what. 5. Select the scope of the search under Look In (and under Scope. and searching for problematic variables will disclose B as the source of the problem. as can be seen in the illustration below.will locate A and B for you. Click Next to find the variable.453 - Go To… on the Edit menu. You can also search for the problematic variables of an undefined variable: 1. unit m = __METER // Added to Global Units aux A = 10<<m>> // B is left undefined aux B = undefined C and D are still undefined.

You can Go to Next Variable to view the next occurrence of the variable. Click Next to find the variable. Find Undefined Variables To find an undefined variable in your model: 1. 5. You can also click Go to Previous Variable on the toolbar. or select Go To… on the Edit menu. if you search in Diagrams). 4. 4. Select the variable for which you wish to find the corresponding problematic variables. Find Variables by Definition Studio allows you to search for variables defined by a given variable: 1. and Go to Next Variable and Shift-F3 to find the previous variable. 3. 2. Select the variable you wish to find in the Enter Variable Name combo box (or type the name manually). Studio will locate the next variable (if any) that is defined by the variable that is currently selected. F3 to find the next variable. Select the variable you wish to find in the Variable list. 2. if you search in Diagrams). You can use the options below the list to filter it. in Enter Variable Name (or type the name manually). Click Go To Variable on the toolbar. Select the scope of the search under Look In (and under Scope. if you search in Diagrams). Select Variable named under Go to what. 6. Select the scope of the search under Look In (and under Scope. or click Previous Variable to go the previous occurrence of the variable. if necessary. If you hit CTRL-F3 . 5. simply click F3 or click Go to Next Variable on the toolbar. and select the Undefined option under Filter to display only undefined variables in the Enter Variable Name combo box. Click Next to find the variable. 6. F3 to find the next variable. Click Go To Variable on the toolbar. Click Next to find the variable. Tip! Hit Ctrl-G to open the Go To Variable dialog box. To find the next problematic variable for the selected variable. Select Variable(s) Defined by Selected Variable under Go To.3.454 - . . select the Undefined option under Enter Variable Name. 5. Go to Tip! Hit Ctrl-G to open the Go To Variable dialog box. and Shift-F3 to find the previous variable. Tip! Hit Ctrl-G to open the Go To Variable dialog box. and Shift-F3 to find the previous variable. or select Go To … on the Edit menu. Hit F3 to find the next variable (if any). Select the scope of the search under Look In (and under Scope. To display only undefined variables in the list. F3 to find the next variable. 3. 4.

equations. Click Go To Previous Variable or hit Shift-F3 to find the previous variable that matches your search. If there are other variables in the simulation project that are defined by the selected variable. 6. or the variable's problematic variables under Go to what. Click Go To Next Variable or hit F3 to find the next variable that matches your search. Click Go To Variable. . You can search in diagrams. Click Next (or Previous) to find a variable that matches your search. The located variable is highlighted. Go to Next or Previous Variable When you have performed a search.Find Variables Defined by the Selected Variable Studio allows you to easily find variables that are defined by the selected variable: 1. You can search for the selected variable itself. you will only find problematic variables in the list. Select the option that best suits your needs.. or both. Select the variable in the diagram that you wish to find in other variable's definitions. the selected diagrams. 5. or if you would like to run the search in all the available diagrams. you can easily find the next (or previous) variables that match your search criteria: ! ! ! ! Click Go To Next Variable to search for the next variable that matches your search. 3. Hit CTRL+F3. Select the name of the variable you wish to go to under Enter Variable Name combo box. You have three alternatives: ! Select Variable named to go to the variable itself. for other variables that are defined by the selected variable. and if you select Problematic. Hit F3 to search for the next variable that matches your search. Select the scope of the search. Go To a Variable 1. If you wish to search in diagrams. only undefined variables will populate the list.455 - . You can use the three available options under Filter to filter the variable selection available in the combo box. If you select Undefined. 4. 2. you must also select whether you wish to search only the active diagram. Studio will locate them for you. ! Select Problematic variables of to go to variables that cause problems for the definition of the selected variable. 7. Hit Shift-F3 to search for the previous variable that matches your search. 2. ! Select Variables defined by to go to variables that are defined by the selected variable. Click Go To Previous Variable to search for the previous variable that matches your search.

The illustration below gives an example on what an event might look like. You are allowed to use any standard message box in Windows. you connect it to a logical variable in your simulation project. you can specify how the simulation should proceed. Message Box This action displays a message box when the condition is met. Types of Event Actions There are currently three action types available in Studio. the event will be triggered. You can use these actions to implement various types of interactivity in your simulator. if you prefer). You author the title and contents of the message box freely. and Set Parameter. Message Box. corresponding return values marked with . An event is composed by several actions.Work with Events You can use events to implement interactive simulations. When the logical variable becomes TRUE (or NAN. The actions and their properties are summarized in the table below. You can use these return values to provide .456 - . are automatically inserted below the action entry. When you insert a Message Box action in the Events tree. There are currently three action types available: hyperlink. Events are added on the outer level. available by double-clicking the Events entry in the Project Window. and actions added below each event to achieve the desired effect. When the event is triggered. with various button arrangements and icons. Example of an event in Powersim Studio. When you create an event. You work with events in the Events View.

You can select Description between the standard button configurations available in Windows. you might get different return values. it will be used without any changes. Using the return values you can allow the user to select between several options and implement them by inserting actions below the return values. These are listed below. Ignore OK Options OK. in this case OnOK and OnCancel can be used to program various actions depending on the user input.457 - . For a Yes/No message box. it will be marked by to indicate that the message box will not return that value. the return values will be OnYes and OnNo. This way the actions that were assigned to the return value are not lost if you change the type of message box. Note! The return values will correspond to the type of message box you have selected. as illustrated below. and you should copy or move the actions to the appropriate return value where they belong. <No Icon> Error: Options Information: Question: Warning: . and so forth. Cancel Yes. You can select between the standard Description message box types available in Windows. Abort. The return values. Type The button configuration of the message box you want to display. No Yes. Retry. The table below describes the properties of the Message Box Action. The return value will of course never be executed. Cancel Icon The type of message box you want to display. If you change the button combination for the message box. No. If the return value no longer exists and has actions. These are listed below together with the icon that they feature. If the return values still exists for the altered message box.actions based on the input from the user. Cancel Retry.

or another URL when the action is executed. Parameter Description The parameter you wish to change when the action is executed. Tip! You can use the hyperlink action to launch files. The action is pretty straight-forward to use. The table below describes the various properties of the event. Event Properties When you create an event. or go to a different part of the simulation project. You simply select the target of the hyperlink. window. This is useful. The table below describes the properties of the Set Parameter Action. and that's it. Value Description The value you wish to assign to the parameter. Destination Description The destination that will be activated when the action is executed. . You can access these properties in the Event property page. Defining the hyperlink action is more or less identical with defining the hyperlink diagram object. and enter the value you wish to change it to. available on the shortcut menu when right-clicking the event in the Events View. as it allows you to prevent the event from happening without having to delete the entire event or alternatively redefine it.Title Description The title of the message box. The table below describes the properties of the Hyperlink Action. as mentioned above (under Message Box). you can control the value of a variable depending on the user input. Set Parameter The Set Parameter event allows you to change the value of a parameter in your model depending on a whether a condition is met or not. Message Text Description The message (body) text of the message box. you must also connect it to a variable containing the condition deciding when the event is triggered. You can also specify how the simulation should behave when the event is triggered. Hyperlink The hyperlink allows you to jump to a bookmark. send e-mail. The message box will automatically adjust to the size of the message text. visit web pages. You can also disable the event.458 - . Simply select the variable you want to change. Tip! If you use the Set Parameter action in combination with the Message Box action.

and gives you the opportunity to "turn off" an event without deleting it. Right-click the event. You then proceed to define the event on the property page. It will not be triggered every time step. By selecting this option you can prevent your user from running the simulation more until Prevent Play While Condition the input parameters are "correct. In the Variable box. if the value of the variable doesn't change. Once the event is finished. unless you have other events that prevent the simulation from proceeding (see above). you can define it: 1. Add an Event You can add an event to your simulation in the Events View: 1.Property Description Condition Variable The variable that the event "listens" to. This variable must be a LOGICAL variable. select the variable containing the condition that you want to connect the . It will not be triggered every time step. after being FALSE (or NAN). Event Miscellaneous Disabled This option disables the event. The event will be triggered when the value of the selected variable becomes NAN. In the Project Window.459 - . Trigger on TRUE The event will be triggered when the value of the selected variable becomes TRUE. Right-click inside the view. a message box with the text entered under Prevent Play Message Is TRUE will appear. double-click Events to open the Events View. Note that the event will not be triggered again until the variable Trigger on NAN becomes NAN again. Prevent Play Message The Prevent Play Message will appear if the user attempts to play the simulation while the Condition is TRUE. and select Add Event on the shortcut menu." If your user attempts to start the simulation. if the value of the variable doesn't change. Define an Event When you have added an event to the Events View. after being TRUE or FALSE. the event will attempt to start the simulation again. 2. Note that the event will not be triggered again until the variable becomes TRUE again. You can continue the simulation immediately. 2. Try Playing Simulation After Normally this will work fine. Simulation Control Pause When Condition Becomes TRUE The simulation will be paused when the condition becomes TRUE. and select Properties on the shortcut menu. and add actions to it. The simulation cannot be started until the Condition is FALSE.

Enter this message under Prevent Play Message. Add an Action to an Event When you have added an event to your project. prevent the simulation from playing while any actions are being executed. event to.460 - . You can have the event stop the simulation. Right-click the event. Tip! You can change the order of the actions within an event on the action's shortcut menu. if you wish to move the event down in the list: ! Right-click the event and select Move Down. or add new ones. Click Expand to see the newly created actions. . as actions are processed in the order they appear inside the event. Select the action you wish to add on the submenu. Alternatively. This might affect the final result of the events. This option is ideal when you want to stop the event from occuring but avoid deleting it from the project. You have three options: ! Hyperlink Message Box ! ! Set Parameter 3. To move the event up in the list: ! Right-click the event and select Move Up. 2. 4. prevent the simulation from playing as long as the condition is met. If you choose to let the event prevent the simulation from playing while the condition is TRUE. You can disable the event if you don't want it to be triggered when the condition is met. Tip! Although several events may very well share the same condition. you should also enter a message that will be presented to the user if she tries to run the simulation again.3. Change Event Order You can manually change the order of the events. You should then proceed to define the actions. you can add actions to it: 1. You can also add actions to return values from Message Box Actions. Select the way that the event should handle the simulation. and have the simulation run again once the event is finished. Select whether the event should be triggered when the selected variable becomes TRUE or NAN. This allows you to control the order of execution if two events have the same condition. 6. 5. Note that you can combine the various simulation options. This will prevent any execution order conflicts. and select Add Action on the shortcut menu. the same effects can normally be achieved by adding more actions to one event.

This allows you to to keep unused events in your project without triggering them every time the condition is met. or hit Del on your keyboard. Delete an Event To delete an event: 1. is not possible. To move the action up in the list: ! Right-click the action and select Move Up. 2. Tip! It is possible to disable an event in the property page. Right-click it and select Delete on the shortcut menu. As an example. Alternatively. 2. Note! You can only move actions on the same level.461 - . Select the action you wish to delete in the Events view. moving an action from under a return value of a Message Box action and up above the Message Box action itself.Change Action Order You can manually change the order of the actions for an event. or hit Del on your keyboard. Select the event you wish to delete in the Events view. Right-click it and select Delete on the shortcut menu. Delete an Action To delete an action: 1. if you wish to move the action down in the list: ! Right-click the action and select Move Down. which is crucial to achieving the effects you desire. This allows you to control the order of execution. .

and whether you wish to print equations. The variables are listed below the component they belong to. If you print the equations of a simulation project. but in most cases the meaning of the entry is rather obvious. If the unit . page break lines will become visible in your diagram sheet. Each defined object (variable. Tip! When you have changed the page or margin setup. local ranges and local units in all the components of the project. Although the printed equations might look a bit complex at first. be aware that it's not only the variable equations from the active component that is printed. aux An auxiliary variable. the syntax is rather self-explanatory. the document is printed in a specialized syntax. Although the printed equations might seem complex at first sight. enclosed by '{' and '}' (braces). This includes both global units and ranges. etc. in addition to global ranges and units. You can print the content of the active window by clicking Print. local ranges. The printed equations cover all variables. Entry Description mainmodel A component in the simulation project. it is a local unit. The equations are printed in a "C-like" syntax. as well as all variables. If the unit appears inside a mainmodel entry. The list is not complete. Syntax for Printed Equations When you print the equations from a simulation project. You control the scaling. unit. the syntax is fairly selfexplanatory. The properties of each object is listed below the object. level A level variable. and local units in all components.Printing a Simulation Project Studio allows you to print different aspects of your simulation project. but all equations in your simulation project. margins. The table below briefly summarizes the various entries in the equations syntax. A unit. as you will probably recognize from Java or C++.) appears in the equations list as an entry. The Print… dialog box allows you to select which diagrams you want to print. and orientation of the printed page in the Page Setup dialog box. model A submodel variable.462 - .

You can also select a range of diagrams to print: 1.unit (or autounit) appears inside a level or aux entry.463 - .3 def sinwave(1. unit. The entry represents a flow definition. the entry is named autodim. def The definition of a level. and then select All Diagrams.east. If the data type is automatically detected by Studio. Click OK to start printing and close the dialog box.south. inflow. Use the SHIFT or Ctrl key to select several . the entry is named autotype. range. A printed equation can look something like this: mainmodel Component1 { level distance { type real unit m init 1 inflow { def Production } } aux Production { autotype real autounit da^-1 autodim 1. or outflow.. outflow A flow out of a level.west note Represents the four directions. the entry is named autounit.electric current } range Regions { def north. dim (or autodim) The dimension of a variable. Click Print on the File menu. The entry represents a flow definition.. auxiliary. If the dimension is automatically detected by Studio.. note The note of an entry. If the unit is automatically detected by Studio. 3. range A range.90<<da>>) note Remember to connect to Sales. If the range appears inside a mainmodel entry. inflow A flow into a level. } } unit A { def __ampere doc Ampere . Select the tabs of the diagrams you wish to print. type (or autotype) The data type of a variable. } (. it is a local range. 2. it represents the unit of the variable.) Print One or More Diagrams To print the all the diagrams in the component: 1. doc The documentation of an entry. init The initial value of a level or constant auxiliary. Select Diagram under Print What.

. 3. 3. select or type how much space you want there to be from the right edge of the paper to the diagram. Tip! If you click previous settings. 6. 2. Click OK to start printing and close the dialog box. Under Bottom. Print on the Standard menu. Under Top.464 - . Under Preview you will immediately see the affect of any changes as you make them. On the File menu. you will print directly to the printer using the Print Equations 1. 3. Tip! You can print diagrams and equations at the same time by selecting both.tabs. Click OK to start printing and close the dialog box. 5. select or type how much space you want there to be from the left edge of the paper to the diagram. select or type how much space you want there to be from the top edge of the paper to the diagram. 2. 4. Select Print on the File menu. Click OK. select Page Setup. and then select Selected Diagram(s). 2. select or type how far from the bottom edge of the paper you want to position the footer information. and then click the Margins tab. Click Print on the File menu. Under Left. Select Diagram under Print What. 7. Select Equations under Print What. Under Right. You can print several copies by entering a number under Number of copies. select or type how far from the top edge of the paper you want to position the header information. you will print directly to the printer using the Set Page Margins 1. 8. select or type how much space you want there to be from the bottom edge of the paper to the diagram. Tip! You can print diagrams and equations at the same time by selecting both. Under Footer. 4. Tip! If you click previous settings. Print on the Standard menu. Under Header.

3. To fit the page to a given number of pages: 1. On the File menu. Click OK to save the page setup. Set Page Scaling You may reduce or enlarge a diagram to a percentage of the normal size. Enter the number of pages width and height of the printed diagrams. Under Scaling. On the File menu. 4. Select Page Setup on the File menu. 4. Click Page Setup on the File menu.Set Page Orientation 1. Under Scaling. Select the required format under Paper size. and then click the Page tab. 2. click the Fit to radio button. or fit it to a given number of pages. click the Adjust to radio button. 3. and then click the Page tab. and then click the Page tab.465 - . 3. Select Portrait or Landscape. Select or enter the percentage of normal size that you want your page to be. Click the Page tab. . 3. 4. 2. 2. click Page Setup. Click OK. To adjust the contents to a percentage of normal size: 1. Click OK to save the page setup. Click OK to save the page setup. click Page Setup. 2. Set Paper Size 1.

.

.

no Web www.www.powersim.powersim.com Powersim Software AS E-mail powersim@powersim.com .