Menu

Using Minsky

High Performance Coder
Attachments
sinksource.png (1436 bytes)

Using Minsky

This is a placeholder for a proper user guide for Minsky. I'm not a user of Minsky, so can't really explain properly how it supposed to be used.

Quick Start

Minsky runs right out of its distribution directory. Either type "minksy" on the command line, or create a shortcut on your desktop to the minsky executable.

1 Select File>Open, load up one of the example models
+ Click the run button to start the simulation

Other file menu items have the obvious interpretation allowing models to be saved, loaded and the application exited. Items below the horizontal line assist in development of the Minsky code, so will not be documented here.

Creating Model Elements

Minsky model elements are variables, constants, operators and plots. Creating a model element is a matter of selecting the appropriate type from the Operations menu, or clicking on a button in the toolbar, then placing the element somewhere on the canvas. When creating a variable, it is necessary to give the variable a name first, prior to placing it on the canvas.

Each element has a double-click action, which usually opens an edit dialog, but in the case of plots opens up a detailed plot view. Each elemen also has a context menu, accessible from button 3 (usually the right mouse button, although apparently it is the middle mouse button on the Mac). This allows the element to be deleted, edited, copied (duplicated) or flipped (rotated through 180 degrees).

Canvas Mode

The canvas has three modes, which refers to what button 1 (left button) does.

  • move: model elements can be dragged to different parts of the canvas.
  • pan: pan the canvas
  • wire: wire elements together (also available through mouse button 2 - usually middle button).

Wiring elements

Models elements can be wired together to represent data flow by clicking on the source element with the middle button (or left button in wiring mode), then dragging the wire to the destination element. The wire will snap to the closest connecting point (if relevant), called a "port". All elements have a single output, but binary operations have two inputs. The top input refers to the left hand argument, and the bottom the right.

Bending the wires

If you move the mouse over a wire, small circles denoting "handles" appear. If you drag a handle, you can bend the wire to make it more visually appealing. Handles can be deleted by double-clicking, and the context menu allows one to straighten, and also delete the wire. (Some of these features are still to be implemented at the time of writing).

Variables

Variables come in two flavours, sink (flow) variables, and source (stock) variables.
Sink/Source variables

Both types of variable have output ports, located on the convex edge of the element shape, allowing them to be connected elsewhere, but sink variables also have an input port, located on the concave edge, from which they get their value. If a sink variable does not have its input port wired, it is effectively a named constant.

Creating a variable element through the operations menu creates a view on a named variable in the system. If the variable does not already exist, a flow variable of that name is created. Setting the initial value of variable affects all variable elements of the same name. The only way to create a stock variable is via the Godley table. As well, the integration operation creates an unnamed source variable representing the current value of the integral, which can be interacted with through the integration element.

Constants

Named constants, unlike variables, are independent of each other.

Godley Table

The Godley table allows stock variables to be defined in terms of a sum or difference of a set of flow variables. Each column of the table defines a new stock variable, and each row (if present) defines a flow variable that is added or subtracted to define the stock variable.

Runge-Kutta algorithm

When the run button is pressed, Minsky integrates the stock variables (and the unnamed integration variables) by means of a 4th order Runger-Kutta algorithm. The Runge-Kutta menu allows the basic paramters of the algorithm to be controlled, including minium and maximum step sizes the adaptive stepping algorithm can take, the absolute and relative error used for the adaptive algorithm and the number of steps before returning a result back to the user interface. Pressing the "step" advances this number of steps. Pressing the run button again pauses the simulation. Reset resets the simulation back to t=0, and resets all variables back to their initial values.


Related

Wiki: Home