Container / Constant
The container which can also serve as a constant is a passive block type that doesn't do anything itself except check to see if it is empty, part full or full for display purposes.
As a container it is operated on by A, B, D and F blocks which can fill and empty it. It therefore has an initial value to which it gets RESET when a run starts.
Note that empty is taken as contents (Value Vn) less than or equal to zero,
and full is taken as contents (Value Vn) greater than or equal to maximum contents, defined by Cn and cc.
Computable Constants
Any arithmetic block can serve as a constant, simply by switching it off. It will then freeze with its output value remaining fixed. This applies naturally to Add &, Divide %, Multiply X, Exponents E, Logarithms L, Sinusoids S, though other blocks can be frozen similarly. An exception is the Flux block which when off provides ZERO flux, and thus behaves like a switch controlling flow.
Computable Constants have two uses:
1. A block (or a chain of blocks) can be used to perform a calculation, combining several numbers by addition, multiplication, logs, exponents etc. and then immediately frozen to provide that value for the rest of the simulation.
In particular, this can be done to calculate values for a simulation then immediately switch the block off. Its value doesn't change even on RESET but making changes and letting it compute at least once will put the new value into the model. There is an exception in this, in that the flux block goes to zero flux (zero output) when switched off.
2. It can act as a source or recipient of flux (like a container C-block or Integrator I-block, without having its contents affected (effectively a zero source impedance device)
System parameters as C-blocks
The system makes its timing parameters available to the model by keeping a set of system timing blocks updated. On the diagram they look like constants, but change as they are updated while the simulation runs.
Thus:
Time , the independent variable
HoldNext , the next time to freeze (Hold) the model
GrNext the next time to grab data for the graph/osilloscope (and also the data file for the run).
are controlled by the running programme.
Other system parameters are:
Zero: The contents of block number zero and used as null input connector everywhere. Connections to block Zero are not shown
One: The contents of Block number One and used as unity wherever it is invoked as a connection. BUT links to block 1 are not shown.
Start: the value at which the independent variable starts.
Fintim: the final value for the independent variable (usually time) for the run.
GrDel: the interval between sampling for making Oscilloscope traces and recording tracks.
HoldStep: the interval between automatic HOLD actions.
ScaleOrgn: The base value for the rounded, scaled number display. Default is Zero
ScaleFactr: The scaling for the rounded, scaled number display . Default is 1. So numbers are simply rounded.
ColourMin: Base value for colour scale. Gives black.
ColourMax: Maximum value for the colour scale. Gives white. Range in between goes via red, orange.
The range is used as a default in the V-meter block in modes 3,4 .. coloured patches.
GrMinT: Minimum value for Graph (Oscilloscope) time axis.
GrMaxT: Maximum value for Graph (Oscilloscope) time axis.
GrMinY: Minimum value for Graph (Oscilloscope) vertical axis.
GrMaxY: Maximum value for Graph (Oscilloscope) vertical axis.
PI = 3.14159 etc.... (you can change it, just be careful.
For safety it isn't used in the default Sine block
All these other system blocks are given by the programme as defaults when starting up.
It is intended that they can be changed by the user, and the blocks can be moved around on the screen.
These are not updated by the running model, nor reset when using RESET to go to initial conditions.
Therefore to change them, you must change the current Contents/Value entry.
You can access all the timing data by rt-Click on either of the two clocks
at the bottom of the screen.
For example, to investigate the start of a run,
set a low value of FinTime then when the run stops and you decide it is OK to continue,
change Fintim and click [RUN] and it will carry on.
Changes will persist. They will be stored in the model file when you save your model.
C-Blocks in the users Model
C-blocks in the model can serve as containers or as constants.
However, as containers, they can be changed by A, B, D, F, J blocks moving contents in or out.
Therefore a C-block needs to be RESET for initial conditions.
It is RESET to an initial value, defined by the Dn connection and the dd parameter at the start of a simulation run.
If you have only provided a constant cc value for it, this reset doesn't matter.
So to make a temporary change, during a RUN of the model, without changing the initial value,
edit the Contents/Value.
To make a change for the next run of the model (after RESET), edit the Initial Contents.
If you want your change "now" and in the next run, change both entries.
Values in Use
A, B and D -type blocks need to connect to C-type blocks (or integrator, I types)
F (Flux) and J (Inductor) type blocks can link in to them.
If used as a simple constant, then the dd value is the one to fix as it can be left unchanged.
If the Dn connection is defined then whatever value its output has when RESET (initiation) takes place
will be added in to dd to define the starting value for the output of the C-type block.
As a constant, the container can be switched off (L-click on it) which makes its colour grey (less conspicuous
than the other, active blocks) and prevents the A,B,D,F,J blocks from changing its value.
As a Container, the Cn connection is used along with the additive cc,
to allow external control of the maximum contents.
Its An, Bn and Pn connections and aa aa, bb and pp are ignored.
| MJMcCann-Consulting
Help Index:
Index/Search
Background
Simulation Concepts
Continuous Systems
Discrete Systems
McSimAPN Structure
McSimAPN Operation
Using McSimAPN
Start McSimAPN
Save Model,data
Create Blocks
Run-Hold-Reset
Link Excel+VBA
PetriNet Block Types
A activity/action
B belt conveyor
C container/constant
D diverter(random)
Analogue Block Types
E exponents
F flux/flow
G function Generator
H hysteresis
I integrator
J inductor
K logic element
L logarithms
M memory
N note/label
O oscilloscope/graph
p not assigned
Q quantizer/rounding
R relay on/off
S sin/asin/atan
T timer/clock
U user link Excel
V visual voltmeter
W sWitch selector/MUX
X multiply
y not assigned
Z random (fuZZ)
& signed summation
% division/difference
@ access/move values
|