Main
~~!! Equations~~

~~|| - ||Unary minus || -(x-y) = 0 ||~~

|| - ||Unary minus || -(x-y) = 0 ||

|| - ||Unary minus || -(x-y) = 0 ||
~~There are currently 26 operands for parameters or variables. They~~ are listed below with a short description of each and a simple example involving variable ''x'' and ''y''. For equations may be in the form of equalities (=) or inequalities (>,<). For inequalities, the equation may be bounded between lower and upper limits that are also functions of variables.

The steady-state solution is:

p=2

x=-1.0445

y=0.1238

z=-1.0445.

(:cellnr:)

! Example with an inequality

Model example

Variables

x

y

z

End Variables

Equations

x = 0.5 * y

0 = z + 2*x

x < y < z

End Equations

End Model

~~! Steady state solution~~

! p = 2

! x = -1.0445

! y = 0.12380

! z = -1.0445
~~ Equations~~

! The program tranforms all equations from the 'original form' to

! the 'residual form'. Sparse first derivatives

! of the residual are reported with respect to the variable values.

x = y ! Original form

x-y = 0 ! Residual form

! Below are examples of some of the types of variable operations that

! are possible. There is currently a limit of 100 unique variables per equation.

-(x-y) = 0 ! Unary minus

x+y=0 ! Addition

x-y=0 ! Subtraction

x*y=0 ! Multiplication

x/y=0 ! Division

x^y=0 ! Power

abs(x*y)=0 ! Absolute value

exp(x*y)=0 ! Exponentiation

log10(x*y)=0 ! Log10

log(x*y)=0 ! Log (natural log)

sqrt(x*y)=0 ! Square Root

sinh(x*y)=0 ! Hyperbolic Sine

cosh(x*y)=0 ! Hyperbolic Cosine

tanh(x*y)=0 ! Hyperbolic Tanget

sin(x*y)=0 ! Sine

cos(x*y)=0 ! Cosine

tan(x*y)=0 ! Tangent

asin(x*y)=0 ! Arc-sine

acos(x*y)=0 ! Arc-cos

atan(x*y)=0 ! Arc-tangent

! Example of a more complex equation. There are 3 unique variables (x,y,z) and 1 residual.

! Exact first derivatives are reported for:

! d(res)/dx, d(res)/dy, d(res)/dz

! where:

! res = (y+2/x)^(x*z) * (log(tanh(sqrt(y-x+x^2))+3))^2 - (2+sinh(y)+acos(x+y)+asin(x/y))

(y+2/x)^(x*z) * (log(tanh(sqrt(y-x+x^2))+3))^2 = 2+sinh(y)+acos(x+y)+asin(x/y)

! Differential equation with $ indicating a differential with respect to time

! Sparsity pattern is augmented by n columns where n is the number of variables

! If x is the first variable and there are 3 variables then $x would be variable 4

! x=1

! y=2

! z=3

! $x=4

! $y=5

! $z=6

$x = -x + y

! Characters are not case specific

$Z = -x + z*Y

End Equations
~~Parameters are fixed values that represent model inputs, fixed constants, or any other value that does not change~~. ~~Parameters are not modified by the solver as it searches for a solution. As such, parameters do not contribute to the number of degrees of freedom (DOF)~~.

~~Variables~~

x = 0.2

y= ~~0.5~~

~~z = 1.5~~

End Variables

## Equations

## Main.Equations History

Hide minor edits - Show changes to output

Deleted lines 0-1:

Changed line 48 from:

(:table border=1 width=~~50~~% align=left bgcolor=#EEEEEE cellspacing=0:)

to:

(:table border=1 width=100% align=left bgcolor=#EEEEEE cellspacing=0:)

Deleted lines 21-23:

|| - ||Unary minus || -(x-y) = 0 ||

|| - ||Unary minus || -(x-y) = 0 ||

Changed lines 70-72 from:

(y+2/x)^(x*z) * (log(tanh(sqrt(y-x+x^2))+3))^2 = 2+sinh(y)+acos(x+y)+asin(x/y)

to:

(y+2/x)^(x*z) * &

(log(tanh(sqrt(y-x+x^2))+3))^2 &

= 2+sinh(y)+acos(x+y)+asin(x/y)

(log(tanh(sqrt(y-x+x^2))+3))^2 &

= 2+sinh(y)+acos(x+y)+asin(x/y)

Changed line 11 from:

to:

The available operands are listed below with a short description of each and a simple example involving variable ''x'' and ''y''. For equations may be in the form of equalities (=) or inequalities (>,<). For inequalities, the equation may be bounded between lower and upper limits that are also functions of variables.

Changed line 15 from:

|| !,#,% ||Comment ||~~!!~~ equation #1 (:html:)<br>(:htmlend:) 0 = x[1] + x[2] ! ~~comment~~ ||

to:

|| !,#,% ||Comment ||% equation #1 (:html:)<br>(:htmlend:) 0 = x[1] + x[2] ! eqn1 ||

Changed line 15 from:

|| !,#,% ||Comment ||~~ ~~! equation #1 (:html:)<br>(:htmlend:) 0 = x[1] + x[2] ! comment ||

to:

|| !,#,% ||Comment ||!! equation #1 (:html:)<br>(:htmlend:) 0 = x[1] + x[2] ! comment ||

Changed line 15 from:

|| !,#,% ||Comment || ! comment ||

to:

|| !,#,% ||Comment || ! equation #1 (:html:)<br>(:htmlend:) 0 = x[1] + x[2] ! comment ||

Changed line 13 from:

|| border=1 width=~~50~~%

to:

|| border=1 width=80%

Changed lines 15-17 from:

|| ~~=~~ ||Line Continuation || 0 = x[1] & (:html:)<br>(:htmlend:) + x[2] ||

to:

|| !,#,% ||Comment || ! comment ||

|| = ||Equality || x=y ||

|| & ||Line Continuation || 0 = x[1] & (:html:)<br>(:htmlend:) + x[2] ||

|| = ||Equality || x=y ||

|| & ||Line Continuation || 0 = x[1] & (:html:)<br>(:htmlend:) + x[2] ||

Changed line 15 from:

|| = ||Line Continuation || 0 = x[1] & ~~\n~~ + x[2] ||

to:

|| = ||Line Continuation || 0 = x[1] & (:html:)<br>(:htmlend:) + x[2] ||

Changed line 13 from:

|| border=1 width=~~30~~%

to:

|| border=1 width=50%

Added line 15:

|| = ||Line Continuation || 0 = x[1] & \n + x[2] ||

Added lines 43-44:

|| erf() ||Error function || erf(x*y)=0 ||

|| erfc() ||Complementary error function || erfc(x*y)=0 ||

|| erfc() ||Complementary error function || erfc(x*y)=0 ||

Changed lines 11-12 from:

There are currently ~~21~~ operands for parameters or variables. They are listed below with a short description of each and a simple example involving variable ''x'' and ''y''.

to:

There are currently 26 operands for parameters or variables. They are listed below with a short description of each and a simple example involving variable ''x'' and ''y''. For equations may be in the form of equalities (=) or inequalities (>,<). For inequalities, the equation may be bounded between lower and upper limits that are also functions of variables.

Added lines 15-19:

|| = ||Equality || x=y ||

|| < ||Less than || x<y ||

|| <= ||Less than or equal || x<=y ||

|| > ||Greater than || x>y ||

|| >= ||Greater than or equal || x>=y ||

|| < ||Less than || x<y ||

|| <= ||Less than or equal || x<=y ||

|| > ||Greater than || x>y ||

|| >= ||Greater than or equal || x>=y ||

Added lines 21-23:

|| - ||Unary minus || -(x-y) = 0 ||

|| - ||Unary minus || -(x-y) = 0 ||

|| - ||Unary minus || -(x-y) = 0 ||

|| - ||Unary minus || -(x-y) = 0 ||

|| - ||Unary minus || -(x-y) = 0 ||

Changed lines 47-48 from:

A couple differential and algebraic equations are shown below~~. The steady-state solution is p=2, x=-1.0445, y=0.1238, and z=-1.0445~~. For steady-state solutions the differential variables (''$x'') are set to zero. Variables x, y, and z were not given initial values. In the absence of an initial condition, variables are set to a default value of 1.0.

to:

A couple differential and algebraic equations are shown below. For steady-state solutions the differential variables (''$x'') are set to zero. Variables x, y, and z were not given initial values. In the absence of an initial condition, variables are set to a default value of 1.0.

Changed line 51 from:

! Example ~~model that demonstrates a few~~ equations

to:

! Example with three equality equations

Added lines 69-92:

The steady-state solution is:

p=2

x=-1.0445

y=0.1238

z=-1.0445.

(:cellnr:)

! Example with an inequality

Model example

Variables

x

y

z

End Variables

Equations

x = 0.5 * y

0 = z + 2*x

x < y < z

End Equations

End Model

Changed lines 41-62 from:

(:table ~~class~~=~~'markup horiz' align~~=~~'~~left~~':)~~

(:cellnr class=~~'markup1'~~:)

~~>>blue<<~~

[@! Example model that demonstrates a few equations

Model example

Parameters

p = 2

End Parameters

Variables

x

y

z

End Variables

Equations

exp(x*p)=y

z = p*$x + x

(y+2/x)^(x*z) * (log(tanh(sqrt(y-x+x^2))+3))^2 = 2+sinh(y)+acos(x+y)+asin(x/y)

End Equations

End~~Model@]~~

>><<

(:cellnr class

[@!

Model example

Parameters

p = 2

End Parameters

Variables

x

y

z

End Variables

Equations

exp(x*p)=y

z = p*$x + x

(y+2/x)^(x*z) * (log(tanh(sqrt(y-x+x^2))+3))^2 = 2+sinh(y)+acos(x+y)+asin(x/y)

End Equations

End

>><<

to:

(:table border=1 width=50% align=left bgcolor=#EEEEEE cellspacing=0:)

(:cellnr:)

! Example model that demonstrates a few equations

Model example

Parameters

p = 2

End Parameters

Variables

x

y

z

End Variables

Equations

exp(x*p)=y

z = p*$x + x

(y+2/x)^(x*z) * (log(tanh(sqrt(y-x+x^2))+3))^2 = 2+sinh(y)+acos(x+y)+asin(x/y)

End Equations

End Model

(:cellnr:)

! Example model that demonstrates a few equations

Model example

Parameters

p = 2

End Parameters

Variables

x

y

z

End Variables

Equations

exp(x*p)=y

z = p*$x + x

(y+2/x)^(x*z) * (log(tanh(sqrt(y-x+x^2))+3))^2 = 2+sinh(y)+acos(x+y)+asin(x/y)

End Equations

End Model

Changed lines 9-10 from:

!!! ~~Equation operands~~

to:

!!! Operations

Changed line 37 from:

!!!~~ Equation~~ Example

to:

!!! Example

Changed line 13 from:

|| border=1 width=30%~~ align=left~~

to:

|| border=1 width=30%

Changed line 13 from:

|| border=1 width=30% align=~~center~~

to:

|| border=1 width=30% align=left

Changed line 13 from:

|| border=1 width=30%

to:

|| border=1 width=30% align=center

Changed line 14 from:

|| Operand ||! Description ||! Example ||

to:

||! Operand ||! Description ||! Example ||

Changed line 39 from:

A couple differential and algebraic equations are shown below. The steady-state solution is p=2, x=-1.0445, y=0.1238, and z=-1.0445. For steady-state solutions the differential variables (''$x'') are set to zero.

to:

A couple differential and algebraic equations are shown below. The steady-state solution is p=2, x=-1.0445, y=0.1238, and z=-1.0445. For steady-state solutions the differential variables (''$x'') are set to zero. Variables x, y, and z were not given initial values. In the absence of an initial condition, variables are set to a default value of 1.0.

Added lines 39-40:

A couple differential and algebraic equations are shown below. The steady-state solution is p=2, x=-1.0445, y=0.1238, and z=-1.0445. For steady-state solutions the differential variables (''$x'') are set to zero.

Deleted lines 44-48:

! p = 2

! x = -1.0445

! y = 0.12380

! z = -1.0445

Changed lines 42-47 from:

[@! Example model that demonstrates ~~equation declarations~~

to:

[@! Example model that demonstrates a few equations

! Steady state solution

! p = 2

! x = -1.0445

! y = 0.12380

! z = -1.0445E+00

! Steady state solution

! p = 2

! x = -1.0445

! y = 0.12380

! z = -1.0445E+00

Changed lines 7-8 from:

''Open-equation format'' is allowed for differential and algebraic equations. ''Open-equation'' means that the equation can be expressed in the least restrictive form. Other software packages require differential equations to be posed in the semi-explicit form: dx/dt = f(x). This is not required with %blue%A%red%P%black%Monitor modelling language.

to:

''Open-equation format'' is allowed for differential and algebraic equations. ''Open-equation'' means that the equation can be expressed in the least restrictive form. Other software packages require differential equations to be posed in the semi-explicit form: dx/dt = f(x). This is not required with %blue%A%red%P%black%Monitor modelling language. All equations are automatically transformed into residual form.

Changed lines 35-38 from:

|| $ ||Differential || $x = -x + y

to:

|| $ ||Differential || $x = -x + y ||

!!! Equation Example

!!! Equation Example

Changed line 45 from:

p = ~~1~~

to:

p = 2

Changed lines 54-104 from:

! The program tranforms all equations from the 'original form' to

! the 'residual form'. Sparse first derivatives

! of the residual are reported with respect to the variable values.

x = y ! Original form

x-y = 0 ! Residual form

! Below are examples of some of the types of variable operations that

! are possible. There is currently a limit of 100 unique variables per equation.

-(x-y) = 0 ! Unary minus

x+y=0 ! Addition

x-y=0 ! Subtraction

x*y=0 ! Multiplication

x/y=0 ! Division

x^y=0 ! Power

abs(x*y)=0 ! Absolute value

exp(x*y)=0 ! Exponentiation

log10(x*y)=0 ! Log10

log(x*y)=0 ! Log (natural log)

sqrt(x*y)=0 ! Square Root

sinh(x*y)=0 ! Hyperbolic Sine

cosh(x*y)=0 ! Hyperbolic Cosine

tanh(x*y)=0 ! Hyperbolic Tanget

sin(x*y)=0 ! Sine

cos(x*y)=0 ! Cosine

tan(x*y)=0 ! Tangent

asin(x*y)=0 ! Arc-sine

acos(x*y)=0 ! Arc-cos

atan(x*y)=0 ! Arc-tangent

! Example of a more complex equation. There are 3 unique variables (x,y,z) and 1 residual.

! Exact first derivatives are reported for:

! d(res)/dx, d(res)/dy, d(res)/dz

! where:

! res = (y+2/x)^(x*z) * (log(tanh(sqrt(y-x+x^2))+3))^2 - (2+sinh(y)+acos(x+y)+asin(x/y))

(y+2/x)^(x*z) * (log(tanh(sqrt(y-x+x^2))+3))^2 = 2+sinh(y)+acos(x+y)+asin(x/y)

! Differential equation with $ indicating a differential with respect to time

! Sparsity pattern is augmented by n columns where n is the number of variables

! If x is the first variable and there are 3 variables then $x would be variable 4

! x=1

! y=2

! z=3

! $x=4

! $y=5

! $z=6

$x = -x + y

! Characters are not case specific

$Z = -x + z*Y

End Equations

to:

Equations

exp(x*p)=y

z = p*$x + x

(y+2/x)^(x*z) * (log(tanh(sqrt(y-x+x^2))+3))^2 = 2+sinh(y)+acos(x+y)+asin(x/y)

End Equations

exp(x*p)=y

z = p*$x + x

(y+2/x)^(x*z) * (log(tanh(sqrt(y-x+x^2))+3))^2 = 2+sinh(y)+acos(x+y)+asin(x/y)

End Equations

Changed lines 14-34 from:

||~~! #~~ ||! Description ||! Example ||

||~~1~~ ||Unary minus || -(x-y) = 0 ||

||~~2~~ ||Addition || x+y = 0 ||

||~~3~~ ||Subtraction || x-y=0 ||

||~~4~~ ||Multiplication || x*y=0 ||

||~~5~~ ||Division || x/y=0 ||

||~~6~~ ||Power || x^y=0 ||

||~~7~~ ||Absolute value || abs(x*y)=0 ||

||~~8~~ ||Exponentiation || exp(x*y)=0 ||

||~~9~~ ||Base-10 Log || log10(x*y)=0 ||

||~~10~~ ||Natural Log || log(x*y)=0 ||

||~~11~~ ||Square Root || sqrt(x*y)=0 ||

||~~12~~ ||Hyperbolic Sine || sinh(x*y)=0 ||

||~~13~~ ||Hyperbolic Cosine || cosh(x*y)=0 ||

||~~14~~ ||Hyperbolic Tanget || tanh(x*y)=0 ||

||~~15~~ ||Sine || sin(x*y)=0 ||

||~~16~~ ||Cosine || cos(x*y)=0 ||

||~~17~~ ||Tangent || tan(x*y)=0 ||

||~~18~~ ||Arc-sine || asin(x*y)=0 ||

||~~19~~ ||Arc-cos || acos(x*y)=0 ||

||~~20~~ ||Arc-tangent || atan(x*y)=0 ||

||

||

||

||

||

||

||

||

||

||

||

||

||

||

||

||

||

||

||

||

to:

|| Operand ||! Description ||! Example ||

|| - ||Unary minus || -(x-y) = 0 ||

|| + ||Addition || x+y = 0 ||

|| - ||Subtraction || x-y=0 ||

|| * ||Multiplication || x*y=0 ||

|| / ||Division || x/y=0 ||

|| ^ ||Power || x^y=0 ||

|| abs() ||Absolute value || abs(x*y)=0 ||

|| exp() ||Exponentiation || exp(x*y)=0 ||

|| log10 ||Base-10 Log || log10(x*y)=0 ||

|| log ||Natural Log || log(x*y)=0 ||

|| sqrt() ||Square Root || sqrt(x*y)=0 ||

|| sinh() ||Hyperbolic Sine || sinh(x*y)=0 ||

|| cosh() ||Hyperbolic Cosine || cosh(x*y)=0 ||

|| tanh() ||Hyperbolic Tanget || tanh(x*y)=0 ||

|| sin() ||Sine || sin(x*y)=0 ||

|| cos() ||Cosine || cos(x*y)=0 ||

|| tan() ||Tangent || tan(x*y)=0 ||

|| asin() ||Arc-sine || asin(x*y)=0 ||

|| acos() ||Arc-cos || acos(x*y)=0 ||

|| atan() ||Arc-tangent || atan(x*y)=0 ||

|| - ||Unary minus || -(x-y) = 0 ||

|| + ||Addition || x+y = 0 ||

|| - ||Subtraction || x-y=0 ||

|| * ||Multiplication || x*y=0 ||

|| / ||Division || x/y=0 ||

|| ^ ||Power || x^y=0 ||

|| abs() ||Absolute value || abs(x*y)=0 ||

|| exp() ||Exponentiation || exp(x*y)=0 ||

|| log10 ||Base-10 Log || log10(x*y)=0 ||

|| log ||Natural Log || log(x*y)=0 ||

|| sqrt() ||Square Root || sqrt(x*y)=0 ||

|| sinh() ||Hyperbolic Sine || sinh(x*y)=0 ||

|| cosh() ||Hyperbolic Cosine || cosh(x*y)=0 ||

|| tanh() ||Hyperbolic Tanget || tanh(x*y)=0 ||

|| sin() ||Sine || sin(x*y)=0 ||

|| cos() ||Cosine || cos(x*y)=0 ||

|| tan() ||Tangent || tan(x*y)=0 ||

|| asin() ||Arc-sine || asin(x*y)=0 ||

|| acos() ||Arc-cos || acos(x*y)=0 ||

|| atan() ||Arc-tangent || atan(x*y)=0 ||

Changed line 14 from:

||! Description ||! Example ||

to:

||! # ||! Description ||! Example ||

Changed line 13 from:

|| border=1 width=~~50~~%

to:

|| border=1 width=30%

Changed lines 15-34 from:

|| ~~Unary minus ~~||~~ -(x-y) = 0 ~~||

~~|| Addition~~ || ~~x+y = 0 ~~||

|| ~~Subtraction~~ || ~~x-y=0~~ ||

|| ~~Multiplication~~ || ~~x*y=0~~ ||

|| ~~Division~~ || ~~x/y=0~~ ||

|| ~~Power~~ || ~~x^y=0~~ ||

|| ~~Absolute value ~~|| ~~abs(x*y)=0~~ ||

|| Exponentiation || ~~exp~~(x*y)=0 ||

||~~Log10~~ ||~~ log10~~(x*y)=0 ||

||~~Log (natural log) ~~||~~ log(x*y)=0~~ ||

~~|| Square Root ~~|| ~~sqrt(x*y)=0~~ ||

|| Hyperbolic Sine|| ~~sinh~~(x*y)=0 ||

||~~Hyperbolic Cosine ~~||~~ cosh(x*y)=0~~ ||

~~|| Hyperbolic Tanget ~~|| ~~tanh(x*y)=0~~ ||

|| Sine || ~~sin~~(x*y)=0 ||

||~~Cosine~~ ||~~ cos(x*y)=0~~ ||

~~|| Tangent || tan~~(x*y)=0 ||

||~~Arc-sine~~ ||~~ asin(x*y)=0~~ ||

~~|| Arc-cos || acos~~(x*y)=0 ||

||~~Arc-tangent~~ ||~~ atan~~(x*y)=0 ||

|| Exponentiation

||

||

|| Hyperbolic Sine

||

||

||

||

||

to:

|| 1 ||Unary minus || -(x-y) = 0 ||

|| 2 ||Addition || x+y = 0 ||

|| 3 ||Subtraction || x-y=0 ||

|| 4 ||Multiplication || x*y=0 ||

|| 5 ||Division || x/y=0 ||

|| 6 ||Power || x^y=0 ||

|| 7 ||Absolute value || abs(x*y)=0 ||

|| 8 ||Exponentiation || exp(x*y)=0 ||

|| 9 ||Base-10 Log || log10(x*y)=0 ||

|| 10 ||Natural Log || log(x*y)=0 ||

|| 11 ||Square Root || sqrt(x*y)=0 ||

|| 12 ||Hyperbolic Sine || sinh(x*y)=0 ||

|| 13 ||Hyperbolic Cosine || cosh(x*y)=0 ||

|| 14 ||Hyperbolic Tanget || tanh(x*y)=0 ||

|| 15 ||Sine || sin(x*y)=0 ||

|| 16 ||Cosine || cos(x*y)=0 ||

|| 17 ||Tangent || tan(x*y)=0 ||

|| 18 ||Arc-sine || asin(x*y)=0 ||

|| 19 ||Arc-cos || acos(x*y)=0 ||

|| 20 ||Arc-tangent || atan(x*y)=0 ||

|| 2 ||Addition || x+y = 0 ||

|| 3 ||Subtraction || x-y=0 ||

|| 4 ||Multiplication || x*y=0 ||

|| 5 ||Division || x/y=0 ||

|| 6 ||Power || x^y=0 ||

|| 7 ||Absolute value || abs(x*y)=0 ||

|| 8 ||Exponentiation || exp(x*y)=0 ||

|| 9 ||Base-10 Log || log10(x*y)=0 ||

|| 10 ||Natural Log || log(x*y)=0 ||

|| 11 ||Square Root || sqrt(x*y)=0 ||

|| 12 ||Hyperbolic Sine || sinh(x*y)=0 ||

|| 13 ||Hyperbolic Cosine || cosh(x*y)=0 ||

|| 14 ||Hyperbolic Tanget || tanh(x*y)=0 ||

|| 15 ||Sine || sin(x*y)=0 ||

|| 16 ||Cosine || cos(x*y)=0 ||

|| 17 ||Tangent || tan(x*y)=0 ||

|| 18 ||Arc-sine || asin(x*y)=0 ||

|| 19 ||Arc-cos || acos(x*y)=0 ||

|| 20 ||Arc-tangent || atan(x*y)=0 ||

Changed lines 11-12 from:

There are currently 21 operands for parameters or variables. They are listed below with a short description of each and a simple example involving variable ''x'' and~~ optionally~~ ''y''.

to:

There are currently 21 operands for parameters or variables. They are listed below with a short description of each and a simple example involving variable ''x'' and ''y''.

Changed line 14 from:

||!Description ||~~ ~~!Example ||

to:

||! Description ||! Example ||

Changed lines 14-34 from:

||!Description||~~!Example~~ ||

||Unary minus|| -(x-y) = 0 ||

||Addition|| x+y = 0 ||

||Subtraction||x-y=0||

||Multiplication||x*y=0||

||Division||x/y=0||

||Power||x^y=0||

||Absolute value||abs(x*y)=0||

||Exponentiation||exp(x*y)=0||

||Log10||log10(x*y)=0||

||Log (natural log)||log(x*y)=0||

||Square Root||sqrt(x*y)=0||

||Hyperbolic Sine||sinh(x*y)=0||

||Hyperbolic Cosine||cosh(x*y)=0||

||Hyperbolic Tanget||tanh(x*y)=0||

||Sine||sin(x*y)=0||

||Cosine||cos(x*y)=0||

||Tangent||tan(x*y)=0||

||Arc-sine||asin(x*y)=0||

||Arc-cos||acos(x*y)=0||

||Arc-tangent||atan(x*y)=0||

||Unary minus|| -(x-y) = 0 ||

||Addition|| x+y = 0 ||

||Subtraction||x-y=0||

||Multiplication||x*y=0||

||Division||x/y=0||

||Power||x^y=0||

||Absolute value||abs(x*y)=0||

||Exponentiation||exp(x*y)=0||

||Log10||log10(x*y)=0||

||Log (natural log)||log(x*y)=0||

||Square Root||sqrt(x*y)=0||

||Hyperbolic Sine||sinh(x*y)=0||

||Hyperbolic Cosine||cosh(x*y)=0||

||Hyperbolic Tanget||tanh(x*y)=0||

||Sine||sin(x*y)=0||

||Cosine||cos(x*y)=0||

||Tangent||tan(x*y)=0||

||Arc-sine||asin(x*y)=0||

||Arc-cos||acos(x*y)=0||

||Arc-tangent||atan(x*y)=0||

to:

||!Description || !Example ||

|| Unary minus || -(x-y) = 0 ||

|| Addition || x+y = 0 ||

|| Subtraction || x-y=0 ||

|| Multiplication || x*y=0 ||

|| Division || x/y=0 ||

|| Power || x^y=0 ||

|| Absolute value || abs(x*y)=0 ||

|| Exponentiation || exp(x*y)=0 ||

|| Log10 || log10(x*y)=0 ||

|| Log (natural log) || log(x*y)=0 ||

|| Square Root || sqrt(x*y)=0 ||

|| Hyperbolic Sine || sinh(x*y)=0 ||

|| Hyperbolic Cosine || cosh(x*y)=0 ||

|| Hyperbolic Tanget || tanh(x*y)=0 ||

|| Sine || sin(x*y)=0 ||

|| Cosine || cos(x*y)=0 ||

|| Tangent || tan(x*y)=0 ||

|| Arc-sine || asin(x*y)=0 ||

|| Arc-cos || acos(x*y)=0 ||

|| Arc-tangent || atan(x*y)=0 ||

|| Unary minus || -(x-y) = 0 ||

|| Addition || x+y = 0 ||

|| Subtraction || x-y=0 ||

|| Multiplication || x*y=0 ||

|| Division || x/y=0 ||

|| Power || x^y=0 ||

|| Absolute value || abs(x*y)=0 ||

|| Exponentiation || exp(x*y)=0 ||

|| Log10 || log10(x*y)=0 ||

|| Log (natural log) || log(x*y)=0 ||

|| Square Root || sqrt(x*y)=0 ||

|| Hyperbolic Sine || sinh(x*y)=0 ||

|| Hyperbolic Cosine || cosh(x*y)=0 ||

|| Hyperbolic Tanget || tanh(x*y)=0 ||

|| Sine || sin(x*y)=0 ||

|| Cosine || cos(x*y)=0 ||

|| Tangent || tan(x*y)=0 ||

|| Arc-sine || asin(x*y)=0 ||

|| Arc-cos || acos(x*y)=0 ||

|| Arc-tangent || atan(x*y)=0 ||

Changed lines 3-4 from:

to:

Equations consist of a collection of parameters and variables that are related by operands (+,-,*,/,exp(),d()/dt, etc.). The equations define the relationship between variables.

Added lines 7-36:

''Open-equation format'' is allowed for differential and algebraic equations. ''Open-equation'' means that the equation can be expressed in the least restrictive form. Other software packages require differential equations to be posed in the semi-explicit form: dx/dt = f(x). This is not required with %blue%A%red%P%black%Monitor modelling language.

!!! Equation operands

There are currently 21 operands for parameters or variables. They are listed below with a short description of each and a simple example involving variable ''x'' and optionally ''y''.

|| border=1 width=50%

||!Description||!Example ||

||Unary minus|| -(x-y) = 0 ||

||Addition|| x+y = 0 ||

||Subtraction||x-y=0||

||Multiplication||x*y=0||

||Division||x/y=0||

||Power||x^y=0||

||Absolute value||abs(x*y)=0||

||Exponentiation||exp(x*y)=0||

||Log10||log10(x*y)=0||

||Log (natural log)||log(x*y)=0||

||Square Root||sqrt(x*y)=0||

||Hyperbolic Sine||sinh(x*y)=0||

||Hyperbolic Cosine||cosh(x*y)=0||

||Hyperbolic Tanget||tanh(x*y)=0||

||Sine||sin(x*y)=0||

||Cosine||cos(x*y)=0||

||Tangent||tan(x*y)=0||

||Arc-sine||asin(x*y)=0||

||Arc-cos||acos(x*y)=0||

||Arc-tangent||atan(x*y)=0||

!!! Equation operands

There are currently 21 operands for parameters or variables. They are listed below with a short description of each and a simple example involving variable ''x'' and optionally ''y''.

|| border=1 width=50%

||!Description||!Example ||

||Unary minus|| -(x-y) = 0 ||

||Addition|| x+y = 0 ||

||Subtraction||x-y=0||

||Multiplication||x*y=0||

||Division||x/y=0||

||Power||x^y=0||

||Absolute value||abs(x*y)=0||

||Exponentiation||exp(x*y)=0||

||Log10||log10(x*y)=0||

||Log (natural log)||log(x*y)=0||

||Square Root||sqrt(x*y)=0||

||Hyperbolic Sine||sinh(x*y)=0||

||Hyperbolic Cosine||cosh(x*y)=0||

||Hyperbolic Tanget||tanh(x*y)=0||

||Sine||sin(x*y)=0||

||Cosine||cos(x*y)=0||

||Tangent||tan(x*y)=0||

||Arc-sine||asin(x*y)=0||

||Arc-cos||acos(x*y)=0||

||Arc-tangent||atan(x*y)=0||

Changed lines 42-46 from:

x = 0.2

y

to:

Parameters

p = 1

End Parameters

Variables

x

y

z

End Variables

p = 1

End Parameters

Variables

x

y

z

End Variables

Added lines 1-71:

!! Equations

Parameters are fixed values that represent model inputs, fixed constants, or any other value that does not change. Parameters are not modified by the solver as it searches for a solution. As such, parameters do not contribute to the number of degrees of freedom (DOF).

Equations are declared in the ''Equations ... End Equations'' section of the model file. The equations may be defined in one section or in multiple declarations throughout the model. Equations are parsed sequentially, from top to bottom. However, implicit equations are solved simultaneously so the order of the equations does not change the solution.

(:table class='markup horiz' align='left':)

(:cellnr class='markup1':)

>>blue<<

[@! Example model that demonstrates equation declarations

Model example

Variables

x = 0.2

y = 0.5

z = 1.5

End Variables

Equations

! The program tranforms all equations from the 'original form' to

! the 'residual form'. Sparse first derivatives

! of the residual are reported with respect to the variable values.

x = y ! Original form

x-y = 0 ! Residual form

! Below are examples of some of the types of variable operations that

! are possible. There is currently a limit of 100 unique variables per equation.

-(x-y) = 0 ! Unary minus

x+y=0 ! Addition

x-y=0 ! Subtraction

x*y=0 ! Multiplication

x/y=0 ! Division

x^y=0 ! Power

abs(x*y)=0 ! Absolute value

exp(x*y)=0 ! Exponentiation

log10(x*y)=0 ! Log10

log(x*y)=0 ! Log (natural log)

sqrt(x*y)=0 ! Square Root

sinh(x*y)=0 ! Hyperbolic Sine

cosh(x*y)=0 ! Hyperbolic Cosine

tanh(x*y)=0 ! Hyperbolic Tanget

sin(x*y)=0 ! Sine

cos(x*y)=0 ! Cosine

tan(x*y)=0 ! Tangent

asin(x*y)=0 ! Arc-sine

acos(x*y)=0 ! Arc-cos

atan(x*y)=0 ! Arc-tangent

! Example of a more complex equation. There are 3 unique variables (x,y,z) and 1 residual.

! Exact first derivatives are reported for:

! d(res)/dx, d(res)/dy, d(res)/dz

! where:

! res = (y+2/x)^(x*z) * (log(tanh(sqrt(y-x+x^2))+3))^2 - (2+sinh(y)+acos(x+y)+asin(x/y))

(y+2/x)^(x*z) * (log(tanh(sqrt(y-x+x^2))+3))^2 = 2+sinh(y)+acos(x+y)+asin(x/y)

! Differential equation with $ indicating a differential with respect to time

! Sparsity pattern is augmented by n columns where n is the number of variables

! If x is the first variable and there are 3 variables then $x would be variable 4

! x=1

! y=2

! z=3

! $x=4

! $y=5

! $z=6

$x = -x + y

! Characters are not case specific

$Z = -x + z*Y

End Equations

End Model@]

>><<

(:tableend:)

Parameters are fixed values that represent model inputs, fixed constants, or any other value that does not change. Parameters are not modified by the solver as it searches for a solution. As such, parameters do not contribute to the number of degrees of freedom (DOF).

Equations are declared in the ''Equations ... End Equations'' section of the model file. The equations may be defined in one section or in multiple declarations throughout the model. Equations are parsed sequentially, from top to bottom. However, implicit equations are solved simultaneously so the order of the equations does not change the solution.

(:table class='markup horiz' align='left':)

(:cellnr class='markup1':)

>>blue<<

[@! Example model that demonstrates equation declarations

Model example

Variables

x = 0.2

y = 0.5

z = 1.5

End Variables

Equations

! The program tranforms all equations from the 'original form' to

! the 'residual form'. Sparse first derivatives

! of the residual are reported with respect to the variable values.

x = y ! Original form

x-y = 0 ! Residual form

! Below are examples of some of the types of variable operations that

! are possible. There is currently a limit of 100 unique variables per equation.

-(x-y) = 0 ! Unary minus

x+y=0 ! Addition

x-y=0 ! Subtraction

x*y=0 ! Multiplication

x/y=0 ! Division

x^y=0 ! Power

abs(x*y)=0 ! Absolute value

exp(x*y)=0 ! Exponentiation

log10(x*y)=0 ! Log10

log(x*y)=0 ! Log (natural log)

sqrt(x*y)=0 ! Square Root

sinh(x*y)=0 ! Hyperbolic Sine

cosh(x*y)=0 ! Hyperbolic Cosine

tanh(x*y)=0 ! Hyperbolic Tanget

sin(x*y)=0 ! Sine

cos(x*y)=0 ! Cosine

tan(x*y)=0 ! Tangent

asin(x*y)=0 ! Arc-sine

acos(x*y)=0 ! Arc-cos

atan(x*y)=0 ! Arc-tangent

! Example of a more complex equation. There are 3 unique variables (x,y,z) and 1 residual.

! Exact first derivatives are reported for:

! d(res)/dx, d(res)/dy, d(res)/dz

! where:

! res = (y+2/x)^(x*z) * (log(tanh(sqrt(y-x+x^2))+3))^2 - (2+sinh(y)+acos(x+y)+asin(x/y))

(y+2/x)^(x*z) * (log(tanh(sqrt(y-x+x^2))+3))^2 = 2+sinh(y)+acos(x+y)+asin(x/y)

! Differential equation with $ indicating a differential with respect to time

! Sparsity pattern is augmented by n columns where n is the number of variables

! If x is the first variable and there are 3 variables then $x would be variable 4

! x=1

! y=2

! z=3

! $x=4

! $y=5

! $z=6

$x = -x + y

! Characters are not case specific

$Z = -x + z*Y

End Equations

End Model@]

>><<

(:tableend:)