Hopsan
Scripting

HCOM

Most functions in Hopsan can be accessed through the command interpreter in the terminal widget. The command language is called HCOM and is loosely based upon the commands used in the previous version of Hopsan (the one from 2001). Apart from the commands and functions, there is a built-in calculator that can evaluate mathematical expressions using the SymHop library.

See HCOM Scripting for details.

EmbeddedScript (NumHop)

In Hopsan version 0.7 and later there is also a new script language called NumHop that is embedded inside the Simulation model. This script language allows you to evaluate simple numerical expressions and to read and write parametrs (default start values) in your model. The numhop script is interpreted and evaluated by the Hopsan Core prior to initialization. This means that you can use it to initialize start values in your model based on equations. This can be very usefull in some cases. NumHop expressions can also be entered as parameter values in the Component Properties dialog.

See NumHop Scripting for details.